Skip to content

Commit db27c73

Browse files
tcoratgerclaude
andauthored
docs(fork-choice): trim drifted numbered overviews in docstrings (#1142)
Two docstrings carried numbered overview lists that duplicated the method bodies' own labeled section comments and had drifted out of sync. The attestation validation docstring listed seven checks while the body has six labeled sections. The block-processing docstring listed four steps but omitted the duplicate-data rejection and signature verification the body performs. Trim each numbered list to a single accurate summary line. The labeled body comments remain the source of truth. Docs-only change. just check passes. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent f5ba905 commit db27c73

1 file changed

Lines changed: 2 additions & 14 deletions

File tree

src/lean_spec/spec/forks/lstar/fork_choice.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,7 @@ def validate_attestation(self, store: LstarStore, attestation_data: AttestationD
179179
"""
180180
Validate incoming attestation before processing.
181181
182-
Ensures the vote respects the basic laws of time and topology:
183-
1. The blocks voted for must exist in our store.
184-
2. A vote cannot span backwards in time (source > target).
185-
3. The head must be at least as recent as source and target.
186-
4. Checkpoint slots must match the actual block slots.
187-
5. Source, target, and head must lie on one parent chain.
188-
6. The vote's slot cannot precede the slot of the head it claims to have seen.
189-
7. The vote's slot must have started locally (a small disparity margin is allowed).
182+
Ensures the vote respects the basic laws of time and topology.
190183
191184
Raises:
192185
SpecRejectionError: If the attestation fails any of the validation checks above.
@@ -528,12 +521,7 @@ def on_block(
528521
"""
529522
Process a new block and update the forkchoice state.
530523
531-
This method integrates a block into the forkchoice store by:
532-
533-
1. Validating the block's parent exists
534-
2. Computing the post-state via the state transition function
535-
3. Processing attestations included in the block body (on-chain)
536-
4. Updating the forkchoice head
524+
Integrates a block into the forkchoice store and recomputes the head.
537525
538526
Raises:
539527
SpecRejectionError: UNKNOWN_PARENT_BLOCK if the parent state is not in the store.

0 commit comments

Comments
 (0)