diff --git a/.github/workflows/deny.yml b/.github/workflows/deny.yml index 11dbc3eef4b..c1b1da95ea2 100644 --- a/.github/workflows/deny.yml +++ b/.github/workflows/deny.yml @@ -21,6 +21,6 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - - uses: EmbarkStudios/cargo-deny-action@v1 + - uses: EmbarkStudios/cargo-deny-action@8d73959fce1cdc8989f23fdf03bec6ae6a6576ef with: - command: check all \ No newline at end of file + command: check all diff --git a/Cargo.lock b/Cargo.lock index 48474cc79b1..995f43567fc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2828,12 +2828,12 @@ dependencies = [ [[package]] name = "light-poseidon" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" +checksum = "39e3d87542063daaccbfecd78b60f988079b6ec4e089249658b9455075c78d42" dependencies = [ - "ark-bn254 0.4.0", - "ark-ff 0.4.2", + "ark-bn254 0.5.0", + "ark-ff 0.5.0", "num-bigint", "thiserror", ] @@ -3030,9 +3030,7 @@ name = "nargo_cli" version = "1.0.0-beta.3" dependencies = [ "acvm", - "ark-bn254 0.4.0", "ark-bn254 0.5.0", - "ark-ff 0.4.2", "assert_cmd", "assert_fs", "async-lsp", diff --git a/tooling/nargo_cli/Cargo.toml b/tooling/nargo_cli/Cargo.toml index 5aa37cffcda..a80828356ff 100644 --- a/tooling/nargo_cli/Cargo.toml +++ b/tooling/nargo_cli/Cargo.toml @@ -99,12 +99,7 @@ sha3.workspace = true iai = "0.1.1" test-case.workspace = true lazy_static.workspace = true -light-poseidon = "0.2.0" - -ark-bn254-v04 = { package = "ark-bn254", version = "^0.4.0", default-features = false, features = [ - "curve", -] } -ark-ff-v04 = { package = "ark-ff", version = "^0.4.0", default-features = false } +light-poseidon = "0.3.0" [[bench]] name = "criterion" diff --git a/tooling/nargo_cli/tests/stdlib-props.rs b/tooling/nargo_cli/tests/stdlib-props.rs index 2e153b85ba8..7c52d6f25db 100644 --- a/tooling/nargo_cli/tests/stdlib-props.rs +++ b/tooling/nargo_cli/tests/stdlib-props.rs @@ -78,8 +78,8 @@ fn run_snippet_proptest( Err(e) => panic!("failed to compile program; brillig = {force_brillig}:\n{source}\n{e:?}"), }; - let pedandic_solving = true; - let blackbox_solver = bn254_blackbox_solver::Bn254BlackBoxSolver(pedandic_solving); + let pedantic_solving = true; + let blackbox_solver = bn254_blackbox_solver::Bn254BlackBoxSolver(pedantic_solving); let foreign_call_executor = RefCell::new(DefaultForeignCallBuilder::default().build()); // Generate multiple input/output @@ -290,17 +290,13 @@ fn fuzz_poseidon2_equivalence() { #[test] fn fuzz_poseidon_equivalence() { - use ark_ff_v04::{BigInteger, PrimeField}; use light_poseidon::{Poseidon, PoseidonHasher}; let poseidon_hash = |inputs: &[FieldElement]| { - let mut poseidon = Poseidon::::new_circom(inputs.len()).unwrap(); - let frs: Vec = inputs - .iter() - .map(|f| ark_bn254_v04::Fr::from_be_bytes_mod_order(&f.to_be_bytes())) - .collect::>(); - let hash = poseidon.hash(&frs).expect("failed to hash"); - FieldElement::from_be_bytes_reduce(&hash.into_bigint().to_bytes_be()) + let mut poseidon = Poseidon::::new_circom(inputs.len()).unwrap(); + let frs: Vec = inputs.iter().map(|f| f.into_repr()).collect::>(); + let hash: ark_bn254::Fr = poseidon.hash(&frs).expect("failed to hash"); + FieldElement::from_repr(hash) }; // Noir has hashes up to length 16, but the reference library won't work with more than 12.