|
|
@ -161,6 +161,10 @@ var ( |
|
|
|
Name: "sepolia", |
|
|
|
Name: "sepolia", |
|
|
|
Usage: "Sepolia network: pre-configured proof-of-work test network", |
|
|
|
Usage: "Sepolia network: pre-configured proof-of-work test network", |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
KilnFlag = cli.BoolFlag{ |
|
|
|
|
|
|
|
Name: "kiln", |
|
|
|
|
|
|
|
Usage: "Kiln network: pre-configured proof-of-work to proof-of-stake test network", |
|
|
|
|
|
|
|
} |
|
|
|
DeveloperFlag = cli.BoolFlag{ |
|
|
|
DeveloperFlag = cli.BoolFlag{ |
|
|
|
Name: "dev", |
|
|
|
Name: "dev", |
|
|
|
Usage: "Ephemeral proof-of-authority network with a pre-funded developer account, mining enabled", |
|
|
|
Usage: "Ephemeral proof-of-authority network with a pre-funded developer account, mining enabled", |
|
|
@ -839,6 +843,9 @@ func MakeDataDir(ctx *cli.Context) string { |
|
|
|
if ctx.GlobalBool(SepoliaFlag.Name) { |
|
|
|
if ctx.GlobalBool(SepoliaFlag.Name) { |
|
|
|
return filepath.Join(path, "sepolia") |
|
|
|
return filepath.Join(path, "sepolia") |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if ctx.GlobalBool(KilnFlag.Name) { |
|
|
|
|
|
|
|
return filepath.Join(path, "kiln") |
|
|
|
|
|
|
|
} |
|
|
|
return path |
|
|
|
return path |
|
|
|
} |
|
|
|
} |
|
|
|
Fatalf("Cannot determine default data directory, please set manually (--datadir)") |
|
|
|
Fatalf("Cannot determine default data directory, please set manually (--datadir)") |
|
|
@ -893,6 +900,8 @@ func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) { |
|
|
|
urls = params.RinkebyBootnodes |
|
|
|
urls = params.RinkebyBootnodes |
|
|
|
case ctx.GlobalBool(GoerliFlag.Name): |
|
|
|
case ctx.GlobalBool(GoerliFlag.Name): |
|
|
|
urls = params.GoerliBootnodes |
|
|
|
urls = params.GoerliBootnodes |
|
|
|
|
|
|
|
case ctx.GlobalBool(KilnFlag.Name): |
|
|
|
|
|
|
|
urls = params.KilnBootnodes |
|
|
|
case cfg.BootstrapNodes != nil: |
|
|
|
case cfg.BootstrapNodes != nil: |
|
|
|
return // already set, don't apply defaults.
|
|
|
|
return // already set, don't apply defaults.
|
|
|
|
} |
|
|
|
} |
|
|
@ -1343,6 +1352,8 @@ func setDataDir(ctx *cli.Context, cfg *node.Config) { |
|
|
|
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "goerli") |
|
|
|
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "goerli") |
|
|
|
case ctx.GlobalBool(SepoliaFlag.Name) && cfg.DataDir == node.DefaultDataDir(): |
|
|
|
case ctx.GlobalBool(SepoliaFlag.Name) && cfg.DataDir == node.DefaultDataDir(): |
|
|
|
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "sepolia") |
|
|
|
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "sepolia") |
|
|
|
|
|
|
|
case ctx.GlobalBool(KilnFlag.Name) && cfg.DataDir == node.DefaultDataDir(): |
|
|
|
|
|
|
|
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "kiln") |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1535,7 +1546,7 @@ func CheckExclusive(ctx *cli.Context, args ...interface{}) { |
|
|
|
// SetEthConfig applies eth-related command line flags to the config.
|
|
|
|
// SetEthConfig applies eth-related command line flags to the config.
|
|
|
|
func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) { |
|
|
|
func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) { |
|
|
|
// Avoid conflicting network flags
|
|
|
|
// Avoid conflicting network flags
|
|
|
|
CheckExclusive(ctx, MainnetFlag, DeveloperFlag, RopstenFlag, RinkebyFlag, GoerliFlag, SepoliaFlag) |
|
|
|
CheckExclusive(ctx, MainnetFlag, DeveloperFlag, RopstenFlag, RinkebyFlag, GoerliFlag, SepoliaFlag, KilnFlag) |
|
|
|
CheckExclusive(ctx, LightServeFlag, SyncModeFlag, "light") |
|
|
|
CheckExclusive(ctx, LightServeFlag, SyncModeFlag, "light") |
|
|
|
CheckExclusive(ctx, DeveloperFlag, ExternalSignerFlag) // Can't use both ephemeral unlocked and external signer
|
|
|
|
CheckExclusive(ctx, DeveloperFlag, ExternalSignerFlag) // Can't use both ephemeral unlocked and external signer
|
|
|
|
if ctx.GlobalString(GCModeFlag.Name) == "archive" && ctx.GlobalUint64(TxLookupLimitFlag.Name) != 0 { |
|
|
|
if ctx.GlobalString(GCModeFlag.Name) == "archive" && ctx.GlobalUint64(TxLookupLimitFlag.Name) != 0 { |
|
|
@ -1697,6 +1708,12 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) { |
|
|
|
} |
|
|
|
} |
|
|
|
cfg.Genesis = core.DefaultGoerliGenesisBlock() |
|
|
|
cfg.Genesis = core.DefaultGoerliGenesisBlock() |
|
|
|
SetDNSDiscoveryDefaults(cfg, params.GoerliGenesisHash) |
|
|
|
SetDNSDiscoveryDefaults(cfg, params.GoerliGenesisHash) |
|
|
|
|
|
|
|
case ctx.GlobalBool(KilnFlag.Name): |
|
|
|
|
|
|
|
if !ctx.GlobalIsSet(NetworkIdFlag.Name) { |
|
|
|
|
|
|
|
cfg.NetworkId = 1337802 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
cfg.Genesis = core.DefaultKilnGenesisBlock() |
|
|
|
|
|
|
|
SetDNSDiscoveryDefaults(cfg, params.KilnGenesisHash) |
|
|
|
case ctx.GlobalBool(DeveloperFlag.Name): |
|
|
|
case ctx.GlobalBool(DeveloperFlag.Name): |
|
|
|
if !ctx.GlobalIsSet(NetworkIdFlag.Name) { |
|
|
|
if !ctx.GlobalIsSet(NetworkIdFlag.Name) { |
|
|
|
cfg.NetworkId = 1337 |
|
|
|
cfg.NetworkId = 1337 |
|
|
@ -1935,6 +1952,8 @@ func MakeGenesis(ctx *cli.Context) *core.Genesis { |
|
|
|
genesis = core.DefaultRinkebyGenesisBlock() |
|
|
|
genesis = core.DefaultRinkebyGenesisBlock() |
|
|
|
case ctx.GlobalBool(GoerliFlag.Name): |
|
|
|
case ctx.GlobalBool(GoerliFlag.Name): |
|
|
|
genesis = core.DefaultGoerliGenesisBlock() |
|
|
|
genesis = core.DefaultGoerliGenesisBlock() |
|
|
|
|
|
|
|
case ctx.GlobalBool(KilnFlag.Name): |
|
|
|
|
|
|
|
genesis = core.DefaultKilnGenesisBlock() |
|
|
|
case ctx.GlobalBool(DeveloperFlag.Name): |
|
|
|
case ctx.GlobalBool(DeveloperFlag.Name): |
|
|
|
Fatalf("Developer chains are ephemeral") |
|
|
|
Fatalf("Developer chains are ephemeral") |
|
|
|
} |
|
|
|
} |
|
|
|