primitives: rm alloy_genesis reexport (#11181)

This commit is contained in:
Thomas Coratger
2024-09-25 01:15:19 +02:00
committed by GitHub
parent c09bb04950
commit 3bd966c594
14 changed files with 24 additions and 14 deletions

5
Cargo.lock generated
View File

@ -2696,6 +2696,7 @@ dependencies = [
name = "example-custom-dev-node"
version = "0.0.0"
dependencies = [
"alloy-genesis",
"eyre",
"futures-util",
"reth",
@ -6707,6 +6708,7 @@ dependencies = [
name = "reth-db-api"
version = "1.0.7"
dependencies = [
"alloy-genesis",
"alloy-primitives",
"arbitrary",
"bytes",
@ -7292,6 +7294,7 @@ name = "reth-evm-ethereum"
version = "1.0.7"
dependencies = [
"alloy-eips",
"alloy-genesis",
"alloy-primitives",
"alloy-sol-types",
"reth-chainspec",
@ -7312,6 +7315,7 @@ dependencies = [
name = "reth-evm-optimism"
version = "1.0.7"
dependencies = [
"alloy-genesis",
"alloy-primitives",
"reth-chainspec",
"reth-ethereum-forks",
@ -7363,6 +7367,7 @@ dependencies = [
name = "reth-exex"
version = "1.0.7"
dependencies = [
"alloy-genesis",
"alloy-primitives",
"eyre",
"futures",

View File

@ -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"]

View File

@ -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},

View File

@ -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

View File

@ -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};
@ -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,

View File

@ -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 = [

View File

@ -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},

View File

@ -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
@ -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"] }

View File

@ -1,5 +0,0 @@
//! Types for genesis configuration of a chain.
// re-export genesis types
#[doc(inline)]
pub use alloy_genesis::*;

View File

@ -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;
@ -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,
};

View File

@ -24,6 +24,7 @@ reth-trie-common.workspace = true
# ethereum
alloy-primitives.workspace = true
alloy-genesis.workspace = true
# codecs
modular-bitfield.workspace = true

View File

@ -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};

View File

@ -17,3 +17,5 @@ futures-util.workspace = true
eyre.workspace = true
tokio.workspace = true
serde_json.workspace = true
alloy-genesis.workspace = true

View File

@ -5,6 +5,7 @@
use std::sync::Arc;
use alloy_genesis::Genesis;
use futures_util::StreamExt;
use reth::{
builder::{NodeBuilder, NodeHandle},
@ -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<()> {