After two months of additional work since Serenity’s first Python proof-of-concept release, we are excited to announce Serenity PoC2. Now Available. Although the release is far from a testnet-ready client, and much less a production-ready client, PoC2 brings a number of important improvements. Above all, the goal of PoC2 was to implement a complete protocol, including the basic corner cases (bet and deposit cuts), to understand all the details of the protocol and ensure that it actually works in any case. In a very limited testing environment. This goal has been achieved. PoC1 includes only the bare minimum features required to run Casper and EIP 101, while PoC2 includes EIP 101 and 105, which are essentially the full Casper/Serenity protocols.
Specific features not seen in PoC1 but seen in PoC2 are:
- EIP 105 implementation – EIP 105 is a “Sharding Scaffolding” EIP, which will allow for some level of parallelism in Ethereum transaction processing and will lay the foundation for future sharding schemes (not yet determined). It uses the binary tree sharding mechanism described. here By specifying an “activity scope” that limits the addresses that transaction execution can touch, transactions ensure that sets of transactions with separate activity scopes can be processed in parallel. We also introduce SSTOREEXT and SLOADEXT An opcode that allows a contract to access storage at the same address in another shard (if the target shard is within scope of the activity). This mechanism essentially means that the binary shard tree acts as a sub-contract sharding mechanism at the same time as a super-contract sharding mechanism. It means something.
- gas check – An algorithm that matches patterns of transactions to ensure you are paying for gas correctly. Currently, this is achieved by only accepting transactions that go to accounts with a specific portion.Required Account Code” allows the account holder to freely specify two codes: a checker code and a runner code. The checker code is intended to perform quick checks such as signatures and ad-hoc verification, and the pattern matching algorithm provides up to 250,000 checkers to run. The code runner code is intended to perform the expensive operations required to perform a transaction (e.g. calling another contract with 250,000+ gas). The main practical consequence of this is that the user may pay for it. You get gas directly from contracts (e.g. multi-signature wallets, ring signature mixers, etc.) and don’t need to always have a small amount of ETH in your main account to pay for gas – 250,000 gas as long as the contract pays for it. It’s all good if it’s made in-house.
- ring signature mixer – Part of the test.py script now includes instance creation. Ring Signature Verification Agreement It is designed as a mixer. Five users send their public key with a deposit of 0.1 ETH, then address it to a linkable ring signature to withdraw 0.1 ETH. At the same time, (i) everyone who deposits 0.1 ETH guarantees that: You have to withdraw 0.1 ETH exactly once and (ii) you don’t know which withdrawal corresponds to which deposit. This is implemented in a way that is compatible with gas checkers, giving the main advantage that a transaction withdrawing 0.1 ETH does not need to be sent from an additional account that pays gas (currently implementing a ring signature on top of the token). Ethereum needs to do this, which could lead to a potential privacy leak when transferring ETH to that account to pay for gas. Instead, the withdrawal transaction can simply be sent on its own and the gas checker algorithm can verify that the signature is correct and that the mixer pays the miner a fee once the withdrawal transaction is included in the block.
- More accurate figures for interest rates and scoring rule parameters – The scoring rule (i.e. the mechanism that determines how much a validator gets paid based on how they bet) is now a linear combination of a logarithmic scoring rule and a quadratic scoring rule, with the parameters: (i) If you absolutely bet correctly right away and use maximum “courage” (willingness to quickly converge to 100%) on both blocks and state routes, you can earn an expected reward of ~97.28ppb per block, or 50.58% base annualized return . (ii) Everyone pays a penalty of 74ppb per block (~36.98% per year), so the expected net profit from a perfect bet is ~22ppb per block (~10% per year). Betting completely inaccurately on a single block or state route (i.e. betting incorrectly with maximum certainty) will result in over 90% of your deposit being lost, while betting somewhat inaccurately can result in much less extreme but still negative returns. These parameters will continue to be adjusted to ensure that realistic validators can make reasonable profits.
- More accurate validator derivation rules – Up to 250 validators, minimum ETH amount starts at 1250 ETH and increases exaggeratedly according to the formula. Min = 1250 * 250 / (250 – v) where V Current number of active validators (e.g. if there are 125 active validators the minimum would be 2500 ETH, if there were 225 active validators the minimum would be 12500 ETH, if there were 248 active validators the minimum would be 156250 ETH). Once induced, you can bet and profit for up to 30 million seconds (~1 year), after which a special penalty of 100 ppb per block begins to be imposed, making further verification unprofitable. This causes validators to churn.
- New precompile Includes ECADD and ECMUL (important for ring signatures), MODEXP, RLP decoding and “Gas Deposit Agreement” (mechanism used for mandatory account codes to pay for gas). In theory, you could write it in EVM code if you needed to, but that might be the case. There are concerns about efficiency)
- LOG and CREATE redesigned to precompile – For backwards compatibility, the opcode is still present, but simply calls the precompiled address. This is a step in the direction of “abstraction”.
- New mechanism for betting directly on state roots
- Logic to detect and reduce double betting and double blocking
- Logic to reach consensus at that height even if validators produce multiple blocks at that height
Protocol decisions made here are by no means final. Many of them are still actively discussed within research channels. Therefore, the next few rounds of PoC releases will move towards creating something similar to a Serenity node implementation with a proper p2p networking layer, with the end goal being to run a Serenity testnet across multiple computers. At the same time, our research team will continue to study the finer details of the protocol and ensure that every single protocol decision is made correctly and justifiably.
Additionally, we plan to release more accessible materials on the Casper protocol specification and design rationale in the next few weeks. It covers both broad bet-specific consensus concepts as well as specific design decisions, from validator induction rules to betting mechanisms. Block proposer selection.