mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-02 22:03:07 +00:00
s/right/next
This commit is contained in:
parent
db56fe39be
commit
6f5c8e46f6
@ -183,8 +183,8 @@ impl<'a, F: RichField + Extendable<D>, const D: usize>
|
||||
.map(|(p, &num_perms)| {
|
||||
let openings = &p.proof.openings;
|
||||
let ctl_zs = openings.permutation_ctl_zs.iter().skip(num_perms);
|
||||
let ctl_zs_right = openings.permutation_ctl_zs_right.iter().skip(num_perms);
|
||||
ctl_zs.zip(ctl_zs_right)
|
||||
let ctl_zs_next = openings.permutation_ctl_zs_next.iter().skip(num_perms);
|
||||
ctl_zs.zip(ctl_zs_next)
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
@ -270,8 +270,8 @@ impl<'a, const D: usize> CtlCheckVarsTarget<'a, D> {
|
||||
.map(|(p, &num_perms)| {
|
||||
let openings = &p.proof.openings;
|
||||
let ctl_zs = openings.permutation_ctl_zs.iter().skip(num_perms);
|
||||
let ctl_zs_right = openings.permutation_ctl_zs_right.iter().skip(num_perms);
|
||||
ctl_zs.zip(ctl_zs_right)
|
||||
let ctl_zs_next = openings.permutation_ctl_zs_next.iter().skip(num_perms);
|
||||
ctl_zs.zip(ctl_zs_next)
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
|
||||
@ -166,7 +166,7 @@ pub struct StarkOpeningSet<F: RichField + Extendable<D>, const D: usize> {
|
||||
/// Openings of permutations and cross-table lookups `Z` polynomials at `zeta`.
|
||||
pub permutation_ctl_zs: Vec<F::Extension>,
|
||||
/// Openings of permutations and cross-table lookups `Z` polynomials at `g * zeta`.
|
||||
pub permutation_ctl_zs_right: Vec<F::Extension>,
|
||||
pub permutation_ctl_zs_next: Vec<F::Extension>,
|
||||
/// Openings of cross-table lookups `Z` polynomials at `g^-1`.
|
||||
pub ctl_zs_last: Vec<F>,
|
||||
/// Openings of quotient polynomials at `zeta`.
|
||||
@ -195,12 +195,12 @@ impl<F: RichField + Extendable<D>, const D: usize> StarkOpeningSet<F, D> {
|
||||
.map(|p| p.eval(z))
|
||||
.collect::<Vec<_>>()
|
||||
};
|
||||
let zeta_right = zeta.scalar_mul(g);
|
||||
let zeta_next = zeta.scalar_mul(g);
|
||||
Self {
|
||||
local_values: eval_commitment(zeta, trace_commitment),
|
||||
next_values: eval_commitment(zeta_right, trace_commitment),
|
||||
next_values: eval_commitment(zeta_next, trace_commitment),
|
||||
permutation_ctl_zs: eval_commitment(zeta, permutation_ctl_zs_commitment),
|
||||
permutation_ctl_zs_right: eval_commitment(zeta_right, permutation_ctl_zs_commitment),
|
||||
permutation_ctl_zs_next: eval_commitment(zeta_next, permutation_ctl_zs_commitment),
|
||||
ctl_zs_last: eval_commitment_base(
|
||||
F::primitive_root_of_unity(degree_bits).inverse(),
|
||||
permutation_ctl_zs_commitment,
|
||||
@ -220,11 +220,11 @@ impl<F: RichField + Extendable<D>, const D: usize> StarkOpeningSet<F, D> {
|
||||
.copied()
|
||||
.collect_vec(),
|
||||
};
|
||||
let zeta_right_batch = FriOpeningBatch {
|
||||
let zeta_next_batch = FriOpeningBatch {
|
||||
values: self
|
||||
.next_values
|
||||
.iter()
|
||||
.chain(&self.permutation_ctl_zs_right)
|
||||
.chain(&self.permutation_ctl_zs_next)
|
||||
.copied()
|
||||
.collect_vec(),
|
||||
};
|
||||
@ -239,7 +239,7 @@ impl<F: RichField + Extendable<D>, const D: usize> StarkOpeningSet<F, D> {
|
||||
};
|
||||
|
||||
FriOpenings {
|
||||
batches: vec![zeta_batch, zeta_right_batch, ctl_last_batch],
|
||||
batches: vec![zeta_batch, zeta_next_batch, ctl_last_batch],
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -248,7 +248,7 @@ pub struct StarkOpeningSetTarget<const D: usize> {
|
||||
pub local_values: Vec<ExtensionTarget<D>>,
|
||||
pub next_values: Vec<ExtensionTarget<D>>,
|
||||
pub permutation_ctl_zs: Vec<ExtensionTarget<D>>,
|
||||
pub permutation_ctl_zs_right: Vec<ExtensionTarget<D>>,
|
||||
pub permutation_ctl_zs_next: Vec<ExtensionTarget<D>>,
|
||||
pub ctl_zs_last: Vec<Target>,
|
||||
pub quotient_polys: Vec<ExtensionTarget<D>>,
|
||||
}
|
||||
@ -264,11 +264,11 @@ impl<const D: usize> StarkOpeningSetTarget<D> {
|
||||
.copied()
|
||||
.collect_vec(),
|
||||
};
|
||||
let zeta_right_batch = FriOpeningBatchTarget {
|
||||
let zeta_next_batch = FriOpeningBatchTarget {
|
||||
values: self
|
||||
.next_values
|
||||
.iter()
|
||||
.chain(&self.permutation_ctl_zs_right)
|
||||
.chain(&self.permutation_ctl_zs_next)
|
||||
.copied()
|
||||
.collect_vec(),
|
||||
};
|
||||
@ -283,7 +283,7 @@ impl<const D: usize> StarkOpeningSetTarget<D> {
|
||||
};
|
||||
|
||||
FriOpeningsTarget {
|
||||
batches: vec![zeta_batch, zeta_right_batch, ctl_last_batch],
|
||||
batches: vec![zeta_batch, zeta_next_batch, ctl_last_batch],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -119,7 +119,7 @@ fn verify_stark_proof_with_challenges_circuit<
|
||||
local_values,
|
||||
next_values,
|
||||
permutation_ctl_zs,
|
||||
permutation_ctl_zs_right,
|
||||
permutation_ctl_zs_next,
|
||||
ctl_zs_last,
|
||||
quotient_polys,
|
||||
} = &proof.openings;
|
||||
@ -156,7 +156,7 @@ fn verify_stark_proof_with_challenges_circuit<
|
||||
.uses_permutation_args()
|
||||
.then(|| PermutationCheckDataTarget {
|
||||
local_zs: permutation_ctl_zs[..num_permutation_zs].to_vec(),
|
||||
next_zs: permutation_ctl_zs_right[..num_permutation_zs].to_vec(),
|
||||
next_zs: permutation_ctl_zs_next[..num_permutation_zs].to_vec(),
|
||||
permutation_challenge_sets: challenges.permutation_challenge_sets.clone().unwrap(),
|
||||
});
|
||||
|
||||
@ -329,7 +329,7 @@ fn add_stark_opening_set<F: RichField + Extendable<D>, S: Stark<F, D>, const D:
|
||||
next_values: builder.add_virtual_extension_targets(S::COLUMNS),
|
||||
permutation_ctl_zs: builder
|
||||
.add_virtual_extension_targets(stark.num_permutation_batches(config) + num_ctl_zs),
|
||||
permutation_ctl_zs_right: builder
|
||||
permutation_ctl_zs_next: builder
|
||||
.add_virtual_extension_targets(stark.num_permutation_batches(config) + num_ctl_zs),
|
||||
ctl_zs_last: builder.add_virtual_targets(num_ctl_zs),
|
||||
quotient_polys: builder
|
||||
|
||||
@ -120,7 +120,7 @@ pub trait Stark<F: RichField + Extendable<D>, const D: usize>: Sync {
|
||||
]
|
||||
.concat(),
|
||||
};
|
||||
let zeta_right_batch = FriBatchInfo {
|
||||
let zeta_next_batch = FriBatchInfo {
|
||||
point: zeta.scalar_mul(g),
|
||||
polynomials: [trace_info, permutation_ctl_zs_info].concat(),
|
||||
};
|
||||
@ -130,7 +130,7 @@ pub trait Stark<F: RichField + Extendable<D>, const D: usize>: Sync {
|
||||
};
|
||||
FriInstanceInfo {
|
||||
oracles: vec![no_blinding_oracle; oracle_indices.next().unwrap()],
|
||||
batches: vec![zeta_batch, zeta_right_batch, ctl_last_batch],
|
||||
batches: vec![zeta_batch, zeta_next_batch, ctl_last_batch],
|
||||
}
|
||||
}
|
||||
|
||||
@ -176,9 +176,9 @@ pub trait Stark<F: RichField + Extendable<D>, const D: usize>: Sync {
|
||||
]
|
||||
.concat(),
|
||||
};
|
||||
let zeta_right = builder.mul_const_extension(g, zeta);
|
||||
let zeta_right_batch = FriBatchInfoTarget {
|
||||
point: zeta_right,
|
||||
let zeta_next = builder.mul_const_extension(g, zeta);
|
||||
let zeta_next_batch = FriBatchInfoTarget {
|
||||
point: zeta_next,
|
||||
polynomials: [trace_info, permutation_ctl_zs_info].concat(),
|
||||
};
|
||||
let ctl_last_batch = FriBatchInfoTarget {
|
||||
@ -188,7 +188,7 @@ pub trait Stark<F: RichField + Extendable<D>, const D: usize>: Sync {
|
||||
};
|
||||
FriInstanceInfoTarget {
|
||||
oracles: vec![no_blinding_oracle; oracle_indices.next().unwrap()],
|
||||
batches: vec![zeta_batch, zeta_right_batch, ctl_last_batch],
|
||||
batches: vec![zeta_batch, zeta_next_batch, ctl_last_batch],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -101,7 +101,7 @@ where
|
||||
local_values,
|
||||
next_values,
|
||||
permutation_ctl_zs,
|
||||
permutation_ctl_zs_right,
|
||||
permutation_ctl_zs_next,
|
||||
ctl_zs_last,
|
||||
quotient_polys,
|
||||
} = &proof.openings;
|
||||
@ -134,7 +134,7 @@ where
|
||||
let num_permutation_zs = stark.num_permutation_batches(config);
|
||||
let permutation_data = stark.uses_permutation_args().then(|| PermutationCheckVars {
|
||||
local_zs: permutation_ctl_zs[..num_permutation_zs].to_vec(),
|
||||
next_zs: permutation_ctl_zs_right[..num_permutation_zs].to_vec(),
|
||||
next_zs: permutation_ctl_zs_next[..num_permutation_zs].to_vec(),
|
||||
permutation_challenge_sets: challenges.permutation_challenge_sets.clone().unwrap(),
|
||||
});
|
||||
eval_vanishing_poly::<F, F::Extension, F::Extension, C, S, D, D>(
|
||||
|
||||
@ -336,13 +336,13 @@ impl<F: RichField + Extendable<D>, C: GenericConfig<D, F = F>, const D: usize>
|
||||
|
||||
// The Z polynomials are also opened at g * zeta.
|
||||
let g = F::Extension::primitive_root_of_unity(self.degree_bits);
|
||||
let zeta_right = g * zeta;
|
||||
let zeta_right_batch = FriBatchInfo {
|
||||
point: zeta_right,
|
||||
let zeta_next = g * zeta;
|
||||
let zeta_next_batch = FriBatchInfo {
|
||||
point: zeta_next,
|
||||
polynomials: self.fri_zs_polys(),
|
||||
};
|
||||
|
||||
let openings = vec![zeta_batch, zeta_right_batch];
|
||||
let openings = vec![zeta_batch, zeta_next_batch];
|
||||
FriInstanceInfo {
|
||||
oracles: FRI_ORACLES.to_vec(),
|
||||
batches: openings,
|
||||
@ -362,13 +362,13 @@ impl<F: RichField + Extendable<D>, C: GenericConfig<D, F = F>, const D: usize>
|
||||
|
||||
// The Z polynomials are also opened at g * zeta.
|
||||
let g = F::primitive_root_of_unity(self.degree_bits);
|
||||
let zeta_right = builder.mul_const_extension(g, zeta);
|
||||
let zeta_right_batch = FriBatchInfoTarget {
|
||||
point: zeta_right,
|
||||
let zeta_next = builder.mul_const_extension(g, zeta);
|
||||
let zeta_next_batch = FriBatchInfoTarget {
|
||||
point: zeta_next,
|
||||
polynomials: self.fri_zs_polys(),
|
||||
};
|
||||
|
||||
let openings = vec![zeta_batch, zeta_right_batch];
|
||||
let openings = vec![zeta_batch, zeta_next_batch];
|
||||
FriInstanceInfoTarget {
|
||||
oracles: FRI_ORACLES.to_vec(),
|
||||
batches: openings,
|
||||
|
||||
@ -283,7 +283,7 @@ pub struct OpeningSet<F: RichField + Extendable<D>, const D: usize> {
|
||||
pub plonk_sigmas: Vec<F::Extension>,
|
||||
pub wires: Vec<F::Extension>,
|
||||
pub plonk_zs: Vec<F::Extension>,
|
||||
pub plonk_zs_right: Vec<F::Extension>,
|
||||
pub plonk_zs_next: Vec<F::Extension>,
|
||||
pub partial_products: Vec<F::Extension>,
|
||||
pub quotient_polys: Vec<F::Extension>,
|
||||
}
|
||||
@ -311,7 +311,7 @@ impl<F: RichField + Extendable<D>, const D: usize> OpeningSet<F, D> {
|
||||
plonk_sigmas: constants_sigmas_eval[common_data.sigmas_range()].to_vec(),
|
||||
wires: eval_commitment(zeta, wires_commitment),
|
||||
plonk_zs: zs_partial_products_eval[common_data.zs_range()].to_vec(),
|
||||
plonk_zs_right: eval_commitment(g * zeta, zs_partial_products_commitment)
|
||||
plonk_zs_next: eval_commitment(g * zeta, zs_partial_products_commitment)
|
||||
[common_data.zs_range()]
|
||||
.to_vec(),
|
||||
partial_products: zs_partial_products_eval[common_data.partial_products_range()]
|
||||
@ -332,11 +332,11 @@ impl<F: RichField + Extendable<D>, const D: usize> OpeningSet<F, D> {
|
||||
]
|
||||
.concat(),
|
||||
};
|
||||
let zeta_right_batch = FriOpeningBatch {
|
||||
values: self.plonk_zs_right.clone(),
|
||||
let zeta_next_batch = FriOpeningBatch {
|
||||
values: self.plonk_zs_next.clone(),
|
||||
};
|
||||
FriOpenings {
|
||||
batches: vec![zeta_batch, zeta_right_batch],
|
||||
batches: vec![zeta_batch, zeta_next_batch],
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -348,7 +348,7 @@ pub struct OpeningSetTarget<const D: usize> {
|
||||
pub plonk_sigmas: Vec<ExtensionTarget<D>>,
|
||||
pub wires: Vec<ExtensionTarget<D>>,
|
||||
pub plonk_zs: Vec<ExtensionTarget<D>>,
|
||||
pub plonk_zs_right: Vec<ExtensionTarget<D>>,
|
||||
pub plonk_zs_next: Vec<ExtensionTarget<D>>,
|
||||
pub partial_products: Vec<ExtensionTarget<D>>,
|
||||
pub quotient_polys: Vec<ExtensionTarget<D>>,
|
||||
}
|
||||
@ -366,11 +366,11 @@ impl<const D: usize> OpeningSetTarget<D> {
|
||||
]
|
||||
.concat(),
|
||||
};
|
||||
let zeta_right_batch = FriOpeningBatchTarget {
|
||||
values: self.plonk_zs_right.clone(),
|
||||
let zeta_next_batch = FriOpeningBatchTarget {
|
||||
values: self.plonk_zs_next.clone(),
|
||||
};
|
||||
FriOpeningsTarget {
|
||||
batches: vec![zeta_batch, zeta_right_batch],
|
||||
batches: vec![zeta_batch, zeta_next_batch],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ impl<F: RichField + Extendable<D>, const D: usize> CircuitBuilder<F, D> {
|
||||
public_inputs_hash: &public_inputs_hash,
|
||||
};
|
||||
let local_zs = &proof.openings.plonk_zs;
|
||||
let next_zs = &proof.openings.plonk_zs_right;
|
||||
let next_zs = &proof.openings.plonk_zs_next;
|
||||
let s_sigmas = &proof.openings.plonk_sigmas;
|
||||
let partial_products = &proof.openings.partial_products;
|
||||
|
||||
@ -171,7 +171,7 @@ impl<F: RichField + Extendable<D>, const D: usize> CircuitBuilder<F, D> {
|
||||
plonk_sigmas: self.add_virtual_extension_targets(config.num_routed_wires),
|
||||
wires: self.add_virtual_extension_targets(config.num_wires),
|
||||
plonk_zs: self.add_virtual_extension_targets(num_challenges),
|
||||
plonk_zs_right: self.add_virtual_extension_targets(num_challenges),
|
||||
plonk_zs_next: self.add_virtual_extension_targets(num_challenges),
|
||||
partial_products: self.add_virtual_extension_targets(total_partial_products),
|
||||
quotient_polys: self.add_virtual_extension_targets(common_data.num_quotient_polys()),
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ where
|
||||
public_inputs_hash: &public_inputs_hash,
|
||||
};
|
||||
let local_zs = &proof.openings.plonk_zs;
|
||||
let next_zs = &proof.openings.plonk_zs_right;
|
||||
let next_zs = &proof.openings.plonk_zs_next;
|
||||
let s_sigmas = &proof.openings.plonk_sigmas;
|
||||
let partial_products = &proof.openings.partial_products;
|
||||
|
||||
|
||||
@ -155,7 +155,7 @@ impl Buffer {
|
||||
self.write_field_ext_vec::<F, D>(&os.plonk_sigmas)?;
|
||||
self.write_field_ext_vec::<F, D>(&os.wires)?;
|
||||
self.write_field_ext_vec::<F, D>(&os.plonk_zs)?;
|
||||
self.write_field_ext_vec::<F, D>(&os.plonk_zs_right)?;
|
||||
self.write_field_ext_vec::<F, D>(&os.plonk_zs_next)?;
|
||||
self.write_field_ext_vec::<F, D>(&os.partial_products)?;
|
||||
self.write_field_ext_vec::<F, D>(&os.quotient_polys)
|
||||
}
|
||||
@ -172,7 +172,7 @@ impl Buffer {
|
||||
let plonk_sigmas = self.read_field_ext_vec::<F, D>(config.num_routed_wires)?;
|
||||
let wires = self.read_field_ext_vec::<F, D>(config.num_wires)?;
|
||||
let plonk_zs = self.read_field_ext_vec::<F, D>(config.num_challenges)?;
|
||||
let plonk_zs_right = self.read_field_ext_vec::<F, D>(config.num_challenges)?;
|
||||
let plonk_zs_next = self.read_field_ext_vec::<F, D>(config.num_challenges)?;
|
||||
let partial_products = self
|
||||
.read_field_ext_vec::<F, D>(common_data.num_partial_products * config.num_challenges)?;
|
||||
let quotient_polys = self.read_field_ext_vec::<F, D>(
|
||||
@ -183,7 +183,7 @@ impl Buffer {
|
||||
plonk_sigmas,
|
||||
wires,
|
||||
plonk_zs,
|
||||
plonk_zs_right,
|
||||
plonk_zs_next,
|
||||
partial_products,
|
||||
quotient_polys,
|
||||
})
|
||||
|
||||
@ -127,7 +127,7 @@ pub struct StarkOpeningSet<F: RichField + Extendable<D>, const D: usize> {
|
||||
pub local_values: Vec<F::Extension>,
|
||||
pub next_values: Vec<F::Extension>,
|
||||
pub permutation_zs: Option<Vec<F::Extension>>,
|
||||
pub permutation_zs_right: Option<Vec<F::Extension>>,
|
||||
pub permutation_zs_next: Option<Vec<F::Extension>>,
|
||||
pub quotient_polys: Vec<F::Extension>,
|
||||
}
|
||||
|
||||
@ -145,12 +145,12 @@ impl<F: RichField + Extendable<D>, const D: usize> StarkOpeningSet<F, D> {
|
||||
.map(|p| p.to_extension().eval(z))
|
||||
.collect::<Vec<_>>()
|
||||
};
|
||||
let zeta_right = zeta.scalar_mul(g);
|
||||
let zeta_next = zeta.scalar_mul(g);
|
||||
Self {
|
||||
local_values: eval_commitment(zeta, trace_commitment),
|
||||
next_values: eval_commitment(zeta_right, trace_commitment),
|
||||
next_values: eval_commitment(zeta_next, trace_commitment),
|
||||
permutation_zs: permutation_zs_commitment.map(|c| eval_commitment(zeta, c)),
|
||||
permutation_zs_right: permutation_zs_commitment.map(|c| eval_commitment(zeta_right, c)),
|
||||
permutation_zs_next: permutation_zs_commitment.map(|c| eval_commitment(zeta_next, c)),
|
||||
quotient_polys: eval_commitment(zeta, quotient_commitment),
|
||||
}
|
||||
}
|
||||
@ -165,16 +165,16 @@ impl<F: RichField + Extendable<D>, const D: usize> StarkOpeningSet<F, D> {
|
||||
.copied()
|
||||
.collect_vec(),
|
||||
};
|
||||
let zeta_right_batch = FriOpeningBatch {
|
||||
let zeta_next_batch = FriOpeningBatch {
|
||||
values: self
|
||||
.next_values
|
||||
.iter()
|
||||
.chain(self.permutation_zs_right.iter().flatten())
|
||||
.chain(self.permutation_zs_next.iter().flatten())
|
||||
.copied()
|
||||
.collect_vec(),
|
||||
};
|
||||
FriOpenings {
|
||||
batches: vec![zeta_batch, zeta_right_batch],
|
||||
batches: vec![zeta_batch, zeta_next_batch],
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -183,7 +183,7 @@ pub struct StarkOpeningSetTarget<const D: usize> {
|
||||
pub local_values: Vec<ExtensionTarget<D>>,
|
||||
pub next_values: Vec<ExtensionTarget<D>>,
|
||||
pub permutation_zs: Option<Vec<ExtensionTarget<D>>>,
|
||||
pub permutation_zs_right: Option<Vec<ExtensionTarget<D>>>,
|
||||
pub permutation_zs_next: Option<Vec<ExtensionTarget<D>>>,
|
||||
pub quotient_polys: Vec<ExtensionTarget<D>>,
|
||||
}
|
||||
|
||||
@ -198,16 +198,16 @@ impl<const D: usize> StarkOpeningSetTarget<D> {
|
||||
.copied()
|
||||
.collect_vec(),
|
||||
};
|
||||
let zeta_right_batch = FriOpeningBatchTarget {
|
||||
let zeta_next_batch = FriOpeningBatchTarget {
|
||||
values: self
|
||||
.next_values
|
||||
.iter()
|
||||
.chain(self.permutation_zs_right.iter().flatten())
|
||||
.chain(self.permutation_zs_next.iter().flatten())
|
||||
.copied()
|
||||
.collect_vec(),
|
||||
};
|
||||
FriOpeningsTarget {
|
||||
batches: vec![zeta_batch, zeta_right_batch],
|
||||
batches: vec![zeta_batch, zeta_next_batch],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ fn verify_stark_proof_with_challenges_circuit<
|
||||
local_values,
|
||||
next_values,
|
||||
permutation_zs,
|
||||
permutation_zs_right,
|
||||
permutation_zs_next,
|
||||
quotient_polys,
|
||||
} = &proof.openings;
|
||||
let vars = StarkEvaluationTargets {
|
||||
@ -120,7 +120,7 @@ fn verify_stark_proof_with_challenges_circuit<
|
||||
.uses_permutation_args()
|
||||
.then(|| PermutationCheckDataTarget {
|
||||
local_zs: permutation_zs.as_ref().unwrap().clone(),
|
||||
next_zs: permutation_zs_right.as_ref().unwrap().clone(),
|
||||
next_zs: permutation_zs_next.as_ref().unwrap().clone(),
|
||||
permutation_challenge_sets: challenges.permutation_challenge_sets.unwrap(),
|
||||
});
|
||||
|
||||
@ -250,7 +250,7 @@ fn add_stark_opening_set_target<F: RichField + Extendable<D>, S: Stark<F, D>, co
|
||||
permutation_zs: stark
|
||||
.uses_permutation_args()
|
||||
.then(|| builder.add_virtual_extension_targets(stark.num_permutation_batches(config))),
|
||||
permutation_zs_right: stark
|
||||
permutation_zs_next: stark
|
||||
.uses_permutation_args()
|
||||
.then(|| builder.add_virtual_extension_targets(stark.num_permutation_batches(config))),
|
||||
quotient_polys: builder
|
||||
@ -320,7 +320,7 @@ fn check_permutation_options<F: RichField + Extendable<D>, S: Stark<F, D>, const
|
||||
let options_is_some = [
|
||||
proof_with_pis.proof.permutation_zs_cap.is_some(),
|
||||
proof_with_pis.proof.openings.permutation_zs.is_some(),
|
||||
proof_with_pis.proof.openings.permutation_zs_right.is_some(),
|
||||
proof_with_pis.proof.openings.permutation_zs_next.is_some(),
|
||||
challenges.permutation_challenge_sets.is_some(),
|
||||
];
|
||||
ensure!(
|
||||
|
||||
@ -114,13 +114,13 @@ pub trait Stark<F: RichField + Extendable<D>, const D: usize>: Sync {
|
||||
]
|
||||
.concat(),
|
||||
};
|
||||
let zeta_right_batch = FriBatchInfo {
|
||||
let zeta_next_batch = FriBatchInfo {
|
||||
point: zeta.scalar_mul(g),
|
||||
polynomials: [trace_info, permutation_zs_info].concat(),
|
||||
};
|
||||
FriInstanceInfo {
|
||||
oracles: vec![no_blinding_oracle; oracle_indices.next().unwrap()],
|
||||
batches: vec![zeta_batch, zeta_right_batch],
|
||||
batches: vec![zeta_batch, zeta_next_batch],
|
||||
}
|
||||
}
|
||||
|
||||
@ -161,14 +161,14 @@ pub trait Stark<F: RichField + Extendable<D>, const D: usize>: Sync {
|
||||
]
|
||||
.concat(),
|
||||
};
|
||||
let zeta_right = builder.mul_const_extension(g, zeta);
|
||||
let zeta_right_batch = FriBatchInfoTarget {
|
||||
point: zeta_right,
|
||||
let zeta_next = builder.mul_const_extension(g, zeta);
|
||||
let zeta_next_batch = FriBatchInfoTarget {
|
||||
point: zeta_next,
|
||||
polynomials: [trace_info, permutation_zs_info].concat(),
|
||||
};
|
||||
FriInstanceInfoTarget {
|
||||
oracles: vec![no_blinding_oracle; oracle_indices.next().unwrap()],
|
||||
batches: vec![zeta_batch, zeta_right_batch],
|
||||
batches: vec![zeta_batch, zeta_next_batch],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@ where
|
||||
local_values,
|
||||
next_values,
|
||||
permutation_zs,
|
||||
permutation_zs_right,
|
||||
permutation_zs_next,
|
||||
quotient_polys,
|
||||
} = &proof.openings;
|
||||
let vars = StarkEvaluationVars {
|
||||
@ -93,7 +93,7 @@ where
|
||||
);
|
||||
let permutation_data = stark.uses_permutation_args().then(|| PermutationCheckVars {
|
||||
local_zs: permutation_zs.as_ref().unwrap().clone(),
|
||||
next_zs: permutation_zs_right.as_ref().unwrap().clone(),
|
||||
next_zs: permutation_zs_next.as_ref().unwrap().clone(),
|
||||
permutation_challenge_sets: challenges.permutation_challenge_sets.unwrap(),
|
||||
});
|
||||
eval_vanishing_poly::<F, F::Extension, F::Extension, C, S, D, D>(
|
||||
@ -171,7 +171,7 @@ fn check_permutation_options<
|
||||
let options_is_some = [
|
||||
proof_with_pis.proof.permutation_zs_cap.is_some(),
|
||||
proof_with_pis.proof.openings.permutation_zs.is_some(),
|
||||
proof_with_pis.proof.openings.permutation_zs_right.is_some(),
|
||||
proof_with_pis.proof.openings.permutation_zs_next.is_some(),
|
||||
challenges.permutation_challenge_sets.is_some(),
|
||||
];
|
||||
ensure!(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user