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

Cairo 1 contracts & Circuits Optimizations #129

Merged
merged 111 commits into from
Aug 6, 2024
Merged

Cairo 1 contracts & Circuits Optimizations #129

merged 111 commits into from
Aug 6, 2024

Conversation

feltroidprime
Copy link
Collaborator

@feltroidprime feltroidprime commented Jul 2, 2024

  • Refactor repo into hydra (python backend), src/fustat (cairo Zero code) and src/cairo (Cairo1 lib & Starknet contracts)
  • Extension field batching per miller loop bit (thanks @shramee for great idea: Makes miller loops almost 2x cheaper as well as reducing the witness size for randomized arithmetic, and on top of that, witness size is constant regardless of the number of pairs (perfect for calldata constraints on Starknet !))
  • Geometry final exp trick for both BN & BLS (thaks to @akinovak for original paper and huge help for bls adaptation - reduces final exp costs by 93% (BN) / 98% (BLS) when doing pairing checks)
  • Pure python ZK-ECIP hint for MSM (removes SageMath dependency)
  • Hydra to Cairo1 compiler (almost done but subject to changes)
  • General Hydra improvements
  • Cairo1 lib for multi pairing checks
  • Cairo1 lib for EC (muti) scalar multiplication
  • Groth16 & EC scalar mul contracts
  • Proof to calldata tooling

@feltroidprime feltroidprime marked this pull request as ready for review August 6, 2024 03:33
@feltroidprime feltroidprime merged commit e169823 into main Aug 6, 2024
3 checks passed
@feltroidprime feltroidprime deleted the contracts branch August 12, 2024 20:38
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.

3 participants