• Stars
    star
    3,910
  • Rank 11,188 (Top 0.3 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created about 2 years ago
  • Updated 24 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Modular, contributor-friendly and blazing-fast implementation of the Ethereum protocol, in Rust

reth

CI status cargo-deny status Codecov Telegram Chat

Modular, contributor-friendly and blazing-fast implementation of the Ethereum protocol

Install | User Book | Developer Docs | Crate Docs

The project is still work in progress, see the disclaimer below.

What is Reth?

Reth (short for Rust Ethereum, pronunciation) is a new Ethereum full node implementation that is focused on being user-friendly, highly modular, as well as being fast and efficient. Reth is an Execution Layer (EL) and is compatible with all Ethereum Consensus Layer (CL) implementations that support the Engine API. It is originally built and driven forward by Paradigm, and is licensed under the Apache and MIT licenses.

Goals

As a full Ethereum node, Reth allows users to connect to the Ethereum network and interact with the Ethereum blockchain. This includes sending and receiving transactions/logs/traces, as well as accessing and interacting with smart contracts. Building a successful Ethereum node requires creating a high-quality implementation that is both secure and efficient, as well as being easy to use on consumer hardware. It also requires building a strong community of contributors who can help support and improve the software.

More concretely, our goals are:

  1. Modularity: Every component of Reth is built to be used as a library: well-tested, heavily documented and benchmarked. We envision that developers will import the node's crates, mix and match, and innovate on top of them. Examples of such usage include but are not limited to spinning up standalone P2P networks, talking directly to a node's database, or "unbundling" the node into the components you need. To achieve that, we are licensing Reth under the Apache/MIT permissive license. You can learn more about the project's components here.
  2. Performance: Reth aims to be fast, so we used Rust and the Erigon staged-sync node architecture. We also use our Ethereum libraries (including ethers-rs and revm) which weโ€™ve battle-tested and optimized via Foundry.
  3. Free for anyone to use any way they want: Reth is free open source software, built for the community, by the community. By licensing the software under the Apache/MIT license, we want developers to use it without being bound by business licenses, or having to think about the implications of GPL-like licenses.
  4. Client Diversity: The Ethereum protocol becomes more antifragile when no node implementation dominates. This ensures that if there's a software bug, the network does not finalize a bad block. By building a new client, we hope to contribute to Ethereum's antifragility.
  5. Support as many EVM chains as possible: We aspire that Reth can full-sync not only Ethereum, but also other chains like Optimism, Polygon, BNB Smart Chain, and more. If you're working on any of these projects, please reach out.
  6. Configurability: We want to solve for node operators that care about fast historical queries, but also for hobbyists who cannot operate on large hardware. We also want to support teams and individuals who want both sync from genesis and via "fast sync". We envision that Reth will be configurable enough and provide configurable "profiles" for the tradeoffs that each team faces.

Status

The project is not ready for production use.

Reth is fully capable of syncing, however, there are still some missing features, and we are still working on performance and stability. Because of this, we are still introducing breaking changes.

It has not been audited for security purposes and should not be used in production yet.

We will be updating the documentation with the completion status of each component, as well as include more contributing guidelines (design docs, architecture diagrams, repository layouts) and "good first issues".

We appreciate your patience until we get there. Until then, we are happy to answer all questions in the Telegram link above.

For Users

See the Reth Book for instructions on how to install and run Reth.

For Developers

Using reth as a library

You can use individual crates of reth in your project.

The crate docs can be found here.

For a general overview of the crates, see Project Layout.

Contributing

If you want to contribute, or follow along with contributor discussion, you can use our main telegram to chat with us about the development of Reth!

Building and testing

The Minimum Supported Rust Version (MSRV) of this project is 1.70.0.

See the book for detailed instructions on how to build from source.

To fully test Reth, you will need to have Geth installed, but it is possible to run a subset of tests without Geth.

First, clone the repository:

git clone https://github.com/paradigmxyz/reth
cd reth

Next, run the tests:

# Without Geth
cargo test --workspace

# With Geth
cargo test --workspace --features geth-tests

# With Ethereum Foundation tests
#
# Note: Requires cloning https://github.com/ethereum/tests
# 
#   cd testing/ef-tests && git clone https://github.com/ethereum/tests ethereum-tests
cargo test --workspace --features ef-tests

We recommend using cargo nextest to speed up testing. With nextest installed, simply substitute cargo test with cargo nextest run.

Note

Some tests use random number generators to generate test data. If you want to use a deterministic seed, you can set the SEED environment variable.

Getting Help

If you have any questions, first see if the answer to your question can be found in the book.

If the answer is not there:

Security

See SECURITY.md.

Acknowledgements

Reth is a new implementation of the Ethereum protocol. In the process of developing the node we investigated the design decisions other nodes have made to understand what is done well, what is not, and where we can improve the status quo.

None of this would have been possible without them, so big shoutout to the teams below:

  • Geth: We would like to express our heartfelt gratitude to the go-ethereum team for their outstanding contributions to Ethereum over the years. Their tireless efforts and dedication have helped to shape the Ethereum ecosystem and make it the vibrant and innovative community it is today. Thank you for your hard work and commitment to the project.
  • Erigon (fka Turbo-Geth): Erigon pioneered the "Staged Sync" architecture that Reth is using, as well as introduced MDBX as the database of choice. We thank Erigon for pushing the state of the art research on the performance limits of Ethereum nodes.
  • Akula: Reth uses forks of the Apache versions of Akula's MDBX Bindings, FastRLP and ECIES . Given that these packages were already released under the Apache License, and they implement standardized solutions, we decided not to reimplement them to iterate faster. We thank the Akula team for their contributions to the Rust Ethereum ecosystem and for publishing these packages.

More Repositories

1

artemis

A simple, modular, and fast framework for writing MEV bots in Rust.
Rust
2,292
star
2

cryo

cryo is the easiest way to extract blockchain data to parquet, csv, json, or python dataframes
Rust
1,137
star
3

rivet

Developer Wallet & DevTools for Anvil
TypeScript
833
star
4

flux

Graph-based LLM power tool for exploring many completions in parallel.
TypeScript
773
star
5

paradigm-ctf-2021

Official repository for Paradigm CTF 2021
Solidity
488
star
6

flood

flood is a load testing tool for benchmarking EVM nodes over RPC
Python
316
star
7

paradigm-ctf-2022

Rust
296
star
8

paradigm-data-portal

a collection of open source crypto datasets for researchers and tool builders
Python
288
star
9

revmc

JIT and AOT compiler for the Ethereum Virtual Machine, built on Revm.
Rust
202
star
10

mev-share-rs

Rust client library for Flashbots MEV-share
Rust
177
star
11

zk-eth-rng

Secure randomness for Ethereum's execution layer via SNARKs and RANDAO.
Solidity
172
star
12

pyrevm

Python wrapper around https://github.com/bluealloy/revm/ using PyO3
Rust
167
star
13

mesc

MESC is a specification for how crypto tools configure their RPC endpoints
Rust
167
star
14

ultimate_evm_tracing_reference

a collection of EVM tracing information for easy reference
156
star
15

etop

like htop for Ethereum and other EVM chains
Rust
143
star
16

jitevm

convert evm bytecode to native machine code and go vroom - just an experiment, probably broken, reach out to [email protected] to contribute / productionize.
Rust
141
star
17

spice

Simple client for extracting data from the Dune Analytics API
Python
131
star
18

tbl

tbl is a swiss army knife for parquet read and write operations
Rust
112
star
19

reth-exex-examples

Collection of ExEx examples built on Reth
Rust
100
star
20

paradigm-ctf-infrastructure

Public infra related to hosting Paradigm CTF
Solidity
98
star
21

sinker

Synchronize Postgres to Elasticsearch
Python
63
star
22

local_reth

Run Reth+Prometheus+Grafana locally via docker-compose
Dockerfile
60
star
23

paradigm-ctf-2023

Solidity
59
star
24

stress4844

Tiny CLI for submitting large calldata transactions to EVM networks to stress test the networking layer. Main motivation: EIP4844blobs.
Rust
55
star
25

fig

Guidelines & best practices for developing Frames: https://www.figma.com/community/file/1367670879509913267/frame-interface-guidelines
52
star
26

paradigm-ctf-2022-teaser

https://rinkeby.etherscan.io/address/0xffb9205c84d0b209c215212a3cdfc50bf1cfb0e0#code
Solidity
40
star
27

op-rs

Rust
37
star
28

how-to-raise-the-gas-limit

Data & code accompanying Paradigm's How to Raise the Gas Limit post.
Jupyter Notebook
33
star
29

foundry-alphanet

Foundry tools for interfacing with Reth Alphanet's bleeding-edge EVM extensions.
Shell
29
star
30

humanizooor

16
star
31

phishing-list

A rapidly-updated list of live phishing domains for consumption by the eth-phishing-detect module
16
star
32

state_growth

Python
15
star
33

homebrew-brew

A homebrew tap
Ruby
12
star
34

.github

7
star
35

evm-inspectors

EVM Execution Hooks.
2
star
36

crypto_colors

Python
1
star