Ray is an open-source Ethereum Beacon Node implementation crafted for educational purposes. It offers a hands-on learning experience for those looking to understand the intricacies of Beacon Node implementation.
Photo by Marc-Olivier Jodoin on Unsplash
This project Ray
provides developers with an opportunity to learn how to implement Beacon Node via running the node or reading the source codes. We're focusing to networking, so some components needed to implement a BeaconNode (e.g. BeaconChain) are borrowed from lighthouse, which is an Ethereum consensus client in Rust.
Ray is never production ready but should be enough to learn from.
NOTE: Ray is under active development.
We aim for a simple implementation, by narrowing down the functions.
- Available on only macOS
- Runs for Prater testnet
- Görli testnet has been merged with the Prater proof-of-stake beacon chain.
- https://github.com/eth-clients/goerli
- Node discovery
- RPC
- Sync the Beacon Chain
You need a recent Rust toolchain to get started. If you don't have one already, check out Install Rust. Once you do that, you can just use cargo
as specified below.
git clone https://github.com/ackintosh/ray.git
cd ray
RUST_LOG=ray=info cargo run
The following diagram shows the modules and how they work. This should help you get a brief understanding of Ray and assist with code reading.
Here are the specifications / documentations that Consensus Layer Implementers should refer to.
- https://github.com/ethereum/consensus-specs
- https://github.com/ethereum/devp2p
- https://github.com/ethereum/beacon-metrics
- Whiteboard Series with NEAR | Ep: 44 Adrian Manning from Sigma Prime
-
We'll explore how the nodes communicate and for what reason. This will include Discovery v5, libp2p, Gossipsub, and the Eth2 RPC.
-
- Infinite Jungle by Galaxy is a podcast about the evolution of Ethereum. Hosted weekly by Galaxy Research’s Christine Kim, the show dives into the ways Ethereum as an ecosystem is changing, covering broad trends and narratives that are shaping the way people use Ethereum and think about the value of Ethereum.
Authored and maintained by ackintosh.
GitHub @ackintosh / Twitter @NAKANO_Akihito