2021-08-18 14:45:23 +00:00
# Ethereum Proof-of-Stake Consensus Specifications
2018-09-24 01:52:52 +00:00
2020-09-14 19:29:19 +00:00
[![Join the chat at https://discord.gg/qGpsxSA ](https://img.shields.io/badge/chat-on%20discord-blue.svg )](https://discord.gg/qGpsxSA) [![Join the chat at https://gitter.im/ethereum/sharding ](https://badges.gitter.im/ethereum/sharding.svg )](https://gitter.im/ethereum/sharding?utm_source=badge& utm_medium=badge& utm_campaign=pr-badge& utm_content=badge)
2018-12-15 14:28:13 +00:00
2021-08-18 14:45:23 +00:00
To learn more about proof-of-stake and sharding, see the [PoS FAQ ](https://eth.wiki/en/concepts/proof-of-stake-faqs ), [sharding FAQ ](https://eth.wiki/sharding/Sharding-FAQs ) and the [research compendium ](https://notes.ethereum.org/s/H1PGqDhpm ).
2018-11-06 08:02:55 +00:00
2021-08-18 14:45:23 +00:00
This repository hosts the current Ethereum proof-of-stake specifications. Discussions about design rationale and proposed changes can be brought up and discussed as issues. Solidified, agreed-upon changes to the spec can be made through pull requests.
2018-11-15 22:52:06 +00:00
2019-03-27 16:36:15 +00:00
## Specs
2018-11-15 22:52:06 +00:00
2020-05-06 10:03:48 +00:00
[![GitHub release ](https://img.shields.io/github/v/release/ethereum/eth2.0-specs )](https://github.com/ethereum/eth2.0-specs/releases/) [![PyPI version ](https://badge.fury.io/py/eth2spec.svg )](https://badge.fury.io/py/eth2spec)
2021-08-18 14:45:23 +00:00
Core specifications for Ethereum proof-of-stake clients can be found in [specs ](specs/ ). These are divided into features.
2021-03-27 00:10:13 +00:00
Features are researched and developed in parallel, and then consolidated into sequential upgrades when ready.
2020-05-06 10:03:48 +00:00
2021-03-27 00:10:13 +00:00
The current features are:
2019-04-24 19:41:41 +00:00
2019-04-24 19:43:07 +00:00
### Phase 0
2020-12-18 11:03:05 +00:00
2020-01-10 18:42:55 +00:00
* [The Beacon Chain ](specs/phase0/beacon-chain.md )
2020-05-05 18:10:43 +00:00
* [Beacon Chain Fork Choice ](specs/phase0/fork-choice.md )
2020-01-10 18:42:55 +00:00
* [Deposit Contract ](specs/phase0/deposit-contract.md )
* [Honest Validator ](specs/phase0/validator.md )
2020-01-13 17:55:21 +00:00
* [P2P Networking ](specs/phase0/p2p-interface.md )
2021-05-12 14:29:42 +00:00
* [Weak Subjectivity ](specs/phase0/weak-subjectivity.md )
2019-04-24 19:43:07 +00:00
2021-03-11 13:22:38 +00:00
### Altair
2020-12-18 11:03:05 +00:00
2021-03-11 13:22:38 +00:00
* [Beacon chain changes ](specs/altair/beacon-chain.md )
* [Altair fork ](specs/altair/fork.md )
* [Light client sync protocol ](specs/altair/sync-protocol.md )
2021-03-30 05:48:40 +00:00
* [Honest Validator guide changes ](specs/altair/validator.md )
2021-04-27 18:42:39 +00:00
* [P2P Networking ](specs/altair/p2p-interface.md )
2020-12-18 11:03:05 +00:00
### Merge
2019-07-11 17:22:08 +00:00
2021-06-22 23:15:56 +00:00
The merge is still actively in development. The exact specification has not been formally accepted as final and details are still subject to change.
2019-04-24 19:43:07 +00:00
2021-03-27 00:10:13 +00:00
* Background material:
* An [ethresear.ch ](https://ethresear.ch ) post [describing the basic mechanism ](https://ethresear.ch/t/the-eth1-eth2-transition/6265 )
* [ethereum.org ](https://ethereum.org ) high-level description of the merge [here ](https://ethereum.org/en/eth2/docking/ )
* Specifications:
* [Beacon Chain changes ](specs/merge/beacon-chain.md )
2021-05-31 13:30:54 +00:00
* [Merge fork ](specs/merge/fork.md )
2021-03-27 00:10:13 +00:00
* [Fork Choice changes ](specs/merge/fork-choice.md )
* [Validator additions ](specs/merge/validator.md )
2019-07-11 17:22:08 +00:00
2021-03-17 23:33:07 +00:00
### Sharding
2019-07-11 17:22:08 +00:00
2021-03-17 23:33:07 +00:00
Sharding follows the merge, and is divided into three parts:
2021-03-27 00:10:13 +00:00
* Sharding base functionality - In early engineering phase
2021-03-17 23:33:07 +00:00
* [Beacon Chain changes ](specs/sharding/beacon-chain.md )
* [P2P Network changes ](specs/sharding/p2p-interface.md )
2021-03-27 00:42:23 +00:00
* Custody Game - Ready, dependent on sharding
2021-03-29 23:39:01 +00:00
* [Beacon Chain changes ](specs/custody_game/beacon-chain.md )
2021-03-27 00:42:23 +00:00
* [Validator custody work ](specs/custody_game/validator.md )
2021-03-27 00:10:13 +00:00
* Data Availability Sampling - In active R& D
2021-03-17 23:33:07 +00:00
* Technical details [here ](https://hackmd.io/@HWeNw8hNRimMm2m2GH56Cw/B1YJPGkpD ).
* [Core types and functions ](specs/das/das-core.md )
* [P2P Networking ](specs/das/p2p-interface.md )
* [Fork Choice ](specs/das/fork-choice.md )
* [Sampling process ](specs/das/sampling.md )
2019-07-11 17:22:08 +00:00
2019-04-24 19:43:07 +00:00
### Accompanying documents can be found in [specs](specs) and include:
2020-01-10 18:42:55 +00:00
* [SimpleSerialize (SSZ) spec ](ssz/simple-serialize.md )
* [Merkle proof formats ](ssz/merkle-proofs.md )
* [General test format ](tests/formats/README.md )
2019-03-27 16:36:15 +00:00
2019-08-16 19:35:23 +00:00
## Additional specifications for client implementers
2019-08-19 17:06:37 +00:00
Additional specifications and standards outside of requisite client functionality can be found in the following repos:
2019-08-16 19:35:23 +00:00
2021-08-18 14:45:23 +00:00
* [Beacon APIs ](https://github.com/ethereum/beacon-apis )
* [Beacon Metrics ](https://github.com/ethereum/beacon-metrics/ )
2019-08-16 19:35:23 +00:00
2019-05-06 15:30:32 +00:00
## Design goals
2019-03-27 16:36:15 +00:00
2021-08-18 14:45:23 +00:00
The following are the broad design goals for the Ethereum proof-of-stake consensus specifications:
2018-11-15 22:52:06 +00:00
* to minimize complexity, even at the cost of some losses in efficiency
2018-11-26 22:57:01 +00:00
* to remain live through major network partitions and when very large portions of nodes go offline
2018-11-15 22:52:06 +00:00
* to select all components such that they are either quantum secure or can be easily swapped out for quantum secure counterparts when available
* to utilize crypto and design techniques that allow for a large participation of validators in total and per unit time
* to allow for a typical consumer laptop with `O(C)` resources to process/validate `O(1)` shards (including any system level validation such as the beacon chain)
2019-03-27 16:36:15 +00:00
2019-08-16 17:01:48 +00:00
## Useful external resources
* [Design Rationale ](https://notes.ethereum.org/s/rkhCgQteN# )
* [Phase 0 Onboarding Document ](https://notes.ethereum.org/s/Bkn3zpwxB )
2020-03-11 20:52:31 +00:00
* [Combining GHOST and Casper paper ](https://arxiv.org/abs/2003.03052 )
2019-08-16 17:01:48 +00:00
2019-03-27 16:36:15 +00:00
## For spec contributors
Documentation on the different components used during spec writing can be found here:
2020-01-10 18:42:55 +00:00
* [YAML Test Generators ](tests/generators/README.md )
* [Executable Python Spec, with Py-tests ](tests/core/pyspec/README.md )
2021-08-18 14:45:23 +00:00
## Consensus spec tests
Conformance tests built from the executable python spec are available in the [Ethereum Proof-of-Stake Consensus Spec Tests ](https://github.com/ethereum/consensus-spec-tests ) repo. Compressed tarballs are available in [releases ](https://github.com/ethereum/consensus-spec-tests/releases ).