diff --git a/crates/blockifier/src/execution/entry_point.rs b/crates/blockifier/src/execution/entry_point.rs index a2b1482f53..3bebf7948e 100644 --- a/crates/blockifier/src/execution/entry_point.rs +++ b/crates/blockifier/src/execution/entry_point.rs @@ -154,7 +154,7 @@ impl EntryPointExecutionContext { Self::new(tx_context, ExecutionMode::Validate, limit_steps_by_resources) } - pub fn new_invoke( + pub fn new_execute( tx_context: Arc, limit_steps_by_resources: bool, ) -> TransactionExecutionResult { diff --git a/crates/blockifier/src/test_utils/struct_impls.rs b/crates/blockifier/src/test_utils/struct_impls.rs index 664041671c..55615c4b74 100644 --- a/crates/blockifier/src/test_utils/struct_impls.rs +++ b/crates/blockifier/src/test_utils/struct_impls.rs @@ -70,7 +70,7 @@ impl CallEntryPoint { let tx_context = TransactionContext { block_context: BlockContext::create_for_testing(), tx_info }; let mut context = - EntryPointExecutionContext::new_invoke(Arc::new(tx_context), limit_steps_by_resources) + EntryPointExecutionContext::new_execute(Arc::new(tx_context), limit_steps_by_resources) .unwrap(); self.execute(state, &mut ExecutionResources::default(), &mut context) } diff --git a/crates/blockifier/src/transaction/account_transaction.rs b/crates/blockifier/src/transaction/account_transaction.rs index 2395274b70..c36dfa557a 100644 --- a/crates/blockifier/src/transaction/account_transaction.rs +++ b/crates/blockifier/src/transaction/account_transaction.rs @@ -373,7 +373,7 @@ impl AccountTransaction { initial_gas: block_context.versioned_constants.os_constants.gas_costs.initial_gas_cost, }; - let mut context = EntryPointExecutionContext::new_invoke(tx_context, true)?; + let mut context = EntryPointExecutionContext::new_execute(tx_context, true)?; Ok(fee_transfer_call .execute(state, &mut ExecutionResources::default(), &mut context) @@ -455,7 +455,7 @@ impl AccountTransaction { )?; } else { let mut execution_context = - EntryPointExecutionContext::new_invoke(tx_context.clone(), charge_fee)?; + EntryPointExecutionContext::new_execute(tx_context.clone(), charge_fee)?; validate_call_info = self.handle_validate_tx( state, &mut resources, @@ -499,7 +499,7 @@ impl AccountTransaction { ) -> TransactionExecutionResult { let mut resources = ExecutionResources::default(); let mut execution_context = - EntryPointExecutionContext::new_invoke(tx_context.clone(), charge_fee)?; + EntryPointExecutionContext::new_execute(tx_context.clone(), charge_fee)?; // Run the validation, and if execution later fails, only keep the validation diff. let validate_call_info = self.handle_validate_tx( state, diff --git a/crates/blockifier/src/transaction/account_transactions_test.rs b/crates/blockifier/src/transaction/account_transactions_test.rs index 3f48297d15..59b20f404d 100644 --- a/crates/blockifier/src/transaction/account_transactions_test.rs +++ b/crates/blockifier/src/transaction/account_transactions_test.rs @@ -930,7 +930,7 @@ fn test_max_fee_to_max_steps_conversion( nonce: nonce_manager.next(account_address), }); let tx_context1 = Arc::new(block_context.to_tx_context(&account_tx1)); - let execution_context1 = EntryPointExecutionContext::new_invoke(tx_context1, true).unwrap(); + let execution_context1 = EntryPointExecutionContext::new_execute(tx_context1, true).unwrap(); let max_steps_limit1 = execution_context1.vm_run_resources.get_n_steps(); let tx_execution_info1 = account_tx1.execute(&mut state, &block_context, true, true).unwrap(); let n_steps1 = tx_execution_info1.receipt.resources.vm_resources.n_steps; @@ -950,7 +950,7 @@ fn test_max_fee_to_max_steps_conversion( nonce: nonce_manager.next(account_address), }); let tx_context2 = Arc::new(block_context.to_tx_context(&account_tx2)); - let execution_context2 = EntryPointExecutionContext::new_invoke(tx_context2, true).unwrap(); + let execution_context2 = EntryPointExecutionContext::new_execute(tx_context2, true).unwrap(); let max_steps_limit2 = execution_context2.vm_run_resources.get_n_steps(); let tx_execution_info2 = account_tx2.execute(&mut state, &block_context, true, true).unwrap(); let n_steps2 = tx_execution_info2.receipt.resources.vm_resources.n_steps; diff --git a/crates/blockifier/src/transaction/transaction_execution.rs b/crates/blockifier/src/transaction/transaction_execution.rs index f2fb174a84..b147169a4e 100644 --- a/crates/blockifier/src/transaction/transaction_execution.rs +++ b/crates/blockifier/src/transaction/transaction_execution.rs @@ -118,7 +118,7 @@ impl ExecutableTransaction for L1HandlerTransaction { let tx_context = Arc::new(block_context.to_tx_context(self)); let mut execution_resources = ExecutionResources::default(); - let mut context = EntryPointExecutionContext::new_invoke(tx_context.clone(), true)?; + let mut context = EntryPointExecutionContext::new_execute(tx_context.clone(), true)?; let mut remaining_gas = block_context.versioned_constants.tx_initial_gas(); let execute_call_info = self.run_execute(state, &mut execution_resources, &mut context, &mut remaining_gas)?; diff --git a/crates/papyrus_execution/src/lib.rs b/crates/papyrus_execution/src/lib.rs index cf33b85b2c..3e0d81bfd5 100644 --- a/crates/papyrus_execution/src/lib.rs +++ b/crates/papyrus_execution/src/lib.rs @@ -261,7 +261,7 @@ pub fn execute_call( override_kzg_da_to_false, )?; - let mut context = EntryPointExecutionContext::new_invoke( + let mut context = EntryPointExecutionContext::new_execute( // TODO(yair): fix when supporting v3 transactions Arc::new(TransactionContext { block_context,