Conversation
|
📦 ❌ ❌ |
|
Should work with #870. |
|
And for historical note, with #749 PLONK cost is 20760085. |
|
Suggested edit: diff --git a/std/commitments/kzg/verifier_test.go b/std/commitments/kzg/verifier_test.go
index 2fed4f36..29d2694a 100644
--- a/std/commitments/kzg/verifier_test.go
+++ b/std/commitments/kzg/verifier_test.go
@@ -175,7 +175,7 @@ func TestKZGVerificationEmulated3(t *testing.T) {
Commitment: wCmt,
OpeningProof: wProof,
}
- assert.CheckCircuit(&KZGVerificationCircuit[sw_bw6761.Scalar, sw_bw6761.G1Affine, sw_bw6761.G2Affine, sw_bw6761.GTEl]{}, test.WithValidAssignment(&assignment), test.WithCurves(ecc.BN254))
+ assert.CheckCircuit(&KZGVerificationCircuit[sw_bw6761.Scalar, sw_bw6761.G1Affine, sw_bw6761.G2Affine, sw_bw6761.GTEl]{}, test.WithValidAssignment(&assignment))
}
func TestKZGVerificationTwoChain(t *testing.T) {
|
Should we wait for #870 to merge with the suggested edit (otherwise CI will fail) or could we merge as-is and in #870 merge master and there apply the edit? |
Yes, we can merge current as-is and then in #870 make the change. #870 is a more generic fix and not particularly blocking this one. I'm trying to keep in mind to rebase 870 and add the change there :) |
Description
Adds BW6-761 KZG according to #840 (need #846 first to me merged).
Type of change
How has this been tested?
The tests in
std/algebra/emulated/sw_emulatedandstd/commitments/kzgare generic for all curves. But weirdly the BW6 KZG test fails when testing with any other curve than BN254 as the SNARK curve! It throws an error in the division needed to compute the slope ofdoubleStepat exactly the iterationi=15. I need to deeply look at this. So for now testing withtest.WithCurves(ecc.BN254)only.Edit: the issue was identified by @ivokub to be related to field emulation (edge case in division when limbs are big e.g. bw6-761 field). Will be fixed in a separate PR (issue #867).
How has this been benchmarked?
KZG over BW6-761 in a BN254 SNARK:
Checklist:
golangci-lintdoes not output errors locally