binius_core/merkle_tree/
vcs.rsuse std::ops::Range;
pub trait VectorCommitScheme<T> {
type Commitment: Clone;
type Committed;
type Proof;
type Error: std::error::Error + Send + Sync + 'static;
fn vector_len(&self) -> usize;
fn commit_batch(
&self,
vecs: &[impl AsRef<[T]>],
) -> Result<(Self::Commitment, Self::Committed), Self::Error>;
fn prove_batch_opening(
&self,
committed: &Self::Committed,
index: usize,
) -> Result<Self::Proof, Self::Error>;
fn verify_batch_opening(
&self,
commitment: &Self::Commitment,
index: usize,
proof: Self::Proof,
values: impl Iterator<Item = T>,
) -> Result<(), Self::Error>;
fn proof_size(&self, n_vecs: usize) -> usize;
fn prove_range_batch_opening(
&self,
committed: &Self::Committed,
indices: Range<usize>,
) -> Result<Self::Proof, Self::Error>;
fn verify_range_batch_opening(
&self,
commitment: &Self::Commitment,
indices: Range<usize>,
proof: Self::Proof,
values: impl Iterator<Item = impl AsRef<[T]>>,
) -> Result<(), Self::Error>;
}