Skip to content

Commit

Permalink
primitives: rm alloy_genesis reexport (#11181)
Browse files Browse the repository at this point in the history
  • Loading branch information
tcoratger authored Sep 24, 2024
1 parent c09bb04 commit 3bd966c
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 14 deletions.
5 changes: 5 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions crates/ethereum/evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ reth-revm = { workspace = true, features = ["test-utils"] }
reth-primitives = { workspace = true, features = ["secp256k1"] }
secp256k1.workspace = true
serde_json.workspace = true
alloy-genesis.workspace = true

[features]
default = ["std"]
Expand Down
3 changes: 2 additions & 1 deletion crates/ethereum/evm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,13 @@ impl ConfigureEvm for EthEvmConfig {
#[cfg(test)]
mod tests {
use super::*;
use alloy_genesis::Genesis;
use alloy_primitives::{B256, U256};
use reth_chainspec::{Chain, ChainSpec, MAINNET};
use reth_evm::execute::ProviderError;
use reth_primitives::{
revm_primitives::{BlockEnv, CfgEnv, SpecId},
Genesis, Header, KECCAK_EMPTY,
Header, KECCAK_EMPTY,
};
use reth_revm::{
db::{CacheDB, EmptyDBTyped},
Expand Down
2 changes: 2 additions & 0 deletions crates/exex/exex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ reth-primitives-traits = { workspace = true, features = ["test-utils"] }
reth-provider = { workspace = true, features = ["test-utils"] }
reth-testing-utils.workspace = true

alloy-genesis.workspace = true

secp256k1.workspace = true
tempfile.workspace = true

Expand Down
5 changes: 3 additions & 2 deletions crates/exex/exex/src/backfill/test_utils.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::sync::Arc;

use alloy_genesis::{Genesis, GenesisAccount};
use alloy_primitives::{b256, Address, TxKind, U256};
use eyre::OptionExt;
use reth_chainspec::{ChainSpec, ChainSpecBuilder, EthereumHardfork, MAINNET, MIN_TRANSACTION_GAS};
Expand All @@ -8,8 +9,8 @@ use reth_evm::execute::{
};
use reth_evm_ethereum::execute::EthExecutorProvider;
use reth_primitives::{
constants::ETH_TO_WEI, Block, BlockBody, BlockWithSenders, Genesis, GenesisAccount, Header,
Receipt, Requests, SealedBlockWithSenders, Transaction, TxEip2930,
constants::ETH_TO_WEI, Block, BlockBody, BlockWithSenders, Header, Receipt, Requests,
SealedBlockWithSenders, Transaction, TxEip2930,
};
use reth_provider::{
providers::ProviderNodeTypes, BlockWriter as _, ExecutionOutcome, LatestStateProviderRef,
Expand Down
1 change: 1 addition & 0 deletions crates/optimism/evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ tracing.workspace = true
[dev-dependencies]
reth-revm = { workspace = true, features = ["test-utils"] }
reth-optimism-chainspec.workspace = true
alloy-genesis.workspace = true

[features]
optimism = [
Expand Down
3 changes: 2 additions & 1 deletion crates/optimism/evm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,13 @@ impl ConfigureEvm for OptimismEvmConfig {
#[cfg(test)]
mod tests {
use super::*;
use alloy_genesis::Genesis;
use alloy_primitives::{B256, U256};
use reth_chainspec::{Chain, ChainSpec};
use reth_evm::execute::ProviderError;
use reth_primitives::{
revm_primitives::{BlockEnv, CfgEnv, SpecId},
Genesis, Header, BASE_MAINNET, KECCAK_EMPTY,
Header, BASE_MAINNET, KECCAK_EMPTY,
};
use reth_revm::{
db::{CacheDB, EmptyDBTyped},
Expand Down
2 changes: 1 addition & 1 deletion crates/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ alloy-primitives = { workspace = true, features = ["rand", "rlp"] }
alloy-rlp = { workspace = true, features = ["arrayvec"] }
alloy-rpc-types = { workspace = true, optional = true }
alloy-serde = { workspace = true, optional = true }
alloy-genesis.workspace = true
alloy-eips = { workspace = true, features = ["serde"] }

# optimism
Expand Down Expand Up @@ -70,6 +69,7 @@ revm-primitives = { workspace = true, features = ["arbitrary"] }
reth-chainspec.workspace = true
reth-codecs.workspace = true
alloy-eips = { workspace = true, features = ["arbitrary"] }
alloy-genesis.workspace = true

assert_matches.workspace = true
arbitrary = { workspace = true, features = ["derive"] }
Expand Down
5 changes: 0 additions & 5 deletions crates/primitives/src/genesis.rs

This file was deleted.

2 changes: 0 additions & 2 deletions crates/primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ mod compression;
pub mod constants;
pub mod eip4844;
pub mod eip7702;
pub mod genesis;
pub mod proofs;
mod receipt;
pub use reth_static_file_types as static_file;
Expand All @@ -46,7 +45,6 @@ pub use constants::{
DEV_GENESIS_HASH, EMPTY_OMMER_ROOT_HASH, HOLESKY_GENESIS_HASH, KECCAK_EMPTY,
MAINNET_GENESIS_HASH, SEPOLIA_GENESIS_HASH,
};
pub use genesis::{ChainConfig, Genesis, GenesisAccount};
pub use receipt::{
gas_spent_by_transactions, Receipt, ReceiptWithBloom, ReceiptWithBloomRef, Receipts,
};
Expand Down
1 change: 1 addition & 0 deletions crates/storage/db-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ reth-trie-common.workspace = true

# ethereum
alloy-primitives.workspace = true
alloy-genesis.workspace = true

# codecs
modular-bitfield.workspace = true
Expand Down
3 changes: 2 additions & 1 deletion crates/storage/db-api/src/models/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ use crate::{
table::{Compress, Decode, Decompress, Encode},
DatabaseError,
};
use alloy_genesis::GenesisAccount;
use alloy_primitives::{Address, Log, B256, U256};
use reth_codecs::{add_arbitrary_tests, Compact};
use reth_primitives::{
Account, Bytecode, GenesisAccount, Header, Receipt, Requests, SealedHeader, StorageEntry,
Account, Bytecode, Header, Receipt, Requests, SealedHeader, StorageEntry,
TransactionSignedNoHash, TxType,
};
use reth_prune_types::{PruneCheckpoint, PruneSegment};
Expand Down
2 changes: 2 additions & 0 deletions examples/custom-dev-node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ futures-util.workspace = true
eyre.workspace = true
tokio.workspace = true
serde_json.workspace = true

alloy-genesis.workspace = true
3 changes: 2 additions & 1 deletion examples/custom-dev-node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

use std::sync::Arc;

use alloy_genesis::Genesis;
use futures_util::StreamExt;
use reth::{
builder::{NodeBuilder, NodeHandle},
Expand All @@ -15,7 +16,7 @@ use reth::{
use reth_chainspec::ChainSpec;
use reth_node_core::{args::RpcServerArgs, node_config::NodeConfig};
use reth_node_ethereum::EthereumNode;
use reth_primitives::{b256, hex, Genesis};
use reth_primitives::{b256, hex};

#[tokio::main]
async fn main() -> eyre::Result<()> {
Expand Down

0 comments on commit 3bd966c

Please sign in to comment.