Skip to content

Commit

Permalink
chore: rm reth_primitives from reth_revm (#14317)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rjected authored Feb 8, 2025
1 parent d99f0fa commit 44985c3
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
3 changes: 2 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions crates/revm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ workspace = true

[dependencies]
# reth
reth-primitives.workspace = true
reth-primitives-traits.workspace = true
reth-ethereum-primitives.workspace = true
reth-storage-errors.workspace = true
reth-storage-api.workspace = true
reth-trie = { workspace = true, optional = true }
Expand All @@ -34,19 +35,21 @@ alloy-consensus.workspace = true
[features]
default = ["std"]
std = [
"reth-primitives/std",
"reth-primitives-traits/std",
"alloy-primitives/std",
"revm/std",
"alloy-eips/std",
"alloy-consensus/std",
"reth-ethereum-forks/std",
"reth-ethereum-primitives/std",
]
witness = ["dep:reth-trie"]
test-utils = [
"dep:reth-trie",
"reth-primitives/test-utils",
"reth-primitives-traits/test-utils",
"reth-trie?/test-utils",
"revm/test-utils",
"reth-ethereum-primitives/test-utils",
]
serde = [
"revm/serde",
Expand All @@ -55,4 +58,5 @@ serde = [
"alloy-consensus/serde",
"reth-trie?/serde",
"reth-ethereum-forks/serde",
"reth-primitives-traits/serde",
]
2 changes: 1 addition & 1 deletion crates/revm/src/batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use alloy_primitives::BlockNumber;
/// - pruning receipts according to the pruning configuration.
/// - batch range if known
#[derive(Debug)]
pub struct BlockBatchRecord<T = reth_primitives::Receipt> {
pub struct BlockBatchRecord<T = reth_ethereum_primitives::Receipt> {
/// The collection of receipts.
/// Outer vector stores receipts for each block sequentially.
/// The inner vector stores receipts ordered by transaction number.
Expand Down
6 changes: 3 additions & 3 deletions crates/revm/src/database.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::primitives::alloy_primitives::{BlockNumber, StorageKey, StorageValue};
use alloy_primitives::{Address, B256, U256};
use core::ops::{Deref, DerefMut};
use reth_primitives::Account;
use reth_primitives_traits::Account;
use reth_storage_api::{AccountReader, BlockHashReader, StateProvider};
use reth_storage_errors::provider::{ProviderError, ProviderResult};
use revm::{
Expand All @@ -27,7 +27,7 @@ pub trait EvmStateProvider: Send + Sync {
fn bytecode_by_hash(
&self,
code_hash: &B256,
) -> ProviderResult<Option<reth_primitives::Bytecode>>;
) -> ProviderResult<Option<reth_primitives_traits::Bytecode>>;

/// Get storage of the given account.
fn storage(
Expand All @@ -50,7 +50,7 @@ impl<T: StateProvider> EvmStateProvider for T {
fn bytecode_by_hash(
&self,
code_hash: &B256,
) -> ProviderResult<Option<reth_primitives::Bytecode>> {
) -> ProviderResult<Option<reth_primitives_traits::Bytecode>> {
<T as StateProvider>::bytecode_by_hash(self, code_hash)
}

Expand Down
2 changes: 1 addition & 1 deletion crates/revm/src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use alloy_primitives::{
map::{B256HashMap, HashMap},
Address, BlockNumber, Bytes, StorageKey, B256, U256,
};
use reth_primitives::{Account, Bytecode};
use reth_primitives_traits::{Account, Bytecode};
use reth_storage_api::{
AccountReader, BlockHashReader, HashedPostStateProvider, StateProofProvider, StateProvider,
StateRootProvider, StorageRootProvider,
Expand Down

0 comments on commit 44985c3

Please sign in to comment.