cmd: deprecate --testnet, use named networks instead (#20852)
* cmd/utils: make goerli the default testnet * cmd/geth: explicitly rename testnet to ropsten * core: explicitly rename testnet to ropsten * params: explicitly rename testnet to ropsten * cmd: explicitly rename testnet to ropsten * miner: explicitly rename testnet to ropsten * mobile: allow for returning the goerli spec * tests: explicitly rename testnet to ropsten * docs: update readme to reflect changes to the default testnet * mobile: allow for configuring goerli and rinkeby nodes * cmd/geth: revert --testnet back to ropsten and mark as legacy * cmd/util: mark --testnet flag as deprecated * docs: update readme to properly reflect the 3 testnets * cmd/utils: add an explicit deprecation warning on startup * cmd/utils: swap goerli and ropsten in usage * cmd/geth: swap goerli and ropsten in usage * cmd/geth: if running a known preset, log it for convenience * docs: improve readme on usage of ropsten's testnet datadir * cmd/utils: check if legacy `testnet` datadir exists for ropsten * cmd/geth: check for legacy testnet path in console command * cmd/geth: use switch statement for complex conditions in main * cmd/geth: move known preset log statement to the very top * cmd/utils: create new ropsten configurations in the ropsten datadir * cmd/utils: makedatadir should check for existing testnet dir * cmd/geth: add legacy testnet flag to the copy db command * cmd/geth: add legacy testnet flag to the inspect command
This commit is contained in:
@ -28,7 +28,7 @@ import (
|
||||
// Genesis hashes to enforce below configs on.
|
||||
var (
|
||||
MainnetGenesisHash = common.HexToHash("0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3")
|
||||
TestnetGenesisHash = common.HexToHash("0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d")
|
||||
RopstenGenesisHash = common.HexToHash("0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d")
|
||||
RinkebyGenesisHash = common.HexToHash("0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177")
|
||||
GoerliGenesisHash = common.HexToHash("0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a")
|
||||
)
|
||||
@ -37,7 +37,7 @@ var (
|
||||
// the chain it belongs to.
|
||||
var TrustedCheckpoints = map[common.Hash]*TrustedCheckpoint{
|
||||
MainnetGenesisHash: MainnetTrustedCheckpoint,
|
||||
TestnetGenesisHash: TestnetTrustedCheckpoint,
|
||||
RopstenGenesisHash: RopstenTrustedCheckpoint,
|
||||
RinkebyGenesisHash: RinkebyTrustedCheckpoint,
|
||||
GoerliGenesisHash: GoerliTrustedCheckpoint,
|
||||
}
|
||||
@ -46,7 +46,7 @@ var TrustedCheckpoints = map[common.Hash]*TrustedCheckpoint{
|
||||
// the chain it belongs to.
|
||||
var CheckpointOracles = map[common.Hash]*CheckpointOracleConfig{
|
||||
MainnetGenesisHash: MainnetCheckpointOracle,
|
||||
TestnetGenesisHash: TestnetCheckpointOracle,
|
||||
RopstenGenesisHash: RopstenCheckpointOracle,
|
||||
RinkebyGenesisHash: RinkebyCheckpointOracle,
|
||||
GoerliGenesisHash: GoerliCheckpointOracle,
|
||||
}
|
||||
@ -91,8 +91,8 @@ var (
|
||||
Threshold: 2,
|
||||
}
|
||||
|
||||
// TestnetChainConfig contains the chain parameters to run a node on the Ropsten test network.
|
||||
TestnetChainConfig = &ChainConfig{
|
||||
// RopstenChainConfig contains the chain parameters to run a node on the Ropsten test network.
|
||||
RopstenChainConfig = &ChainConfig{
|
||||
ChainID: big.NewInt(3),
|
||||
HomesteadBlock: big.NewInt(0),
|
||||
DAOForkBlock: nil,
|
||||
@ -109,16 +109,16 @@ var (
|
||||
Ethash: new(EthashConfig),
|
||||
}
|
||||
|
||||
// TestnetTrustedCheckpoint contains the light client trusted checkpoint for the Ropsten test network.
|
||||
TestnetTrustedCheckpoint = &TrustedCheckpoint{
|
||||
// RopstenTrustedCheckpoint contains the light client trusted checkpoint for the Ropsten test network.
|
||||
RopstenTrustedCheckpoint = &TrustedCheckpoint{
|
||||
SectionIndex: 223,
|
||||
SectionHead: common.HexToHash("0x9aa51ca383f5075f816e0b8ce7125075cd562b918839ee286c03770722147661"),
|
||||
CHTRoot: common.HexToHash("0x755c6a5931b7bd36e55e47f3f1e81fa79c930ae15c55682d3a85931eedaf8cf2"),
|
||||
BloomRoot: common.HexToHash("0xabc37762d11b29dc7dde11b89846e2308ba681eeb015b6a202ef5e242bc107e8"),
|
||||
}
|
||||
|
||||
// TestnetCheckpointOracle contains a set of configs for the Ropsten test network oracle.
|
||||
TestnetCheckpointOracle = &CheckpointOracleConfig{
|
||||
// RopstenCheckpointOracle contains a set of configs for the Ropsten test network oracle.
|
||||
RopstenCheckpointOracle = &CheckpointOracleConfig{
|
||||
Address: common.HexToAddress("0xEF79475013f154E6A65b54cB2742867791bf0B84"),
|
||||
Signers: []common.Address{
|
||||
common.HexToAddress("0x32162F3581E88a5f62e8A61892B42C46E2c18f7b"), // Peter
|
||||
|
Reference in New Issue
Block a user