Skip to main content

Prover

Trait Prover 

Source
pub trait Prover {
    // Required methods
    fn generate_proof(&self, data: &[u8], segment_index: usize) -> Result<Proof>;
    fn verify_proof(proof: &Proof, root_hash: &[u8]) -> Result<bool>;
}
Expand description

Extension trait to add proof-related functionality to BMTHasher

Required Methods§

Source

fn generate_proof(&self, data: &[u8], segment_index: usize) -> Result<Proof>

Generate a proof for a specific segment

Source

fn verify_proof(proof: &Proof, root_hash: &[u8]) -> Result<bool>

Verify a proof against a root hash

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§