Last updated date: Tuesday, January 14, 2025
Reference: Prysm PR #14754
While a Prysm node syncing to the head of the chain, a node may lack historical inclusion lists. However, it still needs to call engine_newPayloadV5
.
Action Item: Review the engine API definition to clarify constraints for same-slot scenarios.
The engine_newPayloadV5
API introduces a new argument, it's an inclusion list transactions
field (Array of DATA
). If any transactions are not part of the executionPayload
(even if they can be appended at the end), the API returns:
INVALID_INCLUSION_LIST
null
null
If a newly imported execution payload is marked INVALID_INCLUSION_LIST
, the Prysm node stores its block root as badInclusionListBlock
. It's just a single root, as an inclusion list only applies to the current slot, so no more than one root should be cached at a given time.
Prysm node adds a new function, FilteredHeadRoot
, which returns the filtered head root to be used for valiator duties. In the function, if the head root matches badInclusionListBlock
, it returns the parent block of that root. This method is used for:
beacon_block_root
.head_root
.parent_root
.Action Item:
get_proposer_head
for reorg late block, we should use that and have a consistence place to return head for validator duty.Prysm node has a new background routine (updateInclusionListBlockInterval
) for updating inclusion lists for execution layer block construction:
engine_updatePayloadWithInclusionListV1
with the existing payloadID
.payloadID
, which will be used for proposer at the slot of.This routine runs only if the node is the next slot proposer and a payloadID
already exists on top of headRoot
for currentSlot + 1
.
Action Item:
forkchoiceUpdated + attribute
to update inclusion listPrysm has added gossip validation for inclusion lists following the specification. Key points:
Action Item: Review and potentially reshuffle the gossip pipeline to address potential DoS concerns.
Inclusion lists are cached in Prysm node using the following structure:
map[primitives.Slot]map[primitives.ValidatorIndex]
[][]byte
(represents inclusion list transactions)seenTwice
, tracks repeated entries.The cache has these methods:
Add
: Adds an inclusion list entry. If an entry is added twice or more, seenTwice
is set to true
, and the original transactions are removed.SeenTwice
: Returns true
if the seenTwice
flag is active for a given slot and index.Get
: Returns all inclusion list transactions for a slot, excluding duplicates.Delete
: Deletes all inclusion list transactions for a slot.Design considerations:
Inclusion list duties are returned alongside beacon committee and proposer duties. Prysm provides a gRPC API for this but has not yet added support for the beacon API.
Action Item:
The GetInclusionList
endpoint:
InclusionList
with transactions and sync committee root filled.Note: it keeps the validator index empty. Inclusion list has a validator index field but validator client can just fill that themselves
Action Item: Cache inclusion list responses to prevent repeated execution client calls. Ensure the execution client doesn't prematurely remove transactions. The tradoff here is two seperate requests may produce the same outtime. Leaning towards client implementation detail.
Validator client changes are straightforward: