You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to offer a PR to add a --mainnet no-op flag to geth, similar to Nethermind and Besu options. This would be a true no-op boolean, specifying it or leaving it out would have the same effect. To be clear, running geth without that parameter will still start it on main net.
My main ask is for geth; I am happy to add this to other tools in the same PR if desired.
Rationale
I have created docker tooling for eth2. The same tooling handles testnet and main net. Currently, I need to special case geth in .env like this:
# Network to use for eth1. If using Nethermind or Besu and main net, set to mainnet.
ETH1_NETWORK=goerli
# If using Geth as the eth1 node and main net, comment out.
GETH1_NETWORK=--goerli
With a --mainnet no-op flag, I can remove GETH1_NETWORK, instruct users to set ETH1_NETWORK to mainnet when on main, and it will work for Geth as well as other clients. The Geth docker-compose entrypoint could then simply use --${ETH1_NETWORK} for both test and main net.
Impact
Low for either project.
On the Geth side, having the no-op will not be a change that needs a lot of maintenance. If there's code that currently checks that only one network flag has been specified, please point me at where that is, and I can adjust it as part of the proposed PR.
On the eth2-docker side, not having the no-op is slightly inconvenient for the user, but not breaking by any means.
The text was updated successfully, but these errors were encountered:
This is a good idea. But it should not just be a no-op flag. It should behave the same as the testnet flags. E.g. detecting if you have both --goerli and --mainnet and error then. And refuse to start when you did not init with a non mainnet genesis.
Would you still be willing to do the PR?
System information
Geth version:
1.9.23
OS & Version: Linux
Suggested change
I'd like to offer a PR to add a
--mainnet
no-op flag to geth, similar to Nethermind and Besu options. This would be a true no-op boolean, specifying it or leaving it out would have the same effect. To be clear, running geth without that parameter will still start it on main net.My main ask is for geth; I am happy to add this to other tools in the same PR if desired.
Rationale
I have created docker tooling for eth2. The same tooling handles testnet and main net. Currently, I need to special case geth in
.env
like this:With a
--mainnet
no-op flag, I can remove GETH1_NETWORK, instruct users to set ETH1_NETWORK tomainnet
when on main, and it will work for Geth as well as other clients. The Geth docker-compose entrypoint could then simply use--${ETH1_NETWORK}
for both test and main net.Impact
Low for either project.
On the Geth side, having the no-op will not be a change that needs a lot of maintenance. If there's code that currently checks that only one network flag has been specified, please point me at where that is, and I can adjust it as part of the proposed PR.
On the eth2-docker side, not having the no-op is slightly inconvenient for the user, but not breaking by any means.
The text was updated successfully, but these errors were encountered: