The Merge - Bringing Ethereum to Proof of Stake
ETHCC 5 · July 2022 · 25:29
Speaking before the Merge in 2022, Sajida Zouarhi explains the planned transition through Ethereum’s consensus and execution clients. The speaker discusses expected changes for node operators and application users and how to prepare.
Speakers
Topics
From ETHCC 5, hosted by Ethereum France.
Transcript
so hi everyone so today we're going to talk about the merge and first i'm going to tell you about the summary so we're going to discuss about what the merge is and what are the expectations that you can have about the merge i'm going to also dive into the architecture of an ethereum client and we're going to see what is going to change from an execution layer perspective after the merge we are also going to discuss modularity which is going to be a concept that is going to impact everything from the protocol level to the client architecture itself
we're going to talk about how do we test the merge currently and what are the challenges from an engineering standpoint obviously the timeline when merged and what are the opportunities that we're going to have in the post-merge world i'm going to speak a little bit about scalability especially scaling wars and post-merge opportunities so first a little bit about myself so my name is sergi dazuari i've been in blockchain crypto since 2015. i first started working at consensus as a tech lead on cryptographic projects and soon after on tesos on the strategy side and judith inside also worked as a pm of the hyper ledger bezu team for a year and a half approximately working on a specific
ethereum client so what is the merge so it's pretty simple the idea is that you have this beacon chain that has been launched in 2020 that is going to merge with the current mainnet chain that we all know and so it's quite simple to understand that but to do it is more complex simply what is going to happen is that nothing is going to change from a mainnet perspective every balances account all of that is going to remain but the only thing is that from now on it's the consensus layer that is going to drive the blockchain forward the three important things that ethereum is trying to achieve with the merge is decentralization security security but essentially scalability which is the
part that was missing from the trilemma that is part of ethereum vision so the idea as i told you is to have the beacon chain that has been running since 2020 become the leader of the consensus on ethereum and that means that validating block is not going to be a miner's job it's going to be a validator's job and the way that you have security around that is by staking ethereum and this has some nice properties and so specifically what can we expect from the merge so first obviously energy efficiency is going to be a big topic this is the biggest drop overnight in terms of network carbon footprint
and so the idea is that people always think that the merge is going to solve some ux you know issues that we have on ethereum especially gas fees but that's not even going to impact that or at least not in a drastic way it's really about making ethereum more sustainable and scalable it's also interesting because since we have now approximately 20 billion worth of it staked and so locked on the protocol it creates interesting constraints on the economic side and so obviously ether that is locked is not on the market and so you can see how that can be interesting from a crypto economics perspective the good news about the merge is also that you have a seamless developer experience because really there is
nothing much to do application apps are going to be working there is no big change in terms of apis and integration so really for i guess users and app developers there is not much that is going to change it's really the node runner that is impacted because the architecture that you're going to need to run a node on ethereum from now on is going to be composed of two sides the consensus client and the execution client so as i told you i was the product manager of hyperledger bezu for a while and i'm going to use the architecture of bazoo just to walk you through the typical architecture of an ethereum client so here are six major systems that you can find in most clients the block production side the evm i'm
going to start with the evm engine so the idea of course in a blockchain is that you're able to execute some bytecode that is compiled from a higher level language such as solidity for example you also have data storage in the form of miracle patricia trees for states you have peer-to-peer communication because everyone in the network needs to be able to discuss with other clients and share information transaction in the particular fashion you have the consensus protocol that is key because these are the predefined rule that all validators are going to follow to validate new block make sure they're aligned with you know the protocol and if that is so propagate that payload that they just created to other
people in the network json rpc communication of course it's important because we have unchained data as adapt how do you query information if you don't have endpoints so that's pretty important and the last one is block production i wanted to finish with this one because i think this is the one that is most interesting related to the merge but also what is going to happen after the merge block production is pretty simple every client every node has a mempool it's quite unique to yourself because it depends on where you are in the network what you hear what you see what transaction you receive and so the idea is just to go through that mempool assemble some transactions batch them together create a block propagated and so we're going to see how this is
interesting and what opportunities it offers in terms of pbs so proposal builder separation in terms of block production and med for example another nice piece of technology is the engine api of course you have two clients that need to interact with each other so you need specific technology to make that work and so that's the engine api what is interesting here is that by analyzing this api you understand what are the roles that are going to remain on the execution client side for example maintaining the state is also going to be under if you're it one client so each one client is the name that we give to current ethereum clients and they also have to provide access to
the states for new nodes in the network that are looking to sync they have to prepare and return the payload to the consensus clients and execute those transactions and also quite interestingly they're also responsible for providing the apis that dapps wallets are going to be using so it's not like ethereum client as we know them today are going to disappear it's more like they're going to evolve and there is a separation of concerns that is going to happen where the consensus side of things is going to be handled by new generation of clients maybe you know them like for example teku and others and the execution will remain the responsibility of the current ethereum client so
here is a little bit of a visual comparison of what is happening on the architecture side today and what is going to be a post-merge so you can see here that the mining side of things is very much within the client that is running currently and post merge both of that is going to be uh i mean the validation is going to be uh outside happen outside of the execution layer client is going to be on the beacon chain and what is interesting here is that it's now the beacon chain that is driving the blockchain forward so a very important topic that i wanted to discuss as well is modularity yeah
so i think you see uh where i'm coming from we're seeing now that even at the protocol level we have a separation of concerns we have modularization happening in the protocol logic uh you can also find that at the client architecture level because you know now if we're extracting the consensus side why not extract also like the transaction pool the evm has been extracted for example on bezu clients such as erigon has have embraced modularization by design and already their own modules can be run as independent components so that's quite interesting modularization in the protocol itself as i said is going to offer new
possibilities because of course if you can now separate clearly the rules you can have new actors coming and saying okay we had no previous interest in building software for clients but if now we can just focus on block on block building for example that's an activity that we want to develop that's maybe a new business model so that's interesting in terms of opportunities and the other thing is that modularizing the architecture is very good when you're doing open source software because if a new contributor wants to come into your code base having to basically go through the whole code base just to make an impact on some small feature that you want to add is has very much friction but if you have modules then people can just unborn on that specific domain and you know add
value to your project quite directly so it's good to remind ourselves about what is happening currently this is one of the biggest engineering challenge it has never been done in history and we are basically changing a whole protocol while still running an economy on top of it so i've put some numbers here um you know this can be a little bit scary but actually i'm going to walk you through what is being done to test the merge i also want to point out that i don't think that the merge is important just for ethereum i think it's important for the whole web 3 ecosystem just because of the place that ethereum has currently the innovation it carries the users the
dubs and somehow also the trust of the people that are currently onboarding on crypto and web 3. so it's important for everyone not just for it maximalists i guess so the road to the merge was actually uh quite long you know the merge has been in discussion for several years but i really noticed an acceleration in the past year first with rayonism and then at the end for a week so we had in october 2021 a week-long interoperability workshop with all the client teams in greece that was very interesting because in the span of one week we achieve more work than maybe in three months of async
work so that was really a catalyzer for what came up next it was also the first time running the proof-of-work to proof-of-stake transition um the good thing about uh interoperability and being focused on that is that you can adapt your testing approach if you're testing your software as a you know client maintainer uh in your own environment maybe you're passing those tests fine but ultimately it's of no use because what you really want is to see how you work with other clients so what we do is we run combos of different client combinations and we see if they're interoperable and if they're working seamlessly if
your client is working fine but then when you start you know integrating with other clients you start to have consensus failure then that means that you're not going to be passing the merge readiness checklist that we have and so the idea behind testing the merge was to develop a series of tests that are more bdd so behavior driven developments much more than tdd and the idea of that is just to make sure that we know what is going to happen when the merge happen because we don't have a second chance so when we merge we need to make sure that the protocol is running as smoothly as it is today and so that also means using other techniques such as fuzzing it's just
because when you develop a protocol or you develop a client or any piece of software really you have your own approach in mind but you're thinking about how your software should work not necessarily how some users or other people are going to use it in the wrong way and so by using fuzzing techniques you're really trying to explore the whole domain of possibilities that you have so i personally was very much interested by the testing the merge parts of of the merge sorry just because uh we really saw new initiatives coming from the community and people really trying to push further the testing i guess strategy to make sure that the merge goes smoothly one thing that was also nice you know um was the shadow forks so if you're not familiar with shadow forks basically the idea is you
know you take a network that has been running for a long time like a test net that is sort of trusted uh you take a snapshot of it so that means that you have the whole historical state up until this point and then you bootstrap a new test net with that and you go through the merge on it that is nice because it's like this shadow fork that you have share the same dna as the test net uh itself uh it's much more interesting in a sense to test the merge then for example some public test nets that are also available like kill that have other types of purposes so there's quite some complexity behind testing the merge that's my point so when merge you know deadline deadlines and timelines in general in the ethereum ecosystem is a
are a tricky thing so my advice is not to get too attached to dates but we know now that the expectation of the foundation or the estimation is september 2022 what is much more interesting actually is following the steps that are going to lead to the merge and so for example early august we're going to have some nice things happening on gurley the merge specifically after the activation of the bellatrix upgrade on patas on the beacon chain side and so that's something that you can follow and basically how this is going to happen is going to be a good indicator of are we in the right direction to merge for example in september or do we need more testing so preparing for the post-merge world
so the first thing and i guess i mentioned that earlier in the presentation is going to be the scaling wars it was uh funny yesterday i was uh seeing a tweet from sassal about this and other people and i think you felt that also by just being at etc there is a lot of discussion about rollups layer twos in general and scalability so what does it mean and i'm not going to dive deeper in roller but just to give you an idea you know we know optimistic roll-ups we know zk roll ups optimistic groups are really based on the assumption that you know you don't really have to validate or prove the validity of anything you just commit whatever you have in terms of transaction on the layer one and hope for the best but if anyone that is witnessing this see a malicious action
they can basically generate a throat proof and then a dispute open the zika approach is quite different it's more that you have to prove the validity up front and then it's being verified and you can commit valid transaction to the layer one there are other layer two solution that i'm not going to talk about but like state channels uh side chains etc the interesting thing is that scalability is also being tackled at the layer one level so on same and so basically we have something called sharding that is you know in the works and the idea is to split the workloads across uh different shards so basically uh your you have different chains shards and validators can really focus on one
chart and not have to reprocess the entirety of the transaction of the blockchain and so that is going to result in some good improvements in scalability and what i like the most about that is the compound effect of all of this innovation happening on ethereum right now here you see the current tps that we have so transaction per second with roll-ups these are the numbers that we hope to achieve so 1k to 4k and if you have rollups technology for example combined with sharding on the layer one you can achieve much more interesting numbers in terms of performance as far as 100 000 per estimations okay so
post merge so i said i wanted to discuss about the post merge world because that's really the part that i'm really you know wondering about what is going to happen after the merge and so i'm just going to speak a little bit about the memphis i'm sorry there are some issues with the slides because they had to be downloaded and then displayed so this is the mempool this bunch of lego bricks and so what you can do in your maple i mentioned that in the blog production part earlier you can order your transaction the way you want and so you can be pretty naive about that and just build something quite simple you know just by freshness of the transaction maybe if you're a little bit uh financially motivated which you are as a miner you want to order them in a way that you're going to include the transaction
that have the highest fee and so for those who are unclear about what this means just think about last time you wanted to mint that nft really badly and you had to increase the fees just to make sure that your transaction gets included in the next block and so that's the type of thing that miners are you know attracted to and they will include your transaction faster but you can do other stuff you can be smarter about it and order transaction in a way that helps you leverage some opportunities like arbitrage for example between indexes and different apps and that's something that is going to be made even more easy with a post-merge type of architecture as i mentioned before with the modularization aspect even some people that are currently working on tooling working around the mempool
working as infra providers such as inferior or others they are very well placed to leverage their current position to start developing more sophisticated ways of handling transaction and so just think about what type of opportunities from an economical standpoint that can offer and maybe attract even more innovation and just business on ethereum yeah so the question that i hear often is is all of this new innovation you know the roll-ups uh mev all of this stuff happening on the ethereum is it a threat to ethereum as a layer one uh people are now going to on board directly on rollup they might not even interact with
ethereum as a layer one is that a bad thing i think quite the opposite it's a very good thing because ultimately they all pay fees and so what that means is that the more layers you have on top of ethereum that are leveraging layer one for security guarantees uh you know like incurring some information some transaction the more fees are going to end value is going to trickle down to the layer one and so the layer one is going to be more as a premium settlement layer and everything that you want to do that is more ux oriented for example you want to pass an eip currently on ethereum that is going to maybe improve the user experience is very hard like you have to discuss with the core devs
you have to make sure your eip is going to be included in the next upgrade this might happen in six months uh you know a lot of eips have been delayed because of the merge i'm not i'm not sure people know that but there's a lot of innovation that is already sort of ready on ethereum that is being delayed because of the merge and that's because you cannot disrupt a protocol as easily especially ethereum but on the road upside you don't have to go through that type of process and so you can be much more agile and that means more opportunities and more i guess yeah flexibility on ethereum and that can make ethereum and ethereum ecosystem as a whole competitive compared to other layer ones that we see today so i'm going to leave you with this
i guess picture that i really like ethereum roadmap is very rich there is a lot of room for growth and room for newcomers i think it's interesting to see that ethereum is always evolving the merge is not a fix the merge is not something that we're doing to patch issues with ethereum scalability the merge is the next evolution of ethereum and so this evolution is actually comprised of a lot of steps and so after the merge you know we have the search the verge the purge the sport really love saying that and so this is what's gonna happen and so this i think uh paints a very bright and helpful picture for ethereum and is a good way to attract new talent and to say to people the landscape as we know it today is
going to change a lot after the merge and the time is now if you want to leverage that and maybe start working with the community so that's a wrap that's it for me and thank you if you have any questions feel free to ask them them thanks [Applause] thank you uh it's something you already mentioned but i still have some questions about like the mempool management and flashbacks because right now miners are still big entities we want to see ethereum as decentralized but i don't understand what you're saying sorry i'm is that better
no can you okay i'm saying that the miners are more centralized than we would want to and this means that we have private mempools we have flashbacks and everything and after the merge hopefully the validation will be more decentralized but still you say we can be very creative about the mempoon and how it's processed so you do expect things like flashbots to continue to exist after the merge yeah i yeah that's a very good question i think um i think flashbots were very early on something that is going to be fundamental and develop into a whole industry on top of ethereum mv i think you hear a lot of projects saying that we had to start in a centralized fashion but it's in our
roadmap to become the centralized etc uh the good thing that i understood at least on the early stages with flashbot is that they really had in terms of values um an alignment of with ethereum so i think there is a room here to uh take a more decentralized approach but that is going to come down to the technical specifications so i'm not sure you've you know read some of the proposals that have been made by flash boards but that's where the battle is happening right now and which sort of standard is going to be adopted is going to sort of impact the answer to your question and some other initiatives are also existing like federation of three layers are starting to be created people looking at what flashback is doing and saying can we do the same thing but in a
more decentralized way so yeah watch out for that hello thank you you had a slide on the inverted pyramid of value yeah uh isn't there also a scenario where this doesn't pan out and so i'm just playing the villain's vocation of course all the smart contract execution happens on layer twos the main net is just a settlement layer and hence this has an adverse effect on actually the demand for blocks because it all happened on layer twos and layer twos end up accruing more value than the main chain and see what you
mean yeah so i the way i see it is really that the growth might um happen in parallel so like sure currently you can see layer to the competitors or like putting a pressure that is not uh opposed that doesn't have a positive impact on the layer one but you can also say that if we improve ux and we have so much so much adoption that first we will need layer twos just to you know catch up with that and um and so the pressure basically is going to continue to grow maybe not as fast on layer two but still in a statistician for layer one so what you really want to achieve is growth on both layers and not so much not it's not that for example layer two gross is going to take
anything away from layer one gross it's going to actually uh feed it so i think it's going to be fine i think the maybe a threat that you can have is that some layer twos are layer one agnostic so if you know depending on uh which layer one they integrate with you can also have this value that i'm talking about that's why i put l1 and ethereum uh in parenthesis because it can be another layer one actually yeah okay sorry we can talk after thank you very much have a nice day and happy merge to everyone [Applause] you