Development of The Merge

LisCon 2021 · 20 Oct 2021 · 18:44

Alex Stokes and Proto of the Ethereum Foundation give a talk titled "Development of The Merge" at LisCon 2021 in Lisbon. The session is about the work behind the Merge, Ethereum's move from proof-of-work to proof-of-stake.

Speakers

Topics

From LisCon 2021, hosted by LisCon.

Transcript

okay hey everyone uh proto and i will be talking about the development of the merge uh if you've been following ethereum at all uh this is something you've probably been waiting for for a very long time uh we've made some very exciting progress on it recently and we'd like to share that with you so yeah this will be kind of split up into two halves uh first i'll just at a high level tell you what we're merging and then proto will take over and perhaps give you a sense of when we're merging discuss some of the recent test nets and things uh that you'll see later so first yeah what are we merging uh the proof of work component of ethereum is being swapped for the proof of stake component

this means there's now essentially two chains and uh yeah we essentially have to do this hot swap uh kind of in mid-air uh it's gonna be pretty wild because this isn't a test nut uh we're doing this on mainnet and as you all know i mean it holds a lot of value uh so before i dig into it uh just a bit about me i'm alex stokes there's my twitter handle research at the ethereum foundation i do all kinds of stuff around protocol r d so been focused on altair which is happening on the 27th so if you're running a beacon node uh be sure to follow the fork and yeah been ramping up lately around the merge and like clients all lots of other fun

stuff uh but yeah so this talk will talk about the merge so first yeah what are we merging uh there's the ethereum we all know and love it works with a proof of work consensus mechanism and yeah so far it seems to work i mean it's the reason we're all here uh there's all these daps there's just an exploding ecosystem of like d5 nfts uh crypto gaming just all sorts of things uh i have this picture here of like uh recent base fees in like the last couple blocks and uh you know that seems like an okay graph until you see the axis on the left where uh you know the fees maybe 50 gig away uh for one transaction right so the

point being is the gas fees are like quite high and what we'd like to do is scale ethereum somehow so that the fees come down uh the average fee is smaller for the average user things like this and the way we want to do this is through a number of sort of different approaches upgrades that we have planned you might have heard of the sharding work that we're doing right okay there's all these code names like eth2 serenity a lot of that is to do a number of things one of them being deployed sharding so you'll see this graphic here and the idea is rather than have one blockchain there's now say 64.

and then you have 64 block chains in parallel is one way to think about it and then hopefully you scale through put that way another thing that we want to do is move from proof of work to proof of stake and this is the merge that we'll be talking about right now uh so yeah i'll show you in a minute but essentially there's there's the ethereum you know the proof of work chain uh mainnet and we also have this other thing we've launched in december 2020 the beacon chain which is going to be this new home for ethereum and when we say the merge this is what we're talking about is merging these two chains together before i jump into a bit of how that will work uh

i'll just touch on these these uh the points why we're emerging and this is honestly a whole separate talk on its own uh but at a very high level right uh we wanna take the ethereum we know and move it to a place that is more secure more sustainable and more scalable uh and again there's tons of reasons why um at a high level with this proof-of-stake consensus mechanism rather than perfect work there's a way for us to penalize malicious attacks and that makes it much harder to pull off a lot of repeated attacks on the chain uh it's more sustainable because rather than you know dump all this energy into uh the proofwork mining you can you don't need to do that right

the the scarce resource that you committed here is now just uh this ether that just kind of sits there um and because of that you don't need to dump all this energy into your node setup and uh you know there's even people who will run validators on raspberry pi's you know it's taking 5 watts something like this a very very small amount of power not the huge mining farms that you've probably heard about that people have around the world and the last thing right scalability uh because we have this proof-of-stake setting there's now a notion of a validator that has an identity and protocol and this lets you do more sophisticated sophisticated things with the consensus for example implement things like shardin at l1 that otherwise are like really hard to do without something like that

and just to give you some flashy numbers uh yeah right now there's over eight million eat steaks which is over 31 billion dollars so there's actually quite a lot of economic value securing the beacon chain almost 250 000 validators so it's a quite diverse decentralized system and yeah if you're uh looking for a return on your eth you it turns out to be like a five percent uh yield just from staking so all in all uh very uh long-awaited uh time to merge and yeah so i'll just go through the transition process really quickly to give you some sense of like uh how involved it is uh we have mainnet today and there's a proof work chain right so uh there's the mining bit which is like

this outer shell then you have the execution layer you'll keep hearing these terms as we get closer and closer between execution layer consensus layer because essentially what we're going to do is carve out this execution layer which is all of the application state and move that into this new beacon chain consensus layer and yeah these are the things you know like there's a pointer to the previous block right there's the state route of the whole ethereum state there's a list of transactions when you have like some crazy you know uh uncle block mev opportunity you captured right it ends up in here and then also separately we have the beacon chain and again this is just a proof of stake chain running kind of in isolation right now there's a very weak connection

between it and mainnet um it has its own stuff happening that supports approve state consensus so for example you have these they're labeled ats so you have all these attestations and those are the things where evaluators sign off on their view of the chain and then what happens is when everyone does this aggregates you end up with you know the security of the consensus so we have these two chains in parallel and you know so we have a proof of work chain over here you know you're like minting enough teas that's pretty cool playing your like crypto games you know we add another chain and we keep going along like this until we get to a very special block this will be the terminal proof work

block the last one in the chain and the way they will know that is that there'll be a certain value that we all agree upon the terminal total difficulty and the special thing about this terminal block is that if the total difficulty will be greater than the value we pick um this is a number that we'll have to agree upon and and the intuition is that like miners will keep mining blocks and then again we get to a part where they've mined the last block and then that's the signal for the proof of stake chain to take over uh and then this is what it looks like where then you uh you have this terminal block here right and then once the signal happens then we have the merge

the actual transition process and that's where at that point in time the execution state from the proof of work chain will essentially be copied over and the way that it works is that you'll have the execution payload in the beacon chain block and it will reference this last report block at that point the merge is done and uh you know hopefully everything goes swimmingly and we've done it no more proof work uh just to give you a quick overview uh let's see so this is a nice graphic made by trent that's his twitter handle up there and essentially you can see some of these things uh there's the red bit which is the current proof work chain there's the green bit which is the proof of stake

chain you can see that we sort of forked off this proof of stake chain back in december of 2020 uh the beacon chain is going and there have been some main upgrades right with berlin and london altair which i mentioned is coming up and yeah that brings us to about where we're at now you see this mission of infora and that'll be a great tee up into produce segments about some of the test network that we've been doing so i'll hand it over to him thank you alex thank you alex so this is the hard question when is the merch to give you some context

the we're developing the merged testnets right now amphora is this test note that we launched during the interrupt event just a week ago we came together with all of the theramond and ethereum 2 clients and tried hacking on this thing to work out these little inter interoperability bugs and now we got to this point of not client test net supporting proof of stake with the evm and i'm going to walk you through how this event went the doesn't it changes our milestones and then maybe you can figure out then merch so

i'm proto um the pineapple on twitter and about merch when we are trying to implement the merge we go through these things called specifications and testing and erps these seem like really abstract but they're out there they're open source you can look at them and we basically pinpointed a few of these for the interop event for clients to all agree on so they could join the same testnet and like this coordination problem between five consensus clients and five exclusive clients makes it really difficult to launch test nets but we did it last week we launched ampura

and so how do we get unfurlough running how did we get this going so it starts with testing testing and testing where we have these breakout sessions like once you have clients running they still need to work they still need to talk to each other nicely and so this is one picture from the interop events where you did this breakout session to go through various scenarios what could happen with the merge with the go ethereum team with the current if your mom testers with new people for ethereum tool testing and to get it all sorted and then we went through risk assessments the merge is like this hot swap of a 400

billion like system it's insane amount of value you're moving from one consensus to the other consensus and to do this effectively you just need this very thorough risk assessment and lots of time to like once the testnet is running you need multiple months of testing many more than maybe four months maybe five months to be really really sure that you can transition um and then by the end of the event i'll focus on prior tours shout out to them sitting over there somewhere where we put together testnet so we had all the clients with their configuration everything ready to launch

the testnet and the last part is launching deploying it to 100 nodes 10 000 validators some specific configurations so our eyes on the does not launch and then we launched on fuja and this is the moment the first multi-client uh proof-of-stake test net with epm support and like stable specifications um from here we'll make some changes still like we're not done yet we're going to optimize the api ensure that block proposers have as much time as possible to build the best blocks just optimization optimization and

testing and then we get to more newer test nets and eventually to the actual transition so from amphora we went to pitos pitos is this it's similar to amphora it's a larger face it's the same thing the joke here is that amforja was launched with a testing configuration whereas ptos as a configuration builds as similar as possible to mainnet so we are getting closer to the real thing um you can find the testnbc so if you're a developer you want to be here for the testnet you can join already all the

configuration all the data is out there it's an open testnet but then really what we're working on is like to stabilize and to launch newer test nuts and then by the end of november we hope to launch like a long live test net where we actively invite users to this is more for the brave where if you're into running nodes then this is for you and can join and what we do here is it includes both configuration for ethereum one and ethereum two it's this combined test network where we have five consensus clients for execution clients and get all these combinations running on the network we have a test.net explorer so if you want to check out what's happening on

the testnet you should go to this explorer you can see it's creeping up on participation so there's an older screenshot but the participation is going closer and closer to 99 and so this means that every client combination is working and it's really just the effort of hardening it out testing it trying synchronization uh as you may know syncing an ethernet node is not easy it's even more difficult when you attach an ethereum 2 nodes so this is the thing we want to improve on and improve on so that the merge transition is as smooth as possible so this is the participation charts we

have more and more clients running if you look at the explorer you can find even the crazy combinations like load star with ethereum js they exist we have literally every client is getting on there and then while prism was not able to attend the interrupt event prism just joined the network today as well with the help of both us and we were getting there and aircon is catching up as well so about milestones like during the events with this huge table to describe which client could work with which other clients and we have this milestone one milestone two milestone three and so on and it will basically mean like first you try

the specification they try some testing then you try talk to one client they try to talk to multiple clients of the other side so if you're a consensus client you would talk to multiple execution clients and then we have the many too many where you're ready to try every combination and so this table is getting fuller and fuller but then what we need to do is we need to get in these last spec changes last the last mile to really make the merge as stable as pretty as possible portions so we are integrating optimizations for the api improve the proposer profitability we

stabilize the specification we start a long lift does not we need to introduce a lot of automation for testing to be really sure the system works and m5 needs to be complete where we want every every client to work with every client through the standard api and then to get towards lawrence you have to think of these long-term things where the spec is really like immutable there's nothing nothing changing about the consensus every consensus layer client and every execution their client has all implemented but also implements the user layer things like chain synchronization and then we have stability we need to be very short stable

diversity that's the next talk from carl you'll go deeper into the diversity topic it's important that once we have proof of stake that we don't finalize a bad chain this means that we need as many different clients as possible so the vendors book it only affects a little part of the network and not the whole network and it's also about infrastructure readiness so say if there was an attack on proof of work in the next month we could rush and ship the merge and move the proof of stack but what we really want to be is we want to be in a place where we have test nets and we get infrastructure to update before we do the merge so

updating the everything you know love either scan infor but also all these wallets all these things that might want to adjust a little bit for the merge we want to be sure they're ready and then so how do you join we have the execution apis repository and we have the consensus banks matt and a few others from quilt and the ethereum foundation are also working on execution specs there's a lot more but if you want to just dig in and have a look and maybe get in contact with clients to help out you can join the discord and then we can

talk and chat more about merch thank you