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 1b822c0c9f5..934fe8753af 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 @@ -57,54 +57,3 @@ fn test_total_tx_limits_less_than_max_sierra_gas() { <= MAX_POSSIBLE_SIERRA_GAS ); } - -// TODO (AvivG) move this test to Transaction executor - -// #[cfg(feature = "cairo_native")] -// #[cfg(feature = "cairo_native")] -// use crate::context::ChainInfo; -// #[cfg(feature = "cairo_native")] -// use crate::test_utils::initial_test_state::test_state; -// #[cfg(feature = "cairo_native")] -// use crate::test_utils::BALANCE; -// #[rstest::rstest] -// #[case(MAX_POSSIBLE_SIERRA_GAS, MAX_POSSIBLE_SIERRA_GAS - 2681170910)] -// #[case(MAX_POSSIBLE_SIERRA_GAS / 10, 81886490)] -// #[case(MAX_POSSIBLE_SIERRA_GAS / 100, 8190940)] -// #[case(MAX_POSSIBLE_SIERRA_GAS / 1000, 822890)] -// #[case(MAX_POSSIBLE_SIERRA_GAS / 10000, 85440)] -// #[case(MAX_POSSIBLE_SIERRA_GAS / 100000, 12340)] -// #[case(MAX_POSSIBLE_SIERRA_GAS / 1000000, 0)] -// #[case(350, 0)] -// #[case(35, 0)] -// #[case(0, 0)] -// /// Tests that Native can handle deep recursion calls without overflowing the stack. -// /// Note that the recursive function must be complicated, since the compiler might transform -// /// simple recursions into loops. The tested function was manually tested with higher gas and -// /// reached stack overflow. -// /// -// /// Also, there is no need to test the VM here since it doesn't use the stack. -// fn test_stack_overflow(#[case] initial_gas: u64, #[case] gas_consumed: u64) { -// let test_contract = -// FeatureContract::TestContract(CairoVersion::Cairo1(RunnableCairo1::Native)); let mut state = -// test_state(&ChainInfo::create_for_testing(), BALANCE, &[(test_contract, 1)]); - -// let depth = felt!(1000000_u128); -// let entry_point_call = CallEntryPoint { -// calldata: calldata![depth], -// entry_point_selector: selector_from_name("test_stack_overflow"), -// initial_gas, -// ..trivial_external_entry_point_new(test_contract) -// }; -// let call_info = entry_point_call.execute_directly(&mut state).unwrap(); -// assert_eq!( -// call_info.execution, -// CallExecution { -// // 'Out of gas' -// retdata: retdata![felt!["0x4f7574206f6620676173"]], -// gas_consumed, -// failed: true, -// ..Default::default() -// } -// ); -// }