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

Allow running BLS12-381 curve test in the field-only mode #461

Closed
wants to merge 7 commits into from

Conversation

weikengchen
Copy link
Member

Description

At this moment, if one does the following, which is the case of ark-snark (!)

[dev-dependencies]
ark-test-curves = { version = "^0.3.0", default-features = false, features = [ "bls12_381_scalar_field" ] }

It would fail because the conditional compilation for bls12_381_scalar_field is not complete. It would report that several modules are missing.

This PR fixes so.


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (master)
  • Linked to GitHub issue with discussion and accepted design OR have an explanation in the PR that describes this work.
  • Re-reviewed Files changed in the GitHub PR explorer

N/A:

  • Wrote unit tests
  • Updated relevant documentation in the code
  • Added a relevant changelog entry to the Pending section in CHANGELOG.md

pub struct Parameters;

#[cfg(feature = "bls12_381_curve")]
impl Bls12Parameters for Parameters {
Copy link
Member Author

Choose a reason for hiding this comment

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

The main reason for this change is that Parameters requires group definitions.

test-curves/src/bls12_381/tests.rs Outdated Show resolved Hide resolved
@@ -22,12 +24,16 @@ pub mod g2_swu_iso;
pub use {fq::*, fq12::*, fq2::*, fq6::*, g1::*, g1_swu_iso::*, g2::*, g2_swu_iso::*};

#[cfg(test)]
#[cfg(feature = "bls12_381_curve")]
Copy link
Member Author

Choose a reason for hiding this comment

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

Since Fq is only loaded when bls12_381_curve, this effectively means that all the tests would require bls12_381_curve.

@weikengchen
Copy link
Member Author

Note: this should not be merged before #447

because #447 will have a conflict with the code here, and it is better at this moment not to block #447 or add new conflicts in any way.

@weikengchen weikengchen added the do-not-merge-now Do not merge due to conflicts with more important PRs label Aug 28, 2022
@Pratyush
Copy link
Member

I've included the fix for this in #463. If you could check and confirm that it works, that would be great.

@Pratyush Pratyush closed this Sep 2, 2022
@Pratyush Pratyush deleted the bls12-381-test-field-only branch October 26, 2022 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge-now Do not merge due to conflicts with more important PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants