-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: replace std/hashbrown with alloy_primitives::map (#1384)
* feat: replace std/hashbrown with alloy_primitives::map * feat: replace a few BTrees * feat: replace HashSets Co-Authored-By: dhruvmalik007 <malikdhruv1994@gmail.com> * fix: enable features * fix: more features --------- Co-authored-by: dhruvmalik007 <malikdhruv1994@gmail.com>
- Loading branch information
1 parent
4a27672
commit 6d274cd
Showing
28 changed files
with
125 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,26 @@ | ||
//! Types for the `debug` API. | ||
|
||
use alloy_primitives::{Bytes, B256}; | ||
use alloy_primitives::{map::B256HashMap, Bytes}; | ||
use serde::{Deserialize, Serialize}; | ||
use std::collections::HashMap; | ||
|
||
/// Represents the execution witness of a block. Contains an optional map of state preimages. | ||
#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] | ||
pub struct ExecutionWitness { | ||
/// Map of all hashed trie nodes to their preimages that were required during the execution of | ||
/// the block, including during state root recomputation. | ||
/// keccak(rlp(node)) => rlp(node) | ||
pub state: HashMap<B256, Bytes>, | ||
/// | ||
/// `keccak(rlp(node)) => rlp(node)` | ||
pub state: B256HashMap<Bytes>, | ||
/// Map of all contract codes (created / accessed) to their preimages that were required during | ||
/// the execution of the block, including during state root recomputation. | ||
/// keccak(address) => bytecodes | ||
pub codes: HashMap<B256, Bytes>, | ||
/// | ||
/// `keccak(address) => bytecodes` | ||
pub codes: B256HashMap<Bytes>, | ||
/// Map of all hashed account and storage keys (addresses and slots) to their preimages | ||
/// (unhashed account addresses and storage slots, respectively) that were required during | ||
/// the execution of the block. during the execution of the block. | ||
/// keccak(address|slot) => address|slot | ||
/// | ||
/// `keccak(address|slot) => address|slot` | ||
#[serde(default)] | ||
pub keys: Option<HashMap<B256, Bytes>>, | ||
pub keys: Option<B256HashMap<Bytes>>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.