Skip to content

Commit

Permalink
Observe public inputs (0xPolygonZero#1607)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nashtare authored Jul 3, 2024
1 parent cedffae commit f5a5845
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
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

0 comments on commit f5a5845

Please sign in to comment.