Trait folding::instance_witness::Instance
source · pub trait Instance<G: CommitmentCurve>: Sized + Foldable<G::ScalarField> {
// Required methods
fn to_absorb(&self) -> (Vec<G::ScalarField>, Vec<G>);
fn get_alphas(&self) -> &Alphas<G::ScalarField>;
fn get_blinder(&self) -> G::ScalarField;
}
Required Methods§
sourcefn to_absorb(&self) -> (Vec<G::ScalarField>, Vec<G>)
fn to_absorb(&self) -> (Vec<G::ScalarField>, Vec<G>)
This method returns the scalars and commitments that must be absorbed by the sponge. It is not supposed to do any absorption itself, and the user is responsible for calling the sponge absorb methods with the elements returned by this method. When called on a RelaxedInstance, elements will be returned in the following order, for given instances L and R
scalar = L.to_absorb().0 | L.u | R.to_absorb().0 | R.u
points_l = L.to_absorb().1 | L.extended | L.error // where extended is the commitments to the extra columns
points_r = R.to_absorb().1 | R.extended | R.error // where extended is the commitments to the extra columns
t_0 and t_1 first and second error terms
points = points_l | points_r | t_0 | t_1
A user implementing the IVC circuit should absorb the elements in the following order:
sponge.absorb_fr(scalar); // absorb the scalar elements
sponge.absorb_g(points); // absorb the commitments
This is the order used by the folding library in the method
fold_instance_witness_pair
.
From there, a challenge can be coined using:
let challenge_r = sponge.challenge();
sourcefn get_alphas(&self) -> &Alphas<G::ScalarField>
fn get_alphas(&self) -> &Alphas<G::ScalarField>
Returns the alphas values for the instance
sourcefn get_blinder(&self) -> G::ScalarField
fn get_blinder(&self) -> G::ScalarField
Return the blinder that can be used while committing to polynomials.