Add eip1559BaseFeeFixedValue and eip1559BaseFeeFixedValueTransition spec options and bump to v3.3.0-rc.14
This commit is contained in:
		
							parent
							
								
									98873fc0c0
								
							
						
					
					
						commit
						437ba9b044
					
				@ -1,3 +1,10 @@
 | 
			
		||||
## OpenEthereum v3.3.0-rc.14
 | 
			
		||||
 | 
			
		||||
Enhancements:
 | 
			
		||||
* Add eip1559BaseFeeFixedValue and eip1559BaseFeeFixedValueTransition spec options
 | 
			
		||||
* Activate eip1559BaseFeeFixedValue on xDai at London hardfork block (19040000)
 | 
			
		||||
* Delay difficulty bomb to June 2022 (EIP-4345)
 | 
			
		||||
 | 
			
		||||
## OpenEthereum v3.3.0-rc.13
 | 
			
		||||
 | 
			
		||||
Enhancements:
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										4
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							@ -2932,7 +2932,7 @@ checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c"
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "openethereum"
 | 
			
		||||
version = "3.3.0-rc.13"
 | 
			
		||||
version = "3.3.0-rc.14"
 | 
			
		||||
dependencies = [
 | 
			
		||||
 "ansi_term 0.10.2",
 | 
			
		||||
 "atty",
 | 
			
		||||
@ -3282,7 +3282,7 @@ dependencies = [
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "parity-version"
 | 
			
		||||
version = "3.3.0-rc.13"
 | 
			
		||||
version = "3.3.0-rc.14"
 | 
			
		||||
dependencies = [
 | 
			
		||||
 "parity-bytes",
 | 
			
		||||
 "rlp",
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
description = "OpenEthereum"
 | 
			
		||||
name = "openethereum"
 | 
			
		||||
# NOTE Make sure to update util/version/Cargo.toml as well
 | 
			
		||||
version = "3.3.0-rc.13"
 | 
			
		||||
version = "3.3.0-rc.14"
 | 
			
		||||
license = "GPL-3.0"
 | 
			
		||||
authors = [
 | 
			
		||||
	"OpenEthereum developers",
 | 
			
		||||
 | 
			
		||||
@ -60,9 +60,9 @@
 | 
			
		||||
		"eip3529Transition": 19040000,
 | 
			
		||||
		"eip3541Transition": 19040000,
 | 
			
		||||
		"eip1559Transition": 19040000,
 | 
			
		||||
		"eip1559BaseFeeMaxChangeDenominator": "0x8",
 | 
			
		||||
		"eip1559ElasticityMultiplier": "0x2",
 | 
			
		||||
		"eip1559BaseFeeInitialValue": "0x3b9aca00",
 | 
			
		||||
		"eip1559BaseFeeFixedValue": "0x4A817C800",
 | 
			
		||||
		"eip1559BaseFeeFixedValueTransition": 19040000,
 | 
			
		||||
		"eip1559FeeCollector": "0x6BBe78ee9e474842Dbd4AB4987b3CeFE88426A92",
 | 
			
		||||
		"eip1559FeeCollectorTransition": 19040000,
 | 
			
		||||
		"registrar": "0x6B53721D4f2Fb9514B85f5C49b197D857e36Cf03",
 | 
			
		||||
 | 
			
		||||
@ -466,15 +466,32 @@ impl EthereumMachine {
 | 
			
		||||
    /// Base fee is calculated based on the parent header (last block in blockchain / best block).
 | 
			
		||||
    ///
 | 
			
		||||
    /// Introduced by EIP1559 to support new market fee mechanism.
 | 
			
		||||
    ///
 | 
			
		||||
    /// Modified for xDai chain to have an ability to set constant base fee
 | 
			
		||||
    /// through eip1559BaseFeeFixedValue spec option. The modification made
 | 
			
		||||
    /// in v3.3.0-rc.14
 | 
			
		||||
    pub fn calc_base_fee(&self, parent: &Header) -> Option<U256> {
 | 
			
		||||
        // Block eip1559_transition - 1 has base_fee = None
 | 
			
		||||
        if parent.number() + 1 < self.params().eip1559_transition {
 | 
			
		||||
            return None;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // If we use base fee constant value, ignore the code below
 | 
			
		||||
        if parent.number() + 1 >= self.params().eip1559_base_fee_fixed_value_transition {
 | 
			
		||||
            let base_fee_fixed_value = match self.params().eip1559_base_fee_fixed_value {
 | 
			
		||||
                None => panic!("Base fee fixed value must be set in spec."),
 | 
			
		||||
                Some(fixed_value) => fixed_value,
 | 
			
		||||
            };
 | 
			
		||||
            return Some(base_fee_fixed_value);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Block eip1559_transition has base_fee = self.params().eip1559_base_fee_initial_value
 | 
			
		||||
        if parent.number() + 1 == self.params().eip1559_transition {
 | 
			
		||||
            return Some(self.params().eip1559_base_fee_initial_value);
 | 
			
		||||
            let base_fee_initial_value = match self.params().eip1559_base_fee_initial_value {
 | 
			
		||||
                None => panic!("Base fee initial value must be set in spec."),
 | 
			
		||||
                Some(initial_value) => initial_value,
 | 
			
		||||
            };
 | 
			
		||||
            return Some(base_fee_initial_value);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Block eip1559_transition + 1 has base_fee = calculated
 | 
			
		||||
 | 
			
		||||
@ -182,7 +182,11 @@ pub struct CommonParams {
 | 
			
		||||
    /// Elasticity multiplier
 | 
			
		||||
    pub eip1559_elasticity_multiplier: U256,
 | 
			
		||||
    /// Default value for the block base fee
 | 
			
		||||
    pub eip1559_base_fee_initial_value: U256,
 | 
			
		||||
    pub eip1559_base_fee_initial_value: Option<U256>,
 | 
			
		||||
    /// Constant value for the block base fee.
 | 
			
		||||
    pub eip1559_base_fee_fixed_value: Option<U256>,
 | 
			
		||||
    /// Block at which the constant value for the base fee starts to be used.
 | 
			
		||||
    pub eip1559_base_fee_fixed_value_transition: BlockNumber,
 | 
			
		||||
    /// Address where EIP-1559 burnt fee will be accrued to.
 | 
			
		||||
    pub eip1559_fee_collector: Option<Address>,
 | 
			
		||||
    /// Block at which the fee collector should start being used.
 | 
			
		||||
@ -460,9 +464,11 @@ impl From<ethjson::spec::Params> for CommonParams {
 | 
			
		||||
            eip1559_elasticity_multiplier: p
 | 
			
		||||
                .eip1559_elasticity_multiplier
 | 
			
		||||
                .map_or_else(U256::zero, Into::into),
 | 
			
		||||
            eip1559_base_fee_initial_value: p
 | 
			
		||||
                .eip1559_base_fee_initial_value
 | 
			
		||||
                .map_or_else(U256::zero, Into::into),
 | 
			
		||||
            eip1559_base_fee_initial_value: p.eip1559_base_fee_initial_value.map(Into::into),
 | 
			
		||||
            eip1559_base_fee_fixed_value: p.eip1559_base_fee_fixed_value.map(Into::into),
 | 
			
		||||
            eip1559_base_fee_fixed_value_transition: p
 | 
			
		||||
                .eip1559_base_fee_fixed_value_transition
 | 
			
		||||
                .map_or_else(BlockNumber::max_value, Into::into),
 | 
			
		||||
            eip1559_fee_collector: p.eip1559_fee_collector.map(Into::into),
 | 
			
		||||
            eip1559_fee_collector_transition: p
 | 
			
		||||
                .eip1559_fee_collector_transition
 | 
			
		||||
@ -743,6 +749,7 @@ impl Spec {
 | 
			
		||||
            params.max_code_size_transition,
 | 
			
		||||
            params.transaction_permission_contract_transition,
 | 
			
		||||
            params.eip1559_fee_collector_transition,
 | 
			
		||||
            params.eip1559_base_fee_fixed_value_transition,
 | 
			
		||||
        ];
 | 
			
		||||
        // BUG: Rinkeby has homestead transition at block 1 but we can't reflect that in specs for non-Ethash networks
 | 
			
		||||
        if params.network_id == 0x4 {
 | 
			
		||||
 | 
			
		||||
@ -158,6 +158,10 @@ pub struct Params {
 | 
			
		||||
    pub eip1559_elasticity_multiplier: Option<Uint>,
 | 
			
		||||
    /// Default value for the block base fee
 | 
			
		||||
    pub eip1559_base_fee_initial_value: Option<Uint>,
 | 
			
		||||
    /// Constant value for the block base fee.
 | 
			
		||||
    pub eip1559_base_fee_fixed_value: Option<Uint>,
 | 
			
		||||
    /// Block at which the constant value for the base fee starts to be used.
 | 
			
		||||
    pub eip1559_base_fee_fixed_value_transition: Option<Uint>,
 | 
			
		||||
    /// Address where EIP-1559 burnt fee will be accrued to.
 | 
			
		||||
    pub eip1559_fee_collector: Option<Address>,
 | 
			
		||||
    /// Block at which the fee collector should start being used.
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
[package]
 | 
			
		||||
name = "parity-version"
 | 
			
		||||
# NOTE: this value is used for OpenEthereum version string (via env CARGO_PKG_VERSION)
 | 
			
		||||
version = "3.3.0-rc.13"
 | 
			
		||||
version = "3.3.0-rc.14"
 | 
			
		||||
authors = ["Parity Technologies <admin@parity.io>"]
 | 
			
		||||
build = "build.rs"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user