2024-10-17 09:12:27 +02:00
|
|
|
// global params for the circuits
|
|
|
|
|
|
|
|
|
|
use plonky2::hash::poseidon::PoseidonHash;
|
2024-11-05 12:57:49 +01:00
|
|
|
use plonky2_poseidon2::poseidon2_hash::poseidon2::Poseidon2Hash;
|
2024-10-17 09:12:27 +02:00
|
|
|
|
|
|
|
|
// hash function used. this is hackish way of doing it because
|
|
|
|
|
// H::Hash is not consistent with HashOut<F> and causing a lot of headache
|
|
|
|
|
// will look into this later.
|
2024-11-08 12:22:36 +01:00
|
|
|
pub type HF = Poseidon2Hash;
|
2024-11-05 12:57:49 +01:00
|
|
|
|
2024-11-07 09:32:29 +01:00
|
|
|
// params used for the circuits
|
|
|
|
|
// should be defined prior to building the circuit
|
|
|
|
|
#[derive(Clone, Debug)]
|
|
|
|
|
pub struct CircuitParams{
|
|
|
|
|
pub max_depth: usize,
|
|
|
|
|
pub max_log2_n_slots: usize,
|
|
|
|
|
pub block_tree_depth: usize,
|
|
|
|
|
pub n_field_elems_per_cell: usize,
|
|
|
|
|
pub n_samples: usize,
|
|
|
|
|
}
|
|
|
|
|
|