Skip to content

Commit

Permalink
fix: use ec library instead of standard library (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench authored Nov 27, 2024
1 parent e6aba21 commit e4d2736
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/NIGHTLY_CANARY_DIED.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: "Tests fail on latest Nargo nightly release"
assignees: TomAFrench, kashbrti, jtriley-eth
---

The tests on this Noir project have started failing when using the latest nightly release of the Noir compiler. This likely means that there have been breaking changes for which this project needs to be updated to take into account.

Check the [{{env.WORKFLOW_NAME}}]({{env.WORKFLOW_URL}}) workflow for details.
Check the [{{env.WORKFLOW_NAME}}]({{env.WORKFLOW_URL}}) workflow for details.
1 change: 1 addition & 0 deletions Nargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ authors = [""]
compiler_version = ">=0.36.0"

[dependencies]
ec = { tag = "v0.1.2", git = "https://github.com/noir-lang/ec" }
8 changes: 4 additions & 4 deletions src/lib.nr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use std::default::Default;
use std::ec::consts::te::baby_jubjub;
use std::ec::tecurve::affine::Point as TEPoint;
use std::hash::Hasher;

use ec::{consts::te::baby_jubjub, tecurve::affine::Point as TEPoint};

pub fn eddsa_verify<H>(
pub_key_x: Field,
pub_key_y: Field,
Expand Down Expand Up @@ -56,11 +56,11 @@ pub fn eddsa_to_pub(secret: Field) -> (Field, Field) {
}

mod tests {
use std::ec::consts::te::baby_jubjub;
use std::ec::tecurve::affine::Point as TEPoint;
use std::hash::poseidon::PoseidonHasher;
use std::hash::poseidon2::Poseidon2Hasher;

use ec::{consts::te::baby_jubjub, tecurve::affine::Point as TEPoint};

use super::{eddsa_to_pub, eddsa_verify};

#[test]
Expand Down

0 comments on commit e4d2736

Please sign in to comment.