Skip to content

Commit 087ed9c

Browse files
authored
params, core/forkid: add london testnet blocks (ethereum#23041)
* params: add london testnet blocks * core/forkid: update fork hashes
1 parent 7530803 commit 087ed9c

File tree

2 files changed

+29
-20
lines changed

2 files changed

+29
-20
lines changed

core/forkid/forkid_test.go

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -70,22 +70,24 @@ func TestCreation(t *testing.T) {
7070
params.RopstenChainConfig,
7171
params.RopstenGenesisHash,
7272
[]testcase{
73-
{0, ID{Hash: checksumToBytes(0x30c7ddbc), Next: 10}}, // Unsynced, last Frontier, Homestead and first Tangerine block
74-
{9, ID{Hash: checksumToBytes(0x30c7ddbc), Next: 10}}, // Last Tangerine block
75-
{10, ID{Hash: checksumToBytes(0x63760190), Next: 1700000}}, // First Spurious block
76-
{1699999, ID{Hash: checksumToBytes(0x63760190), Next: 1700000}}, // Last Spurious block
77-
{1700000, ID{Hash: checksumToBytes(0x3ea159c7), Next: 4230000}}, // First Byzantium block
78-
{4229999, ID{Hash: checksumToBytes(0x3ea159c7), Next: 4230000}}, // Last Byzantium block
79-
{4230000, ID{Hash: checksumToBytes(0x97b544f3), Next: 4939394}}, // First Constantinople block
80-
{4939393, ID{Hash: checksumToBytes(0x97b544f3), Next: 4939394}}, // Last Constantinople block
81-
{4939394, ID{Hash: checksumToBytes(0xd6e2149b), Next: 6485846}}, // First Petersburg block
82-
{6485845, ID{Hash: checksumToBytes(0xd6e2149b), Next: 6485846}}, // Last Petersburg block
83-
{6485846, ID{Hash: checksumToBytes(0x4bc66396), Next: 7117117}}, // First Istanbul block
84-
{7117116, ID{Hash: checksumToBytes(0x4bc66396), Next: 7117117}}, // Last Istanbul block
85-
{7117117, ID{Hash: checksumToBytes(0x6727ef90), Next: 9812189}}, // First Muir Glacier block
86-
{9812188, ID{Hash: checksumToBytes(0x6727ef90), Next: 9812189}}, // Last Muir Glacier block
87-
{9812189, ID{Hash: checksumToBytes(0xa157d377), Next: 0}}, // First Berlin block
88-
{10000000, ID{Hash: checksumToBytes(0xa157d377), Next: 0}}, // Future Berlin block
73+
{0, ID{Hash: checksumToBytes(0x30c7ddbc), Next: 10}}, // Unsynced, last Frontier, Homestead and first Tangerine block
74+
{9, ID{Hash: checksumToBytes(0x30c7ddbc), Next: 10}}, // Last Tangerine block
75+
{10, ID{Hash: checksumToBytes(0x63760190), Next: 1700000}}, // First Spurious block
76+
{1699999, ID{Hash: checksumToBytes(0x63760190), Next: 1700000}}, // Last Spurious block
77+
{1700000, ID{Hash: checksumToBytes(0x3ea159c7), Next: 4230000}}, // First Byzantium block
78+
{4229999, ID{Hash: checksumToBytes(0x3ea159c7), Next: 4230000}}, // Last Byzantium block
79+
{4230000, ID{Hash: checksumToBytes(0x97b544f3), Next: 4939394}}, // First Constantinople block
80+
{4939393, ID{Hash: checksumToBytes(0x97b544f3), Next: 4939394}}, // Last Constantinople block
81+
{4939394, ID{Hash: checksumToBytes(0xd6e2149b), Next: 6485846}}, // First Petersburg block
82+
{6485845, ID{Hash: checksumToBytes(0xd6e2149b), Next: 6485846}}, // Last Petersburg block
83+
{6485846, ID{Hash: checksumToBytes(0x4bc66396), Next: 7117117}}, // First Istanbul block
84+
{7117116, ID{Hash: checksumToBytes(0x4bc66396), Next: 7117117}}, // Last Istanbul block
85+
{7117117, ID{Hash: checksumToBytes(0x6727ef90), Next: 9812189}}, // First Muir Glacier block
86+
{9812188, ID{Hash: checksumToBytes(0x6727ef90), Next: 9812189}}, // Last Muir Glacier block
87+
{9812189, ID{Hash: checksumToBytes(0xa157d377), Next: 10499401}}, // First Berlin block
88+
{10499400, ID{Hash: checksumToBytes(0xa157d377), Next: 10499401}}, // Last Berlin block
89+
{10499401, ID{Hash: checksumToBytes(0x7119b6b3), Next: 0}}, // First London block
90+
{11000000, ID{Hash: checksumToBytes(0x7119b6b3), Next: 0}}, // Future London block
8991
},
9092
},
9193
// Rinkeby test cases
@@ -106,8 +108,10 @@ func TestCreation(t *testing.T) {
106108
{5435344, ID{Hash: checksumToBytes(0xafec6b27), Next: 5435345}}, // Last Petersburg block
107109
{5435345, ID{Hash: checksumToBytes(0xcbdb8838), Next: 8290928}}, // First Istanbul block
108110
{8290927, ID{Hash: checksumToBytes(0xcbdb8838), Next: 8290928}}, // Last Istanbul block
109-
{8290928, ID{Hash: checksumToBytes(0x6910c8bd), Next: 0}}, // First Berlin block
110-
{10000000, ID{Hash: checksumToBytes(0x6910c8bd), Next: 0}}, // Future Berlin block
111+
{8290928, ID{Hash: checksumToBytes(0x6910c8bd), Next: 8897988}}, // First Berlin block
112+
{8897987, ID{Hash: checksumToBytes(0x6910c8bd), Next: 8897988}}, // Last Berlin block
113+
{8897988, ID{Hash: checksumToBytes(0x8E29F2F3), Next: 0}}, // First London block
114+
{10000000, ID{Hash: checksumToBytes(0x8E29F2F3), Next: 0}}, // Future London block
111115
},
112116
},
113117
// Goerli test cases
@@ -119,8 +123,10 @@ func TestCreation(t *testing.T) {
119123
{1561650, ID{Hash: checksumToBytes(0xa3f5ab08), Next: 1561651}}, // Last Petersburg block
120124
{1561651, ID{Hash: checksumToBytes(0xc25efa5c), Next: 4460644}}, // First Istanbul block
121125
{4460643, ID{Hash: checksumToBytes(0xc25efa5c), Next: 4460644}}, // Last Istanbul block
122-
{4460644, ID{Hash: checksumToBytes(0x757a1c47), Next: 0}}, // First Berlin block
123-
{5000000, ID{Hash: checksumToBytes(0x757a1c47), Next: 0}}, // Future Berlin block
126+
{4460644, ID{Hash: checksumToBytes(0x757a1c47), Next: 5062605}}, // First Berlin block
127+
{5000000, ID{Hash: checksumToBytes(0x757a1c47), Next: 5062605}}, // Last Berlin block
128+
{5062605, ID{Hash: checksumToBytes(0xB8C6299D), Next: 0}}, // First London block
129+
{6000000, ID{Hash: checksumToBytes(0xB8C6299D), Next: 0}}, // Future London block
124130
},
125131
},
126132
}

params/config.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ var (
109109
IstanbulBlock: big.NewInt(6_485_846),
110110
MuirGlacierBlock: big.NewInt(7_117_117),
111111
BerlinBlock: big.NewInt(9_812_189),
112+
LondonBlock: big.NewInt(10_499_401),
112113
Ethash: new(EthashConfig),
113114
}
114115

@@ -149,6 +150,7 @@ var (
149150
IstanbulBlock: big.NewInt(5_435_345),
150151
MuirGlacierBlock: nil,
151152
BerlinBlock: big.NewInt(8_290_928),
153+
LondonBlock: big.NewInt(8_897_988),
152154
Clique: &CliqueConfig{
153155
Period: 15,
154156
Epoch: 30000,
@@ -190,6 +192,7 @@ var (
190192
IstanbulBlock: big.NewInt(1_561_651),
191193
MuirGlacierBlock: nil,
192194
BerlinBlock: big.NewInt(4_460_644),
195+
LondonBlock: big.NewInt(5_062_605),
193196
Clique: &CliqueConfig{
194197
Period: 15,
195198
Epoch: 30000,

0 commit comments

Comments
 (0)