Skip to content

Commit

Permalink
stark-verify skaffold function
Browse files Browse the repository at this point in the history
  • Loading branch information
Okm165 committed Jan 10, 2024
1 parent a57e5c0 commit 1a96cd7
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/stark/stark_verify.cairo
Original file line number Diff line number Diff line change
@@ -1 +1,32 @@
use cairo_verifier::queries::queries::queries_to_points;
use cairo_verifier::domains::StarkDomains;
use cairo_verifier::fri::fri::{FriDecommitment, fri_verify};
use cairo_verifier::stark::{StarkUnsentCommitment, StarkWitness, StarkCommitment};

// STARK decommitment phase.
fn stark_verify(
queries: Span<felt252>,
commitment: StarkCommitment,
witness: StarkWitness,
stark_domains: StarkDomains,
) {
// First layer decommit.

// Compute query points.
let points = queries_to_points(queries, @stark_domains);

// Evaluate the FRI input layer at query points.
let eval_info = 0;
let oods_poly_evals = ArrayTrait::<felt252>::new();

// Decommit FRI.
let fri_decommitment = FriDecommitment {
values: oods_poly_evals.span(), points: points.span(),
};
fri_verify(
queries: queries,
commitment: commitment.fri,
decommitment: fri_decommitment,
witness: witness.fri_witness,
)
}

0 comments on commit 1a96cd7

Please sign in to comment.