New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Today Verkle + Tomorrow ZK = Everything Stateless, Everything Lightclient

Devcon 7 SEAWed, Nov 13, 2024, 09:57 AM · 24:25

Statelessness could be one of the biggest unlocks in the Ethereum ecosystem, allowing the protocol to scale massively without giving away control and access to big entities, all while providing some real 'teeth' to the light client ecosystem. In this talk, we’ll see how stateless clients enable immediate scalability and decentralization benefits, and how combining statelessness with ZKing the state transitions unlocks Ethereum’s long-term vision.

Transcript

Hey everyone, our talk is called today Virkle plus tomorrow's EK equals everything stateless, everything like client. So my name is Jason Chaskin. I do various different research projects at the Ethereum Foundation. And in the first half of the talk, I'm going to give a high level kind of beginner to intermediate So my name is Jason Chaskin. I do various different research projects at the Ethereum Foundation.

And in the first half of the talk, I'm going to give a high-level kind of beginner to intermediate overview of the benefit of stateless clients and what they are. And I'm Gajinder, and I'm a co-developer, and I do a little bit of research as well. So I'll talk about the endgame of ZK Ethereum. Yeah, so before I go into explaining kind of what stateless clients are and how they work, I think it's worth it to give a quick shout-out to the stateless clients teams and everyone else that's researching stateless clients because I'm just somebody that tries to explain them simply, but without the hard work of people like Yom, who just spoke, Ignacio, Josh, and so many other people, like, none of this would be possible. So maybe give a quick round of applause for them.

Okay, so there's some common misconceptions that if you want to run a node, you're just doing it for altruistic reasons or that you need 32 ETH. And neither of those two things are true. There's other reasons, including getting trustless information about the blockchain. Maybe you want to know your balance of ETH and you don't want to trust and fear a centralized RPC. You can run a node yourself.

On top of, instead of asking them, since they don't have a record of all your asks, now you have that private lookup access. We know what Web2 companies do with your data, so we prefer to keep that private. And you also have trustless broadcasting of your transactions. You have direct access to the P2P network if you need to broadcast your transaction. And of course, it strengthens the network decentralization.

So for all these reasons, I wanted to run a node about eight months ago. And also, I felt... Before we go there, who actually does run a node here? months ago. And also, I felt at ‑‑ before we go there, who actually does run a node here?

Please raise your hand. Okay. About a third of the room. And I went to a couple of Vitalik talks and he loves to ask this question. And I never had my hand raised and I felt left out.

And for that reason and the ones I just mentioned, I really wanted to run a node. So about eight months ago I posted on Farcaster, and I tagged BountyCaster because I'm a hardware noob, and I needed help setting it up. So I asked for someone's help to help me run a third, to walk me through running a full node. And thank you to Limes, who's actually in the crowd here, for telling me what hardware to buy and how to set that ETH because it's worth more now. And so the first step I did is I went and I bought the hardware.

I spent 600 bucks to get a new computer and around 150, a little less, to get more storage because you need some more storage to run an Ethereum node. Total cost about $740. And then I actually set up the node. Like I said, I'm a hardware noob, so I kept copying and pasting things into ChatGBT. This process was a lot more confusing than I thought it would be.

It took a couple hours, and I was pretty pumped once I finally got my node syncing, so I took that screenshot there. And then I left my computer and went back a day later, and my node was finally live, processing blocks, totally synced with the network. And this whole process was a pain. I definitely understand why not all the hands were raised. You do get benefits, but it's a really pain to set up the node.

Now I'm going to walk you quickly through why this process took so long. It took over 24 hours to get live. And first, it's because you actually need to get all of the previous blocks. And this process takes time. If you're in blockchains big, you don't necessarily need them all, but you need at least some of the blocks.

And you also have to load up the current state. The current state is the current amount of ETH that all accounts on the network has, as well as the data that's stored in smart contracts. So you need to know that I have two ETH, Gajinder has five ETH, You have six ETH. And you need to know the current state of Uniswap, Aave and all of our smart contracts. This takes a long time.

You have to go into that storage that I told you I had to buy later and update everything to make sure it's live. That's why it takes over 24 hours. So now once the blockchain is live and you're synced to the network, what happens when you're verifying blocks? Well, in the first couple seconds, you receive the block from whoever is the randomly chosen block proposer. And then you do the very simple checks.

You check to make sure all the signatures are valid. You make sure it's the correct proposer, all the header stuff is correct. And then you actually have to go through transaction by transaction, and each one, access your node's state and see, okay, if Alice sends Bob one ETH, does Alice, in fact, have enough ETH to send over? And then you have to update the amount. So subtract one ETH from Alice, add one to Bob, and you have to do that for every single transaction that is in the block.

And there's something called the state growth bottleneck of all blockchains have to suffer through this. And as the blockchain gets bigger and bigger and bigger, it takes longer to actually look things up in the state. So in Ethereum, in day one, it's easy. Just add one account and update it one ETH. But once the state is really big, you have to go find that one account you need to update.

And then that process keeps getting bigger as the state gets bigger. And I'm going to hammer that home with an analogy in the next slide. And the processing time takes around 300 to 600 milliseconds per block. In the last eight seconds, there's some consensus voting stuff that we don't need to worry about. All right, now let's hammer home the state growth bottleneck.

So first, let's take a look at that graph by Paradigm. It's really awesome. They're producing really great blog posts going over how we can raise the gas limit. And as you can see, it's up and to the right for both history and state. We've invented up-only technology, just not in a great way, because you have to keep updating your storage as this gets bigger and bigger.

And now let's go through the state growth bottleneck problem. So imagine that I'm a mailman in New York in 1800, and I have to deliver three letters. In 1800, New York's not that big. Maybe it takes, I don't know, who knows how long. It's a small city.

You deliver all the mail. Now you have that same three letters, but imagine you're delivering them in New York today. The city is massive. Who knows how long it's going to take you to deliver that? So that kind of shows, even though it's the same three letters, it just takes longer as the city gets bigger.

Ethereum blocks are the same way. As a state gets bigger, it takes longer to actually go through the transaction list and update the amounts. Now let's talk about running a node in a stateless world. You don't need to buy any new hardware. Just use your computer that you already have.

And you don't need to buy new storage. Your storage is good. You actually barely need any storage. You choose and install your clients the same way. And boom, you're instantly live.

You don't have to wait 24 hours. Click here. That was easy, but if they still make those. I'm going to quickly walk you through technically how it works. Somebody who builds the block does still need to hold the state.

So either that's a builder, maybe it's a solo staker that chooses to keep the state because they want to build the blocks themselves. And when they create this block, they also attach what's called a witness. It's called an execution witness. Now, this witness, they actually create a proof of all the state that's touched. And in this proof, it cryptographically 100% proves that all the state that's touched is, in fact, part of Ethereum's current state.

So in my example I keep using of Alice sending Bob one ETH, it might say Alice 100% does have, let's say their starting balance is two ETH, and it's sending to Bob, who has five ETH. The proof will prove both Alice's balance of two ETH and Bob's balance of five ETH. And then your stateless node, you receive this block and the witness, and you don't need to look up anything to confirm it anymore. And you can actually do the entire block processing in RAM, which is an extremely fast, think of it like a trackpad, where you can just quickly jot things down. And so this process is a lot more efficient, because you don't have to go into your state and look things up anymore.

One thing I do want to mention is these proofs need to be compact. This wouldn't be possible with Merkle proofs just because they're too big. So we've slayed the state growth bottleneck. The L1 will actually be able to process blocks 3 to 10x more efficient. And yes, this means we're scaling L1.

Conjurer is going to talk about scaling L1 even more. And if anybody tries to FUD and say Ethereum's not scaling L1, just send them a link to this presentation because that's not true. But I'm just getting started. One thing that's super exciting is we're going to actually be able to build these stateless nodes into your wallet. So because they sync instantly and because you don't need any storage, you're going to pull open your MetaMask and in the background, instead of connecting to Inf infura you actually connect to a stateless node and you get all the almost all the benefits that i mentioned earlier and you don't even realize it so this is definitely going to be possible in your browser and like possibly your mobile phone so people disagree on whether it's going to be possible to run in your mobile phone marius from geth he thinks it might be possible and he says ethereum can grow from 10 000 nodes to millions of nodes dankrad also thinks it could be possible, and he says Ethereum can grow from 10,000 nodes to millions of nodes.

Dankrad also thinks it could be possible in your mobile phone. However, Ignacio told me that phones and smartwatches may be a stretch. However, in the endgame, ZK will definitely be able to run them on your phone and your smartwatches. And I want to talk about how important it is that we're going to have maybe millions of Ethereum nodes. This quote by Vitalik really stands out to me.

It's pretty much saying that like if it doesn't matter how many nodes you have, if they're all in the same group chat, maybe the foundation pays for

Automatic transcript — names and jargon may be misspelled.