Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
c7c84ca1
Unverified
Commit
c7c84ca1
authored
Jun 02, 2023
by
Péter Szilágyi
Committed by
GitHub
Jun 02, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
all: remove the Rinkeby testnet (#27406)
parent
15bd21f3
Changes
22
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
23 additions
and
1013 deletions
+23
-1013
README.md
README.md
+0
-9
README.md
cmd/clef/README.md
+1
-1
main.go
cmd/clef/main.go
+1
-1
README.md
cmd/devp2p/README.md
+1
-1
discv4cmd.go
cmd/devp2p/discv4cmd.go
+1
-1
nodesetcmd.go
cmd/devp2p/nodesetcmd.go
+0
-2
README.md
cmd/faucet/README.md
+0
-1
faucet.go
cmd/faucet/faucet.go
+2
-5
main.go
cmd/geth/main.go
+0
-4
flags.go
cmd/utils/flags.go
+2
-33
clique_test.go
consensus/clique/clique_test.go
+1
-1
forkid_test.go
core/forkid/forkid_test.go
+0
-24
genesis.go
core/genesis.go
+0
-16
genesis_alloc.go
core/genesis_alloc.go
+0
-866
genesis_test.go
core/genesis_test.go
+0
-1
accessors_indexes_test.go
core/rawdb/accessors_indexes_test.go
+8
-8
pruner.go
core/state/pruner/pruner.go
+1
-1
handler.go
eth/protocols/eth/handler.go
+1
-1
commons.go
les/commons.go
+1
-1
main.go
miner/stress/clique/main.go
+3
-3
bootnodes.go
params/bootnodes.go
+0
-9
config.go
params/config.go
+0
-24
No files found.
README.md
View file @
c7c84ca1
...
...
@@ -123,15 +123,6 @@ use separate accounts for play and real money. Unless you manually move
accounts,
`geth`
will by default correctly separate the two networks and will not make any
accounts available between them.
*
### Full node on the Rinkeby test network
Go Ethereum also supports connecting to the older proof-of-authority based test network
called
[
*Rinkeby*
](
https://www.rinkeby.io
)
which is operated by members of the community.
```
shell
$
geth
--rinkeby
console
```
### Configuration
As an alternative to passing the numerous flags to the
`geth`
binary, you can also pass a
...
...
cmd/clef/README.md
View file @
c7c84ca1
...
...
@@ -29,7 +29,7 @@ GLOBAL OPTIONS:
--loglevel value log level to emit to the screen (default: 4)
--keystore value Directory for the keystore (default: "$HOME/.ethereum/keystore")
--configdir value Directory for Clef configuration (default: "$HOME/.clef")
--chainid value Chain id to use for signing (1=mainnet,
4=Rinkeby,
5=Goerli) (default: 1)
--chainid value Chain id to use for signing (1=mainnet, 5=Goerli) (default: 1)
--lightkdf Reduce key-derivation RAM & CPU usage at some expense of KDF strength
--nousb Disables monitoring for and managing USB hardware wallets
--pcscdpath value Path to the smartcard daemon (pcscd) socket file (default: "/run/pcscd/pcscd.comm")
...
...
cmd/clef/main.go
View file @
c7c84ca1
...
...
@@ -99,7 +99,7 @@ var (
chainIdFlag
=
&
cli
.
Int64Flag
{
Name
:
"chainid"
,
Value
:
params
.
MainnetChainConfig
.
ChainID
.
Int64
(),
Usage
:
"Chain id to use for signing (1=mainnet,
4=Rinkeby,
5=Goerli)"
,
Usage
:
"Chain id to use for signing (1=mainnet, 5=Goerli)"
,
}
rpcPortFlag
=
&
cli
.
IntFlag
{
Name
:
"http.port"
,
...
...
cmd/devp2p/README.md
View file @
c7c84ca1
...
...
@@ -44,7 +44,7 @@ set to standard output. The following filters are supported:
-
`-limit <N>`
limits the output set to N entries, taking the top N nodes by score
-
`-ip <CIDR>`
filters nodes by IP subnet
-
`-min-age <duration>`
filters nodes by 'first seen' time
-
`-eth-network <mainnet/
rinkeby/
goerli/sepolia>`
filters nodes by "eth" ENR entry
-
`-eth-network <mainnet/goerli/sepolia>`
filters nodes by "eth" ENR entry
-
`-les-server`
filters nodes by LES server support
-
`-snap`
filters nodes by snap protocol support
...
...
cmd/devp2p/discv4cmd.go
View file @
c7c84ca1
...
...
@@ -337,7 +337,7 @@ func listen(ctx *cli.Context, ln *enode.LocalNode) *net.UDPConn {
}
func
parseBootnodes
(
ctx
*
cli
.
Context
)
([]
*
enode
.
Node
,
error
)
{
s
:=
params
.
Rinkeby
Bootnodes
s
:=
params
.
Mainnet
Bootnodes
if
ctx
.
IsSet
(
bootnodesFlag
.
Name
)
{
input
:=
ctx
.
String
(
bootnodesFlag
.
Name
)
if
input
==
""
{
...
...
cmd/devp2p/nodesetcmd.go
View file @
c7c84ca1
...
...
@@ -229,8 +229,6 @@ func ethFilter(args []string) (nodeFilter, error) {
switch
args
[
0
]
{
case
"mainnet"
:
filter
=
forkid
.
NewStaticFilter
(
params
.
MainnetChainConfig
,
params
.
MainnetGenesisHash
)
case
"rinkeby"
:
filter
=
forkid
.
NewStaticFilter
(
params
.
RinkebyChainConfig
,
params
.
RinkebyGenesisHash
)
case
"goerli"
:
filter
=
forkid
.
NewStaticFilter
(
params
.
GoerliChainConfig
,
params
.
GoerliGenesisHash
)
case
"sepolia"
:
...
...
cmd/faucet/README.md
View file @
c7c84ca1
...
...
@@ -12,7 +12,6 @@ First things first, the `faucet` needs to connect to an Ethereum network, for wh
-
`-genesis`
is a path to a file containing the network
`genesis.json`
. or using:
-
`-goerli`
with the faucet with Görli network config
-
`-rinkeby`
with the faucet with Rinkeby network config
-
`-sepolia`
with the faucet with Sepolia network config
-
`-network`
is the devp2p network id used during connection
-
`-bootnodes`
is a list of
`enode://`
ids to join the network through
...
...
cmd/faucet/faucet.go
View file @
c7c84ca1
...
...
@@ -86,7 +86,6 @@ var (
twitterTokenV1Flag
=
flag
.
String
(
"twitter.token.v1"
,
""
,
"Bearer token to authenticate with the v1.1 Twitter API"
)
goerliFlag
=
flag
.
Bool
(
"goerli"
,
false
,
"Initializes the faucet with Görli network config"
)
rinkebyFlag
=
flag
.
Bool
(
"rinkeby"
,
false
,
"Initializes the faucet with Rinkeby network config"
)
sepoliaFlag
=
flag
.
Bool
(
"sepolia"
,
false
,
"Initializes the faucet with Sepolia network config"
)
)
...
...
@@ -140,7 +139,7 @@ func main() {
log
.
Crit
(
"Failed to render the faucet template"
,
"err"
,
err
)
}
// Load and parse the genesis block requested by the user
genesis
,
err
:=
getGenesis
(
*
genesisFlag
,
*
goerliFlag
,
*
rinkebyFlag
,
*
sepoliaFlag
)
genesis
,
err
:=
getGenesis
(
*
genesisFlag
,
*
goerliFlag
,
*
sepoliaFlag
)
if
err
!=
nil
{
log
.
Crit
(
"Failed to parse genesis config"
,
"err"
,
err
)
}
...
...
@@ -880,7 +879,7 @@ func authNoAuth(url string) (string, string, common.Address, error) {
}
// getGenesis returns a genesis based on input args
func
getGenesis
(
genesisFlag
string
,
goerliFlag
bool
,
rinkebyFlag
bool
,
sepoliaFlag
bool
)
(
*
core
.
Genesis
,
error
)
{
func
getGenesis
(
genesisFlag
string
,
goerliFlag
bool
,
sepoliaFlag
bool
)
(
*
core
.
Genesis
,
error
)
{
switch
{
case
genesisFlag
!=
""
:
var
genesis
core
.
Genesis
...
...
@@ -888,8 +887,6 @@ func getGenesis(genesisFlag string, goerliFlag bool, rinkebyFlag bool, sepoliaFl
return
&
genesis
,
err
case
goerliFlag
:
return
core
.
DefaultGoerliGenesisBlock
(),
nil
case
rinkebyFlag
:
return
core
.
DefaultRinkebyGenesisBlock
(),
nil
case
sepoliaFlag
:
return
core
.
DefaultSepoliaGenesisBlock
(),
nil
default
:
...
...
cmd/geth/main.go
View file @
c7c84ca1
...
...
@@ -259,9 +259,6 @@ func main() {
func
prepare
(
ctx
*
cli
.
Context
)
{
// If we're running a known preset, log it for convenience.
switch
{
case
ctx
.
IsSet
(
utils
.
RinkebyFlag
.
Name
)
:
log
.
Info
(
"Starting Geth on Rinkeby testnet..."
)
case
ctx
.
IsSet
(
utils
.
GoerliFlag
.
Name
)
:
log
.
Info
(
"Starting Geth on Görli testnet..."
)
...
...
@@ -293,7 +290,6 @@ func prepare(ctx *cli.Context) {
if
ctx
.
String
(
utils
.
SyncModeFlag
.
Name
)
!=
"light"
&&
!
ctx
.
IsSet
(
utils
.
CacheFlag
.
Name
)
&&
!
ctx
.
IsSet
(
utils
.
NetworkIdFlag
.
Name
)
{
// Make sure we're not on any supported preconfigured testnet either
if
!
ctx
.
IsSet
(
utils
.
SepoliaFlag
.
Name
)
&&
!
ctx
.
IsSet
(
utils
.
RinkebyFlag
.
Name
)
&&
!
ctx
.
IsSet
(
utils
.
GoerliFlag
.
Name
)
&&
!
ctx
.
IsSet
(
utils
.
DeveloperFlag
.
Name
)
{
// Nope, we're really on mainnet. Bump that cache up!
...
...
cmd/utils/flags.go
View file @
c7c84ca1
...
...
@@ -133,7 +133,7 @@ var (
}
NetworkIdFlag
=
&
cli
.
Uint64Flag
{
Name
:
"networkid"
,
Usage
:
"Explicitly set network id (integer)(For testnets: use --
rinkeby, --
goerli, --sepolia instead)"
,
Usage
:
"Explicitly set network id (integer)(For testnets: use --goerli, --sepolia instead)"
,
Value
:
ethconfig
.
Defaults
.
NetworkId
,
Category
:
flags
.
EthCategory
,
}
...
...
@@ -142,11 +142,6 @@ var (
Usage
:
"Ethereum mainnet"
,
Category
:
flags
.
EthCategory
,
}
RinkebyFlag
=
&
cli
.
BoolFlag
{
Name
:
"rinkeby"
,
Usage
:
"Rinkeby network: pre-configured proof-of-authority test network"
,
Category
:
flags
.
EthCategory
,
}
GoerliFlag
=
&
cli
.
BoolFlag
{
Name
:
"goerli"
,
Usage
:
"Görli network: pre-configured proof-of-authority test network"
,
...
...
@@ -931,7 +926,6 @@ Please note that --` + MetricsHTTPFlag.Name + ` must be set to start the server.
var
(
// TestnetFlags is the flag group of all built-in supported testnets.
TestnetFlags
=
[]
cli
.
Flag
{
RinkebyFlag
,
GoerliFlag
,
SepoliaFlag
,
}
...
...
@@ -958,9 +952,6 @@ func init() {
// then a subdirectory of the specified datadir will be used.
func
MakeDataDir
(
ctx
*
cli
.
Context
)
string
{
if
path
:=
ctx
.
String
(
DataDirFlag
.
Name
);
path
!=
""
{
if
ctx
.
Bool
(
RinkebyFlag
.
Name
)
{
return
filepath
.
Join
(
path
,
"rinkeby"
)
}
if
ctx
.
Bool
(
GoerliFlag
.
Name
)
{
return
filepath
.
Join
(
path
,
"goerli"
)
}
...
...
@@ -1015,8 +1006,6 @@ func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) {
urls
=
SplitAndTrim
(
ctx
.
String
(
BootnodesFlag
.
Name
))
case
ctx
.
Bool
(
SepoliaFlag
.
Name
)
:
urls
=
params
.
SepoliaBootnodes
case
ctx
.
Bool
(
RinkebyFlag
.
Name
)
:
urls
=
params
.
RinkebyBootnodes
case
ctx
.
Bool
(
GoerliFlag
.
Name
)
:
urls
=
params
.
GoerliBootnodes
}
...
...
@@ -1464,8 +1453,6 @@ func SetDataDir(ctx *cli.Context, cfg *node.Config) {
cfg
.
DataDir
=
ctx
.
String
(
DataDirFlag
.
Name
)
case
ctx
.
Bool
(
DeveloperFlag
.
Name
)
:
cfg
.
DataDir
=
""
// unless explicitly requested, use memory databases
case
ctx
.
Bool
(
RinkebyFlag
.
Name
)
&&
cfg
.
DataDir
==
node
.
DefaultDataDir
()
:
cfg
.
DataDir
=
filepath
.
Join
(
node
.
DefaultDataDir
(),
"rinkeby"
)
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
()
:
...
...
@@ -1626,7 +1613,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
,
RinkebyFlag
,
GoerliFlag
,
SepoliaFlag
)
CheckExclusive
(
ctx
,
MainnetFlag
,
DeveloperFlag
,
GoerliFlag
,
SepoliaFlag
)
CheckExclusive
(
ctx
,
LightServeFlag
,
SyncModeFlag
,
"light"
)
CheckExclusive
(
ctx
,
DeveloperFlag
,
ExternalSignerFlag
)
// Can't use both ephemeral unlocked and external signer
if
ctx
.
String
(
GCModeFlag
.
Name
)
==
"archive"
&&
ctx
.
Uint64
(
TxLookupLimitFlag
.
Name
)
!=
0
{
...
...
@@ -1768,22 +1755,6 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
}
cfg
.
Genesis
=
core
.
DefaultSepoliaGenesisBlock
()
SetDNSDiscoveryDefaults
(
cfg
,
params
.
SepoliaGenesisHash
)
case
ctx
.
Bool
(
RinkebyFlag
.
Name
)
:
log
.
Warn
(
""
)
log
.
Warn
(
"--------------------------------------------------------------------------------"
)
log
.
Warn
(
"Please note, Rinkeby has been deprecated. It will still work for the time being,"
)
log
.
Warn
(
"but there will be no further hard-forks shipped for it."
)
log
.
Warn
(
"The network will be permanently halted in Q2/Q3 of 2023."
)
log
.
Warn
(
"For the most future proof testnet, choose Sepolia as"
)
log
.
Warn
(
"your replacement environment (--sepolia instead of --rinkeby)."
)
log
.
Warn
(
"--------------------------------------------------------------------------------"
)
log
.
Warn
(
""
)
if
!
ctx
.
IsSet
(
NetworkIdFlag
.
Name
)
{
cfg
.
NetworkId
=
4
}
cfg
.
Genesis
=
core
.
DefaultRinkebyGenesisBlock
()
SetDNSDiscoveryDefaults
(
cfg
,
params
.
RinkebyGenesisHash
)
case
ctx
.
Bool
(
GoerliFlag
.
Name
)
:
if
!
ctx
.
IsSet
(
NetworkIdFlag
.
Name
)
{
cfg
.
NetworkId
=
5
...
...
@@ -2114,8 +2085,6 @@ func MakeGenesis(ctx *cli.Context) *core.Genesis {
genesis
=
core
.
DefaultGenesisBlock
()
case
ctx
.
Bool
(
SepoliaFlag
.
Name
)
:
genesis
=
core
.
DefaultSepoliaGenesisBlock
()
case
ctx
.
Bool
(
RinkebyFlag
.
Name
)
:
genesis
=
core
.
DefaultRinkebyGenesisBlock
()
case
ctx
.
Bool
(
GoerliFlag
.
Name
)
:
genesis
=
core
.
DefaultGoerliGenesisBlock
()
case
ctx
.
Bool
(
DeveloperFlag
.
Name
)
:
...
...
consensus/clique/clique_test.go
View file @
c7c84ca1
...
...
@@ -30,7 +30,7 @@ import (
)
// This test case is a repro of an annoying bug that took us forever to catch.
// In Clique PoA networks (
Rinkeby,
Görli, etc), consecutive blocks might have
// In Clique PoA networks (Görli, etc), consecutive blocks might have
// the same state root (no block subsidy, empty block). If a node crashes, the
// chain ends up losing the recent state and needs to regenerate it from blocks
// already in the database. The bug was that processing the block *prior* to an
...
...
core/forkid/forkid_test.go
View file @
c7c84ca1
...
...
@@ -74,30 +74,6 @@ func TestCreation(t *testing.T) {
{
30000000
,
2000000000
,
ID
{
Hash
:
checksumToBytes
(
0xdce96c2d
),
Next
:
0
}},
// Future Shanghai block
},
},
// Rinkeby test cases
{
params
.
RinkebyChainConfig
,
params
.
RinkebyGenesisHash
,
[]
testcase
{
{
0
,
0
,
ID
{
Hash
:
checksumToBytes
(
0x3b8e0691
),
Next
:
1
}},
// Unsynced, last Frontier block
{
1
,
0
,
ID
{
Hash
:
checksumToBytes
(
0x60949295
),
Next
:
2
}},
// First and last Homestead block
{
2
,
0
,
ID
{
Hash
:
checksumToBytes
(
0x8bde40dd
),
Next
:
3
}},
// First and last Tangerine block
{
3
,
0
,
ID
{
Hash
:
checksumToBytes
(
0xcb3a64bb
),
Next
:
1035301
}},
// First Spurious block
{
1035300
,
0
,
ID
{
Hash
:
checksumToBytes
(
0xcb3a64bb
),
Next
:
1035301
}},
// Last Spurious block
{
1035301
,
0
,
ID
{
Hash
:
checksumToBytes
(
0x8d748b57
),
Next
:
3660663
}},
// First Byzantium block
{
3660662
,
0
,
ID
{
Hash
:
checksumToBytes
(
0x8d748b57
),
Next
:
3660663
}},
// Last Byzantium block
{
3660663
,
0
,
ID
{
Hash
:
checksumToBytes
(
0xe49cab14
),
Next
:
4321234
}},
// First Constantinople block
{
4321233
,
0
,
ID
{
Hash
:
checksumToBytes
(
0xe49cab14
),
Next
:
4321234
}},
// Last Constantinople block
{
4321234
,
0
,
ID
{
Hash
:
checksumToBytes
(
0xafec6b27
),
Next
:
5435345
}},
// First Petersburg block
{
5435344
,
0
,
ID
{
Hash
:
checksumToBytes
(
0xafec6b27
),
Next
:
5435345
}},
// Last Petersburg block
{
5435345
,
0
,
ID
{
Hash
:
checksumToBytes
(
0xcbdb8838
),
Next
:
8290928
}},
// First Istanbul block
{
8290927
,
0
,
ID
{
Hash
:
checksumToBytes
(
0xcbdb8838
),
Next
:
8290928
}},
// Last Istanbul block
{
8290928
,
0
,
ID
{
Hash
:
checksumToBytes
(
0x6910c8bd
),
Next
:
8897988
}},
// First Berlin block
{
8897987
,
0
,
ID
{
Hash
:
checksumToBytes
(
0x6910c8bd
),
Next
:
8897988
}},
// Last Berlin block
{
8897988
,
0
,
ID
{
Hash
:
checksumToBytes
(
0x8E29F2F3
),
Next
:
0
}},
// First London block
{
10000000
,
0
,
ID
{
Hash
:
checksumToBytes
(
0x8E29F2F3
),
Next
:
0
}},
// Future London block
},
},
// Goerli test cases
{
params
.
GoerliChainConfig
,
...
...
core/genesis.go
View file @
c7c84ca1
...
...
@@ -189,8 +189,6 @@ func CommitGenesisState(db ethdb.Database, triedb *trie.Database, blockhash comm
switch
blockhash
{
case
params
.
MainnetGenesisHash
:
genesis
=
DefaultGenesisBlock
()
case
params
.
RinkebyGenesisHash
:
genesis
=
DefaultRinkebyGenesisBlock
()
case
params
.
GoerliGenesisHash
:
genesis
=
DefaultGoerliGenesisBlock
()
case
params
.
SepoliaGenesisHash
:
...
...
@@ -420,8 +418,6 @@ func (g *Genesis) configOrDefault(ghash common.Hash) *params.ChainConfig {
return
params
.
MainnetChainConfig
case
ghash
==
params
.
SepoliaGenesisHash
:
return
params
.
SepoliaChainConfig
case
ghash
==
params
.
RinkebyGenesisHash
:
return
params
.
RinkebyChainConfig
case
ghash
==
params
.
GoerliGenesisHash
:
return
params
.
GoerliChainConfig
default
:
...
...
@@ -528,18 +524,6 @@ func DefaultGenesisBlock() *Genesis {
}
}
// DefaultRinkebyGenesisBlock returns the Rinkeby network genesis block.
func
DefaultRinkebyGenesisBlock
()
*
Genesis
{
return
&
Genesis
{
Config
:
params
.
RinkebyChainConfig
,
Timestamp
:
1492009146
,
ExtraData
:
hexutil
.
MustDecode
(
"0x52657370656374206d7920617574686f7269746168207e452e436172746d616e42eb768f2244c8811c63729a21a3569731535f067ffc57839b00206d1ad20c69a1981b489f772031b279182d99e65703f0076e4812653aab85fca0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
),
GasLimit
:
4700000
,
Difficulty
:
big
.
NewInt
(
1
),
Alloc
:
decodePrealloc
(
rinkebyAllocData
),
}
}
// DefaultGoerliGenesisBlock returns the Görli network genesis block.
func
DefaultGoerliGenesisBlock
()
*
Genesis
{
return
&
Genesis
{
...
...
core/genesis_alloc.go
View file @
c7c84ca1
This diff is collapsed.
Click to expand it.
core/genesis_test.go
View file @
c7c84ca1
...
...
@@ -172,7 +172,6 @@ func TestGenesisHashes(t *testing.T) {
}{
{
DefaultGenesisBlock
(),
params
.
MainnetGenesisHash
},
{
DefaultGoerliGenesisBlock
(),
params
.
GoerliGenesisHash
},
{
DefaultRinkebyGenesisBlock
(),
params
.
RinkebyGenesisHash
},
{
DefaultSepoliaGenesisBlock
(),
params
.
SepoliaGenesisHash
},
}
{
// Test via MustCommit
...
...
core/rawdb/accessors_indexes_test.go
View file @
c7c84ca1
...
...
@@ -142,7 +142,7 @@ func TestDeleteBloomBits(t *testing.T) {
for
i
:=
uint
(
0
);
i
<
2
;
i
++
{
for
s
:=
uint64
(
0
);
s
<
2
;
s
++
{
WriteBloomBits
(
db
,
i
,
s
,
params
.
MainnetGenesisHash
,
[]
byte
{
0x01
,
0x02
})
WriteBloomBits
(
db
,
i
,
s
,
params
.
Rinkeby
GenesisHash
,
[]
byte
{
0x01
,
0x02
})
WriteBloomBits
(
db
,
i
,
s
,
params
.
Sepolia
GenesisHash
,
[]
byte
{
0x01
,
0x02
})
}
}
check
:=
func
(
bit
uint
,
section
uint64
,
head
common
.
Hash
,
exist
bool
)
{
...
...
@@ -156,25 +156,25 @@ func TestDeleteBloomBits(t *testing.T) {
}
// Check the existence of written data.
check
(
0
,
0
,
params
.
MainnetGenesisHash
,
true
)
check
(
0
,
0
,
params
.
Rinkeby
GenesisHash
,
true
)
check
(
0
,
0
,
params
.
Sepolia
GenesisHash
,
true
)
// Check the existence of deleted data.
DeleteBloombits
(
db
,
0
,
0
,
1
)
check
(
0
,
0
,
params
.
MainnetGenesisHash
,
false
)
check
(
0
,
0
,
params
.
Rinkeby
GenesisHash
,
false
)
check
(
0
,
0
,
params
.
Sepolia
GenesisHash
,
false
)
check
(
0
,
1
,
params
.
MainnetGenesisHash
,
true
)
check
(
0
,
1
,
params
.
Rinkeby
GenesisHash
,
true
)
check
(
0
,
1
,
params
.
Sepolia
GenesisHash
,
true
)
// Check the existence of deleted data.
DeleteBloombits
(
db
,
0
,
0
,
2
)
check
(
0
,
0
,
params
.
MainnetGenesisHash
,
false
)
check
(
0
,
0
,
params
.
Rinkeby
GenesisHash
,
false
)
check
(
0
,
0
,
params
.
Sepolia
GenesisHash
,
false
)
check
(
0
,
1
,
params
.
MainnetGenesisHash
,
false
)
check
(
0
,
1
,
params
.
Rinkeby
GenesisHash
,
false
)
check
(
0
,
1
,
params
.
Sepolia
GenesisHash
,
false
)
// Bit1 shouldn't be affect.
check
(
1
,
0
,
params
.
MainnetGenesisHash
,
true
)
check
(
1
,
0
,
params
.
Rinkeby
GenesisHash
,
true
)
check
(
1
,
0
,
params
.
Sepolia
GenesisHash
,
true
)
check
(
1
,
1
,
params
.
MainnetGenesisHash
,
true
)
check
(
1
,
1
,
params
.
Rinkeby
GenesisHash
,
true
)
check
(
1
,
1
,
params
.
Sepolia
GenesisHash
,
true
)
}
core/state/pruner/pruner.go
View file @
c7c84ca1
...
...
@@ -266,7 +266,7 @@ func (p *Pruner) Prune(root common.Hash) error {
// is the presence of root can indicate the presence of the
// entire trie.
if
!
rawdb
.
HasLegacyTrieNode
(
p
.
db
,
root
)
{
// The special case is for clique based networks(
rinkeby,
goerli
// The special case is for clique based networks(goerli
// and some other private networks), it's possible that two
// consecutive blocks will have same root. In this case snapshot
// difflayer won't be created. So HEAD-127 may not paired with
...
...
eth/protocols/eth/handler.go
View file @
c7c84ca1
...
...
@@ -127,7 +127,7 @@ func MakeProtocols(backend Backend, network uint64, dnsdisc enode.Iterator) []p2
// NodeInfo represents a short summary of the `eth` sub-protocol metadata
// known about the host peer.
type
NodeInfo
struct
{
Network
uint64
`json:"network"`
// Ethereum network ID (1=Mainnet,
Rinkeby=4,
Goerli=5)
Network
uint64
`json:"network"`
// Ethereum network ID (1=Mainnet, Goerli=5)
Difficulty
*
big
.
Int
`json:"difficulty"`
// Total difficulty of the host's blockchain
Genesis
common
.
Hash
`json:"genesis"`
// SHA3 hash of the host's genesis block
Config
*
params
.
ChainConfig
`json:"config"`
// Chain configuration for the fork rules
...
...
les/commons.go
View file @
c7c84ca1
...
...
@@ -58,7 +58,7 @@ type lesCommons struct {
// NodeInfo represents a short summary of the Ethereum sub-protocol metadata
// known about the host peer.
type
NodeInfo
struct
{
Network
uint64
`json:"network"`
// Ethereum network ID (1=Mainnet,
Rinkeby=4,
Goerli=5)
Network
uint64
`json:"network"`
// Ethereum network ID (1=Mainnet, Goerli=5)
Difficulty
*
big
.
Int
`json:"difficulty"`
// Total difficulty of the host's blockchain
Genesis
common
.
Hash
`json:"genesis"`
// SHA3 hash of the host's genesis block
Config
*
params
.
ChainConfig
`json:"config"`
// Chain configuration for the fork rules
...
...
miner/stress/clique/main.go
View file @
c7c84ca1
...
...
@@ -57,7 +57,7 @@ func main() {
for
i
:=
0
;
i
<
len
(
sealers
);
i
++
{
sealers
[
i
],
_
=
crypto
.
GenerateKey
()
}
// Create a Clique network based off of the
Rinkeby
config
// Create a Clique network based off of the
Sepolia
config
genesis
:=
makeGenesis
(
faucets
,
sealers
)
// Handle interrupts.
...
...
@@ -147,8 +147,8 @@ func main() {
// makeGenesis creates a custom Clique genesis block based on some pre-defined
// signer and faucet accounts.
func
makeGenesis
(
faucets
[]
*
ecdsa
.
PrivateKey
,
sealers
[]
*
ecdsa
.
PrivateKey
)
*
core
.
Genesis
{
// Create a Clique network based off of the
Rinkeby
config
genesis
:=
core
.
Default
Rinkeby
GenesisBlock
()
// Create a Clique network based off of the
Seplia
config
genesis
:=
core
.
Default
Sepolia
GenesisBlock
()
genesis
.
GasLimit
=
25000000
genesis
.
Config
.
ChainID
=
big
.
NewInt
(
18
)
...
...
params/bootnodes.go
View file @
c7c84ca1
...
...
@@ -39,13 +39,6 @@ var SepoliaBootnodes = []string{
"enode://9e9492e2e8836114cc75f5b929784f4f46c324ad01daf87d956f98b3b6c5fcba95524d6e5cf9861dc96a2c8a171ea7105bb554a197455058de185fa870970c7c@138.68.123.152:30303"
,
// sepolia-bootnode-1-ams3
}
// RinkebyBootnodes are the enode URLs of the P2P bootstrap nodes running on the
// Rinkeby test network.
var
RinkebyBootnodes
=
[]
string
{
"enode://a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf@52.169.42.101:30303"
,
// IE
"enode://b6b28890b006743680c52e64e0d16db57f28124885595fa03a562be1d2bf0f3a1da297d56b13da25fb992888fd556d4c1a27b1f39d531bde7de1921c90061cc6@159.89.28.211:30303"
,
// AKASHA
}
// GoerliBootnodes are the enode URLs of the P2P bootstrap nodes running on the
// Görli test network.
var
GoerliBootnodes
=
[]
string
{
...
...
@@ -91,8 +84,6 @@ func KnownDNSNetwork(genesis common.Hash, protocol string) string {
switch
genesis
{
case
MainnetGenesisHash
:
net
=
"mainnet"
case
RinkebyGenesisHash
:
net
=
"rinkeby"
case
GoerliGenesisHash
:
net
=
"goerli"
case
SepoliaGenesisHash
:
...
...
params/config.go
View file @
c7c84ca1
...
...
@@ -27,7 +27,6 @@ import (
var
(
MainnetGenesisHash
=
common
.
HexToHash
(
"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3"
)
SepoliaGenesisHash
=
common
.
HexToHash
(
"0x25a5cc106eea7138acab33231d7160d69cb777ee0c2c553fcddf5138993e6dd9"
)
RinkebyGenesisHash
=
common
.
HexToHash
(
"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177"
)
GoerliGenesisHash
=
common
.
HexToHash
(
"0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a"
)
)
...
...
@@ -81,28 +80,6 @@ var (
ShanghaiTime
:
newUint64
(
1677557088
),
Ethash
:
new
(
EthashConfig
),
}
// RinkebyChainConfig contains the chain parameters to run a node on the Rinkeby test network.
RinkebyChainConfig
=
&
ChainConfig
{
ChainID
:
big
.
NewInt
(
4
),
HomesteadBlock
:
big
.
NewInt
(
1
),
DAOForkBlock
:
nil
,
DAOForkSupport
:
true
,
EIP150Block
:
big
.
NewInt
(
2
),
EIP155Block
:
big
.
NewInt
(
3
),
EIP158Block
:
big
.
NewInt
(
3
),
ByzantiumBlock
:
big
.
NewInt
(
1
_035_301
),
ConstantinopleBlock
:
big
.
NewInt
(
3
_660_663
),
PetersburgBlock
:
big
.
NewInt
(
4
_321_234
),
IstanbulBlock
:
big
.
NewInt
(
5
_435_345
),
MuirGlacierBlock
:
nil
,
BerlinBlock
:
big
.
NewInt
(
8
_290_928
),
LondonBlock
:
big
.
NewInt
(
8
_897_988
),
ArrowGlacierBlock
:
nil
,
Clique
:
&
CliqueConfig
{
Period
:
15
,
Epoch
:
30000
,
},
}
// GoerliChainConfig contains the chain parameters to run a node on the Görli test network.
GoerliChainConfig
=
&
ChainConfig
{
ChainID
:
big
.
NewInt
(
5
),
...
...
@@ -249,7 +226,6 @@ var (
// NetworkNames are user friendly names to use in the chain spec banner.
var
NetworkNames
=
map
[
string
]
string
{
MainnetChainConfig
.
ChainID
.
String
()
:
"mainnet"
,
RinkebyChainConfig
.
ChainID
.
String
()
:
"rinkeby"
,
GoerliChainConfig
.
ChainID
.
String
()
:
"goerli"
,
SepoliaChainConfig
.
ChainID
.
String
()
:
"sepolia"
,
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment