diff --git a/trace_decoder/src/decoding.rs b/trace_decoder/src/decoding.rs index 64e0a1fbd..8621c8d51 100644 --- a/trace_decoder/src/decoding.rs +++ b/trace_decoder/src/decoding.rs @@ -538,34 +538,6 @@ impl ProcessedBlockTrace { .map_err(TraceParsingError::from)?; } - // Remove any accounts that self-destructed. - for hashed_addr in deltas.self_destructed_accounts.iter() { - let k = Nibbles::from_h256_be(*hashed_addr); - - trie_state.storage.remove(hashed_addr).ok_or_else(|| { - let hashed_addr = *hashed_addr; - let mut e = TraceParsingError::new( - TraceParsingErrorReason::MissingAccountStorageTrie(hashed_addr), - ); - e.h_addr(hashed_addr); - e - })?; - - // TODO: Once the mechanism for resolving code hashes settles, we probably want - // to also delete the code hash mapping here as well... - - if let Some(remaining_account_key) = - Self::delete_node_and_report_remaining_key_if_branch_collapsed( - &mut trie_state.state, - &k, - ) - .map_err(TraceParsingError::from)? - { - out.additional_state_trie_paths_to_not_hash - .push(remaining_account_key); - } - } - Ok(out) } diff --git a/trace_decoder/src/lib.rs b/trace_decoder/src/lib.rs index 2b6e01ed4..42b83a69d 100644 --- a/trace_decoder/src/lib.rs +++ b/trace_decoder/src/lib.rs @@ -242,11 +242,6 @@ pub struct TxnTrace { /// Contract code that this account has accessed or created #[serde(skip_serializing_if = "Option::is_none")] pub code_usage: Option, - - /// True if the account existed before this txn but self-destructed at the - /// end of this txn. - #[serde(skip_serializing_if = "Option::is_none")] - pub self_destructed: Option, } /// Contract code access type. Used by txn traces. diff --git a/trace_decoder/src/processed_block_trace.rs b/trace_decoder/src/processed_block_trace.rs index 0512632d6..bd6a23330 100644 --- a/trace_decoder/src/processed_block_trace.rs +++ b/trace_decoder/src/processed_block_trace.rs @@ -143,13 +143,6 @@ impl TxnInfo { } } } - - if trace - .self_destructed - .map_or(false, |self_destructed| self_destructed) - { - nodes_used_by_txn.self_destructed_accounts.push(hashed_addr); - } } for &hashed_addr in extra_state_accesses { @@ -225,7 +218,6 @@ pub(crate) struct NodesUsedByTxn { pub(crate) storage_accesses: Vec<(H256, StorageAccess)>, pub(crate) storage_writes: Vec<(H256, StorageWrite)>, pub(crate) state_accounts_with_no_accesses_but_storage_tries: HashMap, - pub(crate) self_destructed_accounts: Vec, } #[derive(Debug)] diff --git a/zero_bin/rpc/src/native/txn.rs b/zero_bin/rpc/src/native/txn.rs index 94d280968..7c3018f4d 100644 --- a/zero_bin/rpc/src/native/txn.rs +++ b/zero_bin/rpc/src/native/txn.rs @@ -170,7 +170,6 @@ async fn process_tx_traces( ); let code = process_code(post_state, read_state, &mut code_db).await; let nonce = process_nonce(post_state, &code); - let self_destructed = process_self_destruct(post_state, pre_state); let result = TxnTrace { balance, @@ -178,7 +177,6 @@ async fn process_tx_traces( storage_read, storage_written, code_usage: code, - self_destructed, }; traces.insert(address, result); @@ -277,18 +275,6 @@ async fn process_code( } } -/// Processes the self destruct for the given account state. -const fn process_self_destruct( - post_state: Option<&AccountState>, - pre_state: Option<&AccountState>, -) -> Option { - if post_state.is_none() && pre_state.is_some() { - Some(true) - } else { - None - } -} - mod rlp { use alloy::consensus::{Receipt, ReceiptEnvelope}; use alloy::rpc::types::eth::ReceiptWithBloom;