Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(starky): observe public inputs #1607

Merged
merged 1 commit into from
Jul 3, 2024
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
2 changes: 2 additions & 0 deletions starky/src/get_challenges.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ where
ignore_trace_cap: bool,
config: &StarkConfig,
) -> StarkProofChallenges<F, D> {
challenger.observe_elements(&self.public_inputs);
self.proof
.get_challenges(challenger, challenges, ignore_trace_cap, config)
}
Expand Down Expand Up @@ -302,6 +303,7 @@ impl<const D: usize> StarkProofWithPublicInputsTarget<D> {
C: GenericConfig<D, F = F>,
C::Hasher: AlgebraicHasher<F>,
{
challenger.observe_elements(&self.public_inputs);
self.proof
.get_challenges::<F, C>(builder, challenger, challenges, ignore_trace_cap, config)
}
Expand Down
1 change: 1 addition & 0 deletions starky/src/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ where

let trace_cap = trace_commitment.merkle_tree.cap.clone();
let mut challenger = Challenger::new();
challenger.observe_elements(public_inputs);
challenger.observe_cap(&trace_cap);

prove_with_commitment(
Expand Down