feat(spice): add certified light-client header fields (schema)#15963
Draft
darioush wants to merge 1 commit into
Draft
feat(spice): add certified light-client header fields (schema)#15963darioush 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-merkle-proof-1 #15963 +/- ##
====================================================================
- Coverage 72.52% 72.49% -0.03%
====================================================================
Files 946 946
Lines 204290 204367 +77
Branches 204290 204367 +77
====================================================================
+ Hits 148154 148159 +5
- Misses 51168 51242 +74
+ Partials 4968 4966 -2
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 two spice light-client fields to the block header and threads them through, with placeholder (default) production — the real values come from the certified accumulator in a later PR of this stack (marked
TODO(spice)inclient.rs).BlockHeaderInnerLiteV2(= classic inner-lite +certified_block_merkle_root+last_certified_block);BlockHeaderV7switches to it;compute_hash_and_signgeneralized over the inner-lite type.inner_lite()accessor withcertified_block_merkle_root()/last_certified_block()Option accessors.BlockHeaderInnerLiteViewgains the two fields as#[borsh(skip)]+ serde (keeps the persistedEpochLightClientBlockslayout intact);LightClientBlockLiteView::hash()is version-aware.Block::new,SpiceNewBlockProductionInfo,BlockHeaderView,TestBlockBuilder.No behavior change: nothing computes or validates the fields yet.
Testing
near-primitivesunit tests; existingnear-chainspice unit tests (placeholder production builds/processes spice blocks).2/6 of the SPICE light-client stack (#15947). Base: #15962.