Skip to content

Commit

Permalink
rm 128 bit constant
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaucube committed Nov 10, 2023
1 parent fc116a7 commit 84899d9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/constants.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// used for challenge r, so when computing r^2 it does not overflow the field
pub const N_BITS_CHALLENGE: usize = 128;
// used for committed instances hash, so when going to the other curve of the cycle it does not
// overflow the scalar field
pub const N_BITS_HASH: usize = 250;
3 changes: 1 addition & 2 deletions src/folding/nova/circuits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,6 @@ pub mod tests {
use tracing_subscriber::layer::SubscriberExt;

use crate::ccs::r1cs::tests::{get_test_r1cs, get_test_z};
use crate::constants::N_BITS_CHALLENGE;
use crate::folding::nova::{nifs::NIFS, traits::NovaR1CS, Witness};
use crate::frontend::arkworks::{extract_r1cs, extract_z};
use crate::pedersen::Pedersen;
Expand Down Expand Up @@ -521,7 +520,7 @@ pub mod tests {
// transcript
let poseidon_config = poseidon_test_config::<Fr>();
let mut tr = PoseidonTranscript::<Projective>::new(&poseidon_config);
let r_bits = tr.get_challenge_nbits(N_BITS_CHALLENGE);
let r_bits = tr.get_challenge_nbits(128);
let r_Fr = Fr::from_bigint(BigInteger::from_bits_le(&r_bits)).unwrap();

let (_, ci3) =
Expand Down
2 changes: 1 addition & 1 deletion src/transcript/poseidon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ pub mod tests {

#[test]
fn test_transcript_and_transcriptvar_nbits() {
let nbits = crate::constants::N_BITS_CHALLENGE;
let nbits = 128;

// use 'native' transcript
let config = poseidon_test_config::<Fq>();
Expand Down

0 comments on commit 84899d9

Please sign in to comment.