ETH2 March Development Update — Prysmatic Labs

Raul Jordan
Prysmatic Labs

--

Q1 Recap

December 1st, 2020, the date eth2 phase 0 finally went live on mainnet, was one of the most special days in our careers. We knew that at that point, the real work and responsibilities were beginning. Since then, we have decided to turn Q1 into a period of pure optimizations, stability improvements, and user experience fixes for everyone using Prysm. We took every single criticism from the community as an opportunity to improve eth2 for all our stakers.

We believe Prysm should eventually reach the point of “set it and forget it”, meaning, you can forget you’re even running a validator while it is stable and securing the network with almost no intervention aside from software updates. At launch, Prysm still had a lot of optimizations we needed to tackle, especially as the number of validators in the network was growing to unprecedented heights. In particular, here are some of the highlights from the start of the year so far:

  • Relentless optimization of attestation aggregation, ensuring Prysm keeps improving its efficiency in use of resources + profitability, designed here by Victor Farazdagi
  • Significant optimizations to block and attestations processing, minimizing the impact on stakers seeing missed proposals or missed votes from their validators
  • Strong focus on stability, documentation, and ensuring Prysm “just runs”. Although we still have a long way to go, we are far more confident in our latest releases’ stability compared to the original mainnet launch
  • Improved focus on security and robustness of p2p networking, entrypoints, peer management, and chain synchronization
  • Revamping important components in our codebase to last the test of time, such as slasher, slashing protection, and building the eth2.0 api standard which all implementations are meant to satisfy

We appreciate all stakers that have chosen to use our software. Our team is dedicated to improving its safety, efficiency, and experience for everyone participating in eth2.

Prysm was also highlighted on Chainstack’s developer activity report regarding contributions and repository activity for our project as the leading client, successfully attracting many outside contributors.

https://chainstack.com/eth2-clients-development-report-2021/?utm_content=154595328&utm_medium=social&utm_source=twitter&hss_channel=tw-978907821663174656

Team Focus

Starting Q2, our team is ramping up our work to achieve the vision we all have for Ethereum. In particular, there are two main areas all stakers should be aware of:

The ETH1 to ETH2 Merge

Although we have done a lot of work already on the sharding part of eth2, it is clear the community values the merge from eth1 to eth2 to leverage all the benefits of proof of stake.

One way to think about the merge is essentially Ethereum’s smart contracts, transactions, EVM, wallets, and everything we all know and love but instead running under a proof of stake engine. Blocks are produced according to the fixed, 12 second schedule from the beacon chain, and instead of miners, proof of stake validators are advancing the chain. This work is a coordinated effort between the developers maintaining eth1 clients such as go-ethereum, and eth2 teams such as ourselves.

Currently, there are two proposals in line to perform this “merge”. Both of them involve communication between eth1 and eth2 nodes. The reason we bundle these together is so that each piece of software does what it performs best: eth2 nodes handle proof of stake consensus and a validator registry, while eth1 nodes handle transactions and the EVM. This way, we can leverage all the expertise that exists in the eth1 core protocol to accelerate progress on “the merge”

https://notes.ethereum.org/m9IX3OkkTveXCCOSzGkUiw

We are focusing on Vitalik’s second proposal, the quick merge also known as the consensus swap. Mikhail has a pull request that implements the second proposal with tremendous amount of support and feedback. Client teams have begun digging into the quick proposal and making quick proof of concept. On the Prysm front, we have begun analyzing the effort and budgeting resources for the quick merge effort. The major components are:

  • Application payload processing. When a beacon node receives a beacon block, they will verify the eth1 component of the block. The beacon node will call eth2_insert_block to the eth1 node.
  • Application payload producing. When a beacon node produces a beacon block, they will call eth2_produce_block to retrieve application payload from the eth1 node. The application payload will then get packaged into the beacon block.
  • On the beacon state side, we will add two fields for application state root and block hash to verify application payload
  • On the beacon block side, we will add application payload and transaction fields
  • Last but not least, we’ll need helpers to format various concrete types into hex strings for the json over rpc communication with eth1 nodes

We are very excited about this effort and we will keep the community updated along the way!

ETH2 First Hard Fork: Altair

An important network upgrade is planned for this summer, called Altair. This upgrade adds a lot of simplifications to the protocol, making it easier to tally up validator participation, rewards, and penalties each epoch in eth2 via better data structures. Additionally, this upgrade will open the doors for eth2 light clients! Given this is the very first upgrade, our team has been thinking significantly about how to best prepare Prysm’s codebase for future upgrades without hurting our code quality.

We started with a tracking issue, and we have been working on the new beacon state Altair package in Prysm. Most of the new data structures such as sync committee, beacon block, and more for Altair are defined in the upstream ethereumapi repo. The core processing logic is mostly done, we just need to incorporate it with the new beacon state Altair. After all that, we will incorporate the Altair spec test to ensure that we align with the spec implementation. Expect more updates from us in the next update while we are gearing up for a Q2 hard fork.

Thinking Ahead

Miner Extractable Value and ETH2

We believe Miner Extractable Value, known as MEV, is one of the greatest problems in Ethereum today, and will continue being one in eth2 if we do not address it early. For those unfamiliar, MEV is the fact that consensus participants have an unfair advantage in their power to order transactions put into blocks in Ethereum. That is, miners today have the power to reorganize and frontrun everyone’s transactions on Ethereum if desired, making Ethereum less appealing to use and skyrocketing the fee markets that exist today for transactions.

https://explore.flashbots.net/ MEV is a big problem in Ethereum if it goes unchecked. The flashbots team has done a ton of work on illuminating just how big the market is! https://explore.flashbots.net/

The flashbots team is doing full-time work on the problem of MEV. In eth2, the power dynamics shift from miners to validators, but the incentives remain the same. Given eth2 is powered by proof of stake and a strong concept of “chain finality” enshrined into the protocol, there are several open questions we need to think about. Our team is working with flashbots on identifying how MEV fits into eth2 and identifying important decisions we can make today to improve the usage of Ethereum in the future.

On the Immediate Horizon

Optimized Prysm Slasher

Slashing is integral to the security of Ethereum proof of stake. Currently, the Prysm slasher can do its job but suffers in times of network instability and if finality is ever stalled. During those times, catching slashable offenses is more critical than ever. Our original slasher did not consider many important design considerations for it to become bulletproof software. This past quarter, we dedicated a lot of time to designing, revamping, and writing the highest quality code we could bring to our stakers in our new slasher implementation. Following in the footsteps of Protolambda’s github.com/protolambda/eth2-surround documentation, and Sigma Prime’s work on a slasher implementation in Rust, we designed the Prysm slasher from first principles here and are thrilled to ship it to all stakers after continued, internal testing over the coming weeks.

Web UI Version 1.0 Release

Before mainnet, we released a Prysm web UI with the goal of making eth2 staking more accessible to users that are not command-line experts. In a “beta” release announcement https://medium.com/prysmatic-labs/prysm-eth2-client-web-interface-now-live-feb278f4aa15, we included the option to run Prysm with a — web flag, allowing stakers to have a small web application to perform some important tasks for their validator, such as importing validating keys, viewing their recent performance, and checking some information about the network. Since then and due to important priorities of optimization, security, and stability, we have placed less emphasis on user experience. In the immediate horizon, we are working on finally releasing a “version 1.0” of the Prysm web UI, which will have parity in terms of features with the Prysm validator CLI. This means that everything you can do via the command line using your validator, you will be able to perform using the web UI as well!

The purpose of the web UI is to be an alternative to the CLI to manage Prysm and run validators. It is not meant to be a block explorer by any means. As such, we will be will making it a lot more useful and relevant to a staker’s validator software process instead of a place to view network stats. We are aiming to release Prysm Web V1 this Q2.

Developer Wiki

Our philosophy as a team is that core development is not about mastering jargon or obscure knowledge, but rather about good problem solving and teamwork skills. Many of us on the team were not experts in Ethereum before we started working at Prysmatic Labs, but we brought our expertise in software design and development process to write sound code for the protocol.

A lot of what we do on a day-to-day basis involves designing important parts of the architecture behind eth2. We believe we can better service open source if we can capture key Prysm knowledge in a comprehensive developer wiki. The wiki will help everyone understand the design decisions and implementations of various aspects of Prysm by simply reading it. The wiki will also contain recordings of design sessions for certain parts of the code base. We are planning on turning our documentation portal, https://docs.prylabs.network into not only a canonical reference for all things Prysm, but also a hub for how many components of our code were designed as a team. The developer wiki will serve as a reference for contributors and also for anyone curious about how some of the trickiest parts of the protocol work in practice.

Great things are happening to the Ethereum protocol this year, and we will keep releasing monthly development updates to share what we’re working on.

Interested in Contributing?

We are always looking for devs interested in helping us out. If you know Go or Angular and want to contribute to the forefront of research on Ethereum, please drop us a line and we’d be more than happy to help onboard you.

Check out our contributing guidelines and our open projects on Github. Each task and issue is grouped into the Phase 0 milestone along with a specific project it belongs to.

As always, follow us on Twitter or join our Discord server and let us know what you want to help with.

Official, Prysmatic Labs Ether Donation Address

0x9B984D5a03980D8dc0a24506c968465424c81DbE

Official, Prysmatic Labs ENS Name

prysmatic.eth

--

--