Skip to content

Commit

Permalink
feat(mmr_auth_struct): root_from_authentication_struct algorithm
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Sword-Smith committed Aug 8, 2024
1 parent 80a5bec commit 9042065
Show file tree
Hide file tree
Showing 2 changed files with 443 additions and 0 deletions.
1 change: 1 addition & 0 deletions twenty-first/src/util_types/mmr.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pub mod mmr_accumulator;
pub mod mmr_authentication_struct;
pub mod mmr_membership_proof;
pub mod mmr_successor_proof;
pub mod mmr_trait;
Expand Down
Loading

0 comments on commit 9042065

Please sign in to comment.