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: a special case for mulacc #859

Merged
merged 5 commits into from Oct 12, 2023
Merged

perf: a special case for mulacc #859

merged 5 commits into from Oct 12, 2023

Conversation

Tabaie
Copy link
Contributor

@Tabaie Tabaie commented Oct 12, 2023

Description

Currently a MulAcc in Plonk always outputs two constraints. This PR saves one constraint for the special case of a(b+1) = a + ab.

Type of change

  • Performance improvement

How has this been tested?

  • TestMulAccFastTrack in frontend/cs/scs/api_test.go

How has this been benchmarked?

  • The same test ensures that no more than one constraint is created.

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

@Tabaie Tabaie requested a review from gbotrel October 12, 2023 17:46
@github-actions
Copy link

📦 github.com/consensys/gnark/internal/stats
TestCircuitStatistics 5.32s

TestCircuitStatistics/math/emulated/secp256k1_64/bls12_377/plonk 0s

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bls12_377/plonk
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

TestCircuitStatistics/math/emulated/secp256k1_64/bls12_377/plonkFRI 0s

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bls12_377/plonkFRI
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

TestCircuitStatistics/math/emulated/secp256k1_64/bls12_381/plonk 0s

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bls12_381/plonk
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

TestCircuitStatistics/math/emulated/secp256k1_64/bls12_381/plonkFRI 0s

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bls12_381/plonkFRI
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

TestCircuitStatistics/math/emulated/secp256k1_64/bls24_315/plonk 0s

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bls24_315/plonk
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

TestCircuitStatistics/math/emulated/secp256k1_64/bls24_315/plonkFRI 0s

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bls24_315/plonkFRI
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

TestCircuitStatistics/math/emulated/secp256k1_64/bls24_317/plonk 0s

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bls24_317/plonk
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

TestCircuitStatistics/math/emulated/secp256k1_64/bls24_317/plonkFRI 10ms

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bls24_317/plonkFRI
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

TestCircuitStatistics/math/emulated/secp256k1_64/bn254/plonk 0s

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bn254/plonk
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

TestCircuitStatistics/math/emulated/secp256k1_64/bn254/plonkFRI 10ms

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bn254/plonkFRI
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

TestCircuitStatistics/math/emulated/secp256k1_64/bw6_633/plonk 0s

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bw6_633/plonk
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

TestCircuitStatistics/math/emulated/secp256k1_64/bw6_633/plonkFRI 0s

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bw6_633/plonkFRI
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

TestCircuitStatistics/math/emulated/secp256k1_64/bw6_761/plonk 0s

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bw6_761/plonk
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

TestCircuitStatistics/math/emulated/secp256k1_64/bw6_761/plonkFRI 0s

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bw6_761/plonkFRI
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

📦 github.com/consensys/gnark/std/gkr
TestDoubleNoDependencyCircuit 10ms

    api_test.go:405: 
        	Error Trace:	/home/runner/work/gnark/gnark/std/gkr/api_test.go:405
        	            				/home/runner/work/gnark/gnark/std/gkr/api_test.go:77
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	polynomial.MultiLin.fold
        	            		polynomial.go:50
        	            	polynomial.MultiLin.Evaluate
        	            		polynomial.go:30
        	            	gkr.Verify
        	            		gkr.go:323
        	            	gkr.Solution.Verify
        	            		compile.go:196
        	            	gkr.(*doubleNoDependencyCircuit).Define
        	            		api_test.go:59
        	Test:       	TestDoubleNoDependencyCircuit

TestMiMCFullDepthNoDepSolve 30ms

    api_test.go:405: 
        	Error Trace:	/home/runner/work/gnark/gnark/std/gkr/api_test.go:405
        	            				/home/runner/work/gnark/gnark/std/gkr/api_test.go:642
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	polynomial.MultiLin.fold
        	            		polynomial.go:50
        	            	polynomial.MultiLin.Evaluate
        	            		polynomial.go:30
        	            	gkr.Verify
        	            		gkr.go:323
        	            	gkr.Solution.Verify
        	            		compile.go:196
        	            	gkr.(*mimcNoDepCircuit).Define
        	            		api_test.go:594
        	Test:       	TestMiMCFullDepthNoDepSolve

TestMulNoDependency 20ms

    api_test.go:405: 
        	Error Trace:	/home/runner/work/gnark/gnark/std/gkr/api_test.go:405
        	            				/home/runner/work/gnark/gnark/std/gkr/api_test.go:185
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	polynomial.MultiLin.fold
        	            		polynomial.go:50
        	            	polynomial.MultiLin.Evaluate
        	            		polynomial.go:30
        	            	gkr.Verify
        	            		gkr.go:323
        	            	gkr.Solution.Verify
        	            		compile.go:196
        	            	gkr.(*mulNoDependencyCircuit).Define
        	            		api_test.go:158
        	Test:       	TestMulNoDependency

TestSolveMulWithDependency 20ms

    api_test.go:405: 
        	Error Trace:	/home/runner/work/gnark/gnark/std/gkr/api_test.go:405
        	            				/home/runner/work/gnark/gnark/std/gkr/api_test.go:241
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	polynomial.MultiLin.fold
        	            		polynomial.go:50
        	            	polynomial.MultiLin.Evaluate
        	            		polynomial.go:30
        	            	gkr.Verify
        	            		gkr.go:323
        	            	gkr.Solution.Verify
        	            		compile.go:196
        	            	gkr.(*mulWithDependencyCircuit).Define
        	            		api_test.go:230
        	Test:       	TestSolveMulWithDependency

TestSqNoDependencyCircuit 10ms

    api_test.go:405: 
        	Error Trace:	/home/runner/work/gnark/gnark/std/gkr/api_test.go:405
        	            				/home/runner/work/gnark/gnark/std/gkr/api_test.go:122
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	polynomial.MultiLin.fold
        	            		polynomial.go:50
        	            	polynomial.MultiLin.Evaluate
        	            		polynomial.go:30
        	            	gkr.Verify
        	            		gkr.go:323
        	            	gkr.Solution.Verify
        	            		compile.go:196
        	            	gkr.(*sqNoDependencyCircuit).Define
        	            		api_test.go:105
        	Test:       	TestSqNoDependencyCircuit

📦 github.com/consensys/gnark/std/math/emulated
TestIsZero 170ms

TestIsZero/BN254Fp/limb=64 60ms

TestIsZero/BN254Fp/limb=64/bn254 30ms

TestIsZero/BN254Fp/limb=64/bn254/plonk 0s

    assert.go:200: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert.go:200
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:74
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:206
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).AssertIsEqual
        	            		field_assert.go:142
        	            	emulated.(*Field[...]).Reduce
        	            		field_ops.go:232
        	            	emulated.(*Field[...]).IsZero
        	            		field_assert.go:197
        	            	emulated.(*IsZeroCircuit[...]).Define
        	            		element_test.go:902
        	Test:       	TestIsZero/BN254Fp/limb=64/bn254/plonk

TestIsZero/BN254Fp/limb=64/bn254#01 30ms

TestIsZero/BN254Fp/limb=64/bn254#01/plonk 0s

    assert.go:200: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert.go:200
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:74
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:206
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).AssertIsEqual
        	            		field_assert.go:142
        	            	emulated.(*Field[...]).Reduce
        	            		field_ops.go:232
        	            	emulated.(*Field[...]).IsZero
        	            		field_assert.go:197
        	            	emulated.(*IsZeroCircuit[...]).Define
        	            		element_test.go:902
        	Test:       	TestIsZero/BN254Fp/limb=64/bn254#01/plonk

TestIsZero/Secp256k1Fp/limb=64 60ms

TestIsZero/Secp256k1Fp/limb=64/bn254 30ms

TestIsZero/Secp256k1Fp/limb=64/bn254/plonk 0s

    assert.go:200: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert.go:200
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:74
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:206
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).AssertIsEqual
        	            		field_assert.go:142
        	            	emulated.(*Field[...]).Reduce
        	            		field_ops.go:232
        	            	emulated.(*Field[...]).IsZero
        	            		field_assert.go:197
        	            	emulated.(*IsZeroCircuit[...]).Define
        	            		element_test.go:902
        	Test:       	TestIsZero/Secp256k1Fp/limb=64/bn254/plonk

TestIsZero/Secp256k1Fp/limb=64/bn254#01 30ms

TestIsZero/Secp256k1Fp/limb=64/bn254#01/plonk 0s

    assert.go:200: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert.go:200
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:74
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:206
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).AssertIsEqual
        	            		field_assert.go:142
        	            	emulated.(*Field[...]).Reduce
        	            		field_ops.go:232
        	            	emulated.(*Field[...]).IsZero
        	            		field_assert.go:197
        	            	emulated.(*IsZeroCircuit[...]).Define
        	            		element_test.go:902
        	Test:       	TestIsZero/Secp256k1Fp/limb=64/bn254#01/plonk

🚧 TestIssue348UnconstrainedLimbs 0s

    element_test.go:820: regression #348

TestOptimisation 20ms

    element_test.go:773: 
        	Error Trace:	/home/runner/work/gnark/gnark/std/math/emulated/element_test.go:773
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	emulated.(*ComputationCircuit[...]).Define
        	            		element_test.go:685
        	Test:       	TestOptimisation

TestSqrt 80ms

TestSqrt/BN254Fp/limb=64 30ms

TestSqrt/BN254Fp/limb=64/bn254 30ms

TestSqrt/BN254Fp/limb=64/bn254/plonk 0s

    assert.go:200: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert.go:200
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:74
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	emulated.(*Field[...]).Sqrt
        	            		field_ops.go:57
        	            	emulated.(*SqrtCircuit[...]).Define
        	            		element_test.go:933
        	Test:       	TestSqrt/BN254Fp/limb=64/bn254/plonk

TestSqrt/Goldilocks/limb=64 10ms

TestSqrt/Goldilocks/limb=64/bn254 10ms

TestSqrt/Goldilocks/limb=64/bn254/plonk 0s

    assert.go:200: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert.go:200
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:74
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).AssertIsEqual
        	            		field_assert.go:142
        	            	emulated.(*Field[...]).Sqrt
        	            		field_ops.go:58
        	            	emulated.(*SqrtCircuit[...]).Define
        	            		element_test.go:933
        	Test:       	TestSqrt/Goldilocks/limb=64/bn254/plonk

TestSqrt/Secp256k1Fp/limb=64 30ms

TestSqrt/Secp256k1Fp/limb=64/bn254 30ms

TestSqrt/Secp256k1Fp/limb=64/bn254/plonk 0s

    assert.go:200: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert.go:200
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:74
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	emulated.(*Field[...]).Sqrt
        	            		field_ops.go:57
        	            	emulated.(*SqrtCircuit[...]).Define
        	            		element_test.go:933
        	Test:       	TestSqrt/Secp256k1Fp/limb=64/bn254/plonk

@github-actions
Copy link

📦 github.com/consensys/gnark/internal/stats
TestCircuitStatistics 5.43s

TestCircuitStatistics/math/emulated/secp256k1_64/bls12_377/plonk 0s

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bls12_377/plonk
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

TestCircuitStatistics/math/emulated/secp256k1_64/bls12_377/plonkFRI 0s

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bls12_377/plonkFRI
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

TestCircuitStatistics/math/emulated/secp256k1_64/bls12_381/plonk 0s

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bls12_381/plonk
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

TestCircuitStatistics/math/emulated/secp256k1_64/bls12_381/plonkFRI 0s

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bls12_381/plonkFRI
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

TestCircuitStatistics/math/emulated/secp256k1_64/bls24_315/plonk 0s

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bls24_315/plonk
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

TestCircuitStatistics/math/emulated/secp256k1_64/bls24_315/plonkFRI 0s

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bls24_315/plonkFRI
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

TestCircuitStatistics/math/emulated/secp256k1_64/bls24_317/plonk 0s

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bls24_317/plonk
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

TestCircuitStatistics/math/emulated/secp256k1_64/bls24_317/plonkFRI 0s

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bls24_317/plonkFRI
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

TestCircuitStatistics/math/emulated/secp256k1_64/bn254/plonk 0s

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bn254/plonk
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

TestCircuitStatistics/math/emulated/secp256k1_64/bn254/plonkFRI 0s

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bn254/plonkFRI
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

TestCircuitStatistics/math/emulated/secp256k1_64/bw6_633/plonk 0s

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bw6_633/plonk
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

TestCircuitStatistics/math/emulated/secp256k1_64/bw6_633/plonkFRI 0s

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bw6_633/plonkFRI
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

TestCircuitStatistics/math/emulated/secp256k1_64/bw6_761/plonk 10ms

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bw6_761/plonk
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

TestCircuitStatistics/math/emulated/secp256k1_64/bw6_761/plonkFRI 0s

    stats_test.go:41: 
        	Error Trace:	/home/runner/work/gnark/gnark/internal/stats/stats_test.go:41
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	stats.initSnippets.func12
        	            		snippet.go:93
        	            	stats.(*snippetCircuit).Define
        	            		snippet.go:152
        	Test:       	TestCircuitStatistics/math/emulated/secp256k1_64/bw6_761/plonkFRI
        	Messages:   	building stats for circuit math/emulated/secp256k1_64

📦 github.com/consensys/gnark/std/gkr
TestDoubleNoDependencyCircuit 10ms

    api_test.go:405: 
        	Error Trace:	/home/runner/work/gnark/gnark/std/gkr/api_test.go:405
        	            				/home/runner/work/gnark/gnark/std/gkr/api_test.go:77
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	polynomial.MultiLin.fold
        	            		polynomial.go:50
        	            	polynomial.MultiLin.Evaluate
        	            		polynomial.go:30
        	            	gkr.Verify
        	            		gkr.go:323
        	            	gkr.Solution.Verify
        	            		compile.go:196
        	            	gkr.(*doubleNoDependencyCircuit).Define
        	            		api_test.go:59
        	Test:       	TestDoubleNoDependencyCircuit

TestMiMCFullDepthNoDepSolve 20ms

    api_test.go:405: 
        	Error Trace:	/home/runner/work/gnark/gnark/std/gkr/api_test.go:405
        	            				/home/runner/work/gnark/gnark/std/gkr/api_test.go:642
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	polynomial.MultiLin.fold
        	            		polynomial.go:50
        	            	polynomial.MultiLin.Evaluate
        	            		polynomial.go:30
        	            	gkr.Verify
        	            		gkr.go:323
        	            	gkr.Solution.Verify
        	            		compile.go:196
        	            	gkr.(*mimcNoDepCircuit).Define
        	            		api_test.go:594
        	Test:       	TestMiMCFullDepthNoDepSolve

TestMulNoDependency 10ms

    api_test.go:405: 
        	Error Trace:	/home/runner/work/gnark/gnark/std/gkr/api_test.go:405
        	            				/home/runner/work/gnark/gnark/std/gkr/api_test.go:185
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	polynomial.MultiLin.fold
        	            		polynomial.go:50
        	            	polynomial.MultiLin.Evaluate
        	            		polynomial.go:30
        	            	gkr.Verify
        	            		gkr.go:323
        	            	gkr.Solution.Verify
        	            		compile.go:196
        	            	gkr.(*mulNoDependencyCircuit).Define
        	            		api_test.go:158
        	Test:       	TestMulNoDependency

TestSolveMulWithDependency 10ms

    api_test.go:405: 
        	Error Trace:	/home/runner/work/gnark/gnark/std/gkr/api_test.go:405
        	            				/home/runner/work/gnark/gnark/std/gkr/api_test.go:241
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	polynomial.MultiLin.fold
        	            		polynomial.go:50
        	            	polynomial.MultiLin.Evaluate
        	            		polynomial.go:30
        	            	gkr.Verify
        	            		gkr.go:323
        	            	gkr.Solution.Verify
        	            		compile.go:196
        	            	gkr.(*mulWithDependencyCircuit).Define
        	            		api_test.go:230
        	Test:       	TestSolveMulWithDependency

TestSqNoDependencyCircuit 10ms

    api_test.go:405: 
        	Error Trace:	/home/runner/work/gnark/gnark/std/gkr/api_test.go:405
        	            				/home/runner/work/gnark/gnark/std/gkr/api_test.go:122
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	polynomial.MultiLin.fold
        	            		polynomial.go:50
        	            	polynomial.MultiLin.Evaluate
        	            		polynomial.go:30
        	            	gkr.Verify
        	            		gkr.go:323
        	            	gkr.Solution.Verify
        	            		compile.go:196
        	            	gkr.(*sqNoDependencyCircuit).Define
        	            		api_test.go:105
        	Test:       	TestSqNoDependencyCircuit

📦 github.com/consensys/gnark/std/math/emulated
TestIsZero 240ms

TestIsZero/BN254Fp/limb=64 90ms

TestIsZero/BN254Fp/limb=64/bn254 50ms

TestIsZero/BN254Fp/limb=64/bn254/plonk 0s

    assert.go:200: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert.go:200
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:74
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:208
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).AssertIsEqual
        	            		field_assert.go:142
        	            	emulated.(*Field[...]).Reduce
        	            		field_ops.go:232
        	            	emulated.(*Field[...]).IsZero
        	            		field_assert.go:197
        	            	emulated.(*IsZeroCircuit[...]).Define
        	            		element_test.go:902
        	Test:       	TestIsZero/BN254Fp/limb=64/bn254/plonk

TestIsZero/BN254Fp/limb=64/bn254#01 40ms

TestIsZero/BN254Fp/limb=64/bn254#01/plonk 0s

    assert.go:200: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert.go:200
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:74
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:208
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).AssertIsEqual
        	            		field_assert.go:142
        	            	emulated.(*Field[...]).Reduce
        	            		field_ops.go:232
        	            	emulated.(*Field[...]).IsZero
        	            		field_assert.go:197
        	            	emulated.(*IsZeroCircuit[...]).Define
        	            		element_test.go:902
        	Test:       	TestIsZero/BN254Fp/limb=64/bn254#01/plonk

TestIsZero/Secp256k1Fp/limb=64 90ms

TestIsZero/Secp256k1Fp/limb=64/bn254 50ms

TestIsZero/Secp256k1Fp/limb=64/bn254/plonk 10ms

    assert.go:200: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert.go:200
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:74
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:208
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).AssertIsEqual
        	            		field_assert.go:142
        	            	emulated.(*Field[...]).Reduce
        	            		field_ops.go:232
        	            	emulated.(*Field[...]).IsZero
        	            		field_assert.go:197
        	            	emulated.(*IsZeroCircuit[...]).Define
        	            		element_test.go:902
        	Test:       	TestIsZero/Secp256k1Fp/limb=64/bn254/plonk

TestIsZero/Secp256k1Fp/limb=64/bn254#01 40ms

TestIsZero/Secp256k1Fp/limb=64/bn254#01/plonk 0s

    assert.go:200: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert.go:200
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:74
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:208
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).AssertIsEqual
        	            		field_assert.go:142
        	            	emulated.(*Field[...]).Reduce
        	            		field_ops.go:232
        	            	emulated.(*Field[...]).IsZero
        	            		field_assert.go:197
        	            	emulated.(*IsZeroCircuit[...]).Define
        	            		element_test.go:902
        	Test:       	TestIsZero/Secp256k1Fp/limb=64/bn254#01/plonk

🚧 TestIssue348UnconstrainedLimbs 0s

    element_test.go:820: regression #348

TestOptimisation 40ms

    element_test.go:773: 
        	Error Trace:	/home/runner/work/gnark/gnark/std/math/emulated/element_test.go:773
        	Error:      	Received unexpected error:
        	            	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	emulated.(*ComputationCircuit[...]).Define
        	            		element_test.go:685
        	Test:       	TestOptimisation

TestSqrt 90ms

TestSqrt/BN254Fp/limb=64 30ms

TestSqrt/BN254Fp/limb=64/bn254 30ms

TestSqrt/BN254Fp/limb=64/bn254/plonk 0s

    assert.go:200: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert.go:200
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:74
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	emulated.(*Field[...]).Sqrt
        	            		field_ops.go:57
        	            	emulated.(*SqrtCircuit[...]).Define
        	            		element_test.go:933
        	Test:       	TestSqrt/BN254Fp/limb=64/bn254/plonk

TestSqrt/Goldilocks/limb=64 10ms

TestSqrt/Goldilocks/limb=64/bn254 10ms

TestSqrt/Goldilocks/limb=64/bn254/plonk 0s

    assert.go:200: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert.go:200
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:74
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).AssertIsEqual
        	            		field_assert.go:142
        	            	emulated.(*Field[...]).Sqrt
        	            		field_ops.go:58
        	            	emulated.(*SqrtCircuit[...]).Define
        	            		element_test.go:933
        	Test:       	TestSqrt/Goldilocks/limb=64/bn254/plonk

TestSqrt/Secp256k1Fp/limb=64 60ms

TestSqrt/Secp256k1Fp/limb=64/bn254 60ms

TestSqrt/Secp256k1Fp/limb=64/bn254/plonk 0s

    assert.go:200: 
        	Error Trace:	/home/runner/work/gnark/gnark/test/assert.go:200
        	            				/home/runner/work/gnark/gnark/test/assert_checkcircuit.go:74
        	            				/home/runner/work/gnark/gnark/test/assert.go:66
        	Error:      	parse circuit: interface conversion: frontend.Variable is *big.Int, not expr.Term
        	            	frontend.parseCircuit.func2
        	            		compile.go:118
        	            	runtime.panicdottypeE
        	            		iface.go:263
        	            	emulated.(*Field[...]).mul
        	            		field_ops.go:203
        	            	emulated.(*Field[...]).reduceAndOp
        	            		field_ops.go:373
        	            	emulated.(*Field[...]).Mul
        	            		field_ops.go:114
        	            	emulated.(*Field[...]).Sqrt
        	            		field_ops.go:57
        	            	emulated.(*SqrtCircuit[...]).Define
        	            		element_test.go:933
        	Test:       	TestSqrt/Secp256k1Fp/limb=64/bn254/plonk

Copy link
Collaborator

@gbotrel gbotrel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👍

@gbotrel gbotrel merged commit 4cb9063 into master Oct 12, 2023
5 checks passed
@gbotrel gbotrel deleted the perf/scs-mulacc branch October 12, 2023 20:29
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.

None yet

2 participants