CSHLD-1208: Add retention flags when appending commitments in Merkle tree logic#319
Open
Ranjna-G wants to merge 1 commit into
Open
CSHLD-1208: Add retention flags when appending commitments in Merkle tree logic#319Ranjna-G wants to merge 1 commit into
Ranjna-G wants to merge 1 commit into
Conversation
Per-commitment ownership booleans are now threaded from the proto wire format into the Rust shardtree append path. Owned leaves are assigned Retention::Marked so the shardtree preserves their witness paths; non-owned leaves remain Retention::Ephemeral (or Checkpoint for the last commitment in a block). Ticket: CSHLD-1208
OttoAllmendinger
requested changes
Jul 16, 2026
Comment on lines
+5
to
+6
| import com.fasterxml.jackson.databind.JsonNode; | ||
| import com.fasterxml.jackson.databind.ObjectMapper; |
Contributor
There was a problem hiding this comment.
where does json come from here? I though we were using protobuf for WASM communication?
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
Threads per-commitment ownership booleans from the proto wire format through the Rust shardtree append path, assigning
Retention::Markedto owned leaves so the shardtree preserves their witness paths for future inclusion-proof generation.Linear: CSHLD-1208
Changes
proto/privacy_coin.proto: addrepeated bool owned = 4toAppendCommitmentsRequestsrc/zcash/tree.rs: acceptowned: Vec<bool>; assignMarking::Markedfor owned leaves,Marking::Noneotherwisesrc/lib.rs: extractreq.ownedand pass totree.append_commitmentsShieldedMerkleTree.java: addList<Boolean> ownedparameter toappendCommitments; removed backward-compatible overloadsShieldedMerkleTreeTest.java: add f-flag assertions verifyingMARKED(f=2) andCHECKPOINT|MARKED(f=3) on owned leavespom.xml: addjackson-databindtest-scoped dependency for JSON tree state parsing in testsTest Plan
make jarrebuilds the WASM binary with the Rust changesmake test-javarunsShieldedMerkleTreeTestincluding the two new retention-flag testsCLOSES TICKET: CSHLD-1208