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

chore: pairing_check_hint for #[cfg(not(target_os = "zkvm"))] #1168

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ytham
Copy link
Contributor

@ytham ytham commented Jan 3, 2025

  • Adds pairing_check_hint for #[cfg(not(target_os = "zkvm"))] for BN254 and BLS12-381

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link

github-actions bot commented Jan 4, 2025

group app.proof_time_ms app.cycles app.cells_used leaf.proof_time_ms leaf.cycles leaf.cells_used
verify_fibair (-14 [-0.9%]) 1,594 194,676 8,011,082 - - -
fibonacci_program (-30 [-0.4%]) 7,384 1,500,137 51,505,102 - - -
regex_program (-96 [-0.4%]) 22,276 4,190,904 165,028,173 - - -
ecrecover_program (+49 [+1.7%]) 2,971 290,016 15,230,037 - - -

Commit: 073315d

Benchmark Workflow

@ytham ytham requested a review from jonathanpwang January 4, 2025 05:03
@ytham ytham marked this pull request as ready for review January 4, 2025 05:03
@ytham ytham changed the title draft: pairing_check_hint for #[cfg(not(target_os = "zkvm"))] chore: pairing_check_hint for #[cfg(not(target_os = "zkvm"))] Jan 4, 2025
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.

please just use the associated functions for the halo2curves types, with some conversion. it is ok on host to enable the halo2curves import always

@@ -275,7 +281,68 @@ impl PairingCheck for Bls12_381 {
) -> (Self::Fp12, Self::Fp12) {
#[cfg(not(target_os = "zkvm"))]
{
todo!()
let f = Self::multi_miller_loop(P, Q);
Copy link
Contributor

Choose a reason for hiding this comment

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

I would prefer for code maintenance if you just converted to halo2 curves type and called the associated method there. this duplicate code is not good for upkeep

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