Skip to content

fix(lean): reject malformed justification state with typed errors#1496

Open
perfogic wants to merge 3 commits into
ReamLabs:masterfrom
perfogic:fix/lean-justifiability-conformance
Open

fix(lean): reject malformed justification state with typed errors#1496
perfogic wants to merge 3 commits into
ReamLabs:masterfrom
perfogic:fix/lean-justifiability-conformance

Conversation

@perfogic

@perfogic perfogic commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

What was wrong?

Address leanSpec #1178

TLDR:

  • is_justifiable_after is now total: below-finalized slots return false instead of erroring, and the fixture runner supports signed deltas for those cases.
  • process_attestations now rejects malformed justification bookkeeping before unpacking, including vote-list length mismatch and zero-hash roots.

How was it fixed?

  • Made is_justifiable_after total by returning false for slots before finalization.
  • Updated the justifiability runner to support signed deltas from leanSpec 1178.
  • Added malformed justification-state guards for vote-list length mismatch and zero-hash roots.
  • Added direct tests for below-finalized slots and attestation senarios.

To-Do

@perfogic perfogic changed the title Fix/lean justifiability conformance fix(lean): reject malformed justification state with typed errors Jul 5, 2026
@perfogic perfogic marked this pull request as ready for review July 5, 2026 08:24
@perfogic perfogic self-assigned this Jul 6, 2026
@perfogic perfogic force-pushed the fix/lean-justifiability-conformance branch from 73b1436 to be75fcf Compare July 7, 2026 18:43
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.

1 participant