Commit graph

927 commits

Author SHA1 Message Date
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
Grzegorz Świrski
2b1b6baa88 clarify that SparseMerklePath can store up to SMT_MAX_DEPTH nodes total 2025-04-24 13:24:33 +02:00
Grzegorz Świrski
235dcc2324 remove unsafe FromIterator<(NonZero<u8>, Option<RpoDigest>)> 2025-04-24 13:24:33 +02:00
Grzegorz Świrski
262c896ad3 make from_iter_with_depth private, make sure iterators in tests have the same length 2025-04-24 13:24:33 +02:00
Grzegorz Świrski
b284b4c556 keep at_depth and at_idx consistent wrt ownership 2025-04-24 13:24:33 +02:00
dbb9017043 smt: change SimpleSmt::open() to return a sparse path 2025-04-24 13:24:33 +02:00
0cc0f4593e squash 'move comment' into 'add SparseMerklePath' 2025-04-24 13:24:05 +02:00
5b0cd8517b 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:23:35 +02:00
Grzegorz Świrski
32ac42c0bc use Cow instead of the additional IntoIter struct 2025-04-24 13:23:35 +02:00
a8b999852a smt: add SparseMerklePath, a compact representation of MerklePath
Co-authored-by: Philipp Gackstatter <PhilippGackstatter@users.noreply.github.com>
2025-04-24 13:23:35 +02:00
Grzegorz Świrski
0e44fd7220 loop over depths in tests 2025-04-24 13:23:35 +02:00
Grzegorz Świrski
d7dedea37b clarify empty_nodes_mask documentation 2025-04-24 13:23:35 +02:00
Grzegorz Świrski
2ad7b2b71f clarify that SparseMerklePath can store up to SMT_MAX_DEPTH nodes total 2025-04-24 13:23:35 +02:00
Grzegorz Świrski
69b5807b97 remove unsafe FromIterator<(NonZero<u8>, Option<RpoDigest>)> 2025-04-24 13:23:35 +02:00
Grzegorz Świrski
203bc8854a make from_iter_with_depth private, make sure iterators in tests have the same length 2025-04-24 13:23:35 +02:00
Grzegorz Świrski
2352b757ca keep at_depth and at_idx consistent wrt ownership 2025-04-24 13:23:35 +02:00
6fc1684ca1 sort crate:: imports after super:: imports 2025-04-24 13:23:35 +02:00
3273b8c1b6 smt: change SimpleSmt::open() to return a sparse path 2025-04-24 13:23:35 +02:00
3d836620c9 squash 'return a deserialization error' into 'add SparseMerklePath' 2025-04-24 13:23:21 +02:00
Grzegorz Świrski
6e9b708682 use Cow instead of the additional IntoIter struct 2025-04-24 13:22:57 +02:00
Grzegorz Świrski
07f58c97dc loop over depths in tests 2025-04-24 13:22:57 +02:00
Grzegorz Świrski
66a0e50276 clarify empty_nodes_mask documentation 2025-04-24 13:22:57 +02:00
Grzegorz Świrski
8e685432bb clarify that SparseMerklePath can store up to SMT_MAX_DEPTH nodes total 2025-04-24 13:22:57 +02:00
Grzegorz Świrski
0b3eb5c1bb remove unsafe FromIterator<(NonZero<u8>, Option<RpoDigest>)> 2025-04-24 13:22:57 +02:00
Grzegorz Świrski
4319e5aa3a make from_iter_with_depth private, make sure iterators in tests have the same length 2025-04-24 13:22:57 +02:00
Grzegorz Świrski
d25488ce2e keep at_depth and at_idx consistent wrt ownership 2025-04-24 13:22:57 +02:00
Grzegorz Świrski
976bc3c69f move comment 2025-04-24 13:22:57 +02:00
0d611e63b7 sort crate:: imports after super:: imports 2025-04-24 13:22:57 +02:00
9802b1d9b9 smt: change SimpleSmt::open() to return a sparse path 2025-04-24 13:22:57 +02:00