Skip to content

feat(fc): prove FC-8 stored histories mirror the block map - #63

Merged
adust09 merged 1 commit into
mainfrom
feat/fc8-history-alignment
Jul 20, 2026
Merged

feat(fc): prove FC-8 stored histories mirror the block map#63
adust09 merged 1 commit into
mainfrom
feat/fc8-history-alignment

Conversation

@adust09

@adust09 adust09 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Discharges the stored half of FC-7's residual hjnew hypothesis: an STF-advanced justified checkpoint always names an imported block at exactly its own slot. What remains is precisely the quorum-level assumption (hjdesc), now isolated and documented as the catalog's open frontier.

STF level (HistoryAlignment.lean)

  • transition_hist / transition_hist_size: the post-history is the parent history, then the parent root, then one zero hash per skipped slot — sized exactly to the block's slot.
  • transition_justified_on_chain: across a successful transition the justified checkpoint stays, anchors at slot 0 (genesis), or lands on the post-history at its own slot with a non-zero root. Extracted from the lies_on_chain filter through applyJustification and the attestation fold (liesOnChain_target pins target checkpoints to the history).

Store level (Store/ChainAlignment.lean)

  • Store.ChainAligned: stored histories are sized to their state's slot; every non-zero history entry names a stored block at exactly that slot; no stored state's justified slot outruns the store's.
  • applyBlock_chainAligned: the import writes preserve it — parent entries transfer across the grown map, the boundary entry is the parent block, the tail is zero hashes.
  • applyBlock_justified_stored: the discharged hjnew half (three-way index case analysis over the extended history).
  • onBlock_invariants (FC-8): on_block preserves WellFormed ∧ Aligned ∧ ChainAligned, composing the FC-6/FC-7 machinery with the new layer.

What deliberately remains

The descent half (hjdesc: an advanced justified checkpoint descends from the store's finalized checkpoint) is not a history fact: a competing fork's state can justify a checkpoint off the finalized subtree unless a 2/3-quorum argument (accountable safety) excludes conflicting supermajorities. Upstream's own M-1 invariant implicitly rests on the same assumption. Isolating it as a single named hypothesis is the point of this PR — the next milestone is the quorum/accountable-safety layer.

Catalog

FC-8 entry added; progress table now 34 proved / 1 axiom / 35 total.

Verification

lake build succeeds (39 jobs); #print axioms → standard axioms only; no sorry.

Discharges the stored half of FC-7's residual hjnew hypothesis: an
STF-advanced justified checkpoint always names an imported block at
its own slot. The descent half stays as the explicit quorum-level
assumption (hjdesc) — a competing fork's state can justify a
checkpoint off the finalized subtree unless a 2/3-quorum argument
(accountable safety) excludes conflicting supermajorities, which is
the catalog's known open frontier, not a history fact.

STF level (HistoryAlignment.lean):
- transition_hist / transition_hist_size: the post-history is the
  parent history, then the parent root, then one zero hash per skipped
  slot, sized to the block's slot.
- transition_justified_on_chain: the justified checkpoint stays,
  anchors at slot 0, or lands on the post-history at its own slot with
  a non-zero root — extracted from the lies_on_chain filter through
  applyJustification and the attestation fold.

Store level (Store/ChainAlignment.lean):
- Store.ChainAligned: stored histories are sized to their state's
  slot, every non-zero entry names a stored block at exactly that
  slot, and no stored state's justified slot outruns the store's.
- applyBlock_chainAligned: the import writes preserve it (parent
  entries transfer, the boundary entry is the parent block, the tail
  is zero hashes).
- applyBlock_justified_stored: the discharged hjnew half.
- onBlock_invariants (FC-8): on_block preserves
  WellFormed ∧ Aligned ∧ ChainAligned, composing FC-6/FC-7 machinery
  with the new layer.

Catalog: FC-8 entry added; progress table now 34 proved / 1 axiom.
@adust09
adust09 merged commit 3292f66 into main Jul 20, 2026
1 check passed
@adust09
adust09 deleted the feat/fc8-history-alignment branch July 20, 2026 12:24
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