Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions Cargo.lock

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

11 changes: 11 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ base-client-node = { path = "crates/client/node" }
base-metering = { path = "crates/client/metering" }
base-txpool = { path = "crates/client/txpool" }
base-flashblocks = { path = "crates/client/flashblocks" }
base-client-engine = { path = "crates/client/engine" }

# reth
reth = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
Expand All @@ -87,6 +88,11 @@ reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3
reth-optimism-rpc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", features = [
"client",
] }
reth-consensus = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-engine-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-engine-tree = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-rpc-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-tokio-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-optimism-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-testing-utils = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-optimism-node = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
Expand Down Expand Up @@ -127,6 +133,11 @@ reth-optimism-consensus = { git = "https://github.com/paradigmxyz/reth", tag = "
reth-optimism-forks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-optimism-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-optimism-txpool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-optimism-storage = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-rpc-server-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-trie-common = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-engine-local = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-network = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }

# revm
revm = { version = "31.0.2", features = [
Expand Down
51 changes: 51 additions & 0 deletions crates/client/engine/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[package]
name = "base-client-engine"
description = "Engine validator for Base Node"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[lints]
workspace = true

[dependencies]
alloy-consensus.workspace = true
alloy-eip7928.workspace = true
alloy-eips.workspace = true
alloy-evm.workspace = true
alloy-primitives.workspace = true
alloy-rpc-types.workspace = true
alloy-rpc-types-engine.workspace = true
jsonrpsee.workspace = true
rayon.workspace = true
reth-chain-state.workspace = true
reth-chainspec.workspace = true
reth-consensus.workspace = true
reth-engine-primitives.workspace = true
reth-engine-tree.workspace = true
reth-errors.workspace = true
reth-evm.workspace = true
reth-node-api.workspace = true
reth-node-builder.workspace = true
reth-node-core.workspace = true
reth-payload-builder.workspace = true
reth-payload-primitives.workspace = true
reth-primitives-traits.workspace = true
reth-provider.workspace = true
reth-revm.workspace = true
reth-rpc.workspace = true
reth-rpc-api.workspace = true
reth-rpc-builder.workspace = true
reth-rpc-engine-api.workspace = true
reth-rpc-eth-types.workspace = true
reth-tokio-util.workspace = true
reth-tracing.workspace = true
reth-trie.workspace = true
reth-trie-parallel.workspace = true
revm-primitives.workspace = true
tracing.workspace = true
eyre.workspace = true
derive_more.workspace = true
51 changes: 51 additions & 0 deletions crates/client/engine/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# `base-client-node`

<a href="https://github.com/base/node-reth/actions/workflows/ci.yml"><img src="https://github.com/base/node-reth/actions/workflows/ci.yml/badge.svg?label=ci" alt="CI"></a>
<a href="https://github.com/base/node-reth/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-d1d1f6.svg?label=license&labelColor=2a2f35" alt="MIT License"></a>

Primitive types and traits for Base node runner extensions. Provides extension traits and type aliases for building modular node extensions.

## Overview

- **`BaseNodeExtension`**: Trait for node builder extensions that can apply additional wiring to the builder.
- **`ConfigurableBaseNodeExtension`**: Trait for extensions that can be constructed from a configuration type.
- **`OpBuilder`**: Type alias for the OP node builder with launch context.
- **`OpProvider`**: Type alias for the blockchain provider instance.

Configuration types are located in their respective feature crates:
- **`FlashblocksConfig`**: in `base-flashblocks` crate
- **`TxpoolConfig`**: in `base-txpool` crate

## Usage

Add the dependency to your `Cargo.toml`:

```toml
[dependencies]
base-client-node = { git = "https://github.com/base/node-reth" }
```

Implement a custom node extension:

```rust,ignore
use base_client_node::{BaseNodeExtension, ConfigurableBaseNodeExtension, OpBuilder};
use eyre::Result;

#[derive(Debug)]
struct MyExtension {
// extension state
}

impl BaseNodeExtension for MyExtension {
fn apply(self: Box<Self>, builder: OpBuilder) -> OpBuilder {
// Apply custom wiring to the builder
builder
}
}

impl ConfigurableBaseNodeExtension<MyConfig> for MyExtension {
fn build(config: &MyConfig) -> Result<Self> {
Ok(Self { /* ... */ })
}
}
```
5 changes: 5 additions & 0 deletions crates/client/engine/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//! Implements custom engine validator that is optimized for validating canonical blocks
//! after flashblock validation.
pub mod validator;
pub use validator::{BaseEngineValidatorBuilder, BaseEngineValidator};
Loading
Loading