Skip to content

Commit 9042065

Browse files
committed
feat(mmr_auth_struct): root_from_authentication_struct algorithm
Add a function to calculate a Merkle root from an authentication struct in a way that conductive to ZK calculations. And add a function to generate the relevant witness data for this calculation. The authentication structure is a list of digests that is identical to what can be found in `authentication_structure` field in the `MerkleTreeInclusionProof`. With appropriate witness structure, this authentication structure can be verified faster than verifying each individual leaf in an MMR, we hope. This `root_from_authentication_struct` function now needs to be implemented in `tasm-lib` to see if this actually gives shorter programs in Triton-VM. The purpose of this cryptography is to speed up the program that verifies that no double-spends are occurring. See #228.
1 parent 80a5bec commit 9042065

File tree

2 files changed

+443
-0
lines changed

2 files changed

+443
-0
lines changed

twenty-first/src/util_types/mmr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
pub mod mmr_accumulator;
2+
pub mod mmr_authentication_struct;
23
pub mod mmr_membership_proof;
34
pub mod mmr_successor_proof;
45
pub mod mmr_trait;

0 commit comments

Comments
 (0)