rpc/validator: implement PayloadAttestationData and SubmitPayloadAttestation gRPC endpoints#16487
Merged
Conversation
06aee3d to
e522052
Compare
Contributor
|
nil pointer error on TestSubmitPayloadAttestation_OK |
james-prysm
reviewed
Mar 6, 2026
| "payload attestation data is only available for current slot: requested %d, current %d", slot, currentSlot) | ||
| } | ||
|
|
||
| highestReceivedSlot := vs.ForkchoiceFetcher.HighestReceivedBlockSlot() |
Contributor
There was a problem hiding this comment.
There's 3 consencutive fork choice calls here, is this safe to assume they will be aligned or is there a potential change between any of these?
Collaborator
Author
There was a problem hiding this comment.
Yes, i think the risk is very small such that dont worth the refactor
james-prysm
reviewed
Mar 6, 2026
| BeaconBlockRoot: root[:], | ||
| Slot: slot, | ||
| PayloadPresent: payloadPresent, | ||
| BlobDataAvailable: payloadPresent, |
Contributor
There was a problem hiding this comment.
is this always the case or is this a todoitem to update when da paths are mapped out
james-prysm
reviewed
Mar 6, 2026
| return nil, status.Errorf(codes.InvalidArgument, | ||
| "payload attestations are not supported before Gloas fork (slot %d)", msg.Data.Slot) | ||
| } | ||
| if vs.SyncChecker.Syncing() { |
Contributor
There was a problem hiding this comment.
nit , this is usually the first check
8e36862 to
1f20157
Compare
Introduces the payload timeliness committee (PTC) attestation pool. The pool aggregates PayloadAttestationMessages by PayloadAttestationData (keyed by SSZ hash tree root), maintains aggregation bitvectors, and exposes PendingPayloadAttestations for proposer block construction.
…n gRPC endpoints Implements the beacon node gRPC server side of PTC (Payload Timeliness Committee) attestation flow: - PayloadAttestationData: returns current-slot attestation data using HighestReceivedBlockRoot and HasFullNode from forkchoice - SubmitPayloadAttestation: validates, broadcasts, applies locally via ReceivePayloadAttestationMessage, and inserts into the payload attestation pool Also adds HighestReceivedBlockRoot and HasFullNode to the ForkchoiceFetcher interface with corresponding Service implementations, wires PayloadAttestationPool and PayloadAttestationReceiver through the RPC service config and node, and extends the proto with PayloadAttestationDataRequest and the two new service RPCs.
1f20157 to
7f0e134
Compare
7f0e134 to
6c84f90
Compare
james-prysm
approved these changes
Mar 7, 2026
james-prysm
left a comment
Contributor
There was a problem hiding this comment.
did a second pass seems ok, my feedback was added.
syjn99
pushed a commit
to syjn99/prysm
that referenced
this pull request
Mar 13, 2026
…station gRPC endpoints (OffchainLabs#16487) - This PR adds the payload attestation prototype flow. - On the proto side it introduces `PayloadAttestationDataRequest` and two RPC methods on `BeaconNodeValidator`: `PayloadAttestationData` and `SubmitPayloadAttestation`. - The `ForkchoiceFetcher` interface is extended with `HighestReceivedBlockRoot() [32]byte`, which returns the beacon block root at the highest received slot and is used to determine which block PTC members attest to, and `HasFullNode([32]byte) bool`, which indicates whether a full payload node exists for a given root and determines the `PayloadPresent` field in the response. - The RPC server implementation lives in `beacon-chain/rpc/prysm/v1alpha1/validator/payload_attestation.go`. `PayloadAttestationData` validates the current slot, checks sync status, and returns attestation data using the forkchoice helpers, while `SubmitPayloadAttestation` validates the request, broadcasts it over P2P, applies it locally through `ReceivePayloadAttestationMessage`, and inserts it into the payload attestation pool. Wiring adds `PayloadAttestationPool` and `PayloadAttestationReceiver` to `Server`, `rpc.Config`, and `BeaconNode`, with the pool instantiated in `node.New()`. - Both RPCs are marked `deprecated = true` since this prototype will eventually move to the beacon REST API.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PayloadAttestationDataRequestand two RPC methods onBeaconNodeValidator:PayloadAttestationDataandSubmitPayloadAttestation.ForkchoiceFetcherinterface is extended withHighestReceivedBlockRoot() [32]byte, which returns the beacon block root at the highest received slot and is used to determine which block PTC members attest to, andHasFullNode([32]byte) bool, which indicates whether a full payload node exists for a given root and determines thePayloadPresentfield in the response.beacon-chain/rpc/prysm/v1alpha1/validator/payload_attestation.go.PayloadAttestationDatavalidates the current slot, checks sync status, and returns attestation data using the forkchoice helpers, whileSubmitPayloadAttestationvalidates the request, broadcasts it over P2P, applies it locally throughReceivePayloadAttestationMessage, and inserts it into the payload attestation pool. Wiring addsPayloadAttestationPoolandPayloadAttestationReceivertoServer,rpc.Config, andBeaconNode, with the pool instantiated innode.New().deprecated = truesince this prototype will eventually move to the beacon REST API.