diff --git a/proof-input/src/merkle_tree/merkle_safe.rs b/proof-input/src/merkle_tree/merkle_safe.rs index 9b2d86a..a691c0d 100755 --- a/proof-input/src/merkle_tree/merkle_safe.rs +++ b/proof-input/src/merkle_tree/merkle_safe.rs @@ -6,7 +6,7 @@ use std::marker::PhantomData; use anyhow::{ensure, Result}; use plonky2::hash::hash_types::{HashOut, RichField}; use std::ops::Shr; -use plonky2::plonk::config::AlgebraicHasher; +use plonky2::plonk::config::Hasher; use plonky2_field::extension::Extendable; use plonky2_poseidon2::poseidon2_hash::poseidon2::Poseidon2; use crate::hash::key_compress::key_compress; @@ -22,7 +22,7 @@ pub const KEY_ODD_AND_BOTTOM_LAYER: u64 = 0x3; pub struct MerkleTree< F: RichField + Extendable + Poseidon2, const D: usize, - H: AlgebraicHasher, + H: Hasher, > { pub layers: Vec>>, phantom_data: PhantomData @@ -31,7 +31,7 @@ pub struct MerkleTree< impl< F: RichField + Extendable + Poseidon2, const D: usize, - H: AlgebraicHasher, + H: Hasher, > MerkleTree { /// Constructs a new Merkle tree from the given leaves. pub fn new( @@ -96,7 +96,7 @@ impl< fn merkle_tree_worker< F: RichField + Extendable + Poseidon2, const D: usize, - H: AlgebraicHasher, + H: Hasher, >( xs: &[HashOut], is_bottom_layer: bool, @@ -140,7 +140,7 @@ fn merkle_tree_worker< pub struct MerkleProof< F: RichField + Extendable + Poseidon2, const D: usize, - H: AlgebraicHasher, + H: Hasher, > { pub index: usize, // Index of the leaf pub path: Vec>, // Sibling hashes from the leaf to the root @@ -151,7 +151,7 @@ pub struct MerkleProof< impl< F: RichField + Extendable + Poseidon2, const D: usize, - H: AlgebraicHasher, + H: Hasher, > MerkleProof { pub fn new( index: usize,