Parent Issue
#827
Summary
Organize event commitments into a Merkle tree so users can prove membership of individual events without revealing the full log.
Details
- Each new commitment is appended as a leaf to a Merkle tree
- Contract stores only the Merkle root (updated incrementally)
- User can generate a Merkle proof for any leaf (event) they know
- Verifier checks:
MerkleVerify(root, leaf, proof) == true
- Tree is append-only (no deletions)
Affected Code
- New:
contracts/contracts/subscription_logging/src/merkle.rs
shared/src/crypto/merkle.ts — client-side proof generation
backend/src/services/blockchain-service.ts — maintain local copy of tree
Acceptance Criteria
Parent Issue
#827
Summary
Organize event commitments into a Merkle tree so users can prove membership of individual events without revealing the full log.
Details
MerkleVerify(root, leaf, proof) == trueAffected Code
contracts/contracts/subscription_logging/src/merkle.rsshared/src/crypto/merkle.ts— client-side proof generationbackend/src/services/blockchain-service.ts— maintain local copy of treeAcceptance Criteria