From a29f71cd672966b614105b5ed5682de60a6a560d Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Tue, 9 Apr 2024 11:50:23 +0200 Subject: [PATCH] refactor --- src/stark.cairo | 7 ------- src/stark/stark_verify.cairo | 11 +++++++++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/stark.cairo b/src/stark.cairo index 4f7881656..1258de83c 100644 --- a/src/stark.cairo +++ b/src/stark.cairo @@ -104,12 +104,6 @@ impl StarkProofImpl of StarkProofTrait { ); // --- 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, @@ -119,7 +113,6 @@ impl StarkProofImpl of StarkProofTrait { *self.witness, stark_domains ) - // --- END STEP 2 --- } } diff --git a/src/stark/stark_verify.cairo b/src/stark/stark_verify.cairo index 1fc6740b8..a08b7f48d 100644 --- a/src/stark/stark_verify.cairo +++ b/src/stark/stark_verify.cairo @@ -34,6 +34,13 @@ fn stark_verify( witness: StarkWitness, stark_domains: StarkDomains, ) { + // --- REQUIRED CONTEXT FOR SUBSTEP 1 + // --- queries_hash: felt252 + // --- commitment_hash: felt252 + // --- stark_domains_hash: felt252 + + // --- BEGIN SUBSTEP 1 --- (queries, commitment, stark_domains, Witness) -> (fri_decommitment) + // First layer decommit. traces_decommit( queries, commitment.traces, witness.traces_decommitment, witness.traces_witness @@ -70,12 +77,12 @@ fn stark_verify( values: oods_poly_evals.span(), points: points.span(), }; - // --- REQUIRED CONTEXT FOR SUBSTEP 1 + // --- REQUIRED CONTEXT FOR SUBSTEP 2 // --- queries_hash: felt252 // --- fri_commitment_hash: felt252 // --- fri_decommitment_hash: felt252 - // --- BEGIN SUBSTEP 1 --- (queries, fri_commitment, fri_decommitment, fri_witness) -> (bool) + // --- BEGIN SUBSTEP 2 --- (queries, fri_commitment, fri_decommitment, fri_witness) -> (bool) fri_verify( queries: queries, commitment: commitment.fri,