Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(blockifier): remove redundent comment of fn test_stack_overflow that was modved #3886

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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()
// }
// );
// }
Loading