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

Fix unresolved import in generator.rs, update all dependencies to 0.5.0, and clean up formatting #69

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wamimi
Copy link

@wamimi wamimi commented Jan 9, 2025

Description

This PR addresses an unresolved import issue in generator.rs, updates all dependencies and dev dependencies in Cargo.toml to version 0.5.0, and removes accidental blank lines for better code readability. These changes improve build stability, ensure dependency compatibility, and maintain consistent formatting.

Problem and Solution

While setting up the ark-groth16 crate, I encountered a build error related to an unresolved import in generator.rs. The error message indicated that scalar_mul::BatchMulPreprocessing was not found. Upon investigation, I discovered that the Cargo.toml file specified outdated versions of multiple dependencies (0.4.0), while the codebase was using features from version 0.5.0. This mismatch caused the build to fail.

To resolve this issue:

  1. Refactored generator.rs:

    • Removed the unused import scalar_mul::BatchMulPreprocessing.
    • Cleaned up accidental blank lines introduced during earlier edits to improve readability and maintain consistent formatting.
    • Reorganized the imports for better structure.
  2. Updated Cargo.toml:

    • Updated all dependencies and dev dependencies from version 0.4.0 to 0.5.0 to ensure compatibility with the latest arkworks libraries. This includes:
      • ark-ff, ark-ec, ark-serialize, ark-poly, ark-std, ark-relations, ark-crypto-primitives, and ark-r1cs-std.
      • Dev dependencies such as ark-bls12-381, ark-bls12-377, ark-bn254, ark-bw6-761, ark-mnt4-298, ark-mnt6-298, ark-mnt4-753, and ark-mnt6-753.

Validation

  • Build Test: Successfully ran cargo build --release after the changes, with no errors encountered.
  • Unit Tests: Ran cargo test, and all tests passed successfully, confirming no functionality was broken.

closes: #XXXX


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 explained directly in the PR.
    • Note: No issue was created as this is a minor fix. The problem and solution are explained directly in the PR description.
  • Wrote unit tests.
    • Note: No new functionality was introduced, so no new unit tests were necessary.
  • [✓] Updated relevant documentation in the code.
    • Note: Code comments have been updated where necessary.
  • Added a relevant changelog entry to the Pending section in CHANGELOG.md.
    • Note: This change does not affect the changelog as it is a minor fix.
  • [✓] Re-reviewed Files changed in the GitHub PR explorer.
    • Note: All changes have been reviewed and verified.

wamimi added 2 commits January 8, 2025 22:58
- Cleaned up unnecessary blank lines introduced during earlier edits.
@wamimi wamimi requested a review from a team as a code owner January 9, 2025 10:23
@wamimi wamimi requested review from mmagician, weikengchen and tyshko-rostyslav and removed request for a team January 9, 2025 10:23
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.

1 participant