CSHLD-1700: Build Ironwood witness auth-path from shard data in wasm-utxo - #387
Draft
abhi-bitgo wants to merge 1 commit into
Draft
CSHLD-1700: Build Ironwood witness auth-path from shard data in wasm-utxo#387abhi-bitgo wants to merge 1 commit into
abhi-bitgo wants to merge 1 commit into
Conversation
Callers previously had to pre-walk the full 32-level Orchard note-commitment tree to produce an Ironwood witness. This adds build_ironwood_witness_from_shard, which instead accepts a caller- supplied shard (dense leaves for one subtree + upper sibling hashes), folds the shard locally, and delegates to the existing build_ironwood_witness for canonical-encoding/anchor validation. Ticket: CSHLD-1700
Contributor
Author
|
@claude review this pr |
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.
Summary
Adds
build_ironwood_witness_from_shardtowasm-utxo, allowing callers to build a Zcash Orchard/Ironwood Merkle witness from a caller-supplied "shard" (dense leaves of one subtree + upper sibling hashes) instead of pre-walking the full 32-level note-commitment tree.Linear: CSHLD-1700
Changes
Cargo.toml: addincrementalmerkletreedependency (needed forHashable/Levelprimitives not re-exported byorchard)src/zcash/ironwood_build.rs:ShardWitnessInput, newIronwoodBuildErrorvariants,build_ironwood_witness_from_shard,shard_local_auth_pathhelper — reuses the existingbuild_ironwood_witnessfor canonical-encoding/anchor validation (no duplicated validation logic)src/wasm/zcash.rs:ironwood_build_witness_from_shardwasm-bindgen exportjs/fixedScriptWallet/ZcashIronwoodWitness.ts:buildFromShardstatic methodTest Plan
cargo test --workspace(631 passed, 0 failed)cargo clippy --all-targets --all-features -- -D warnings(clean)npm run build+ full mocha suite (1554 passing, 0 failing)