Skip to content

Smart block deconstruction#1170

Merged
tcoratger merged 2 commits into
mainfrom
source-based-deconstruct
Jul 7, 2026
Merged

Smart block deconstruction#1170
tcoratger merged 2 commits into
mainfrom
source-based-deconstruct

Conversation

@anshalshukla

Copy link
Copy Markdown
Collaborator

🗒️ Description

We were doing naive deconstruction of all the blocks that were being imported, instead we can only focus on attestations that can have source as state's latest justified as those can be packed to move chain's justified and finalized ahead.

🔗 Related Issues or PRs

✅ Checklist

  • Ran local quality checks to avoid unnecessary CI fails:
    just check
  • Considered adding appropriate tests for the changes.
  • Considered updating the online docs in the ./docs/ directory.

anshalshukla and others added 2 commits July 1, 2026 01:48
Address review feedback on the source-based deconstruction change:

- Guard the head-state lookup with a None check and early return,
  matching the parent-state guard, so a pruned head state no longer
  raises during block import.
- Type the participant union set as set[ValidatorIndex].
- Correct the source-filter rationale comment: a future block on this
  head can only pack votes anchored on this head's justified checkpoint;
  older-source votes can no longer advance justification and are dropped.
- Fix the stale test comment that claimed deconstruction runs for every
  processed block; it now runs only for a synced aggregator.
- Assert the recovered aggregate as a whole object instead of piecewise.
- Add process_block coverage for the synced-aggregator gate across its
  three outcomes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@tcoratger tcoratger merged commit 74370a2 into main Jul 7, 2026
14 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.

2 participants