PayloadBuilderAttributes

Trait PayloadBuilderAttributes 

Source
pub trait PayloadBuilderAttributes:
    Send
    + Sync
    + Unpin
    + Debug
    + 'static {
    type RpcPayloadAttributes: Send + Sync + 'static;
    type Error: Error + Send + Sync + 'static;

    // Required methods
    fn try_new(
        parent: B256,
        rpc_payload_attributes: Self::RpcPayloadAttributes,
        version: u8,
    ) -> Result<Self, Self::Error>
       where Self: Sized;
    fn payload_id(&self) -> PayloadId;
    fn parent(&self) -> B256;
    fn timestamp(&self) -> u64;
    fn parent_beacon_block_root(&self) -> Option<B256>;
    fn suggested_fee_recipient(&self) -> Address;
    fn prev_randao(&self) -> B256;
    fn withdrawals(&self) -> &Withdrawals;
}
Expand description

Attributes used to guide the construction of a new execution payload.

Extends basic payload attributes with additional context needed during the building process, tracking in-progress payload jobs and their parameters.

Required Associated Types§

Source

type RpcPayloadAttributes: Send + Sync + 'static

The external payload attributes format this type can be constructed from.

Source

type Error: Error + Send + Sync + 'static

The error type used in PayloadBuilderAttributes::try_new.

Required Methods§

Source

fn try_new( parent: B256, rpc_payload_attributes: Self::RpcPayloadAttributes, version: u8, ) -> Result<Self, Self::Error>
where Self: Sized,

Constructs new builder attributes from external payload attributes.

Validates attributes and generates a unique [PayloadId] based on the parent block, attributes, and version.

Source

fn payload_id(&self) -> PayloadId

Returns the unique identifier for this payload build job.

Source

fn parent(&self) -> B256

Returns the hash of the parent block this payload builds on.

Source

fn timestamp(&self) -> u64

Returns the timestamp to be used in the payload’s header.

Source

fn parent_beacon_block_root(&self) -> Option<B256>

Returns the beacon chain block root from the parent block.

Returns None for pre-merge blocks or non-beacon contexts.

Source

fn suggested_fee_recipient(&self) -> Address

Returns the address that should receive transaction fees.

Source

fn prev_randao(&self) -> B256

Returns the randomness value for this block.

Source

fn withdrawals(&self) -> &Withdrawals

Returns the list of withdrawals to be processed in this block.

Implementors§