The Road Ahead for Ethereum Light Clients - @dapplion at @ETHDubaiConf

ETHDubai 2022 · 31 Mar 2022 · 21:20

Lion dapplion explores how Ethereum light clients can verify data without requiring users to operate full nodes or trust centralized providers. The talk considers the needs of mobile and other lower-powered devices.

Speakers

Topics

From ETHDubai 2022, hosted by DeFi Dubai.

Transcript

anyway thank you everyone for being here i'm dab lyon i work at lodestar it's an ethereum consensus client from chainsafe and i'm gonna talk today about like clients so i want to start by providing an example so today we have a lot of l1 and usually what they promised is this blazing fast scalable decentralized future but what we usually find in reality is this set of sporadic non-committed users which they connect to one single sponsored json or pc maintained by the foundation then connects to this small network of validator cartels then you have to wonder is this really the future of finance or just a replica

of traditional power structures like at least it's okay for now in my opinion but we definitely can do better so what we are fighting for decentralization it's critically important because it gives this amazing property of collusion resistance and to achieve that we need to have a broad base of power distributed in different stakeholders be users exchanges infrastructure providers so if we don't achieve that essentially the industry will start to condensate in these very strong small cartels and then bad things can happen we are seeing this now unfortunately i'm not going to name what this

represents but you can imagine so yeah the generation is really important and to achieve that we need to enable anyone to participate anyone to fully verify the system and anyone to fork the system this one is critically important because in case that something like this happens you want to be able to fork the system and reject this hostile takeover of power so this sounds very dystopian but vitalik has been talking about this for a while there is this amazing post he did and he brings this example of the four quarks so the majority of miners exchangers and explorers they collude

and they then just mint this insane amount of tokens to adapt address and they will maybe brand it in twitter as developer fund to ensure the sustainability of the protocol or something like this but it definitely goes against the will of the community and it has to be rejected however if they control the majority of the stake or the power of the providers they can disperse this value into the def ecosystem and it will be really really really hard to undo like for those ogs that you remember the dow hack we were really lucky that the fans were locked in a specific set of accounts for some days so we could do a hard fork but in this case this would not be possible so how do you prevent this

more validation people running nodes and distributing the power such that this thing is actually impossible and if it's possible you want to create so much chaos that they will have to revert and return the power to the community so it has actually happened this who is familiar with justin sun and the steam blockchain like in my opinion this is the most epic thing that has happened in crypto ever so please looked it up in 2020 justin san bought steam the blockchain which is a network for content and he took over some significant share of the network stake about 20 and then collaborated with exchanges specifically binance and huawei to take

over users funds and then get a majority of the snake on the blockchain what they did is then boots all the witnesses that were not loyal and effectively control completely the blockchain the community had no other improtical choice so they just completely forged the blockchain into hive and replicated all the dabs all the providers and everything but they just left over the balances from justin sun and evan and everyone that participated in the attack like this is a really really serious attack that thankfully it was survived but it's a stark reminder that these things can happen and we can think oh no ethereum we are we are better we are really decentralized and we just it's true

but finance has a non-trivial share of balance in ethereum we can change so yeah we just have to be we just have to be vigilant so yeah you can participate we must protect ethereum we must do our part run notes evangelize for decentralization stake at home so all these things are really really important and what what i'm gonna shield today is exactly that with with like clients so yeah just food for thought if ethereum was under attack like the one i saw with justin son where would you go to check the correct state of the network i would go to etherscan but would that be part of the attack i don't know so yeah run your notes do

your part however running nodes today is quite expensive running f takes a significant amount of resources b disk bandwidth etc and what most people end up using is connecting to a remote rpc so in this chart you can see cost on the vertical axis and security on the horizontal full nodes gives you the maximum amount of security you validate all the blocks the state transitions you so you cannot be fooled with remote rpcs you are just eating whatever infuria is throwing at you so it's a huge trade-off what we want to foster is this middle area where you have to pay a small extra cost or some extra cost in exchange to having

a greater level of security so this is how i think it looks like today with the stickers i'm talking about you have stakers exchanges explorers stakeholders that are really concerned about the network they will run full nodes and then the sporadic users the eight boards users they will just connect to the remoter pc and then you have these super users dabs that they should be invested in being in this area but currently they are not because it's just not possible so what can we do oh and by the way we are still doing better than traditional finance so no security and still costly so i'm going to focus now on browser like clients which we are trying to fill this bottom space

so give some extra security to a remote or pc at not a high cost so what is a browser like client when you connect to infura you are using the json rpc and just assuming everything you want but if you want to validate all the data the first thing you have to do is come to consensus on what's the head this is what i call here with consensus and it's the activity of acquiring a safe head once you have that then you would navigate to through consensus layer and then through the execution layer to get data all the fun stuff which balances contracts calls and even go into l2 for sharding but that's for the future so

you would use all these awesome in protocol teams that have existed since genesis to make like clients possible if you are not aware all the ethereum team and even bitcoin have worked really hard to make like clients possible they have not materialized for reasons i will address later but they are possible and it's thanks to these things so first things you want to do as a blogger like leon is to get a safe head post merge the mechanism that we have to do that is with the sync committee so if you want to track the head in a normal full node you would have to follow the entire variator set which is very expensive but instead here you follow this 512

committee that rotates every day and you can do that extremely cheaply with only 25 kilobytes per day the committee shuffles in a way that it makes it really hard to be corruptable and then when you sing you can just jump from one to the other and get to the head then once you have a safe head you can actually follow it with also a very low cost about 81 kilobytes per hour and tracking participation you can also be somewhat safe from forks so yeah very low cost high security this is what we want this is what my clients are about so once you have a safe head now you go into the consensus layer data and you can get fun stuff like the

latest execution head you do that with merkel proofs and then you can repeat the same with execution layer with state proofs you can do fun stuff like get the account balance the account nons any contract storage you can also get proofs for blocks and you can get locks and transaction receipts so essentially it is possible to cover almost all of the json rpc with this source of streaks so to recap a browser like client the first thing it has to do is consensus get ahead here is the first step this is the weakest one it has a honest majority you are not validating state transition so if there is an attack that the one i said before you can be a victim

but the data size is bounded and this is where so far we have only a transport for a rest api but we want to build a p2p layer on top of this also when statelessness lands this assumption will drop to only one event so that's really cool for cl data miracle proofs you can be censored but not light so it's a one of an assumption however the data here is really high and it's unbounded so we are providing a rest api but we hope that in the future portal network will help decentralize this layer and the same applies with the l where here the data is even bigger so so far in low star we have built a rest api this is done we have a demo the one

i'm not be able to show but we are lobbing for adoption in most clients there is also a pr started by status to to have a draft on this p2p network it's implemented we're gonna have some tests soon and how it's going to look maybe i'm going to glance over the details but these are the routes you can get snapshot to get started some committee updates and then you track with servers and events pr we don't have vips in consensus we have vrs and this is how it looks for the peer-to-peer version we have one gossip topic and a bunch of recres that cover what we said so far for cl data here we have only delivered a

an api this is the route you can get a proof or a multi-proof at any point of the state at any state id the same for el there is the it get proof with the ip it's only partially adopted so far it's only gath and ethereum gs but with this important network yeah the json rpc could be fully covered but it still needs a specially tooled evm where the async s loads that i'm not going to go into the details so demo time you can imagine here we show a browser where we do this flow you start with a trusted root then you go into consensus you get some proofs and eventually we show the status of of an account we can get you to do the

demo real quick that's okay it's okay yeah yeah right so this is browser.clients but there is even more fun stuff going on in this connection on the top side i put here statelessness and this is the ethereum 1x research that it's already included in vitalik's roadmap um all these phantoms the merge the birch the splurge so this is the birds section and what it's gonna do is currently if you wanna validate the state transition you need a block in green that's provided to you by the network in red it's provided by you so this is why nodes are so expensive they need so much cost with witnesses we will just

show some data into the block so it will be a batteries included scenario and you can validate a block only with the blog so the the state requirement will be dropped and clients could choose to either hold no state some state or all the state so how it works is with some crypto budo magic so before we had to get all the data all the blue one you see here not anymore now we have a vertical three proofs with commitments and all this crypto stuff so only one proof and then yeah about the portal network so this is a project by piper miriam it's a collection of dht networks that will enable

lightweight protocol access this is critical for both stairlessness and razor like clients and it's the solution we all hope that will decentralize the data layer so how to how do we drive adoption we have again this chart with these different users what i want to see is to take these sporadic users from this shitty corner at the bottom to the right give them more security and then for stickers and other tabs bring them down the costs such we have more more participants so yeah what i'm fighting for is the progressive decentralization of the infrastructure layer how it works now we have all these

wallets which is cool we have diversification but there is still this huge trust implication here and we want to drop it so this is what i'm looking for dub developers they are going to infura alchemy it's cool it's cool for now this is not what we want stakers please don't stick with coinbase don't stick with finance take it home but i know it's expensive we are working on it same for users so the blue lady is not happy okay she's not happy and when to do this so it's i think it's very important to remind people that decentralization is this thing that you don't see but it's slowly going away until you have like

this catastrophic failure and then it's too late so yeah the time is now to do these things so again vitalik did this great post if you're aware the ethereum ecosystem is moving to a future where there will exist proposer builder builder separation what this means is that block production it's okay to be centralized we do we accept this but this means that verification has to be more widespread than ever so running notes having like clients having as much notes as possible it's critically important and yeah statelessness browser like clients are essential to try to drive adoption and move as many people out of

these untrusted remote rpcs as possible so yeah the end game is let's one-up our decentralization and who you're gonna who are you gonna be the virgin or the chat just figures so yeah this was my presentation lord star is hiding um also lordstart is made ready it has been for a while we proposed our first block in november now we have 151 blocks proposed by our old validators also being run by the community really happy good performance you see that number 99 it's good it's a happy face so you can try loads right now and yeah if you want to subscribe to updates from bloodstore

screenshot this or i will leave here for the youtube stream and thank you so much antablion follow me on twitter or github thank you so much if you want to go back to the back the last screen real quick just to give people a chance to snap a shot of that and do we have any questions from the crowd hey so about that thing of block production can be centralized right um how centralized does it have to be because i'm thinking if you know they get um censored if they are stopped essentially so it seems like a centralized block

production isn't really that great either even if you can't validate it entirely sorry the problem is for here there is a lot of echo and the sound is coming from there so i'm not here anything can you like crank it up to the maximum put your mic on your mouth literally uh basically i was just asking if centralizing block production can lead to other issues for example being censored by governments by whatever uh and whether that like can be protected somehow by the fact that you validate um in a decentralized way yeah i'm sorry but it's impossible to hear maybe you can ask the question and i can stand in front of this speaker again so

is centralizing block production really that great like can can it suffer attacks from censorship from stuff like that so just there are no more blog producers and there's nothing to validate okay sorry so much so the question was if block production risk the the point of having centralization and censorship and no more blocks yes yes that's correct um the thing is the weibull operation would work is similar to how meb is now so block prevention will be delegated to some bundler and as long as you only have one that is not corrupt and honest the the

blockchain can progress like there is active work on this and i think what what can happen is in the short term that could be some censorship but immediately the the blockchain could could respond to that it could see who was the bundler that caused that block to be missed and it could reject from the set and switch to another if all blenders go wrong then yeah the blockchain styles but you only need one to be to be correct and actually the bundlers they would optimize the network for a bunch of things mbb l2 stuff but if they cannot participate the the validator could still propose blocks they would be super optimal but the blockchain could still juggle on yeah good question around

light clients and the impact that would have on the full nodes so if everyone kind of moves over the light clients who is running the full nodes and then are there any security concerns etc with not enough full nodes being online etc so the question was if enough people moved to like clients is there any problem with not having a full nodes uh yes yes that could that could be that could be a huge issue um the thing i i think what we are good is that now um with proof of stake there is a huge incentive by a lot of parties to run full nodes and we are still really really really far away from having a distribution where we have too many like clients so i would like to first get to a point that we say oh we have too

many like clients then what can we do because we are way way way away from this reality um so do you think there will be in the future a trend with for example wallets integrating directly light clients i think maybe two years ago there were a project called mustac something like that i think it was from some guys from metamask but it was dropped so it is something that could happen in the future do you know any like projects already going on this direction yeah so there are some initiatives um at the wallet level i don't think so this is what we are working on i don't think there are the tools yet to make it a reality

pocket network they do have some clients i think one is the ultra ultra light client which can run in browsers but they are still very dependent on constant connections with pr so what i would like to see first is taking the centralized model of connecting to one single server and adding trust to it that way you can projects like pocket network where it's still trust but you have a multiplexing so you connect to a random set of nodes so being full here is is harder there is also a watchdog scenario so if you can add these miracle-proof strategies that could have greater resilience then the next step is taking this to p2p and that's where things get complicated but status team are working on it

there is a webrtc working group that could make a reality so yeah i would say first give a bit of trust to the centralized model and then bring to move to p2p thank you yes thank you very much you