Skip to content

Commit

Permalink
Fix gas generation for fuzzing
Browse files Browse the repository at this point in the history
  • Loading branch information
slowli committed Jan 27, 2025
1 parent 5a0bd5f commit 194763b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions crates/vm2/src/single_instruction_test/callframe.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use arbitrary::Arbitrary;
use primitive_types::H160;
use zkevm_opcode_defs::EVM_SIMULATOR_STIPEND;
use zksync_vm2_interface::{HeapId, Tracer};

use super::stack::{Stack, StackPool};
Expand Down Expand Up @@ -40,8 +39,7 @@ impl<'a, T: Tracer, W: World<T>> Arbitrary<'a> for Callframe<T, W> {
is_kernel: is_kernel(address),
stack: Box::new(Stack::new_arbitrary(u, calldata_heap, base_page)?),
sp: u.arbitrary()?,
// It is assumed that it is always possible to add the stipend
gas: u.int_in_range(0..=u32::MAX - EVM_SIMULATOR_STIPEND)?,
gas: u.arbitrary()?,
near_calls: vec![],
pc: program.instruction(0).unwrap(),
program,
Expand Down

0 comments on commit 194763b

Please sign in to comment.