Fix intervals per slot in CLAUDE.md from 4 to 5#219
Conversation
The spec and the Rust code both use 5 intervals per slot (0-4), but CLAUDE.md documented only 4 (0-3) with incorrect descriptions. Update the tick-based validator duties section and the attestation pipeline interval references to match the actual implementation.
🤖 Kimi Code ReviewLooking at this PR diff, I need to review the changes to the validator duty timing documentation in Review SummaryThe changes update the tick-based validator duty intervals from 4 to 5 intervals per 4-second slot. This is a documentation-only change, but it's critical for consensus correctness. Issues Found1. Inconsistency in Interval 0 DescriptionFile: Suggestion: Clarify the exact sequence. Does the proposer check happen first? When exactly is the block built and published? 2. Missing Context for Interval 1File: Suggestion: Either explain what passive vote propagation means, or clarify why this interval exists. 3. Aggregation Timing ConcernFile: Suggestion: Verify this timing aligns with the actual implementation. Interval 2 might be too early for meaningful aggregation. 4. Attestation Pipeline UpdateFile: Suggestion: Update to "↓ (interval 4)" only, as interval 0 is primarily for block proposal. Positive Aspects
Automated review by Kimi (Moonshot AI) · custom prompt |
🤖 Codex Code ReviewNo code-level findings in this PR.
Residual risk / gap:
Automated review by OpenAI Codex · custom prompt |
🤖 Claude Code ReviewPR 219 Review: Fix intervals per slot in CLAUDE.md from 4 to 5Scope: Documentation-only change to Correctness VerificationI cross-checked every change against the live implementation:
pub const INTERVALS_PER_SLOT: u64 = 5;Interval descriptions — confirmed against the
Attestation Pipeline // head may change when attestations are promoted at intervals 0/4AssessmentAll changes are accurate and properly supported by the implementation. The PR description is thorough, including a clear table mapping old vs. new descriptions. No issues found. Approved — clean, correct documentation fix. Automated review by Claude (Anthropic) · custom prompt |
Greptile SummaryThis PR fixes stale documentation in
Confidence Score: 4/5
|
| Filename | Overview |
|---|---|
| CLAUDE.md | Documentation-only change: fixes interval count (4→5) and descriptions to match actual implementation in store.rs and lib.rs, and corrects the attestation pipeline interval reference (0/3→0/4). Interval 1 description is slightly ambiguous. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
T[Tick Event] --> CALC[Calculate slot & interval]
CALC --> I0{Interval 0}
CALC --> I1{Interval 1}
CALC --> I2{Interval 2}
CALC --> I3{Interval 3}
CALC --> I4{Interval 4}
I0 -->|has_proposal?| ACC0[accept_new_attestations\nstore.rs]
I0 --> PROP[propose_block\nlib.rs]
I1 --> ATTEST[produce_attestations\nlib.rs\nnon-proposers sign + gossip]
I2 -->|is_aggregator?| AGG[aggregate_committee_signatures\nstore.rs]
I3 --> SAFE[update_safe_target\nstore.rs]
I4 --> ACC4[accept_new_attestations\nlog fork-choice tree\nstore.rs]
ACC0 --> HEAD[update_head]
ACC4 --> HEAD
Prompt To Fix All With AI
This is a comment left during a code review.
Path: CLAUDE.md
Line: 51
Comment:
**Interval 1 description loses accuracy**
The new description "Vote propagation (no action)" matches only the *store's* perspective — `store.rs` has an empty match arm for interval 1 with that exact comment. However, `lib.rs:137-140` shows that `BlockChainServer::on_tick` **does** actively call `produce_attestations(slot)` at interval 1, signing and publishing attestations to the gossip network for all non-proposer validators.
The previous wording — "Non-proposers produce attestations" — more accurately described the overall system behavior at this interval. Saying "(no action)" risks misleading developers into thinking nothing happens at interval 1.
Consider a description that captures both layers:
```suggestion
Interval 1: Vote propagation (non-proposers produce and gossip attestations)
```
How can I resolve this? If you propose a fix, please make it concise.Last reviewed commit: 662ca2f
Motivation
A spec-to-code compliance audit (FINDING-006) identified stale documentation in CLAUDE.md. The spec (
config.pyINTERVALS_PER_SLOT=5) and the Rust code (lib.rs:35) both use 5 intervals per slot, but CLAUDE.md documented only 4 with incorrect interval descriptions.Description
Updates two sections in CLAUDE.md:
Tick-Based Validator Duties — fixes the header from "4 intervals per slot" to "5 intervals per slot" and corrects the interval descriptions to match the actual implementation:
Attestation Pipeline — fixes the interval reference from "intervals 0/3" to "intervals 0/4" for attestation promotion.
How to Test
Documentation-only change.