chore: relax cli bounds (#13543)

This commit is contained in:
Arsenii Kulikov
2024-12-24 20:43:52 +04:00
committed by GitHub
parent c822337fd6
commit 41283d3db0
18 changed files with 69 additions and 78 deletions

View File

@ -29,7 +29,8 @@ use reth_fs_util as fs;
use reth_node_api::{BlockTy, EngineApiMessageVersion, PayloadBuilderAttributes};
use reth_node_ethereum::{EthEvmConfig, EthExecutorProvider};
use reth_primitives::{
BlockExt, SealedBlockFor, SealedBlockWithSenders, SealedHeader, Transaction, TransactionSigned,
BlockExt, EthPrimitives, SealedBlockFor, SealedBlockWithSenders, SealedHeader, Transaction,
TransactionSigned,
};
use reth_provider::{
providers::{BlockchainProvider, ProviderNodeTypes},
@ -121,7 +122,7 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
}
/// Execute `debug in-memory-merkle` command
pub async fn execute<N: CliNodeTypes<ChainSpec = C::ChainSpec>>(
pub async fn execute<N: CliNodeTypes<ChainSpec = C::ChainSpec, Primitives = EthPrimitives>>(
self,
ctx: CliContext,
) -> eyre::Result<()> {

View File

@ -25,6 +25,7 @@ use reth_network_p2p::{headers::client::HeadersClient, EthBlockClient};
use reth_node_api::NodeTypesWithDBAdapter;
use reth_node_ethereum::EthExecutorProvider;
use reth_node_events::node::NodeEvent;
use reth_primitives::EthPrimitives;
use reth_provider::{
providers::ProviderNodeTypes, ChainSpecProvider, ProviderFactory, StageCheckpointReader,
};
@ -59,7 +60,7 @@ pub struct Command<C: ChainSpecParser> {
}
impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
fn build_pipeline<N: ProviderNodeTypes<ChainSpec = C::ChainSpec> + CliNodeTypes, Client>(
fn build_pipeline<N, Client>(
&self,
config: &Config,
client: Client,
@ -69,6 +70,7 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
static_file_producer: StaticFileProducer<ProviderFactory<N>>,
) -> eyre::Result<Pipeline<N>>
where
N: ProviderNodeTypes<ChainSpec = C::ChainSpec, Primitives = EthPrimitives> + CliNodeTypes,
Client: EthBlockClient + 'static,
{
// building network downloaders using the fetch client
@ -117,7 +119,9 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
Ok(pipeline)
}
async fn build_network<N: CliNodeTypes<ChainSpec = C::ChainSpec>>(
async fn build_network<
N: CliNodeTypes<ChainSpec = C::ChainSpec, Primitives = EthPrimitives>,
>(
&self,
config: &Config,
task_executor: TaskExecutor,
@ -161,7 +165,7 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
}
/// Execute `execution-debug` command
pub async fn execute<N: CliNodeTypes<ChainSpec = C::ChainSpec>>(
pub async fn execute<N: CliNodeTypes<ChainSpec = C::ChainSpec, Primitives = EthPrimitives>>(
self,
ctx: CliContext,
) -> eyre::Result<()> {

View File

@ -21,7 +21,7 @@ use reth_network::{BlockDownloaderProvider, NetworkHandle};
use reth_network_api::NetworkInfo;
use reth_node_api::{BlockTy, NodePrimitives};
use reth_node_ethereum::EthExecutorProvider;
use reth_primitives::BlockExt;
use reth_primitives::{BlockExt, EthPrimitives};
use reth_provider::{
providers::ProviderNodeTypes, AccountExtReader, ChainSpecProvider, DatabaseProviderFactory,
HashedPostStateProvider, HashingWriter, LatestStateProviderRef, OriginalValuesKnown,
@ -88,7 +88,7 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
}
/// Execute `debug in-memory-merkle` command
pub async fn execute<N: CliNodeTypes<ChainSpec = C::ChainSpec>>(
pub async fn execute<N: CliNodeTypes<ChainSpec = C::ChainSpec, Primitives = EthPrimitives>>(
self,
ctx: CliContext,
) -> eyre::Result<()> {

View File

@ -19,6 +19,7 @@ use reth_network_api::NetworkInfo;
use reth_network_p2p::full_block::FullBlockClient;
use reth_node_api::{BlockTy, NodePrimitives};
use reth_node_ethereum::EthExecutorProvider;
use reth_primitives::EthPrimitives;
use reth_provider::{
providers::ProviderNodeTypes, BlockNumReader, BlockWriter, ChainSpecProvider,
DatabaseProviderFactory, HeaderProvider, LatestStateProviderRef, OriginalValuesKnown,
@ -87,7 +88,7 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
}
/// Execute `merkle-debug` command
pub async fn execute<N: CliNodeTypes<ChainSpec = C::ChainSpec>>(
pub async fn execute<N: CliNodeTypes<ChainSpec = C::ChainSpec, Primitives = EthPrimitives>>(
self,
ctx: CliContext,
) -> eyre::Result<()> {

View File

@ -6,6 +6,7 @@ use reth_cli::chainspec::ChainSpecParser;
use reth_cli_commands::common::CliNodeTypes;
use reth_cli_runner::CliContext;
use reth_node_ethereum::EthEngineTypes;
use reth_primitives::EthPrimitives;
mod build_block;
mod execution;
@ -37,7 +38,9 @@ pub enum Subcommands<C: ChainSpecParser> {
impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
/// Execute `debug` command
pub async fn execute<N: CliNodeTypes<Engine = EthEngineTypes, ChainSpec = C::ChainSpec>>(
pub async fn execute<
N: CliNodeTypes<Engine = EthEngineTypes, Primitives = EthPrimitives, ChainSpec = C::ChainSpec>,
>(
self,
ctx: CliContext,
) -> eyre::Result<()> {

View File

@ -22,6 +22,7 @@ use reth_network_api::NetworkInfo;
use reth_node_api::{EngineApiMessageVersion, NodePrimitives, NodeTypesWithDBAdapter};
use reth_node_ethereum::{EthEngineTypes, EthEvmConfig, EthExecutorProvider};
use reth_payload_builder::{PayloadBuilderHandle, PayloadBuilderService};
use reth_primitives::EthPrimitives;
use reth_provider::{
providers::{BlockchainProvider, ProviderNodeTypes},
CanonStateSubscriptions, ChainSpecProvider, ProviderFactory,
@ -87,7 +88,9 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
}
/// Execute `debug replay-engine` command
pub async fn execute<N: CliNodeTypes<Engine = EthEngineTypes, ChainSpec = C::ChainSpec>>(
pub async fn execute<
N: CliNodeTypes<Engine = EthEngineTypes, Primitives = EthPrimitives, ChainSpec = C::ChainSpec>,
>(
self,
ctx: CliContext,
) -> eyre::Result<()> {