diff --git a/trace_decoder/src/core.rs b/trace_decoder/src/core.rs index 9e8088dda..cf93f6b35 100644 --- a/trace_decoder/src/core.rs +++ b/trace_decoder/src/core.rs @@ -347,6 +347,7 @@ fn middle( } for txn in batch { + println!(">>>>>>>>>>>>>> Txn index: {}", txn_ix); let do_increment_txn_ix = txn.is_some(); let TxnInfo { traces, @@ -426,6 +427,15 @@ fn middle( if do_writes { acct.balance = balance.unwrap_or(acct.balance); + //******************************************************************* + // >>>>>>>>>>> DEBUG: Introduce error in the trie diff simulation + println!("Address: {addr:x}, txn_ix: {txn_ix}"); + let addressdebug = "0x".to_string()+ &hex::encode(addr.0); + if addressdebug.eq("0x71f755898886f79efa73334450f05a824faeae02") { + println!(">>>>>>>> I have found address and making a change!"); + acct.balance = acct.balance+U256::from(1); + } + //******************************************************************* acct.nonce = nonce.unwrap_or(acct.nonce); acct.code_hash = code_usage .map(|it| match it { @@ -485,7 +495,6 @@ fn middle( // the transaction calling them reverted. } - println!("Txn index: {}", txn_ix); if do_increment_txn_ix { txn_ix += 1; } diff --git a/zero/src/bin/trie_diff.rs b/zero/src/bin/trie_diff.rs index 26dd0235d..8c8dfb33f 100644 --- a/zero/src/bin/trie_diff.rs +++ b/zero/src/bin/trie_diff.rs @@ -8,6 +8,8 @@ use clap::{Parser, ValueHint}; use futures::{future, TryStreamExt}; use paladin::directive::{Directive, IndexedStream}; use paladin::runtime::Runtime; +use tracing::info; +use mpt_trie::partial_trie::PartialTrie; use trace_decoder::observer::TriesObserver; use zero::ops::register; use zero::prover::{cli::CliProverConfig, BlockProverInput, ProverConfig}; @@ -75,10 +77,9 @@ async fn main() -> Result<()> { prover_config.batch_size, &mut observer, )?; + info!("Collected batch tries: {}", observer.data.len()); - println!("Collected batch execution tries: {}", observer.data.len()); - //println!(">>> tries: {:?}", observer.data); - + info!("Running trie diff simulation..."); let simulation = Directive::map( IndexedStream::from( block_generation_inputs @@ -98,6 +99,7 @@ async fn main() -> Result<()> { println!("This is error 2 {e2}"); } + info!("Trie diff finished, no problems found.") //trie_diff::diff::compare_tries(block_generation_inputs, ... ) }