Skip to content

Commit

Permalink
signoff!: Leaf index to Merkle tree index
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Remove the implementation of `DeprecatedSnippet` for
`MmrLeafIndexToMtIndexAndPeakIndex`, implement `BasicSnippet` directly.
  • Loading branch information
jan-ferdinand committed Dec 19, 2024
1 parent 7e3ece2 commit 565ea09
Show file tree
Hide file tree
Showing 8 changed files with 208 additions and 337 deletions.
16 changes: 8 additions & 8 deletions tasm-lib/benchmarks/tasm_lib_mmr_verify_mmr_successor.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
{
"name": "tasm_lib_mmr_verify_mmr_successor",
"benchmark_result": {
"clock_cycle_count": 23395,
"hash_table_height": 3750,
"u32_table_height": 9293,
"op_stack_table_height": 14336,
"clock_cycle_count": 23139,
"hash_table_height": 3744,
"u32_table_height": 9291,
"op_stack_table_height": 13888,
"ram_table_height": 473
},
"case": "CommonCase"
},
{
"name": "tasm_lib_mmr_verify_mmr_successor",
"benchmark_result": {
"clock_cycle_count": 69618,
"hash_table_height": 12300,
"u32_table_height": 17883,
"op_stack_table_height": 40764,
"clock_cycle_count": 69122,
"hash_table_height": 12294,
"u32_table_height": 17851,
"op_stack_table_height": 39896,
"ram_table_height": 893
},
"case": "WorstCase"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
{
"name": "tasmlib_mmr_calculate_new_peaks_from_leaf_mutation",
"benchmark_result": {
"clock_cycle_count": 2275,
"hash_table_height": 414,
"clock_cycle_count": 2267,
"hash_table_height": 408,
"u32_table_height": 1077,
"op_stack_table_height": 1464,
"op_stack_table_height": 1450,
"ram_table_height": 160
},
"case": "CommonCase"
},
{
"name": "tasmlib_mmr_calculate_new_peaks_from_leaf_mutation",
"benchmark_result": {
"clock_cycle_count": 4334,
"hash_table_height": 600,
"u32_table_height": 1756,
"op_stack_table_height": 2838,
"clock_cycle_count": 4326,
"hash_table_height": 594,
"u32_table_height": 1724,
"op_stack_table_height": 2824,
"ram_table_height": 315
},
"case": "WorstCase"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
{
"name": "tasmlib_mmr_leaf_index_to_mt_index_and_peak_index",
"benchmark_result": {
"clock_cycle_count": 114,
"hash_table_height": 120,
"clock_cycle_count": 106,
"hash_table_height": 108,
"u32_table_height": 306,
"op_stack_table_height": 71,
"op_stack_table_height": 57,
"ram_table_height": 0
},
"case": "CommonCase"
},
{
"name": "tasmlib_mmr_leaf_index_to_mt_index_and_peak_index",
"benchmark_result": {
"clock_cycle_count": 114,
"hash_table_height": 120,
"u32_table_height": 334,
"op_stack_table_height": 71,
"clock_cycle_count": 106,
"hash_table_height": 108,
"u32_table_height": 366,
"op_stack_table_height": 57,
"ram_table_height": 0
},
"case": "WorstCase"
Expand Down
16 changes: 8 additions & 8 deletions tasm-lib/benchmarks/tasmlib_mmr_verify_from_memory.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
{
"name": "tasmlib_mmr_verify_from_memory",
"benchmark_result": {
"clock_cycle_count": 1512,
"hash_table_height": 420,
"u32_table_height": 1374,
"op_stack_table_height": 1174,
"clock_cycle_count": 1504,
"hash_table_height": 414,
"u32_table_height": 1407,
"op_stack_table_height": 1160,
"ram_table_height": 160
},
"case": "CommonCase"
},
{
"name": "tasmlib_mmr_verify_from_memory",
"benchmark_result": {
"clock_cycle_count": 2858,
"hash_table_height": 606,
"u32_table_height": 1565,
"op_stack_table_height": 2238,
"clock_cycle_count": 2850,
"hash_table_height": 600,
"u32_table_height": 1566,
"op_stack_table_height": 2224,
"ram_table_height": 315
},
"case": "WorstCase"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
{
"name": "tasmlib_mmr_verify_from_secret_in_leaf_index_on_stack",
"benchmark_result": {
"clock_cycle_count": 1061,
"hash_table_height": 360,
"u32_table_height": 831,
"op_stack_table_height": 568,
"clock_cycle_count": 1053,
"hash_table_height": 354,
"u32_table_height": 829,
"op_stack_table_height": 554,
"ram_table_height": 5
},
"case": "CommonCase"
},
{
"name": "tasmlib_mmr_verify_from_secret_in_leaf_index_on_stack",
"benchmark_result": {
"clock_cycle_count": 1901,
"hash_table_height": 540,
"u32_table_height": 910,
"op_stack_table_height": 988,
"clock_cycle_count": 1893,
"hash_table_height": 534,
"u32_table_height": 943,
"op_stack_table_height": 974,
"ram_table_height": 5
},
"case": "WorstCase"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
{
"name": "tasmlib_mmr_verify_from_secret_in_secret_leaf_index",
"benchmark_result": {
"clock_cycle_count": 1073,
"hash_table_height": 378,
"u32_table_height": 765,
"op_stack_table_height": 574,
"clock_cycle_count": 1065,
"hash_table_height": 366,
"u32_table_height": 796,
"op_stack_table_height": 560,
"ram_table_height": 5
},
"case": "CommonCase"
},
{
"name": "tasmlib_mmr_verify_from_secret_in_secret_leaf_index",
"benchmark_result": {
"clock_cycle_count": 1913,
"hash_table_height": 558,
"u32_table_height": 1007,
"op_stack_table_height": 994,
"clock_cycle_count": 1905,
"hash_table_height": 546,
"u32_table_height": 1008,
"op_stack_table_height": 980,
"ram_table_height": 5
},
"case": "WorstCase"
Expand Down
1 change: 1 addition & 0 deletions tasm-lib/src/assertion_error_ids.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@ often.
| 320..330 | [`i128::ShiftRight`](arithmetic/i128/shift_right.rs) |
| 330..340 | [`u64::ShiftRight`](arithmetic/u64/shift_right.rs) |
| 340..350 | [`u64::Sub`](arithmetic/u64/sub.rs) |
| 350..360 | [`MmrLeafIndexToMtIndexAndPeakIndex`](mmr/leaf_index_to_mt_index_and_peak_index.rs) |
| 360..370 | [`u64::Pow2`](arithmetic/u64/pow2.rs) |
Loading

0 comments on commit 565ea09

Please sign in to comment.