diff --git a/crates/blockifier/src/execution/execution_utils.rs b/crates/blockifier/src/execution/execution_utils.rs index 593b3aaa71e..e303a2f62ad 100644 --- a/crates/blockifier/src/execution/execution_utils.rs +++ b/crates/blockifier/src/execution/execution_utils.rs @@ -339,7 +339,7 @@ pub fn execute_deployment( context.revert_infos.0.push(EntryPointRevertInfo::new( deployed_contract_address, - current_class_hash, + ClassHash::default(), context.n_emitted_events, context.n_sent_messages_to_l1, )); diff --git a/crates/blockifier/src/execution/syscalls/syscall_base.rs b/crates/blockifier/src/execution/syscalls/syscall_base.rs index 2497f0b7069..7f8b4210bba 100644 --- a/crates/blockifier/src/execution/syscalls/syscall_base.rs +++ b/crates/blockifier/src/execution/syscalls/syscall_base.rs @@ -456,6 +456,10 @@ impl<'state> SyscallHandlerBase<'state> { let reverted_call = &mut self.inner_calls.last_mut().unwrap(); let mut stack: Vec<&mut CallInfo> = vec![reverted_call]; while let Some(call_info) = stack.pop() { + // TODO(Dori): consider not clearing at all, and simply rely on the failed flag to + // compute the correct events and l2_to_l1_messages in a subtree. Or, we can simply + // clear these when the tx execution is finalized, once, and not per failure point. + // Or, just document this properly... call_info.execution.events.clear(); call_info.execution.l2_to_l1_messages.clear(); // Add inner calls that did not fail to the stack. diff --git a/crates/blockifier/src/transaction/l1_handler_transaction.rs b/crates/blockifier/src/transaction/l1_handler_transaction.rs index 28d2203f021..71dee6550a6 100644 --- a/crates/blockifier/src/transaction/l1_handler_transaction.rs +++ b/crates/blockifier/src/transaction/l1_handler_transaction.rs @@ -97,6 +97,7 @@ impl ExecutableTransaction for L1HandlerTransaction { match fee_check_report { Ok(()) => { // Post-execution check passed, commit the execution. + // TODO(Dori): why commit here instead of first checking the paid fee? execution_state.commit(); // TODO(Arni): Consider removing this check. It is covered by the starknet // core contract.