pub fn merkle_rt_mem<CS: ConstraintSystem<bls12_381::Scalar>>(
    mut cs: CS,
    cm: &AllocatedNum<bls12_381::Scalar>,
    t: &[Boolean],
    witness: Option<&MerkleWitness>,
) -> Result<(AllocatedNum<bls12_381::Scalar>, Vec<Boolean>), SynthesisError> {
    // compute the leaf value from the commitment and the time
    let leaf = memory_leaf_hash(cs.namespace(|| "leaf computation"), cm, t)?;

    // compute the root using the leaf value
    merkle_rt(cs, TreeType::Memory, MEMORY_MT_DEPTH, &leaf, witness)
}
/// Compute the Merkle root and position of `cm` in the Memory Merkle tree, given `witness`.
/// Returns a tuple of the root and the position.
Compute the Merkle root and position of `cm` in the Memory Merkle tree, given `witness`.
Returns a tuple of the root and the position.
Compute the Merkle root and position of ` cm ` in the Memory Merkle tree given ` witness ` . Returns a tuple of the root and the position .
pub fn merkle_rt_mem<CS: ConstraintSystem<bls12_381::Scalar>>(
    mut cs: CS,
    cm: &AllocatedNum<bls12_381::Scalar>,
    t: &[Boolean],
    witness: Option<&MerkleWitness>,
) -> Result<(AllocatedNum<bls12_381::Scalar>, Vec<Boolean>), SynthesisError> {
    // compute the leaf value from the commitment and the time
    let leaf = memory_leaf_hash(cs.namespace(|| "leaf computation"), cm, t)?;
    // compute the root using the leaf value
    merkle_rt(cs, TreeType::Memory, MEMORY_MT_DEPTH, &leaf, witness)
}
pub fn merkle_rt_mem < CS : ConstraintSystem < bls12_381 :: Scalar > > ( mut cs : CS , cm : & AllocatedNum < bls12_381 :: Scalar > , t : & [ Boolean ] , witness : Option < & MerkleWitness > , ) -> Result < ( AllocatedNum < bls12_381 :: Scalar > , Vec < Boolean > ) , SynthesisError > { // compute the leaf value from the commitment and the time let leaf = memory_leaf_hash ( cs . namespace ( | | " " ) , cm , t ) ? ; // compute the root using the leaf value merkle_rt ( cs , TreeType :: Memory , MEMORY_MT_DEPTH , & leaf , witness ) }
Compute the Merkle root and position of `cm` in the Memory Merkle tree, given `witness`.
Compute the Merkle root and position of ` cm ` in the Memory Merkle tree given ` witness ` .
cs
CS
cm
&AllocatedNum<bls12_381::Scalar>
t
&[Boolean]
witness
Option<&MerkleWitness>
cs
CS
cm
&AllocatedNum<bls12_381::Scalar>
t
&[Boolean]
witness
Option<&MerkleWitness>