Trait filecoin_proofs_api::MerkleTreeTrait [−][src]
pub trait MerkleTreeTrait: Send + Sync + Debug { type Arity: 'static + PoseidonArity; type SubTreeArity: 'static + PoseidonArity; type TopTreeArity: 'static + PoseidonArity; type Hasher: 'static + Hasher; type Store: Store<<Self::Hasher as Hasher>::Domain>; type Proof: MerkleProofTrait; fn display() -> String; fn root(&self) -> <Self::Hasher as Hasher>::Domain; fn gen_proof(&self, index: usize) -> Result<Self::Proof, Error>; fn gen_cached_proof(
&self,
i: usize,
rows_to_discard: Option<usize>
) -> Result<Self::Proof, Error>; fn row_count(&self) -> usize; fn leaves(&self) -> usize; fn from_merkle(
tree: MerkleTree<<Self::Hasher as Hasher>::Domain, <Self::Hasher as Hasher>::Function, Self::Store, Self::Arity, Self::SubTreeArity, Self::TopTreeArity>
) -> Self; }
Expand description
Trait used to abstract over the way Merkle Trees are constructed and stored.
Associated Types
type Arity: 'static + PoseidonArity
type SubTreeArity: 'static + PoseidonArity
type TopTreeArity: 'static + PoseidonArity
type Proof: MerkleProofTrait
Required methods
Creates a merkle proof of the node at the given index.