mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-08 08:43:06 +00:00
Multi-hash test
This commit is contained in:
parent
156fd45b83
commit
2e4bea59ee
@ -137,7 +137,9 @@ mod tests {
|
||||
use crate::hash::merkle_proofs::MerkleProofTarget;
|
||||
use crate::iop::witness::{PartialWitness, Witness};
|
||||
use crate::plonk::circuit_data::VerifierOnlyCircuitData;
|
||||
use crate::plonk::config::{GenericConfig, KeccakGoldilocksConfig, PoseidonGoldilocksConfig};
|
||||
use crate::plonk::config::{
|
||||
GMiMCGoldilocksConfig, GenericConfig, KeccakGoldilocksConfig, PoseidonGoldilocksConfig,
|
||||
};
|
||||
use crate::plonk::proof::{
|
||||
CompressedProofWithPublicInputs, OpeningSetTarget, Proof, ProofTarget,
|
||||
ProofWithPublicInputs,
|
||||
@ -485,6 +487,62 @@ mod tests {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn test_recursive_verifier_multi_hash() -> Result<()> {
|
||||
init_logger();
|
||||
const D: usize = 2;
|
||||
type C = PoseidonGoldilocksConfig;
|
||||
type GC = GMiMCGoldilocksConfig;
|
||||
type KC = KeccakGoldilocksConfig;
|
||||
type F = <C as GenericConfig<D>>::F;
|
||||
|
||||
let config = CircuitConfig::standard_recursion_config();
|
||||
let (proof, vd, cd) = dummy_proof::<F, C, D>(&config, 4_000)?;
|
||||
|
||||
let (proof, vd, cd) =
|
||||
recursive_proof::<F, C, C, D>(proof, vd, cd, &config, &config, Some(13), false, false)?;
|
||||
test_serialization(&proof, &cd)?;
|
||||
|
||||
let (proof, vd, cd) = recursive_proof::<F, GC, C, D>(
|
||||
proof,
|
||||
vd,
|
||||
cd,
|
||||
&config,
|
||||
&config,
|
||||
Some(13),
|
||||
false,
|
||||
false,
|
||||
)?;
|
||||
test_serialization(&proof, &cd)?;
|
||||
|
||||
let (proof, vd, cd) = recursive_proof::<F, GC, GC, D>(
|
||||
proof,
|
||||
vd,
|
||||
cd,
|
||||
&config,
|
||||
&config,
|
||||
Some(13),
|
||||
false,
|
||||
false,
|
||||
)?;
|
||||
test_serialization(&proof, &cd)?;
|
||||
|
||||
let (proof, vd, cd) = recursive_proof::<F, KC, GC, D>(
|
||||
proof,
|
||||
vd,
|
||||
cd,
|
||||
&config,
|
||||
&config,
|
||||
Some(13),
|
||||
false,
|
||||
false,
|
||||
)?;
|
||||
test_serialization(&proof, &cd)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Creates a dummy proof which should have roughly `num_dummy_gates` gates.
|
||||
fn dummy_proof<F: Extendable<D>, C: GenericConfig<D, F = F>, const D: usize>(
|
||||
config: &CircuitConfig,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user