After two months of additional work after the release of the first python proof of concept release of serenity, I am happy to announce that Serenity POC2 is now available. Although the version continues to be far from a customer ready for the testnet, even less ready for production, POC2 brings with it a certain number of important improvements. First and foremost, POC2’s objective was to implement the complete protocol, including basic angle cases (Paris and typing deposits), in order to ensure that we have the understanding of each detail of the protocol and to see it in action even in a very limited test environment. This objective has been achieved. While POC1 only included the naked minimum features necessary to make Casper and EIP 101 RUN, POC2 essentially includes the complete Casper / Serenity, EIP 101 and 105 inclusive protocol.
The specific characteristics that can be found in POC2 which were not available in POC1 are as follows:
- EIP 105 implementation – EIP 105 is the EIP “of rupture scaffolding”, which will allow the treatment of Ethereum transactions to be somewhat parallelized, and will prepare the ground for a subsequent fragment scheme (which has not yet been determined). He uses the binary fragment mechanism described here To allow transactions to specify an “activity range” which restricts the addresses that the execution of transactions can affect, ensuring that transactions sets with disjoint activity beaches can be treated in parallel. It also presents Sstoreext And Sloadext Opcodes to allow contracts to access the storage of the same address in other bursts (provided that the target shine is in the activity range); This mechanism essentially means that the binary fragment shaft serves as a super-contract rupture mechanism and a sub-contract fragment mechanism at the same time.
- Gas verification – The algorithm which corresponds to a transaction to ensure that it pays the gas correctly. Currently, this is accomplished by accepting only transactions going to accounts which have a particular element of “compulsory account code“, which gives the account holder the freedom to specify two elements of code: the verifier code and the runner code. Users will be able to pay the gas directly outside the contracts (for example, multisig portfolios, sound signature mixers, etc.) and will not always need to always have a small amount of ETH in their main account in order to pay the gas – as long as the payment of the contract is made in the 250,000 gas, everything is good.
- Signature mixer – part of the test script.py now includes the creation of a body of a Ring signature verification contract which is designed as a mixer: five users send their public keys alongside a deposit of 0.1 ETH, then remove the ETH 0.1 specifying the address with a link of the Ring Link, simultaneously guaranteeing that (i) all those who have deposited 0.1 ETH will be able to withdraw 0.1 ETH exactly once, and (II) It is impossible to say what a deposit. This is implemented in a way that complies with the gas verifier, providing the key advantage that the transaction withdrawn ETH 0.1 does not need to be sent from an additional account that pays gas (something that a ring’s signature implementation in addition to the current Ethereum should pay for gas); Instead, the withdrawal transaction can simply be sent by itself, and the gas verifier algorithm can check that the signature is correct and that the mixer will pay the fees to the minor if the withdrawal transaction is included in a block.
- More specific numbers on interest rates and rating rule parameters -The rating rule (i.e. the mechanism which determines the quantity of validators paid according to the way in which they bet) is now a linear combination of a logarithmic rating rule and a quadratic rating rule, and the parameters are such that: (i) the bets absolutely immediately and with the states that await you 100%) on the two blocks and the status billion 50.58% basic annual yield, (II), there is a penalty of 74 parts per billion per block, ~ 36.98% annual, that everyone pays, so the expected net yield of bets is perfectly is ~ 22 parts per billion per block, or ~ 10% annual. Bets absolutely incorrectly (that is, betting with maximum certainty and the fact of being mistaken) on any block or state root will destroy> 90% of your deposit, and the bet a little incorrectly cause a much less extreme but negative yield. These parameters will continue to be adjusted to ensure that realistic validators can be reasonably profitable.
- More precise validator induction rules – Maximum 250 validators, the quantity of minimum ether begins at 1250 ETH and rises hyperbolically with the formula min = 1250 * 250 / (250 – V) Or V is the current active number of validators (that is to say if there are 125 active validators, the minimum becomes 2500 ETH, if there are 225 active validators, it becomes 12,500 ETH, if there are 248 active validators, it becomes 156250 ETH). When you are inducted, you can make bets and gain profits up to 30 million seconds (~ 1 year), and after this point, a special penalty of 100 parts per billion per block begins to nail itself, making additional validation not profitable; This obliges the unsubscribe of the validator.
- New pre -compiles Including Ecadd and ECMUL (criticism for annual signatures), Modexp, RLP decoding and the “gas deposit contract” (a mechanism used in the compulsory account code to pay gas; theoretically, it could be written in EVM code if necessary, but there may be problems with efficiency with this)
- Rearchitecting of log and create as precompiled – OPCODES still exist for rear compatibility purposes, but they simply call the precompiled addresses. This is another movement in the sense of “abstraction”.
- New betting mechanism directly on state roots
- Logic to detect and reduce double bets and double blocks
- Logic to pay consensus at a height even if a validator has produced several blocks at this height
The protocol decisions taken here are in no way definitively; Many of them are still actively debated in the research channels. The next POC versions cycles will thus evolve towards the creation of something that resembles an implementation of Serenity node, alongside an appropriate P2P networking layer, with the possible objective of performing a serenity test between several computers; At the same time, our research team will continue to hammer the finest details of the protocol and ensure that each protocol decision is taken correctly and well justified.
In addition, we will publish more accessible materials on the specification of the Casper Protocol and the design justification in the coming weeks, covering both the broad concept consensus by BET as well as specific design decisions ranging from the validator induction rules to the Paris mechanisms and the selection of block proposers.