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: use ec library instead of standard library #4

Merged
merged 2 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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