The Importance of Client Diversity in Decentralized Networks
It’s no secret that ChainSafe is a proponent of diversity when it comes to client implementations. For some, the reason for this is clear. But for others, it’s worth reiterating the benefits of client diversity and understanding the problem of relying too heavily on a single person, entity, or piece of software.
First, it’s important to note that decentralized systems are generally built on open standards and applications, like peer-to-peer networking protocols, consensus algorithms, runtime specifications, APIs, and open-source software.
One of the most fundamental ways a system can be decentralized is by creating diversity in the implementation of these protocols. Indeed, in blockchain terms, a diverse protocol or node set is essential in promoting network health. Let’s unpack why that’s the case.
Distributing influence
One of the core benefits of client diversity is that it safeguards a network against the pooling of power or control.
A “healthy” decentralized network is one where it’s difficult or impossible for a single person or entity to gain influence. Whereas an “unhealthy” one can be thought of as overly reliant on a single piece of software or outdated technology, thus increasing the chance the network could be hijacked, misdirected, or otherwise compromised.
It’s worth highlighting that this is a risk regardless of whether intentional or unintentional actions are taken — and in this sense, accidents pose as big a threat as bad actors. But both present an obvious problem in systems that aim to eliminate single points of failure or live up to the standard of credible neutrality.
The bottom line is that when you’re using someone else’s software, you become dependent on them and the updates they provide. And suppose a decentralized system relies too much on a single implementation. In that case, that system becomes reliant on an individual or small group of individuals, which invites all of the same issues that plague legacy systems.
Building resilience
The second benefit of client diversity is that it makes a network less vulnerable to undiscovered bugs and exploits.
This is because if one implementation were to fail, the issue is often contained to that software, and node operators can fall back on a client with a different codebase. Conversely, a lack of diversity runs the risk of amplifying the effect of bugs — which, in severe cases, can bring down an entire network.
For instance, some of Solana’s outages were a reminder that many blockchains are far from unstoppable. In this case, what happened to Solana was a denial of service (DoS) attack where a flood of transactions created a memory overflow, which caused many validators to crash, slowing and eventually creating conditions where validators could not agree on the state of the blockchain.
Ethereum suffered a similar attack in 2016 when an out-of-memory error occurred within Go-based Ethereum (Geth) clients bringing block confirmation to a halt. However, in this case, the Parity client was not affected at the same time, and miners were able to simply switch clients.
Most blockchains have to deal with an overdependence on a single node implementation. Indeed, even in a post-merge world where the distribution of usage for consensus layer clients has improved, Ethereum has some issues in regard to execution clients.
Every blockchain should strive to have as many production-grade clients on mainnet as possible, and encourage their use.
Having multiple versions available when needed is also important, as it provides automatic failover to previous iterations should any unexpected event occur in the current version.
The final piece is having clients written in different languages, providing a robust defense-in-depth that ensures tighter security and greater resistance to attacks and unforeseen bugs.
Source: ChainSafe launched Nodewatch to give users insight into the clients running ETH2 consensus, diversity metrics, and more!
Supporting growth
Anyone building a network must think carefully about how to capture developer attention. While client diversity helps eliminate single points of failure, it’s also crucial for growth. And having different implementations increases the number of languages available to potentially interested builders.
Having many clients creates more room to explore ideas, algorithms, and architectures. It can also provide the inherent advantages of different languages, e.g., the binary size, speed, compatibility, etc., and act as a portal to a programming language community.
As Ethereum researcher Danny Ryan put it, “the foundation of a client in a particular language opens and invites experimentation and innovation in that language. The base tooling around the client often snowballs into a robust ecosystem of tools and contributors in that language.”
A knock-on benefit is that having multiple clients means independent developers are in friendly competition. This competition fuels innovation and collaboration, creating solutions oriented toward diverse design goals. These can be targets like performance, security, scaling, user interfaces, etc. And over time, this brings more people into the tent — increasing the range of users and applications within a given ecosystem.
A more decentralized future
ChainSafe is on a mission to build the infrastructure that supports more robust, secure, and decentralized systems. We see this as our commitment to the vision for web3, and to that end, we’re working on new node implementations for various ecosystems.
First, we have Lodestar, our browser-native Ethereum Consensus Implementation built using TypeScript. Our libraries are written in idiomatic TypeScript, making them accessible to a broad swath of developers. Lodestar is production-ready and can run as a full node and eventually will also work as a light client. To learn more about Lodestar, click here.
We’re also working on Forest, which will be a functional feature-complete Rust-based client for the Filecoin ecosystem. Forest will take advantage of the inherent properties of Rust to build a more secure and performant client. To learn more about Forest, click here.
There’s Gossamer, our Polkadot host implementation in Golang. Gossamer will help create stronger networks via additional Polkadot & Kusama node implementations. Gossamer will also make blockchain development more accessible via a Go framework that can be used to build blockchains, including parachains. To learn more about Gossamer, click here.
About ChainSafe
ChainSafe is a leading blockchain research and development firm specializing in infrastructure solutions for web3. Alongside its contributions to major ecosystems such as Ethereum, Polkadot, Filecoin, Mina, and more, ChainSafe creates solutions for developers and teams across the web3 space utilizing our expertise in gaming, bridging, NFTs, and decentralized storage. As part of its mission to build innovative products for users and improved tooling for developers, ChainSafe embodies an open source and community-oriented ethos to advance the future of the internet. To learn more, click here.
Website | Twitter | Linkedin | GitHub | Discord | YouTube
Acknowledgments
Thanks to Dan Forbes, Phil Ngo, Tim Ho, Elizabeth Binks, Lee Raj, Daniel Choi, and Eric Tu for their help in writing this article.