pub struct ExecutionData {
pub payload: ExecutionPayload,
pub sidecar: ExecutionPayloadSidecar,
}Expand description
Struct aggregating ExecutionPayload and ExecutionPayloadSidecar and encapsulating
complete payload supplied for execution.
Fields§
§payload: ExecutionPayloadExecution payload.
sidecar: ExecutionPayloadSidecarAdditional fork-specific fields.
Implementations§
Source§impl ExecutionData
impl ExecutionData
Sourcepub const fn new(
payload: ExecutionPayload,
sidecar: ExecutionPayloadSidecar,
) -> Self
pub const fn new( payload: ExecutionPayload, sidecar: ExecutionPayloadSidecar, ) -> Self
Creates new instance of ExecutionData.
Sourcepub fn from_block_unchecked<T, H>(block_hash: B256, block: &Block<T, H>) -> Self
pub fn from_block_unchecked<T, H>(block_hash: B256, block: &Block<T, H>) -> Self
Conversion from alloy_consensus::Block. Also returns the ExecutionPayloadSidecar
extracted from the block.
For the ExecutionPayloadSidecar this is expected to use just the requests hash, because
the Requests are not part of the block/header. See also
RequestsOrHash.
Likewise, Amsterdam/V4 payload conversion falls back to the header’s
block_access_list_hash bytes when the full RLP-encoded block access list is not
available on the block value, or to the canonical empty BAL hash bytes if the header does
not carry a BAL hash.
See also ExecutionPayload::from_block_unchecked.
Sourcepub const fn parent_hash(&self) -> B256
pub const fn parent_hash(&self) -> B256
Returns the parent hash of the block.
Sourcepub const fn block_hash(&self) -> B256
pub const fn block_hash(&self) -> B256
Returns the hash of the block.
Sourcepub const fn block_number(&self) -> u64
pub const fn block_number(&self) -> u64
Returns the number of the block.
Sourcepub fn parent_beacon_block_root(&self) -> Option<B256>
pub fn parent_beacon_block_root(&self) -> Option<B256>
Returns the parent beacon block root, if any.
Sourcepub const fn withdrawals(&self) -> Option<&Vec<Withdrawal>>
pub const fn withdrawals(&self) -> Option<&Vec<Withdrawal>>
Return the withdrawals for the payload or attributes.
Sourcepub const fn transaction_count(&self) -> usize
pub const fn transaction_count(&self) -> usize
Returns the number of transactions in the payload.
Sourcepub fn try_into_block<T: Decodable2718>(self) -> Result<Block<T>, PayloadError>
pub fn try_into_block<T: Decodable2718>(self) -> Result<Block<T>, PayloadError>
Tries to create a new unsealed block from the given payload and payload sidecar.
Performs additional validation of extra_data and base_fee_per_gas fields.
The payload’s advertised block_hash is not recomputed or compared.
§Note
The log bloom is assumed to be validated during serialization.
Sourcepub fn try_into_block_with<T, F, E>(
self,
f: F,
) -> Result<Block<T>, PayloadError>
pub fn try_into_block_with<T, F, E>( self, f: F, ) -> Result<Block<T>, PayloadError>
Tries to create a new unsealed block from the given payload and payload sidecar with a custom transaction mapper.
Performs additional validation of extra_data and base_fee_per_gas fields.
§Note
The log bloom is assumed to be validated during serialization.
Sourcepub fn into_block_raw(self) -> Result<Block<Bytes>, PayloadError>
pub fn into_block_raw(self) -> Result<Block<Bytes>, PayloadError>
Converts ExecutionData to Block with raw Bytes transactions.
This is similar to Self::try_into_block_with but returns the transactions as raw bytes
without any conversion.
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for ExecutionData
Available on crate features arbitrary only.
impl<'arbitrary> Arbitrary<'arbitrary> for ExecutionData
arbitrary only.Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured this type
needs to construct itself. Read moreSource§impl Clone for ExecutionData
impl Clone for ExecutionData
Source§fn clone(&self) -> ExecutionData
fn clone(&self) -> ExecutionData
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExecutionData
impl Debug for ExecutionData
Source§impl<'de> Deserialize<'de> for ExecutionData
Available on crate feature serde only.
impl<'de> Deserialize<'de> for ExecutionData
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<T, H> From<(Sealed<&Block<T, H>>, PayloadExtras)> for ExecutionData
impl<T, H> From<(Sealed<&Block<T, H>>, PayloadExtras)> for ExecutionData
Source§impl<T, H> From<(Sealed<Block<T, H>>, PayloadExtras)> for ExecutionData
impl<T, H> From<(Sealed<Block<T, H>>, PayloadExtras)> for ExecutionData
Auto Trait Implementations§
impl !Freeze for ExecutionData
impl RefUnwindSafe for ExecutionData
impl Send for ExecutionData
impl Sync for ExecutionData
impl Unpin for ExecutionData
impl UnsafeUnpin for ExecutionData
impl UnwindSafe for ExecutionData
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 moreSource§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
Source§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
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: 760 bytes