Struct cfx_vm_types::CIP645Spec

source ·
pub struct CIP645Spec {
Show 14 fields pub eip1108: bool, pub eip1884: bool, pub eip2028: bool, pub eip_sstore_and_refund_gas: bool, pub eip2565: bool, pub eip_cold_warm_access: bool, pub eip3860: bool, pub fix_eip684: bool, pub fix_eip1559: bool, pub fix_eip5656: bool, pub fix_eip1153: bool, pub blockhash_gas: bool, pub opcode_update: bool, pub fix_extcodehash: bool,
}
Expand description

Represents the feature flags for CIP-645 implementation.

While the protocol treats these features as a single atomic upgrade, separating them into named fields is merely to make the code more maintainable and self-documenting.

IMPORTANT NOTE: All fields must be consistently set to either true (enabled) or false (disabled). Mixed states will lead to undefined behavior as these features were designed to be activated as a coordinated bundle in CIP-645.

Fields§

§eip1108: bool

EIP-1108: Reduces gas costs for alt_bn128 precompile

§eip1884: bool

EIP-1884: Reprices trie-size-dependent opcodes

§eip2028: bool

EIP-2028: Reduces Calldata gas cost

§eip_sstore_and_refund_gas: bool

EIP-2200: Rebalances net-metered SSTORE gas cost
EIP-3529: Removes gas refunds for SELFDESTRUCT and reduces SSTORE refunds

§eip2565: bool

EIP-2565: Reduces gas cost for modular exponentiation transactions

§eip_cold_warm_access: bool

EIP-2929: Increases gas costs for opcode transactions to mitigate DDoS EIP-3651: Reduces gas fees for accessing COINBASE address

§eip3860: bool

EIP-3860: Limits initcode size to 49152

§fix_eip684: bool

EIP-684: Revert creation in case of collision

§fix_eip1559: bool

EIP-1559: EIP-1559: Fee market change for ETH 1.0 chain

§fix_eip5656: bool

EIP-5656: MCOPY - Memory copying instruction

§fix_eip1153: bool

EIP-1153: Transient storage opcodes

§blockhash_gas: bool§opcode_update: bool§fix_extcodehash: bool

Implementations§

source§

impl CIP645Spec

source

pub const fn new(enabled: bool) -> Self

Trait Implementations§

source§

impl Clone for CIP645Spec

source§

fn clone(&self) -> CIP645Spec

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CIP645Spec

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Copy for CIP645Spec

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V