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

Scalar multiplication is broken in at least >0.5.1 #1830

Closed
signorecello opened this issue Jun 27, 2023 · 1 comment
Closed

Scalar multiplication is broken in at least >0.5.1 #1830

signorecello opened this issue Jun 27, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@signorecello
Copy link
Contributor

Aim

Trying to use std::scalar_mul::fixed_base in this snippet:

use dep::std;

fn main(priv_key: Field) {
    std::scalar_mul::fixed_base(priv_key);
}

#[test]
fn test_main() {
    main(0x1929ea3ab8d9106a899386883d9428f8256cfedb3c4f6b66bf4aa4d28a79988f)
}

Expected Behavior

Expected the operation to perform normally

Bug

Test fails with:

Running 1 test functions...
Testing test_main...
The application panicked (crashed).
Message:  not yet implemented
Location: crates/noirc_evaluator/src/ssa/optimizations.rs:162

A workaround (thanks @jfecher) is to run nargo test --experimental-ssa instead. Only works if using nightly version (>0.7.0)

To Reproduce

  1. Write a circuit with scalar multiplication
  2. Write a test
  3. Run nargo test

Installation Method

Binary

Nargo Version

nargo 0.7.1 (git version hash: fa9be1d, is dirty: false)

Additional Context

No response

Would you like to submit a PR for this Issue?

No

Support Needs

No response

@TomAFrench
Copy link
Member

A workaround (thanks @jfecher) is to run nargo test --experimental-ssa instead. Only works if using nightly version (>0.7.0)

Closing as this is now the default.

@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

3 participants