Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions crates/blockifier/src/bouncer_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -775,11 +775,11 @@ fn class_hash_migration_data_from_state(

if should_migrate {
expect![[r#"
105350389
109782378
"#]]
.assert_debug_eq(&migration_sierra_gas.0);
expect![[r#"
254431248
265958264
"#]]
.assert_debug_eq(&migration_proving_gas.0);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ impl<S: StateReader> TestSetup<S> {
self.calldata.push(
expected_resource_bounds.into_iter().chain(expected_unsupported_fields).collect(),
);
self.calldata.push(proof_facts_as_cairo_array(proof_facts));

if self.entry_point_selector == selector_from_name("test_get_execution_info_v3") {
self.calldata.push(proof_facts_as_cairo_array(proof_facts));
}
}
}

Expand Down Expand Up @@ -170,6 +173,7 @@ fn create_test_setup(
tx_version: TransactionVersion,
flags: &ExecutionInfoTestFlags,
class_hash_override: Option<starknet_api::core::ClassHash>,
entry_point_name: &str,
) -> TestSetup<DictStateReader> {
let ExecutionInfoTestFlags {
only_query,
Expand Down Expand Up @@ -270,7 +274,7 @@ fn create_test_setup(
};

// Build expected calldata (what the contract expects to receive via execution info).
let entry_point_selector = selector_from_name("test_get_execution_info");
let entry_point_selector = selector_from_name(entry_point_name);

let expected_call_info = vec![
felt!(0_u16), // Caller address.
Expand Down Expand Up @@ -323,10 +327,12 @@ fn test_get_execution_info(
#[case] tx_version: TransactionVersion,
#[case] only_query: bool,
#[values(ExecutionMode::Validate, ExecutionMode::Execute)] execution_mode: ExecutionMode,
#[values("test_get_execution_info_v3", "test_get_execution_info_v2")] entry_point_name: &str,
) {
let contract = FeatureContract::TestContract(CairoVersion::Cairo1(runnable));
let flags = ExecutionInfoTestFlags { only_query, ..Default::default() };
let mut setup = create_test_setup(contract, execution_mode, tx_version, &flags, None);
let mut setup =
create_test_setup(contract, execution_mode, tx_version, &flags, None, entry_point_name);
setup.extend_calldata_for_post_v1_execution_info_syscall();
setup.execute_and_assert();
}
Expand Down Expand Up @@ -386,6 +392,7 @@ fn test_execution_info_v1_syscall(
tx_version,
&ExecutionInfoTestFlags::default(),
None,
"test_get_execution_info",
);
setup.execute_and_assert();
}
Expand Down Expand Up @@ -427,6 +434,7 @@ fn test_v1_bound_account_get_execution_info(
TransactionVersion::THREE,
&flags,
Some(class_hash),
"test_get_execution_info_v3",
);
setup.extend_calldata_for_post_v1_execution_info_syscall();
setup.execute_and_assert();
Expand Down Expand Up @@ -455,6 +463,7 @@ fn test_exclude_l1_data_gas_get_execution_info(
TransactionVersion::THREE,
&flags,
Some(class_hash),
"test_get_execution_info_v3",
);
setup.extend_calldata_for_post_v1_execution_info_syscall();
setup.execute_and_assert();
Expand Down
2 changes: 1 addition & 1 deletion crates/blockifier/src/transaction/transactions_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2638,7 +2638,7 @@ fn test_only_query_flag(
&block_context.chain_info,
CairoVersion::Cairo1(RunnableCairo1::Casm),
);
let entry_point_selector = selector_from_name("test_get_execution_info");
let entry_point_selector = selector_from_name("test_get_execution_info_v3");
let expected_execution_info = ExpectedExecutionInfo::new(
only_query,
account_address,
Expand Down
Loading
Loading