Expand description

Circuit gadgets

Structs§

  • Returns 1 when lhs == rhs, and returns 0 otherwise.
  • Returns 1 when lhs == rhs, and returns 0 otherwise.
  • Returns 1 when value == 0, and returns 0 otherwise.
  • Returns 1 when lhs < rhs, and returns 0 otherwise. lhs and rhs < 256**N_BYTES N_BYTES is required to be <= MAX_N_BYTES_INTEGER to prevent overflow: values are stored in a single field element and two of these are added together. The equation that is enforced is lhs - rhs == diff - (lt * range). Because all values are <= 256**N_BYTES and lt is boolean, lt can only be 1 when lhs < rhs.