mirror of
https://github.com/arnaucube/miden-crypto.git
synced 2026-01-12 00:51:29 +01:00
feat: add merkle path wrapper
A Merkle path is a vector of nodes, regardless of the Merkle tree implementation. This commit introduces an encapsulation for such vector, also to provide functionality that is common between different algorithms such as opening verification. related issue: #36
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use super::{
|
||||
hash::rpo::{Rpo256, RpoDigest},
|
||||
utils::collections::{BTreeMap, Vec},
|
||||
utils::collections::{vec, BTreeMap, Vec},
|
||||
Felt, Word, ZERO,
|
||||
};
|
||||
use core::fmt;
|
||||
@@ -8,8 +8,11 @@ use core::fmt;
|
||||
mod merkle_tree;
|
||||
pub use merkle_tree::MerkleTree;
|
||||
|
||||
mod merkle_path_set;
|
||||
pub use merkle_path_set::MerklePathSet;
|
||||
mod path;
|
||||
pub use path::MerklePath;
|
||||
|
||||
mod path_set;
|
||||
pub use path_set::MerklePathSet;
|
||||
|
||||
mod simple_smt;
|
||||
pub use simple_smt::SimpleSmt;
|
||||
@@ -24,7 +27,7 @@ pub enum MerkleError {
|
||||
NumLeavesNotPowerOfTwo(usize),
|
||||
InvalidIndex(u32, u64),
|
||||
InvalidDepth(u32, u32),
|
||||
InvalidPath(Vec<Word>),
|
||||
InvalidPath(MerklePath),
|
||||
InvalidEntriesCount(usize, usize),
|
||||
NodeNotInSet(u64),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user