Skip to content
This repository was archived by the owner on May 21, 2024. It is now read-only.

Commit 15ab4d8

Browse files
holimanelizabethengelman
authored andcommitted
params, core/forkid: configure mainnet istanbul block 9069K (ethereum#20222)
* params: configure mainnet istanbul block 9069K * core/forkid: add some more test items for mainnet istanbul
1 parent f3f64f9 commit 15ab4d8

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

core/forkid/forkid_test.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@ func TestCreation(t *testing.T) {
5555
{4369999, ID{Hash: checksumToBytes(0x3edd5b10), Next: 4370000}}, // Last Spurious block
5656
{4370000, ID{Hash: checksumToBytes(0xa00bc324), Next: 7280000}}, // First Byzantium block
5757
{7279999, ID{Hash: checksumToBytes(0xa00bc324), Next: 7280000}}, // Last Byzantium block
58-
{7280000, ID{Hash: checksumToBytes(0x668db0af), Next: 0}}, // First and last Constantinople, first Petersburg block
59-
{7987396, ID{Hash: checksumToBytes(0x668db0af), Next: 0}}, // Today Petersburg block
58+
{7280000, ID{Hash: checksumToBytes(0x668db0af), Next: 9069000}}, // First and last Constantinople, first Petersburg block
59+
{9068999, ID{Hash: checksumToBytes(0x668db0af), Next: 9069000}}, // Last Petersburg block
60+
{9069000, ID{Hash: checksumToBytes(0x879d6e30), Next: 0}}, // Today Istanbul block
61+
{10000000, ID{Hash: checksumToBytes(0x879d6e30), Next: 0}}, // Future Istanbul block
6062
},
6163
},
6264
// Ropsten test cases
@@ -179,11 +181,11 @@ func TestValidation(t *testing.T) {
179181
// Local is mainnet Petersburg, remote is Rinkeby Petersburg.
180182
{7987396, ID{Hash: checksumToBytes(0xafec6b27), Next: 0}, ErrLocalIncompatibleOrStale},
181183

182-
// Local is mainnet Petersburg, far in the future. Remote announces Gopherium (non existing fork)
184+
// Local is mainnet Istanbul, far in the future. Remote announces Gopherium (non existing fork)
183185
// at some future block 88888888, for itself, but past block for local. Local is incompatible.
184186
//
185187
// This case detects non-upgraded nodes with majority hash power (typical Ropsten mess).
186-
{88888888, ID{Hash: checksumToBytes(0x668db0af), Next: 88888888}, ErrLocalIncompatibleOrStale},
188+
{88888888, ID{Hash: checksumToBytes(0x879d6e30), Next: 88888888}, ErrLocalIncompatibleOrStale},
187189

188190
// Local is mainnet Byzantium. Remote is also in Byzantium, but announces Gopherium (non existing
189191
// fork) at block 7279999, before Petersburg. Local is incompatible.

params/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ var (
6565
ByzantiumBlock: big.NewInt(4370000),
6666
ConstantinopleBlock: big.NewInt(7280000),
6767
PetersburgBlock: big.NewInt(7280000),
68-
IstanbulBlock: nil,
68+
IstanbulBlock: big.NewInt(9069000),
6969
Ethash: new(EthashConfig),
7070
}
7171

0 commit comments

Comments
 (0)