Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions plonky2/src/iop/challenger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,16 @@ impl<F: RichField + Extendable<D>, H: AlgebraicHasher<F>, const D: usize>
self.get_n_challenges(builder, D).try_into().unwrap()
}

pub fn get_n_extension_challenges(
&mut self,
builder: &mut CircuitBuilder<F, D>,
n: usize,
) -> Vec<ExtensionTarget<D>> {
(0..n)
.map(|_| self.get_extension_challenge(builder))
.collect()
}

/// Absorb any buffered inputs. After calling this, the input buffer will be empty, and the
/// output buffer will be full.
fn absorb_buffered_inputs(&mut self, builder: &mut CircuitBuilder<F, D>) {
Expand Down
2 changes: 1 addition & 1 deletion starky/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ impl StarkConfig {
}

/// Observes this [`StarkConfig`] for the given [`Challenger`].
pub(crate) fn observe<F: RichField, H: Hasher<F>>(&self, challenger: &mut Challenger<F, H>) {
pub fn observe<F: RichField, H: Hasher<F>>(&self, challenger: &mut Challenger<F, H>) {
challenger.observe_element(F::from_canonical_usize(self.security_bits));
challenger.observe_element(F::from_canonical_usize(self.num_challenges));

Expand Down
17 changes: 9 additions & 8 deletions starky/src/cross_table_lookup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ impl<'a, F: RichField + Extendable<D>, const D: usize>
total_num_helper_columns: usize,
num_helper_ctl_columns: &[usize],
) -> Vec<Self> {
// Get all cross-table lookup polynomial openings for the provided STARK proof.
// Get all cross-table lookup polynomial openings for the provided STARK opening set.
let ctl_zs = {
let auxiliary_polys = proof
.openings
Expand Down Expand Up @@ -647,7 +647,7 @@ pub struct CtlCheckVarsTarget<F: Field, const D: usize> {
}

impl<'a, F: Field, const D: usize> CtlCheckVarsTarget<F, D> {
/// Circuit version of `from_proofs`, for a single STARK.
/// Circuit version of `from_proof`, for a single STARK.
pub fn from_proof(
table: TableIdx,
proof: &StarkProofTarget<D>,
Expand All @@ -657,19 +657,20 @@ impl<'a, F: Field, const D: usize> CtlCheckVarsTarget<F, D> {
total_num_helper_columns: usize,
num_helper_ctl_columns: &[usize],
) -> Vec<Self> {
// Get all cross-table lookup polynomial openings for each STARK proof.
// Get all cross-table lookup polynomial openings.
let ctl_zs = {
let openings = &proof.openings;
let ctl_zs = openings
let ctl_zs = proof
.openings
.auxiliary_polys
.as_ref()
.expect("We cannot have CTls without auxiliary polynomials.")
.expect("We cannot have CTLs without auxiliary polynomials.")
.iter()
.skip(num_lookup_columns);
let ctl_zs_next = openings
let ctl_zs_next = proof
.openings
.auxiliary_polys_next
.as_ref()
.expect("We cannot have CTls without auxiliary polynomials.")
.expect("We cannot have CTLs without auxiliary polynomials.")
.iter()
.skip(num_lookup_columns);
ctl_zs.zip(ctl_zs_next).collect::<Vec<_>>()
Expand Down
Loading
Loading