pub trait Pcs<Challenge, Challenger>{
type Domain: PolynomialSpace;
type Commitment: Clone + Serialize + DeserializeOwned;
type ProverData;
type Proof: Clone + Serialize + DeserializeOwned;
type Error: Debug;
// Required methods
fn natural_domain_for_degree(&self, degree: usize) -> Self::Domain;
fn commit(
&self,
evaluations: Vec<(Self::Domain, RowMajorMatrix<Val<Self::Domain>>)>,
) -> (Self::Commitment, Self::ProverData);
fn get_evaluations_on_domain<'a>(
&self,
prover_data: &'a Self::ProverData,
idx: usize,
domain: Self::Domain,
) -> impl Matrix<Val<Self::Domain>> + 'a;
fn open(
&self,
rounds: Vec<(&Self::ProverData, Vec<Vec<Challenge>>)>,
challenger: &mut Challenger,
) -> (OpenedValues<Challenge>, Self::Proof);
fn verify(
&self,
rounds: Vec<(Self::Commitment, Vec<(Self::Domain, Vec<(Challenge, Vec<Challenge>)>)>)>,
proof: &Self::Proof,
challenger: &mut Challenger,
) -> Result<(), Self::Error>;
}
Expand description
A (not necessarily hiding) polynomial commitment scheme, for committing to (batches of) polynomials
Required Associated Types§
type Domain: PolynomialSpace
Sourcetype Commitment: Clone + Serialize + DeserializeOwned
type Commitment: Clone + Serialize + DeserializeOwned
The commitment that’s sent to the verifier.
Sourcetype ProverData
type ProverData
Data that the prover stores for committed polynomials, to help the prover with opening.
Sourcetype Proof: Clone + Serialize + DeserializeOwned
type Proof: Clone + Serialize + DeserializeOwned
The opening argument.
type Error: Debug
Required Methods§
Sourcefn natural_domain_for_degree(&self, degree: usize) -> Self::Domain
fn natural_domain_for_degree(&self, degree: usize) -> Self::Domain
This should return a coset domain (s.t. Domain::next_point returns Some)
fn commit( &self, evaluations: Vec<(Self::Domain, RowMajorMatrix<Val<Self::Domain>>)>, ) -> (Self::Commitment, Self::ProverData)
fn get_evaluations_on_domain<'a>( &self, prover_data: &'a Self::ProverData, idx: usize, domain: Self::Domain, ) -> impl Matrix<Val<Self::Domain>> + 'a
fn open( &self, rounds: Vec<(&Self::ProverData, Vec<Vec<Challenge>>)>, challenger: &mut Challenger, ) -> (OpenedValues<Challenge>, Self::Proof)
fn verify( &self, rounds: Vec<(Self::Commitment, Vec<(Self::Domain, Vec<(Challenge, Vec<Challenge>)>)>)>, proof: &Self::Proof, challenger: &mut Challenger, ) -> Result<(), Self::Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.