diff --git a/Cargo.lock b/Cargo.lock
index 15101e18c0b2..4ae53c03f87e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -8112,6 +8112,8 @@ dependencies = [
"secp256k1",
"serde",
"serde_json",
+ "taiko-reth-primitives",
+ "taiko-reth-provider",
"tempfile",
"thiserror",
"tokio",
@@ -8133,6 +8135,7 @@ dependencies = [
"reth-rpc-types",
"serde",
"serde_json",
+ "taiko-reth-primitives",
]
[[package]]
diff --git a/bin/reth/Cargo.toml b/bin/reth/Cargo.toml
index c91a436a137f..deae242d54a2 100644
--- a/bin/reth/Cargo.toml
+++ b/bin/reth/Cargo.toml
@@ -60,7 +60,6 @@ reth-node-ethereum.workspace = true
reth-node-optimism = { workspace = true, optional = true, features = [
"optimism",
] }
-# reth-node-taiko = { workspace = true, optional = true }
reth-node-core.workspace = true
reth-db-common.workspace = true
reth-node-builder.workspace = true
diff --git a/crates/engine-primitives/Cargo.toml b/crates/engine-primitives/Cargo.toml
index b44a4a8aa4e7..eb17a9bcf706 100644
--- a/crates/engine-primitives/Cargo.toml
+++ b/crates/engine-primitives/Cargo.toml
@@ -16,4 +16,7 @@ reth-chainspec.workspace = true
reth-payload-primitives.workspace = true
# misc
-serde.workspace = true
\ No newline at end of file
+serde.workspace = true
+
+[features]
+taiko = ["reth-payload-primitives/taiko"]
diff --git a/crates/payload/primitives/Cargo.toml b/crates/payload/primitives/Cargo.toml
index ad63d46d8c72..dc7f244bb0bb 100644
--- a/crates/payload/primitives/Cargo.toml
+++ b/crates/payload/primitives/Cargo.toml
@@ -24,4 +24,7 @@ tokio = { workspace = true, features = ["sync"] }
# misc
thiserror.workspace = true
-serde.workspace = true
\ No newline at end of file
+serde.workspace = true
+
+[features]
+taiko = ["reth-transaction-pool/taiko"]
diff --git a/crates/rpc/rpc-api/Cargo.toml b/crates/rpc/rpc-api/Cargo.toml
index 5374c46e4898..55ce4fb69c2c 100644
--- a/crates/rpc/rpc-api/Cargo.toml
+++ b/crates/rpc/rpc-api/Cargo.toml
@@ -18,6 +18,9 @@ reth-rpc-types.workspace = true
reth-engine-primitives.workspace = true
reth-network-peers.workspace = true
+# taiko
+taiko-reth-primitives = { workspace = true, optional = true }
+
# misc
alloy-dyn-abi = { workspace = true, features = ["eip712"] }
jsonrpsee = { workspace = true, features = ["server", "macros"] }
@@ -28,3 +31,8 @@ serde_json.workspace = true
[features]
client = ["jsonrpsee/client", "jsonrpsee/async-client"]
+taiko = [
+ "reth-primitives/taiko",
+ "reth-engine-primitives/taiko",
+ "dep:taiko-reth-primitives",
+]
diff --git a/crates/rpc/rpc-api/src/lib.rs b/crates/rpc/rpc-api/src/lib.rs
index 82af34a86d73..5e747678eaaf 100644
--- a/crates/rpc/rpc-api/src/lib.rs
+++ b/crates/rpc/rpc-api/src/lib.rs
@@ -58,6 +58,9 @@ pub mod servers {
validation::BlockSubmissionValidationApiServer,
web3::Web3ApiServer,
};
+
+ #[cfg(feature = "taiko")]
+ pub use crate::taiko::TaikoApiServer;
}
/// re-export of all client traits
@@ -86,4 +89,10 @@ pub mod clients {
validation::BlockSubmissionValidationApiClient,
web3::Web3ApiClient,
};
+
+ #[cfg(feature = "taiko")]
+ pub use crate::taiko::TaikoApiClient;
}
+
+#[cfg(feature = "taiko")]
+mod taiko;
diff --git a/crates/rpc/rpc-api/src/taiko.rs b/crates/rpc/rpc-api/src/taiko.rs
new file mode 100644
index 000000000000..5310bb5e72ad
--- /dev/null
+++ b/crates/rpc/rpc-api/src/taiko.rs
@@ -0,0 +1,37 @@
+use jsonrpsee::{core::RpcResult, proc_macros::rpc};
+use reth_primitives::Address;
+use reth_rpc_types::Transaction;
+use taiko_reth_primitives::L1Origin;
+
+/// Taiko rpc interface.
+#[cfg_attr(not(feature = "client"), rpc(server, namespace = "taiko"))]
+#[cfg_attr(feature = "client", rpc(server, client, namespace = "taiko"))]
+pub trait TaikoApi {
+ /// HeadL1Origin returns the latest L2 block's corresponding L1 origin.
+ #[method(name = "headL1Origin")]
+ async fn head_l1_origin(&self) -> RpcResult