Skip to content

Commit

Permalink
chore: Add reth-rpc-builder/taiko to taiko feature in Cargo.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
johntaiko committed Aug 14, 2024
1 parent e882225 commit fb9ad3c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/node/builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
4 changes: 4 additions & 0 deletions crates/node/builder/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,15 @@ impl<Node: FullNodeComponents> ExtendRpcModules<Node> for () {
/// Helper wrapper type to encapsulate the [`RethModuleRegistry`] over components trait.
#[derive(Debug)]
pub struct RpcRegistry<Node: FullNodeComponents> {
#[allow(clippy::type_complexity)]
pub(crate) registry: RethModuleRegistry<
Node::Provider,
Node::Pool,
NetworkHandle,
TaskExecutor,
Node::Provider,
Node::Evm,
Node::Executor,
>,
}

Expand All @@ -166,6 +168,7 @@ impl<Node: FullNodeComponents> Deref for RpcRegistry<Node> {
TaskExecutor,
Node::Provider,
Node::Evm,
Node::Executor,
>;

fn deref(&self) -> &Self::Target {
Expand Down Expand Up @@ -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 };
Expand Down
3 changes: 3 additions & 0 deletions crates/rpc/rpc-api/src/taiko.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Transaction>,
/// The estimated gas used.
pub estimated_gas_used: u64,
/// The estimated bytes length.
pub bytes_length: u64,
}
1 change: 1 addition & 0 deletions crates/rpc/rpc-builder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<EngineApi, EngineT>(
self,
module_config: TransportRpcModuleConfig,
Expand Down

0 comments on commit fb9ad3c

Please sign in to comment.