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] BN254 AssertFinalExponentiationIsOne #515

Merged
merged 20 commits into from
Oct 12, 2024

Conversation

ytham
Copy link
Contributor

@ytham ytham commented Oct 9, 2024

  • assert_final_exponentiation_is_one
  • final_exp_hint

@ytham ytham force-pushed the feat/assert-final-exponentiation-one branch from 7065ed7 to 8c71566 Compare October 11, 2024 21:45
@ytham ytham changed the title [WIP] AssertFinalExponentiationIsOne [feat] AssertFinalExponentiationIsOne Oct 11, 2024
@@ -20,6 +20,6 @@ p3-uni-stark = { workspace = true }
axvm-platform = { workspace = true }
stark-vm = { workspace = true }

color-eyre = "0.6.3"
color-eyre = { git = "https://github.com/eyre-rs/eyre.git" }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this not using the workspace version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately, it seems that I need to use a recent version of color-eyre in ricsv/transpiler due to workflow builds failing due to eyre-rs/eyre#175 (merged, but there hasn't been any new crate release since 2022); my builds are failing with this error: https://github.com/axiom-crypto/afs-prototype/actions/runs/11300218384/job/31432675915 which is fixed w/ that PR. it might be safer to lock it to the latest commit, which I can add

@jonathanpwang jonathanpwang changed the title [feat] AssertFinalExponentiationIsOne [feat] BN254 AssertFinalExponentiationIsOne Oct 12, 2024
Copy link
Contributor

@jonathanpwang jonathanpwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

For constants fixed for all of BN254, best to make [lazy_]static variables for them.

Also let's add some links in the code comments to gnark to give them due credit.

Clarification: this does AssertFinalExponentiationIsOne for Bn254, but we still need to do BLS12-381 (which should be much more straightforward now -- just be careful about pre_loop).

@ytham ytham merged commit 5c3067c into main Oct 12, 2024
2 checks passed
@ytham ytham deleted the feat/assert-final-exponentiation-one branch October 12, 2024 16:52
luffykai pushed a commit that referenced this pull request Dec 13, 2024
* Add final exponentiation traits

* WIP; test failing

* Updated bn254 final exp

* Add WIP native exponentiation as a test

* debug: add debug assert to only call final exp hint when finalexp=1

* Try e(aP,bQ)e(cP,dQ) where a=5,b=10,c=-2,d=25

* Fix point negation; still failing

* Rename vars

* verify miller points match

* It's working

* Fix lints

* Update cargo

* Remove eyre conflict for workflow

* Revert "Remove eyre conflict for workflow"

This reverts commit 61dfdf4.

* Use master color-eyre

* Update ecc/execution/src/common/miller_loop.rs

* Address PR comments

---------

Co-authored-by: Jonathan Wang <[email protected]>
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