Skip to content

Commit 3c37db7

Browse files
all: clean up goerli flag and config (ethereum#30289)
Co-authored-by: lightclient <[email protected]>
1 parent 0fde506 commit 3c37db7

File tree

21 files changed

+33
-173
lines changed

21 files changed

+33
-173
lines changed

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ This command will:
8989
This tool is optional and if you leave it out you can always attach it to an already running
9090
`geth` instance with `geth attach`.
9191

92-
### A Full node on the Görli test network
92+
### A Full node on the Holesky test network
9393

9494
Transitioning towards developers, if you'd like to play around with creating Ethereum
9595
contracts, you almost certainly would like to do that without any real money involved until
@@ -98,23 +98,23 @@ network, you want to join the **test** network with your node, which is fully eq
9898
the main network, but with play-Ether only.
9999

100100
```shell
101-
$ geth --goerli console
101+
$ geth --holesky console
102102
```
103103

104104
The `console` subcommand has the same meaning as above and is equally
105105
useful on the testnet too.
106106

107-
Specifying the `--goerli` flag, however, will reconfigure your `geth` instance a bit:
107+
Specifying the `--holesky` flag, however, will reconfigure your `geth` instance a bit:
108108

109-
* Instead of connecting to the main Ethereum network, the client will connect to the Görli
109+
* Instead of connecting to the main Ethereum network, the client will connect to the Holesky
110110
test network, which uses different P2P bootnodes, different network IDs and genesis
111111
states.
112112
* Instead of using the default data directory (`~/.ethereum` on Linux for example), `geth`
113-
will nest itself one level deeper into a `goerli` subfolder (`~/.ethereum/goerli` on
113+
will nest itself one level deeper into a `holesky` subfolder (`~/.ethereum/holesky` on
114114
Linux). Note, on OSX and Linux this also means that attaching to a running testnet node
115115
requires the use of a custom endpoint since `geth attach` will try to attach to a
116116
production node endpoint by default, e.g.,
117-
`geth attach <datadir>/goerli/geth.ipc`. Windows users are not affected by
117+
`geth attach <datadir>/holesky/geth.ipc`. Windows users are not affected by
118118
this.
119119

120120
*Note: Although some internal protective measures prevent transactions from

beacon/blsync/config.go

+1-16
Original file line numberDiff line numberDiff line change
@@ -56,32 +56,17 @@ var (
5656
AddFork("DENEB", 132608, []byte{144, 0, 0, 115}),
5757
Checkpoint: common.HexToHash("0x1005a6d9175e96bfbce4d35b80f468e9bff0b674e1e861d16e09e10005a58e81"),
5858
}
59-
60-
GoerliConfig = lightClientConfig{
61-
ChainConfig: (&types.ChainConfig{
62-
GenesisValidatorsRoot: common.HexToHash("0x043db0d9a83813551ee2f33450d23797757d430911a9320530ad8a0eabc43efb"),
63-
GenesisTime: 1614588812,
64-
}).
65-
AddFork("GENESIS", 0, []byte{0, 0, 16, 32}).
66-
AddFork("ALTAIR", 36660, []byte{1, 0, 16, 32}).
67-
AddFork("BELLATRIX", 112260, []byte{2, 0, 16, 32}).
68-
AddFork("CAPELLA", 162304, []byte{3, 0, 16, 32}).
69-
AddFork("DENEB", 231680, []byte{4, 0, 16, 32}),
70-
Checkpoint: common.HexToHash("0x53a0f4f0a378e2c4ae0a9ee97407eb69d0d737d8d8cd0a5fb1093f42f7b81c49"),
71-
}
7259
)
7360

7461
func makeChainConfig(ctx *cli.Context) lightClientConfig {
7562
var config lightClientConfig
7663
customConfig := ctx.IsSet(utils.BeaconConfigFlag.Name)
77-
utils.CheckExclusive(ctx, utils.MainnetFlag, utils.GoerliFlag, utils.SepoliaFlag, utils.BeaconConfigFlag)
64+
utils.CheckExclusive(ctx, utils.MainnetFlag, utils.SepoliaFlag, utils.BeaconConfigFlag)
7865
switch {
7966
case ctx.Bool(utils.MainnetFlag.Name):
8067
config = MainnetConfig
8168
case ctx.Bool(utils.SepoliaFlag.Name):
8269
config = SepoliaConfig
83-
case ctx.Bool(utils.GoerliFlag.Name):
84-
config = GoerliConfig
8570
default:
8671
if !customConfig {
8772
config = MainnetConfig

cmd/blsync/main.go

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ func main() {
4545
//TODO datadir for optional permanent database
4646
utils.MainnetFlag,
4747
utils.SepoliaFlag,
48-
utils.GoerliFlag,
4948
utils.BlsyncApiFlag,
5049
utils.BlsyncJWTSecretFlag,
5150
},

cmd/clef/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ GLOBAL OPTIONS:
2929
--loglevel value log level to emit to the screen (default: 4)
3030
--keystore value Directory for the keystore (default: "$HOME/.ethereum/keystore")
3131
--configdir value Directory for Clef configuration (default: "$HOME/.clef")
32-
--chainid value Chain id to use for signing (1=mainnet, 5=Goerli) (default: 1)
32+
--chainid value Chain id to use for signing (1=mainnet, 17000=Holesky) (default: 1)
3333
--lightkdf Reduce key-derivation RAM & CPU usage at some expense of KDF strength
3434
--nousb Disables monitoring for and managing USB hardware wallets
3535
--pcscdpath value Path to the smartcard daemon (pcscd) socket file (default: "/run/pcscd/pcscd.comm")

cmd/clef/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ var (
100100
chainIdFlag = &cli.Int64Flag{
101101
Name: "chainid",
102102
Value: params.MainnetChainConfig.ChainID.Int64(),
103-
Usage: "Chain id to use for signing (1=mainnet, 5=Goerli)",
103+
Usage: "Chain id to use for signing (1=mainnet, 17000=Holesky)",
104104
}
105105
rpcPortFlag = &cli.IntFlag{
106106
Name: "http.port",

cmd/devp2p/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ set to standard output. The following filters are supported:
4444
- `-limit <N>` limits the output set to N entries, taking the top N nodes by score
4545
- `-ip <CIDR>` filters nodes by IP subnet
4646
- `-min-age <duration>` filters nodes by 'first seen' time
47-
- `-eth-network <mainnet/goerli/sepolia/holesky>` filters nodes by "eth" ENR entry
47+
- `-eth-network <mainnet/sepolia/holesky>` filters nodes by "eth" ENR entry
4848
- `-les-server` filters nodes by LES server support
4949
- `-snap` filters nodes by snap protocol support
5050

cmd/devp2p/nodesetcmd.go

-2
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,6 @@ func ethFilter(args []string) (nodeFilter, error) {
230230
switch args[0] {
231231
case "mainnet":
232232
filter = forkid.NewStaticFilter(params.MainnetChainConfig, core.DefaultGenesisBlock().ToBlock())
233-
case "goerli":
234-
filter = forkid.NewStaticFilter(params.GoerliChainConfig, core.DefaultGoerliGenesisBlock().ToBlock())
235233
case "sepolia":
236234
filter = forkid.NewStaticFilter(params.SepoliaChainConfig, core.DefaultSepoliaGenesisBlock().ToBlock())
237235
case "holesky":

cmd/geth/chaincmd.go

-2
Original file line numberDiff line numberDiff line change
@@ -425,8 +425,6 @@ func importHistory(ctx *cli.Context) error {
425425
network = "mainnet"
426426
case ctx.Bool(utils.SepoliaFlag.Name):
427427
network = "sepolia"
428-
case ctx.Bool(utils.GoerliFlag.Name):
429-
network = "goerli"
430428
}
431429
} else {
432430
// No network flag set, try to determine network based on files

cmd/geth/consolecmd_test.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@ import (
3030
)
3131

3232
const (
33-
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"
33+
ipcAPIs = "admin: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"
3434
httpAPIs = "eth:1.0 net:1.0 rpc:1.0 web3:1.0"
3535
)
3636

3737
// spawns geth with the given command line args, using a set of flags to minimise
3838
// memory and disk IO. If the args don't set --datadir, the
3939
// child g gets a temporary data directory.
4040
func runMinimalGeth(t *testing.T, args ...string) *testgeth {
41-
// --goerli to make the 'writing genesis to disk' faster (no accounts)
41+
// --holesky to make the 'writing genesis to disk' faster (no accounts)
4242
// --networkid=1337 to avoid cache bump
4343
// --syncmode=full to avoid allocating fast sync bloom
44-
allArgs := []string{"--goerli", "--networkid", "1337", "--authrpc.port", "0", "--syncmode=full", "--port", "0",
44+
allArgs := []string{"--holesky", "--networkid", "1337", "--authrpc.port", "0", "--syncmode=full", "--port", "0",
4545
"--nat", "none", "--nodiscover", "--maxpeers", "0", "--cache", "64",
4646
"--datadir.minfreedisk", "0"}
4747
return runGeth(t, append(allArgs, args...)...)
@@ -62,7 +62,7 @@ func TestConsoleWelcome(t *testing.T) {
6262
geth.SetTemplateFunc("gover", runtime.Version)
6363
geth.SetTemplateFunc("gethver", func() string { return params.VersionWithCommit("", "") })
6464
geth.SetTemplateFunc("niltime", func() string {
65-
return time.Unix(1548854791, 0).Format("Mon Jan 02 2006 15:04:05 GMT-0700 (MST)")
65+
return time.Unix(1695902100, 0).Format("Mon Jan 02 2006 15:04:05 GMT-0700 (MST)")
6666
})
6767
geth.SetTemplateFunc("apis", func() string { return ipcAPIs })
6868

@@ -131,7 +131,7 @@ func testAttachWelcome(t *testing.T, geth *testgeth, endpoint, apis string) {
131131
attach.SetTemplateFunc("gover", runtime.Version)
132132
attach.SetTemplateFunc("gethver", func() string { return params.VersionWithCommit("", "") })
133133
attach.SetTemplateFunc("niltime", func() string {
134-
return time.Unix(1548854791, 0).Format("Mon Jan 02 2006 15:04:05 GMT-0700 (MST)")
134+
return time.Unix(1695902100, 0).Format("Mon Jan 02 2006 15:04:05 GMT-0700 (MST)")
135135
})
136136
attach.SetTemplateFunc("ipc", func() bool { return strings.HasPrefix(endpoint, "ipc") })
137137
attach.SetTemplateFunc("datadir", func() string { return geth.Datadir })

cmd/geth/main.go

-4
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,6 @@ func main() {
289289
func prepare(ctx *cli.Context) {
290290
// If we're running a known preset, log it for convenience.
291291
switch {
292-
case ctx.IsSet(utils.GoerliFlag.Name):
293-
log.Info("Starting Geth on Görli testnet...")
294-
295292
case ctx.IsSet(utils.SepoliaFlag.Name):
296293
log.Info("Starting Geth on Sepolia testnet...")
297294

@@ -324,7 +321,6 @@ func prepare(ctx *cli.Context) {
324321
// Make sure we're not on any supported preconfigured testnet either
325322
if !ctx.IsSet(utils.HoleskyFlag.Name) &&
326323
!ctx.IsSet(utils.SepoliaFlag.Name) &&
327-
!ctx.IsSet(utils.GoerliFlag.Name) &&
328324
!ctx.IsSet(utils.DeveloperFlag.Name) {
329325
// Nope, we're really on mainnet. Bump that cache up!
330326
log.Info("Bumping default cache on mainnet", "provided", ctx.Int(utils.CacheFlag.Name), "updated", 4096)

cmd/utils/flags.go

+3-24
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ var (
134134
}
135135
NetworkIdFlag = &cli.Uint64Flag{
136136
Name: "networkid",
137-
Usage: "Explicitly set network id (integer)(For testnets: use --goerli, --sepolia, --holesky instead)",
137+
Usage: "Explicitly set network id (integer)(For testnets: use --sepolia, --holesky instead)",
138138
Value: ethconfig.Defaults.NetworkId,
139139
Category: flags.EthCategory,
140140
}
@@ -143,11 +143,6 @@ var (
143143
Usage: "Ethereum mainnet",
144144
Category: flags.EthCategory,
145145
}
146-
GoerliFlag = &cli.BoolFlag{
147-
Name: "goerli",
148-
Usage: "Görli network: pre-configured proof-of-authority test network",
149-
Category: flags.EthCategory,
150-
}
151146
SepoliaFlag = &cli.BoolFlag{
152147
Name: "sepolia",
153148
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.
965960
var (
966961
// TestnetFlags is the flag group of all built-in supported testnets.
967962
TestnetFlags = []cli.Flag{
968-
GoerliFlag,
969963
SepoliaFlag,
970964
HoleskyFlag,
971965
}
@@ -988,9 +982,6 @@ var (
988982
// then a subdirectory of the specified datadir will be used.
989983
func MakeDataDir(ctx *cli.Context) string {
990984
if path := ctx.String(DataDirFlag.Name); path != "" {
991-
if ctx.Bool(GoerliFlag.Name) {
992-
return filepath.Join(path, "goerli")
993-
}
994985
if ctx.Bool(SepoliaFlag.Name) {
995986
return filepath.Join(path, "sepolia")
996987
}
@@ -1042,7 +1033,7 @@ func setNodeUserIdent(ctx *cli.Context, cfg *node.Config) {
10421033
//
10431034
// 1. --bootnodes flag
10441035
// 2. Config file
1045-
// 3. Network preset flags (e.g. --goerli)
1036+
// 3. Network preset flags (e.g. --holesky)
10461037
// 4. default to mainnet nodes
10471038
func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) {
10481039
urls := params.MainnetBootnodes
@@ -1057,8 +1048,6 @@ func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) {
10571048
urls = params.HoleskyBootnodes
10581049
case ctx.Bool(SepoliaFlag.Name):
10591050
urls = params.SepoliaBootnodes
1060-
case ctx.Bool(GoerliFlag.Name):
1061-
urls = params.GoerliBootnodes
10621051
}
10631052
}
10641053
cfg.BootstrapNodes = mustParseBootnodes(urls)
@@ -1484,8 +1473,6 @@ func SetDataDir(ctx *cli.Context, cfg *node.Config) {
14841473
cfg.DataDir = ctx.String(DataDirFlag.Name)
14851474
case ctx.Bool(DeveloperFlag.Name):
14861475
cfg.DataDir = "" // unless explicitly requested, use memory databases
1487-
case ctx.Bool(GoerliFlag.Name) && cfg.DataDir == node.DefaultDataDir():
1488-
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "goerli")
14891476
case ctx.Bool(SepoliaFlag.Name) && cfg.DataDir == node.DefaultDataDir():
14901477
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "sepolia")
14911478
case ctx.Bool(HoleskyFlag.Name) && cfg.DataDir == node.DefaultDataDir():
@@ -1657,7 +1644,7 @@ func CheckExclusive(ctx *cli.Context, args ...interface{}) {
16571644
// SetEthConfig applies eth-related command line flags to the config.
16581645
func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
16591646
// Avoid conflicting network flags
1660-
CheckExclusive(ctx, MainnetFlag, DeveloperFlag, GoerliFlag, SepoliaFlag, HoleskyFlag)
1647+
CheckExclusive(ctx, MainnetFlag, DeveloperFlag, SepoliaFlag, HoleskyFlag)
16611648
CheckExclusive(ctx, DeveloperFlag, ExternalSignerFlag) // Can't use both ephemeral unlocked and external signer
16621649

16631650
// Set configurations from CLI flags
@@ -1827,12 +1814,6 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
18271814
}
18281815
cfg.Genesis = core.DefaultSepoliaGenesisBlock()
18291816
SetDNSDiscoveryDefaults(cfg, params.SepoliaGenesisHash)
1830-
case ctx.Bool(GoerliFlag.Name):
1831-
if !ctx.IsSet(NetworkIdFlag.Name) {
1832-
cfg.NetworkId = 5
1833-
}
1834-
cfg.Genesis = core.DefaultGoerliGenesisBlock()
1835-
SetDNSDiscoveryDefaults(cfg, params.GoerliGenesisHash)
18361817
case ctx.Bool(DeveloperFlag.Name):
18371818
if !ctx.IsSet(NetworkIdFlag.Name) {
18381819
cfg.NetworkId = 1337
@@ -2154,8 +2135,6 @@ func MakeGenesis(ctx *cli.Context) *core.Genesis {
21542135
genesis = core.DefaultHoleskyGenesisBlock()
21552136
case ctx.Bool(SepoliaFlag.Name):
21562137
genesis = core.DefaultSepoliaGenesisBlock()
2157-
case ctx.Bool(GoerliFlag.Name):
2158-
genesis = core.DefaultGoerliGenesisBlock()
21592138
case ctx.Bool(DeveloperFlag.Name):
21602139
Fatalf("Developer chains are ephemeral")
21612140
}

consensus/clique/clique_test.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ import (
3030
)
3131

3232
// This test case is a repro of an annoying bug that took us forever to catch.
33-
// In Clique PoA networks (Görli, etc), consecutive blocks might have
34-
// the same state root (no block subsidy, empty block). If a node crashes, the
35-
// chain ends up losing the recent state and needs to regenerate it from blocks
36-
// already in the database. The bug was that processing the block *prior* to an
37-
// empty one **also completes** the empty one, ending up in a known-block error.
33+
// In Clique PoA networks, consecutive blocks might have the same state root (no
34+
// block subsidy, empty block). If a node crashes, the chain ends up losing the
35+
// recent state and needs to regenerate it from blocks already in the database.
36+
// The bug was that processing the block *prior* to an empty one **also
37+
// completes** the empty one, ending up in a known-block error.
3838
func TestReimportMirroredState(t *testing.T) {
3939
// Initialize a Clique chain with a single signer
4040
var (

core/forkid/forkid_test.go

-19
Original file line numberDiff line numberDiff line change
@@ -80,25 +80,6 @@ func TestCreation(t *testing.T) {
8080
{50000000, 2000000000, ID{Hash: checksumToBytes(0x9f3d2254), Next: 0}}, // Future Cancun block
8181
},
8282
},
83-
// Goerli test cases
84-
{
85-
params.GoerliChainConfig,
86-
core.DefaultGoerliGenesisBlock().ToBlock(),
87-
[]testcase{
88-
{0, 0, ID{Hash: checksumToBytes(0xa3f5ab08), Next: 1561651}}, // Unsynced, last Frontier, Homestead, Tangerine, Spurious, Byzantium, Constantinople and first Petersburg block
89-
{1561650, 0, ID{Hash: checksumToBytes(0xa3f5ab08), Next: 1561651}}, // Last Petersburg block
90-
{1561651, 0, ID{Hash: checksumToBytes(0xc25efa5c), Next: 4460644}}, // First Istanbul block
91-
{4460643, 0, ID{Hash: checksumToBytes(0xc25efa5c), Next: 4460644}}, // Last Istanbul block
92-
{4460644, 0, ID{Hash: checksumToBytes(0x757a1c47), Next: 5062605}}, // First Berlin block
93-
{5000000, 0, ID{Hash: checksumToBytes(0x757a1c47), Next: 5062605}}, // Last Berlin block
94-
{5062605, 0, ID{Hash: checksumToBytes(0xB8C6299D), Next: 1678832736}}, // First London block
95-
{6000000, 1678832735, ID{Hash: checksumToBytes(0xB8C6299D), Next: 1678832736}}, // Last London block
96-
{6000001, 1678832736, ID{Hash: checksumToBytes(0xf9843abf), Next: 1705473120}}, // First Shanghai block
97-
{6500002, 1705473119, ID{Hash: checksumToBytes(0xf9843abf), Next: 1705473120}}, // Last Shanghai block
98-
{6500003, 1705473120, ID{Hash: checksumToBytes(0x70cc14e2), Next: 0}}, // First Cancun block
99-
{6500003, 2705473120, ID{Hash: checksumToBytes(0x70cc14e2), Next: 0}}, // Future Cancun block
100-
},
101-
},
10283
// Sepolia test cases
10384
{
10485
params.SepoliaChainConfig,

core/genesis.go

-16
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,6 @@ func getGenesisState(db ethdb.Database, blockhash common.Hash) (alloc types.Gene
196196
switch blockhash {
197197
case params.MainnetGenesisHash:
198198
genesis = DefaultGenesisBlock()
199-
case params.GoerliGenesisHash:
200-
genesis = DefaultGoerliGenesisBlock()
201199
case params.SepoliaGenesisHash:
202200
genesis = DefaultSepoliaGenesisBlock()
203201
case params.HoleskyGenesisHash:
@@ -400,8 +398,6 @@ func (g *Genesis) configOrDefault(ghash common.Hash) *params.ChainConfig {
400398
return params.HoleskyChainConfig
401399
case ghash == params.SepoliaGenesisHash:
402400
return params.SepoliaChainConfig
403-
case ghash == params.GoerliGenesisHash:
404-
return params.GoerliChainConfig
405401
default:
406402
return params.AllEthashProtocolChanges
407403
}
@@ -539,18 +535,6 @@ func DefaultGenesisBlock() *Genesis {
539535
}
540536
}
541537

542-
// DefaultGoerliGenesisBlock returns the Görli network genesis block.
543-
func DefaultGoerliGenesisBlock() *Genesis {
544-
return &Genesis{
545-
Config: params.GoerliChainConfig,
546-
Timestamp: 1548854791,
547-
ExtraData: hexutil.MustDecode("0x22466c6578692069732061207468696e6722202d204166726900000000000000e0a2bd4258d2768837baa26a28fe71dc079f84c70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
548-
GasLimit: 10485760,
549-
Difficulty: big.NewInt(1),
550-
Alloc: decodePrealloc(goerliAllocData),
551-
}
552-
}
553-
554538
// DefaultSepoliaGenesisBlock returns the Sepolia network genesis block.
555539
func DefaultSepoliaGenesisBlock() *Genesis {
556540
return &Genesis{

core/genesis_alloc.go

-1
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)