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

Use zkevm-sha256 gates for Sha256Wide chip #33

Merged
merged 26 commits into from
Nov 29, 2023
Merged

Conversation

nulltea
Copy link
Member

@nulltea nulltea commented Nov 27, 2023

Advantages:

  • more secure, written not by us (source in pse/zkevm-circuis and axiom/halo2lib).
  • no RLC, thus no need to generate secure randomness
  • significantly less columns, almost the same height
  • much more efficient (see benchmarks below)

Benchmarks

Config Circuit degree Prover time MSMs in 1 stage Contract size Gas cost
Old 20 (1 stage), 25 (2 stage) 220s + 610s = 830s 255 ? ?
New1 20, 25 155s + 475s = 630s 157 23552 349791
New2 20, 24 155s + 310s = 465s 157 26267 fail to deploy
New3 19, 25 80s + 460s = 540s 168 23552 349779
New4 18, 25 45s + 460s = 505s 189 23550 349839
  • first stage 2,972,788 advice cells vs 3,729,373 (old)
  • peak memory usage (new4) - 106GB

@nulltea nulltea changed the base branch from main to chore/bump-halo2lib-v0.4 November 27, 2023 16:57
@nulltea nulltea requested a review from ec2 November 27, 2023 17:33
@nulltea nulltea marked this pull request as ready for review November 27, 2023 17:33
@ec2
Copy link
Member

ec2 commented Nov 29, 2023

Good stuff. Love having less code

Base automatically changed from chore/bump-halo2lib-v0.4 to main November 29, 2023 11:02
@nulltea nulltea changed the base branch from main to chore/bump-halo2lib-v0.4 November 29, 2023 11:20
@nulltea nulltea changed the base branch from chore/bump-halo2lib-v0.4 to main November 29, 2023 11:20
@nulltea nulltea changed the base branch from main to chore/bump-halo2lib-v0.4 November 29, 2023 11:20
@nulltea nulltea changed the base branch from chore/bump-halo2lib-v0.4 to main November 29, 2023 11:37
@nulltea nulltea merged commit 222f0b5 into main Nov 29, 2023
@nulltea nulltea deleted the timoftime/zkevm-sha256 branch November 29, 2023 11:37
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