Skip to content

v0.5.2

Compare
Choose a tag to compare
@gbotrel gbotrel released this 03 Nov 20:52
· 2525 commits to master since this release

[v0.5.2] - 2021-11-03

Breaking changes

  • circuit Define(... cs *frontend.ConstraintSystem) now takes an interface Define( ... api frontend.API)
  • assert helper is now under backend/ (instead of backend/groth16 and backend/plonk)

Build

  • updated to gnark-crypto v0.5.3

Feat

  • added api.DivUnchecked and api.Div. DivUnchecked will accept 0 / 0 == 0 as valid.
  • api.Sub takes a variadic list of input (same as api.Add)
  • plonk: kzg test srs is cached up to a certain size for faster tests
  • removed hardcoded bit size in ToBinary, which now depends by default on fr.Element bit size
  • api.ToBinary: constraint unsatisfied now has debugInfo
  • unset variables: error message comes with a stack trace
  • added bandersnatch circuit component under std/
  • frontend.Compile now check that all secret and public inputs are constrained. Check can be ignore through compile option (frontend.IgnoreUnconstrainedInputs)
  • added UnsafeReadFrom for groth16 Proving and Verifying keys, which doesn't perform subgroup checks on the decoded points

Fix

  • incorrect formula in api.Select when parameters are constant
  • plonk: reduce duplicate constraint when splitting r1c in the frontend
  • plonk: build permutation index out of bounds

Tests

  • added a test/ package with a test execution engine cross checking constraint system with big.Int arithmetic
  • bases for Fuzzing witness and cross checking constraint system output with test execution engine

Perf

  • api.AssertIsLessOrEqual: reduced redundant constraints in range check
  • std/groth16: ml with short addition chain (13245cs -> 12297, marginal gain)

Refactor

  • all circuits use frontend.API in place of *frontend.ConstraintSystem
  • use ecc.Info() where possible to get modulus or field size

Pull Requests

  • Merge pull request #159 from ConsenSys/std/bandersnatch
  • Merge pull request #164 from ConsenSys/perf-scs-compile
  • Merge pull request #161 from ConsenSys/test-engine-with-hints
  • Merge pull request #162 from ConsenSys/std/pairing
  • Merge pull request #160 from ConsenSys/perf-unsafe-decoding
  • Merge pull request #156 from ConsenSys/std/twistedEdwards
  • Merge pull request #151 from ConsenSys/testable-circuits
  • Merge pull request #153 from ConsenSys/fix/plonk_constraints_blowup
  • Merge pull request #146 from ConsenSys/feat/ml-snark-pairing
  • Merge pull request #148 from ConsenSys/perf-range-check