Skip to content

Commit a6a14f6

Browse files
authored
Merge pull request #20090 from soc1c/s1-testnet-istanbul
params: activate Istanbul on Ropsten, Rinkeby and Görli
2 parents 03c7d8f + f9eb307 commit a6a14f6

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

core/forkid/forkid_test.go

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,10 @@ func TestCreation(t *testing.T) {
7272
{4229999, ID{Hash: checksumToBytes(0x3ea159c7), Next: 4230000}}, // Last Byzantium block
7373
{4230000, ID{Hash: checksumToBytes(0x97b544f3), Next: 4939394}}, // First Constantinople block
7474
{4939393, ID{Hash: checksumToBytes(0x97b544f3), Next: 4939394}}, // Last Constantinople block
75-
{4939394, ID{Hash: checksumToBytes(0xd6e2149b), Next: 0}}, // First Petersburg block
76-
{5822692, ID{Hash: checksumToBytes(0xd6e2149b), Next: 0}}, // Today Petersburg block
75+
{4939394, ID{Hash: checksumToBytes(0xd6e2149b), Next: 6485846}}, // First Petersburg block
76+
{6485845, ID{Hash: checksumToBytes(0xd6e2149b), Next: 6485846}}, // Last Petersburg block
77+
{6485846, ID{Hash: checksumToBytes(0x4bc66396), Next: 0}}, // First Istanbul block
78+
{7500000, ID{Hash: checksumToBytes(0x4bc66396), Next: 0}}, // Future Istanbul block
7779
},
7880
},
7981
// Rinkeby test cases
@@ -90,17 +92,21 @@ func TestCreation(t *testing.T) {
9092
{3660662, ID{Hash: checksumToBytes(0x8d748b57), Next: 3660663}}, // Last Byzantium block
9193
{3660663, ID{Hash: checksumToBytes(0xe49cab14), Next: 4321234}}, // First Constantinople block
9294
{4321233, ID{Hash: checksumToBytes(0xe49cab14), Next: 4321234}}, // Last Constantinople block
93-
{4321234, ID{Hash: checksumToBytes(0xafec6b27), Next: 0}}, // First Petersburg block
94-
{4586649, ID{Hash: checksumToBytes(0xafec6b27), Next: 0}}, // Today Petersburg block
95+
{4321234, ID{Hash: checksumToBytes(0xafec6b27), Next: 5435345}}, // First Petersburg block
96+
{5435344, ID{Hash: checksumToBytes(0xafec6b27), Next: 5435345}}, // Last Petersburg block
97+
{5435345, ID{Hash: checksumToBytes(0xcbdb8838), Next: 0}}, // First Istanbul block
98+
{6000000, ID{Hash: checksumToBytes(0xcbdb8838), Next: 0}}, // Future Istanbul block
9599
},
96100
},
97101
// Goerli test cases
98102
{
99103
params.GoerliChainConfig,
100104
params.GoerliGenesisHash,
101105
[]testcase{
102-
{0, ID{Hash: checksumToBytes(0xa3f5ab08), Next: 0}}, // Unsynced, last Frontier, Homestead, Tangerine, Spurious, Byzantium, Constantinople and first Petersburg block
103-
{795329, ID{Hash: checksumToBytes(0xa3f5ab08), Next: 0}}, // Today Petersburg block
106+
{0, ID{Hash: checksumToBytes(0xa3f5ab08), Next: 1561651}}, // Unsynced, last Frontier, Homestead, Tangerine, Spurious, Byzantium, Constantinople and first Petersburg block
107+
{1561650, ID{Hash: checksumToBytes(0xa3f5ab08), Next: 1561651}}, // Last Petersburg block
108+
{1561651, ID{Hash: checksumToBytes(0xc25efa5c), Next: 0}}, // First Istanbul block
109+
{2000000, ID{Hash: checksumToBytes(0xc25efa5c), Next: 0}}, // Future Istanbul block
104110
},
105111
},
106112
}

params/config.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ var (
103103
ByzantiumBlock: big.NewInt(1700000),
104104
ConstantinopleBlock: big.NewInt(4230000),
105105
PetersburgBlock: big.NewInt(4939394),
106-
IstanbulBlock: nil,
106+
IstanbulBlock: big.NewInt(6485846),
107107
Ethash: new(EthashConfig),
108108
}
109109

@@ -141,7 +141,7 @@ var (
141141
ByzantiumBlock: big.NewInt(1035301),
142142
ConstantinopleBlock: big.NewInt(3660663),
143143
PetersburgBlock: big.NewInt(4321234),
144-
IstanbulBlock: nil,
144+
IstanbulBlock: big.NewInt(5435345),
145145
Clique: &CliqueConfig{
146146
Period: 15,
147147
Epoch: 30000,
@@ -180,7 +180,7 @@ var (
180180
ByzantiumBlock: big.NewInt(0),
181181
ConstantinopleBlock: big.NewInt(0),
182182
PetersburgBlock: big.NewInt(0),
183-
IstanbulBlock: nil,
183+
IstanbulBlock: big.NewInt(1561651),
184184
Clique: &CliqueConfig{
185185
Period: 15,
186186
Epoch: 30000,
@@ -213,16 +213,16 @@ var (
213213
//
214214
// This configuration is intentionally not using keyed fields to force anyone
215215
// adding flags to the config to also have to set these fields.
216-
AllEthashProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, new(EthashConfig), nil}
216+
AllEthashProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, new(EthashConfig), nil}
217217

218218
// AllCliqueProtocolChanges contains every protocol change (EIPs) introduced
219219
// and accepted by the Ethereum core developers into the Clique consensus.
220220
//
221221
// This configuration is intentionally not using keyed fields to force anyone
222222
// adding flags to the config to also have to set these fields.
223-
AllCliqueProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, nil, &CliqueConfig{Period: 0, Epoch: 30000}}
223+
AllCliqueProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, &CliqueConfig{Period: 0, Epoch: 30000}}
224224

225-
TestChainConfig = &ChainConfig{big.NewInt(1), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, new(EthashConfig), nil}
225+
TestChainConfig = &ChainConfig{big.NewInt(1), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, new(EthashConfig), nil}
226226
TestRules = TestChainConfig.Rules(new(big.Int))
227227
)
228228

0 commit comments

Comments
 (0)