all: remove support for Ropsten (#26644)
This commit is contained in:
parent
0c9eb8c9a4
commit
095e365fac
13
README.md
13
README.md
@ -132,19 +132,6 @@ called [*Rinkeby*](https://www.rinkeby.io) which is operated by members of the c
|
||||
$ geth --rinkeby console
|
||||
```
|
||||
|
||||
### Full node on the Ropsten test network
|
||||
|
||||
In addition to Görli and Rinkeby, Geth also supports the ancient Ropsten testnet. The
|
||||
Ropsten test network is based on the Ethash proof-of-work consensus algorithm. As such,
|
||||
it has certain extra overhead and is more susceptible to reorganization attacks due to the
|
||||
network's low difficulty/security.
|
||||
|
||||
```shell
|
||||
$ geth --ropsten console
|
||||
```
|
||||
|
||||
*Note: Older Geth configurations store the Ropsten database in the `testnet` subdirectory.*
|
||||
|
||||
### Configuration
|
||||
|
||||
As an alternative to passing the numerous flags to the `geth` binary, you can also pass a
|
||||
|
@ -86,7 +86,7 @@ checkpoint-admin status --rpc <NODE_RPC_ENDPOINT>
|
||||
|
||||
### Enable checkpoint oracle in your private network
|
||||
|
||||
Currently, only the Ethereum mainnet and the default supported test networks (ropsten, rinkeby, goerli) activate this feature. If you want to activate this feature in your private network, you can overwrite the relevant checkpoint oracle settings through the configuration file after deploying the oracle contract.
|
||||
Currently, only the Ethereum mainnet and the default supported test networks (rinkeby, goerli) activate this feature. If you want to activate this feature in your private network, you can overwrite the relevant checkpoint oracle settings through the configuration file after deploying the oracle contract.
|
||||
|
||||
* Get your node configuration file `geth dumpconfig OTHER_COMMAND_LINE_OPTIONS > config.toml`
|
||||
* Edit the configuration file and add the following information
|
||||
|
@ -29,7 +29,7 @@ GLOBAL OPTIONS:
|
||||
--loglevel value log level to emit to the screen (default: 4)
|
||||
--keystore value Directory for the keystore (default: "$HOME/.ethereum/keystore")
|
||||
--configdir value Directory for Clef configuration (default: "$HOME/.clef")
|
||||
--chainid value Chain id to use for signing (1=mainnet, 3=Ropsten, 4=Rinkeby, 5=Goerli) (default: 1)
|
||||
--chainid value Chain id to use for signing (1=mainnet, 4=Rinkeby, 5=Goerli) (default: 1)
|
||||
--lightkdf Reduce key-derivation RAM & CPU usage at some expense of KDF strength
|
||||
--nousb Disables monitoring for and managing USB hardware wallets
|
||||
--pcscdpath value Path to the smartcard daemon (pcscd) socket file (default: "/run/pcscd/pcscd.comm")
|
||||
|
@ -99,7 +99,7 @@ var (
|
||||
chainIdFlag = &cli.Int64Flag{
|
||||
Name: "chainid",
|
||||
Value: params.MainnetChainConfig.ChainID.Int64(),
|
||||
Usage: "Chain id to use for signing (1=mainnet, 3=Ropsten, 4=Rinkeby, 5=Goerli)",
|
||||
Usage: "Chain id to use for signing (1=mainnet, 4=Rinkeby, 5=Goerli)",
|
||||
}
|
||||
rpcPortFlag = &cli.IntFlag{
|
||||
Name: "http.port",
|
||||
|
@ -44,7 +44,7 @@ set to standard output. The following filters are supported:
|
||||
- `-limit <N>` limits the output set to N entries, taking the top N nodes by score
|
||||
- `-ip <CIDR>` filters nodes by IP subnet
|
||||
- `-min-age <duration>` filters nodes by 'first seen' time
|
||||
- `-eth-network <mainnet/rinkeby/goerli/ropsten>` filters nodes by "eth" ENR entry
|
||||
- `-eth-network <mainnet/rinkeby/goerli/sepolia>` filters nodes by "eth" ENR entry
|
||||
- `-les-server` filters nodes by LES server support
|
||||
- `-snap` filters nodes by snap protocol support
|
||||
|
||||
|
@ -233,8 +233,6 @@ func ethFilter(args []string) (nodeFilter, error) {
|
||||
filter = forkid.NewStaticFilter(params.RinkebyChainConfig, params.RinkebyGenesisHash)
|
||||
case "goerli":
|
||||
filter = forkid.NewStaticFilter(params.GoerliChainConfig, params.GoerliGenesisHash)
|
||||
case "ropsten":
|
||||
filter = forkid.NewStaticFilter(params.RopstenChainConfig, params.RopstenGenesisHash)
|
||||
case "sepolia":
|
||||
filter = forkid.NewStaticFilter(params.SepoliaChainConfig, params.SepoliaGenesisHash)
|
||||
default:
|
||||
|
@ -30,7 +30,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
ipcAPIs = "admin:1.0 debug:1.0 engine:1.0 eth:1.0 ethash:1.0 miner:1.0 net:1.0 rpc:1.0 txpool:1.0 web3:1.0"
|
||||
ipcAPIs = "admin:1.0 clique:1.0 debug:1.0 engine:1.0 eth:1.0 miner:1.0 net:1.0 rpc:1.0 txpool:1.0 web3:1.0"
|
||||
httpAPIs = "eth:1.0 net:1.0 rpc:1.0 web3:1.0"
|
||||
)
|
||||
|
||||
@ -38,10 +38,10 @@ const (
|
||||
// memory and disk IO. If the args don't set --datadir, the
|
||||
// child g gets a temporary data directory.
|
||||
func runMinimalGeth(t *testing.T, args ...string) *testgeth {
|
||||
// --ropsten to make the 'writing genesis to disk' faster (no accounts)
|
||||
// --goerli to make the 'writing genesis to disk' faster (no accounts)
|
||||
// --networkid=1337 to avoid cache bump
|
||||
// --syncmode=full to avoid allocating fast sync bloom
|
||||
allArgs := []string{"--ropsten", "--networkid", "1337", "--authrpc.port", "0", "--syncmode=full", "--port", "0",
|
||||
allArgs := []string{"--goerli", "--networkid", "1337", "--authrpc.port", "0", "--syncmode=full", "--port", "0",
|
||||
"--nat", "none", "--nodiscover", "--maxpeers", "0", "--cache", "64",
|
||||
"--datadir.minfreedisk", "0"}
|
||||
return runGeth(t, append(allArgs, args...)...)
|
||||
@ -61,7 +61,7 @@ func TestConsoleWelcome(t *testing.T) {
|
||||
geth.SetTemplateFunc("gover", runtime.Version)
|
||||
geth.SetTemplateFunc("gethver", func() string { return params.VersionWithCommit("", "") })
|
||||
geth.SetTemplateFunc("niltime", func() string {
|
||||
return time.Unix(0, 0).Format("Mon Jan 02 2006 15:04:05 GMT-0700 (MST)")
|
||||
return time.Unix(1548854791, 0).Format("Mon Jan 02 2006 15:04:05 GMT-0700 (MST)")
|
||||
})
|
||||
geth.SetTemplateFunc("apis", func() string { return ipcAPIs })
|
||||
|
||||
@ -132,7 +132,7 @@ func testAttachWelcome(t *testing.T, geth *testgeth, endpoint, apis string) {
|
||||
attach.SetTemplateFunc("gethver", func() string { return params.VersionWithCommit("", "") })
|
||||
attach.SetTemplateFunc("etherbase", func() string { return geth.Etherbase })
|
||||
attach.SetTemplateFunc("niltime", func() string {
|
||||
return time.Unix(0, 0).Format("Mon Jan 02 2006 15:04:05 GMT-0700 (MST)")
|
||||
return time.Unix(1548854791, 0).Format("Mon Jan 02 2006 15:04:05 GMT-0700 (MST)")
|
||||
})
|
||||
attach.SetTemplateFunc("ipc", func() bool { return strings.HasPrefix(endpoint, "ipc") })
|
||||
attach.SetTemplateFunc("datadir", func() string { return geth.Datadir })
|
||||
|
@ -274,9 +274,6 @@ func main() {
|
||||
func prepare(ctx *cli.Context) {
|
||||
// If we're running a known preset, log it for convenience.
|
||||
switch {
|
||||
case ctx.IsSet(utils.RopstenFlag.Name):
|
||||
log.Info("Starting Geth on Ropsten testnet...")
|
||||
|
||||
case ctx.IsSet(utils.RinkebyFlag.Name):
|
||||
log.Info("Starting Geth on Rinkeby testnet...")
|
||||
|
||||
@ -310,8 +307,7 @@ func prepare(ctx *cli.Context) {
|
||||
// If we're a full node on mainnet without --cache specified, bump default cache allowance
|
||||
if ctx.String(utils.SyncModeFlag.Name) != "light" && !ctx.IsSet(utils.CacheFlag.Name) && !ctx.IsSet(utils.NetworkIdFlag.Name) {
|
||||
// Make sure we're not on any supported preconfigured testnet either
|
||||
if !ctx.IsSet(utils.RopstenFlag.Name) &&
|
||||
!ctx.IsSet(utils.SepoliaFlag.Name) &&
|
||||
if !ctx.IsSet(utils.SepoliaFlag.Name) &&
|
||||
!ctx.IsSet(utils.RinkebyFlag.Name) &&
|
||||
!ctx.IsSet(utils.GoerliFlag.Name) &&
|
||||
!ctx.IsSet(utils.DeveloperFlag.Name) {
|
||||
|
@ -127,7 +127,7 @@ var (
|
||||
}
|
||||
NetworkIdFlag = &cli.Uint64Flag{
|
||||
Name: "networkid",
|
||||
Usage: "Explicitly set network id (integer)(For testnets: use --ropsten, --rinkeby, --goerli instead)",
|
||||
Usage: "Explicitly set network id (integer)(For testnets: use --rinkeby, --goerli, --sepolia instead)",
|
||||
Value: ethconfig.Defaults.NetworkId,
|
||||
Category: flags.EthCategory,
|
||||
}
|
||||
@ -136,11 +136,6 @@ var (
|
||||
Usage: "Ethereum mainnet",
|
||||
Category: flags.EthCategory,
|
||||
}
|
||||
RopstenFlag = &cli.BoolFlag{
|
||||
Name: "ropsten",
|
||||
Usage: "Ropsten network: pre-configured proof-of-stake test network",
|
||||
Category: flags.EthCategory,
|
||||
}
|
||||
RinkebyFlag = &cli.BoolFlag{
|
||||
Name: "rinkeby",
|
||||
Usage: "Rinkeby network: pre-configured proof-of-authority test network",
|
||||
@ -998,7 +993,6 @@ Please note that --` + MetricsHTTPFlag.Name + ` must be set to start the server.
|
||||
var (
|
||||
// TestnetFlags is the flag group of all built-in supported testnets.
|
||||
TestnetFlags = []cli.Flag{
|
||||
RopstenFlag,
|
||||
RinkebyFlag,
|
||||
GoerliFlag,
|
||||
SepoliaFlag,
|
||||
@ -1020,11 +1014,6 @@ var (
|
||||
// then a subdirectory of the specified datadir will be used.
|
||||
func MakeDataDir(ctx *cli.Context) string {
|
||||
if path := ctx.String(DataDirFlag.Name); path != "" {
|
||||
if ctx.Bool(RopstenFlag.Name) {
|
||||
// Maintain compatibility with older Geth configurations storing the
|
||||
// Ropsten database in `testnet` instead of `ropsten`.
|
||||
return filepath.Join(path, "ropsten")
|
||||
}
|
||||
if ctx.Bool(RinkebyFlag.Name) {
|
||||
return filepath.Join(path, "rinkeby")
|
||||
}
|
||||
@ -1080,8 +1069,6 @@ func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) {
|
||||
switch {
|
||||
case ctx.IsSet(BootnodesFlag.Name):
|
||||
urls = SplitAndTrim(ctx.String(BootnodesFlag.Name))
|
||||
case ctx.Bool(RopstenFlag.Name):
|
||||
urls = params.RopstenBootnodes
|
||||
case ctx.Bool(SepoliaFlag.Name):
|
||||
urls = params.SepoliaBootnodes
|
||||
case ctx.Bool(RinkebyFlag.Name):
|
||||
@ -1525,18 +1512,6 @@ func SetDataDir(ctx *cli.Context, cfg *node.Config) {
|
||||
cfg.DataDir = ctx.String(DataDirFlag.Name)
|
||||
case ctx.Bool(DeveloperFlag.Name):
|
||||
cfg.DataDir = "" // unless explicitly requested, use memory databases
|
||||
case ctx.Bool(RopstenFlag.Name) && cfg.DataDir == node.DefaultDataDir():
|
||||
// Maintain compatibility with older Geth configurations storing the
|
||||
// Ropsten database in `testnet` instead of `ropsten`.
|
||||
legacyPath := filepath.Join(node.DefaultDataDir(), "testnet")
|
||||
if common.FileExist(legacyPath) {
|
||||
log.Warn("Using the deprecated `testnet` datadir. Future versions will store the Ropsten chain in `ropsten`.")
|
||||
cfg.DataDir = legacyPath
|
||||
} else {
|
||||
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "ropsten")
|
||||
}
|
||||
|
||||
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "ropsten")
|
||||
case ctx.Bool(RinkebyFlag.Name) && cfg.DataDir == node.DefaultDataDir():
|
||||
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "rinkeby")
|
||||
case ctx.Bool(GoerliFlag.Name) && cfg.DataDir == node.DefaultDataDir():
|
||||
@ -1733,7 +1708,7 @@ func CheckExclusive(ctx *cli.Context, args ...interface{}) {
|
||||
// SetEthConfig applies eth-related command line flags to the config.
|
||||
func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
|
||||
// Avoid conflicting network flags
|
||||
CheckExclusive(ctx, MainnetFlag, DeveloperFlag, RopstenFlag, RinkebyFlag, GoerliFlag, SepoliaFlag)
|
||||
CheckExclusive(ctx, MainnetFlag, DeveloperFlag, RinkebyFlag, GoerliFlag, SepoliaFlag)
|
||||
CheckExclusive(ctx, LightServeFlag, SyncModeFlag, "light")
|
||||
CheckExclusive(ctx, DeveloperFlag, ExternalSignerFlag) // Can't use both ephemeral unlocked and external signer
|
||||
if ctx.String(GCModeFlag.Name) == "archive" && ctx.Uint64(TxLookupLimitFlag.Name) != 0 {
|
||||
@ -1871,12 +1846,6 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
|
||||
}
|
||||
cfg.Genesis = core.DefaultGenesisBlock()
|
||||
SetDNSDiscoveryDefaults(cfg, params.MainnetGenesisHash)
|
||||
case ctx.Bool(RopstenFlag.Name):
|
||||
if !ctx.IsSet(NetworkIdFlag.Name) {
|
||||
cfg.NetworkId = 3
|
||||
}
|
||||
cfg.Genesis = core.DefaultRopstenGenesisBlock()
|
||||
SetDNSDiscoveryDefaults(cfg, params.RopstenGenesisHash)
|
||||
case ctx.Bool(SepoliaFlag.Name):
|
||||
if !ctx.IsSet(NetworkIdFlag.Name) {
|
||||
cfg.NetworkId = 11155111
|
||||
@ -2219,8 +2188,6 @@ func MakeGenesis(ctx *cli.Context) *core.Genesis {
|
||||
switch {
|
||||
case ctx.Bool(MainnetFlag.Name):
|
||||
genesis = core.DefaultGenesisBlock()
|
||||
case ctx.Bool(RopstenFlag.Name):
|
||||
genesis = core.DefaultRopstenGenesisBlock()
|
||||
case ctx.Bool(SepoliaFlag.Name):
|
||||
genesis = core.DefaultSepoliaGenesisBlock()
|
||||
case ctx.Bool(RinkebyFlag.Name):
|
||||
|
@ -4049,7 +4049,14 @@ func TestCreateThenDeletePreByzantium(t *testing.T) {
|
||||
// We use Ropsten chain config instead of Testchain config, this is
|
||||
// deliberate: we want to use pre-byz rules where we have intermediate state roots
|
||||
// between transactions.
|
||||
testCreateThenDelete(t, params.RopstenChainConfig)
|
||||
testCreateThenDelete(t, ¶ms.ChainConfig{
|
||||
ChainID: big.NewInt(3),
|
||||
HomesteadBlock: big.NewInt(0),
|
||||
EIP150Block: big.NewInt(0),
|
||||
EIP155Block: big.NewInt(10),
|
||||
EIP158Block: big.NewInt(10),
|
||||
ByzantiumBlock: big.NewInt(1_700_000),
|
||||
})
|
||||
}
|
||||
func TestCreateThenDeletePostByzantium(t *testing.T) {
|
||||
testCreateThenDelete(t, params.TestChainConfig)
|
||||
|
@ -78,31 +78,6 @@ func TestCreation(t *testing.T) {
|
||||
{20000000, 0, ID{Hash: checksumToBytes(0xf0afd0e3), Next: 0}}, // Future Gray Glacier block
|
||||
},
|
||||
},
|
||||
// Ropsten test cases
|
||||
{
|
||||
params.RopstenChainConfig,
|
||||
params.RopstenGenesisHash,
|
||||
[]testcase{
|
||||
{0, 0, ID{Hash: checksumToBytes(0x30c7ddbc), Next: 10}}, // Unsynced, last Frontier, Homestead and first Tangerine block
|
||||
{9, 0, ID{Hash: checksumToBytes(0x30c7ddbc), Next: 10}}, // Last Tangerine block
|
||||
{10, 0, ID{Hash: checksumToBytes(0x63760190), Next: 1700000}}, // First Spurious block
|
||||
{1699999, 0, ID{Hash: checksumToBytes(0x63760190), Next: 1700000}}, // Last Spurious block
|
||||
{1700000, 0, ID{Hash: checksumToBytes(0x3ea159c7), Next: 4230000}}, // First Byzantium block
|
||||
{4229999, 0, ID{Hash: checksumToBytes(0x3ea159c7), Next: 4230000}}, // Last Byzantium block
|
||||
{4230000, 0, ID{Hash: checksumToBytes(0x97b544f3), Next: 4939394}}, // First Constantinople block
|
||||
{4939393, 0, ID{Hash: checksumToBytes(0x97b544f3), Next: 4939394}}, // Last Constantinople block
|
||||
{4939394, 0, ID{Hash: checksumToBytes(0xd6e2149b), Next: 6485846}}, // First Petersburg block
|
||||
{6485845, 0, ID{Hash: checksumToBytes(0xd6e2149b), Next: 6485846}}, // Last Petersburg block
|
||||
{6485846, 0, ID{Hash: checksumToBytes(0x4bc66396), Next: 7117117}}, // First Istanbul block
|
||||
{7117116, 0, ID{Hash: checksumToBytes(0x4bc66396), Next: 7117117}}, // Last Istanbul block
|
||||
{7117117, 0, ID{Hash: checksumToBytes(0x6727ef90), Next: 9812189}}, // First Muir Glacier block
|
||||
{9812188, 0, ID{Hash: checksumToBytes(0x6727ef90), Next: 9812189}}, // Last Muir Glacier block
|
||||
{9812189, 0, ID{Hash: checksumToBytes(0xa157d377), Next: 10499401}}, // First Berlin block
|
||||
{10499400, 0, ID{Hash: checksumToBytes(0xa157d377), Next: 10499401}}, // Last Berlin block
|
||||
{10499401, 0, ID{Hash: checksumToBytes(0x7119b6b3), Next: 0}}, // First London block
|
||||
{11000000, 0, ID{Hash: checksumToBytes(0x7119b6b3), Next: 0}}, // Future London block
|
||||
},
|
||||
},
|
||||
// Rinkeby test cases
|
||||
{
|
||||
params.RinkebyChainConfig,
|
||||
|
@ -189,8 +189,6 @@ func CommitGenesisState(db ethdb.Database, triedb *trie.Database, hash common.Ha
|
||||
switch hash {
|
||||
case params.MainnetGenesisHash:
|
||||
genesis = DefaultGenesisBlock()
|
||||
case params.RopstenGenesisHash:
|
||||
genesis = DefaultRopstenGenesisBlock()
|
||||
case params.RinkebyGenesisHash:
|
||||
genesis = DefaultRinkebyGenesisBlock()
|
||||
case params.GoerliGenesisHash:
|
||||
@ -423,8 +421,6 @@ func (g *Genesis) configOrDefault(ghash common.Hash) *params.ChainConfig {
|
||||
return g.Config
|
||||
case ghash == params.MainnetGenesisHash:
|
||||
return params.MainnetChainConfig
|
||||
case ghash == params.RopstenGenesisHash:
|
||||
return params.RopstenChainConfig
|
||||
case ghash == params.SepoliaGenesisHash:
|
||||
return params.SepoliaChainConfig
|
||||
case ghash == params.RinkebyGenesisHash:
|
||||
@ -533,18 +529,6 @@ func DefaultGenesisBlock() *Genesis {
|
||||
}
|
||||
}
|
||||
|
||||
// DefaultRopstenGenesisBlock returns the Ropsten network genesis block.
|
||||
func DefaultRopstenGenesisBlock() *Genesis {
|
||||
return &Genesis{
|
||||
Config: params.RopstenChainConfig,
|
||||
Nonce: 66,
|
||||
ExtraData: hexutil.MustDecode("0x3535353535353535353535353535353535353535353535353535353535353535"),
|
||||
GasLimit: 16777216,
|
||||
Difficulty: big.NewInt(1048576),
|
||||
Alloc: decodePrealloc(ropstenAllocData),
|
||||
}
|
||||
}
|
||||
|
||||
// DefaultRinkebyGenesisBlock returns the Rinkeby network genesis block.
|
||||
func DefaultRinkebyGenesisBlock() *Genesis {
|
||||
return &Genesis{
|
||||
|
File diff suppressed because one or more lines are too long
@ -95,14 +95,14 @@ func TestSetupGenesis(t *testing.T) {
|
||||
wantConfig: customg.Config,
|
||||
},
|
||||
{
|
||||
name: "custom block in DB, genesis == ropsten",
|
||||
name: "custom block in DB, genesis == goerli",
|
||||
fn: func(db ethdb.Database) (*params.ChainConfig, common.Hash, error) {
|
||||
customg.MustCommit(db)
|
||||
return SetupGenesisBlock(db, trie.NewDatabase(db), DefaultRopstenGenesisBlock())
|
||||
return SetupGenesisBlock(db, trie.NewDatabase(db), DefaultGoerliGenesisBlock())
|
||||
},
|
||||
wantErr: &GenesisMismatchError{Stored: customghash, New: params.RopstenGenesisHash},
|
||||
wantHash: params.RopstenGenesisHash,
|
||||
wantConfig: params.RopstenChainConfig,
|
||||
wantErr: &GenesisMismatchError{Stored: customghash, New: params.GoerliGenesisHash},
|
||||
wantHash: params.GoerliGenesisHash,
|
||||
wantConfig: params.GoerliChainConfig,
|
||||
},
|
||||
{
|
||||
name: "compatible config in DB",
|
||||
@ -172,7 +172,6 @@ func TestGenesisHashes(t *testing.T) {
|
||||
}{
|
||||
{DefaultGenesisBlock(), params.MainnetGenesisHash},
|
||||
{DefaultGoerliGenesisBlock(), params.GoerliGenesisHash},
|
||||
{DefaultRopstenGenesisBlock(), params.RopstenGenesisHash},
|
||||
{DefaultRinkebyGenesisBlock(), params.RinkebyGenesisHash},
|
||||
{DefaultSepoliaGenesisBlock(), params.SepoliaGenesisHash},
|
||||
} {
|
||||
|
@ -127,7 +127,7 @@ func MakeProtocols(backend Backend, network uint64, dnsdisc enode.Iterator) []p2
|
||||
// NodeInfo represents a short summary of the `eth` sub-protocol metadata
|
||||
// known about the host peer.
|
||||
type NodeInfo struct {
|
||||
Network uint64 `json:"network"` // Ethereum network ID (1=Mainnet, Ropsten=3, Rinkeby=4, Goerli=5)
|
||||
Network uint64 `json:"network"` // Ethereum network ID (1=Mainnet, Rinkeby=4, Goerli=5)
|
||||
Difficulty *big.Int `json:"difficulty"` // Total difficulty of the host's blockchain
|
||||
Genesis common.Hash `json:"genesis"` // SHA3 hash of the host's genesis block
|
||||
Config *params.ChainConfig `json:"config"` // Chain configuration for the fork rules
|
||||
|
@ -63,7 +63,7 @@ type lesCommons struct {
|
||||
// NodeInfo represents a short summary of the Ethereum sub-protocol metadata
|
||||
// known about the host peer.
|
||||
type NodeInfo struct {
|
||||
Network uint64 `json:"network"` // Ethereum network ID (1=Mainnet, Ropsten=3, Rinkeby=4, Goerli=5)
|
||||
Network uint64 `json:"network"` // Ethereum network ID (1=Mainnet, Rinkeby=4, Goerli=5)
|
||||
Difficulty *big.Int `json:"difficulty"` // Total difficulty of the host's blockchain
|
||||
Genesis common.Hash `json:"genesis"` // SHA3 hash of the host's genesis block
|
||||
Config *params.ChainConfig `json:"config"` // Chain configuration for the fork rules
|
||||
|
@ -59,7 +59,7 @@ func main() {
|
||||
// Pre-generate the ethash mining DAG so we don't race
|
||||
ethash.MakeDataset(1, ethconfig.Defaults.Ethash.DatasetDir)
|
||||
|
||||
// Create an Ethash network based off of the Ropsten config
|
||||
// Create an Ethash network
|
||||
genesis := makeGenesis(faucets)
|
||||
|
||||
// Handle interrupts.
|
||||
@ -194,7 +194,7 @@ func makeTransaction(nonce uint64, privKey *ecdsa.PrivateKey, signer types.Signe
|
||||
// makeGenesis creates a custom Ethash genesis block based on some pre-defined
|
||||
// faucet accounts.
|
||||
func makeGenesis(faucets []*ecdsa.PrivateKey) *core.Genesis {
|
||||
genesis := core.DefaultRopstenGenesisBlock()
|
||||
genesis := core.DefaultGenesisBlock()
|
||||
|
||||
genesis.Config = params.AllEthashProtocolChanges
|
||||
genesis.Config.LondonBlock = londonBlock
|
||||
|
@ -392,7 +392,7 @@ func main() {
|
||||
// Pre-generate the ethash mining DAG so we don't race
|
||||
ethash.MakeDataset(1, filepath.Join(os.Getenv("HOME"), ".ethash"))
|
||||
|
||||
// Create an Ethash network based off of the Ropsten config
|
||||
// Create an Ethash network
|
||||
genesis := makeGenesis(faucets)
|
||||
manager := newNodeManager(genesis)
|
||||
defer manager.shutdown()
|
||||
@ -440,7 +440,7 @@ func main() {
|
||||
// makeGenesis creates a custom Ethash genesis block based on some pre-defined
|
||||
// faucet accounts.
|
||||
func makeGenesis(faucets []*ecdsa.PrivateKey) *core.Genesis {
|
||||
genesis := core.DefaultRopstenGenesisBlock()
|
||||
genesis := core.DefaultGenesisBlock()
|
||||
genesis.Difficulty = params.MinimumDifficulty
|
||||
genesis.GasLimit = 25000000
|
||||
|
||||
|
@ -55,7 +55,7 @@ func main() {
|
||||
// Pre-generate the ethash mining DAG so we don't race
|
||||
ethash.MakeDataset(1, ethconfig.Defaults.Ethash.DatasetDir)
|
||||
|
||||
// Create an Ethash network based off of the Ropsten config
|
||||
// Create an Ethash network
|
||||
genesis := makeGenesis(faucets)
|
||||
|
||||
// Handle interrupts.
|
||||
@ -134,7 +134,7 @@ func main() {
|
||||
// makeGenesis creates a custom Ethash genesis block based on some pre-defined
|
||||
// faucet accounts.
|
||||
func makeGenesis(faucets []*ecdsa.PrivateKey) *core.Genesis {
|
||||
genesis := core.DefaultRopstenGenesisBlock()
|
||||
genesis := core.DefaultGenesisBlock()
|
||||
genesis.Difficulty = params.MinimumDifficulty
|
||||
genesis.GasLimit = 25000000
|
||||
|
||||
|
@ -32,13 +32,6 @@ var MainnetBootnodes = []string{
|
||||
"enode://4aeb4ab6c14b23e2c4cfdce879c04b0748a20d8e9b59e25ded2a08143e265c6c25936e74cbc8e641e3312ca288673d91f2f93f8e277de3cfa444ecdaaf982052@157.90.35.166:30303", // bootnode-hetzner-fsn
|
||||
}
|
||||
|
||||
// RopstenBootnodes are the enode URLs of the P2P bootstrap nodes running on the
|
||||
// Ropsten test network.
|
||||
var RopstenBootnodes = []string{
|
||||
"enode://6332792c4a00e3e4ee0926ed89e0d27ef985424d97b6a45bf0f23e51f0dcb5e66b875777506458aea7af6f9e4ffb69f43f3778ee73c81ed9d34c51c4b16b0b0f@52.232.243.152:30303", // Parity
|
||||
"enode://94c15d1b9e2fe7ce56e458b9a3b672ef11894ddedd0c6f247e0f1d3487f52b66208fb4aeb8179fce6e3a749ea93ed147c37976d67af557508d199d9594c35f09@192.81.208.223:30303", // @gpip
|
||||
}
|
||||
|
||||
// SepoliaBootnodes are the enode URLs of the P2P bootstrap nodes running on the
|
||||
// Sepolia test network.
|
||||
var SepoliaBootnodes = []string{
|
||||
@ -100,8 +93,6 @@ func KnownDNSNetwork(genesis common.Hash, protocol string) string {
|
||||
switch genesis {
|
||||
case MainnetGenesisHash:
|
||||
net = "mainnet"
|
||||
case RopstenGenesisHash:
|
||||
net = "ropsten"
|
||||
case RinkebyGenesisHash:
|
||||
net = "rinkeby"
|
||||
case GoerliGenesisHash:
|
||||
|
@ -28,7 +28,6 @@ import (
|
||||
// Genesis hashes to enforce below configs on.
|
||||
var (
|
||||
MainnetGenesisHash = common.HexToHash("0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3")
|
||||
RopstenGenesisHash = common.HexToHash("0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d")
|
||||
SepoliaGenesisHash = common.HexToHash("0x25a5cc106eea7138acab33231d7160d69cb777ee0c2c553fcddf5138993e6dd9")
|
||||
RinkebyGenesisHash = common.HexToHash("0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177")
|
||||
GoerliGenesisHash = common.HexToHash("0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a")
|
||||
@ -38,7 +37,6 @@ var (
|
||||
// the chain it belongs to.
|
||||
var TrustedCheckpoints = map[common.Hash]*TrustedCheckpoint{
|
||||
MainnetGenesisHash: MainnetTrustedCheckpoint,
|
||||
RopstenGenesisHash: RopstenTrustedCheckpoint,
|
||||
SepoliaGenesisHash: SepoliaTrustedCheckpoint,
|
||||
RinkebyGenesisHash: RinkebyTrustedCheckpoint,
|
||||
GoerliGenesisHash: GoerliTrustedCheckpoint,
|
||||
@ -48,7 +46,6 @@ var TrustedCheckpoints = map[common.Hash]*TrustedCheckpoint{
|
||||
// the chain it belongs to.
|
||||
var CheckpointOracles = map[common.Hash]*CheckpointOracleConfig{
|
||||
MainnetGenesisHash: MainnetCheckpointOracle,
|
||||
RopstenGenesisHash: RopstenCheckpointOracle,
|
||||
RinkebyGenesisHash: RinkebyCheckpointOracle,
|
||||
GoerliGenesisHash: GoerliCheckpointOracle,
|
||||
}
|
||||
@ -101,49 +98,6 @@ var (
|
||||
Threshold: 2,
|
||||
}
|
||||
|
||||
// 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,
|
||||
DAOForkSupport: true,
|
||||
EIP150Block: big.NewInt(0),
|
||||
EIP150Hash: common.HexToHash("0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d"),
|
||||
EIP155Block: big.NewInt(10),
|
||||
EIP158Block: big.NewInt(10),
|
||||
ByzantiumBlock: big.NewInt(1_700_000),
|
||||
ConstantinopleBlock: big.NewInt(4_230_000),
|
||||
PetersburgBlock: big.NewInt(4_939_394),
|
||||
IstanbulBlock: big.NewInt(6_485_846),
|
||||
MuirGlacierBlock: big.NewInt(7_117_117),
|
||||
BerlinBlock: big.NewInt(9_812_189),
|
||||
LondonBlock: big.NewInt(10_499_401),
|
||||
TerminalTotalDifficulty: new(big.Int).SetUint64(50_000_000_000_000_000),
|
||||
TerminalTotalDifficultyPassed: true,
|
||||
Ethash: new(EthashConfig),
|
||||
}
|
||||
|
||||
// RopstenTrustedCheckpoint contains the light client trusted checkpoint for the Ropsten test network.
|
||||
RopstenTrustedCheckpoint = &TrustedCheckpoint{
|
||||
SectionIndex: 393,
|
||||
SectionHead: common.HexToHash("0x04479087c89428c6ed0d4ff25642776f0c35747d8ecef90547fa3ce4ebec8606"),
|
||||
CHTRoot: common.HexToHash("0xaa100968cebe48dba3a8f196f044db04113d5a938ff083838ce6f2c588d416ad"),
|
||||
BloomRoot: common.HexToHash("0xb9108d510c4b50b60793feead27620781bc1c2164e072d8022201c4eb7c36ba0"),
|
||||
}
|
||||
|
||||
// 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
|
||||
common.HexToAddress("0x78d1aD571A1A09D60D9BBf25894b44e4C8859595"), // Martin
|
||||
common.HexToAddress("0x286834935f4A8Cfb4FF4C77D5770C2775aE2b0E7"), // Zsolt
|
||||
common.HexToAddress("0xb86e2B0Ab5A4B1373e40c51A7C712c70Ba2f9f8E"), // Gary
|
||||
common.HexToAddress("0x0DF8fa387C602AE62559cC4aFa4972A7045d6707"), // Guillaume
|
||||
},
|
||||
Threshold: 2,
|
||||
}
|
||||
|
||||
// SepoliaChainConfig contains the chain parameters to run a node on the Sepolia test network.
|
||||
SepoliaChainConfig = &ChainConfig{
|
||||
ChainID: big.NewInt(11155111),
|
||||
@ -389,7 +343,6 @@ var (
|
||||
// NetworkNames are user friendly names to use in the chain spec banner.
|
||||
var NetworkNames = map[string]string{
|
||||
MainnetChainConfig.ChainID.String(): "mainnet",
|
||||
RopstenChainConfig.ChainID.String(): "ropsten",
|
||||
RinkebyChainConfig.ChainID.String(): "rinkeby",
|
||||
GoerliChainConfig.ChainID.String(): "goerli",
|
||||
SepoliaChainConfig.ChainID.String(): "sepolia",
|
||||
|
@ -36,6 +36,26 @@ var (
|
||||
EIP158Block: big.NewInt(2675000),
|
||||
ByzantiumBlock: big.NewInt(4370000),
|
||||
}
|
||||
|
||||
ropstenChainConfig = params.ChainConfig{
|
||||
ChainID: big.NewInt(3),
|
||||
HomesteadBlock: big.NewInt(0),
|
||||
DAOForkBlock: nil,
|
||||
DAOForkSupport: true,
|
||||
EIP150Block: big.NewInt(0),
|
||||
EIP150Hash: common.HexToHash("0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d"),
|
||||
EIP155Block: big.NewInt(10),
|
||||
EIP158Block: big.NewInt(10),
|
||||
ByzantiumBlock: big.NewInt(1_700_000),
|
||||
ConstantinopleBlock: big.NewInt(4_230_000),
|
||||
PetersburgBlock: big.NewInt(4_939_394),
|
||||
IstanbulBlock: big.NewInt(6_485_846),
|
||||
MuirGlacierBlock: big.NewInt(7_117_117),
|
||||
BerlinBlock: big.NewInt(9_812_189),
|
||||
LondonBlock: big.NewInt(10_499_401),
|
||||
TerminalTotalDifficulty: new(big.Int).SetUint64(50_000_000_000_000_000),
|
||||
TerminalTotalDifficultyPassed: true,
|
||||
}
|
||||
)
|
||||
|
||||
func TestDifficulty(t *testing.T) {
|
||||
@ -53,7 +73,7 @@ func TestDifficulty(t *testing.T) {
|
||||
// files are 2 years old, contains strange values
|
||||
dt.skipLoad("difficultyCustomHomestead\\.json")
|
||||
|
||||
dt.config("Ropsten", *params.RopstenChainConfig)
|
||||
dt.config("Ropsten", ropstenChainConfig)
|
||||
dt.config("Frontier", params.ChainConfig{})
|
||||
|
||||
dt.config("Homestead", params.ChainConfig{
|
||||
@ -64,7 +84,7 @@ func TestDifficulty(t *testing.T) {
|
||||
ByzantiumBlock: big.NewInt(0),
|
||||
})
|
||||
|
||||
dt.config("Frontier", *params.RopstenChainConfig)
|
||||
dt.config("Frontier", ropstenChainConfig)
|
||||
dt.config("MainNetwork", mainnetChainConfig)
|
||||
dt.config("CustomMainNetwork", mainnetChainConfig)
|
||||
dt.config("Constantinople", params.ChainConfig{
|
||||
|
Loading…
Reference in New Issue
Block a user