mirror of
https://github.com/arnaucube/sonobe.git
synced 2026-01-13 01:11:32 +01:00
add hash of public params for Nova & HyperNova (#118)
- implement hash of public params for Nova & HyperNova - abstract pp_hash computation for folding schemes - add pp_hash to solidity contract generator to verify the decider proof
This commit is contained in:
@@ -10,7 +10,7 @@ use ark_std::rand::Rng;
|
||||
use ark_std::Zero;
|
||||
|
||||
use super::Witness;
|
||||
use crate::ccs::CCS;
|
||||
use crate::arith::ccs::CCS;
|
||||
use crate::commitment::CommitmentScheme;
|
||||
use crate::folding::circuits::nonnative::affine::nonnative_affine_to_field_elements;
|
||||
use crate::utils::mle::dense_vec_to_dense_mle;
|
||||
@@ -129,6 +129,7 @@ where
|
||||
pub fn hash(
|
||||
&self,
|
||||
poseidon_config: &PoseidonConfig<C::ScalarField>,
|
||||
pp_hash: C::ScalarField,
|
||||
i: C::ScalarField,
|
||||
z_0: Vec<C::ScalarField>,
|
||||
z_i: Vec<C::ScalarField>,
|
||||
@@ -138,7 +139,7 @@ where
|
||||
CRH::<C::ScalarField>::evaluate(
|
||||
poseidon_config,
|
||||
vec![
|
||||
vec![i],
|
||||
vec![pp_hash, i],
|
||||
z_0,
|
||||
z_i,
|
||||
C_x,
|
||||
@@ -164,9 +165,10 @@ pub mod tests {
|
||||
use std::sync::Arc;
|
||||
|
||||
use super::*;
|
||||
use crate::ccs::{
|
||||
use crate::arith::{
|
||||
ccs::tests::{get_test_ccs, get_test_z},
|
||||
r1cs::R1CS,
|
||||
tests::{get_test_ccs, get_test_z},
|
||||
Arith,
|
||||
};
|
||||
use crate::commitment::pedersen::Pedersen;
|
||||
use crate::utils::hypercube::BooleanHypercube;
|
||||
|
||||
Reference in New Issue
Block a user