Module neptune::circuit2

source ·

Structs

Enums

  • Similar to num::Num, we use Elt to accumulate both values and linear combinations, then eventually extract into a num::AllocatedNum, enforcing that the linear combination corresponds to the result.

Functions

  • Calculates (a * (pre_add + b)) + post_add — and enforces that constraint.
  • Create circuit for Poseidon hash, returning an allocated Num at the cost of one constraint.
  • Create circuit for Poseidon hash, minimizing constraints by returning an unallocated Num.
  • Calculates square of sum and enforces that constraint.