How L2 are scaling Ethereum one batch at a time / Sahil Sen

EthPrague 2023 · June 2023 · 10:48

QuickNode senior developer advocate Sahil Sen gives an introduction to how layer 2s scale Ethereum. Starting from the blockchain trilemma and high gas fees, he contrasts state channels with rollups, then explains how optimistic rollups rely on batch submitters and fraud proofs while zero-knowledge rollups validate transactions with proofs before posting them to Ethereum. He closes with open challenges, including centralized sequencers, bridging and L2-to-L2 interoperability, and points to Arbitrum, Optimism, Polygon zkEVM and zkSync Era.

Speakers

Topics

From EthPrague 2023, hosted by ETHPrague.

Transcript

so thank you for introduction and thank you so much for coming here so today I am gonna talk about a really well known topic of layer tools a lot of you might be very familiar with the topic about Roll-Ups and how roll up Works how different types of rollup works but for those of you who are not I'm gonna explain how Roll-Ups work and what are different kind of roll-ups so just a brief introduction about myself hi I am salesen I work at quick node as a senior developer Advocate and I work on creating a lot of educational content it's around videos it's blog post documentation and all that kind of stuff so for those of you what who doesn't

know what quick node is quick node is a web 3 development platform and we provide a lot of different different tools to make lives of developers easier so let's start so basically uh what's ethereum's vision is to create a blockchain which everyone can use without any hurdles but since its Inception it has been the number one blockchain network and everyone has been using it for like basically everything so because of that the space or the block space of ethereum has become really expensive and the gas fees have skyrocketed so big and because of all of this the transactions are queuing up a

lot and the total finality time of transactions a lot of times if they are sent with less gas so this all relates to a concept called blockchain trilemma where each Edge is a feature you can say for blockchain it's scalability decentralization and security so right now ethereum is very much decentralized and secure but it has been having scaling issues for a really long time so the blockchain trilemma states that at any given point of time a blockchain network can achieve only two of this so it can be either on the edge a b or c but ideal blockchain would look like

where it can stand right in the middle where it's enough decentralized it's enough secure because it's fairly decentralized and then it's scalable as well so ideal blockchain would look like that but since it's not ideal at the moment so there are some scaling Solutions which have been discussed in the past and which are already in the works and which are already working right now and that's layer 2 scaling so layer to scaling is basically scaling ethereum off Chain by not scaling the actual ethereum chain but by settling transaction of the chain and are two types of layer two solutions roll ups and state channels so basically

what rollups does is they sell the transactions of the chain usually on a different chain and then they roll up the transaction information in a batch on the main ethereum chain usually using a smart contract and what state channels are State channels does the same thing they settle the transactions of the chain but they do not send the entire transaction information as a batch on the Chain but what they do is they open a state channel of the chain which is usually a multi-sig smart contract and only two transactions are used for uh for the main ethereum Network the one is to open it open the

channel the other is to close the channel in the state Channel there are like multiple parties who agrees on a transaction because it's a multi contract who agrees on a transaction and then the transaction is completed so State channels cannot be used practically because they are highly uh application specific for example there are payment State channels right now where if someone wants to send a transaction in forms of tokens what they do is they will open a monthly contract and when both the parties who are predetermined will sign the transaction and then and then only that funds will move out of that wallet so roll ups is very like I would say

um tactical at this moment so there has been a lot of development around Roll-Ups and basically roll ups are of two types the first is optimistic rollups optimistic rollups can be considered as kind of an angels of the blockchain where they consider that or they consider every transaction which is being verified is valid and there is no fault in that so in optimistic rollups there is a batch maker or a batch submitter what they do is they submit the transaction which has been happening on the side chain or layer 2 Chain and this create a batch of those transactions and submit the information

batch on the main ethereum chain and now you may ask that okay so if what if there is a fraudulent transaction that so because to uh encounter that there is a third party called for fraud proof submitter what they do is they identify the transaction which can be considered a fraudulent transaction and then they submit a fraud proof so both of these parties who are submitting the transaction batch and fraud proof they take their coins and if any of the party is found guilty they are coins are eat are slashed so once the fraud proof is submitted that particular transaction is rerun on the main ethereum chain and if the

transaction is found guilty or fraud then the fraud proof is approved and the batch submitter gets the each slashed so this is how optimistic rollups works and the easy to implement because they don't require a really complex cryptographical framework beforehand because they only need fraud proof submitters and batch submitters and then uh next type of Roll-Ups technology is zero knowledge proof roll ups so what zero knowledge proof does is it overcomes the Assumption of transaction being valid but they actually validate the transaction

using zero knowledge proofs zero knowledge groups are nothing but uh your cryptographic proofs which are generated and which validates a particular transaction without revealing much information about the transaction to other third parties and in zero knowledge proof the transactions are validated beforehand and then they are submitted on the main ethereum chain so because they require a complex cryptographical framework beforehand that's why they are kind of complex to implement and it has become just really difficult for anyone to be to make a zero knowledge proof ethereum compatible but now we are seeing a lot

of different players coming in and making zero knowledge proof compatible ethereum chains like polygon ckvm and then there are few challenges as well uh implementing layer to change our layer 2 Technologies the first and most centralization so because these chains are very scalable and they submit their transaction information on ethereum that part is fine but how transactions are verified and validated on these layer 2 Chains is with the help of a sequencer so this sequencer is just one centralized entity and if this particular entity gets manipulated or if

this particular entity gets bought down the entire State chain can be compromised and be heard and then as we saw with ZK proof Z or zekiro knowledge proofs roll ups it's pretty complex to implement so complexity is also a constraint and migration is another constraint because these are different chains these are not the main ethereum chain so the funds need to be migrated from one scene to another and we all know that we have to use bridges for that and the experience to use Bridges is not that good and they can get compromised a lot of times and then the other point is interpolability so the interpolability means

interpolability of the data between one chain to another so this chains have really good interpolability between that particular chain and ethereum but the interpolability between one L2 to another L2 is not that great and all of this results to a bad user experience for an end user so that's what like the challenge is to implement layer 2 Solutions looks like and this was a really short presentation for everyone who did not know what layer twos are but looks like like a lot of you know and the implementations or the best implementations for the optimistic

rollups according to me are arbitrum and optimism they have been doing a really great job at implementing layer twos using optimistic rollups and using Z polygon ZK AVM recently came up and it's completely or fully ethereum compatible so all the smart contracts which we have on ethereum can be done on that particular chain as well without without or with like less like anomalies and then zksync is working on their ethereum ethereum compatible chain as well which is zikasync era so yeah this was it from my presentation and I if anyone has any questions now will be the

time to ask and if we all want to connect with me I am sensile on Twitter and if you're a new hacker and want to check out new materials or new tutorials we have a YouTube channel where we post regular content every week for to help people build different kind of applications so thank you everyone [Applause] [Music] thank you