Commit graph

654 commits

Author SHA1 Message Date
52a653f492 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 14:52:31 +02:00
cc6981de7f SparseMerklePath: add SparseValuePath container 2025-04-04 14:52:31 +02:00
055c95f32a MerkleTree: use new NodeIndex::proof_indices() to resolve TODO 2025-04-04 14:52:31 +02:00
c45d9682eb SparseMerklePath: impl From/Into conversions 2025-04-04 14:52:31 +02:00
067f5d1062 SparseMerklePath: implement Serializable and Deserializable 2025-04-04 14:52:31 +02:00
9122935685 SparseMerklePath: implement iterators 2025-04-04 14:52:31 +02:00
f8771549ea SparseMerklePath: implement random access 2025-04-04 14:52:31 +02:00
129f81eb4b smt: add SparseMerklePath 2025-04-04 14:52:31 +02:00
91aac69b8e 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 14:49:01 +02:00
3e4724d684 remove sparse_path changes from SimpleSmt commit 2025-04-04 14:43:48 +02:00
81ce40ce49 smt: impl SimpleSmt::get_path() which returns a sparse path 2025-04-04 14:43:34 +02:00
22b33ed8b6 SparseMerklePath: add SparseValuePath container 2025-04-04 14:38:54 +02:00
91983f7ced reorder commits 2025-04-04 14:36:01 +02:00
f1eb9a8f04 SparseMerklePath: impl From/Into conversions 2025-04-04 14:35:45 +02:00
5d6ef3eccf smt: impl SimpleSmt::get_path() which returns a sparse path 2025-04-04 14:35:45 +02:00
743c65979a SparseMerklePath: implement Serializable and Deserializable 2025-04-04 14:35:45 +02:00
87acaa5aad SparseMerklePath: implement iterators 2025-04-04 14:35:45 +02:00
6fe0ab3184 SparseMerklePath: implement random access 2025-04-04 14:35:45 +02:00
15a8d9cbd8 smt: add SparseMerklePath 2025-04-04 14:35:45 +02:00
002afad1d7 PartialSmt: fix misleading variable names 2025-04-04 14:35:45 +02:00
9ef9fad9a7 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 14:35:11 +02:00
c92882832c add at_idx and at_depth for MerklePath 2025-04-04 14:17:11 +02:00
bf5b0e3255 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 14:16:04 +02:00
09f78036a4 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 14:16:04 +02:00
99a7988e9e PartialSmt: fix misleading variable names 2025-04-04 14:16:04 +02:00
41f72ecf2f smt: impl SimpleSmt::get_path() which returns a sparse path 2025-04-04 14:16:04 +02:00
38d2ca3505 SparseMerklePath: impl From/Into conversions 2025-04-04 14:16:04 +02:00
441e29378e SparseMerklePath: implement Serializable and Deserializable 2025-04-04 14:16:04 +02:00
8f833c77e6 SparseMerklePath: implement iterators 2025-04-04 14:16:04 +02:00
71967753c8 SparseMerklePath: implement random access 2025-04-04 14:16:04 +02:00
b116991b9d smt: add SparseMerklePath 2025-04-04 14:16:04 +02:00
6cafc422b4 fix section of proof_indices() 2025-03-25 18:07:44 +01:00
dcf66efb56 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-03-25 18:07:33 +01:00
4a9252b65e PartialSmt: fix misleading variable names 2025-03-25 18:07:33 +01:00
adf552e1e2 smt: impl SimpleSmt::get_path() which returns a sparse path 2025-03-25 18:07:33 +01:00
74fb98578a SparseMerklePath: impl From/Into conversions 2025-03-25 18:07:33 +01:00
e6e2b1439f SparseMerklePath: implement Serializable and Deserializable 2025-03-25 18:07:33 +01:00
62b75ef686 SparseMerklePath: implement iterators 2025-03-25 18:07:33 +01:00
c645dd1ece SparseMerklePath: implement random access 2025-03-25 18:07:33 +01:00
33e414b32a smt: add SparseMerklePath 2025-03-25 18:07:33 +01:00
0af551a068 refactor for NodeIndex::proof_indices() 2025-03-25 18:06:49 +01:00
d66b001708 PartialSmt: fix misleading variable names 2025-03-25 18:06:31 +01:00
3a672c6e9d smt: impl SimpleSmt::get_path() which returns a sparse path 2025-03-25 18:06:31 +01:00
1bb1a45bd0 SparseMerklePath: impl From/Into conversions 2025-03-25 18:06:31 +01:00
9b65debf2c SparseMerklePath: implement Serializable and Deserializable 2025-03-25 18:06:31 +01:00
4252678e91 SparseMerklePath: implement iterators 2025-03-25 18:06:31 +01:00
10b2f389de SparseMerklePath: implement random access 2025-03-25 18:06:22 +01:00
b1847cab25 smt: add SparseMerklePath 2025-03-25 18:06:07 +01:00
619944aec8 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-03-25 18:02:30 +01:00
57ceff3a72 fix iterators for get()/get_nonempty() change 2025-03-25 15:17:56 +01:00