From fb9ad3ca5d97231215e4c30720edb5fccf9babd8 Mon Sep 17 00:00:00 2001 From: john xu Date: Wed, 14 Aug 2024 15:53:40 +0800 Subject: [PATCH] chore: Add reth-rpc-builder/taiko to taiko feature in Cargo.toml --- crates/node/builder/Cargo.toml | 7 ++++++- crates/node/builder/src/rpc.rs | 4 ++++ crates/rpc/rpc-api/src/taiko.rs | 3 +++ crates/rpc/rpc-builder/src/lib.rs | 1 + 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/crates/node/builder/Cargo.toml b/crates/node/builder/Cargo.toml index 59c3fcda662c..7c8834e6f8c6 100644 --- a/crates/node/builder/Cargo.toml +++ b/crates/node/builder/Cargo.toml @@ -78,4 +78,9 @@ backon.workspace = true tempfile.workspace = true [features] -taiko = ["reth-rpc/taiko", "reth-node-core/taiko", "reth-node-api/taiko"] +taiko = [ + "reth-rpc/taiko", + "reth-node-core/taiko", + "reth-node-api/taiko", + "reth-rpc-builder/taiko", +] diff --git a/crates/node/builder/src/rpc.rs b/crates/node/builder/src/rpc.rs index 9a6ada8f916d..d39eae0ef39f 100644 --- a/crates/node/builder/src/rpc.rs +++ b/crates/node/builder/src/rpc.rs @@ -148,6 +148,7 @@ impl ExtendRpcModules for () { /// Helper wrapper type to encapsulate the [`RethModuleRegistry`] over components trait. #[derive(Debug)] pub struct RpcRegistry { + #[allow(clippy::type_complexity)] pub(crate) registry: RethModuleRegistry< Node::Provider, Node::Pool, @@ -155,6 +156,7 @@ pub struct RpcRegistry { TaskExecutor, Node::Provider, Node::Evm, + Node::Executor, >, } @@ -166,6 +168,7 @@ impl Deref for RpcRegistry { TaskExecutor, Node::Provider, Node::Evm, + Node::Executor, >; fn deref(&self) -> &Self::Target { @@ -271,6 +274,7 @@ where .with_events(node.provider().clone()) .with_executor(node.task_executor().clone()) .with_evm_config(node.evm_config().clone()) + .with_block_executor(node.block_executor().clone()) .build_with_auth_server(module_config, engine_api); let mut registry = RpcRegistry { registry }; diff --git a/crates/rpc/rpc-api/src/taiko.rs b/crates/rpc/rpc-api/src/taiko.rs index d776eca85478..76ba1adecf1a 100644 --- a/crates/rpc/rpc-api/src/taiko.rs +++ b/crates/rpc/rpc-api/src/taiko.rs @@ -55,7 +55,10 @@ pub trait TaikoAuthApi { /// with estimated gas used / bytes. #[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] pub struct PreBuiltTxList { + /// The list of transactions. pub tx_list: Vec, + /// The estimated gas used. pub estimated_gas_used: u64, + /// The estimated bytes length. pub bytes_length: u64, } diff --git a/crates/rpc/rpc-builder/src/lib.rs b/crates/rpc/rpc-builder/src/lib.rs index 2d68c8a6123e..47b205511b95 100644 --- a/crates/rpc/rpc-builder/src/lib.rs +++ b/crates/rpc/rpc-builder/src/lib.rs @@ -474,6 +474,7 @@ where /// This behaves exactly as [`RpcModuleBuilder::build`] for the [`TransportRpcModules`], but /// also configures the auth (engine api) server, which exposes a subset of the `eth_` /// namespace. + #[allow(clippy::type_complexity)] pub fn build_with_auth_server( self, module_config: TransportRpcModuleConfig,