You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(wasm-privacy-coin): thread owned flag into shardtree retention
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
|`ping()`|`void`| Verifies the WASM module is alive |
163
-
|`appendCommitments(long blockHeight, List<ShieldedCommitment> commitments)`|`ShieldedRoot`| Append cmx values, checkpoint the tree, return the new root |
|`ping()`|`void`| Verifies the WASM module is alive |
163
+
|`appendCommitments(long blockHeight, List<ShieldedCommitment> commitments, List<Boolean> owned, ShieldedRoot expectedRoot)`|`ShieldedRoot`| Append cmx values, checkpoint the tree; `owned` marks which commitments belong to this wallet (pass `List.of()` if unused); `expectedRoot` is optional root verification (pass `null` to skip) |
164
+
|`truncateToCheckpoint(long blockHeight)`|`ShieldedRoot`| Roll back to a prior checkpoint, return the root at that height |
165
+
|`save()`|`TreeState`| Serialize tree state for persistence |
166
+
|`getInfo()`|`MerkleTreeInfo`| Return tip height, leaf count, checkpoint count |
167
+
|`close()`|`void`| Drop the in-WASM tree and release the Chicory instance |
169
168
170
169
**`blockHeight`** must be in the range `[0, 4_294_967_295]` (Rust `u32`). Passing a
171
170
negative value or a value above `0xFFFFFFFFL` throws `IllegalArgumentException`
0 commit comments