lighthouse/docs/serenity.md
Paul Hauner 35c914baa6
Revert "Merge pull request #200 from sigp/new-structure"
This reverts commit d7a3545be1, reversing
changes made to 1da06c156c.
2019-02-14 12:09:18 +11:00

7.9 KiB

Ethereum Serenity

This document aims at providing a high level understanding of Ethereum and the Serenity phase of the Ethereum roadmap.

The Blockchain

A blockchain can be seen as a decentralized, distributed ledger. The ledger of transactions is replicated onto all nodes in the network. When a transaction occurs, it is first propagated to the nodes. Once the nodes receive the transaction, and verifies the correctness, the nodes attempt to batch the transactions into a block and append the block to the ledger. Once the ledger has been successfully appended onto, they propagate the block to the network. If accepted, this block now becomes the latest block in the chain. If two people propose a block at the same time, the one canonical blockchain forks. At this point it must be resolved, and each system has it's own way of resolving these forks.

Blockchain

Figure 1. Example blockchain with a resolved fork.

The idea of the blockchain was first proposed in the seminal Bitcoin whitepaper by Satoshi Nakamoto. Since then, a vast number of updates and blockchains have taken shape providing different functionality or properties to the original blockchain.

What is Ethereum?

Ethereum is an open blockchain protocol, allowing for the building and use of decentralized applications that run on blockchain technology. Ethereum was one of the initial platforms providing turing-complete code to be run on the blockchain, allowing for conditional payments to occur through the use of this code. Since then, Ethereum has advanced to allow for a number of Decentralized Applications (DApps) to be developed and run completely with the blockchain as the backbone.

General Ethereum Introduction:

Proof-of-Work and the current state of Ethereum.

Currently, Ethereum is based on the Proof-of-Work model, a Sybil resilient mechanism to allow nodes to propose blocks to the network. Although it provides properties that allow the blockchain to operate in an open, public (permissionless) network, it faces it's challenges and as a result impacts the operation of the blockchain.

The main goals to advance Ethereum is to (1) increase the scalability and overall transaction processing power of the Ethereum world computer and (2) find a suitable replacement for Proof-of-Work that still provides the necessary properties that we need.

Serenity

Ethereum Serenity refers to a new blockchain system currently under development by the Ethereum Foundation and the Ethereum community.

As part of the original Ethereum roadmap [1] [2], the Proof-of-Stake integration falls under Release Step 4: Serenity. With this, a number of changes are to be made to the current Ethereum protocol to incorporate some of the new Proof-of-Stake mechanisms as well as improve on some of the hindrances faced by the current Proof-of-Work chain.

To now advance the current Ethereum, the decision is made to move to a sharded Beacon chain structure where multiple shard-chains will be operating and interacting with a central beacon chain.The Serenity blockchain consists of 1,025 proof-of-stake blockchains. This includes the "beacon chain" and 1,024 "shard chains".

Ethereum Serenity is also known as "Ethereum 2.0" and "Shasper". We prefer Serenity as it more accurately reflects the established Ethereum roadmap (plus we think it's a nice name).

(Be mindful, the specifications change occasionally, so check these to keep up to date)

Beacon Chain

The concept of a beacon chain differs from existing blockchains, such as Bitcoin and Ethereum, in that it doesn't process transactions per se. Instead, it maintains a set of bonded (staked) validators and coordinates these to provide services to a static set of sub-blockchains (i.e. shards). Each of these shard blockchains processes normal transactions (e.g. "Transfer 5 ETH from A to B") in parallel whilst deferring consensus mechanisms to the beacon chain.

Major services provided by the beacon chain to its shards include the following:

  • A source of entropy, likely using a RANDAO + VDF scheme.
  • Validator management, including:
    • Inducting and ejecting validators.
    • Assigning randomly-shuffled subsets of validators to particular shards.
    • Penalizing and rewarding validators.
  • Proof-of-stake consensus for shard chain blocks.

Shard Chains

Shards are analogous to CPU cores - they're a resource where transactions can execute in series (one-after-another). Presently, Ethereum is single-core and can only fully process one transaction at a time. Sharding allows processing of multiple transactions simultaneously, greatly increasing the per-second transaction capacity of Ethereum.

Each shard uses a proof-of-stake consensus mechanism and shares its validators (stakers) with other shards. The beacon chain rotates validators pseudo-randomly between different shards. Shards will likely be the basis of layer-2 transaction processing schemes, however, that is not in scope of this discussion.

The Proof-of-Work Chain

The present-Ethereum proof-of-work (PoW) chain will host a smart contract that enables accounts to deposit 32 ETH, a BLS public key, and some other parameters, allowing them to become beacon chain validators. Each beacon chain will reference a PoW block hash allowing PoW clients to use the beacon chain as a source of Casper FFG finality, if desired.

It is a requirement that ETH can move freely between shard chains, as well as between Serenity and present-Ethereum blockchains. The exact mechanics of these transfers remain an active topic of research and their details are yet to be confirmed.

Serenity Progress

Ethereum Serenity is not fully specified and a working implementation does not yet exist. Some teams have demos available which indicate progress, but do not constitute a complete product. We look forward to providing user functionality once we are ready to provide a minimum-viable user experience.

The work-in-progress specifications live in the ethereum/eth2.0-specs repository. There is active discussion about the specification in the ethereum/sharding gitter channel. A proof-of-concept implementation in Python is available at ethereum/beacon_chain.

Presently, the specification focuses almost exclusively on the beacon chain, as it is the focus of current development efforts. Progress on shard chain specification will soon follow.