Skip to content

Commit 3bd1573

Browse files
authored
common: schedule cancun for testnets (#3211)
1 parent 76b74d0 commit 3bd1573

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

packages/common/src/chains.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,8 @@ export const chains: ChainsDict = {
249249
{
250250
name: 'cancun',
251251
block: null,
252-
forkHash: null,
252+
timestamp: '1705473120',
253+
forkHash: '0x70cc14e2',
253254
},
254255
],
255256
bootstrapNodes: [
@@ -411,7 +412,8 @@ export const chains: ChainsDict = {
411412
{
412413
name: 'cancun',
413414
block: null,
414-
forkHash: null,
415+
timestamp: '1706655072',
416+
forkHash: '0x88cf81d9',
415417
},
416418
],
417419
bootstrapNodes: [
@@ -543,7 +545,8 @@ export const chains: ChainsDict = {
543545
{
544546
name: 'cancun',
545547
block: null,
546-
forkHash: null,
548+
timestamp: '1707305664',
549+
forkHash: '0x9b192ad0',
547550
},
548551
],
549552
bootstrapNodes: [

packages/common/test/hardforks.spec.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,13 @@ describe('[Common]: Hardfork logic', () => {
121121
msg = 'should return correct next HF (mainnet: byzantium -> constantinople)'
122122
assert.equal(c.nextHardforkBlockOrTimestamp(Hardfork.Byzantium)!, BigInt(7280000), msg)
123123

124+
msg = 'should return null if next HF is not available (mainnet: shanghai -> cancun)'
125+
assert.equal(c.nextHardforkBlockOrTimestamp(Hardfork.Shanghai), null, msg)
126+
124127
const c2 = new Common({ chain: Chain.Goerli, hardfork: Hardfork.Chainstart })
125128

126-
msg = 'should return null if next HF is not available (mainnet: shanghai -> cancun)'
127-
assert.equal(c2.nextHardforkBlockOrTimestamp(Hardfork.Shanghai), null, msg)
129+
msg = 'should return null if next HF is not available (goerli: cancun -> prague)'
130+
assert.equal(c2.nextHardforkBlockOrTimestamp(Hardfork.Cancun), null, msg)
128131

129132
msg =
130133
'should correctly skip a HF where block is set to null (goerli: homestead -> (dao) -> tangerineWhistle)'

0 commit comments

Comments
 (0)