Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge main 20240204 #12

Closed
wants to merge 55 commits into from
Closed

Conversation

liuxiaobleach
Copy link
Collaborator

No description provided.

yelhousni and others added 30 commits December 20, 2023 14:38
* chore: update go.mod

* chore: follow native transcript

* chore: follow native transcript

* chore: go generate

* fix: do not pad challenge in fri

* chore: gnark-crypto update

* feat: pad challenge always to full field element

* fix: remove domain separation in test

* fix: report actual block size for compatibility

* chore: go mod update

* revert: remove domain separation

* chore: follow gnark-crypto options

* chore: go generate

* chore: remove constant package

* chore: go mod update

* refactor: remove constant/ generation
* refactor: step 1 make pk lighter

* perf: setup can use kzg lagrange too

* perf: less Clone in plonk Prove

* style: code cleaning

* style: clean deadcode

* fix: remove fft import from test

* feat: use fft without precomputing twiddles in plonk prove (Consensys#969)

* feat: update to latest gnark crypto fft stuff

* test: all test OK

* chore(deps): bump golang.org/x/crypto from 0.12.0 to 0.17.0 (Consensys#973)

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.12.0 to 0.17.0.
- [Commits](golang/crypto@v0.12.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* perf(ecdsa): use GLV in JointScalarMulBase

* fix: swith points order in JointScalarMulBase

* chore: adapt changes from native Fiat-Shamir transcript (Consensys#974)

* chore: update go.mod

* chore: follow native transcript

* chore: follow native transcript

* chore: go generate

* fix: do not pad challenge in fri

* chore: gnark-crypto update

* feat: pad challenge always to full field element

* fix: remove domain separation in test

* fix: report actual block size for compatibility

* chore: go mod update

* revert: remove domain separation

* chore: follow gnark-crypto options

* chore: go generate

* chore: remove constant package

* chore: go mod update

* refactor: remove constant/ generation

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Youssef El Housni <[email protected]>
Co-authored-by: Youssef El Housni <[email protected]>
Co-authored-by: Ivo Kubjas <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Ivo Kubjas <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Youssef El Housni <[email protected]>
Co-authored-by: Youssef El Housni <[email protected]>
* test: highlight failing test -> resolved

* build: update compress version

* build: update to compress v0.2.0

* build upgrade compress dependency

* fix compression mode at byte 2

---------

Co-authored-by: Arya Tabaie <[email protected]>
* feat dict as var

* test bn254 -> bls12-377

* fix more bn254 -> bls12-377

* test add dict checksum

* test SolvingSucceeded -> CheckCircuit

* refac compressionCircuit -> TestCompressionCircuit
* std: recursion: plonk: fix SRS generation in examples

To create a new SRS for outer circuit verification, use the outer constraint
system object rather than the inner one. Using the inner CS results in the
following error:
  panic: interface conversion: kzg.SRS is *kzg.SRS, not *kzg.SRS (types from different packages)

Signed-off-by: Wojciech Zmuda <[email protected]>

* std: recursion: plonk: fix native example

Set the right curves for the example to function correctly. Clean up the comments,
as they have got some leftovers from other examples they were based on.

Signed-off-by: Wojciech Zmuda <[email protected]>

---------

Signed-off-by: Wojciech Zmuda <[email protected]>
perf(ecmul): use GLV with safe handling of edge cases in EVM ecmul
* fix: remove shorthash override for same field

* test: add BN254 in BN254
Tabaie and others added 25 commits January 21, 2024 10:10
* refac: Decompressor to take bytes as input

* test recombine bytes

* fix recombine bytes works

* refac NumReader not to precompute results

* perf fewer constraints for BreakUpBytesIntoWords

* fix LessThan

* fix testCompressionRoundTrip

* test most of them pass

* test isolate length bug

* fix silly eof bug

* refac moving some funcs around for visibility

* feat shift left

* style "Snark" is redundant

* test with left shift

* revert don't always shift left

* test compression e2e

* fix another unpack length bug

* fix register the unpack hint

* feat: better checksumBytes

* fix purego checksum bug

* feat write zeros past eof

* feat checksum "validlength"

* style: remove version "magic numbers"

* bench shift left

* docs io

* docs more for io

* test custom constraint api

* bench BreakUpBytesIntoWords savings

* refac move "integration testing" logic to zkevm monorepo
* feat: move size and generator to circuit VK

* test: generate Lagrange SRS for circuit size

* test: bigger circuits for different domains

* test: correct type params

* docs: add warning for max circuit size
perf: groth16 verifier circuit uses precomputed lines for all curves
…1017)

* feat: add mux for non-native elements

* feat: add mux for G1 elements

* test: mux for non-native

* test: mux for non-native G1

* test: mux for native G1

* feat: implement arbitrary nb circuit VK switch

* test: use more than 4 circuit VKs

* docs: add mux package documentation

* docs: describe circuit verification key logic

* refactor: simplify verification key switch without reflect
* fix: Decompressor to return -1 when output doesn't fit

* docs explain "outBuffer too short" logic

* fix make staticcheck happy
Fix: edge cases in `std/algebra` elliptic curve arithmetic circuit (`emulated` and `2-chains)`
* fix: use subtraction with reduce in AssertIsEqual

To show that two field elements are equal, we instead show that the difference
of the field elements is a multiple of emulated modulus. However, for computing
the difference we used non-reducing version of subtraction to avoid infinite
cycles. With the new mulmod implementation the reducing versions do not call
AssertIsEqual anymore so the infinite cycles are averted. For some edge cases
the difference may overflow scalar field and solving may fail.

* test: add regression test
* feat: add PLONK verifier options for safe formulas

* test: enable wo commit tests

* refactor: rename option

* refactor: renamed option UseSafe in algebra

* refactor: renamed option UseSafe in algebra

---------

Co-authored-by: Youssef El Housni <[email protected]>
liuxiaobleach pushed a commit that referenced this pull request Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants