Skip to content

Commit

Permalink
adds tests passing locally in sequential mode
Browse files Browse the repository at this point in the history
  • Loading branch information
willemolding committed Nov 3, 2023
1 parent d35f781 commit 51498cb
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions lightclient-circuits/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ lazy_static = "1.4"

[dev-dependencies]
rstest = "0.18.2"
serial_test = "2.0.0"
test-utils = { workspace = true }

[features]
Expand Down
4 changes: 3 additions & 1 deletion lightclient-circuits/src/gadget/crypto/hash2curve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,7 @@ mod test {
use halo2_proofs::circuit::Value;
use halo2curves::bls12_381::G2;
use sha2::{Digest, Sha256};
use serial_test::serial;

fn get_circuit<F: Field>(
k: usize,
Expand Down Expand Up @@ -679,8 +680,9 @@ mod test {
}

#[test]
#[serial]
fn test_hash_to_g2() {
let k = 17;
let k = 20;

let test_input = vec![0u8; 32];
let builder = ShaThreadBuilder::<Fr>::mock();
Expand Down
4 changes: 3 additions & 1 deletion lightclient-circuits/src/gadget/crypto/sha256_flex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ mod test {

use crate::gadget::crypto::ShaCircuitBuilder;
use crate::util::{full_prover, full_verifier, gen_pkey, Challenges, IntoWitness};

use super::*;
use ark_std::{end_timer, start_timer};
use eth_types::Testnet;
Expand All @@ -228,6 +227,7 @@ mod test {
},
};
use sha2::{Digest, Sha256};
use serial_test::serial;

fn test_circuit<F: Field>(
k: usize,
Expand All @@ -246,6 +246,7 @@ mod test {
}

#[test]
#[serial]
fn test_sha256_chip_constant_size() {
let k = 15;

Expand All @@ -260,6 +261,7 @@ mod test {
}

#[test]
#[serial]
fn test_sha256_params_gen() {
let k = 15;
let test_input = vec![0u8; 64];
Expand Down
2 changes: 2 additions & 0 deletions lightclient-circuits/src/gadget/crypto/sha256_wide.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ mod test {
},
};
use sha2::{Digest, Sha256};
use serial_test::serial;

fn test_circuit<F: Field>(
k: usize,
Expand Down Expand Up @@ -303,6 +304,7 @@ mod test {
}

#[test]
#[serial]
fn test_sha256_wide_params_gen() {
let k = 10;
let test_input = vec![1u8; 64];
Expand Down
3 changes: 3 additions & 0 deletions preprocessor/params/kzg_bn254_21.srs
Git LFS file not shown

0 comments on commit 51498cb

Please sign in to comment.