Crate payload
Expand description
This crate defines abstractions to create and update payloads (blocks)
Enums§
- Engine
ApiMessage Version - The version of Engine API message.
- Engine
Object Validation Error - Thrown when the payload or attributes are known to be invalid before processing.
- Invalid
Payload Attributes Error - Thrown when validating the correctness of a payloadattributes object.
- Message
Validation Kind - A type that represents whether or not we are validating a payload or payload attributes.
- NewPayload
Error - Error validating payload received over
newPayload
API. - Payload
Builder Error - Possible error variants during payload building.
- Payload
Kind - Determines how we should choose the payload to return.
- Payload
OrAttributes - Either a type that implements the
ExecutionPayload
or a type that implements thePayloadAttributes
trait. - Version
Specific Validation Error - Thrown when validating an execution payload OR payload attributes fails due to:
Traits§
- Built
Payload - Represents a built payload type that contains a built
SealedBlock
and can be converted into engine API execution payloads. - Execution
Payload - An execution payload.
- Payload
Attributes - The execution payload attribute type the CL node emits via the engine API. This trait should be implemented by types that could be used to spawn a payload job.
- Payload
Attributes Builder - A builder that can return the current payload attribute.
- Payload
Builder Attributes - This can be implemented by types that describe a currently running payload job.
- Payload
Types - The types that are used by the engine API.
Functions§
- validate_
execution_ requests - Validates that execution requests are valid according to Engine API specification.
- validate_
parent_ beacon_ block_ root_ presence - Validate the presence of the
parentBeaconBlockRoot
field according to the given timestamp. This method is meant to be used with either apayloadAttributes
field or a full payload, with theengine_forkchoiceUpdated
andengine_newPayload
methods respectively. - validate_
payload_ timestamp - Validates the timestamp depending on the version called:
- validate_
version_ specific_ fields - Validates the presence or exclusion of fork-specific fields based on the ethereum execution payload, or payload attributes, and the message version.
- validate_
withdrawals_ presence - Validates the presence of the
withdrawals
field according to the payload timestamp. After Shanghai, withdrawals field must be Some. Before Shanghai, withdrawals field must be None;