Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat: batched KZG #908

Merged
merged 22 commits into from Nov 10, 2023
Merged

feat: batched KZG #908

merged 22 commits into from Nov 10, 2023

Conversation

ivokub
Copy link
Collaborator

@ivokub ivokub commented Nov 8, 2023

This PR is #906, but rebased on top of #900 and #901.

Copy link

github-actions bot commented Nov 8, 2023

📦 github.com/consensys/gnark/std/commitments/kzg
TestKZGVerificationTwoChain 10ms

    verifier_test.go:222: 
        	Error Trace:	/home/runner/work/gnark/gnark/std/commitments/kzg/verifier_test.go:222
        	Error:      	Received unexpected error:
        	            	unknown type parametrization
        	Test:       	TestKZGVerificationTwoChain

TestKZGVerificationTwoChain2 10ms

    verifier_test.go:266: 
        	Error Trace:	/home/runner/work/gnark/gnark/std/commitments/kzg/verifier_test.go:266
        	Error:      	Received unexpected error:
        	            	unknown type parametrization
        	Test:       	TestKZGVerificationTwoChain2

@ivokub
Copy link
Collaborator Author

ivokub commented Nov 8, 2023

@ThomasPiellard set you as a reviewer for this PR. It is checked on my side and looks good to me. It doesn't differ significantly from #906, but I simplified a bit (for example the shorthash initialisation etc.). I still have some ideas on how to make the implementation a bit cleaner, but I would do it in other PRs to avoid creating merge conflicts with @yelhousni work.

However, it is rebased on top of #901, so we should merge that before this one.

@ivokub ivokub merged commit bd2b375 into master Nov 10, 2023
4 of 5 checks passed
@ivokub ivokub deleted the feat/kzg-batch branch November 10, 2023 17:35
@ivokub ivokub mentioned this pull request Nov 10, 2023
12 tasks
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 293 [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(0xc0000d7040, {0xeb1d2c?, 0x51fadc?}, 0xf168c0)
	/opt/hostedtoolcache/go/1.21.3/x64/src/testing/testing.go:1649 +0x3c8
testing.runTests.func1(0x155bd00?)
	/opt/hostedtoolcache/go/1.21.3/x64/src/testing/testing.go:2054 +0x3e
testing.tRunner(0xc0000d7040, 0xc0001b5c48)
	/opt/hostedtoolcache/go/1.21.3/x64/src/testing/testing.go:1595 +0xff
testing.runTests(0xc0001a5180?, {0x15528c0, 0x1d, 0x1d}, {0x4182bf?, 0xc0001b5d08?, 0x155a3e0?})
	/opt/hostedtoolcache/go/1.21.3/x64/src/testing/testing.go:2052 +0x445
testing.(*M).Run(0xc0001a5180)
	/opt/hostedtoolcache/go/1.21.3/x64/src/testing/testing.go:1925 +0x636
main.main()
	_testmain.go:109 +0x19c

goroutine 287 [chan receive, 29 minutes]:
testing.(*T).Run(0xc000102d00, {0xc0000321e0?, 0xc0003376d0?}, 0xc0002625d0)
	/opt/hostedtoolcache/go/1.21.3/x64/src/testing/testing.go:1649 +0x3c8
github.com/consensys/gnark/test.(*Assert).Run(0xc000337718, 0xc0002625c0, {0xc000337728?, 0x39?, 0x5ad?})
	/home/runner/work/gnark/gnark/test/assert.go:64 +0x99
github.com/consensys/gnark/std/math/emulated.testInverse[...](0xc000102d00)
	/home/runner/work/gnark/gnark/std/math/emulated/element_test.go:403 +0x107
github.com/consensys/gnark/std/math/emulated.TestInverse(0x1ba?)
	/home/runner/work/gnark/gnark/std/math/emulated/element_test.go:392 +0x25
testing.tRunner(0xc000102d00, 0xf168c0)
	/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 288 [chan receive, 29 minutes]:
testing.(*T).Run(0xc000102ea0, {0xc0003b6c28?, 0xc000086cc8?}, 0xc000262670)
	/opt/hostedtoolcache/go/1.21.3/x64/src/testing/testing.go:1649 +0x3c8
github.com/consensys/gnark/test.(*Assert).Run(0xc000262630, 0xc0002b2480, {0xc000086e08?, 0x151132c?, 0x2?})
	/home/runner/work/gnark/gnark/test/assert.go:64 +0x99
github.com/consensys/gnark/test.(*Assert).CheckCircuit(0xc00058ed80?, {0x1005c00?, 0xc0000a2320}, {0xc000086e88, 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(0xc000102ea0)
	/home/runner/work/gnark/gnark/test/assert.go:66 +0xa7
testing.tRunner(0xc000102ea0, 0xc0002625d0)
	/opt/hostedtoolcache/go/1.21.3/x64/src/testing/testing.go:1595 +0xff
created by testing.(*T).Run in goroutine 287
	/opt/hostedtoolcache/go/1.21.3/x64/src/testing/testing.go:1648 +0x3ad

goroutine 289 [runnable]:
internal/reflectlite.rtype.Elem({0xdb0be0?})
	/opt/hostedtoolcache/go/1.21.3/x64/src/internal/reflectlite/type.go:323 +0x3c
errors.As({0x1005740, 0xc0004796b0}, {0xdb0be0?, 0xc0002b26c0})
	/opt/hostedtoolcache/go/1.21.3/x64/src/errors/wrap.go:105 +0x1a5
github.com/consensys/gnark/std/math/emulated.(*Field[...]).reduceAndOp(0x101b640?, 0xc0000d3b58, 0xc0000d3b40, 0xc0000a2550, 0x0)
	/home/runner/work/gnark/gnark/std/math/emulated/field_ops.go:402 +0xe6
github.com/consensys/gnark/std/math/emulated.(*Field[...]).Inverse(0x10140d8?, 0xc0000c0210?)
	/home/runner/work/gnark/gnark/std/math/emulated/field_ops.go:44 +0x7b
github.com/consensys/gnark/std/math/emulated.(*InverseCircuit[...]).Define(0x1007c00, {0x10140d8, 0xc0000c0210?})
	/home/runner/work/gnark/gnark/std/math/emulated/element_test.go:386 +0x65
github.com/consensys/gnark/test.IsSolved({0x1005c00, 0xc0000a2320}, {0x1005c00, 0xc0000a2370}, 0xc00058f0a0, {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(0xc000103040)
	/home/runner/work/gnark/gnark/test/assert.go:66 +0xa7
testing.tRunner(0xc000103040, 0xc000262670)
	/opt/hostedtoolcache/go/1.21.3/x64/src/testing/testing.go:1595 +0xff
created by testing.(*T).Run in goroutine 288
	/opt/hostedtoolcache/go/1.21.3/x64/src/testing/testing.go:1648 +0x3ad

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