mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-04 23:03:08 +00:00
Merge pull request #1116 from topos-protocol/recursive_ranges
Remove need for matching start ranges
This commit is contained in:
commit
4893a86001
@ -6,6 +6,7 @@ use hashbrown::HashMap;
|
||||
use itertools::{zip_eq, Itertools};
|
||||
use plonky2::field::extension::Extendable;
|
||||
use plonky2::fri::FriParams;
|
||||
use plonky2::gates::constant::ConstantGate;
|
||||
use plonky2::gates::noop::NoopGate;
|
||||
use plonky2::hash::hash_types::RichField;
|
||||
use plonky2::iop::challenger::RecursiveChallenger;
|
||||
@ -491,6 +492,11 @@ where
|
||||
// public inputs for cyclic verification, even though they'll be ignored.
|
||||
let cyclic_vk = builder.add_verifier_data_public_inputs();
|
||||
|
||||
builder.add_gate(
|
||||
ConstantGate::new(inner_common_data[0].config.num_constants),
|
||||
vec![],
|
||||
);
|
||||
|
||||
RootCircuitData {
|
||||
circuit: builder.build::<C>(),
|
||||
proof_with_pis: recursive_proofs,
|
||||
|
||||
@ -97,7 +97,7 @@ fn test_empty_txn_list() -> anyhow::Result<()> {
|
||||
|
||||
let all_circuits = AllRecursiveCircuits::<F, C, D>::new(
|
||||
&all_stark,
|
||||
&[9..18, 9..15, 9..15, 9..10, 9..12, 9..18], // Minimal ranges to prove an empty list
|
||||
&[16..17, 14..15, 14..15, 9..10, 12..13, 18..19], // Minimal ranges to prove an empty list
|
||||
&config,
|
||||
);
|
||||
|
||||
|
||||
@ -26,6 +26,10 @@ pub struct ConstantGate {
|
||||
}
|
||||
|
||||
impl ConstantGate {
|
||||
pub fn new(num_consts: usize) -> Self {
|
||||
Self { num_consts }
|
||||
}
|
||||
|
||||
pub fn const_input(&self, i: usize) -> usize {
|
||||
debug_assert!(i < self.num_consts);
|
||||
i
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user