From ce7ce318be30ae5910148acfc6149ea083105b43 Mon Sep 17 00:00:00 2001 From: Aner Ben Efraim Date: Sun, 15 Dec 2024 22:58:16 +0200 Subject: [PATCH] test(blockifier): max validate\execute gas less than max possible sierra gas --- .../src/execution/syscalls/syscall_tests/out_of_gas.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/out_of_gas.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/out_of_gas.rs index f61213fe166..51a25a70c03 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/out_of_gas.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/out_of_gas.rs @@ -12,6 +12,7 @@ use crate::retdata; use crate::test_utils::contracts::FeatureContract; use crate::test_utils::initial_test_state::test_state; use crate::test_utils::{trivial_external_entry_point_new, CairoVersion, RunnableCairo1, BALANCE}; +use crate::versioned_constants::VersionedConstants; #[cfg_attr(feature = "cairo_native", test_case(RunnableCairo1::Native; "Native"))] #[test_case(RunnableCairo1::Casm; "VM")] @@ -54,6 +55,10 @@ fn test_stack_overflow() { let mut state = test_state(&ChainInfo::create_for_testing(), BALANCE, &[(test_contract, 1)]); let depth = felt!(1000000_u128); + assert!( + VersionedConstants::create_for_testing().initial_gas_no_user_l2_bound() + <= MAX_POSSIBLE_SIERRA_GAS + ); let entry_point_call = CallEntryPoint { calldata: calldata![depth], entry_point_selector: selector_from_name("test_stack_overflow"),