Skip to main content
netspecsEthereum networking

4.5.2.Fork choice and payloads

Stage
In progress
Version
Sources
engine/paris.mde5d1bb6engine/shanghai.mde5d1bb6engine/cancun.mde5d1bb6engine/prague.mde5d1bb6engine/osaka.mde5d1bb6engine/amsterdam.mde5d1bb6EIPS/eip-8070.mdd8636a3
Related
Block productionBlob streamingEngine API connectionPayload validationBlock access listsEthereum networking

The consensus client sends the execution head, safe block, and finalized block through engine_forkchoiceUpdated. It may attach payload attributes to start a local payload build. engine_getPayload retrieves that build.

Fork-choice state

ForkchoiceStateV1 contains headBlockHash, safeBlockHash, and finalizedBlockHash. Zero means that the safe or finalized block is not yet known. safeBlockHash must be the head or one of its ancestors. The execution client rejects an inconsistent state with -38002 and may return -38006 when the requested reorganization is too deep. An unknown head or a head whose validation data is missing returns a SYNCING payload status. A zero safe or finalized hash is allowed until the transition block is finalized.

Fusaka build methods

engine_forkchoiceUpdatedV3 updates the execution chain and may start a build.

engine_getPayloadV5 returns an ExecutionPayloadV3, block value, a cell-proof BlobsBundleV2, a builder-override hint, and execution requests. The bundle’s blobs and commitments lists have equal length, and it carries 128 cell proofs for each blob. The cell proofs must verify against the cells derived from the returned blobs and their commitments.

Build lifecycle

When the fork-choice state is valid, the execution client applies it before it processes payload attributes. Valid attributes start a local build and return an eight-byte payload ID. The ID names short-lived build state. The consensus client may call engine_getPayload until its proposal deadline. An unknown or expired ID gives -38001; invalid attributes give -38003, and a timestamp for an unsupported fork gives -38005.

The consensus client validates the returned timestamp, parent, fee recipient, and every field present in the selected payload version before it uses the payload. This includes withdrawals, blob data, execution requests, or block access lists only when that version defines the field.

Failure handling

Wrong fork timing gives unsupported fork. Bad attributes give invalid payload attributes. A timeout does not prove that the execution client stopped the build. The consensus client can retry or use a separate valid builder path.

Design rationale

Fork choice and payload building share one call so the execution client builds on the exact head that the consensus client selected.