Browse Source

update to latest sonobe version

main
arnaucube 4 weeks ago
parent
commit
8fea475d67
2 changed files with 11 additions and 9 deletions
  1. +3
    -2
      src/poseidon_chain.rs
  2. +8
    -7
      src/sha_chain_onchain.rs

+ 3
- 2
src/poseidon_chain.rs

@ -96,7 +96,7 @@ mod tests {
let poseidon_config = poseidon_canonical_config::<Fr>();
let f_circuit =
PoseidonFoldStepCircuit::<Fr, HASHES_PER_STEP>::new(poseidon_config).unwrap();
PoseidonFoldStepCircuit::<Fr, HASHES_PER_STEP>::new(poseidon_config.clone()).unwrap();
// ----------------
// Sanity check
@ -137,7 +137,8 @@ mod tests {
let mut rng = rand::rngs::OsRng;
// prepare the Nova prover & verifier params
let nova_preprocess_params = PreprocessorParam::new(poseidon_config, f_circuit.clone());
let nova_preprocess_params =
PreprocessorParam::new(poseidon_config.clone(), f_circuit.clone());
let start = Instant::now();
let nova_params = FS::preprocess(&mut rng, &nova_preprocess_params).unwrap();
println!("Nova params generated: {:?}", start.elapsed());

+ 8
- 7
src/sha_chain_onchain.rs

@ -27,9 +27,12 @@ mod tests {
use folding_schemes::{
commitment::{kzg::KZG, pedersen::Pedersen},
folding::nova::{
decider_eth::{prepare_calldata, Decider as DeciderEth},
Nova, PreprocessorParam,
folding::{
nova::{
decider_eth::{prepare_calldata, Decider as DeciderEth},
Nova, PreprocessorParam,
},
traits::CommittedInstanceOps,
},
frontend::FCircuit,
transcript::poseidon::poseidon_canonical_config,
@ -175,7 +178,6 @@ mod tests {
let nova_preprocess_params = PreprocessorParam::new(poseidon_config, f_circuit);
let start = Instant::now();
let nova_params = FS::preprocess(&mut rng, &nova_preprocess_params).unwrap();
let pp_hash = nova_params.1.pp_hash().unwrap();
println!("Nova params generated: {:?}", start.elapsed());
// initialize the folding scheme engine, in our case we use Nova
@ -225,8 +227,8 @@ mod tests {
nova.i,
nova.z_0.clone(),
nova.z_i.clone(),
&nova.U_i,
&nova.u_i,
&nova.U_i.get_commitments(),
&nova.u_i.get_commitments(),
&proof,
)
.unwrap();
@ -239,7 +241,6 @@ mod tests {
let calldata: Vec<u8> = prepare_calldata(
function_selector,
pp_hash,
nova.i,
nova.z_0,
nova.z_i,

Loading…
Cancel
Save