cl: add per-directory spec maps for Caplin consensus code#21400
Merged
Conversation
The previous commit dropped these two Gloas forkchoice.go functions and their on_execution_payload_envelope spec mapping when adding the Fulu fork-choice entries. They still exist at forkchoice.go:730,736 and are used by the payload/envelope processing path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move forkchoice spec map to cl/phase1/forkchoice/CLAUDE.md and add new spec maps for state transition (cl/transition/CLAUDE.md) and beacon state helpers (cl/phase1/core/state/CLAUDE.md). The top-level cl/CLAUDE.md now serves as a concise overview linking to the subdirectory files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds per-directory CLAUDE.md “spec maps” for Caplin consensus-critical code to make agent/human reviews easier to ground against the upstream Ethereum consensus specifications.
Changes:
- Add a concise top-level
cl/CLAUDE.mdthat links to spec maps per subdirectory. - Add spec-map + checklist docs for fork choice (
cl/phase1/forkchoice/), state transition (cl/transition/), and beacon state helpers (cl/phase1/core/state/).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cl/CLAUDE.md | Top-level entrypoint linking to per-directory spec maps and cross-cutting review principles |
| cl/phase1/forkchoice/CLAUDE.md | Fork-choice spec map + Fulu/Gloas review notes + checklist |
| cl/transition/CLAUDE.md | State transition spec map across pipeline, operations, and epoch processing + checklist |
| cl/phase1/core/state/CLAUDE.md | Beacon state helper accessor/mutator spec map + checklist |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+9
to
+15
| - Phase0 fork choice: https://ethereum.github.io/consensus-specs/phase0/fork-choice/ | ||
| - Bellatrix fork choice: https://ethereum.github.io/consensus-specs/bellatrix/fork-choice/ | ||
| - Deneb fork choice: https://ethereum.github.io/consensus-specs/deneb/fork-choice/ | ||
| - Electra fork choice changes are inherited through Bellatrix/Deneb `on_block` | ||
| execution-request plumbing and beacon-chain state transition rules. | ||
| - Fulu fork choice: https://ethereum.github.io/consensus-specs/fulu/fork-choice/ | ||
| - Gloas fork choice: https://ethereum.github.io/consensus-specs/gloas/fork-choice/ |
AskAlexSharov
approved these changes
May 26, 2026
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.
Summary
cl/CLAUDE.mdinto per-directory spec maps so each consensus-critical subdirectory has its own function-to-spec mapping and review checklistcl/CLAUDE.md→ concise top-level overview linking to subdirectoriescl/phase1/forkchoice/CLAUDE.md→ forkchoice spec map (Phase0 through Gloas/Fulu)cl/transition/CLAUDE.md→ state transition: block operations + epoch processingcl/phase1/core/state/CLAUDE.md→ beacon state accessors, mutators, cache helpersMotivation
Agent-assisted code changes in consensus-critical areas need spec grounding. Without function-level spec mappings, agents (and humans) can make changes that look locally correct but deviate from the spec — e.g., substituting a full list where the spec intentionally uses a partial accumulator.
Test plan
🤖 Generated with Claude Code