mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-09 09:13:09 +00:00
Working
This commit is contained in:
parent
2e008eac23
commit
b0de3328c1
@ -158,6 +158,22 @@ impl<F: Field> GeneratedValues<F> {
|
||||
}
|
||||
|
||||
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))
|
||||
}
|
||||
|
||||
|
||||
@ -150,7 +150,7 @@ impl<F: RichField + Extendable<D>, const D: usize> RecursiveConstraintConsumer<F
|
||||
constraint: ExtensionTarget<D>,
|
||||
) {
|
||||
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<F: RichField + Extendable<D>, const D: usize> RecursiveConstraintConsumer<F
|
||||
constraint: ExtensionTarget<D>,
|
||||
) {
|
||||
let filtered_constraint = builder.mul_extension(constraint, self.lagrange_basis_last);
|
||||
self.constraint(builder, filtered_constraint);
|
||||
self.constraint_wrapping(builder, filtered_constraint);
|
||||
}
|
||||
}
|
||||
|
||||
@ -191,6 +191,7 @@ mod tests {
|
||||
public_inputs,
|
||||
&mut TimingTree::default(),
|
||||
)?;
|
||||
verify(stark, proof.clone(), &config)?;
|
||||
|
||||
recursive_proof::<F, C, S, C, D>(stark, proof, &config, true, true)
|
||||
}
|
||||
|
||||
@ -16,6 +16,7 @@ use rayon::prelude::*;
|
||||
use crate::config::StarkConfig;
|
||||
|
||||
// TODO: Permutation polynomials.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct StarkProof<F: RichField + Extendable<D>, C: GenericConfig<D, F = F>, const D: usize> {
|
||||
/// Merkle cap of LDEs of trace values.
|
||||
pub trace_cap: MerkleCap<F, C::Hasher>,
|
||||
@ -56,6 +57,7 @@ impl<const D: usize> StarkProofTarget<D> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct StarkProofWithPublicInputs<
|
||||
F: RichField + Extendable<D>,
|
||||
C: GenericConfig<D, F = F>,
|
||||
@ -110,6 +112,7 @@ pub(crate) struct StarkProofChallengesTarget<const D: usize> {
|
||||
}
|
||||
|
||||
/// Purported values of each polynomial at the challenge point.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct StarkOpeningSet<F: RichField + Extendable<D>, const D: usize> {
|
||||
pub local_values: Vec<F::Extension>,
|
||||
pub next_values: Vec<F::Extension>,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user