From 8a48ebf7b51ec55ed3e114accb92d4b60d250152 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Thu, 14 Nov 2024 21:48:07 +0000 Subject: [PATCH] chore(blockifier): update expected gas in syscall tests for native --- .../syscalls/syscall_tests/call_contract.rs | 2 +- .../syscalls/syscall_tests/deploy.rs | 4 ++-- .../syscalls/syscall_tests/emit_event.rs | 2 +- .../syscalls/syscall_tests/get_block_hash.rs | 2 +- .../syscalls/syscall_tests/keccak.rs | 2 +- .../syscalls/syscall_tests/library_call.rs | 24 +++++++++---------- .../syscalls/syscall_tests/replace_class.rs | 2 +- .../syscall_tests/send_message_to_l1.rs | 2 +- .../syscalls/syscall_tests/sha256.rs | 2 +- .../syscall_tests/storage_read_write.rs | 2 +- 10 files changed, 22 insertions(+), 22 deletions(-) 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 419dd7c09f..cd34175b7a 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; + 190370; "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 9f7c62cd35..696a30fed5 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), 215200;"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),234550, 14610;"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 2da1e061d8..4eb3e599cf 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), 57330; "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/get_block_hash.rs b/crates/blockifier/src/execution/syscalls/syscall_tests/get_block_hash.rs index 360b124be1..4c044c530c 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_tests/get_block_hash.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_tests/get_block_hash.rs @@ -42,7 +42,7 @@ fn initialize_state(test_contract: FeatureContract) -> (CachedState