Commit graph

905 commits

Author SHA1 Message Date
7dde96a437 squash 'loop over depth in tests' into 'add SparseMerklePath' 2025-04-24 13:32:57 +02:00
Grzegorz Świrski
0fb731753e use Cow instead of the additional IntoIter struct 2025-04-24 13:32:35 +02:00
10bc59c138 smt: change SimpleSmt::open() to return a sparse path 2025-04-24 13:32:35 +02:00
8755e3123f SimpleSmt: do not assume that Merkle paths Deref to Vec in tests
This is in preparation for the next commit, where we change
`SimpleSmt::open()` to return a `SparseMerklePath`, which cannot
dereference to a Vec.
2025-04-24 13:32:35 +02:00
0327b04a02 smt: add SparseMerklePath, a compact representation of MerklePath
Co-authored-by: Philipp Gackstatter <PhilippGackstatter@users.noreply.github.com>
2025-04-24 13:32:35 +02:00
121aeb3101 squash 'clarify sparse_nodes_mask documentation' into 'add SparseMerklePath' 2025-04-24 13:32:10 +02:00
Grzegorz Świrski
c1939cd562 use Cow instead of the additional IntoIter struct 2025-04-24 13:31:45 +02:00
Grzegorz Świrski
c68afb9e9b loop over depths in tests 2025-04-24 13:31:45 +02:00
d377400605 smt: change SimpleSmt::open() to return a sparse path 2025-04-24 13:31:45 +02:00
b7409532bd SimpleSmt: do not assume that Merkle paths Deref to Vec in tests
This is in preparation for the next commit, where we change
`SimpleSmt::open()` to return a `SparseMerklePath`, which cannot
dereference to a Vec.
2025-04-24 13:31:45 +02:00
0b734ebca1 smt: add SparseMerklePath, a compact representation of MerklePath
Co-authored-by: Philipp Gackstatter <PhilippGackstatter@users.noreply.github.com>
2025-04-24 13:31:45 +02:00
657ae86c15 squash 'clarify that SparseMerklePath can store up to SMT_MAX_DEPTH nodes total' into 'add SparseMerklePath' 2025-04-24 13:31:41 +02:00
Grzegorz Świrski
02355341dd use Cow instead of the additional IntoIter struct 2025-04-24 13:31:19 +02:00
Grzegorz Świrski
144297f4ae loop over depths in tests 2025-04-24 13:31:19 +02:00
Grzegorz Świrski
e6d1efe8e1 clarify empty_nodes_mask documentation 2025-04-24 13:31:19 +02:00
fe71275391 smt: change SimpleSmt::open() to return a sparse path 2025-04-24 13:31:19 +02:00
31ee6f2824 SimpleSmt: do not assume that Merkle paths Deref to Vec in tests
This is in preparation for the next commit, where we change
`SimpleSmt::open()` to return a `SparseMerklePath`, which cannot
dereference to a Vec.
2025-04-24 13:31:19 +02:00
1988a9643f smt: add SparseMerklePath, a compact representation of MerklePath
Co-authored-by: Philipp Gackstatter <PhilippGackstatter@users.noreply.github.com>
2025-04-24 13:31:19 +02:00
60a3b0ab0e squash 'remove unsafe FromIterator<(NonZero…)>' into 'add SparseMerklePath' 2025-04-24 13:31:03 +02:00
Grzegorz Świrski
7ce5465015 use Cow instead of the additional IntoIter struct 2025-04-24 13:30:27 +02:00
Grzegorz Świrski
1d950e366e loop over depths in tests 2025-04-24 13:30:27 +02:00
Grzegorz Świrski
baec8d8efb clarify empty_nodes_mask documentation 2025-04-24 13:30:27 +02:00
Grzegorz Świrski
b7fcd73985 clarify that SparseMerklePath can store up to SMT_MAX_DEPTH nodes total 2025-04-24 13:30:27 +02:00
d0174e5917 smt: change SimpleSmt::open() to return a sparse path 2025-04-24 13:30:27 +02:00
2e08bc6fd2 SimpleSmt: do not assume that Merkle paths Deref to Vec in tests
This is in preparation for the next commit, where we change
`SimpleSmt::open()` to return a `SparseMerklePath`, which cannot
dereference to a Vec.
2025-04-24 13:30:27 +02:00
5cce8d6ca5 smt: add SparseMerklePath, a compact representation of MerklePath
Co-authored-by: Philipp Gackstatter <PhilippGackstatter@users.noreply.github.com>
2025-04-24 13:30:27 +02:00
497d144399 squash 'make from_iter_with_depth private' into 'add SparseMerklePath' 2025-04-24 13:30:02 +02:00
Grzegorz Świrski
aaa85712da use Cow instead of the additional IntoIter struct 2025-04-24 13:29:34 +02:00
Grzegorz Świrski
6e16cf9256 loop over depths in tests 2025-04-24 13:29:34 +02:00
Grzegorz Świrski
0eb64cba59 clarify empty_nodes_mask documentation 2025-04-24 13:29:34 +02:00
Grzegorz Świrski
4bfbb499c8 clarify that SparseMerklePath can store up to SMT_MAX_DEPTH nodes total 2025-04-24 13:29:34 +02:00
Grzegorz Świrski
c08f98c1a4 remove unsafe FromIterator<(NonZero<u8>, Option<RpoDigest>)> 2025-04-24 13:29:34 +02:00
8e1883d183 smt: change SimpleSmt::open() to return a sparse path 2025-04-24 13:29:34 +02:00
9b4c06b997 SimpleSmt: do not assume that Merkle paths Deref to Vec in tests
This is in preparation for the next commit, where we change
`SimpleSmt::open()` to return a `SparseMerklePath`, which cannot
dereference to a Vec.
2025-04-24 13:29:34 +02:00
1ef10c1e3a smt: add SparseMerklePath, a compact representation of MerklePath
Co-authored-by: Philipp Gackstatter <PhilippGackstatter@users.noreply.github.com>
2025-04-24 13:29:34 +02:00
7263a0ce9d squash 'keep at_depth and at_idx consistent wrt ownership' into 'add SparseMerklePath 2025-04-24 13:28:30 +02:00
ac584be654 MerklePath: add clarity getters for API parity with future SparseMerklePath
This adds `MerklePath::at_depth()` and `MerklePath::at_idx()`, both for
clarity and for API parity with `SparseMerklePath` in the next commit.
2025-04-24 13:27:54 +02:00
Grzegorz Świrski
8e3bc78fb0 use Cow instead of the additional IntoIter struct 2025-04-24 13:27:54 +02:00
Grzegorz Świrski
ba464ae5f9 loop over depths in tests 2025-04-24 13:27:54 +02:00
Grzegorz Świrski
743d1cbec9 clarify empty_nodes_mask documentation 2025-04-24 13:27:54 +02:00
Grzegorz Świrski
480ce2223b clarify that SparseMerklePath can store up to SMT_MAX_DEPTH nodes total 2025-04-24 13:27:54 +02:00
Grzegorz Świrski
12c44d1d02 remove unsafe FromIterator<(NonZero<u8>, Option<RpoDigest>)> 2025-04-24 13:27:54 +02:00
Grzegorz Świrski
d000eb750a make from_iter_with_depth private, make sure iterators in tests have the same length 2025-04-24 13:27:54 +02:00
a7d6ca99d7 smt: change SimpleSmt::open() to return a sparse path 2025-04-24 13:27:54 +02:00
51f17ba28b SimpleSmt: do not assume that Merkle paths Deref to Vec in tests
This is in preparation for the next commit, where we change
`SimpleSmt::open()` to return a `SparseMerklePath`, which cannot
dereference to a Vec.
2025-04-24 13:27:54 +02:00
060b3cfc84 smt: add SparseMerklePath, a compact representation of MerklePath
Co-authored-by: Philipp Gackstatter <PhilippGackstatter@users.noreply.github.com>
2025-04-24 13:27:54 +02:00
c0f6397c87 squash 'sort crate:: imports after super:: imports' into 'add SparseMerklePath' 2025-04-24 13:24:53 +02:00
Grzegorz Świrski
6f0bcaf552 use Cow instead of the additional IntoIter struct 2025-04-24 13:24:33 +02:00
Grzegorz Świrski
a80245c277 loop over depths in tests 2025-04-24 13:24:33 +02:00
Grzegorz Świrski
4c2af1c0e7 clarify empty_nodes_mask documentation 2025-04-24 13:24:33 +02:00