Skip to main content

EthForkConfig

Struct EthForkConfig 

Source
pub struct EthForkConfig {
    pub activation_time: u64,
    pub blob_schedule: BlobParams,
    pub chain_id: u64,
    pub fork_id: Bytes,
    pub precompiles: BTreeMap<String, Address>,
    pub system_contracts: BTreeMap<SystemContract, Address>,
}
Expand description

The fork configuration object as defined by EIP-7910.

Fields§

§activation_time: u64

The fork activation timestamp, represented as a JSON number in Unix epoch seconds (UTC). For the “current” configuration, this reflects the actual activation time; for “next,” it is the scheduled time. Activation time is required. If a fork is activated at genesis the value 0 is used. If the fork is not scheduled to be activated or its activation time is unknown it should not be in the rpc results.

§blob_schedule: BlobParams

The blob configuration parameters for the specific fork, as defined in the genesis file. This is a JSON object with three members — baseFeeUpdateFraction, max, and target — all represented as JSON numbers.

§chain_id: u64

The chain ID of the current network, presented as a string with an unsigned 0x-prefixed hexadecimal number, with all leading zeros removed. This specification does not support chains without a chain ID or with a chain ID of zero.

For purposes of canonicalization this value must always be a string.

§fork_id: Bytes

The FORK_HASH value as specified in EIP-6122 of the specific fork, presented as an unsigned 0x-prefixed hexadecimal numbers, with zeros left padded to a four byte length, in lower case.

§precompiles: BTreeMap<String, Address>

A representation of the active precompile contracts for the fork. If a precompile is replaced by an on-chain contract, or removed, then it is not included.

This is a JSON object where the members are the 20-byte 0x-prefixed hexadecimal addresses of the precompiles (with zeros preserved), and the values are agreed-upon names for each contract, typically specified in the EIP defining that contract.

For Cancun, the contract names are (in order): ECREC, SHA256, RIPEMD160, ID, MODEXP, BN256_ADD, BN256_MUL, BN256_PAIRING, BLAKE2F, KZG_POINT_EVALUATION.

For Prague, the added contracts are (in order): BLS12_G1ADD, BLS12_G1MSM, BLS12_G2ADD, BLS12_G2MSM, BLS12_PAIRING_CHECK, BLS12_MAP_FP_TO_G1, BLS12_MAP_FP2_TO_G2.

§system_contracts: BTreeMap<SystemContract, Address>

A JSON object representing system-level contracts relevant to the fork, as introduced in their defining EIPs. Keys are the contract names (e.g., BEACON_ROOTS_ADDRESS) from the first EIP where they appeared, sorted alphabetically. Values are 20-byte addresses in 0x-prefixed hexadecimal form, with leading zeros preserved. Omitted for forks before Cancun.

For Cancun the only system contract is BEACON_ROOTS_ADDRESS.

For Prague the system contracts are (in order) BEACON_ROOTS_ADDRESS, CONSOLIDATION_REQUEST_PREDEPLOY_ADDRESS, DEPOSIT_CONTRACT_ADDRESS, HISTORY_STORAGE_ADDRESS, and WITHDRAWAL_REQUEST_PREDEPLOY_ADDRESS.

Future forks MUST define the list of system contracts in their meta-EIPs.

Trait Implementations§

Source§

impl Clone for EthForkConfig

Source§

fn clone(&self) -> EthForkConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for EthForkConfig

Source§

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

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

impl<'de> Deserialize<'de> for EthForkConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for EthForkConfig

Source§

fn eq(&self, other: &EthForkConfig) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for EthForkConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for EthForkConfig

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

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>,

Source§

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>,

Source§

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.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 160 bytes