Skip to content

Commit

Permalink
clean up legacy
Browse files Browse the repository at this point in the history
Signed-off-by: Gregory Edison <[email protected]>
  • Loading branch information
greged93 committed Nov 9, 2024
1 parent edfa54e commit 0b9285f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
5 changes: 4 additions & 1 deletion crates/primitives-traits/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ alloy-genesis.workspace = true
alloy-primitives.workspace = true
alloy-rlp.workspace = true

revm-primitives = { workspace = true, features = ["serde"] }
# revm-primitives scroll re-export
revm-primitives = { package = "reth-scroll-revm", path = "../scroll/revm", features = ["serde"] }
reth-scroll-primitives = { workspace = true, optional = true }

# misc
byteorder = "1"
Expand Down Expand Up @@ -81,3 +83,4 @@ serde-bincode-compat = [
"alloy-consensus/serde-bincode-compat",
"alloy-eips/serde-bincode-compat"
]
scroll = ["reth-scroll-primitives"]
2 changes: 0 additions & 2 deletions crates/scroll/revm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ default = ["std"]

arbitrary = ["revm/arbitrary"]

scroll = []

serde = ["revm/serde"]

std = ["revm/std"]
1 change: 0 additions & 1 deletion crates/scroll/revm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ pub mod states;

pub mod primitives;

#[cfg(feature = "scroll")]
pub use primitives::ScrollAccountInfo;
pub use revm::primitives::*;
10 changes: 4 additions & 6 deletions crates/scroll/storage/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Scroll storage implementation.
use alloy_primitives::{map::Entry, Address, B256, U256};
use alloy_primitives::{Address, B256, U256};
use reth_revm::{
database::EvmStateProvider,
primitives::{AccountInfo, Bytecode},
Expand Down Expand Up @@ -44,11 +44,9 @@ impl<DB: EvmStateProvider> Database for ScrollStateProviderDatabase<DB> {
let Some(account) = self.db.basic_account(address)? else { return Ok(None) };
let Some(code_hash) = account.bytecode_hash else { return Ok(Some(account.into())) };

let bytecode_context = (account.code_size, account.poseidon_code_hash);
if let Entry::Vacant(entry) = self.post_execution_context.entry(code_hash) {
entry.insert(bytecode_context);
}

self.post_execution_context
.entry(code_hash)
.or_insert_with(|| (account.code_size, account.poseidon_code_hash));
Ok(Some(account.into()))
}

Expand Down

0 comments on commit 0b9285f

Please sign in to comment.