Skip to content

Commit

Permalink
split required split proposal
Browse files Browse the repository at this point in the history
  • Loading branch information
Okm165 committed Apr 9, 2024
1 parent fd0049b commit 4f6ecff
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/stark.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ struct StarkProof {
#[generate_trait]
impl StarkProofImpl of StarkProofTrait {
fn verify(self: @StarkProof, security_bits: felt252) {
// --- BEGIN STEP 1 --- (StarkConfig, PublicInput, StarkUnsentCommitment) -> (queries, stark_commitment, stark_domains)
// Validate config.
self.config.validate(security_bits);

Expand All @@ -101,7 +102,14 @@ impl StarkProofImpl of StarkProofTrait {
(*self.config.n_queries).try_into().unwrap(),
stark_domains.eval_domain_size.try_into().unwrap()
);
// --- END STEP 1 ---

// --- REQUIRED CONTEXT BETWEEN STEP1 & STEP2
// --- queries_hash: felt252
// --- stark_commitment_hash: felt252
// --- stark_domains_hash: felt252

// --- BEGIN STEP 2 --- (queries, stark_commitment, stark_domains, StarkWitness) -> (bool)
// STARK verify phase.
stark_verify::stark_verify(
NUM_COLUMNS_FIRST,
Expand All @@ -111,6 +119,7 @@ impl StarkProofImpl of StarkProofTrait {
*self.witness,
stark_domains
)
// --- END STEP 2 ---
}
}

Expand Down

0 comments on commit 4f6ecff

Please sign in to comment.