diff --git a/plonky2/src/iop/generator.rs b/plonky2/src/iop/generator.rs index 73978f5c..961b71a5 100644 --- a/plonky2/src/iop/generator.rs +++ b/plonky2/src/iop/generator.rs @@ -158,6 +158,22 @@ impl GeneratedValues { } pub fn set_target(&mut self, target: Target, value: F) { + if target + == Target::Wire(Wire { + gate: 42, + input: 54, + }) + { + dbg!(value); + } + if target + == Target::Wire(Wire { + gate: 41, + input: 34, + }) + { + dbg!(value); + } self.target_values.push((target, value)) } diff --git a/starky/src/constraint_consumer.rs b/starky/src/constraint_consumer.rs index 932b2db8..88f66118 100644 --- a/starky/src/constraint_consumer.rs +++ b/starky/src/constraint_consumer.rs @@ -150,7 +150,7 @@ impl, const D: usize> RecursiveConstraintConsumer, ) { let filtered_constraint = builder.mul_extension(constraint, self.lagrange_basis_first); - self.constraint(builder, filtered_constraint); + self.constraint_wrapping(builder, filtered_constraint); } /// Add one constraint, but first multiply it by a filter such that it will only apply to the @@ -161,6 +161,6 @@ impl, const D: usize> RecursiveConstraintConsumer, ) { let filtered_constraint = builder.mul_extension(constraint, self.lagrange_basis_last); - self.constraint(builder, filtered_constraint); + self.constraint_wrapping(builder, filtered_constraint); } } diff --git a/starky/src/fibonacci_stark.rs b/starky/src/fibonacci_stark.rs index d4c18ff6..1c7b870e 100644 --- a/starky/src/fibonacci_stark.rs +++ b/starky/src/fibonacci_stark.rs @@ -191,6 +191,7 @@ mod tests { public_inputs, &mut TimingTree::default(), )?; + verify(stark, proof.clone(), &config)?; recursive_proof::(stark, proof, &config, true, true) } diff --git a/starky/src/proof.rs b/starky/src/proof.rs index 3999e455..8e225e79 100644 --- a/starky/src/proof.rs +++ b/starky/src/proof.rs @@ -16,6 +16,7 @@ use rayon::prelude::*; use crate::config::StarkConfig; // TODO: Permutation polynomials. +#[derive(Debug, Clone)] pub struct StarkProof, C: GenericConfig, const D: usize> { /// Merkle cap of LDEs of trace values. pub trace_cap: MerkleCap, @@ -56,6 +57,7 @@ impl StarkProofTarget { } } +#[derive(Debug, Clone)] pub struct StarkProofWithPublicInputs< F: RichField + Extendable, C: GenericConfig, @@ -110,6 +112,7 @@ pub(crate) struct StarkProofChallengesTarget { } /// Purported values of each polynomial at the challenge point. +#[derive(Debug, Clone)] pub struct StarkOpeningSet, const D: usize> { pub local_values: Vec, pub next_values: Vec,