v2.6.3-beta (rev2) (#11050)
* EIP 1884 Re-pricing of trie-size dependent operations (#10992) * Implement EIP-1283 reenable transition, EIP-1706 and EIP-2200 (#10191)
This commit is contained in:
@@ -121,10 +121,16 @@ pub struct CommonParams {
|
||||
pub eip1283_transition: BlockNumber,
|
||||
/// Number of first block where EIP-1283 rules end.
|
||||
pub eip1283_disable_transition: BlockNumber,
|
||||
/// Number of first block where EIP-1283 rules re-enabled.
|
||||
pub eip1283_reenable_transition: BlockNumber,
|
||||
/// Number of first block where EIP-1014 rules begin.
|
||||
pub eip1014_transition: BlockNumber,
|
||||
/// Number of first block where EIP-1706 rules begin.
|
||||
pub eip1706_transition: BlockNumber,
|
||||
/// Number of first block where EIP-1344 rules begin: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1344.md
|
||||
pub eip1344_transition: BlockNumber,
|
||||
/// Number of first block where EIP-1884 rules begin:https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1884.md
|
||||
pub eip1884_transition: BlockNumber,
|
||||
/// Number of first block where EIP-2028 rules begin.
|
||||
pub eip2028_transition: BlockNumber,
|
||||
/// Number of first block where dust cleanup rules (EIP-168 and EIP169) begin.
|
||||
@@ -194,7 +200,18 @@ impl CommonParams {
|
||||
schedule.have_bitwise_shifting = block_number >= self.eip145_transition;
|
||||
schedule.have_extcodehash = block_number >= self.eip1052_transition;
|
||||
schedule.have_chain_id = block_number >= self.eip1344_transition;
|
||||
schedule.eip1283 = block_number >= self.eip1283_transition && !(block_number >= self.eip1283_disable_transition);
|
||||
schedule.eip1283 =
|
||||
(block_number >= self.eip1283_transition &&
|
||||
!(block_number >= self.eip1283_disable_transition)) ||
|
||||
block_number >= self.eip1283_reenable_transition;
|
||||
schedule.eip1706 = block_number >= self.eip1706_transition;
|
||||
|
||||
if block_number >= self.eip1884_transition {
|
||||
schedule.have_selfbalance = true;
|
||||
schedule.sload_gas = 800;
|
||||
schedule.balance_gas = 700;
|
||||
schedule.extcodehash_gas = 700;
|
||||
}
|
||||
if block_number >= self.eip2028_transition {
|
||||
schedule.tx_data_non_zero_gas = 16;
|
||||
}
|
||||
@@ -312,6 +329,14 @@ impl From<ethjson::spec::Params> for CommonParams {
|
||||
BlockNumber::max_value,
|
||||
Into::into,
|
||||
),
|
||||
eip1283_reenable_transition: p.eip1283_reenable_transition.map_or_else(
|
||||
BlockNumber::max_value,
|
||||
Into::into,
|
||||
),
|
||||
eip1706_transition: p.eip1706_transition.map_or_else(
|
||||
BlockNumber::max_value,
|
||||
Into::into,
|
||||
),
|
||||
eip1014_transition: p.eip1014_transition.map_or_else(
|
||||
BlockNumber::max_value,
|
||||
Into::into,
|
||||
@@ -320,6 +345,10 @@ impl From<ethjson::spec::Params> for CommonParams {
|
||||
BlockNumber::max_value,
|
||||
Into::into,
|
||||
),
|
||||
eip1884_transition: p.eip1884_transition.map_or_else(
|
||||
BlockNumber::max_value,
|
||||
Into::into,
|
||||
),
|
||||
eip2028_transition: p.eip2028_transition.map_or_else(
|
||||
BlockNumber::max_value,
|
||||
Into::into,
|
||||
|
||||
Reference in New Issue
Block a user