For all the eth2 folks out there, we have become accustomed to occasional testnet restarts as they bring positive progress. Testnet restarts enable us to bring in new features, improvements and bug fixes that improve the overall user experience. We’ve come a long way from having a short-lived set of testnets back in May of 2019, now having a running chain for 2 full months since November! Now, it is time again for evolution and to bring in a massive set of changes that will get us a lot closer to the mainnet release. We are restarting our testnet updating it to a mainnet parameter configuration with over 24,000 validators. This is still a testnet with fake ETH, but is now capable of handling the load of eth2 mainnet.
In the previous iteration, our testnet used a minimal config which requires 64 validators to kick off chain, 12 seconds per slot and 8 slots per epoch. In mainnet config, it’s 16384 validators to kick off chain, 12 seconds per slot and 32 slots per epoch. As one can see, mainnet config puts a lot more stress on the overall system due to the increase of validator count and the number of slots in an epoch. With the new testnet on the horizon, it’s important to briefly cover all these new features, the optimizations to solve performance problems, and critical bug fixes that will go into it. We’ll cover each of them in section below
One of the biggest features that got introduced in Q4/2019 is the new role of aggregator. Instead of every attester broadcasting attestations every slot in the same subnet, a better attestation aggregator strategy was introduced. The motivation behind this strategy is to provide better stability for gossipsub networking channel Given such change, we had to redesign a bunch of stuff, from attestation pool storing attestations in cache to network sync service logic for proper handling both unaggregated and aggregated attestations from the network. See work: 4223, 4286, 4347, 4376, 4408, 4159, 4240
A new hardening logic was introduced to prevent attestations having duplicated validator indices. See work: 4339
To activate a validator, there must be a new finalized epoch: 4359
At last, the custody bit field was removed from the attestation structure for a clean phase 0 rebase. See work: 3986
Lots of optimizations are going in the new testnet. Mainly because running mainnet config is not an easy task due to the increase of state size and validator count to 16384. The optimization improvements came from multiple areas. Starting from our deposits trie, changing how we store deposits gave us O(n) -> O(log n) improvements for saving and verifying. See work: 4299, 4329, 4386, 4384
We updated validator assignment logic and committee helpers in our back end services to be more efficient given a single beacon node has to respond to more validator requests than the previous minimal config. See work: 4294
Tree hashing the state was a big bottleneck so we implemented a fully customized version of the canonical Eth2 serialization method called SSZ. It enabled highly specialized caches for state fields. Now to add a root to a field, the node only needs to recompute a branch which changed up the state trie. See work: 4421
Refactored core committee helpers to facilitate less cloning of beacon state which significantly improved run time performance: 4328
Snappy compression for DB is now enabled by default, it cuts down disk size of the running beacon node: 4157
🐛 Bug fixes
The biggest run time bug we encountered in our previous testnet is finality reversion. It’s not a pretty sight to see finality revert and all the gossiping attestations get rejected right out of the door. After working with the research team a few solutions were proposed, see work: 3987, 3989, 3993, 4342, 4341, 4355
And one more bug where a single validator key could occupy multiple validator entries in state. See work: 4322
🎉 The next testnet is set up kick off 2020–01–10 T00:02:00.000Z. We are adding a countdown timer to our testnet site for better visualization. We also accidentally sent 10k extra deposits, the activation queue will be 5 days long. This is going to be great to stress test the overall system. To sign up, follow this guide, and hop in our discord with any questions. Looking forward to seeing everyone as validators in our testnet 🔥
Interested in Contributing?
We are always looking for devs interested in helping us out. If you know Go or Solidity 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 :).
Official, Prysmatic Labs Ether Donation Address
Official, Prysmatic Labs ENS Name