Trait PayloadBuilderAttributes
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: FixedBytes<32>,
rpc_payload_attributes: Self::RpcPayloadAttributes,
version: u8,
) -> Result<Self, Self::Error>
where Self: Sized;
fn payload_id(&self) -> PayloadId;
fn parent(&self) -> FixedBytes<32>;
fn timestamp(&self) -> u64;
fn parent_beacon_block_root(&self) -> Option<FixedBytes<32>>;
fn suggested_fee_recipient(&self) -> Address;
fn prev_randao(&self) -> FixedBytes<32>;
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§
type RpcPayloadAttributes: Send + Sync + 'static
type RpcPayloadAttributes: Send + Sync + 'static
The external payload attributes format this type can be constructed from.
type Error: Error + Send + Sync + 'static
type Error: Error + Send + Sync + 'static
The error type used in PayloadBuilderAttributes::try_new
.
Required Methods§
fn try_new(
parent: FixedBytes<32>,
rpc_payload_attributes: Self::RpcPayloadAttributes,
version: u8,
) -> Result<Self, Self::Error>where
Self: Sized,
fn try_new(
parent: FixedBytes<32>,
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.
fn payload_id(&self) -> PayloadId
fn payload_id(&self) -> PayloadId
Returns the unique identifier for this payload build job.
fn parent(&self) -> FixedBytes<32>
fn parent(&self) -> FixedBytes<32>
Returns the hash of the parent block this payload builds on.
fn parent_beacon_block_root(&self) -> Option<FixedBytes<32>>
fn parent_beacon_block_root(&self) -> Option<FixedBytes<32>>
Returns the beacon chain block root from the parent block.
Returns None
for pre-merge blocks or non-beacon contexts.
fn suggested_fee_recipient(&self) -> Address
fn suggested_fee_recipient(&self) -> Address
Returns the address that should receive transaction fees.
fn prev_randao(&self) -> FixedBytes<32>
fn prev_randao(&self) -> FixedBytes<32>
Returns the randomness value for this block.
fn withdrawals(&self) -> &Withdrawals
fn withdrawals(&self) -> &Withdrawals
Returns the list of withdrawals to be processed in this block.
Implementations on Foreign Types§
§impl PayloadBuilderAttributes for EthPayloadBuilderAttributes
impl PayloadBuilderAttributes for EthPayloadBuilderAttributes
§fn try_new(
parent: FixedBytes<32>,
attributes: PayloadAttributes,
_version: u8,
) -> Result<EthPayloadBuilderAttributes, Infallible>
fn try_new( parent: FixedBytes<32>, attributes: PayloadAttributes, _version: u8, ) -> Result<EthPayloadBuilderAttributes, Infallible>
Creates a new payload builder for the given parent block and the attributes.
Derives the unique [PayloadId
] for the given parent and attributes