Ethereum 2.0 Specifications
Go to file
Alex Vlasov 020895e35d
Typing problems fixes (#2271)
* Typing problem fixed: `process_block_header` passes `Bytes32()` to `state_root` of `BeaconBlockHeader`, which type is `Root`

* Typing problem fixed in `initialize_beacon_state_from_eth1`: `len` returns an `int` value, while `deposit_count=uint64` of `Eth1Data` has type `uint64`

* Typing problem fixed in `process_rewards_and_penalties`: `numerator` of type `int` passed to `weight` parameter of `get_flag_index_deltas`, which has type `uint64`

* Typing problem fixed in `process_attestation`; `False` passes as `crosslink_success` parameter of `PendingAttestation`, which has type `boolean`. `False` is an instance of `(python.)bool` and is not an instance of `(ssz.)boolean`

* Typing problem fixed: `shard_data_roots` of `ShardTransition` has type `List[Bytes32]`, but its elements are used as if they were `Root` values, e.g. in `process_chunk_challenge` method: passed to `data_root` of `CustodyChunkChallengeRecord` which has type `Root`

* Typing problem fixed in `process_custody_final_updates`: `index` has type `int`, while `validator_indices_in_records` has type `Set[ValidatorIndex]`, so tesing whether `index in validator_indices_in_records` can be risky, depending on implementation details. `ValidatorIndex(index) in validator_indices_in_records` is a safer variant.

* Typing problem fixed: `slashed` parameter of `pack_compact_validator` has type `(python.)bool`, however in `committee_to_compact_committee` a value of `(ssz.)boolean` is passed as a value of the parameter

* Typing problem fixed: `inactivity_scores` is a `List[uint64,...]`, while it is intialized/appended with values of `(python.)int` type

* fixed according to @protolambda suggestions

* changed types of _WEIGHT constants and appropriate variables/parameters, according to @protolambda suggestions

* revert code formatting back

* Introduced ZERO_ROOT according to @protolambda 's suggestion

* Reverted back to , according to @protolambda comments
2021-03-25 22:03:21 +01:00
.circleci Bump `py_ecc` and `milagro_bls_binding` (#2169) 2021-01-05 21:00:52 +08:00
configs Update config files, add `DOMAIN_SYNC_COMMITTEE_SELECTION_PROOF` and `DOMAIN_CONTRIBUTION_AND_PROOF` 2021-03-23 20:52:03 +08:00
solidity_deposit_contract Update solidity_deposit_contract/README.md 2020-09-14 15:10:18 +02:00
specs Typing problems fixes (#2271) 2021-03-25 22:03:21 +01:00
ssz Minor update ToC 2020-12-07 11:10:19 +08:00
tests patch test_filtered_block_tree test generator based on @ajsutton report 2021-03-24 12:57:14 -06:00
.codespell-whitelist Set codespell<3.0.0,>=2.0.0 version and add `ether` to whitelist 2020-12-07 11:08:54 +08:00
.gitattributes Update the docs and remove unused code 2020-08-18 00:58:08 +08:00
.gitignore LIGHTCLIENT_PATCH/HF1 -> ALTAIR 2021-03-11 21:32:00 +08:00
.gitmodules WIP: add solidity deposit contract CI workflow 2020-08-17 23:37:33 +08:00
LICENSE CC0 1.0 Universal for repo 2019-03-12 11:59:08 +00:00
Makefile Add Makefile commands `detect_generator_error_log` and `detect_generator_incomplete` 2021-03-17 02:45:52 +08:00
README.md LIGHTCLIENT_PATCH/HF1 -> ALTAIR 2021-03-11 21:32:00 +08:00
linter.ini Set linter configs in `linter.ini` 2020-06-18 14:36:14 +08:00
setup.py Executable Altair validator guide 2021-03-19 23:38:59 +08:00

README.md

Ethereum 2.0 Specifications

Join the chat at https://discord.gg/qGpsxSA Join the chat at https://gitter.im/ethereum/sharding

To learn more about sharding and Ethereum 2.0 (Serenity), see the sharding FAQ and the research compendium.

This repository hosts the current Eth2 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.

Specs

GitHub release PyPI version

Core specifications for Eth2 clients be found in specs. These are divided into phases. Each subsequent phase depends upon the prior. The current phases specified are:

Phase 0

Altair

Sharding

The sharding spec is still actively in R&D; see the most recent available pull request here and some technical details here.

Merge

The merge is still actively in R&D; see an ethresear.ch post describing the proposed basic mechanism here and the section of ethereum.org describing the merge at a high level here.

Accompanying documents can be found in specs and include:

Additional specifications for client implementers

Additional specifications and standards outside of requisite client functionality can be found in the following repos:

Design goals

The following are the broad design goals for Ethereum 2.0:

  • to minimize complexity, even at the cost of some losses in efficiency
  • to remain live through major network partitions and when very large portions of nodes go offline
  • 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)

Useful external resources

For spec contributors

Documentation on the different components used during spec writing can be found here: