mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-07 16:23:12 +00:00
Update size-optimized recursion test (#388)
I think it should start with `standard_recursion_config`, since the goal of the test is to start with a regular speed-optimized recursive proof and shrink it. The final proof is a bit larger now, mainly because of the update to 100 bits, and partly (less importantly) because it starts with the now-standard arity 16. We could maybe switch from arity 16 to 8 somewhere in the chain, but I think that might require another proof layer, and didn't want to complicate it too much.
This commit is contained in:
parent
d6a0a2e772
commit
58e1febde7
@ -76,19 +76,6 @@ impl CircuitConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn size_optimized_recursion_config() -> Self {
|
|
||||||
Self {
|
|
||||||
security_bits: 93,
|
|
||||||
cap_height: 3,
|
|
||||||
fri_config: FriConfig {
|
|
||||||
reduction_strategy: FriReductionStrategy::ConstantArityBits(3, 5),
|
|
||||||
num_query_rounds: 26,
|
|
||||||
..CircuitConfig::standard_recursion_config().fri_config
|
|
||||||
},
|
|
||||||
..CircuitConfig::standard_recursion_config()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn standard_recursion_zk_config() -> Self {
|
pub fn standard_recursion_zk_config() -> Self {
|
||||||
CircuitConfig {
|
CircuitConfig {
|
||||||
zero_knowledge: true,
|
zero_knowledge: true,
|
||||||
|
|||||||
@ -408,7 +408,7 @@ mod tests {
|
|||||||
type F = GoldilocksField;
|
type F = GoldilocksField;
|
||||||
const D: usize = 2;
|
const D: usize = 2;
|
||||||
|
|
||||||
let standard_config = CircuitConfig::size_optimized_recursion_config();
|
let standard_config = CircuitConfig::standard_recursion_config();
|
||||||
|
|
||||||
// An initial dummy proof.
|
// An initial dummy proof.
|
||||||
let (proof, vd, cd) = dummy_proof::<F, D>(&standard_config, 4_000)?;
|
let (proof, vd, cd) = dummy_proof::<F, D>(&standard_config, 4_000)?;
|
||||||
@ -432,7 +432,7 @@ mod tests {
|
|||||||
rate_bits: 7,
|
rate_bits: 7,
|
||||||
fri_config: FriConfig {
|
fri_config: FriConfig {
|
||||||
proof_of_work_bits: 16,
|
proof_of_work_bits: 16,
|
||||||
num_query_rounds: 11,
|
num_query_rounds: 12,
|
||||||
..standard_config.fri_config.clone()
|
..standard_config.fri_config.clone()
|
||||||
},
|
},
|
||||||
..standard_config
|
..standard_config
|
||||||
@ -453,11 +453,11 @@ mod tests {
|
|||||||
let final_config = CircuitConfig {
|
let final_config = CircuitConfig {
|
||||||
cap_height: 0,
|
cap_height: 0,
|
||||||
rate_bits: 8,
|
rate_bits: 8,
|
||||||
num_routed_wires: 25,
|
num_routed_wires: 37,
|
||||||
fri_config: FriConfig {
|
fri_config: FriConfig {
|
||||||
proof_of_work_bits: 21,
|
proof_of_work_bits: 20,
|
||||||
reduction_strategy: FriReductionStrategy::MinSize(Some(3)),
|
reduction_strategy: FriReductionStrategy::MinSize(None),
|
||||||
num_query_rounds: 9,
|
num_query_rounds: 10,
|
||||||
},
|
},
|
||||||
..high_rate_config
|
..high_rate_config
|
||||||
};
|
};
|
||||||
@ -471,7 +471,7 @@ mod tests {
|
|||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
)?;
|
)?;
|
||||||
assert_eq!(cd.degree_bits, 12);
|
assert_eq!(cd.degree_bits, 12, "final proof too large");
|
||||||
|
|
||||||
test_serialization(&proof, &cd)?;
|
test_serialization(&proof, &cd)?;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user