The Ethereum Foundation is proud to reveal the second proof-of-concept version of Serenity, the widely anticipated Ethereum Protocol upgrade. Although this release is far from production ready, PoC2 offers a few important improvements. The main goal of PoC2 was to implement the full protocol, including corner cases such as slashing stakes and deposits, to make sure that each detail of the protocol is understood and tested in a highly restricted environment. This has been achieved.
In PoC1, only the minimum functionality needed to run the Casper EIP 101 was provided. In comparison, PoC2 includes the full Casper/Serenity Protocol, EIP 101 and EIP 105 included. Below are some features that PoC2 has which were not present in the previous version.
- EIP 105 Execution – EIP 105, or “sharding scaffolding” EIP, enables partial parallelization of Ethereum transaction processing, and lays the groundwork for a future sharding scheme (yet to be determined). The described binary tree fragmentation method is used to allow transactions to define an “activity range”, limiting the addresses that the transaction can execute on. This allows transactions of varying activity levels to be processed in parallel. In addition, it introduces the STOREEXT and SLOADEXT opcodes, which allow contracts to access the same address in different shards (as long as the destination shard is within the activity range); this essentially acts as both a super- and sub-sharding mechanism.
- Gas Check – The algorithm that matches the transaction pattern to ensure appropriate gas payments. Currently, transactions to accounts with a certain portion of the limits are accepted. This allows account holders to set two codes: the broker code and the verifier code. The verifier code can be used for quick verifications such as signing or nonce verification. The pattern matching algorithm allows a maximum of 250,000 gas to be used by the verifier code. The broker code is used for more expensive transactions (e.g. calling another contract worth more than 250,000 gas). This enables users to pay gas directly through contracts (e.g. multisig wallets and ring signature mixers are both possible) without having to have a lot of ETH in the main account for gas payments.
- Ring Signature Mixer – Part of the test.py script now includes the instantiation of a ring signature verification contract. This is a mixer: five users submit their keys with a 0.1 ETH deposit. After that, they can withdraw the 0.1 ETH using a bindable ring sign. This guarantees that (i) all those who deposited 0.1 ETH can only withdraw once, and (ii) no one can identify which withdrawal corresponds with which deposit. This is implemented in a gas-verifier-compliant way, providing the key benefit that the transaction withdrawing the 0.1 ETH does not need to be sent from an additional account that pays for gas (something that a ring signature implementation in addition to the current Ethereum would have to do, resulting in a potential privacy leak when transferring ETH to that account to pay for gas); instead, the withdrawal transaction can simply submit itself, and the gas verifier’s algorithm can validate that the signature is correct and that the mixer will pay a fee to the miner if the withdrawal transaction is included in a block.
- More Accurate Interest Rates and Scoring Parameters – The scoring rule (i.e. the mechanism for determining how much validators are paid based on their stake) is now a linear combination of a logarithmic score and a quadratic score rule. The parameters are: (i) Staking promptly and with maximum accuracy (“bravery”), on both blocks or stateroots, yields an expected reward of 97.28 parts per billion per block, or 50.58% base annual return. (ii) There is a penalty of 74 parts per billion per block, or 36.98% annually, that all pay. The expected net return from staking flawlessly is 22 parts per billion per block, or 10% annually. Betting absolutely incorrectly (i.e. betting with the highest certainty and being wrong) on any individual block or root state will destroy more than 90% of the deposit, and betting slightly wrong will result in a much less extreme but still negative return. To ensure realistic validators that can be reasonably profitable, these parameters will be regularly refined.
- More Precise Validator Induction Rules – Maximum of 250 validators. The minimum amount of ether is 1250 ETH, increasing hyperbolically with the formula min = 1250 * 250 / (250 – v), where