Skip to content

Beacon node never publishes payload_attributes events #822

Open

Description

@MegaRedHand

Summary

GET /eth/v1/events?topics=payload_attributes is accepted (Topic::PayloadAttributes, crates/blockchain/src/events.rs), but nothing ever publishes that topic: ChainEvent has no variant for it. A subscriber gets a stream that stays silent.

There is also nothing to publish yet. The beacon node sends payload attributes to the execution client only while serving produceBlockV3/produceBlockV4 (crates/net/rpc/src/beacon/proposal.rs, gloas_proposal.rs), not ahead of the slot.

Where it shows up

External block builders build from this stream. In ethereum-package, mev_type: buildoor reads the first participant's stream, and apply_buildoor_payload_attributes_flags turns on every-slot emission for the other clients (Lighthouse --always-prepare-payload, Teku --Xfork-choice-updated-always-send-payload-attributes=true, Lodestar --emitPayloadAttributes=true, Prysm --prepare-all-payloads; Nimbus needs no flag). With an ethlambda node in that position, or a buildoor_params.instances entry attached to an ethlambda node, buildoor never builds a block.

Proposal

  1. Compute the next slot's payload attributes ahead of the slot (a lookahead, like Lighthouse's --prepare-payload-lookahead) for proposers registered through prepare_beacon_proposer, and for every slot behind an opt-in flag such as --always-prepare-payload.
  2. Publish a payload_attributes event each time, in the Beacon API's shape: version, plus data.proposer_index, proposal_slot, parent_block_number, parent_block_root, parent_block_hash and the fork's payload_attributes (the same V3/V4 attributes produceBlockV3/V4 already build).
  3. Possible follow-up: send the early forkchoiceUpdated with those attributes, so the execution client starts building before the produceBlock request arrives. That is what the lookahead is for in other clients.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions