@ -127,7 +127,7 @@ var (
}
}
NetworkIdFlag = & cli . Uint64Flag {
NetworkIdFlag = & cli . Uint64Flag {
Name : "networkid" ,
Name : "networkid" ,
Usage : "Explicitly set network id (integer)(For testnets: use --ropsten, --r inkeby, --goerli instead)" ,
Usage : "Explicitly set network id (integer)(For testnets: use --rinkeby, --goerli, --sepolia instead)" ,
Value : ethconfig . Defaults . NetworkId ,
Value : ethconfig . Defaults . NetworkId ,
Category : flags . EthCategory ,
Category : flags . EthCategory ,
}
}
@ -136,11 +136,6 @@ var (
Usage : "Ethereum mainnet" ,
Usage : "Ethereum mainnet" ,
Category : flags . EthCategory ,
Category : flags . EthCategory ,
}
}
RopstenFlag = & cli . BoolFlag {
Name : "ropsten" ,
Usage : "Ropsten network: pre-configured proof-of-stake test network" ,
Category : flags . EthCategory ,
}
RinkebyFlag = & cli . BoolFlag {
RinkebyFlag = & cli . BoolFlag {
Name : "rinkeby" ,
Name : "rinkeby" ,
Usage : "Rinkeby network: pre-configured proof-of-authority test network" ,
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 (
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 {
RopstenFlag ,
RinkebyFlag ,
RinkebyFlag ,
GoerliFlag ,
GoerliFlag ,
SepoliaFlag ,
SepoliaFlag ,
@ -1020,11 +1014,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 ( 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 ) {
if ctx . Bool ( RinkebyFlag . Name ) {
return filepath . Join ( path , "rinkeby" )
return filepath . Join ( path , "rinkeby" )
}
}
@ -1080,8 +1069,6 @@ func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) {
switch {
switch {
case ctx . IsSet ( BootnodesFlag . Name ) :
case ctx . IsSet ( BootnodesFlag . Name ) :
urls = SplitAndTrim ( ctx . String ( BootnodesFlag . Name ) )
urls = SplitAndTrim ( ctx . String ( BootnodesFlag . Name ) )
case ctx . Bool ( RopstenFlag . Name ) :
urls = params . RopstenBootnodes
case ctx . Bool ( SepoliaFlag . Name ) :
case ctx . Bool ( SepoliaFlag . Name ) :
urls = params . SepoliaBootnodes
urls = params . SepoliaBootnodes
case ctx . Bool ( RinkebyFlag . Name ) :
case ctx . Bool ( RinkebyFlag . Name ) :
@ -1525,18 +1512,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 ( 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 ( ) :
case ctx . Bool ( RinkebyFlag . Name ) && cfg . DataDir == node . DefaultDataDir ( ) :
cfg . DataDir = filepath . Join ( node . DefaultDataDir ( ) , "rinkeby" )
cfg . DataDir = filepath . Join ( node . DefaultDataDir ( ) , "rinkeby" )
case ctx . Bool ( GoerliFlag . Name ) && cfg . DataDir == node . DefaultDataDir ( ) :
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.
// 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 , R inkebyFlag , GoerliFlag , SepoliaFlag )
CheckExclusive ( ctx , MainnetFlag , DeveloperFlag , RinkebyFlag , GoerliFlag , SepoliaFlag )
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 . String ( GCModeFlag . Name ) == "archive" && ctx . Uint64 ( TxLookupLimitFlag . Name ) != 0 {
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 ( )
cfg . Genesis = core . DefaultGenesisBlock ( )
SetDNSDiscoveryDefaults ( cfg , params . MainnetGenesisHash )
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 ) :
case ctx . Bool ( SepoliaFlag . Name ) :
if ! ctx . IsSet ( NetworkIdFlag . Name ) {
if ! ctx . IsSet ( NetworkIdFlag . Name ) {
cfg . NetworkId = 11155111
cfg . NetworkId = 11155111
@ -2219,8 +2188,6 @@ func MakeGenesis(ctx *cli.Context) *core.Genesis {
switch {
switch {
case ctx . Bool ( MainnetFlag . Name ) :
case ctx . Bool ( MainnetFlag . Name ) :
genesis = core . DefaultGenesisBlock ( )
genesis = core . DefaultGenesisBlock ( )
case ctx . Bool ( RopstenFlag . Name ) :
genesis = core . DefaultRopstenGenesisBlock ( )
case ctx . Bool ( SepoliaFlag . Name ) :
case ctx . Bool ( SepoliaFlag . Name ) :
genesis = core . DefaultSepoliaGenesisBlock ( )
genesis = core . DefaultSepoliaGenesisBlock ( )
case ctx . Bool ( RinkebyFlag . Name ) :
case ctx . Bool ( RinkebyFlag . Name ) :