diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/call_contract.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/call_contract.rs index c7d050047bc..4439138b849 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/call_contract.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/call_contract.rs @@ -73,7 +73,7 @@ fn test_call_contract_that_panics() { test_case( FeatureContract::TestContract(CairoVersion::Native), FeatureContract::TestContract(CairoVersion::Native), - 189010; + 191870; "Call Contract between two contracts using Native" ) )] diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/deploy.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/deploy.rs index bca64ff2de0..67b35308af3 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/deploy.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/deploy.rs @@ -17,7 +17,7 @@ use crate::test_utils::{calldata_for_deploy_test, trivial_external_entry_point_n #[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), 205200;"VM")] #[cfg_attr( feature = "cairo_native", - test_case(FeatureContract::TestContract(CairoVersion::Native), 215310;"Native") + test_case(FeatureContract::TestContract(CairoVersion::Native), 216800;"Native") )] fn no_constructor(deployer_contract: FeatureContract, expected_gas: u64) { // TODO(Yoni): share the init code of the tests in this file. @@ -99,7 +99,7 @@ fn no_constructor_nonempty_calldata(deployer_contract: FeatureContract) { #[test_case(FeatureContract::TestContract(CairoVersion::Cairo1),214550, 4610;"VM")] #[cfg_attr( feature = "cairo_native", - test_case(FeatureContract::TestContract(CairoVersion::Native),233890, 13840;"Native") + test_case(FeatureContract::TestContract(CairoVersion::Native),236750, 15210;"Native") )] fn with_constructor( deployer_contract: FeatureContract, diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/emit_event.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/emit_event.rs index 9dde7b2c2f4..fa4fa52a9a8 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/emit_event.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/emit_event.rs @@ -28,7 +28,7 @@ const N_EMITTED_EVENTS: [Felt; 1] = [Felt::from_hex_unchecked("0x1")]; #[cfg_attr( feature = "cairo_native", - test_case(FeatureContract::TestContract(CairoVersion::Native), 57430; "Native") + test_case(FeatureContract::TestContract(CairoVersion::Native), 58930; "Native") )] #[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), 47330; "VM")] fn positive_flow(test_contract: FeatureContract, expected_gas: u64) { diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/keccak.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/keccak.rs index 9744a5dd333..b61a0d9d7f3 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/keccak.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/keccak.rs @@ -13,7 +13,7 @@ use crate::test_utils::{trivial_external_entry_point_new, CairoVersion, BALANCE} #[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), 254910; "VM")] #[cfg_attr( feature = "cairo_native", - test_case(FeatureContract::TestContract(CairoVersion::Native), 263740; "Native") + test_case(FeatureContract::TestContract(CairoVersion::Native), 265110; "Native") )] fn test_keccak(test_contract: FeatureContract, expected_gas: u64) { let chain_info = &ChainInfo::create_for_testing(); diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/library_call.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/library_call.rs index 7c0c88e7fab..4c42be13a59 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/library_call.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/library_call.rs @@ -31,7 +31,7 @@ use crate::versioned_constants::VersionedConstants; #[cfg_attr( feature = "cairo_native", - test_case(FeatureContract::TestContract(CairoVersion::Native), 186610; "Native") + test_case(FeatureContract::TestContract(CairoVersion::Native), 189470; "Native") )] #[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), REQUIRED_GAS_LIBRARY_CALL_TEST; "VM")] fn test_library_call(test_contract: FeatureContract, expected_gas: u64) { @@ -103,7 +103,7 @@ fn test_library_call_assert_fails(test_contract: FeatureContract) { #[cfg_attr( feature = "cairo_native", - test_case(FeatureContract::TestContract(CairoVersion::Native), 512510; "Native") + test_case(FeatureContract::TestContract(CairoVersion::Native), 518110; "Native") )] #[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), 475110; "VM")] fn test_nested_library_call(test_contract: FeatureContract, expected_gas: u64) { @@ -157,7 +157,7 @@ fn test_nested_library_call(test_contract: FeatureContract, expected_gas: u64) { class_hash: Some(test_class_hash), code_address: None, call_type: CallType::Delegate, - initial_gas: if_native(&test_contract)(9999258160, 9998985960), + initial_gas: if_native(&test_contract)(9999255300, 9998985960), ..trivial_external_entry_point_new(test_contract) }; let library_entry_point = CallEntryPoint { @@ -172,19 +172,19 @@ fn test_nested_library_call(test_contract: FeatureContract, expected_gas: u64) { class_hash: Some(test_class_hash), code_address: None, call_type: CallType::Delegate, - initial_gas: if_native(&test_contract)(9999418850, 9999136940), + initial_gas: if_native(&test_contract)(9999417480, 9999136940), ..trivial_external_entry_point_new(test_contract) }; let storage_entry_point = CallEntryPoint { calldata: calldata![felt!(key), felt!(value)], - initial_gas: if_native(&test_contract)(9999097590, 9998834320), + initial_gas: if_native(&test_contract)(9999093360, 9998834320), ..nested_storage_entry_point }; let first_storage_entry_point_resources = if_native(&test_contract)( ChargedResources { vm_resources: ExecutionResources::default(), - gas_for_fee: GasAmount(25920), + gas_for_fee: GasAmount(27290), }, ChargedResources::from_execution_resources(ExecutionResources { n_steps: 244, @@ -195,7 +195,7 @@ fn test_nested_library_call(test_contract: FeatureContract, expected_gas: u64) { let storage_entry_point_resources = if_native(&test_contract)( ChargedResources { vm_resources: ExecutionResources::default(), - gas_for_fee: GasAmount(25920), + gas_for_fee: GasAmount(27290), }, first_storage_entry_point_resources.clone(), ); @@ -210,7 +210,7 @@ fn test_nested_library_call(test_contract: FeatureContract, expected_gas: u64) { call: nested_storage_entry_point, execution: CallExecution { retdata: retdata![felt!(value + 1)], - gas_consumed: if_native(&test_contract)(25920, REQUIRED_GAS_STORAGE_READ_WRITE_TEST), + gas_consumed: if_native(&test_contract)(27290, REQUIRED_GAS_STORAGE_READ_WRITE_TEST), ..CallExecution::default() }, charged_resources: first_storage_entry_point_resources, @@ -223,7 +223,7 @@ fn test_nested_library_call(test_contract: FeatureContract, expected_gas: u64) { let library_call_resources = if_native(&test_contract)( ChargedResources { vm_resources: ExecutionResources::default(), - gas_for_fee: GasAmount(186610), + gas_for_fee: GasAmount(189470), }, ChargedResources::from_execution_resources( &get_syscall_resources(SyscallSelector::LibraryCall) @@ -239,7 +239,7 @@ fn test_nested_library_call(test_contract: FeatureContract, expected_gas: u64) { call: library_entry_point, execution: CallExecution { retdata: retdata![felt!(value + 1)], - gas_consumed: if_native(&test_contract)(186610, REQUIRED_GAS_LIBRARY_CALL_TEST), + gas_consumed: if_native(&test_contract)(189470, REQUIRED_GAS_LIBRARY_CALL_TEST), ..CallExecution::default() }, charged_resources: library_call_resources, @@ -252,7 +252,7 @@ fn test_nested_library_call(test_contract: FeatureContract, expected_gas: u64) { call: storage_entry_point, execution: CallExecution { retdata: retdata![felt!(value)], - gas_consumed: if_native(&test_contract)(25920, REQUIRED_GAS_STORAGE_READ_WRITE_TEST), + gas_consumed: if_native(&test_contract)(27290, REQUIRED_GAS_STORAGE_READ_WRITE_TEST), ..CallExecution::default() }, charged_resources: storage_entry_point_resources, @@ -265,7 +265,7 @@ fn test_nested_library_call(test_contract: FeatureContract, expected_gas: u64) { let main_call_resources = if_native(&test_contract)( ChargedResources { vm_resources: ExecutionResources::default(), - gas_for_fee: GasAmount(512510), + gas_for_fee: GasAmount(518110), }, ChargedResources::from_execution_resources( &(&get_syscall_resources(SyscallSelector::LibraryCall) * 3) diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/send_message_to_l1.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/send_message_to_l1.rs index 0fa63e65e58..d988ffeee03 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/send_message_to_l1.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/send_message_to_l1.rs @@ -15,7 +15,7 @@ use crate::test_utils::{trivial_external_entry_point_new, CairoVersion, BALANCE} #[cfg_attr( feature = "cairo_native", - test_case(FeatureContract::TestContract(CairoVersion::Native), 30680; "Native") + test_case(FeatureContract::TestContract(CairoVersion::Native), 32160; "Native") )] #[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), 20960; "VM")] fn test_send_message_to_l1(test_contract: FeatureContract, expected_gas: u64) { diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/sha256.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/sha256.rs index a266fb35016..0b10cdddf01 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/sha256.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/sha256.rs @@ -12,7 +12,7 @@ use crate::test_utils::{trivial_external_entry_point_new, CairoVersion, BALANCE} #[cfg_attr( feature = "cairo_native", - test_case(FeatureContract::TestContract(CairoVersion::Native), 890255; "Native") + test_case(FeatureContract::TestContract(CairoVersion::Native), 891625; "Native") )] #[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), 881425; "VM")] fn test_sha256(test_contract: FeatureContract, gas_consumed: u64) { diff --git a/crates/blockifier/src/execution/syscalls/syscall_tests/storage_read_write.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/storage_read_write.rs index 5368e047db4..bebde966a44 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/storage_read_write.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/storage_read_write.rs @@ -15,7 +15,7 @@ use crate::test_utils::{trivial_external_entry_point_new, CairoVersion, BALANCE} #[cfg_attr( feature = "cairo_native", - test_case(FeatureContract::TestContract(CairoVersion::Native), 25920; "Native") + test_case(FeatureContract::TestContract(CairoVersion::Native), 27290; "Native") )] #[test_case(FeatureContract::TestContract(CairoVersion::Cairo1), REQUIRED_GAS_STORAGE_READ_WRITE_TEST; "VM")] fn test_storage_read_write(test_contract: FeatureContract, expected_gas: u64) {