Commit graph

658 commits

Author SHA1 Message Date
a803b2ec2e move test comments to correct commit 2025-04-07 14:13:59 +02:00
df8af38cbd smt: change SimpleSmt::open() to return a sparse path 2025-04-07 14:13:50 +02:00
96532c501c 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-07 14:13:50 +02:00
9d8aff79c1 smt: add SparseMerklePath, a compact representation of MerklePath 2025-04-07 14:13:50 +02:00
0ce8270ed8 document error stuffs 2025-04-07 14:07:57 +02:00
49bda697ef smt: change SimpleSmt::open() to return a sparse path 2025-04-07 14:05:29 +02:00
539b002ada 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-07 14:05:29 +02:00
33985d9e22 smt: add SparseMerklePath, a compact representation of MerklePath 2025-04-07 14:05:29 +02:00
0c7493e916 fix docstring part that says empty nodes have no effect on memory usage 2025-04-07 13:54:49 +02:00
21b2c08cf9 smt: change SimpleSmt::open() to return a sparse path 2025-04-07 13:54:32 +02:00
39397c707d 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-07 13:54:32 +02:00
9dada3a0d3 smt: add SparseMerklePath, a compact representation of MerklePath 2025-04-07 13:54:32 +02:00
52713f6895 add some comments to test_sparse_bits 2025-04-06 15:03:03 +02:00
25cfe91cc0 smt: change SimpleSmt::open() to return a sparse path 2025-04-06 15:02:45 +02:00
9fa2038ca8 add docstring to test_sparse_bits() 2025-04-04 15:49:45 +02:00
2feed75022 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-04 15:49:32 +02:00
93a0ca0891 smt: change SimpleSmt::open() to return a sparse path 2025-04-04 15:49:32 +02:00
d3aedfa731 smt: add SparseMerklePath, a compact representation of MerklePath 2025-04-04 15:49:32 +02:00
d255b806cb cleanup tests 2025-04-04 15:41:58 +02:00
69db897e8a smt: change SimpleSmt::open() to return a sparse path 2025-04-04 15:41:52 +02:00
30a7ec112a 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-04 15:41:52 +02:00
7538681a13 smt: add SparseMerklePath, a compact representation of MerklePath 2025-04-04 15:41:52 +02:00
fd664a4264 remove test_sparse_indices() 2025-04-04 15:24:16 +02:00
20c490c46f smt: change SimpleSmt::open() to return a sparse path 2025-04-04 15:24:05 +02:00
842ef50428 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-04 15:24:05 +02:00
a3b9f3dd21 smt: add SparseMerklePath, a compact representation of MerklePath 2025-04-04 15:24:05 +02:00
10f3f61fd2 remove outdated comment reference to next_back() 2025-04-04 15:23:44 +02:00
66237007e5 smt: change SimpleSmt::open() to return a sparse path 2025-04-04 15:23:33 +02:00
d36243cc39 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-04 15:23:33 +02:00
68b043cbaf smt: add SparseMerklePath, a compact representation of MerklePath 2025-04-04 15:23:33 +02:00
3b4c2c36dc move commit 'PartialSmt: fix misleading variable names' to the earliest 2025-04-04 15:17:48 +02:00
22c19983ac 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-04 15:17:21 +02:00
b43afcd2ce smt: change SimpleSmt::open() to return a sparse path 2025-04-04 15:17:21 +02:00
d524543899 MerklePath: document indexing order of nodes
I've left the iteration order of `MerklePath::inner_nodes()`
unspecified, but other methods of iteration and indexing are now
specified to be in order of deepest to shallowest.
2025-04-04 15:17:21 +02:00
b31a50de2a 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-04 15:17:21 +02:00
aa386c67a4 MerkleTree: use new NodeIndex::proof_indices() to resolve TODO 2025-04-04 15:17:21 +02:00
5febc5798f smt: add SparseMerklePath, a compact representation of MerklePath 2025-04-04 15:17:21 +02:00
07bda60233 smt: refactor MerklePath logic
Computation of the correct node indices to get is moved to
`NodeIndex::proof_indices()`, and getting a node's index based on its
parent is generalized into `SparseMerkleTree::get_hash()`.
2025-04-04 15:17:21 +02:00
5eb9a14c40 PartialSmt: fix misleading variable names 2025-04-04 15:17:21 +02:00
a27be8db4f fix clippy lints 2025-04-04 15:17:18 +02:00
4d0b507e77 smt: change SimpleSmt::open() to return a sparse path 2025-04-04 15:17:06 +02:00
980e1615bf 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-04 15:17:06 +02:00
9ee094703c smt: add SparseMerklePath, a compact representation of MerklePath 2025-04-04 15:17:06 +02:00
2fc25c028b re-add SimpleSmt::open() commit 2025-04-04 15:16:02 +02:00
1c39f38c9c smt: change SimpleSmt::open() to return a sparse path 2025-04-04 15:14:27 +02:00
c28a9d1c30 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-04 15:12:40 +02:00
f018fcb2aa smt: add SparseMerklePath, a compact representation of MerklePath 2025-04-04 15:12:40 +02:00
a09ce394ae SQUASH ALL THE THINGS 2025-04-04 14:54:34 +02:00
7f2fef41d0 smt: add SparseMerklePath
SparseMerklePath: implement random access


SparseMerklePath: implement iterators


SparseMerklePath: implement Serializable and Deserializable


SparseMerklePath: impl From/Into conversions


SparseMerklePath: add SparseValuePath container


<git index>
2025-04-04 14:54:05 +02:00
0961cfb227 add MerkleTree proof_indices commit 2025-04-04 14:53:15 +02:00