mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-07 08:13:11 +00:00
Allow zero FRI reductions (#283)
In this case we're basically sending the witness. As @wborgeaud mentioned it might make sense for small circuits.
This commit is contained in:
parent
898cac1709
commit
73f9a0be6b
@ -121,10 +121,6 @@ impl<F: RichField + Extendable<D>, const D: usize> CircuitBuilder<F, D> {
|
||||
proof.query_round_proofs.len(),
|
||||
"Number of query rounds does not match config."
|
||||
);
|
||||
debug_assert!(
|
||||
!common_data.fri_params.reduction_arity_bits.is_empty(),
|
||||
"Number of reductions should be non-zero."
|
||||
);
|
||||
|
||||
let precomputed_reduced_evals = with_context!(
|
||||
self,
|
||||
|
||||
@ -26,7 +26,7 @@ impl FriReductionStrategy {
|
||||
match self {
|
||||
&FriReductionStrategy::ConstantArityBits(arity_bits, final_poly_bits) => {
|
||||
let mut result = Vec::new();
|
||||
while result.is_empty() || degree_bits > final_poly_bits {
|
||||
while degree_bits > final_poly_bits {
|
||||
result.push(arity_bits);
|
||||
assert!(degree_bits >= arity_bits);
|
||||
degree_bits -= arity_bits;
|
||||
|
||||
@ -80,10 +80,6 @@ pub(crate) fn verify_fri_proof<F: RichField + Extendable<D>, const D: usize>(
|
||||
config.fri_config.num_query_rounds == proof.query_round_proofs.len(),
|
||||
"Number of query rounds does not match config."
|
||||
);
|
||||
ensure!(
|
||||
!common_data.fri_params.reduction_arity_bits.is_empty(),
|
||||
"Number of reductions should be non-zero."
|
||||
);
|
||||
|
||||
let precomputed_reduced_evals =
|
||||
PrecomputedReducedEvals::from_os_and_alpha(os, challenges.fri_alpha);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user