Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
Don't let doctest quirks stop testing in release mode (0xPolygonZero#60)
Browse files Browse the repository at this point in the history
* chore: isolate conditional compilation of debug code

* chore: add CHANGELOG entry
  • Loading branch information
dvdplm authored Feb 28, 2024
1 parent 6530eeb commit 6f1438a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add verification for invalid jumps. [#36](https://github.com/0xPolygonZero/zk_evm/pull/36)
- Refactor accessed lists as sorted linked lists ([#30](https://github.com/0xPolygonZero/zk_evm/pull/30))
- Change visibility of `compact` mod ([#57](https://github.com/0xPolygonZero/zk_evm/pull/57))
- Fix running doctests in release mode ([#60](https://github.com/0xPolygonZero/zk_evm/pull/60))
- Fix block padding without withdrawals ([#63](https://github.com/0xPolygonZero/zk_evm/pull/63))
- Change position of empty node encoding in RLP segment ([#62](https://github.com/0xPolygonZero/zk_evm/pull/62))

Expand Down
8 changes: 4 additions & 4 deletions evm_arithmetization/src/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ use plonky2::plonk::config::GenericConfig;
use plonky2::timed;
use plonky2::util::timing::TimingTree;
use starky::config::StarkConfig;
#[cfg(debug_assertions)]
use starky::cross_table_lookup::debug_utils::check_ctls;
use starky::cross_table_lookup::{get_ctl_data, CtlData};
use starky::lookup::GrandProductChallengeSet;
use starky::proof::{MultiProof, StarkProofWithMetadata};
Expand All @@ -27,8 +25,6 @@ use crate::cpu::kernel::aggregator::KERNEL;
use crate::generation::{generate_traces, GenerationInputs};
use crate::get_challenges::observe_public_values;
use crate::proof::{AllProof, PublicValues};
#[cfg(debug_assertions)]
use crate::verifier::debug_utils::get_memory_extra_looking_values;

/// Generate traces, then create all STARK proofs.
pub fn prove<F, C, const D: usize>(
Expand Down Expand Up @@ -149,6 +145,10 @@ where
// enabled.
#[cfg(debug_assertions)]
{
use starky::cross_table_lookup::debug_utils::check_ctls;

use crate::verifier::debug_utils::get_memory_extra_looking_values;

let mut extra_values = HashMap::new();
extra_values.insert(
*Table::Memory,
Expand Down
1 change: 0 additions & 1 deletion evm_arithmetization/src/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ where
running_sum + challenge.combine(row.iter()).inverse()
}

#[cfg(debug_assertions)]
pub(crate) mod debug_utils {
use super::*;

Expand Down

0 comments on commit 6f1438a

Please sign in to comment.