Skip to content

Commit

Permalink
cmd, core: remove calaveras testnet (ethereum#23366)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachinquarantine authored and jagdeep sidhu committed Aug 18, 2021
1 parent a647800 commit b10062a
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 80 deletions.
1 change: 0 additions & 1 deletion cmd/geth/chaincmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ It expects the genesis file as argument.`,
utils.RopstenFlag,
utils.RinkebyFlag,
utils.GoerliFlag,
utils.CalaverasFlag,
utils.SyscoinFlag,
utils.TanenbaumFlag,
},
Expand Down
2 changes: 0 additions & 2 deletions cmd/geth/consolecmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@ func remoteConsole(ctx *cli.Context) error {
path = filepath.Join(path, "rinkeby")
} else if ctx.GlobalBool(utils.GoerliFlag.Name) {
path = filepath.Join(path, "goerli")
} else if ctx.GlobalBool(utils.CalaverasFlag.Name) {
path = filepath.Join(path, "calaveras")
} else if ctx.GlobalBool(utils.SyscoinFlag.Name) {
path = filepath.Join(path, "syscoin")
} else if ctx.GlobalBool(utils.TanenbaumFlag.Name) {
Expand Down
8 changes: 0 additions & 8 deletions cmd/geth/dbcmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ Remove blockchain and state databases`,
utils.RopstenFlag,
utils.RinkebyFlag,
utils.GoerliFlag,
utils.CalaverasFlag,
utils.SyscoinFlag,
utils.TanenbaumFlag,
},
Expand All @@ -93,7 +92,6 @@ Remove blockchain and state databases`,
utils.RopstenFlag,
utils.RinkebyFlag,
utils.GoerliFlag,
utils.CalaverasFlag,
utils.SyscoinFlag,
utils.TanenbaumFlag,
},
Expand All @@ -109,7 +107,6 @@ Remove blockchain and state databases`,
utils.RopstenFlag,
utils.RinkebyFlag,
utils.GoerliFlag,
utils.CalaverasFlag,
utils.SyscoinFlag,
utils.TanenbaumFlag,
utils.CacheFlag,
Expand All @@ -131,7 +128,6 @@ corruption if it is aborted during execution'!`,
utils.RopstenFlag,
utils.RinkebyFlag,
utils.GoerliFlag,
utils.CalaverasFlag,
utils.SyscoinFlag,
utils.TanenbaumFlag,
},
Expand All @@ -149,7 +145,6 @@ corruption if it is aborted during execution'!`,
utils.RopstenFlag,
utils.RinkebyFlag,
utils.GoerliFlag,
utils.CalaverasFlag,
utils.SyscoinFlag,
utils.TanenbaumFlag,
},
Expand All @@ -168,7 +163,6 @@ WARNING: This is a low-level operation which may cause database corruption!`,
utils.RopstenFlag,
utils.RinkebyFlag,
utils.GoerliFlag,
utils.CalaverasFlag,
utils.SyscoinFlag,
utils.TanenbaumFlag,
},
Expand All @@ -187,7 +181,6 @@ WARNING: This is a low-level operation which may cause database corruption!`,
utils.RopstenFlag,
utils.RinkebyFlag,
utils.GoerliFlag,
utils.CalaverasFlag,
utils.SyscoinFlag,
utils.TanenbaumFlag,
},
Expand All @@ -205,7 +198,6 @@ WARNING: This is a low-level operation which may cause database corruption!`,
utils.RopstenFlag,
utils.RinkebyFlag,
utils.GoerliFlag,
utils.CalaverasFlag,
utils.SyscoinFlag,
utils.TanenbaumFlag,
},
Expand Down
4 changes: 0 additions & 4 deletions cmd/geth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ var (
utils.RopstenFlag,
utils.RinkebyFlag,
utils.GoerliFlag,
utils.CalaverasFlag,
utils.SyscoinFlag,
utils.TanenbaumFlag,
utils.VMEnableDebugFlag,
Expand Down Expand Up @@ -282,9 +281,6 @@ func prepare(ctx *cli.Context) {
case ctx.GlobalIsSet(utils.GoerliFlag.Name):
log.Info("Starting Geth on Görli testnet...")

case ctx.GlobalIsSet(utils.CalaverasFlag.Name):
log.Info("Starting Geth on Calaveras testnet...")

case ctx.GlobalIsSet(utils.SyscoinFlag.Name):
log.Info("Starting Geth on Syscoin...")

Expand Down
1 change: 0 additions & 1 deletion cmd/geth/usage.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ var AppHelpFlagGroups = []flags.FlagGroup{
utils.MainnetFlag,
utils.GoerliFlag,
utils.RinkebyFlag,
utils.CalaverasFlag,
utils.SyscoinFlag,
utils.TanenbaumFlag,
utils.RopstenFlag,
Expand Down
20 changes: 1 addition & 19 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,6 @@ var (
Name: "goerli",
Usage: "Görli network: pre-configured proof-of-authority test network",
}
CalaverasFlag = cli.BoolFlag{
Name: "calaveras",
Usage: "Calaveras network: pre-configured proof-of-authority shortlived test network.",
}
SyscoinFlag = cli.BoolFlag{
Name: "syscoin",
Usage: "Syscoin network: pre-configured NEVM-based syscoin network.",
Expand Down Expand Up @@ -814,9 +810,6 @@ func MakeDataDir(ctx *cli.Context) string {
if ctx.GlobalBool(GoerliFlag.Name) {
return filepath.Join(path, "goerli")
}
if ctx.GlobalBool(CalaverasFlag.Name) {
return filepath.Join(path, "calaveras")
}
if ctx.GlobalBool(SyscoinFlag.Name) {
return filepath.Join(path, "syscoin")
}
Expand Down Expand Up @@ -875,8 +868,6 @@ func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) {
urls = params.RinkebyBootnodes
case ctx.GlobalBool(GoerliFlag.Name):
urls = params.GoerliBootnodes
case ctx.GlobalBool(CalaverasFlag.Name):
urls = params.CalaverasBootnodes
case ctx.GlobalBool(SyscoinFlag.Name):
urls = params.SyscoinBootnodes
case ctx.GlobalBool(TanenbaumFlag.Name):
Expand Down Expand Up @@ -1324,8 +1315,6 @@ func setDataDir(ctx *cli.Context, cfg *node.Config) {
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "rinkeby")
case ctx.GlobalBool(GoerliFlag.Name) && cfg.DataDir == node.DefaultDataDir():
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "goerli")
case ctx.GlobalBool(CalaverasFlag.Name) && cfg.DataDir == node.DefaultDataDir():
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "calaveras")
case ctx.GlobalBool(SyscoinFlag.Name) && cfg.DataDir == node.DefaultDataDir():
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "syscoin")
case ctx.GlobalBool(TanenbaumFlag.Name) && cfg.DataDir == node.DefaultDataDir():
Expand Down Expand Up @@ -1515,7 +1504,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, CalaverasFlag, SyscoinFlag, TanenbaumFlag)
CheckExclusive(ctx, MainnetFlag, DeveloperFlag, RopstenFlag, RinkebyFlag, GoerliFlag, SyscoinFlag, TanenbaumFlag)
CheckExclusive(ctx, LightServeFlag, SyncModeFlag, "light")
CheckExclusive(ctx, DeveloperFlag, ExternalSignerFlag) // Can't use both ephemeral unlocked and external signer
if ctx.GlobalString(GCModeFlag.Name) == "archive" && ctx.GlobalUint64(TxLookupLimitFlag.Name) != 0 {
Expand Down Expand Up @@ -1685,11 +1674,6 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
}
cfg.Genesis = core.DefaultTanenbaumGenesisBlock()
SetDNSDiscoveryDefaults(cfg, params.TanenbaumGenesisHash)
case ctx.GlobalBool(CalaverasFlag.Name):
if !ctx.GlobalIsSet(NetworkIdFlag.Name) {
cfg.NetworkId = 123 // https://gist.github.com/holiman/c5697b041b3dc18c50a5cdd382cbdd16
}
cfg.Genesis = core.DefaultCalaverasGenesisBlock()
case ctx.GlobalBool(DeveloperFlag.Name):
if !ctx.GlobalIsSet(NetworkIdFlag.Name) {
cfg.NetworkId = 1337
Expand Down Expand Up @@ -1910,8 +1894,6 @@ func MakeGenesis(ctx *cli.Context) *core.Genesis {
genesis = core.DefaultRinkebyGenesisBlock()
case ctx.GlobalBool(GoerliFlag.Name):
genesis = core.DefaultGoerliGenesisBlock()
case ctx.GlobalBool(CalaverasFlag.Name):
genesis = core.DefaultCalaverasGenesisBlock()
case ctx.GlobalBool(SyscoinFlag.Name):
genesis = core.DefaultSyscoinGenesisBlock()
case ctx.GlobalBool(TanenbaumFlag.Name):
Expand Down
13 changes: 0 additions & 13 deletions core/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,6 @@ func (g *Genesis) configOrDefault(ghash common.Hash) *params.ChainConfig {
return params.RinkebyChainConfig
case ghash == params.GoerliGenesisHash:
return params.GoerliChainConfig
case ghash == params.CalaverasGenesisHash:
return params.CalaverasChainConfig
case ghash == params.SyscoinGenesisHash:
return params.SyscoinChainConfig
case ghash == params.TanenbaumGenesisHash:
Expand Down Expand Up @@ -403,17 +401,6 @@ func DefaultGoerliGenesisBlock() *Genesis {
}
}

func DefaultCalaverasGenesisBlock() *Genesis {
// Full genesis: https://gist.github.com/holiman/c6ed9269dce28304ad176314caa75e97
return &Genesis{
Config: params.CalaverasChainConfig,
Timestamp: 0x60b3877f,
ExtraData: hexutil.MustDecode("0x00000000000000000000000000000000000000000000000000000000000000005211cea3870c7ba7c6c44b185e62eecdb864cd8c560228ce57d31efbf64c200b2c200aacec78cf17a7148e784fe95a7a750335f8b9572ee28d72e7650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
GasLimit: 0x47b760,
Difficulty: big.NewInt(1),
Alloc: decodePrealloc(calaverasAllocData),
}
}

// SYSCOIN
func DefaultSyscoinGenesisBlock() *Genesis {
Expand Down
4 changes: 0 additions & 4 deletions core/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,6 @@ func TestGenesisHashes(t *testing.T) {
genesis: DefaultRinkebyGenesisBlock(),
hash: params.RinkebyGenesisHash,
},
{
genesis: DefaultCalaverasGenesisBlock(),
hash: params.CalaverasGenesisHash,
},
// SYSCOIN
{
genesis: DefaultSyscoinGenesisBlock(),
Expand Down
6 changes: 0 additions & 6 deletions params/bootnodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,6 @@ var GoerliBootnodes = []string{
"enode://a59e33ccd2b3e52d578f1fbd70c6f9babda2650f0760d6ff3b37742fdcdfdb3defba5d56d315b40c46b70198c7621e63ffa3f987389c7118634b0fefbbdfa7fd@51.15.119.157:40303",
}

// CalaverasBootnodes are the enode URLs of the P2P bootstrap nodes running on the
// Calaveras ephemeral test network.
var CalaverasBootnodes = []string{
"enode://9e1096aa59862a6f164994cb5cb16f5124d6c992cdbf4535ff7dea43ea1512afe5448dca9df1b7ab0726129603f1a3336b631e4d7a1a44c94daddd03241587f9@3.9.20.133:30303",
}

// SyscoinBootnodes are the enode URLs of the P2P bootstrap nodes running on the
// Syscoin NEVM-based network.
var SyscoinBootnodes = []string{
Expand Down
22 changes: 0 additions & 22 deletions params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ var (
RopstenGenesisHash = common.HexToHash("0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d")
RinkebyGenesisHash = common.HexToHash("0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177")
GoerliGenesisHash = common.HexToHash("0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a")
CalaverasGenesisHash = common.HexToHash("0xeb9233d066c275efcdfed8037f4fc082770176aefdbcb7691c71da412a5670f2")
SyscoinGenesisHash = common.HexToHash("0x06213eb0669345b6b106bb19d9e2e198a8c06eae3a50e0f303a046ca6afd277f")
TanenbaumGenesisHash = common.HexToHash("0x566d9454e219db7531bbfe882500cb12923ea22f5766917336a1cc81fc5b543d")
)
Expand Down Expand Up @@ -308,27 +307,6 @@ var (
Threshold: 2,
}

CalaverasChainConfig = &ChainConfig{
ChainID: big.NewInt(123),
HomesteadBlock: big.NewInt(0),
DAOForkBlock: nil,
DAOForkSupport: true,
EIP150Block: big.NewInt(0),
EIP155Block: big.NewInt(0),
EIP158Block: big.NewInt(0),
ByzantiumBlock: big.NewInt(0),
ConstantinopleBlock: big.NewInt(0),
PetersburgBlock: big.NewInt(0),
IstanbulBlock: big.NewInt(0),
MuirGlacierBlock: nil,
BerlinBlock: big.NewInt(0),
LondonBlock: big.NewInt(500),
Clique: &CliqueConfig{
Period: 30,
Epoch: 30000,
},
}

// AllEthashProtocolChanges contains every protocol change (EIPs) introduced
// and accepted by the Ethereum core developers into the Ethash consensus.
//
Expand Down

0 comments on commit b10062a

Please sign in to comment.