Skip to content

test(fc): block builder fixed-point justification loop#587

Merged
tcoratger merged 3 commits intoleanEthereum:mainfrom
latifkasuli:test/564-block-builder-fixed-point
Apr 11, 2026
Merged

test(fc): block builder fixed-point justification loop#587
tcoratger merged 3 commits intoleanEthereum:mainfrom
latifkasuli:test/564-block-builder-fixed-point

Conversation

@latifkasuli
Copy link
Copy Markdown
Contributor

Summary

  • Adds a fork-choice filler that exercises the multi-pass fixed-point loop in State.build_block, where processing attestation A advances current_justified and unlocks attestation B whose source was previously ineligible.
  • Uses GossipAggregatedAttestationStep with explicit source_root_label overrides and tick-based payload migration to correctly model attestations with different source checkpoints reaching latest_known_aggregated_payloads before block production.
  • Includes a mid-test attestation_checks checkpoint on the TickStep to localize future failures between payload migration and fixed-point block building.

Test plan

  • uv run fill --fork=devnet --clean -n auto -k test_block_builder_fixed_point passes
  • Full suite uv run fill --fork=devnet --clean -n auto passes (124/124)
  • ruff format and ruff check clean

Closes #564

Exercise the multi-pass behavior of `State.build_block` where processing
attestation A advances `current_justified`, unlocking attestation B whose
source was previously ineligible.

Closes leanEthereum#564
tcoratger and others added 2 commits April 11, 2026 16:46
- Rewrite test_block_production.py docstring: trim from 60 to 28 lines,
  remove framework internals, use bullets and code-block diagrams
- Replace all banner separator comments (# ── ... ──) with plain headings
- Remove all backtick references from comments and docstrings
- Move education into inline comments glued to each step:
  concrete threshold arithmetic, ASCII chain diagrams, structured
  labels (Invariant:, Why:, Timing:), pass-by-pass finalization trace
- Fix incorrect "pronic: 1x2" claim to "immediate window (delta <= 5)"
- Add attestation_slot=Slot(5) to AggregatedAttestationCheck entries
- Add latest_justified_slot check on block_4 for tighter baseline
- Add CLAUDE.md rule banning backtick references in comments/docstrings

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tcoratger tcoratger merged commit b80f58d into leanEthereum:main Apr 11, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(fc): block builder fixed-point loop advances justification mid-build

2 participants