Skip to content

Commit 843b291

Browse files
karalabeshekhirin
authored andcommitted
all: remove support for Ropsten (ethereum#26644)
1 parent 9a06579 commit 843b291

File tree

22 files changed

+55
-179
lines changed

22 files changed

+55
-179
lines changed

README.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -132,19 +132,6 @@ called [*Rinkeby*](https://www.rinkeby.io) which is operated by members of the c
132132
$ geth --rinkeby console
133133
```
134134

135-
### Full node on the Ropsten test network
136-
137-
In addition to Görli and Rinkeby, Geth also supports the ancient Ropsten testnet. The
138-
Ropsten test network is based on the Ethash proof-of-work consensus algorithm. As such,
139-
it has certain extra overhead and is more susceptible to reorganization attacks due to the
140-
network's low difficulty/security.
141-
142-
```shell
143-
$ geth --ropsten console
144-
```
145-
146-
*Note: Older Geth configurations store the Ropsten database in the `testnet` subdirectory.*
147-
148135
### Configuration
149136

150137
As an alternative to passing the numerous flags to the `geth` binary, you can also pass a

cmd/checkpoint-admin/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ checkpoint-admin status --rpc <NODE_RPC_ENDPOINT>
8686

8787
### Enable checkpoint oracle in your private network
8888

89-
Currently, only the Ethereum mainnet and the default supported test networks (ropsten, rinkeby, goerli) activate this feature. If you want to activate this feature in your private network, you can overwrite the relevant checkpoint oracle settings through the configuration file after deploying the oracle contract.
89+
Currently, only the Ethereum mainnet and the default supported test networks (rinkeby, goerli) activate this feature. If you want to activate this feature in your private network, you can overwrite the relevant checkpoint oracle settings through the configuration file after deploying the oracle contract.
9090

9191
* Get your node configuration file `geth dumpconfig OTHER_COMMAND_LINE_OPTIONS > config.toml`
9292
* Edit the configuration file and add the following information

cmd/clef/README.md

Lines changed: 1 addition & 1 deletion
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, 3=Ropsten, 4=Rinkeby, 5=Goerli) (default: 1)
32+
--chainid value Chain id to use for signing (1=mainnet, 4=Rinkeby, 5=Goerli) (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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ var (
9999
chainIdFlag = &cli.Int64Flag{
100100
Name: "chainid",
101101
Value: params.MainnetChainConfig.ChainID.Int64(),
102-
Usage: "Chain id to use for signing (1=mainnet, 3=Ropsten, 4=Rinkeby, 5=Goerli)",
102+
Usage: "Chain id to use for signing (1=mainnet, 4=Rinkeby, 5=Goerli)",
103103
}
104104
rpcPortFlag = &cli.IntFlag{
105105
Name: "http.port",

cmd/devp2p/README.md

Lines changed: 1 addition & 1 deletion
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/rinkeby/goerli/ropsten>` filters nodes by "eth" ENR entry
47+
- `-eth-network <mainnet/rinkeby/goerli/sepolia>` 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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,6 @@ func ethFilter(args []string) (nodeFilter, error) {
233233
filter = forkid.NewStaticFilter(params.RinkebyChainConfig, params.RinkebyGenesisHash)
234234
case "goerli":
235235
filter = forkid.NewStaticFilter(params.GoerliChainConfig, params.GoerliGenesisHash)
236-
case "ropsten":
237-
filter = forkid.NewStaticFilter(params.RopstenChainConfig, params.RopstenGenesisHash)
238236
case "sepolia":
239237
filter = forkid.NewStaticFilter(params.SepoliaChainConfig, params.SepoliaGenesisHash)
240238
default:

cmd/geth/consolecmd_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@ import (
3030
)
3131

3232
const (
33-
ipcAPIs = "admin:1.0 debug:1.0 engine:1.0 eth:1.0 ethash:1.0 miner:1.0 net:1.0 rpc:1.0 txpool:1.0 web3:1.0"
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"
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-
// --ropsten to make the 'writing genesis to disk' faster (no accounts)
41+
// --goerli 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{"--ropsten", "--networkid", "1337", "--authrpc.port", "0", "--syncmode=full", "--port", "0",
44+
allArgs := []string{"--goerli", "--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...)...)
@@ -61,7 +61,7 @@ func TestConsoleWelcome(t *testing.T) {
6161
geth.SetTemplateFunc("gover", runtime.Version)
6262
geth.SetTemplateFunc("gethver", func() string { return params.VersionWithCommit("", "") })
6363
geth.SetTemplateFunc("niltime", func() string {
64-
return time.Unix(0, 0).Format("Mon Jan 02 2006 15:04:05 GMT-0700 (MST)")
64+
return time.Unix(1548854791, 0).Format("Mon Jan 02 2006 15:04:05 GMT-0700 (MST)")
6565
})
6666
geth.SetTemplateFunc("apis", func() string { return ipcAPIs })
6767

@@ -132,7 +132,7 @@ func testAttachWelcome(t *testing.T, geth *testgeth, endpoint, apis string) {
132132
attach.SetTemplateFunc("gethver", func() string { return params.VersionWithCommit("", "") })
133133
attach.SetTemplateFunc("etherbase", func() string { return geth.Etherbase })
134134
attach.SetTemplateFunc("niltime", func() string {
135-
return time.Unix(0, 0).Format("Mon Jan 02 2006 15:04:05 GMT-0700 (MST)")
135+
return time.Unix(1548854791, 0).Format("Mon Jan 02 2006 15:04:05 GMT-0700 (MST)")
136136
})
137137
attach.SetTemplateFunc("ipc", func() bool { return strings.HasPrefix(endpoint, "ipc") })
138138
attach.SetTemplateFunc("datadir", func() string { return geth.Datadir })

cmd/geth/main.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,6 @@ func main() {
274274
func prepare(ctx *cli.Context) {
275275
// If we're running a known preset, log it for convenience.
276276
switch {
277-
case ctx.IsSet(utils.RopstenFlag.Name):
278-
log.Info("Starting Geth on Ropsten testnet...")
279-
280277
case ctx.IsSet(utils.RinkebyFlag.Name):
281278
log.Info("Starting Geth on Rinkeby testnet...")
282279

@@ -310,8 +307,7 @@ func prepare(ctx *cli.Context) {
310307
// If we're a full node on mainnet without --cache specified, bump default cache allowance
311308
if ctx.String(utils.SyncModeFlag.Name) != "light" && !ctx.IsSet(utils.CacheFlag.Name) && !ctx.IsSet(utils.NetworkIdFlag.Name) {
312309
// Make sure we're not on any supported preconfigured testnet either
313-
if !ctx.IsSet(utils.RopstenFlag.Name) &&
314-
!ctx.IsSet(utils.SepoliaFlag.Name) &&
310+
if !ctx.IsSet(utils.SepoliaFlag.Name) &&
315311
!ctx.IsSet(utils.RinkebyFlag.Name) &&
316312
!ctx.IsSet(utils.GoerliFlag.Name) &&
317313
!ctx.IsSet(utils.DeveloperFlag.Name) {

cmd/utils/flags.go

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ var (
127127
}
128128
NetworkIdFlag = &cli.Uint64Flag{
129129
Name: "networkid",
130-
Usage: "Explicitly set network id (integer)(For testnets: use --ropsten, --rinkeby, --goerli instead)",
130+
Usage: "Explicitly set network id (integer)(For testnets: use --rinkeby, --goerli, --sepolia instead)",
131131
Value: ethconfig.Defaults.NetworkId,
132132
Category: flags.EthCategory,
133133
}
@@ -136,11 +136,6 @@ var (
136136
Usage: "Ethereum mainnet",
137137
Category: flags.EthCategory,
138138
}
139-
RopstenFlag = &cli.BoolFlag{
140-
Name: "ropsten",
141-
Usage: "Ropsten network: pre-configured proof-of-stake test network",
142-
Category: flags.EthCategory,
143-
}
144139
RinkebyFlag = &cli.BoolFlag{
145140
Name: "rinkeby",
146141
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.
998993
var (
999994
// TestnetFlags is the flag group of all built-in supported testnets.
1000995
TestnetFlags = []cli.Flag{
1001-
RopstenFlag,
1002996
RinkebyFlag,
1003997
GoerliFlag,
1004998
SepoliaFlag,
@@ -1020,11 +1014,6 @@ var (
10201014
// then a subdirectory of the specified datadir will be used.
10211015
func MakeDataDir(ctx *cli.Context) string {
10221016
if path := ctx.String(DataDirFlag.Name); path != "" {
1023-
if ctx.Bool(RopstenFlag.Name) {
1024-
// Maintain compatibility with older Geth configurations storing the
1025-
// Ropsten database in `testnet` instead of `ropsten`.
1026-
return filepath.Join(path, "ropsten")
1027-
}
10281017
if ctx.Bool(RinkebyFlag.Name) {
10291018
return filepath.Join(path, "rinkeby")
10301019
}
@@ -1080,8 +1069,6 @@ func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) {
10801069
switch {
10811070
case ctx.IsSet(BootnodesFlag.Name):
10821071
urls = SplitAndTrim(ctx.String(BootnodesFlag.Name))
1083-
case ctx.Bool(RopstenFlag.Name):
1084-
urls = params.RopstenBootnodes
10851072
case ctx.Bool(SepoliaFlag.Name):
10861073
urls = params.SepoliaBootnodes
10871074
case ctx.Bool(RinkebyFlag.Name):
@@ -1525,18 +1512,6 @@ func SetDataDir(ctx *cli.Context, cfg *node.Config) {
15251512
cfg.DataDir = ctx.String(DataDirFlag.Name)
15261513
case ctx.Bool(DeveloperFlag.Name):
15271514
cfg.DataDir = "" // unless explicitly requested, use memory databases
1528-
case ctx.Bool(RopstenFlag.Name) && cfg.DataDir == node.DefaultDataDir():
1529-
// Maintain compatibility with older Geth configurations storing the
1530-
// Ropsten database in `testnet` instead of `ropsten`.
1531-
legacyPath := filepath.Join(node.DefaultDataDir(), "testnet")
1532-
if common.FileExist(legacyPath) {
1533-
log.Warn("Using the deprecated `testnet` datadir. Future versions will store the Ropsten chain in `ropsten`.")
1534-
cfg.DataDir = legacyPath
1535-
} else {
1536-
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "ropsten")
1537-
}
1538-
1539-
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "ropsten")
15401515
case ctx.Bool(RinkebyFlag.Name) && cfg.DataDir == node.DefaultDataDir():
15411516
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "rinkeby")
15421517
case ctx.Bool(GoerliFlag.Name) && cfg.DataDir == node.DefaultDataDir():
@@ -1733,7 +1708,7 @@ func CheckExclusive(ctx *cli.Context, args ...interface{}) {
17331708
// SetEthConfig applies eth-related command line flags to the config.
17341709
func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
17351710
// Avoid conflicting network flags
1736-
CheckExclusive(ctx, MainnetFlag, DeveloperFlag, RopstenFlag, RinkebyFlag, GoerliFlag, SepoliaFlag)
1711+
CheckExclusive(ctx, MainnetFlag, DeveloperFlag, RinkebyFlag, GoerliFlag, SepoliaFlag)
17371712
CheckExclusive(ctx, LightServeFlag, SyncModeFlag, "light")
17381713
CheckExclusive(ctx, DeveloperFlag, ExternalSignerFlag) // Can't use both ephemeral unlocked and external signer
17391714
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) {
18711846
}
18721847
cfg.Genesis = core.DefaultGenesisBlock()
18731848
SetDNSDiscoveryDefaults(cfg, params.MainnetGenesisHash)
1874-
case ctx.Bool(RopstenFlag.Name):
1875-
if !ctx.IsSet(NetworkIdFlag.Name) {
1876-
cfg.NetworkId = 3
1877-
}
1878-
cfg.Genesis = core.DefaultRopstenGenesisBlock()
1879-
SetDNSDiscoveryDefaults(cfg, params.RopstenGenesisHash)
18801849
case ctx.Bool(SepoliaFlag.Name):
18811850
if !ctx.IsSet(NetworkIdFlag.Name) {
18821851
cfg.NetworkId = 11155111
@@ -2219,8 +2188,6 @@ func MakeGenesis(ctx *cli.Context) *core.Genesis {
22192188
switch {
22202189
case ctx.Bool(MainnetFlag.Name):
22212190
genesis = core.DefaultGenesisBlock()
2222-
case ctx.Bool(RopstenFlag.Name):
2223-
genesis = core.DefaultRopstenGenesisBlock()
22242191
case ctx.Bool(SepoliaFlag.Name):
22252192
genesis = core.DefaultSepoliaGenesisBlock()
22262193
case ctx.Bool(RinkebyFlag.Name):

core/blockchain_test.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4049,7 +4049,14 @@ func TestCreateThenDeletePreByzantium(t *testing.T) {
40494049
// We use Ropsten chain config instead of Testchain config, this is
40504050
// deliberate: we want to use pre-byz rules where we have intermediate state roots
40514051
// between transactions.
4052-
testCreateThenDelete(t, params.RopstenChainConfig)
4052+
testCreateThenDelete(t, &params.ChainConfig{
4053+
ChainID: big.NewInt(3),
4054+
HomesteadBlock: big.NewInt(0),
4055+
EIP150Block: big.NewInt(0),
4056+
EIP155Block: big.NewInt(10),
4057+
EIP158Block: big.NewInt(10),
4058+
ByzantiumBlock: big.NewInt(1_700_000),
4059+
})
40534060
}
40544061
func TestCreateThenDeletePostByzantium(t *testing.T) {
40554062
testCreateThenDelete(t, params.TestChainConfig)

0 commit comments

Comments
 (0)