Skip to content

Commit

Permalink
Merge branch 'main' into emhane/maybe-serialize
Browse files Browse the repository at this point in the history
  • Loading branch information
emhane committed Nov 17, 2024
2 parents 4d469e4 + 2f3fde8 commit 855cff4
Show file tree
Hide file tree
Showing 172 changed files with 1,286 additions and 1,012 deletions.
6 changes: 0 additions & 6 deletions .github/assets/check_wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ exclude_crates=(
reth-beacon-consensus
reth-bench
reth-blockchain-tree
reth-chain-state
reth-cli
reth-cli-commands
reth-cli-runner
Expand All @@ -26,13 +25,11 @@ exclude_crates=(
reth-dns-discovery
reth-downloaders
reth-e2e-test-utils
reth-engine-primitives
reth-engine-service
reth-engine-tree
reth-engine-util
reth-eth-wire
reth-ethereum-cli
reth-ethereum-engine-primitives
reth-ethereum-payload-builder
reth-etl
reth-exex
Expand All @@ -41,7 +38,6 @@ exclude_crates=(
reth-net-nat
reth-network
reth-node-api
reth-node-types
reth-node-builder
reth-node-core
reth-node-ethereum
Expand All @@ -51,8 +47,6 @@ exclude_crates=(
reth-optimism-node
reth-optimism-payload-builder
reth-optimism-rpc
reth-payload-builder
reth-payload-primitives
reth-rpc
reth-rpc-api
reth-rpc-api-testing-util
Expand Down
52 changes: 44 additions & 8 deletions Cargo.lock

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

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ members = [
"crates/optimism/storage",
"crates/payload/basic/",
"crates/payload/builder/",
"crates/payload/builder-primitives/",
"crates/payload/primitives/",
"crates/payload/validator/",
"crates/payload/util/",
"crates/primitives-traits/",
"crates/primitives/",
"crates/prune/prune",
Expand Down Expand Up @@ -379,8 +381,10 @@ reth-optimism-primitives = { path = "crates/optimism/primitives" }
reth-optimism-rpc = { path = "crates/optimism/rpc" }
reth-optimism-storage = { path = "crates/optimism/storage" }
reth-payload-builder = { path = "crates/payload/builder" }
reth-payload-builder-primitives = { path = "crates/payload/builder-primitives" }
reth-payload-primitives = { path = "crates/payload/primitives" }
reth-payload-validator = { path = "crates/payload/validator" }
reth-payload-util = { path = "crates/payload/util" }
reth-primitives = { path = "crates/primitives", default-features = false, features = [
"std",
] }
Expand Down
25 changes: 14 additions & 11 deletions bin/reth/src/commands/debug_cmd/build_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,29 @@ use reth_blockchain_tree::{
};
use reth_chainspec::ChainSpec;
use reth_cli::chainspec::ChainSpecParser;
use reth_cli_commands::common::{AccessRights, Environment, EnvironmentArgs};
use reth_cli_commands::common::{AccessRights, CliNodeTypes, Environment, EnvironmentArgs};
use reth_cli_runner::CliContext;
use reth_consensus::Consensus;
use reth_errors::RethResult;
use reth_evm::execute::{BlockExecutorProvider, Executor};
use reth_execution_types::ExecutionOutcome;
use reth_fs_util as fs;
use reth_node_api::{
EngineApiMessageVersion, NodeTypesWithDB, NodeTypesWithEngine, PayloadBuilderAttributes,
};
use reth_node_api::{EngineApiMessageVersion, PayloadBuilderAttributes};
use reth_node_ethereum::{EthEvmConfig, EthExecutorProvider};
use reth_primitives::{
revm_primitives::KzgSettings, BlobTransaction, PooledTransactionsElement, SealedBlock,
SealedBlockWithSenders, SealedHeader, Transaction, TransactionSigned,
BlobTransaction, PooledTransactionsElement, SealedBlock, SealedBlockWithSenders, SealedHeader,
Transaction, TransactionSigned,
};
use reth_provider::{
providers::BlockchainProvider, BlockHashReader, BlockReader, BlockWriter, ChainSpecProvider,
ProviderFactory, StageCheckpointReader, StateProviderFactory,
providers::{BlockchainProvider, ProviderNodeTypes},
BlockHashReader, BlockReader, BlockWriter, ChainSpecProvider, ProviderFactory,
StageCheckpointReader, StateProviderFactory,
};
use reth_revm::{
cached::CachedReads,
database::StateProviderDatabase,
primitives::{EnvKzgSettings, KzgSettings},
};
use reth_revm::{cached::CachedReads, database::StateProviderDatabase, primitives::EnvKzgSettings};
use reth_stages::StageId;
use reth_transaction_pool::{
blobstore::InMemoryBlobStore, BlobStore, EthPooledTransaction, PoolConfig, TransactionOrigin,
Expand Down Expand Up @@ -84,7 +87,7 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
/// Fetches the best block block from the database.
///
/// If the database is empty, returns the genesis block.
fn lookup_best_block<N: NodeTypesWithDB<ChainSpec = C::ChainSpec>>(
fn lookup_best_block<N: ProviderNodeTypes<ChainSpec = C::ChainSpec>>(
&self,
factory: ProviderFactory<N>,
) -> RethResult<Arc<SealedBlock>> {
Expand Down Expand Up @@ -119,7 +122,7 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
}

/// Execute `debug in-memory-merkle` command
pub async fn execute<N: NodeTypesWithEngine<ChainSpec = C::ChainSpec>>(
pub async fn execute<N: CliNodeTypes<ChainSpec = C::ChainSpec>>(
self,
ctx: CliContext,
) -> eyre::Result<()> {
Expand Down
13 changes: 7 additions & 6 deletions bin/reth/src/commands/debug_cmd/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use futures::{stream::select as stream_select, StreamExt};
use reth_beacon_consensus::EthBeaconConsensus;
use reth_chainspec::ChainSpec;
use reth_cli::chainspec::ChainSpecParser;
use reth_cli_commands::common::{AccessRights, Environment, EnvironmentArgs};
use reth_cli_commands::common::{AccessRights, CliNodeTypes, Environment, EnvironmentArgs};
use reth_cli_runner::CliContext;
use reth_cli_util::get_secret_key;
use reth_config::Config;
Expand All @@ -22,10 +22,11 @@ use reth_exex::ExExManagerHandle;
use reth_network::{BlockDownloaderProvider, NetworkEventListenerProvider, NetworkHandle};
use reth_network_api::NetworkInfo;
use reth_network_p2p::{headers::client::HeadersClient, EthBlockClient};
use reth_node_api::{NodeTypesWithDB, NodeTypesWithDBAdapter, NodeTypesWithEngine};
use reth_node_api::NodeTypesWithDBAdapter;
use reth_node_ethereum::EthExecutorProvider;
use reth_provider::{
BlockExecutionWriter, ChainSpecProvider, ProviderFactory, StageCheckpointReader,
providers::ProviderNodeTypes, BlockExecutionWriter, ChainSpecProvider, ProviderFactory,
StageCheckpointReader,
};
use reth_prune::PruneModes;
use reth_stages::{
Expand Down Expand Up @@ -58,7 +59,7 @@ pub struct Command<C: ChainSpecParser> {
}

impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
fn build_pipeline<N: NodeTypesWithDB<ChainSpec = C::ChainSpec>, Client>(
fn build_pipeline<N: ProviderNodeTypes<ChainSpec = C::ChainSpec>, Client>(
&self,
config: &Config,
client: Client,
Expand Down Expand Up @@ -116,7 +117,7 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
Ok(pipeline)
}

async fn build_network<N: NodeTypesWithEngine<ChainSpec = C::ChainSpec>>(
async fn build_network<N: CliNodeTypes<ChainSpec = C::ChainSpec>>(
&self,
config: &Config,
task_executor: TaskExecutor,
Expand Down Expand Up @@ -160,7 +161,7 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
}

/// Execute `execution-debug` command
pub async fn execute<N: NodeTypesWithEngine<ChainSpec = C::ChainSpec>>(
pub async fn execute<N: CliNodeTypes<ChainSpec = C::ChainSpec>>(
self,
ctx: CliContext,
) -> eyre::Result<()> {
Expand Down
Loading

0 comments on commit 855cff4

Please sign in to comment.