Skip to content

Commit

Permalink
params, core/forkid: add london testnet blocks (#23041)
Browse files Browse the repository at this point in the history
* params: add london testnet blocks

* core/forkid: update fork hashes
  • Loading branch information
holiman committed Jun 14, 2021
1 parent 7530803 commit 087ed9c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 20 deletions.
46 changes: 26 additions & 20 deletions core/forkid/forkid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,22 +70,24 @@ func TestCreation(t *testing.T) {
params.RopstenChainConfig,
params.RopstenGenesisHash,
[]testcase{
{0, ID{Hash: checksumToBytes(0x30c7ddbc), Next: 10}}, // Unsynced, last Frontier, Homestead and first Tangerine block
{9, ID{Hash: checksumToBytes(0x30c7ddbc), Next: 10}}, // Last Tangerine block
{10, ID{Hash: checksumToBytes(0x63760190), Next: 1700000}}, // First Spurious block
{1699999, ID{Hash: checksumToBytes(0x63760190), Next: 1700000}}, // Last Spurious block
{1700000, ID{Hash: checksumToBytes(0x3ea159c7), Next: 4230000}}, // First Byzantium block
{4229999, ID{Hash: checksumToBytes(0x3ea159c7), Next: 4230000}}, // Last Byzantium block
{4230000, ID{Hash: checksumToBytes(0x97b544f3), Next: 4939394}}, // First Constantinople block
{4939393, ID{Hash: checksumToBytes(0x97b544f3), Next: 4939394}}, // Last Constantinople block
{4939394, ID{Hash: checksumToBytes(0xd6e2149b), Next: 6485846}}, // First Petersburg block
{6485845, ID{Hash: checksumToBytes(0xd6e2149b), Next: 6485846}}, // Last Petersburg block
{6485846, ID{Hash: checksumToBytes(0x4bc66396), Next: 7117117}}, // First Istanbul block
{7117116, ID{Hash: checksumToBytes(0x4bc66396), Next: 7117117}}, // Last Istanbul block
{7117117, ID{Hash: checksumToBytes(0x6727ef90), Next: 9812189}}, // First Muir Glacier block
{9812188, ID{Hash: checksumToBytes(0x6727ef90), Next: 9812189}}, // Last Muir Glacier block
{9812189, ID{Hash: checksumToBytes(0xa157d377), Next: 0}}, // First Berlin block
{10000000, ID{Hash: checksumToBytes(0xa157d377), Next: 0}}, // Future Berlin block
{0, ID{Hash: checksumToBytes(0x30c7ddbc), Next: 10}}, // Unsynced, last Frontier, Homestead and first Tangerine block
{9, ID{Hash: checksumToBytes(0x30c7ddbc), Next: 10}}, // Last Tangerine block
{10, ID{Hash: checksumToBytes(0x63760190), Next: 1700000}}, // First Spurious block
{1699999, ID{Hash: checksumToBytes(0x63760190), Next: 1700000}}, // Last Spurious block
{1700000, ID{Hash: checksumToBytes(0x3ea159c7), Next: 4230000}}, // First Byzantium block
{4229999, ID{Hash: checksumToBytes(0x3ea159c7), Next: 4230000}}, // Last Byzantium block
{4230000, ID{Hash: checksumToBytes(0x97b544f3), Next: 4939394}}, // First Constantinople block
{4939393, ID{Hash: checksumToBytes(0x97b544f3), Next: 4939394}}, // Last Constantinople block
{4939394, ID{Hash: checksumToBytes(0xd6e2149b), Next: 6485846}}, // First Petersburg block
{6485845, ID{Hash: checksumToBytes(0xd6e2149b), Next: 6485846}}, // Last Petersburg block
{6485846, ID{Hash: checksumToBytes(0x4bc66396), Next: 7117117}}, // First Istanbul block
{7117116, ID{Hash: checksumToBytes(0x4bc66396), Next: 7117117}}, // Last Istanbul block
{7117117, ID{Hash: checksumToBytes(0x6727ef90), Next: 9812189}}, // First Muir Glacier block
{9812188, ID{Hash: checksumToBytes(0x6727ef90), Next: 9812189}}, // Last Muir Glacier block
{9812189, ID{Hash: checksumToBytes(0xa157d377), Next: 10499401}}, // First Berlin block
{10499400, ID{Hash: checksumToBytes(0xa157d377), Next: 10499401}}, // Last Berlin block
{10499401, ID{Hash: checksumToBytes(0x7119b6b3), Next: 0}}, // First London block
{11000000, ID{Hash: checksumToBytes(0x7119b6b3), Next: 0}}, // Future London block
},
},
// Rinkeby test cases
Expand All @@ -106,8 +108,10 @@ func TestCreation(t *testing.T) {
{5435344, ID{Hash: checksumToBytes(0xafec6b27), Next: 5435345}}, // Last Petersburg block
{5435345, ID{Hash: checksumToBytes(0xcbdb8838), Next: 8290928}}, // First Istanbul block
{8290927, ID{Hash: checksumToBytes(0xcbdb8838), Next: 8290928}}, // Last Istanbul block
{8290928, ID{Hash: checksumToBytes(0x6910c8bd), Next: 0}}, // First Berlin block
{10000000, ID{Hash: checksumToBytes(0x6910c8bd), Next: 0}}, // Future Berlin block
{8290928, ID{Hash: checksumToBytes(0x6910c8bd), Next: 8897988}}, // First Berlin block
{8897987, ID{Hash: checksumToBytes(0x6910c8bd), Next: 8897988}}, // Last Berlin block
{8897988, ID{Hash: checksumToBytes(0x8E29F2F3), Next: 0}}, // First London block
{10000000, ID{Hash: checksumToBytes(0x8E29F2F3), Next: 0}}, // Future London block
},
},
// Goerli test cases
Expand All @@ -119,8 +123,10 @@ func TestCreation(t *testing.T) {
{1561650, ID{Hash: checksumToBytes(0xa3f5ab08), Next: 1561651}}, // Last Petersburg block
{1561651, ID{Hash: checksumToBytes(0xc25efa5c), Next: 4460644}}, // First Istanbul block
{4460643, ID{Hash: checksumToBytes(0xc25efa5c), Next: 4460644}}, // Last Istanbul block
{4460644, ID{Hash: checksumToBytes(0x757a1c47), Next: 0}}, // First Berlin block
{5000000, ID{Hash: checksumToBytes(0x757a1c47), Next: 0}}, // Future Berlin block
{4460644, ID{Hash: checksumToBytes(0x757a1c47), Next: 5062605}}, // First Berlin block
{5000000, ID{Hash: checksumToBytes(0x757a1c47), Next: 5062605}}, // Last Berlin block
{5062605, ID{Hash: checksumToBytes(0xB8C6299D), Next: 0}}, // First London block
{6000000, ID{Hash: checksumToBytes(0xB8C6299D), Next: 0}}, // Future London block
},
},
}
Expand Down
3 changes: 3 additions & 0 deletions params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ var (
IstanbulBlock: big.NewInt(6_485_846),
MuirGlacierBlock: big.NewInt(7_117_117),
BerlinBlock: big.NewInt(9_812_189),
LondonBlock: big.NewInt(10_499_401),
Ethash: new(EthashConfig),
}

Expand Down Expand Up @@ -149,6 +150,7 @@ var (
IstanbulBlock: big.NewInt(5_435_345),
MuirGlacierBlock: nil,
BerlinBlock: big.NewInt(8_290_928),
LondonBlock: big.NewInt(8_897_988),
Clique: &CliqueConfig{
Period: 15,
Epoch: 30000,
Expand Down Expand Up @@ -190,6 +192,7 @@ var (
IstanbulBlock: big.NewInt(1_561_651),
MuirGlacierBlock: nil,
BerlinBlock: big.NewInt(4_460_644),
LondonBlock: big.NewInt(5_062_605),
Clique: &CliqueConfig{
Period: 15,
Epoch: 30000,
Expand Down

0 comments on commit 087ed9c

Please sign in to comment.