diff --git a/core/lib/multivm/src/versions/era_vm/bootloader_state/state.rs b/core/lib/multivm/src/versions/era_vm/bootloader_state/state.rs index a97bccd661bd..04868422bf61 100644 --- a/core/lib/multivm/src/versions/era_vm/bootloader_state/state.rs +++ b/core/lib/multivm/src/versions/era_vm/bootloader_state/state.rs @@ -130,15 +130,16 @@ impl BootloaderState { memory } - pub(crate) fn last_l2_block(&self) -> &BootloaderL2Block { - self.l2_blocks.last().unwrap() - } pub(crate) fn get_pubdata_information(&self) -> &PubdataInput { self.pubdata_information .get() .expect("Pubdata information is not set") } + pub(crate) fn last_l2_block(&self) -> &BootloaderL2Block { + self.l2_blocks.last().unwrap() + } + fn last_mut_l2_block(&mut self) -> &mut BootloaderL2Block { self.l2_blocks.last_mut().unwrap() } diff --git a/core/lib/multivm/src/versions/era_vm/tests/get_used_contracts.rs b/core/lib/multivm/src/versions/era_vm/tests/get_used_contracts.rs index 8ec01ae8d0ae..494336be1a1f 100644 --- a/core/lib/multivm/src/versions/era_vm/tests/get_used_contracts.rs +++ b/core/lib/multivm/src/versions/era_vm/tests/get_used_contracts.rs @@ -1,6 +1,5 @@ use std::collections::HashSet; -use itertools::Itertools; use zksync_state::ReadStorage; use zksync_system_constants::CONTRACT_DEPLOYER_ADDRESS; use zksync_test_account::Account; diff --git a/core/lib/multivm/src/versions/era_vm/tests/tester/transaction_test_info.rs b/core/lib/multivm/src/versions/era_vm/tests/tester/transaction_test_info.rs index 96af0d214df0..d6b000bd9b9f 100644 --- a/core/lib/multivm/src/versions/era_vm/tests/tester/transaction_test_info.rs +++ b/core/lib/multivm/src/versions/era_vm/tests/tester/transaction_test_info.rs @@ -5,7 +5,7 @@ use era_vm::{ store::StorageKey, }; use zksync_state::ReadStorage; -use zksync_types::{ExecuteTransactionCommon, Transaction, H160, U256}; +use zksync_types::{ExecuteTransactionCommon, Transaction, U256}; use super::VmTester; use crate::{ @@ -213,11 +213,11 @@ impl Vm { state: VmStateDump { storage_changes: self.inner.state.storage_changes().clone(), transient_storage: self.inner.state.transient_storage().clone(), - l2_to_l1_logs: self.inner.state.l2_to_l1_logs().clone(), - events: self.inner.state.events().clone(), + l2_to_l1_logs: self.inner.state.l2_to_l1_logs().to_vec(), + events: self.inner.state.events().to_vec(), pubdata: self.inner.state.pubdata().clone(), - pubdata_costs: self.inner.state.pubdata_costs().clone(), - refunds: self.inner.state.refunds().clone(), + pubdata_costs: self.inner.state.pubdata_costs().to_vec(), + refunds: self.inner.state.refunds().to_vec(), decommitted_hashes: self.inner.state.decommitted_hashes().clone(), }, } diff --git a/core/lib/multivm/src/versions/era_vm/tests/utils.rs b/core/lib/multivm/src/versions/era_vm/tests/utils.rs index e1d69d53734d..bd5fd13ce6e0 100644 --- a/core/lib/multivm/src/versions/era_vm/tests/utils.rs +++ b/core/lib/multivm/src/versions/era_vm/tests/utils.rs @@ -19,10 +19,6 @@ use crate::vm_latest::CurrentExecutionState; pub(crate) static BASE_SYSTEM_CONTRACTS: Lazy = Lazy::new(BaseSystemContracts::load_from_disk); -pub fn lambda_storage_key_to_zk(key: StorageKey) -> ZKStorageKey { - ZKStorageKey::new(AccountTreeId::new(key.address), u256_to_h256(key.key)) -} - pub fn zk_storage_key_to_lambda(key: &ZKStorageKey) -> StorageKey { StorageKey { address: key.address().clone(), diff --git a/core/lib/multivm/src/versions/era_vm/vm.rs b/core/lib/multivm/src/versions/era_vm/vm.rs index 56283b71e7a3..af4dee3053a1 100644 --- a/core/lib/multivm/src/versions/era_vm/vm.rs +++ b/core/lib/multivm/src/versions/era_vm/vm.rs @@ -560,8 +560,8 @@ impl VmInterface for Vm { .map(|log| log.into_system_log()) .collect(), user_l2_to_l1_logs, - storage_refunds: state.refunds().clone(), - pubdata_costs: state.pubdata_costs().clone(), + storage_refunds: state.refunds().to_vec(), + pubdata_costs: state.pubdata_costs().to_vec(), } }