From 0bb2f8f6b816a5d22f11e016354fde1d6dd4fe90 Mon Sep 17 00:00:00 2001 From: draganrakita Date: Tue, 23 Feb 2021 13:44:09 +0100 Subject: [PATCH] Berlin hardfork blocks --- crates/ethcore/res/chainspec/foundation.json | 21 +++++++++++++++---- crates/ethcore/res/chainspec/goerli.json | 19 ++++++++++++++--- crates/ethcore/res/chainspec/rinkeby.json | 19 ++++++++++++++--- crates/ethcore/res/chainspec/ropsten.json | 22 ++++++++++++++++---- crates/ethcore/sync/src/chain/fork_filter.rs | 15 +++++++++---- 5 files changed, 78 insertions(+), 18 deletions(-) diff --git a/crates/ethcore/res/chainspec/foundation.json b/crates/ethcore/res/chainspec/foundation.json index 5af92bec2..991fe18f5 100644 --- a/crates/ethcore/res/chainspec/foundation.json +++ b/crates/ethcore/res/chainspec/foundation.json @@ -166,10 +166,13 @@ "eip1014Transition": "0x6f1580", "eip1052Transition": "0x6f1580", "eip1283Transition": "0x8a61c8", + "eip1344Transition": "0x8a61c8", "eip1706Transition": "0x8a61c8", "eip1884Transition": "0x8a61c8", "eip2028Transition": "0x8a61c8", - "eip1344Transition": "0x8a61c8" + "eip2315Transition": "0xbad420", + "eip2929Transition": "0xbad420", + "eip2930Transition": "0xbad420" }, "genesis": { "seal": { @@ -251,10 +254,20 @@ "0x0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", - "activate_at": "0x42ae50", "pricing": { - "modexp": { - "divisor": 20 + "0x42ae50": { + "info": "EIP-198: Big integer modular exponentiation. Byzantium hardfork (4_370_000)", + "price": { + "modexp": { + "divisor": 20 + } + } + }, + "0xbad420": { + "info": "EIP-2565: ModExp Gas Cost. Berlin hardfork (12_244_000)", + "price": { + "modexp2565": {} + } } } } diff --git a/crates/ethcore/res/chainspec/goerli.json b/crates/ethcore/res/chainspec/goerli.json index b3ab53730..01f71a24a 100644 --- a/crates/ethcore/res/chainspec/goerli.json +++ b/crates/ethcore/res/chainspec/goerli.json @@ -31,6 +31,9 @@ "eip1706Transition": "0x17d433", "eip1884Transition": "0x17d433", "eip2028Transition": "0x17d433", + "eip2315Transition": "0x441064", + "eip2929Transition": "0x441064", + "eip2930Transition": "0x441064", "gasLimitBoundDivisor": "0x400", "maxCodeSize": "0x6000", "maxCodeSizeTransition": "0x0", @@ -118,10 +121,20 @@ "balance": "0x1", "builtin": { "name": "modexp", - "activate_at": "0x0", "pricing": { - "modexp": { - "divisor": 20 + "0x0": { + "info": "EIP-198: Big integer modular exponentiation. Byzantium hardfork", + "price": { + "modexp": { + "divisor": 20 + } + } + }, + "0x441064": { + "info": "EIP-2565: ModExp Gas Cost. Berlin hardfork (4_460_644)", + "price": { + "modexp2565": {} + } } } } diff --git a/crates/ethcore/res/chainspec/rinkeby.json b/crates/ethcore/res/chainspec/rinkeby.json index ee02408f6..8a0c59df4 100644 --- a/crates/ethcore/res/chainspec/rinkeby.json +++ b/crates/ethcore/res/chainspec/rinkeby.json @@ -31,6 +31,9 @@ "eip1706Transition": "0x52efd1", "eip1884Transition": "0x52efd1", "eip2028Transition": "0x52efd1", + "eip2315Transition": "0x7e8270", + "eip2929Transition": "0x7e8270", + "eip2930Transition": "0x7e8270", "gasLimitBoundDivisor": "0x400", "maxCodeSize": "0x6000", "maxCodeSizeTransition": "0x0", @@ -113,10 +116,20 @@ "balance": "0x1", "builtin": { "name": "modexp", - "activate_at": "0xfcc25", "pricing": { - "modexp": { - "divisor": 20 + "0xfcc25": { + "info": "EIP-198: Big integer modular exponentiation. Byzantium hardfork (1_035_301)", + "price": { + "modexp": { + "divisor": 20 + } + } + }, + "0x7e8270": { + "info": "EIP-2565: ModExp Gas Cost. Berlin hardfork (8_290_928)", + "price": { + "modexp2565": {} + } } } } diff --git a/crates/ethcore/res/chainspec/ropsten.json b/crates/ethcore/res/chainspec/ropsten.json index f76cbce3c..5c7a7a4ed 100644 --- a/crates/ethcore/res/chainspec/ropsten.json +++ b/crates/ethcore/res/chainspec/ropsten.json @@ -51,7 +51,11 @@ "eip1344Transition": "0x62f756", "eip1706Transition": "0x62f756", "eip1884Transition": "0x62f756", - "eip2028Transition": "0x62f756" + "eip2028Transition": "0x62f756", + "eip2315Transition": "0x95b8dd", + "eip2929Transition": "0x95b8dd", + "eip2930Transition": "0x95b8dd" + }, "genesis": { "seal": { @@ -135,10 +139,20 @@ "nonce": "0x0", "builtin": { "name": "modexp", - "activate_at": "0x19f0a0", "pricing": { - "modexp": { - "divisor": 20 + "0x19f0a0": { + "info": "EIP-198: Big integer modular exponentiation. Byzantium hardfork (1_700_000)", + "price": { + "modexp": { + "divisor": 20 + } + } + }, + "0x95b8dd": { + "info": "EIP-2565: ModExp Gas Cost. Berlin hardfork (9_812_189)", + "price": { + "modexp2565": {} + } } } } diff --git a/crates/ethcore/sync/src/chain/fork_filter.rs b/crates/ethcore/sync/src/chain/fork_filter.rs index b813cbff5..9baf95d84 100644 --- a/crates/ethcore/sync/src/chain/fork_filter.rs +++ b/crates/ethcore/sync/src/chain/fork_filter.rs @@ -86,7 +86,7 @@ mod tests { || ethereum::new_foundation(&String::new()), vec![ 1_150_000, 1_920_000, 2_463_000, 2_675_000, 4_370_000, 7_280_000, 9_069_000, - 9_200_000, + 9_200_000, 12_244_000, ], ) } @@ -95,7 +95,9 @@ mod tests { fn ropsten_spec() { test_spec( || ethereum::new_ropsten(&String::new()), - vec![10, 1_700_000, 4_230_000, 4_939_394, 6_485_846, 7_117_117], + vec![ + 10, 1_700_000, 4_230_000, 4_939_394, 6_485_846, 7_117_117, 9_812_189, + ], ) } @@ -103,12 +105,17 @@ mod tests { fn rinkeby_spec() { test_spec( || ethereum::new_rinkeby(&String::new()), - vec![1, 2, 3, 1_035_301, 3_660_663, 4_321_234, 5_435_345], + vec![ + 1, 2, 3, 1_035_301, 3_660_663, 4_321_234, 5_435_345, 8_290_928, + ], ) } #[test] fn goerli_spec() { - test_spec(|| ethereum::new_goerli(&String::new()), vec![1_561_651]) + test_spec( + || ethereum::new_goerli(&String::new()), + vec![1_561_651, 4_460_644], + ) } }