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

chore: remove 3 unused functions warnings in the stdlib #5973

Merged
merged 3 commits into from
Sep 9, 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
5 changes: 0 additions & 5 deletions noir_stdlib/src/hash/poseidon/bn254/consts.nr
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
// Consistent with https://github.com/iden3/circomlib/blob/master/circuits/poseidon.circom and https://github.com/iden3/circomlib/blob/master/circuits/poseidon_constants.circom
use crate::hash::poseidon::PoseidonConfig;
use crate::hash::poseidon::config;
// Number of full rounds
// Number of partial rounds
fn rp() -> [u8; 16] {
[56, 57, 56, 60, 60, 63, 64, 63, 60, 66, 60, 65, 70, 60, 64, 68]
}
// S-box power
fn alpha() -> Field {
5
Expand Down
8 changes: 0 additions & 8 deletions noir_stdlib/src/hash/poseidon/mod.nr
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
mod bn254; // Instantiations of Poseidon for prime field of the same order as BN254
use crate::field::modulus_num_bits;
use crate::hash::Hasher;
use crate::default::Default;

Expand Down Expand Up @@ -166,13 +165,6 @@ fn sigma<let O: u32>(x: [Field; O]) -> [Field; O] {
y
}

// Check security of sponge instantiation
fn check_security(rate: Field, width: Field, security: Field) -> bool {
let n = modulus_num_bits();

((n - 1) as Field * (width - rate) / 2) as u8 > security as u8
}

struct PoseidonHasher{
_state: [Field],
}
Expand Down
1 change: 1 addition & 0 deletions noir_stdlib/src/meta/mod.nr
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ mod tests {
quote { 1 }
}

#[test]
fn returning_versus_macro_insertion() {
comptime
{
Expand Down
Loading