Function storage_proofs_core::gadgets::constraint::sum

source ยท
pub fn sum<Scalar: PrimeField, A, AR, CS: ConstraintSystem<Scalar>>(
    cs: &mut CS,
    annotation: A,
    a: &AllocatedNum<Scalar>,
    b: &AllocatedNum<Scalar>,
    sum: &AllocatedNum<Scalar>,
)
where A: FnOnce() -> AR, AR: Into<String>,
Expand description

Adds a constraint to CS, enforcing a add relationship between the allocated numbers a, b, and sum.

a + b = sum