feat(spice): certified accumulator ordinal index + inclusion proofs#15966
Draft
darioush wants to merge 1 commit into
Draft
feat(spice): certified accumulator ordinal index + inclusion proofs#15966darioush wants to merge 1 commit into
darioush wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## darioush/spice-lc-commit-validate-4 #15966 +/- ##
=======================================================================
+ Coverage 72.52% 72.53% +0.01%
=======================================================================
Files 947 947
Lines 204612 204741 +129
Branches 204612 204741 +129
=======================================================================
+ Hits 148396 148518 +122
+ Misses 51235 51229 -6
- Partials 4981 4994 +13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the canonical per-ordinal index over the certified accumulator and the light-client inclusion-proof generation anchored to it.
CertifiedAccumulatorByOrdinal(ordinal -> frontier-before-leaf + leaf hash) andCertifiedBlockLeafOrdinal(block -> ordinal).index_canonical_certified_leaves: re-points the ordinal index along the canonical chain only (frompostprocess_blockwhen the block is canonical, and fromupdate_height's reorg walk), so orphaned forks can't pollute proofs.compute_certified_block_proof(reusing the sharedcompute_merkle_path_by_ordinalhelper) andChain::spice_block_header_lite_and_proof.Testing
test_certified_block_proof_unaffected_by_side_fork: a losing fork re-certifies a block with different roots; the canonical proof still verifies.test_certified_block_proof_follows_reorg: a heavier fork wins and the ordinal index re-points; a proof against the new head verifies against the fork's root and differing leaf.5/6 of the SPICE light-client stack (#15947). Base: #15965.