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

Perf: KZG verify gadget #874

Merged
merged 39 commits into from
Dec 13, 2023
Merged

Perf: KZG verify gadget #874

merged 39 commits into from
Dec 13, 2023

Conversation

yelhousni
Copy link
Contributor

@yelhousni yelhousni commented Oct 19, 2023

Description

(Refactored as in #930 )

The current KZG verify gadget computes (in AssertProof) the multi-pairing e(totalG1, vk.SRS[0]) * e(negQuotientPoly, vk.SRS[1]) == 1 assuming all arguments are variable. However vk.SRS[0]=G₂ and vk.SRS[1]=[α]G₂ are fixed points in G2. This PR pre-computes the lines used in the multi-pairing hence avoiding G2 arithmetic in-circuit.

TODO:

  • pre-compute lines from vk.SRS[0]=G₂
  • pre-compute lines from vk.SRS[1]=[α]G₂
  • implement DoublePairingFixedQCheck which does e(var, fix) * e(var, var) == 1
    • BN254
    • BLS12-381
    • BW6-761 (Naive algorithm for now)
    • BLS12-377
    • BLS24-315
  • implement DoublePairingFixedQCheck which does e(var, fix) * e(var, fix) == 1
  • make the fixed pairing agnostic/generic wrt fixed argument + lazy pre-computation
  • use new function in KZG verify gadget

N.B.: To do the same for BW6-761, we need to revisit the Miller loop algortihm to be an ate loop instead of a Tate. Will do in a separate PR.
Edit: This was done in #876 and merged here

Type of change

  • New feature (non-breaking change which adds functionality)

How has this been tested?

Same existing tests work for the new feature.

How has this been benchmarked?

  • Emulated case: verifying a KZG proof on BW6-761 with a BN254-SNARK:
Old New
R1CS 5,171,863 4,147,830
SCS 49,547,799 38,776,383

This is a 10.7M+ saving in SCS which largely offsets the 24k loss in #876 due to Miller algorithm change.

  • Native case: verifying a KZG proof on BLS12-377 with a BW6-761-SNARK:
Old New
R1CS 18,390 16,414
SCS 74,128 68,502

This is a 5.6k saving in SCS. A pairing in native already does not cost much.

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I did not modify files generated from templates
  • golangci-lint does not output errors locally
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@yelhousni yelhousni added the perf label Oct 19, 2023
@yelhousni yelhousni added this to the v0.9.0 milestone Oct 19, 2023
@yelhousni yelhousni self-assigned this Oct 19, 2023
@yelhousni yelhousni marked this pull request as draft October 19, 2023 20:46
@github-actions
Copy link

📦 github.com/consensys/gnark/std/gkr
TestMiMCFullDepthNoDepSolve 0s

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xb7346a]

goroutine 148361 [running]:
github.com/consensys/gnark-crypto/ecc/bn254/fr/iop.(*Polynomial).ToCanonical(0x0, 0xc000248b64?, {0xc000340f60?, 0x4e?, 0xfbde90?})
	/home/runner/go/pkg/mod/github.com/consensys/[email protected]/ecc/bn254/fr/iop/polynomial.go:338 +0x2a
github.com/consensys/gnark/backend/plonk/bn254.(*instance).computeNumerator.func6(0x0)
	/home/runner/work/gnark/gnark/backend/plonk/bn254/prove.go:987 +0xc5
github.com/consensys/gnark/backend/plonk/bn254.batchApply.func1(0xc0000147a0?)
	/home/runner/work/gnark/gnark/backend/plonk/bn254/prove.go:1083 +0x31
created by github.com/consensys/gnark/backend/plonk/bn254.batchApply in goroutine 147414
	/home/runner/work/gnark/gnark/backend/plonk/bn254/prove.go:1082 +0x12b

@yelhousni yelhousni requested a review from ivokub October 23, 2023 23:02
@yelhousni yelhousni marked this pull request as ready for review October 23, 2023 23:02
@yelhousni yelhousni added zk-evm P1: High Issue priority: high labels Oct 24, 2023
@github-actions
Copy link

📦 github.com/consensys/gnark/std/algebra

std/algebra/defaults.go:70:8: cannot use p (variable of type *sw_bw6761.Pairing) as Pairing[sw_emulated.AffinePoint[emparams.BW6761Fp], sw_emulated.AffinePoint[emparams.BW6761Fp], fields_bw6761.E6] value in assignment: *sw_bw6761.Pairing does not implement Pairing[sw_emulated.AffinePoint[emparams.BW6761Fp], sw_emulated.AffinePoint[emparams.BW6761Fp], fields_bw6761.E6] (missing method DoublePairingFixedQCheck)

📦 github.com/consensys/gnark/std/commitments/kzg
🛑 build failed

📦 github.com/consensys/gnark/std/recursion/groth16
🛑 build failed

Copy link

📦 github.com/consensys/gnark
🛑 build failed

📦 github.com/consensys/gnark/backend/groth16
🛑 build failed

📦 github.com/consensys/gnark/backend/groth16/bn254/icicle
🛑 build failed

📦 github.com/consensys/gnark/backend/groth16/bw6-633
TestProvingKeySerialization 0s

📦 github.com/consensys/gnark/backend/groth16/bw6-761
TestVerifyingKeySerialization 0s

+ VerifyingKey -> writer -> reader -> VerifyingKey should stay constant:
   OK, passed 10 tests.

📦 github.com/consensys/gnark/backend/plonk/bls12-377

backend/plonk/bls12-377/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls12-377/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls12-377/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls12-377/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/backend/plonk/bls12-377 [github.com/consensys/gnark.test]

backend/plonk/bls12-377/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls12-377/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls12-377/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls12-377/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/backend/plonk/bls12-381

backend/plonk/bls12-381/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls12-381/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls12-381/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls12-381/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/backend/plonk/bls12-381 [github.com/consensys/gnark.test]

backend/plonk/bls12-381/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls12-381/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls12-381/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls12-381/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/backend/plonk/bls24-315

backend/plonk/bls24-315/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls24-315/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls24-315/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls24-315/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/backend/plonk/bls24-315 [github.com/consensys/gnark.test]

backend/plonk/bls24-315/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls24-315/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls24-315/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls24-315/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/backend/plonk/bls24-317

backend/plonk/bls24-317/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls24-317/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls24-317/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls24-317/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/backend/plonk/bls24-317 [github.com/consensys/gnark.test]

backend/plonk/bls24-317/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls24-317/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls24-317/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls24-317/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/backend/plonk/bn254

backend/plonk/bn254/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bn254/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bn254/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bn254/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/backend/plonk/bn254 [github.com/consensys/gnark.test]

backend/plonk/bn254/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bn254/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bn254/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bn254/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/backend/plonk/bw6-633

backend/plonk/bw6-633/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bw6-633/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bw6-633/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bw6-633/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/backend/plonk/bw6-633 [github.com/consensys/gnark.test]

backend/plonk/bw6-633/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bw6-633/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bw6-633/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bw6-633/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/backend/plonk/bw6-761

backend/plonk/bw6-761/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bw6-761/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bw6-761/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bw6-761/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/backend/plonk/bw6-761 [github.com/consensys/gnark.test]

backend/plonk/bw6-761/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bw6-761/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bw6-761/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bw6-761/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/constraint/bls12-377
TestSerialization 0s

TestSerialization/add 0s

    r1cs_test.go:60: add

TestSerialization/assert_equal 0s

    r1cs_test.go:60: assert_equal

TestSerialization/expo 0s

    r1cs_test.go:60: expo

TestSerialization/frombinary 0s

    r1cs_test.go:60: frombinary

TestSerialization/multi-output-hint 0s

    r1cs_test.go:60: multi-output-hint

TestSerialization/range_constant 0s

TestSerialization/recursive_hint 0s

    r1cs_test.go:60: recursive_hint

TestSerialization/reference_small 0s

    r1cs_test.go:60: reference_small

TestSerialization/xor 0s

    r1cs_test.go:60: xor

Copy link

📦 github.com/consensys/gnark
🛑 build failed

📦 github.com/consensys/gnark/backend/groth16
🛑 build failed

📦 github.com/consensys/gnark/backend/groth16/bls24-317
TestSingleSecretCommitted 0s

📦 github.com/consensys/gnark/backend/groth16/bw6-633
TestVerifyingKeySerialization 0s

+ VerifyingKey -> writer -> reader -> VerifyingKey should stay constant:
   OK, passed 10 tests.

📦 github.com/consensys/gnark/backend/groth16/bw6-761
TestVerifyingKeySerialization 0s

+ VerifyingKey -> writer -> reader -> VerifyingKey should stay constant:
   OK, passed 10 tests.

📦 github.com/consensys/gnark/backend/plonk/bls12-377

backend/plonk/bls12-377/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls12-377/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls12-377/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls12-377/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/backend/plonk/bls12-377 [github.com/consensys/gnark.test]

backend/plonk/bls12-377/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls12-377/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls12-377/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls12-377/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/backend/plonk/bls12-381

backend/plonk/bls12-381/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls12-381/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls12-381/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls12-381/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/backend/plonk/bls12-381 [github.com/consensys/gnark.test]

backend/plonk/bls12-381/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls12-381/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls12-381/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls12-381/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/backend/plonk/bls24-315

backend/plonk/bls24-315/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls24-315/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls24-315/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls24-315/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/backend/plonk/bls24-315 [github.com/consensys/gnark.test]

backend/plonk/bls24-315/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls24-315/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls24-315/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls24-315/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/backend/plonk/bls24-317

backend/plonk/bls24-317/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls24-317/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls24-317/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls24-317/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/backend/plonk/bls24-317 [github.com/consensys/gnark.test]

backend/plonk/bls24-317/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls24-317/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls24-317/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bls24-317/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/backend/plonk/bn254

backend/plonk/bn254/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bn254/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bn254/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bn254/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/backend/plonk/bn254 [github.com/consensys/gnark.test]

backend/plonk/bn254/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bn254/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bn254/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bn254/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/backend/plonk/bw6-633

backend/plonk/bw6-633/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bw6-633/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bw6-633/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bw6-633/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/backend/plonk/bw6-633 [github.com/consensys/gnark.test]

backend/plonk/bw6-633/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bw6-633/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bw6-633/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bw6-633/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/backend/plonk/bw6-761

backend/plonk/bw6-761/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bw6-761/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bw6-761/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bw6-761/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/backend/plonk/bw6-761 [github.com/consensys/gnark.test]

backend/plonk/bw6-761/marshal.go:349:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bw6-761/marshal.go:350:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bw6-761/marshal.go:387:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)
backend/plonk/bw6-761/marshal.go:388:11: vk.Kzg.Lines undefined (type kzg.VerifyingKey has no field or method Lines)

📦 github.com/consensys/gnark/constraint/bls12-377
TestSerialization 0s

TestSerialization/add 0s

    r1cs_test.go:60: add

TestSerialization/and 0s

    r1cs_test.go:60: and

TestSerialization/assert_different 0s

    r1cs_test.go:60: assert_different

TestSerialization/assert_equal 0s

    r1cs_test.go:60: assert_equal

TestSerialization/cmp 0s

TestSerialization/determinism 0s

    r1cs_test.go:60: determinism

TestSerialization/div 0s

    r1cs_test.go:60: div

TestSerialization/expo 0s

    r1cs_test.go:60: expo

TestSerialization/frombinary 0s

    r1cs_test.go:60: frombinary

TestSerialization/inv 0s

    r1cs_test.go:60: inv

TestSerialization/isZero 0s

    r1cs_test.go:60: isZero

TestSerialization/mul 0s

    r1cs_test.go:60: mul

TestSerialization/multi-output-hint 0s

    r1cs_test.go:60: multi-output-hint

TestSerialization/neg 0s

    r1cs_test.go:60: neg

TestSerialization/or 0s

    r1cs_test.go:60: or

TestSerialization/orXoAndMulCircuit 0s

    r1cs_test.go:60: orXoAndMulCircuit

TestSerialization/range 0s

TestSerialization/recursive_hint 0s

    r1cs_test.go:60: recursive_hint

TestSerialization/reference_small 0s

    r1cs_test.go:60: reference_small

TestSerialization/select 0s

    r1cs_test.go:60: select

TestSerialization/sub 0s

    r1cs_test.go:60: sub

TestSerialization/xor 0s

    r1cs_test.go:60: xor

TestSerialization/xorCstVar 0s

    r1cs_test.go:60: xorCstVar

📦 github.com/consensys/gnark/constraint/bls12-381
TestSerialization 0s

TestSerialization/and 0s

    r1cs_test.go:60: and

TestSerialization/assert_boolean 0s

    r1cs_test.go:60: assert_boolean

TestSerialization/assert_different 0s

    r1cs_test.go:60: assert_different

TestSerialization/assert_equal 0s

    r1cs_test.go:60: assert_equal

TestSerialization/cmp 0s

TestSerialization/commit 0s

    r1cs_test.go:60: commit

TestSerialization/determinism 0s

    r1cs_test.go:60: determinism

TestSerialization/div 0s

    r1cs_test.go:60: div

TestSerialization/expo 0s

    r1cs_test.go:60: expo

TestSerialization/frombinary 0s

    r1cs_test.go:60: frombinary

TestSerialization/hint 0s

    r1cs_test.go:60: hint

TestSerialization/inv 0s

    r1cs_test.go:60: inv

TestSerialization/isZero 0s

    r1cs_test.go:60: isZero

TestSerialization/lookup2 0s

    r1cs_test.go:60: lookup2

TestSerialization/mul 0s

    r1cs_test.go:60: mul

TestSerialization/multi-output-hint 0s

    r1cs_test.go:60: multi-output-hint

TestSerialization/neg 0s

    r1cs_test.go:60: neg

TestSerialization/noComputationCircuit 0s

    r1cs_test.go:60: noComputationCircuit

TestSerialization/or 0s

    r1cs_test.go:60: or

TestSerialization/orXoAndMulCircuit 0s

    r1cs_test.go:60: orXoAndMulCircuit

TestSerialization/range 0s

TestSerialization/recursive_hint 0s

    r1cs_test.go:60: recursive_hint

TestSerialization/reference_small 0s

    r1cs_test.go:60: reference_small

TestSerialization/select 0s

    r1cs_test.go:60: select

TestSerialization/sub 0s

    r1cs_test.go:60: sub

TestSerialization/xor 0s

    r1cs_test.go:60: xor

TestSerialization/xorCstVar 0s

    r1cs_test.go:60: xorCstVar

📦 github.com/consensys/gnark/constraint/bls24-315
TestSerialization 0s

TestSerialization/assert_equal 0s

    r1cs_test.go:60: assert_equal

TestSerialization/cmp 0s

TestSerialization/determinism 0s

    r1cs_test.go:60: determinism

TestSerialization/div 0s

    r1cs_test.go:60: div

TestSerialization/frombinary 0s

    r1cs_test.go:60: frombinary

TestSerialization/isZero 0s

    r1cs_test.go:60: isZero

TestSerialization/lookup2 0s

    r1cs_test.go:60: lookup2

TestSerialization/mul 0s

    r1cs_test.go:60: mul

TestSerialization/multi-output-hint 0s

    r1cs_test.go:60: multi-output-hint

TestSerialization/neg 0s

    r1cs_test.go:60: neg

TestSerialization/noComputationCircuit 0s

    r1cs_test.go:60: noComputationCircuit

TestSerialization/range 0s

TestSerialization/range_constant 0s

TestSerialization/recursive_hint 0s

    r1cs_test.go:60: recursive_hint

TestSerialization/reference_small 0s

    r1cs_test.go:60: reference_small

TestSerialization/select 0s

    r1cs_test.go:60: select

TestSerialization/sub 0s

    r1cs_test.go:60: sub

📦 github.com/consensys/gnark/constraint/bls24-317
TestSerialization 0s

TestSerialization/add 0s

    r1cs_test.go:60: add

TestSerialization/isZero 0s

    r1cs_test.go:60: isZero

TestSerialization/range 0s

TestSerialization/xor 0s

    r1cs_test.go:60: xor

📦 github.com/consensys/gnark/constraint/bn254
TestSerialization 0s

TestSerialization/commit 0s

    r1cs_test.go:60: commit

TestSerialization/expo 0s

    r1cs_test.go:60: expo

TestSerialization/inv 0s

    r1cs_test.go:60: inv

TestSerialization/sub 0s

    r1cs_test.go:60: sub

Copy link

📦 github.com/consensys/gnark/std/math/emulated
TestInverse 0s

TestInverse/Goldilocks/limb=64 0s

TestInverse/Goldilocks/limb=64/bn254 0s

panic: test timed out after 30m0s
running tests:
	TestInverse (30m0s)
	TestInverse/Goldilocks/limb=64 (30m0s)
	TestInverse/Goldilocks/limb=64/bn254 (30m0s)

goroutine 322 [running]:
testing.(*M).startAlarm.func1()
	/opt/hostedtoolcache/go/1.21.3/x64/src/testing/testing.go:2259 +0x3b9
created by time.goFunc
	/opt/hostedtoolcache/go/1.21.3/x64/src/time/sleep.go:176 +0x2d

goroutine 1 [chan receive, 29 minutes]:
testing.(*T).Run(0xc0001876c0, {0xf1b10c?, 0x51fadc?}, 0xf7fce0)
	/opt/hostedtoolcache/go/1.21.3/x64/src/testing/testing.go:1649 +0x3c8
testing.runTests.func1(0x15fcd00?)
	/opt/hostedtoolcache/go/1.21.3/x64/src/testing/testing.go:2054 +0x3e
testing.tRunner(0xc0001876c0, 0xc00023bc48)
	/opt/hostedtoolcache/go/1.21.3/x64/src/testing/testing.go:1595 +0xff
testing.runTests(0xc00022b180?, {0x15f38c0, 0x1d, 0x1d}, {0x4182bf?, 0xc00023bd08?, 0x15fb3e0?})
	/opt/hostedtoolcache/go/1.21.3/x64/src/testing/testing.go:2052 +0x445
testing.(*M).Run(0xc00022b180)
	/opt/hostedtoolcache/go/1.21.3/x64/src/testing/testing.go:1925 +0x636
main.main()
	_testmain.go:109 +0x19c

goroutine 311 [chan receive, 29 minutes]:
testing.(*T).Run(0xc00050cea0, {0xc0000323d8?, 0xc000501ed0?}, 0xc00052c310)
	/opt/hostedtoolcache/go/1.21.3/x64/src/testing/testing.go:1649 +0x3c8
github.com/consensys/gnark/test.(*Assert).Run(0xc000501f18, 0xc00052c300, {0xc000501f28?, 0x39?, 0x5ad?})
	/home/runner/work/gnark/gnark/test/assert.go:64 +0x99
github.com/consensys/gnark/std/math/emulated.testInverse[...](0xc00050cea0)
	/home/runner/work/gnark/gnark/std/math/emulated/element_test.go:403 +0x107
github.com/consensys/gnark/std/math/emulated.TestInverse(0xc00014e0a0?)
	/home/runner/work/gnark/gnark/std/math/emulated/element_test.go:392 +0x25
testing.tRunner(0xc00050cea0, 0xf7fce0)
	/opt/hostedtoolcache/go/1.21.3/x64/src/testing/testing.go:1595 +0xff
created by testing.(*T).Run in goroutine 1
	/opt/hostedtoolcache/go/1.21.3/x64/src/testing/testing.go:1648 +0x3ad

goroutine 312 [chan receive, 29 minutes]:
testing.(*T).Run(0xc00050d040, {0xc0005646d8?, 0xc000179cc8?}, 0xc00052c3b0)
	/opt/hostedtoolcache/go/1.21.3/x64/src/testing/testing.go:1649 +0x3c8
github.com/consensys/gnark/test.(*Assert).Run(0xc00052c370, 0xc00055a240, {0xc000179e08?, 0x15b232c?, 0x2?})
	/home/runner/work/gnark/gnark/test/assert.go:64 +0x99
github.com/consensys/gnark/test.(*Assert).CheckCircuit(0xc000578000?, {0x10985c0?, 0xc00014e690}, {0xc000179e88, 0x1, 0x1})
	/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:39 +0x168
github.com/consensys/gnark/std/math/emulated.testInverse[...].func1()
	/home/runner/work/gnark/gnark/std/math/emulated/element_test.go:409 +0x2bd
github.com/consensys/gnark/test.(*Assert).Run.func1(0xc00050d040)
	/home/runner/work/gnark/gnark/test/assert.go:66 +0xa7
testing.tRunner(0xc00050d040, 0xc00052c310)
	/opt/hostedtoolcache/go/1.21.3/x64/src/testing/testing.go:1595 +0xff
created by testing.(*T).Run in goroutine 311
	/opt/hostedtoolcache/go/1.21.3/x64/src/testing/testing.go:1648 +0x3ad

goroutine 313 [runnable]:
github.com/consensys/gnark/test.(*engine).ConstantValue(0xc000204210, {0xf0d180?, 0xc0005780a0?})
	/home/runner/work/gnark/gnark/test/engine.go:562 +0x48
github.com/consensys/gnark/std/math/emulated.(*Field[...]).constantValue(0x10ae000, 0xc00014e8c0)
	/home/runner/work/gnark/gnark/std/math/emulated/field.go:223 +0xa8
github.com/consensys/gnark/std/math/emulated.(*Field[...]).enforceWidthConditional(0x10ae000, 0xc00014e8c0)
	/home/runner/work/gnark/gnark/std/math/emulated/field.go:170 +0x3b
github.com/consensys/gnark/std/math/emulated.(*Field[...]).Reduce(0x10ae000?, 0xc00014e8c0)
	/home/runner/work/gnark/gnark/std/math/emulated/field_ops.go:253 +0x30
github.com/consensys/gnark/std/math/emulated.(*Field[...]).reduceAndOp(0x10ae000?, 0xc0001cfb58, 0xc0001cfb40, 0xc00014e8c0, 0x0)
	/home/runner/work/gnark/gnark/std/math/emulated/field_ops.go:404 +0x132
github.com/consensys/gnark/std/math/emulated.(*Field[...]).Inverse(0x10a6a98?, 0xc000204210?)
	/home/runner/work/gnark/gnark/std/math/emulated/field_ops.go:44 +0x7b
github.com/consensys/gnark/std/math/emulated.(*InverseCircuit[...]).Define(0x109a5c0, {0x10a6a98, 0xc000204210?})
	/home/runner/work/gnark/gnark/std/math/emulated/element_test.go:386 +0x65
github.com/consensys/gnark/test.IsSolved({0x10985c0, 0xc00014e690}, {0x10985c0, 0xc00014e6e0}, 0xc000578320, {0x0, 0x0, 0x0?})
	/home/runner/work/gnark/gnark/test/engine.go:131 +0x445
github.com/consensys/gnark/test.(*Assert).CheckCircuit.func1(0x0?)
	/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:49 +0x29b
github.com/consensys/gnark/test.(*Assert).Run.func1(0xc00050d1e0)
	/home/runner/work/gnark/gnark/test/assert.go:66 +0xa7
testing.tRunner(0xc00050d1e0, 0xc00052c3b0)
	/opt/hostedtoolcache/go/1.21.3/x64/src/testing/testing.go:1595 +0xff
created by testing.(*T).Run in goroutine 312
	/opt/hostedtoolcache/go/1.21.3/x64/src/testing/testing.go:1648 +0x3ad

Copy link

📦 github.com/consensys/gnark
TestIntegrationAPI 1m6.1s

TestIntegrationAPI/add 9.55s

TestIntegrationAPI/add/bn254 0s

TestIntegrationAPI/add/bn254/plonk 10ms

TestIntegrationAPI/add/bn254/plonk/valid_witness 10ms

TestIntegrationAPI/add/bn254/plonk/valid_witness/solidity 0s

    assert_checkcircuit.go:135: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert_solidity.go:44
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:135
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	Received unexpected error:
        	            	template: t:25:35: executing "t" at <.Kzg.G2>: can't evaluate field G2 in type kzg.VerifyingKey
        	Test:       	TestIntegrationAPI/add/bn254/plonk/valid_witness/solidity

TestIntegrationAPI/assert_different 1.07s

TestIntegrationAPI/assert_different/bn254 0s

TestIntegrationAPI/assert_different/bn254/plonk 10ms

TestIntegrationAPI/assert_different/bn254/plonk/valid_witness 10ms

TestIntegrationAPI/assert_different/bn254/plonk/valid_witness/solidity 0s

    assert_checkcircuit.go:135: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert_solidity.go:44
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:135
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	Received unexpected error:
        	            	template: t:25:35: executing "t" at <.Kzg.G2>: can't evaluate field G2 in type kzg.VerifyingKey
        	Test:       	TestIntegrationAPI/assert_different/bn254/plonk/valid_witness/solidity

TestIntegrationAPI/assert_equal 1.06s

TestIntegrationAPI/assert_equal/bn254 0s

TestIntegrationAPI/assert_equal/bn254/plonk 10ms

TestIntegrationAPI/assert_equal/bn254/plonk/valid_witness 0s

TestIntegrationAPI/assert_equal/bn254/plonk/valid_witness/solidity 0s

    assert_checkcircuit.go:135: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert_solidity.go:44
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:135
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	Received unexpected error:
        	            	template: t:25:35: executing "t" at <.Kzg.G2>: can't evaluate field G2 in type kzg.VerifyingKey
        	Test:       	TestIntegrationAPI/assert_equal/bn254/plonk/valid_witness/solidity

TestIntegrationAPI/cmp 17.93s

TestIntegrationAPI/cmp/bn254 60ms

TestIntegrationAPI/cmp/bn254/plonk 900ms

TestIntegrationAPI/cmp/bn254/plonk/valid_witness 100ms

TestIntegrationAPI/cmp/bn254/plonk/valid_witness/solidity 0s

    assert_checkcircuit.go:135: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert_solidity.go:44
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:135
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	Received unexpected error:
        	            	template: t:25:35: executing "t" at <.Kzg.G2>: can't evaluate field G2 in type kzg.VerifyingKey
        	Test:       	TestIntegrationAPI/cmp/bn254/plonk/valid_witness/solidity

TestIntegrationAPI/cmp/bn254/plonk/valid_witness#01 100ms

TestIntegrationAPI/cmp/bn254/plonk/valid_witness#01/solidity 0s

    assert_checkcircuit.go:135: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert_solidity.go:44
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:135
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	Received unexpected error:
        	            	template: t:25:35: executing "t" at <.Kzg.G2>: can't evaluate field G2 in type kzg.VerifyingKey
        	Test:       	TestIntegrationAPI/cmp/bn254/plonk/valid_witness#01/solidity

TestIntegrationAPI/cmp/bn254/plonk/valid_witness#02 90ms

TestIntegrationAPI/cmp/bn254/plonk/valid_witness#02/solidity 0s

    assert_checkcircuit.go:135: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert_solidity.go:44
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:135
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	Received unexpected error:
        	            	template: t:25:35: executing "t" at <.Kzg.G2>: can't evaluate field G2 in type kzg.VerifyingKey
        	Test:       	TestIntegrationAPI/cmp/bn254/plonk/valid_witness#02/solidity

TestIntegrationAPI/commit 120ms

TestIntegrationAPI/commit/bn254 0s

TestIntegrationAPI/commit/bn254/plonk 10ms

TestIntegrationAPI/commit/bn254/plonk/valid_witness 10ms

TestIntegrationAPI/commit/bn254/plonk/valid_witness/solidity 0s

    assert_checkcircuit.go:135: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert_solidity.go:44
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:135
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	Received unexpected error:
        	            	template: t:25:35: executing "t" at <.Kzg.G2>: can't evaluate field G2 in type kzg.VerifyingKey
        	Test:       	TestIntegrationAPI/commit/bn254/plonk/valid_witness/solidity

TestIntegrationAPI/determinism 1.09s

TestIntegrationAPI/determinism/bn254 0s

TestIntegrationAPI/determinism/bn254/plonk 10ms

TestIntegrationAPI/determinism/bn254/plonk/valid_witness 10ms

TestIntegrationAPI/determinism/bn254/plonk/valid_witness/solidity 0s

    assert_checkcircuit.go:135: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert_solidity.go:44
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:135
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	Received unexpected error:
        	            	template: t:25:35: executing "t" at <.Kzg.G2>: can't evaluate field G2 in type kzg.VerifyingKey
        	Test:       	TestIntegrationAPI/determinism/bn254/plonk/valid_witness/solidity

TestIntegrationAPI/div 1s

TestIntegrationAPI/div/bn254 0s

TestIntegrationAPI/div/bn254/plonk 10ms

TestIntegrationAPI/div/bn254/plonk/valid_witness 0s

TestIntegrationAPI/div/bn254/plonk/valid_witness/solidity 0s

    assert_checkcircuit.go:135: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert_solidity.go:44
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:135
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	Received unexpected error:
        	            	template: t:25:35: executing "t" at <.Kzg.G2>: can't evaluate field G2 in type kzg.VerifyingKey
        	Test:       	TestIntegrationAPI/div/bn254/plonk/valid_witness/solidity

TestIntegrationAPI/expo 1.11s

TestIntegrationAPI/expo/bn254 0s

TestIntegrationAPI/expo/bn254/plonk 10ms

TestIntegrationAPI/expo/bn254/plonk/valid_witness 10ms

TestIntegrationAPI/expo/bn254/plonk/valid_witness/solidity 0s

    assert_checkcircuit.go:135: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert_solidity.go:44
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:135
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	Received unexpected error:
        	            	template: t:25:35: executing "t" at <.Kzg.G2>: can't evaluate field G2 in type kzg.VerifyingKey
        	Test:       	TestIntegrationAPI/expo/bn254/plonk/valid_witness/solidity

TestIntegrationAPI/frombinary 1.09s

TestIntegrationAPI/frombinary/bn254 0s

TestIntegrationAPI/frombinary/bn254/plonk 10ms

TestIntegrationAPI/frombinary/bn254/plonk/valid_witness 10ms

TestIntegrationAPI/frombinary/bn254/plonk/valid_witness/solidity 0s

    assert_checkcircuit.go:135: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert_solidity.go:44
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:135
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	Received unexpected error:
        	            	template: t:25:35: executing "t" at <.Kzg.G2>: can't evaluate field G2 in type kzg.VerifyingKey
        	Test:       	TestIntegrationAPI/frombinary/bn254/plonk/valid_witness/solidity

TestIntegrationAPI/inv 1s

TestIntegrationAPI/inv/bn254 0s

TestIntegrationAPI/inv/bn254/plonk 10ms

TestIntegrationAPI/inv/bn254/plonk/valid_witness 10ms

TestIntegrationAPI/inv/bn254/plonk/valid_witness/solidity 0s

    assert_checkcircuit.go:135: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert_solidity.go:44
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:135
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	Received unexpected error:
        	            	template: t:25:35: executing "t" at <.Kzg.G2>: can't evaluate field G2 in type kzg.VerifyingKey
        	Test:       	TestIntegrationAPI/inv/bn254/plonk/valid_witness/solidity

TestIntegrationAPI/lookup2 4.22s

TestIntegrationAPI/lookup2/bn254 0s

TestIntegrationAPI/lookup2/bn254/plonk 30ms

TestIntegrationAPI/lookup2/bn254/plonk/valid_witness 10ms

TestIntegrationAPI/lookup2/bn254/plonk/valid_witness/solidity 0s

    assert_checkcircuit.go:135: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert_solidity.go:44
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:135
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	Received unexpected error:
        	            	template: t:25:35: executing "t" at <.Kzg.G2>: can't evaluate field G2 in type kzg.VerifyingKey
        	Test:       	TestIntegrationAPI/lookup2/bn254/plonk/valid_witness/solidity

TestIntegrationAPI/lookup2/bn254/plonk/valid_witness#01 10ms

TestIntegrationAPI/lookup2/bn254/plonk/valid_witness#01/solidity 0s

    assert_checkcircuit.go:135: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert_solidity.go:44
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:135
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	Received unexpected error:
        	            	template: t:25:35: executing "t" at <.Kzg.G2>: can't evaluate field G2 in type kzg.VerifyingKey
        	Test:       	TestIntegrationAPI/lookup2/bn254/plonk/valid_witness#01/solidity

TestIntegrationAPI/lookup2/bn254/plonk/valid_witness#02 10ms

TestIntegrationAPI/lookup2/bn254/plonk/valid_witness#02/solidity 0s

    assert_checkcircuit.go:135: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert_solidity.go:44
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:135
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	Received unexpected error:
        	            	template: t:25:35: executing "t" at <.Kzg.G2>: can't evaluate field G2 in type kzg.VerifyingKey
        	Test:       	TestIntegrationAPI/lookup2/bn254/plonk/valid_witness#02/solidity

TestIntegrationAPI/lookup2/bn254/plonk/valid_witness#03 10ms

TestIntegrationAPI/lookup2/bn254/plonk/valid_witness#03/solidity 0s

    assert_checkcircuit.go:135: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert_solidity.go:44
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:135
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	Received unexpected error:
        	            	template: t:25:35: executing "t" at <.Kzg.G2>: can't evaluate field G2 in type kzg.VerifyingKey
        	Test:       	TestIntegrationAPI/lookup2/bn254/plonk/valid_witness#03/solidity

TestIntegrationAPI/mul 1.1s

TestIntegrationAPI/mul/bn254 0s

TestIntegrationAPI/mul/bn254/plonk 10ms

TestIntegrationAPI/mul/bn254/plonk/valid_witness 10ms

TestIntegrationAPI/mul/bn254/plonk/valid_witness/solidity 0s

    assert_checkcircuit.go:135: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert_solidity.go:44
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:135
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	Received unexpected error:
        	            	template: t:25:35: executing "t" at <.Kzg.G2>: can't evaluate field G2 in type kzg.VerifyingKey
        	Test:       	TestIntegrationAPI/mul/bn254/plonk/valid_witness/solidity

TestIntegrationAPI/neg 1.07s

TestIntegrationAPI/neg/bn254 0s

TestIntegrationAPI/neg/bn254/plonk 10ms

TestIntegrationAPI/neg/bn254/plonk/valid_witness 0s

TestIntegrationAPI/neg/bn254/plonk/valid_witness/solidity 0s

    assert_checkcircuit.go:135: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert_solidity.go:44
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:135
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	Received unexpected error:
        	            	template: t:25:35: executing "t" at <.Kzg.G2>: can't evaluate field G2 in type kzg.VerifyingKey
        	Test:       	TestIntegrationAPI/neg/bn254/plonk/valid_witness/solidity

TestIntegrationAPI/noComputationCircuit 1.05s

TestIntegrationAPI/noComputationCircuit/bn254 0s

TestIntegrationAPI/noComputationCircuit/bn254/plonk 10ms

TestIntegrationAPI/noComputationCircuit/bn254/plonk/valid_witness 0s

TestIntegrationAPI/noComputationCircuit/bn254/plonk/valid_witness/solidity 0s

    assert_checkcircuit.go:135: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert_solidity.go:44
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:135
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	Received unexpected error:
        	            	template: t:25:35: executing "t" at <.Kzg.G2>: can't evaluate field G2 in type kzg.VerifyingKey
        	Test:       	TestIntegrationAPI/noComputationCircuit/bn254/plonk/valid_witness/solidity

TestIntegrationAPI/range 13.53s

TestIntegrationAPI/range/bn254 60ms

TestIntegrationAPI/range/bn254/plonk 660ms

TestIntegrationAPI/range/bn254/plonk/valid_witness 90ms

TestIntegrationAPI/range/bn254/plonk/valid_witness/solidity 0s

    assert_checkcircuit.go:135: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert_solidity.go:44
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:135
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	Received unexpected error:
        	            	template: t:25:35: executing "t" at <.Kzg.G2>: can't evaluate field G2 in type kzg.VerifyingKey
        	Test:       	TestIntegrationAPI/range/bn254/plonk/valid_witness/solidity

TestIntegrationAPI/range_constant 4.28s

TestIntegrationAPI/range_constant/bn254 10ms

TestIntegrationAPI/range_constant/bn254/plonk 180ms

TestIntegrationAPI/range_constant/bn254/plonk/valid_witness 30ms

TestIntegrationAPI/range_constant/bn254/plonk/valid_witness/solidity 0s

    assert_checkcircuit.go:135: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert_solidity.go:44
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:135
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	Received unexpected error:
        	            	template: t:25:35: executing "t" at <.Kzg.G2>: can't evaluate field G2 in type kzg.VerifyingKey
        	Test:       	TestIntegrationAPI/range_constant/bn254/plonk/valid_witness/solidity

TestIntegrationAPI/reference_small 1.06s

TestIntegrationAPI/reference_small/bn254 0s

TestIntegrationAPI/reference_small/bn254/plonk 10ms

TestIntegrationAPI/reference_small/bn254/plonk/valid_witness 10ms

TestIntegrationAPI/reference_small/bn254/plonk/valid_witness/solidity 0s

    assert_checkcircuit.go:135: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert_solidity.go:44
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:135
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	Received unexpected error:
        	            	template: t:25:35: executing "t" at <.Kzg.G2>: can't evaluate field G2 in type kzg.VerifyingKey
        	Test:       	TestIntegrationAPI/reference_small/bn254/plonk/valid_witness/solidity

TestIntegrationAPI/sub 1.06s

TestIntegrationAPI/sub/bn254 0s

TestIntegrationAPI/sub/bn254/plonk 10ms

TestIntegrationAPI/sub/bn254/plonk/valid_witness 10ms

TestIntegrationAPI/sub/bn254/plonk/valid_witness/solidity 0s

    assert_checkcircuit.go:135: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert_solidity.go:44
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:135
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	Received unexpected error:
        	            	template: t:25:35: executing "t" at <.Kzg.G2>: can't evaluate field G2 in type kzg.VerifyingKey
        	Test:       	TestIntegrationAPI/sub/bn254/plonk/valid_witness/solidity

TestIntegrationAPI/xorCstVar 2.1s

TestIntegrationAPI/xorCstVar/bn254 0s

TestIntegrationAPI/xorCstVar/bn254/plonk 20ms

TestIntegrationAPI/xorCstVar/bn254/plonk/valid_witness 10ms

TestIntegrationAPI/xorCstVar/bn254/plonk/valid_witness/solidity 0s

    assert_checkcircuit.go:135: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert_solidity.go:44
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:135
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	Received unexpected error:
        	            	template: t:25:35: executing "t" at <.Kzg.G2>: can't evaluate field G2 in type kzg.VerifyingKey
        	Test:       	TestIntegrationAPI/xorCstVar/bn254/plonk/valid_witness/solidity

TestIntegrationAPI/xorCstVar/bn254/plonk/valid_witness#01 10ms

TestIntegrationAPI/xorCstVar/bn254/plonk/valid_witness#01/solidity 0s

    assert_checkcircuit.go:135: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert_solidity.go:44
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:135
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	Received unexpected error:
        	            	template: t:25:35: executing "t" at <.Kzg.G2>: can't evaluate field G2 in type kzg.VerifyingKey
        	Test:       	TestIntegrationAPI/xorCstVar/bn254/plonk/valid_witness#01/solidity

@yelhousni
Copy link
Contributor Author

@ivokub this PR is good to go on my end. Your call if you want to merge as-is or contribute your refactoring here.

@ivokub
Copy link
Collaborator

ivokub commented Nov 17, 2023

@ivokub this PR is good to go on my end. Your call if you want to merge as-is or contribute your refactoring here.

Great work! I think I'll refactor and wait until the plonk verifier PR is done. I'm afraid there would be otherwise merge conflicts.

@yelhousni
Copy link
Contributor Author

@ivokub @ThomasPiellard I refactored this PR to follow the same pattern as in #930 for all curves. PR is ready for review.

@yelhousni yelhousni mentioned this pull request Dec 6, 2023
24 tasks
@yelhousni yelhousni merged commit b4f4738 into master Dec 13, 2023
6 checks passed
@ivokub ivokub deleted the perf/kzg branch December 15, 2023 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1: High Issue priority: high perf zk-evm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants