8000 GitHub - base/node-reth
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

base/node-reth

Repository files navigation

Base

Base Reth Node

Base Reth Node is an implementation of a Reth Ethereum node, specifically tailored for the Base L2 network. It integrates Flashblocks capabilities and leverages Optimism components from Reth v1.3.12. This node is designed to provide a robust and efficient solution for interacting with the Base network.

GitHub contributors GitHub commit activity GitHub Stars GitHub repo size GitHub

Website base.org Blog Docs Discord Twitter Base

GitHub pull requests by-label GitHub Issues

Features

  • Base L2 Support: Optimized for the Base Layer 2 network.
  • Flashblocks RPC: Includes a flashblocks-rpc crate for Flashblocks.
  • Reth Based: Built upon Reth v1.3.12, incorporating its Optimism features.
  • Dockerized: Comes with a Dockerfile for easy containerization and deployment.
  • Development Toolkit: Includes a justfile for streamlined build, test, and linting workflows.

Repository Structure

.
├── Cargo.toml        # Rust workspace and package definitions
├── Cargo.lock        # Dependency lockfile
├── Dockerfile        # For building the Docker image
├── LICENSE           # MIT License
├── README.md         # This file
├── crates/
│   ├── node/         # Main node application logic
│   └── flashblocks-rpc/ # RPC server for Flashblocks integration
├── justfile          # Command runner for development tasks
└── .github/
    └── workflows/
        └── ci.yml    # GitHub Actions CI configuration

Prerequisites

  • Rust: Version 1.85 or later (as specified in Cargo.toml). You can install Rust using rustup.
  • Just: A command runner. Installation instructions can be found here.
  • Docker: (Optional) For building and running the node in a container. See Docker installation guide.
  • Build Essentials: git, libclang-dev, pkg-config, curl, build-essential (these are installed in the Docker build process and may be needed for local builds on some systems).

Getting Started

1. Clone the Repository

git clone https://github.com/base/node-reth.git
cd node-reth

2. Build

You can build the project using the justfile for a release build:

just build

Alternatively, you can use Cargo directly:

cargo build --release --bin base-reth-node

The main binary will be located at target/release/base-reth-node.

3. Run Checks and Tests

To ensure everything is set up correctly, run the checks and tests:

just check  # Runs cargo fmt --check and cargo clippy
just test   # Runs cargo test

To automatically fix formatting and clippy warnings:

just fix

Running the Node

To run the compiled node:

./target/release/base-reth-node [OPTIONS]

To see available command-line options and subcommands, run:

./target/release/base-reth-node --help

(Note: Replace [OPTIONS] with the necessary configuration flags for your setup. Refer to the --help output for details.)

Docker

1. Build the Docker Image

docker build -t base-reth-node .

2. Run the Docker Container

docker run -it --rm base-reth-node [OPTIONS]

(Note: You might need to map ports (-p), mount volumes (-v) for data persistence, or pass environment variables (-e) depending on your node's configuration needs.)

Configuration

(Details about specific configuration files, environment variables, or command-line arguments required for typical operation will be added here as the project evolves. For now, please refer to the --help output of the binary.)

License

This project is licensed under the MIT License. See the LICENSE file for details.

0