From 194763be5bc538e5089baa452c0e6f197a019f3c Mon Sep 17 00:00:00 2001 From: Alex Ostrovski Date: Mon, 27 Jan 2025 12:54:40 +0200 Subject: [PATCH] Fix gas generation for fuzzing --- crates/vm2/src/single_instruction_test/callframe.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/crates/vm2/src/single_instruction_test/callframe.rs b/crates/vm2/src/single_instruction_test/callframe.rs index a0bf23c..e4d8b73 100644 --- a/crates/vm2/src/single_instruction_test/callframe.rs +++ b/crates/vm2/src/single_instruction_test/callframe.rs @@ -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}; @@ -40,8 +39,7 @@ impl<'a, T: Tracer, W: World> Arbitrary<'a> for Callframe { 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,