Skip to content

Commit 815c6a0

Browse files
Sword-Smithaszepieniec
authored andcommitted
feat(mmr): root from auth struct snippet
Add stub for calculating a Merkle root from an authentication struct. Also adds code to generate the witness. Cf. Neptune-Crypto/twenty-first#228
1 parent 1d2c50e commit 815c6a0

File tree

5 files changed

+1748
-2
lines changed

5 files changed

+1748
-2
lines changed

tasm-lib/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,9 @@ pub(crate) fn execute_test(
183183
terminal_state
184184
}
185185

186-
/// If the environment variable TASMLIB_TRITON_TUI is set, write the initial VM state
187-
/// to file `vm_state.json`.
186+
/// If the environment variable TASMLIB_TRITON_TUI is set, write
187+
/// 1. the program to file `program.tasm`, and
188+
/// 2. the VM state to file `vm_state.json`.
188189
///
189190
/// This file can be used to debug the program using the [Triton TUI]:
190191
/// ```sh

tasm-lib/src/mmr.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
pub mod authentication_struct;
12
pub mod bag_peaks;
23
pub mod calculate_new_peaks_from_append;
34
pub mod calculate_new_peaks_from_leaf_mutation;
45
pub mod leaf_index_to_mt_index_and_peak_index;
6+
pub mod root_from_authentication_struct;
57
pub mod verify_from_memory;
68
pub mod verify_from_secret_in_leaf_index_on_stack;
79
pub mod verify_from_secret_in_secret_leaf_index;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub mod shared;

0 commit comments

Comments
 (0)