Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.

Commit fb07ffa

Browse files
sorpaas5chdn
authored andcommitted
Add EIP-1283 disable transition (#10214)
1 parent 940a88f commit fb07ffa

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

ethcore/src/spec/spec.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ pub struct CommonParams {
121121
pub eip1052_transition: BlockNumber,
122122
/// Number of first block where EIP-1283 rules begin.
123123
pub eip1283_transition: BlockNumber,
124+
/// Number of first block where EIP-1283 rules end.
125+
pub eip1283_disable_transition: BlockNumber,
124126
/// Number of first block where EIP-1014 rules begin.
125127
pub eip1014_transition: BlockNumber,
126128
/// Number of first block where dust cleanup rules (EIP-168 and EIP169) begin.
@@ -189,7 +191,7 @@ impl CommonParams {
189191
schedule.have_return_data = block_number >= self.eip211_transition;
190192
schedule.have_bitwise_shifting = block_number >= self.eip145_transition;
191193
schedule.have_extcodehash = block_number >= self.eip1052_transition;
192-
schedule.eip1283 = block_number >= self.eip1283_transition;
194+
schedule.eip1283 = block_number >= self.eip1283_transition && !(block_number >= self.eip1283_disable_transition);
193195
if block_number >= self.eip210_transition {
194196
schedule.blockhash_gas = 800;
195197
}
@@ -300,6 +302,10 @@ impl From<ethjson::spec::Params> for CommonParams {
300302
BlockNumber::max_value,
301303
Into::into,
302304
),
305+
eip1283_disable_transition: p.eip1283_disable_transition.map_or_else(
306+
BlockNumber::max_value,
307+
Into::into,
308+
),
303309
eip1014_transition: p.eip1014_transition.map_or_else(
304310
BlockNumber::max_value,
305311
Into::into,

json/src/spec/params.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ pub struct Params {
8989
pub eip1052_transition: Option<Uint>,
9090
/// See `CommonParams` docs.
9191
pub eip1283_transition: Option<Uint>,
92+
/// See `CommonParams` docs.
93+
pub eip1283_disable_transition: Option<Uint>,
94+
/// See `CommonParams` docs.
9295
pub eip1014_transition: Option<Uint>,
9396
/// See `CommonParams` docs.
9497
pub dust_protection_transition: Option<Uint>,

0 commit comments

Comments
 (0)