pub trait Argument<F: PrimeField> {
    const ARGUMENT_TYPE: ArgumentType;
    const CONSTRAINTS: u32;

    // Required method
    fn constraint_checks<T: ExprOps<F, BerkeleyChallengeTerm>>(
        env: &ArgumentEnv<F, T>,
        cache: &mut Cache
    ) -> Vec<T>;

    // Provided methods
    fn constraints(cache: &mut Cache) -> Vec<E<F>> { ... }
    fn combined_constraints(alphas: &Alphas<F>, cache: &mut Cache) -> E<F> { ... }
}
Expand description

The interface for a minimal argument implementation.

Required Associated Constants§

source

const ARGUMENT_TYPE: ArgumentType

The type of constraints that this will produce. This is important to enforce that we don’t combine the constraints with powers of alpha that collide with other mutually inclusive arguments.

source

const CONSTRAINTS: u32

The number of constraints created by the argument.

Required Methods§

source

fn constraint_checks<T: ExprOps<F, BerkeleyChallengeTerm>>( env: &ArgumentEnv<F, T>, cache: &mut Cache ) -> Vec<T>

Constraints for this argument

Provided Methods§

source

fn constraints(cache: &mut Cache) -> Vec<E<F>>

Returns the set of constraints required to prove this argument.

source

fn combined_constraints(alphas: &Alphas<F>, cache: &mut Cache) -> E<F>

Returns constraints safely combined via the passed combinator.

Implementors§

source§

impl<F> Argument<F> for CompleteAdd<F>where F: PrimeField,

source§

impl<F> Argument<F> for EndomulScalar<F>where F: PrimeField,

source§

impl<F> Argument<F> for EndosclMul<F>where F: PrimeField,

source§

impl<F> Argument<F> for ForeignFieldAdd<F>where F: PrimeField,

source§

impl<F> Argument<F> for ForeignFieldMul<F>where F: PrimeField,

source§

impl<F> Argument<F> for Generic<F>where F: PrimeField,

source§

impl<F> Argument<F> for KeccakRound<F>where F: PrimeField,

source§

impl<F> Argument<F> for KeccakSponge<F>where F: PrimeField,

source§

impl<F> Argument<F> for Poseidon<F>where F: PrimeField,

source§

impl<F> Argument<F> for RangeCheck0<F>where F: PrimeField,

source§

impl<F> Argument<F> for RangeCheck1<F>where F: PrimeField,

source§

impl<F> Argument<F> for Rot64<F>where F: PrimeField,

source§

impl<F> Argument<F> for Claim<F>where F: PrimeField,

source§

impl<F> Argument<F> for Flags<F>where F: PrimeField,

source§

impl<F> Argument<F> for Instruction<F>where F: PrimeField,

source§

impl<F> Argument<F> for Transition<F>where F: PrimeField,

source§

impl<F> Argument<F> for VarbaseMul<F>where F: PrimeField,

source§

impl<F> Argument<F> for Xor16<F>where F: PrimeField,