Basic Architecture Overview

The Prysm project has a fairly large codebase with a bunch of pretty interesting components. This page will help you get an idea of how everything fits together, each component's responsibilities, and how exactly this powers the Ethereum 2.0 protocol. Prysm implements the Official Ethereum 2.0 Serenity Specification, which is a collective research and development effort by various teams across the spectrum of the Ethereum core protocol. The spec outlines all the required pieces of functionality to run a full, Casper Proof of Stake enabled blockchain that powers a system of validators proposing and voting on blocks via distributed consensus. We will not be going into the details of the spec itself, but if you're curious to learn more, there are tons of resources to get you up to speed on the state of ETH2.0 research.

Brief Background on Ethereum 2.0's Pieces

Ethereum 2.0 encompasses a distributed network of blockchains called shard chains which are coordinated by a root chain known as a beacon chain. The beacon chain serves as a mechanism to manage a set of proof of stake validators and overall consensus across shards. Shards themselves are similar to the current Ethereum 1.0 chain, which stores blocks containing user/contract generated transactions such as token transfers or cryptokitty purchases. Ethereum 2.0 provides a massive improvement over 1.0 by having over 1000 of these shard chains which help the network process many more transactions in parallel, giving us access to a highly scalable system for mainstream usage.

To accomplish this, the beacon chain runs through a distributed network of nodes known as beacon nodes. Participants who want to secure the network stake 32 ETH to join a set of validators which have the responsibility of voting on and proposing new blocks on this chain. This deposit doesn't come out of nowhere, as validators send their deposit from the ETH 1.0 chain to the 2.0 system by depositing into a smart contract called the Validator Deposit Contract on the 1.0 chain. Prysm ships with a beacon node and a validator client for the full experience of securing the Ethereum 2.0 network.

What Are the Components of Prysm?

Out of the box, when a Prysm node spins up, it starts a variety of services that run in parallel to handle the lifecycle of the beacon chain. In no particular order, Prysm includes:

  • A persistent, key-value store as a database (BoltDB)

  • A peer-to-peer gossip networking framework and server to connect with other beacon nodes across the world (libp2p by Protocol Labs)

  • A public RPC server for anyone to request information about Ethereum 2.0's state, latest block, validator information, and more

  • A beacon node which powers the beacon chain at the core of Ethereum 2.0

  • A validator client which manages a staking user's private/public keys, connects to a beacon node, and acts as a validator in Ethereum 2.0 by staking 32 ETH and participating in proof of stake consensus by proposing and voting on blocks

  • Top notch monitoring and metrics gathering technologies, Grafana and Prometheus to keep track of everything happening across beacon nodes in the network

These are all major pieces of our architecture we'll break down throughout the next few sections in-depth.