11//! The reference state transition function.
22
3+ use crate :: cli:: state:: { DumpBlockResponse , GenesisAccountExt } ;
34use alloy_consensus:: { constants:: KECCAK_EMPTY , Header } ;
45use alloy_genesis:: { Genesis , GenesisAccount } ;
56use alloy_primitives:: B256 ;
67use alloy_rlp:: { Decodable , Encodable } ;
78use alloy_trie:: { HashBuilder , HashMap , Nibbles } ;
8- use color_eyre:: { eyre:: eyre, Result } ;
9+ use color_eyre:: { eyre:: eyre, owo_colors :: OwoColorize , Result } ;
910use itertools:: Itertools ;
1011use kona_mpt:: TrieAccount ;
1112use op_test_vectors:: execution:: { ExecutionEnvironment , ExecutionFixture , ExecutionResult } ;
@@ -22,8 +23,7 @@ use revm::{
2223 primitives:: { AccountInfo , Bytecode } ,
2324} ;
2425use std:: { collections:: BTreeMap , sync:: Arc } ;
25-
26- use crate :: cli:: state:: { DumpBlockResponse , GenesisAccountExt } ;
26+ use tracing:: info;
2727
2828/// The database for [STF].
2929type STFDB = CacheDB < EmptyDBTyped < ProviderError > > ;
@@ -159,12 +159,14 @@ impl STF {
159159 . collect :: < Result < Vec < _ > > > ( ) ?;
160160
161161 // Execute the block.
162+ info ! ( target: "stf" , "Executing block with {} transactions..." , txs. len( ) . cyan( ) ) ;
162163 let block_with_senders = BlockWithSenders :: new ( block, senders)
163164 . ok_or ( eyre ! ( "Error creating block with senders" ) ) ?;
164165 let execution_input = BlockExecutionInput :: new ( & block_with_senders, header. difficulty ) ;
165166 let BlockExecutionOutput {
166167 state, receipts, ..
167168 } = executor. execute ( execution_input) ?;
169+ info ! ( target: "stf" , "✅ Block successfully executed." ) ;
168170
169171 // Flush the bundle state updates to the in-memory database.
170172 let alloc_db = self . db . clone ( ) ;
@@ -207,6 +209,13 @@ impl STF {
207209 . expect ( "Number is in range" ) ;
208210 let transactions_root = reth_primitives:: proofs:: calculate_transaction_root ( & txs) ;
209211
212+ // Log the execution fixture results.
213+ let ind = "~>" . magenta ( ) . italic ( ) . to_string ( ) ;
214+ info ! ( target: "stf" , "{} State root: {}" , ind, root. cyan( ) ) ;
215+ info ! ( target: "stf" , "{} Transactions root: {}" , ind, transactions_root. cyan( ) ) ;
216+ info ! ( target: "stf" , "{} Receipts root: {}" , ind, receipts_root. cyan( ) ) ;
217+ info ! ( target: "stf" , "{} Logs bloom: {}" , ind, logs_bloom. cyan( ) ) ;
218+
210219 Ok ( ExecutionFixture {
211220 env : ExecutionEnvironment {
212221 current_coinbase : header. beneficiary ,
0 commit comments