mirror of
https://github.com/arnaucube/sonobe.git
synced 2026-01-08 15:01:30 +01:00
BN254 and Grumpkin Poseidon configurations (#106)
* Add BN254 and Grumpkin Poseidon configurations * Remove unncecessary comment * Fix BN254 Poseidon config test * Correction * Update folding-schemes/src/transcript/poseidon/grumpkin.rs Co-authored-by: Pierre <pdaixmoreux@gmail.com> --------- Co-authored-by: Pierre <pdaixmoreux@gmail.com>
This commit is contained in:
@@ -25,7 +25,7 @@ use folding_schemes::folding::nova::Nova;
|
||||
use folding_schemes::frontend::FCircuit;
|
||||
use folding_schemes::{Error, FoldingScheme};
|
||||
mod utils;
|
||||
use folding_schemes::transcript::poseidon::poseidon_test_config;
|
||||
use folding_schemes::transcript::poseidon::poseidon_canonical_config;
|
||||
use utils::init_nova_ivc_params;
|
||||
|
||||
/// This is the circuit that we want to fold, it implements the FCircuit trait. The parameter z_i
|
||||
@@ -131,7 +131,7 @@ pub mod tests {
|
||||
// test to check that the ExternalInputsCircuits computes the same values inside and outside the circuit
|
||||
#[test]
|
||||
fn test_f_circuit() {
|
||||
let poseidon_config = poseidon_test_config::<Fr>();
|
||||
let poseidon_config = poseidon_canonical_config::<Fr>();
|
||||
|
||||
let cs = ConstraintSystem::<Fr>::new_ref();
|
||||
|
||||
@@ -169,7 +169,7 @@ fn main() {
|
||||
];
|
||||
assert_eq!(external_inputs.len(), num_steps);
|
||||
|
||||
let poseidon_config = poseidon_test_config::<Fr>();
|
||||
let poseidon_config = poseidon_canonical_config::<Fr>();
|
||||
let F_circuit = ExternalInputsCircuits::<Fr>::new(poseidon_config).unwrap();
|
||||
|
||||
println!("Prepare Nova ProverParams & VerifierParams");
|
||||
|
||||
@@ -21,7 +21,7 @@ use folding_schemes::{
|
||||
decider_eth_circuit::DeciderEthCircuit, get_r1cs, Nova, ProverParams, VerifierParams,
|
||||
},
|
||||
frontend::FCircuit,
|
||||
transcript::poseidon::poseidon_test_config,
|
||||
transcript::poseidon::poseidon_canonical_config,
|
||||
FoldingScheme,
|
||||
};
|
||||
|
||||
@@ -37,7 +37,7 @@ pub(crate) fn init_nova_ivc_params<FC: FCircuit<Fr>>(
|
||||
KZGVerifierKey<Bn254>,
|
||||
) {
|
||||
let mut rng = ark_std::test_rng();
|
||||
let poseidon_config = poseidon_test_config::<Fr>();
|
||||
let poseidon_config = poseidon_canonical_config::<Fr>();
|
||||
|
||||
// get the CM & CF_CM len
|
||||
let (r1cs, cf_r1cs) = get_r1cs::<G1, GVar, G2, GVar2, FC>(&poseidon_config, F_circuit).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user