Open
Conversation
2232838 to
1fe0cab
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
**What type of PR is this?** Feature **What does this PR do? Why is it needed?** Implements the `ExecutionPayloadEnvelopesByRoot v1` RPC method as specified in the https://github.com/ethereum/consensus-specs/blob/master/specs/gloas/p2p-interface.md#executionpayloadenvelopesbyroot-v1. This allows peers to request signed execution payload envelopes by their beacon block root. This is a cache-only initial implementation. TODO in follow up work: DB storage **Which issues(s) does this PR fix?** Fixes # **Other notes for review** **Acknowledgements** - [ ] I have read [CONTRIBUTING.md](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md). - [ ] I have included a uniquely named [changelog fragment file](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md#maintaining-changelogmd). - [ ] I have added a description with sufficient context for reviewers to understand this PR. - [ ] I have tested that my changes work as expected and I added a testing plan to the PR description (if applicable).
Add PayloadWeights method to forkchoice that returns the empty and full payload node weights for a given root. Use it in logNonCanonicalBlockReceived to help debug cases where head gets stuck due to empty vs full weight distribution. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This adds a new helper to obtain head information from forkchoice.⚠️ It does not recompute Head as that is expensive. It uses the cached head node from forkchoice. An attester calls it by passing the attestation slot. It will return the right combination of the beacon block root and the payload content. Attester needs to set committee index to 0 if false and 1 if true. A proposer calls it by passing the current slot. It will tell it whether to build on full or empty.
Add gloas support for updated committee index in attestation data for gRPC and REST endpoints. Attesters set committee index based on payload status from forkchoice canonical node information. Co-Authored-By: james-prysm <james@prysmaticlabs.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The attestationIndex function added in #16391 calls ChainInfoFetcher.CanonicalNodeAtSlot, but ChainInfoFetcher was never set when constructing core.Service, causing a nil pointer panic on every GetAttestationData call post-Gloas. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Post-Gloas, SaveState and the next-slot cache are keyed by execution block hash as well of beacon block root. Thread an accessRoot through getStateAndBlock (for StateByRoot) and getPayloadAttribute (for ProcessSlotsUsingNextSlotCache) so each caller can supply the right key. Add FullHead to forkchoice: it returns the head root, the block hash of the nearest full payload (walking up to an ancestor when the head is empty), and whether the head itself is full. This gives callers enough information to derive the correct accessRoot. Rework UpdateHead to call FullHead and branch on post-Gloas: the Gloas path computes accessRoot from the full block hash and sends FCU via notifyForkchoiceUpdateGloas; the legacy path keeps the existing forkchoiceUpdateWithExecution flow. saveHead and pruneAttsFromPool now use local variables instead of the removed shared fcuArgs. Flatten the else branch in lateBlockTasks so the Gloas path returns early and the pre-Gloas path runs at the top indentation level. In postPayloadHeadUpdate pass the envelope's block hash as accessRoot since the state was just saved under that key.
In the event of a late missing Payload, we add a helper that updates the beacon block post state in the NSC as well as handling the boundary caches and calling FCU if we are proposing next slot.
5c83c93 to
2912651
Compare
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.
This branch contains bug fixes and anything added here, unless it is prototyping or experimenting with new ideas, should be merged into
developas soon as possible