-
Notifications
You must be signed in to change notification settings - Fork 593
Casper Version 2.1 Implementation Guide
vbuterin edited this page Sep 30, 2018
·
1 revision
The Casper/sharding 2.1 spec creates a new chain which will exist alongside the existing Ethereum PoW chain, with the ability to one-way convert "ether 1.0" into "ether 2.0". The new chain will likely launch in several stages, first enabling staking and data-only transactions in a single-chain mode, then introducing sharding, then enabling smart contract execution, and eventually converting the existing 1.0 chain into a smart contract inside of the 2.0 system.
See https://notes.ethereum.org/SCIg8AH5SA-O4C1G1LYZHQ for protocol spec.
For a PoS validator client, the following functionality will be required:
- Deposit: make a transaction on the PoW chain, which sends 32 ETH to a pre-specified "black hole address", specifying the public key used for validation along with a proof-of-possession as well as the withdrawal address and shard. This record will then be picked up by the PoS chain to create a deposit.
- Wait for induction: when you make a deposit, it will take some time until you become a validator. The client will need to determine what the index of the validator slot is, and wait until the validator slot is active.
- Stay online and make attestations: every 16 seconds, a new slot will begin. If the designated proposer for that slot publishes a block that is on what you think is the head of the chain (based on the fork choice rule), then you should attest to it. If the proposer publishes a block that you think is NOT the head of the chain, then you should attest to what you think is the head of the chain. If the proposer publishes nothing for 5 seconds, you should attest to what you think is the head of the chain.
- Propose: you will occasionally be called on as the proposer. When your slot arrives, you should make a block that includes all attestations that you know about, and publish it, along with your own attestation for that block.
- Exit: when you want to exit, you can publish a exit message. You should keep validating until the exit processes.
- Withdraw: once the exit processes, and after you have waited for ~4 months, you can send another transaction to withdraw the funds to the pre-specified withdrawal address.