Skip to content

Commit

Permalink
Fix test_only in zero_bin
Browse files Browse the repository at this point in the history
  • Loading branch information
LindaGuiga committed Jul 3, 2024
1 parent 54b360a commit da7902b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ KECCAK_CIRCUIT_SIZE=14..20
KECCAK_SPONGE_CIRCUIT_SIZE=9..15
LOGIC_CIRCUIT_SIZE=12..18
MEMORY_CIRCUIT_SIZE=17..28
MEMORY_BEFORE_CIRCUIT_SIZE=7..19
MEMORY_AFTER_CIRCUIT_SIZE=7..19
MEMORY_BEFORE_CIRCUIT_SIZE=7..23
MEMORY_AFTER_CIRCUIT_SIZE=7..27
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions zero_bin/ops/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,20 @@ impl Operation for SegmentProof {
type Output = ();

fn execute(&self, input: Self::Input) -> Result<Self::Output> {
let _span = TxProofSpan::new(&input);
let gen_input = input.0;
let _span = TxProofSpan::new(&gen_input);

if self.save_inputs_on_error {
evm_arithmetization::prover::testing::simulate_execution::<proof_gen::types::Field>(
input.clone(),
gen_input.clone(),
)
.map_err(|err| {
if let Err(write_err) = save_inputs_to_disk(
format!(
"b{}_txn_{}_input.log",
input.block_metadata.block_number, input.txn_number_before
gen_input.block_metadata.block_number, gen_input.txn_number_before
),
input,
gen_input,
) {
error!("Failed to save txn proof input to disk: {:?}", write_err);
}
Expand All @@ -85,7 +86,7 @@ impl Operation for SegmentProof {
})?;
} else {
evm_arithmetization::prover::testing::simulate_execution::<proof_gen::types::Field>(
input.0.clone(),
gen_input.clone(),
)
.map_err(|err| FatalError::from_anyhow(err, FatalStrategy::Terminate))?;
}
Expand Down
1 change: 1 addition & 0 deletions zero_bin/prover/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ categories.workspace = true
[dependencies]
serde = { workspace = true }
proof_gen = { workspace = true }
plonky2 = { workspace = true }
trace_decoder = { workspace = true }
tracing = { workspace = true }
paladin-core = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion zero_bin/prover/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ impl BlockProverInput {
max_cpu_len_log: usize,
_previous: Option<impl Future<Output = Result<GeneratedBlockProof>>>,
batch_size: usize,
save_inputs_on_error: bool,
_save_inputs_on_error: bool,
) -> Result<GeneratedBlockProof> {
use evm_arithmetization::prover::testing::simulate_all_segments_interpreter;
use plonky2::field::goldilocks_field::GoldilocksField;
Expand Down

0 comments on commit da7902b

Please sign in to comment.