diff --git a/crates/evm/src/evm/handler.rs b/crates/evm/src/evm/handler.rs index aa8b20290..2d3a47567 100644 --- a/crates/evm/src/evm/handler.rs +++ b/crates/evm/src/evm/handler.rs @@ -1,5 +1,5 @@ use std::cmp::Ordering; -use std::collections::{HashMap, HashSet}; +use std::collections::{BTreeMap, BTreeSet}; use std::mem::size_of; use std::sync::Arc; @@ -64,7 +64,7 @@ impl CitreaExternalExt for &mut T { pub(crate) struct CitreaExternal { l1_fee_rate: u128, current_tx_hash: Option, - tx_infos: HashMap, + tx_infos: BTreeMap, } impl CitreaExternal { @@ -391,10 +391,10 @@ fn calc_diff_size( nonce_changed: bool, code_changed: bool, balance_changed: bool, - storage_changes: HashSet<&'a U256>, + storage_changes: BTreeSet<&'a U256>, } - let mut account_changes: HashMap<&Address, AccountChange<'_>> = HashMap::new(); + let mut account_changes: BTreeMap<&Address, AccountChange<'_>> = BTreeMap::new(); for entry in &journal { match entry { diff --git a/crates/sovereign-sdk/adapters/risc0-bonsai/src/host.rs b/crates/sovereign-sdk/adapters/risc0-bonsai/src/host.rs index 4a8d6f850..b9ac82299 100644 --- a/crates/sovereign-sdk/adapters/risc0-bonsai/src/host.rs +++ b/crates/sovereign-sdk/adapters/risc0-bonsai/src/host.rs @@ -381,6 +381,13 @@ impl<'a> ZkvmHost for Risc0BonsaiHost<'a> { let mut executor = ExecutorImpl::from_elf(env, self.elf)?; let session = executor.run()?; + // don't delete useful while benchmarking + // println!( + // "user cycles: {}\ntotal cycles: {}\nsegments: {}", + // session.user_cycles, + // session.total_cycles, + // session.segments.len() + // ); let data = bincode::serialize(&session.journal.expect("Journal shouldn't be empty"))?; Ok(Proof::PublicInput(data))