pub struct HeaderInfo {
pub number: u64,
pub beneficiary: Address,
pub timestamp: u64,
pub gas_limit: u64,
pub base_fee_per_gas: Option<u64>,
pub excess_blob_gas: Option<u64>,
pub blob_gas_used: Option<u64>,
pub difficulty: U256,
pub mix_hash: Option<B256>,
}Expand description
Essential info extracted from a header.
Fields§
§number: u64The number of ancestor blocks of this block (block height).
beneficiary: AddressBeneficiary (Coinbase or miner) is a address that have signed the block.
This is the receiver address of all the gas spent in the block.
timestamp: u64The timestamp of the block in seconds since the UNIX epoch
gas_limit: u64The gas limit of the block
base_fee_per_gas: Option<u64>The base fee per gas, added in the London upgrade with EIP-1559
excess_blob_gas: Option<u64>A running total of blob gas consumed in excess of the target, prior to the block. Blocks with above-target blob gas consumption increase this value, blocks with below-target blob gas consumption decrease it (bounded at 0). This was added in EIP-4844.
blob_gas_used: Option<u64>The total amount of blob gas consumed by the transactions within the block, added in EIP-4844.
difficulty: U256The difficulty of the block
Unused after the Paris (AKA the merge) upgrade and replaced by prevrandao and expected to
be 0.
mix_hash: Option<B256>The output of the randomness beacon provided by the beacon chain
Replaces difficulty after the Paris (AKA the merge) upgrade with EIP-4399.
Note: prevrandao can be found in a block in place of mix_hash.
Trait Implementations§
Source§impl Clone for HeaderInfo
impl Clone for HeaderInfo
Source§fn clone(&self) -> HeaderInfo
fn clone(&self) -> HeaderInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HeaderInfo
impl Debug for HeaderInfo
Source§impl Default for HeaderInfo
impl Default for HeaderInfo
Source§fn default() -> HeaderInfo
fn default() -> HeaderInfo
Source§impl PartialEq for HeaderInfo
impl PartialEq for HeaderInfo
impl Copy for HeaderInfo
impl Eq for HeaderInfo
impl StructuralPartialEq for HeaderInfo
Auto Trait Implementations§
impl Freeze for HeaderInfo
impl RefUnwindSafe for HeaderInfo
impl Send for HeaderInfo
impl Sync for HeaderInfo
impl Unpin for HeaderInfo
impl UnwindSafe for HeaderInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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