refactor: move chain config to lstar fork spec#816
Closed
tcoratger wants to merge 1 commit into
Closed
Conversation
The chain and consensus configuration constants lived under node/chain/config.py, but they are protocol parameters that client teams must match, not node implementation details. Several spec/ modules already imported them from node/, an inverted dependency where the protocol-spec layer reached down into a specific node implementation. SSZ container bounds (HISTORICAL_ROOTS_LIMIT, MAX_ATTESTATIONS_DATA) and forkchoice/timing parameters belong with the fork they define. Move the file to spec/forks/lstar/config.py, scoping the constants to the lstar fork in line with the per-fork registry pattern, and update all import sites across src, tests, and packages/testing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Moves
node/chain/config.py→spec/forks/lstar/config.py.These constants are protocol parameters that client teams must match, not node implementation details. Yet several
spec/modules already imported them fromnode/— an inverted dependency where the protocol-spec layer reached down into a specific node implementation:The constants are all consensus-critical:
HISTORICAL_ROOTS_LIMIT,MAX_ATTESTATIONS_DATA) — must match exactly orhash_tree_rootdivergesSECONDS_PER_SLOT,INTERVALS_PER_SLOT,JUSTIFICATION_LOOKBACK_SLOTS,GOSSIP_DISPARITY_INTERVALS,ATTESTATION_COMMITTEE_COUNT)Scoping them to the lstar fork matches the per-fork registry pattern in
spec/forks/, since a future fork could change these values. (Genuinely node-local config —node/sync/config.py,node/genesis/config.py— correctly stays innode/.)Changes
git mvthe file (history preserved)src/,tests/, andpackages/testing/Verification
just checkpasses (ruff lint, format, ty, codespell, mdformat)🤖 Generated with Claude Code