Skip to content

ePBS devnet 0 branch#16432

Open
terencechain wants to merge 17 commits intodevelopfrom
epbs-devnet-0
Open

ePBS devnet 0 branch#16432
terencechain wants to merge 17 commits intodevelopfrom
epbs-devnet-0

Conversation

@terencechain
Copy link
Collaborator

This branch contains bug fixes and anything added here, unless it is prototyping or experimenting with new ideas, should be merged into develop as soon as possible

@terencechain terencechain force-pushed the epbs-devnet-0 branch 3 times, most recently from 2232838 to 1fe0cab Compare March 5, 2026 04:18
terencechain and others added 17 commits March 5, 2026 19:24
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants