From 13f03ad4a6a49dc2b1e9010d641e0202b6f238d0 Mon Sep 17 00:00:00 2001 From: 0xaatif Date: Mon, 7 Oct 2024 16:42:00 +0100 Subject: [PATCH] trace_decoder::typed_mpt -> trace_decoder::tries --- trace_decoder/src/core.rs | 4 ++-- trace_decoder/src/lib.rs | 2 +- trace_decoder/src/observer.rs | 2 +- trace_decoder/src/{typed_mpt.rs => tries.rs} | 2 +- trace_decoder/src/type1.rs | 4 ++-- trace_decoder/src/type2.rs | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) rename trace_decoder/src/{typed_mpt.rs => tries.rs} (99%) diff --git a/trace_decoder/src/core.rs b/trace_decoder/src/core.rs index 8a07d98f4..ad2784e7b 100644 --- a/trace_decoder/src/core.rs +++ b/trace_decoder/src/core.rs @@ -21,10 +21,10 @@ use zk_evm_common::gwei_to_wei; use crate::{ observer::{DummyObserver, Observer}, - typed_mpt::StateSmt, + tries::StateSmt, }; use crate::{ - typed_mpt::{MptKey, ReceiptTrie, StateMpt, StateTrie, StorageTrie, TransactionTrie}, + tries::{MptKey, ReceiptTrie, StateMpt, StateTrie, StorageTrie, TransactionTrie}, BlockLevelData, BlockTrace, BlockTraceTriePreImages, CombinedPreImages, ContractCodeUsage, OtherBlockData, SeparateStorageTriesPreImage, SeparateTriePreImage, SeparateTriePreImages, TxnInfo, TxnMeta, TxnTrace, diff --git a/trace_decoder/src/lib.rs b/trace_decoder/src/lib.rs index eea5ebe80..057d11e89 100644 --- a/trace_decoder/src/lib.rs +++ b/trace_decoder/src/lib.rs @@ -56,9 +56,9 @@ mod interface; pub use interface::*; +mod tries; mod type1; mod type2; -mod typed_mpt; mod wire; pub use core::{entrypoint, WireDisposition}; diff --git a/trace_decoder/src/observer.rs b/trace_decoder/src/observer.rs index 320019e55..f9811e87c 100644 --- a/trace_decoder/src/observer.rs +++ b/trace_decoder/src/observer.rs @@ -4,7 +4,7 @@ use std::marker::PhantomData; use ethereum_types::{H256, U256}; use crate::core::IntraBlockTries; -use crate::typed_mpt::{ReceiptTrie, StorageTrie, TransactionTrie}; +use crate::tries::{ReceiptTrie, StorageTrie, TransactionTrie}; /// Observer API for the trace decoder. /// Observer is used to collect various debugging and metadata info diff --git a/trace_decoder/src/typed_mpt.rs b/trace_decoder/src/tries.rs similarity index 99% rename from trace_decoder/src/typed_mpt.rs rename to trace_decoder/src/tries.rs index 4c8e5a6c8..fb7f37f83 100644 --- a/trace_decoder/src/typed_mpt.rs +++ b/trace_decoder/src/tries.rs @@ -1,4 +1,4 @@ -//! Principled MPT types used in this library. +//! Principled trie types and abstractions used in this library. use core::fmt; use std::{cmp, collections::BTreeMap, marker::PhantomData}; diff --git a/trace_decoder/src/type1.rs b/trace_decoder/src/type1.rs index 96f49d94d..c44beaec7 100644 --- a/trace_decoder/src/type1.rs +++ b/trace_decoder/src/type1.rs @@ -12,7 +12,7 @@ use mpt_trie::partial_trie::OnOrphanedHashNode; use nunny::NonEmpty; use u4::U4; -use crate::typed_mpt::{MptKey, StateMpt, StorageTrie}; +use crate::tries::{MptKey, StateMpt, StorageTrie}; use crate::wire::{Instruction, SmtLeaf}; #[derive(Debug, Clone)] @@ -379,7 +379,7 @@ fn finish_stack(v: &mut Vec) -> anyhow::Result { #[test] fn test_tries() { - use crate::typed_mpt::StateTrie as _; + use crate::tries::StateTrie as _; for (ix, case) in serde_json::from_str::>(include_str!("cases/zero_jerigon.json")) diff --git a/trace_decoder/src/type2.rs b/trace_decoder/src/type2.rs index 7cb952888..d03831e43 100644 --- a/trace_decoder/src/type2.rs +++ b/trace_decoder/src/type2.rs @@ -12,7 +12,7 @@ use nunny::NonEmpty; use stackstack::Stack; use crate::{ - typed_mpt::{SmtKey, StateSmt}, + tries::{SmtKey, StateSmt}, wire::{Instruction, SmtLeaf, SmtLeafType}, };