Skip to content

Conversation

@ivokub
Copy link
Contributor

@ivokub ivokub commented Nov 17, 2025

This implements P256Verify glue. It is currently a separate package from ECDATA to avoid integration issues when merging ECDATA to small-fields implementation. After merging small-fields, I think it would make sense to move this package there as on arithmetization side it is handled in ECDATA as well.

Depends on #915 which fixed some update issues when updating gnark.

Checklist

  • I wrote new tests for my new core changes.
  • I have successfully ran tests, style checker and build against my new changes locally.
  • I have informed the team of any breaking changes if there are any.

Note

Introduces a new P-256 verify prover module and wires it into zkEVM settings, compilation, serialization, and proving flow with tests and test vectors.

  • P256 Verify Module:
    • Adds prover/zkevm/prover/p256verify with circuit, limits, module, input filler, and tests.
    • Includes test data generator and CSV vectors in prover/zkevm/prover/p256verify/testdata.
  • Integration:
    • Registers p256verify.MultiP256VerifyInstanceCircuit in prover/protocol/serialization/implementation_registry.go.
    • Extends zkevm.Settings with P256Verify limits and sets NbInputPerInstanceP256Verify = 6 in prover/zkevm/full.go.
    • Wires module into ZkEvm (prover/zkevm/zkevm.go): construction, struct field, and assignment in prover step.

Written by Cursor Bugbot for commit 20af8d8. This will update automatically on new commits. Configure here.

@ivokub ivokub self-assigned this Nov 17, 2025
@ivokub ivokub changed the base branch from main to feat/bls-glue November 17, 2025 11:47
@codecov-commenter
Copy link

codecov-commenter commented Nov 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.50%. Comparing base (343757f) to head (20af8d8).

Additional details and impacted files
@@               Coverage Diff                @@
##             feat/bls-glue    #1739   +/-   ##
================================================
  Coverage            65.50%   65.50%           
  Complexity            1476     1476           
================================================
  Files                  382      382           
  Lines                14519    14519           
  Branches              1439     1439           
================================================
  Hits                  9510     9510           
  Misses                4409     4409           
  Partials               600      600           
Flag Coverage Δ *Carryforward flag
hardhat 96.20% <ø> (ø)
kotlin 63.16% <ø> (ø) Carriedforward from 798d22c

*This pull request uses carry forward flags. Click here to find out more.
see 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ivokub ivokub marked this pull request as ready for review November 19, 2025 02:56
@ivokub
Copy link
Contributor Author

ivokub commented Nov 19, 2025

The PR is ready to review - but as it is based on BLS glue PR, then the review will we dismissed if the other one will be merged, so we can review it later.

It also depends on a gnark non-master branch (until the corresponding implementation on gnark side is merged). We need to update the gnark dependency to master before merging to avoid dangling commits.

jonesho pushed a commit that referenced this pull request Nov 24, 2025
This also updates `linea-constraints` to latest master.
ivokub added a commit that referenced this pull request Nov 24, 2025
commit 7b78570
Author: Ivo Kubjas <[email protected]>
Date:   Mon Nov 24 12:50:12 2025 +0000

    chore: gnark update to master

commit 9c19167
Author: Ivo Kubjas <[email protected]>
Date:   Wed Nov 19 03:19:28 2025 +0000

    fix: ensure assignment is called

commit 03437cf
Author: Ivo Kubjas <[email protected]>
Date:   Wed Nov 19 02:53:20 2025 +0000

    feat: define p256 input instance count

commit 1cf0482
Merge: 81d6377 c5117f9
Author: Ivo Kubjas <[email protected]>
Date:   Wed Nov 19 02:50:51 2025 +0000

    Merge branch 'feat/bls-glue' into feat/secp256r1

commit c5117f9
Author: Ivo Kubjas <[email protected]>
Date:   Wed Nov 19 02:48:12 2025 +0000

    feat: add default circuit sizes

commit 81d6377
Author: Ivo Kubjas <[email protected]>
Date:   Wed Nov 19 02:47:29 2025 +0000

    feat: loat p256 module

commit abedf2e
Author: Ivo Kubjas <[email protected]>
Date:   Wed Nov 19 02:45:28 2025 +0000

    fix: correct instance number calculation

commit 0aab08d
Author: Ivo Kubjas <[email protected]>
Date:   Wed Nov 19 02:44:58 2025 +0000

    docs: circuit size

commit bdfa261
Author: Ivo Kubjas <[email protected]>
Date:   Wed Nov 19 02:44:24 2025 +0000

    chore: gnark update

commit 1ae0acc
Author: Ivo Kubjas <[email protected]>
Date:   Tue Nov 18 12:06:59 2025 +0000

    docs: refer to test vector location

commit 2aa908b
Author: Ivo Kubjas <[email protected]>
Date:   Tue Nov 18 12:05:31 2025 +0000

    test: include generated tests

commit d4094d3
Author: Ivo Kubjas <[email protected]>
Date:   Tue Nov 18 12:05:18 2025 +0000

    test: implement unit tests

commit dae2651
Author: Ivo Kubjas <[email protected]>
Date:   Tue Nov 18 12:05:05 2025 +0000

    test: do not write noop test cases

commit 119bd71
Author: Ivo Kubjas <[email protected]>
Date:   Tue Nov 18 12:04:38 2025 +0000

    feat: implement inputfiller

commit 7620614
Author: Ivo Kubjas <[email protected]>
Date:   Tue Nov 18 11:27:39 2025 +0000

    test: add testdata generator

commit 332f497
Author: Ivo Kubjas <[email protected]>
Date:   Tue Nov 18 11:27:07 2025 +0000

    fix: enforce public vars

commit cb05285
Author: Ivo Kubjas <[email protected]>
Date:   Mon Nov 17 11:45:14 2025 +0000

    chore: implement p256verify glue

commit e19129c
Author: Ivo Kubjas <[email protected]>
Date:   Mon Nov 17 11:44:58 2025 +0000

    chore: gnark update

commit 439b911
Author: Ivo Kubjas <[email protected]>
Date:   Sun Nov 16 21:08:48 2025 +0000

    fix: more unique constraint names

commit be09cf7
Author: Ivo Kubjas <[email protected]>
Date:   Sun Nov 16 20:52:05 2025 +0000

    fix: incorrect limb count for scalar

commit 206ee01
Author: Ivo Kubjas <[email protected]>
Date:   Sun Nov 16 20:48:05 2025 +0000

    fix: ensure unique constraints

commit afbfaee
Author: Ivo Kubjas <[email protected]>
Date:   Sun Nov 16 20:43:31 2025 +0000

    fix: store new rangechecker

commit dd4e1eb
Author: Ivo Kubjas <[email protected]>
Date:   Sun Nov 16 20:20:59 2025 +0000

    chore: clarify error message

commit f76c7c4
Author: Ivo Kubjas <[email protected]>
Date:   Sun Nov 16 20:18:36 2025 +0000

    chore: remove excessive logging

commit b83d78c
Author: Ivo Kubjas <[email protected]>
Date:   Sun Nov 16 20:14:15 2025 +0000

    fix: compilation errors

commit 6f60e01
Merge: 5fdb039 cbf344e
Author: Ivo Kubjas <[email protected]>
Date:   Sun Nov 16 20:12:33 2025 +0000

    Merge branch 'main' into feat/bls-glue

commit 5fdb039
Author: Ivo Kubjas <[email protected]>
Date:   Fri Sep 26 08:14:18 2025 +0000

    test: make source local

commit 4d526ed
Author: Ivo Kubjas <[email protected]>
Date:   Mon Sep 29 22:18:09 2025 +0000

    feat: integrate BLS precompile with zkevm

commit 81a8876
Author: Ivo Kubjas <[email protected]>
Date:   Mon Sep 29 22:17:48 2025 +0000

    docs: limits documentation

commit a102526
Author: Ivo Kubjas <[email protected]>
Date:   Mon Sep 29 22:17:26 2025 +0000

    feat: precise bls source getters

commit d312c3d
Author: Ivo Kubjas <[email protected]>
Date:   Mon Sep 29 13:14:35 2025 +0000

    test: regenerate testdata

commit b392c30
Author: Ivo Kubjas <[email protected]>
Date:   Mon Sep 29 11:36:29 2025 +0000

    fix: align G2 tower order with gnark

commit e823165
Author: Ivo Kubjas <[email protected]>
Date:   Fri Sep 26 13:09:09 2025 +0000

    feat: remove circuit number limits

commit 152d2a0
Author: Ivo Kubjas <[email protected]>
Date:   Wed Sep 24 11:28:54 2025 +0000

    test: update included test files

commit 3bf1ff6
Author: Ivo Kubjas <[email protected]>
Date:   Wed Sep 24 10:49:29 2025 +0000

    fix: change ordering of serialized values

commit c1bb5b6
Author: Ivo Kubjas <[email protected]>
Date:   Thu Sep 18 09:36:56 2025 +0000

    chore: go mod tidy

commit 9b138df
Author: Ivo Kubjas <[email protected]>
Date:   Fri Sep 5 11:37:24 2025 +0000

    test: add BLS testdata generator

commit 44d9251
Author: Ivo Kubjas <[email protected]>
Date:   Tue Sep 2 11:05:12 2025 +0000

    test: include minimal number of test files

commit 81d4abf
Author: Ivo Kubjas <[email protected]>
Date:   Fri Aug 29 15:09:24 2025 +0000

    feat: add BLS precompile glue

commit 6902d28
Author: Ivo Kubjas <[email protected]>
Date:   Fri Aug 29 15:09:01 2025 +0000

    feat: csvtraces fill up to column size

commit ae6bc69
Author: Ivo Kubjas <[email protected]>
Date:   Fri Aug 29 15:07:38 2025 +0000

    fix: gnark schema walker field

commit 896ba98
Author: Ivo Kubjas <[email protected]>
Date:   Fri Aug 29 15:07:17 2025 +0000

    fix: typed builder

commit af228c7
Author: Ivo Kubjas <[email protected]>
Date:   Fri Aug 29 15:06:50 2025 +0000

    fix: remove unused test engine option

commit 8bbd5ba
Author: Ivo Kubjas <[email protected]>
Date:   Fri Aug 29 15:06:38 2025 +0000

    fix: gnark logderiv interface change

commit 2d1d55e
Author: Ivo Kubjas <[email protected]>
Date:   Fri Aug 29 15:05:50 2025 +0000

    chore: cherry pick gkr changes from smallfield

commit b6a374a
Author: Ivo Kubjas <[email protected]>
Date:   Thu Sep 18 09:35:46 2025 +0000

    chore: gnark dependency update
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