What are light clients...
...and why should I care about them? I'm glad you asked, or maybe you didn't. I certainly don't have all the answers but I'm hoping to explore answers to this question below. Before we get started, I'm assuming you have some base level of understanding about what blockchains are and specifically what Ethereum is, the specific blockchain that I have in view when I'm talking about light clients.
First, let's start by defining some terms that are important when we talk about light clients.
A client or a node is a general term for a piece of software that runs a blockchain, in our case, Ethereum.
A blockchain as a distributed ledger of transactions where each node or client maintains its own copy of of the ledger
Chain history is just the complete chain of blocks since the beginning of the chain
Chain state refers to the complete current "state" of Ethereum, all the account balances, which accounts hold which NFTs, which smart contracts are active, what snapshot votes have been recorded on chain, the current list of delegates running your preferred DAO, etc.
Now, let's jump in!
What is a light client not? Explain it to me like I’m 5
I probably can't explain it to you're like you're 5, but I'll do my best to explain what it is. First off, what is not a light client? The opposite of a light client is a "full node" (never have I heard it referred to as a "full client", oddly enough). A light client does not maintain the complete history of the chain. It does not process every block broadcast to the network and validate all the transactions within it. It should not need to be on all the time. It does not hold the entire Ethereum state. These are all things that generally describe a full node. While full nodes can still technically run on someone's laptop, or a Raspberry Pi, most people don't run full nodes at home.
Why would I want to run a full node at home?
You might want to run a full node at home if you are a solo staker on the beacon chain, if you are a self-sovereign human wanting to do-it-yourself, if you're worried signing malicious transactions due to hackers or you're in a country where the major web3 service providers suddenly decide to start blocking your transactions completely. That said, running a full node is hard for most people. You have to have the hardware for it (or pay for a cloud service). You have to configure Metamask or your wallet app to use it. You've got to keep an eye on it and make sure it doesn't crash. It's just not that easy for most people.
So what's a light client?
That's a complicated question to which there are many answers. For now, let's talk about the traditional Ethereum light client. Light clients have always been a goal of the Ethereum blockchain, basically to allow individuals to run a lightweight piece of software locally that can achieve something like trustless interaction with the blockchain without having to run a full node on your own machine all the time. The Light Ethereum Subprotocol is a specification for a light client that doesn't have to store the entire chain history or state. Instead, it asks full nodes for this data and uses some math/cryptography magic to ensure that the data it gets from full nodes is not invalid. A complete exploration of how this all works is beyond the scope of this article but lets assume that it works. Light clients can connect to full nodes and access block data, account balances, send transactions, etc in a relatively trustless way and the light client can run on your phone. Better yet, it's embedded directly in the apps you use and you never have to actually think about it but they just work, and provide you a more reliable and trustless way to send your transactions then just counting on Infura to always be up, to not block your transactions, and to never send you malicious data. That all sounds great. In fact, it's what the Status app does already.
What's wrong with this picture?
It all sounds great. Light clients can trustlessly get the data they need to allow end users to send transactions, participate in the next big free mint, farm whatever yield is left in Defi and Infura's business model is officially done...except it isn't. Perhaps the biggest problem with the original Ethereum light client model is that it's a very web 2.0 client/server model where the light clients are dependent on the full nodes to actually get anything done. The full nodes on the network have to opt in to interacting with light clients and there's currently no incentive for them to do so. To be a full node that serves the data needs of light clients, you have to have your node running on a server where it can be reached by anyone and have to be willing to serve those light client requests to anyone who asks and most full nodes don't. Which leaves light clients with no where to go and serving no purpose, so all the mobile wallets, all the dapps, all the consumer facing applications are left depending on Infura or Alchemy.
What if there was another way? We'll think about alternative models for light clients in future posts.
P.S. If you want a much deeper and more technical look at the shortcomings of the Ethereum LES protocol and the clients that use it, this series of posts is an invaluable reference.
- Loading comments...