@ -134,7 +134,7 @@ var (
}
}
NetworkIdFlag = & cli . Uint64Flag {
NetworkIdFlag = & cli . Uint64Flag {
Name : "networkid" ,
Name : "networkid" ,
Usage : "Explicitly set network id (integer)(For testnets: use --goerli, -- sepolia, --holesky instead)" ,
Usage : "Explicitly set network id (integer)(For testnets: use --sepolia, --holesky instead)" ,
Value : ethconfig . Defaults . NetworkId ,
Value : ethconfig . Defaults . NetworkId ,
Category : flags . EthCategory ,
Category : flags . EthCategory ,
}
}
@ -143,11 +143,6 @@ var (
Usage : "Ethereum mainnet" ,
Usage : "Ethereum mainnet" ,
Category : flags . EthCategory ,
Category : flags . EthCategory ,
}
}
GoerliFlag = & cli . BoolFlag {
Name : "goerli" ,
Usage : "Görli network: pre-configured proof-of-authority test network" ,
Category : flags . EthCategory ,
}
SepoliaFlag = & cli . BoolFlag {
SepoliaFlag = & cli . BoolFlag {
Name : "sepolia" ,
Name : "sepolia" ,
Usage : "Sepolia network: pre-configured proof-of-work test network" ,
Usage : "Sepolia network: pre-configured proof-of-work test network" ,
@ -965,7 +960,6 @@ Please note that --` + MetricsHTTPFlag.Name + ` must be set to start the server.
var (
var (
// TestnetFlags is the flag group of all built-in supported testnets.
// TestnetFlags is the flag group of all built-in supported testnets.
TestnetFlags = [ ] cli . Flag {
TestnetFlags = [ ] cli . Flag {
GoerliFlag ,
SepoliaFlag ,
SepoliaFlag ,
HoleskyFlag ,
HoleskyFlag ,
}
}
@ -988,9 +982,6 @@ var (
// then a subdirectory of the specified datadir will be used.
// then a subdirectory of the specified datadir will be used.
func MakeDataDir ( ctx * cli . Context ) string {
func MakeDataDir ( ctx * cli . Context ) string {
if path := ctx . String ( DataDirFlag . Name ) ; path != "" {
if path := ctx . String ( DataDirFlag . Name ) ; path != "" {
if ctx . Bool ( GoerliFlag . Name ) {
return filepath . Join ( path , "goerli" )
}
if ctx . Bool ( SepoliaFlag . Name ) {
if ctx . Bool ( SepoliaFlag . Name ) {
return filepath . Join ( path , "sepolia" )
return filepath . Join ( path , "sepolia" )
}
}
@ -1042,7 +1033,7 @@ func setNodeUserIdent(ctx *cli.Context, cfg *node.Config) {
//
//
// 1. --bootnodes flag
// 1. --bootnodes flag
// 2. Config file
// 2. Config file
// 3. Network preset flags (e.g. --goerli )
// 3. Network preset flags (e.g. --holesky )
// 4. default to mainnet nodes
// 4. default to mainnet nodes
func setBootstrapNodes ( ctx * cli . Context , cfg * p2p . Config ) {
func setBootstrapNodes ( ctx * cli . Context , cfg * p2p . Config ) {
urls := params . MainnetBootnodes
urls := params . MainnetBootnodes
@ -1057,8 +1048,6 @@ func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) {
urls = params . HoleskyBootnodes
urls = params . HoleskyBootnodes
case ctx . Bool ( SepoliaFlag . Name ) :
case ctx . Bool ( SepoliaFlag . Name ) :
urls = params . SepoliaBootnodes
urls = params . SepoliaBootnodes
case ctx . Bool ( GoerliFlag . Name ) :
urls = params . GoerliBootnodes
}
}
}
}
cfg . BootstrapNodes = mustParseBootnodes ( urls )
cfg . BootstrapNodes = mustParseBootnodes ( urls )
@ -1484,8 +1473,6 @@ func SetDataDir(ctx *cli.Context, cfg *node.Config) {
cfg . DataDir = ctx . String ( DataDirFlag . Name )
cfg . DataDir = ctx . String ( DataDirFlag . Name )
case ctx . Bool ( DeveloperFlag . Name ) :
case ctx . Bool ( DeveloperFlag . Name ) :
cfg . DataDir = "" // unless explicitly requested, use memory databases
cfg . DataDir = "" // unless explicitly requested, use memory databases
case ctx . Bool ( GoerliFlag . Name ) && cfg . DataDir == node . DefaultDataDir ( ) :
cfg . DataDir = filepath . Join ( node . DefaultDataDir ( ) , "goerli" )
case ctx . Bool ( SepoliaFlag . Name ) && cfg . DataDir == node . DefaultDataDir ( ) :
case ctx . Bool ( SepoliaFlag . Name ) && cfg . DataDir == node . DefaultDataDir ( ) :
cfg . DataDir = filepath . Join ( node . DefaultDataDir ( ) , "sepolia" )
cfg . DataDir = filepath . Join ( node . DefaultDataDir ( ) , "sepolia" )
case ctx . Bool ( HoleskyFlag . Name ) && cfg . DataDir == node . DefaultDataDir ( ) :
case ctx . Bool ( HoleskyFlag . Name ) && cfg . DataDir == node . DefaultDataDir ( ) :
@ -1657,7 +1644,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 , GoerliFlag , SepoliaFlag , HoleskyFlag )
CheckExclusive ( ctx , MainnetFlag , DeveloperFlag , SepoliaFlag , HoleskyFlag )
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
// Set configurations from CLI flags
// Set configurations from CLI flags
@ -1827,12 +1814,6 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
}
}
cfg . Genesis = core . DefaultSepoliaGenesisBlock ( )
cfg . Genesis = core . DefaultSepoliaGenesisBlock ( )
SetDNSDiscoveryDefaults ( cfg , params . SepoliaGenesisHash )
SetDNSDiscoveryDefaults ( cfg , params . SepoliaGenesisHash )
case ctx . Bool ( GoerliFlag . Name ) :
if ! ctx . IsSet ( NetworkIdFlag . Name ) {
cfg . NetworkId = 5
}
cfg . Genesis = core . DefaultGoerliGenesisBlock ( )
SetDNSDiscoveryDefaults ( cfg , params . GoerliGenesisHash )
case ctx . Bool ( DeveloperFlag . Name ) :
case ctx . Bool ( DeveloperFlag . Name ) :
if ! ctx . IsSet ( NetworkIdFlag . Name ) {
if ! ctx . IsSet ( NetworkIdFlag . Name ) {
cfg . NetworkId = 1337
cfg . NetworkId = 1337
@ -2154,8 +2135,6 @@ func MakeGenesis(ctx *cli.Context) *core.Genesis {
genesis = core . DefaultHoleskyGenesisBlock ( )
genesis = core . DefaultHoleskyGenesisBlock ( )
case ctx . Bool ( SepoliaFlag . Name ) :
case ctx . Bool ( SepoliaFlag . Name ) :
genesis = core . DefaultSepoliaGenesisBlock ( )
genesis = core . DefaultSepoliaGenesisBlock ( )
case ctx . Bool ( GoerliFlag . Name ) :
genesis = core . DefaultGoerliGenesisBlock ( )
case ctx . Bool ( DeveloperFlag . Name ) :
case ctx . Bool ( DeveloperFlag . Name ) :
Fatalf ( "Developer chains are ephemeral" )
Fatalf ( "Developer chains are ephemeral" )
}
}