Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sai-deng committed Oct 2, 2024
1 parent 9f8ec9e commit 503085b
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions evm_arithmetization/src/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,13 @@ fn verify_proof<F: RichField + Extendable<D>, C: GenericConfig<D, F = F>, const
all_stark: &AllStark<F, D>,
all_proof: AllProof<F, C, D>,
config: &StarkConfig,
use_keccak_tables: bool,
is_initial: bool,
) -> Result<()> {
let AllProofChallenges {
stark_challenges,
ctl_challenges,
} = all_proof
.get_challenges(config, use_keccak_tables)
.get_challenges(config, all_proof.use_keccak_tables)
.map_err(|_| anyhow::Error::msg("Invalid sampling of proof challenges."))?;

let num_lookup_columns = all_stark.num_lookups_helper_columns(config);
Expand Down Expand Up @@ -175,7 +174,7 @@ fn verify_proof<F: RichField + Extendable<D>, C: GenericConfig<D, F = F>, const
verify_table!(arithmetic_stark, Table::Arithmetic);
verify_table!(byte_packing_stark, Table::BytePacking);
verify_table!(cpu_stark, Table::Cpu);
if use_keccak_tables {
if all_proof.use_keccak_tables {
verify_table!(keccak_stark, Table::Keccak);
verify_table!(keccak_sponge_stark, Table::KeccakSponge);
}
Expand Down Expand Up @@ -428,24 +427,10 @@ pub mod testing {
) -> Result<()> {
assert!(!all_proofs.is_empty());

// TODO(sdeng): determine the value of `use_keccak_tables` from `all_proof`.
let use_keccak_tables = true;
verify_proof(
all_stark,
all_proofs[0].clone(),
config,
use_keccak_tables,
true,
)?;
verify_proof(all_stark, all_proofs[0].clone(), config, true)?;

for all_proof in &all_proofs[1..] {
verify_proof(
all_stark,
all_proof.clone(),
config,
use_keccak_tables,
false,
)?;
verify_proof(all_stark, all_proof.clone(), config, false)?;
}

Ok(())
Expand Down

0 comments on commit 503085b

Please sign in to comment.