Teku + Infura to 2.0: How to Handle Attestations
As the clock ticks down to the Merge, the Teku and Infura teams have made some important discoveries and improvements, including one that validators linked to a remote beacon node could have significant performance issues: specifically, a lot of missed attestations
As the clock ticks down to the Merge, the Teku and Infura teams have continued refining their collaboration. In case you missed it, these two teams have created an eye-poppingly fast Ethereum 2.0 client sync experience. Since then, they have continued refining their integration and made some important discoveries and improvements.
Attestations with Teku
One of those discoveries was that validators linked to a remote beacon node could have significant performance issues: specifically, a lot of missed attestations. Obviously, this is a pretty crucial issue. It turned out to be not just a problem with a remote beacon node, but specifically a remote beacon node behind load balancers, including Infura’s load balancers.
If you’re interested in the blow-by-blow, check out the Github issue here.
The solution the team came to was to implement an option to disable early attestation publishing when the block is received:
--validators-early-attestations-enabled[=<FALSE>]
Find the full Teku documentation on this issue here.
This option allowed validators connecting to Infura beacon nodes to have performance equivalent to validators connected to a local beacon node, which in and of itself is impressive. It would appear that this is a fix not just for nodes connecting through Infura, but for any context where Teku validators are using load-balanced beacon nodes.
The second innovation the team has made surrounding attestations is batch attestations. This consists of sending all attestations produced for a given slot to the beacon node in a single batch. In the context of Infura, this allows running a lot more validators without hitting rate limits.
The future of history
Another feature that the team has been working on, which isn’t quite ready yet for a full release, is an innovative way to store historical state without having a hard drive the size of the Library of Alexandria.
With increasing adoption of decentralized technology, there is more and more demand, and even novel use cases, for historical chain data. The most top-of-mind for many in the space is tax compliance. Institutions and even individuals are increasingly in need of solutions for being able to query, quickly and cheaply, historical chain data.
Like most great things in this space, the solution being developed uses Merkle tries. Without getting too deep into the woods (pun intended), as it’s not finished yet, the technique essentially takes the difference between slots and stores the branch updates. The applicability for this is tremendous, so watch this space for more updates.
Safety through Diversity
As we approach the reality of Ethereum 2.0, more and more voices are calling out a topic of vital importance: client diversity. The Ethereum Proof of Work consensus mechanism is, at this point, venerable and battle-tested, at least in blockchain terms, and is resistant to 51% of attacks. As the network transitions to Proof of Stake, the threat remains that a single Ethereum client will be running on a majority of validator nodes. This opens the door not only for a malicious attack, but also for single points of failure bringing down the entire network.
For more explanation, check out this very readable primer that should bring a lot of issues into focus. There are so many reasons to make the move to a Proof-of-Stake consensus model, and the network is on track to do so. It would be a stunning failure of vision and quite simply, wildly unsafe to move Ethereum to a PoS network that has a majority of any Ethereum client.
Even if we were to assume that all clients were going to act in the best interests of the network as a whole, which in and of itself is a leap most aren’t willing to take, the Ethereum network is a sprawling global entity with external dependencies. No client should be able to be a single point of failure for the entire network.
As we build the Beacon Chain and validators up and out, client diversity must be included as an essential consideration.
Learn more about Infura’s Eth2 API here and sign up for a free account.