Print timing for a regular Poseidon recursive proof (#403)

* Print timing for a regular Poseidon recursive proof

Rather than the Keccak-256 proof. I kept it but hid the timing since it's less important to us. Alternatively we could test Keccak-256 only in the size-optimized test, since that's basically testing a bridge proof. Let me know if you have a preference.

* Remove Keccak proof per PR discussion
This commit is contained in:
Daniel Lubarov 2021-12-20 18:52:55 -08:00 committed by GitHub
parent d4a0a8661e
commit 04dce92a3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -386,19 +386,22 @@ mod tests {
init_logger();
const D: usize = 2;
type C = PoseidonGoldilocksConfig;
type KC = KeccakGoldilocksConfig;
type F = <C as GenericConfig<D>>::F;
let config = CircuitConfig::standard_recursion_config();
// Start with a degree 2^14 proof, then shrink it to 2^13, then to 2^12.
// Start with a degree 2^14 proof
let (proof, vd, cd) = dummy_proof::<F, C, D>(&config, 16_000)?;
assert_eq!(cd.degree_bits, 14);
// Shrink it to 2^13.
let (proof, vd, cd) =
recursive_proof::<F, C, C, D>(proof, vd, cd, &config, &config, Some(13), false, false)?;
assert_eq!(cd.degree_bits, 13);
// Shrink it to 2^12.
let (proof, _vd, cd) =
recursive_proof::<F, KC, C, D>(proof, vd, cd, &config, &config, None, true, true)?;
recursive_proof::<F, C, C, D>(proof, vd, cd, &config, &config, None, true, true)?;
assert_eq!(cd.degree_bits, 12);
test_serialization(&proof, &cd)?;