Skip to content

Commit

Permalink
fix(blockifier): initial sierra gas max_execute in l1handler tx
Browse files Browse the repository at this point in the history
  • Loading branch information
aner-starkware committed Dec 22, 2024
1 parent 1d5a863 commit b1cce15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion crates/blockifier/src/transaction/transaction_execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ impl<U: UpdatableState> ExecutableTransaction<U> for L1HandlerTransaction {
let limit_steps_by_resources = false;
let mut context =
EntryPointExecutionContext::new_invoke(tx_context.clone(), limit_steps_by_resources);
let mut remaining_gas = tx_context.initial_sierra_gas().0;
// The Sierra gas limit for L1 handler transaction is set to max_execute_sierra_gas.
let mut remaining_gas = context.mode_sierra_gas_limit().0;
let execute_call_info = self.run_execute(state, &mut context, &mut remaining_gas)?;
let l1_handler_payload_size = self.payload_size();
let TransactionReceipt {
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 @@ -2354,7 +2354,7 @@ fn test_l1_handler(#[values(false, true)] use_kzg_da: bool) {
storage_address: contract_address,
caller_address: ContractAddress::default(),
call_type: CallType::Call,
initial_gas: initial_gas_amount_from_block_context(Some(block_context)).0,
initial_gas: block_context.versioned_constants.execute_max_sierra_gas.0,
},
execution: CallExecution {
retdata: Retdata(vec![value]),
Expand Down

0 comments on commit b1cce15

Please sign in to comment.