Skip to main content

Module valid_payload

Module valid_payload 

Source
Expand description

This is an extension trait for any provider that implements the engine API, to wait for a VALID response. This is useful for benchmarking, as it allows us to wait for a payload to be valid before sending additional calls.

Structsยง

NewPayloadTimingBreakdown ๐Ÿ”’
Server-side timing breakdown from reth_newPayload endpoint.
RethPayloadStatus ๐Ÿ”’
Response from reth_newPayload endpoint, which includes server-measured latency.

Traitsยง

EngineApiValidWaitExt
An extension trait for providers that implement the engine API, to wait for a VALID response.

Functionsยง

block_to_new_payload ๐Ÿ”’
Converts an RPC block into versioned engine API params and an [ExecutionData].
call_forkchoice_updated ๐Ÿ”’
Calls the correct engine_forkchoiceUpdated method depending on the given EngineApiMessageVersion, using the provided forkchoice state and payload attributes for the actual engine api message call.
call_forkchoice_updated_with_reth ๐Ÿ”’
Calls either reth_forkchoiceUpdated or the standard engine_forkchoiceUpdated* depending on use_reth.
call_new_payload ๐Ÿ”’
Calls the correct engine_newPayload method depending on the given [ExecutionPayload] and its versioned variant. Returns the EngineApiMessageVersion depending on the payloadโ€™s version.
call_new_payload_with_reth ๐Ÿ”’
Calls either engine_newPayload* or reth_newPayload depending on whether version is provided.
payload_to_new_payload ๐Ÿ”’
Converts an execution payload and sidecar into versioned engine API params and an [ExecutionData].