Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
interaction_chunk_size should be part of PK instead of VK
Browse files Browse the repository at this point in the history
nyunyunyunyu committed Oct 4, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 16ba713 commit 576cf55
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion stark-backend/src/keygen/v2/mod.rs
Original file line number Diff line number Diff line change
@@ -167,12 +167,12 @@ impl<'a, SC: StarkGenericConfig> AirKeygenBuilder<'a, SC> {
params,
symbolic_constraints,
quotient_degree,
interaction_chunk_size,
};
StarkProvingKeyV2 {
air_name,
vk,
preprocessed_data: prep_prover_data,
interaction_chunk_size,
}
}

4 changes: 2 additions & 2 deletions stark-backend/src/keygen/v2/types.rs
Original file line number Diff line number Diff line change
@@ -31,8 +31,6 @@ pub struct StarkVerifyingKeyV2<SC: StarkGenericConfig> {
/// The factor to multiple the trace degree by to get the degree of the quotient polynomial. Determined from the max constraint degree of the AIR constraints.
/// This is equivalently the number of chunks the quotient polynomial is split into.
pub quotient_degree: usize,
/// Number of interactions to bundle in permutation trace
pub interaction_chunk_size: usize,
}

/// Common verifying key for multiple AIRs.
@@ -61,6 +59,8 @@ pub struct StarkProvingKeyV2<SC: StarkGenericConfig> {
pub vk: StarkVerifyingKeyV2<SC>,
/// Prover only data for preprocessed trace
pub preprocessed_data: Option<ProverOnlySinglePreprocessedData<SC>>,
/// Number of interactions to bundle in permutation trace
pub interaction_chunk_size: usize,
}

/// Common proving key for multiple AIRs.
2 changes: 1 addition & 1 deletion stark-backend/src/prover/quotient/helper.rs
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ impl<SC: StarkGenericConfig> QuotientVKDataHelper<SC> for StarkProvingKeyV2<SC>
fn get_quotient_vk_data(&self) -> QuotientVKData<SC> {
QuotientVKData {
quotient_degree: self.vk.quotient_degree,
interaction_chunk_size: self.vk.interaction_chunk_size,
interaction_chunk_size: self.interaction_chunk_size,
symbolic_constraints: &self.vk.symbolic_constraints,
}
}
2 changes: 1 addition & 1 deletion stark-backend/src/prover/v2/trace.rs
Original file line number Diff line number Diff line change
@@ -125,7 +125,7 @@ where
main,
public_values,
Some(perm_challenges),
pk.vk.interaction_chunk_size,
pk.interaction_chunk_size,
)
})
.collect::<Vec<_>>()

0 comments on commit 576cf55

Please sign in to comment.