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

feat: DONOTMERGE: Feature/ec precompiles #92

Open
wants to merge 134 commits into
base: main
Choose a base branch
from
Open

Conversation

mm-zk
Copy link
Contributor

@mm-zk mm-zk commented Jan 27, 2025

No description provided.

…ort pairing_ce as bn254 in zkevm_opcode_defs
mm-zk and others added 27 commits February 4, 2025 13:16
Assign proper initial state to the queue
* updated geometry
* created new '1.7.0' version (might get renamed in the future)
* added new circuits to compute_setups
* Fixes to multipairing naive - to be able to generate verification keys
* updated scheduler to 26k (to still fit the circtuit)
* generated verification keys & finalization hints
* Added tests from other crates to CI
* Fixed failing ones.
Added test that covers both in & out of circuit, and runs in ~100
seconds.

To run:

```
cargo test --lib --release -- --test  ec_pairing_test  --nocapture
```
Cover exception cases: 

- G1 infinity point, the result should be zero, and the point should be
masked
- G2 infinity point, the result should be zero, and the point should be
masked
- G1 and G2 are not on the curve; the result should be masked, but
success should be true

Fixed bugs: 

- bug in subgroup check 
- bug in Oracle 
- Pairing did not correctly handle infinity points
* DL code didnt' do subgroup check in the out-of-circtuit.
* Added more tests
* Currently one of the test is marked as ignored, as DL didn't do
subgroup check in-circuit (and we're modifying this code in next PR
anyways)
* Changing in-circuit code to use the outer layer from DL, but
internally run the 'naive' multipairing for 1 pair.

---------

Co-authored-by: Alexander <alex.m.vlasov@gmail.com>
Updated basic_test.json from the most recent test-contracts.
Removing ECPairing naive. We'll use the 'outer' layer from ECPairing and
then use 'naive' inside.
* fixed issue with ECPairing and the queue
* updated geometry config


Now the basic_test should work e2e
Changed EC/modexp circuits to use less columns (in the past they used
over 200).
* torus and extension tests were moved to zksync-crypto
* cleaned up ECPairing tests that were still using older code
@mm-zk mm-zk changed the title DONOTMERGE: Feature/ec precompiles feat: DONOTMERGE: Feature/ec precompiles Feb 21, 2025
koloz193 and others added 2 commits February 21, 2025 09:21
Co-authored-by: mm <mm@matterlabs.dev>
Failing tests:
- `ec_pairing_empty_data`
- `ec_pairing_all_modules_test`
- `ec_add_invalid_4_test`
- `ec_add_invalid_6_test`
- `ec_add_invalid_7_test`
- `ec_mul_invalid_2_test`
- `mod_exp_exp_zero`

---------

Co-authored-by: Zach Kolodny <zach.kolodny@gmail.com>
Co-authored-by: Vlad Bochok <vladbochok@Vlads-MacBook-Pro.local>
Co-authored-by: Fitznik <oshchypok.olena@gmail.com>
Co-authored-by: mm <mm@matterlabs.dev>
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.

5 participants