diff --git a/nimbus/common/chain_config.nim b/nimbus/common/chain_config.nim index 075014dd9..a5677748a 100644 --- a/nimbus/common/chain_config.nim +++ b/nimbus/common/chain_config.nim @@ -1,5 +1,5 @@ # Nimbus -# Copyright (c) 2021-2023 Status Research & Development GmbH +# Copyright (c) 2021-2024 Status Research & Development GmbH # Licensed under either of # * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) # * MIT license ([LICENSE-MIT](LICENSE-MIT)) @@ -477,7 +477,8 @@ proc chainConfigForNetwork*(id: NetworkId): ChainConfig = berlinBlock: some(4_460_644.toBlockNumber), # 2021-03-18 05:29:51 UTC londonBlock: some(5_062_605.toBlockNumber), # 2021-07-01 03:19:39 UTC terminalTotalDifficulty: some(10790000.u256), - shanghaiTime: some(1_678_832_736.EthTime) + shanghaiTime: some(1_678_832_736.EthTime), + cancunTime: some(1_705_473_120.EthTime), # 2024-01-17 06:32:00 ) of SepoliaNet: const sepoliaTTD = parse("17000000000000000",UInt256) @@ -500,6 +501,7 @@ proc chainConfigForNetwork*(id: NetworkId): ChainConfig = mergeForkBlock: some(1735371.toBlockNumber), terminalTotalDifficulty: some(sepoliaTTD), shanghaiTime: some(1_677_557_088.EthTime), + cancunTime: some(1_706_655_072.EthTime), # 2024-01-30 22:51:12 ) of HoleskyNet: ChainConfig( @@ -519,6 +521,7 @@ proc chainConfigForNetwork*(id: NetworkId): ChainConfig = terminalTotalDifficulty: some(0.u256), terminalTotalDifficultyPassed: some(true), shanghaiTime: some(1_696_000_704.EthTime), + cancunTime: some(1_707_305_664.EthTime), # 2024-02-07 11:34:24 ) else: ChainConfig() diff --git a/tests/test_forkid.nim b/tests/test_forkid.nim index 06baafe32..c6972d4f1 100644 --- a/tests/test_forkid.nim +++ b/tests/test_forkid.nim @@ -1,5 +1,5 @@ # Nimbus -# Copyright (c) 2019-2023 Status Research & Development GmbH +# Copyright (c) 2019-2024 Status Research & Development GmbH # Licensed under either of # * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or # http://www.apache.org/licenses/LICENSE-2.0) @@ -55,8 +55,9 @@ const (number: 5062604'u64, time: 0'u64, id: (crc: 0x757a1c47'u32, next: 5062605'u64)), # Last Berlin block (number: 5062605'u64, time: 0'u64, id: (crc: 0xb8c6299d'u32, next: 1678832736'u64)), # First London block (number: 6000000'u64, time: 1678832735'u64, id: (crc: 0xB8C6299D'u32, next: 1678832736'u64)), # Last London block - (number: 6000001'u64, time: 1678832736'u64, id: (crc: 0xf9843abf'u32, next: 0'u64)), # First Shanghai block - (number: 6500000'u64, time: 2678832736'u64, id: (crc: 0xf9843abf'u32, next: 0'u64)), # Future Shanghai block + (number: 6000001'u64, time: 1678832736'u64, id: (crc: 0xf9843abf'u32, next: 1705473120'u64)), # First Shanghai block + (number: 6500000'u64, time: 1705473119'u64, id: (crc: 0xf9843abf'u32, next: 1705473120'u64)), # Last Shanghai block + (number: 6500000'u64, time: 1705473120'u64, id: (crc: 0x70cc14e2'u32, next: 0'u64)), # First Cancun block ] SepoliaNetIDs = [ @@ -64,13 +65,17 @@ const (number: 1735370'u64, time: 0'u64, id: (crc: 0xfe3366e7'u32, next: 1735371'u64)), # Last London block (number: 1735371'u64, time: 0'u64, id: (crc: 0xb96cbd13'u32, next: 1677557088'u64)), # First MergeNetsplit block (number: 1735372'u64, time: 1677557087'u64, id: (crc: 0xb96cbd13'u32, next: 1677557088'u64)), # Last MergeNetsplit block - (number: 1735372'u64, time: 1677557088'u64, id: (crc: 0xf7f9bc08'u32, next: 0'u64)), # First Shanghai block + (number: 1735372'u64, time: 1677557088'u64, id: (crc: 0xf7f9bc08'u32, next: 1706655072'u64)), # First Shanghai block + (number: 1735372'u64, time: 1706655071'u64, id: (crc: 0xf7f9bc08'u32, next: 1706655072'u64)), # Last Shanghai block + (number: 1735372'u64, time: 1706655072'u64, id: (crc: 0x88cf81d9'u32, next: 0'u64)), # First Cancun block ] HoleskyNetIDs = [ (number: 0'u64, time: 0'u64, id: (crc: 0xc61a6098'u32, next: 1696000704'u64)), # Unsynced, last Frontier, Homestead, Tangerine, Spurious, Byzantium, Constantinople, Petersburg, Istanbul, Berlin, London, Paris block (number: 123'u64, time: 0'u64, id: (crc: 0xc61a6098'u32, next: 1696000704'u64)), # First MergeNetsplit block - (number: 123'u64, time: 1696000704'u64, id: (crc: 0xfd4f016b'u32, next: 0'u64)), # Last MergeNetsplit block + (number: 123'u64, time: 1696000704'u64, id: (crc: 0xfd4f016b'u32, next: 1707305664'u64)), # First Shanghai block + (number: 123'u64, time: 1707305663'u64, id: (crc: 0xfd4f016b'u32, next: 1707305664'u64)), # Last Shanghai block + (number: 123'u64, time: 1707305664'u64, id: (crc: 0x9b192ad0'u32, next: 0'u64)), # First Cancun block ] template runTest(network: untyped, name: string) =