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/kzg dummy srs #458

Merged
merged 4 commits into from
Oct 13, 2023
Merged

Feat/kzg dummy srs #458

merged 4 commits into from
Oct 13, 2023

Conversation

ThomasPiellard
Copy link
Contributor

@ThomasPiellard ThomasPiellard commented Oct 12, 2023

Description

When creating a KZG SRS, setting alpha=-1 in NewSRS now generates quickly a balanced, valid SRS. The SRS is in fact <αⁱ[G₁]> where α is of order 4. We cannot use <[G₁]> as the benchmarks are tampered when committing a polynomial (the multi scalar multiplication is twice faster if we do that).

See this issue in gnark.

Type of change

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

How has this been tested?

TestVerifySinglePointQuickSRS

How has this been benchmarked?

BenchmarkSRSGen

BenchmarkSRSGen/real_SRS-12         	       2	 549265787 ns/op
BenchmarkSRSGen/quick_SRS-12        	    1540	    787304 ns/op

BenchmarkKZGCommit -> we see that the balanced SRS behaves like a normal one

BenchmarkKZGCommit/real_SRS-12         	              50	  24403057 ns/op
BenchmarkKZGCommit/quick_SRS-12        	      50	  23168466 ns/op

@github-actions
Copy link

Summary

✅ Passed: 5923
❌ Failed: 0
🚧 Skipped: 5

🚧 Skipped

  • TestReference (github.com/consensys/gnark-crypto/ecc/bn254/fr/sis)
  • TestLimbDecomposition (github.com/consensys/gnark-crypto/ecc/bn254/fr/sis)
  • TestAppend (github.com/consensys/gnark-crypto/ecc/bn254/fr/tensor-commitment)
  • TestAppendSis (github.com/consensys/gnark-crypto/ecc/bn254/fr/tensor-commitment)
  • TestCommitmentSis (github.com/consensys/gnark-crypto/ecc/bn254/fr/tensor-commitment)

@gbotrel gbotrel self-requested a review October 12, 2023 20:55
@ThomasPiellard ThomasPiellard merged commit 1f65e75 into master Oct 13, 2023
7 checks passed
@ThomasPiellard ThomasPiellard deleted the feat/kzg_dummy_srs branch October 13, 2023 16:04
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.

2 participants