MetaMask 🛠️ Linea in the L2 Landscape: How to and where do you build? - Emily Lin
ETHGlobal·Mon, Oct 9, 2023, 12:00 AM
JoinEmily Lin from Linea for a workshop titled "Linea in the L2 Landscape: How to and where do you build?". The L2 landscape is wide - so how do you choose where to build? In this workshop, we’ll start off with an L2 crash course. Afterwards, we’ll take this information and apply it to the key pieces of what makes a successful L2. We’ll end by talking about Linea, an EVM equivalent zk-rollup, deploying your smart contract on it, and share some alpha on what it looks like to win (the hackathon) Thank you to everyone who joined us for ETHGlobal Paris 2023! Paris is the city of light and birthplace of many revolutions. Therefore we were thrilled to be back in one of the most buzzing and free-spirited cities in Europe for ETHGlobal Paris 2023. A lot has changed in the European ecosystem since the last time we hosted a hackathon in 2019. ----------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com
Transcript
foreign [Music] yes okay cool okay cool hi guys I'm Emily I'm the developer advocate for Linea if you guys haven't heard we launched mainnet on Tuesday big round of applause um so I mean this Workshop is not so much about building but more so talking about where to build and why you should choose Linea right um I'm not sure where we sit in terms of the technical background from this group so I'm starting from like Ground Zero um if you glaze over in the beginning that's totally okay but we'll get into something more complex later so anyways what is linear so Linea will be a type 2 ZK roll-up right now amongst the ZK roll-up space no one is actually type 2 yet I'm going to explain this later but keep in mind that this is what we are so starting off why do we care about l2s right so if you've heard of the blockchain trilemma essentially it's a pick 2 situation between scalability security and decentralization ethereum basically has chosen to focus on security and decentralization and with like the boom of ethereum you guys have probably experienced high gas costs and transaction times being slow because all of that is like a competing kind of computational cost so what do we do with something called like a layer 2 solution we've moved up to something called the roll-up Centric roadmap uh what that means is starting from a layer one it's basically the underlying foundation in base blockchain that's where consensus happens that where data stored the history is there um examples Bitcoin ethereum Avalanche Etc once we move into Layer Two this is actually what we care about so layer two's uh work by pulling the execution um computational I guess capacity off of ethereum the important part to clarify here specifically is that Roll-Ups have been the I guess decided solution because it posts that data back to ethereum so if you guys are familiar with like polygon proof of stake so you might have heard you have polygon proof of stake that's what you know that's like an open C Etc versus polygon zkebm which came out recently polygon proof of stake is a side chain it is not a layer 2 solution all that data is stored within polygon so that's why kind of we've you've seen this pivot towards roll ups because it is a much more secure system to leverage the consensus mechanisms and Community around ethereum uh that like a separate alt one uh alt layer one or a side chain would have um anyways so that's what a roll-up is uh how does it actually work so the anatomy roll-up has well and the anatomy of an optimistic roll-up has kind of this structure of there's an on-chain contract so that's going to be on your L1 that stores your roll-up blocks that's where the data is stored it monitors updates um the next piece is the off chain VM so this is where the computational uh stuff comes uh so that's going to be um what you hear of the VK ebm which we talk about later and the last piece I just like kind of grouped them up together but operators validators aggregators sequencers you can kind of think of this basically as the entity that takes in all that transactions orders it figure out what is going on and then post that data back um so moving on I'm going to name two key vocabulary words you need to know when thinking about the different types of Roll-Ups right so specifically we have the deposit process so that's moving uh each from L1 to L2 and then the last piece is eth from L2 to L1 that's withdrawal so this actually withdrawal is a key difference one of the key differences between optimistic and ZK Roll-Ups so let's actually talk about it so optimistic Roll-Ups you might have heard arbitrim optimism huge tvl they're the first ones to come through right so essentially what they they do is they assume transactions are to be valid so to take a step back right like I keep mentioning data availability what the important thing here when we talk about the different types of Roll-Ups is how do we verify that the data we're proving is true right so optimistic rollups came around and we say ah let's just assume it's true basically we're going to have a seven day challenge period to wait uh for the community alongside some slashing mechanisms and incentives to essentially say hey this looks fishy let me run a fraud proof if it turns out to be a faulty transaction that will be rolled back right there are workarounds like trusted Bridges but we all know bridges are always hacked so it's not necessarily the best solution but anyways so that was kind of the first iteration of Roll-Ups we knew we need to do this but people got smarter I don't want to say people got smarter research took a little bit longer and we got to the point where we have zero knowledge so how are they different from optimistic Roll-Ups so essentially they have something called a validity proof so rather than optimistically assuming they just say hey when I post this data back I'm just gonna also post a mathematical proof to a separate verifier contract that will verify that it's true or false something I'm just going to mention and I always say this I get a lot of questions about oh how is privacy on Linea that's a common misconception because people think oh ZK private identity Etc that is a common Association right because the property of ZK proofs is that you can prove something without having to reveal the information what it is in the context of a scaling solution is more so hey when we're choosing the different types of mathematical proofs we can use we're going to choose a zero knowledge proof because that's going to reduce the information as much as possible when we post that data back to be verified so that was kind of the choice examples include Linea ZK sync polygons and KVM scroll and starknet uh so I I think there's a lot of different layer tooth um kind of you know optimistic versus EK but once we get into ZK like what's the difference between all of them why do we care about uh the different kind of pieces uh so the first piece where I keep mentioning about zke EDM so essentially this is a zkbm is the off-chain virtual machine that essentially allows you to execute smart contract transactions in a way that ZK proofs can understand I can't explain how it works but basically you can think of it as you know I'm writing a computer program how do I turn that into like polynomials and math that a mathematical proof can actually run and validate so that's kind of what a ZK evm we've been building right and the different that's the differentiator one of the differentiators between all the ZK Roll-Ups so this is kind of where I get into the different types so if you remember that first slide I said will be a type 2z KDM at the highest level Type 4 that's going to be Stark net that's going to be ZK sync they you can write in solidity but it is not 100 by code equivalent what that means is tools you're familiar with truffle hard hat Foundry you might have noticed you need to download a plugin not everything is covered so you got to be really I guess um what do you call it cognizant about the functions you write um whether or not it's actually supported by that Network you kind of move further down so type twos essentially are fully ebm equivalent so that's I can write in solidity I can write in Viper it's 100 by code equivalent so the tools that understand the evm don't need to change at all because there's no difference um there so that's our goal that is also the goal of the other type 2 zkebms no one has currently reached that yet but um you know it's on the way people constantly doing research and we're like fully confident and the last piece is fully ethereum equivalent basically this means every part of the ethereum ecosystem I guess kind of structure is used for developers specifically there's not a lot of difference in your developer experience I can talk about about this later if you guys have questions about why it would matter but it's not super important for like a hacker for example uh so last piece when we talk about like the different types of ZK EVMS right um the kind of idea is the performance and compatibility trade-off is there like building a zkdm is very difficult I think with starknet for example they started off with writing in Cairo right because their assertion was basically evm itself is like very hard to prove so we're going to change parts of it to make it faster and more efficient and things like that um I think with the proliferation of type twos basically that thesis has been proven and Incorrect and people are constantly like iterating so you can also see something like what starknet now has a new transpiler on top of it that is moving from solidity to Cairo uh to Cairo VM to post back to ethereum and I think that is just an indicator of why it is important to maintain that kind of network effect of keeping like solidity devs in-house like the ethereum ecosystem has already been growing and stuff like that so anyways kind of like how the approver works at a very high level you can kind of think of it uh in linear terms in like three different stages or I guess how many stages are here for uh so the fourth first part is arithmetization so arithmetization is basically that part where we turn the computer program into math so we call this traces um Linea is special because we are the only ZK evm to actually directly arithmetize the EDM what does that mean it means like there's actually slight differences where they have an intermediary VM with the other l2s um but that's that's super cool Tech I don't want to explain other people's like Roll-Ups obviously because I don't work there but the next piece that we do and this is really what sets us apart is something called the inner proof system so it's called Vortex and Arcane so essentially here I think diving back into why ZK Roll-Ups are really cool a specifically mathematical proofs is you can apply mathematical proofs on top of mathematical proofs and do that recursively so you have like this kind of recursive infinite scale and that's kind of where Vortex and Arcane sits right we use something called lattice based hashing which is a really interesting thing that is like plausibly post quantum what that means is quantum attacks don't exist but if they were to we could uh I guess set up our system such that it would be I guess resistant but no one wants to hacker roll up they're going to hack the nuclear codes right that's how it works but anyways it's optimized for recursion the last thing is it's really efficient for Hardware acceleration which is kind of something you think about when you think about performance improvements my last piece is an outer proof so that inner proof actually does not get it small enough to be posted back on ethereum that last piece is what you might commonly hear as like snarks you might hear words like Planck growth 16. that's the last piece it's really cool because you get to basically compress or verify one transaction and one billion transactions in the same amount of time for our ZK circuit libraries I want to do call out we have an award-winning gunnarok circuit Library it's open source it's actually used by different projects it is the fastest DK evm on mobile phones so when we start proving things on high schoolers phones like yeah nowhere there but anyway so like I guess now hopefully you understand this piece let's talk about actually what I think and I think linea's success so far is really proved by it's not the tech it's the ecosystem right so private tesnet opened in January I pulled these numbers I think earlier this morning 50 million transactions like wallet addresses deployed contracts you can compare this against like scroll I think was like 46 million um polygons and kbn was maybe like the two to three I do admit there's an element of like having a token versus not having a token definitely drives transactions um but I think there's a lot more to this than like just Farmers right there's a belief in the ecosystem and I speak specifically we opened three days ago so we have 13.3 million TBL uh for that what that means right if you look in the order of I guess you could say um all the Roll-Ups ordered by TBL within three days we've jumped from like zero uh row 20 to I think now we are roll 16 and we are four million away from row 15. um and so there's a lot of growth right um and like why why are people really interested in this right so first thing right finality again that that idea of just ZK versus optimistic you have faster finality you have a more secure trust assumption Etc something you might care about is TDL so maybe if you're first building you'll start with arbitrim just because there's much more like liquidity to act with for your users right um the last piece I think that's really uh compelling as well as like roadmap when you think about what's next you know we're not just what we are now we are what we are in the future but I'm going to talk specifically about what makes Linea really different and like why we have onboarded so many partners thus far and maybe for developers here who want to actually take your apps past the hackathon um why this is important right so specifically it's like if you're building a Dap You Want to make money right and how do you make money you have users so we are at the same company as metamask we are a default integration so immediately with Linea you have discoverability if you have seamless ux you can think of metamask features in the future being set in the home of Linea right that's a really powerful value proposition when you dive into consensus is a little bit of a mode right so if you guys aren't familiar with bezoo so Basu is one of the largest open source ethereum clients so that means in-house we have a very experienced team to do interesting things with those kind of performance Opera operations on like the client side for an L2 so again kind of building on that ecosystem again if you guys are familiar with inferior like immediately we have that kind of scalability that comes with node providers and I think the last piece maybe if you guys are familiar with consensus metamask Etc we do actually have a lot of presence in the web 2 space so when you think about onboarding people outside of like our little click of like Fanatics right who are people going to trust you know JP Morgan is going to trust consensus right and I think that's become a very strong value prop that a lot of like I said the first 140 applications have been really excited about and why I believe and also like I guess why all those people are there so the last piece I guess is not super important how many of us have deployed a smart quad track before uh okay so I'm gonna say like majority of the room um so I don't want to actually go through a full demo but basically in order to deploy a smart contract you need a few things so you need eth to make transactions for you hackers there who are choosing to deploy uh you can get uh it through a faucet or you can Bridge it I'm a bit of a linear youth whale so also feel free to ask me I can just send it to you it's only for hackers so anyone watching this like don't send me your like wallet address over Twitter because I'm not going to send you any uh but anyways uh last piece right like I think the important part is just again you can use whatever you want to use um if you're deploying I think like if you're deploying here on polygon and scrolling whatever like please deploy to all of us because it's the same experience like you want to mask those bounties right so just kind of an example of what it looks like um I can show you right uh here's my config basically there's Gurley there's Linea wow look let me write this out live coding hopefully this works I'm gonna blame it on the internet if it doesn't anyways uh Linea oh do I need to run here oh I have an extra s where deploys oh does that work night wow so easy okay um that's about all I have yeah uh this is how you can get in touch with me Linea build this is kind of all of our information this is a QR code to a website about myself that I haven't updated in quite a while I mean but yeah if you have any other questions about Linea and stuff like that uh feel free to ask me now I don't know how much time we have left but um am I over time I talk pretty slowly okay cool normally I'm like but like I'm tired we're good we're good on time okay yeah so if anyone has any questions please let me know I can talk a little bit more about like I guess Linea right now another thing right when I think about l2s in general you might hear a lot of the narrative is like oh we're so easy for developers right but I think it's very much a chicken and egg situation um you want the users for those developers to attract and so like that developer friendly experience is just table Stakes I think that's where what Linea understands we want our Tech to be there we want the experience to be there but what's most important is that when you deploy people want to use you right so we already have something called the ecosystem uh investment Alliance I hate the name it feels like Avengers but anyways but it's essentially a set of like VCS dedicated to funding linear projects I think separately if you apply for a bounty there is um like an opportunity to get filled into our accelerator program as well so I think there's just a lot of like interest basically in supporting projects past the hackathon I mean I don't know how many of your students but I don't I don't uh promote quitting College to build in crypto because I like my degree but you know everyone has their own Journey um and if you want to build the investment opportunity is there yes um could you mention some key protocols that are available in linear for hackers protocols yeah I like Lego articles or any kind protocols you can liberate for their uh actually yeah so I do really uh so if you go to docs.lineia.
build oh I forgot to mention this actually um if you deploy if you use like our deploying or our what do you call it infrastructure Partners we will award bonus points I think our thesis right is l2s are supposed to be boring uh in a world where like or what do you call it like there's Mass adoption or whatever no one knows what an L2 is right what makes a Dap robust and interesting is kind of the tooling that's built on top of it so for example by economy is offering a bounties here by economy launched on mainnet with us day one um and Catholic transactions are something that's really interesting for like user experience gaming and account abstraction Etc so if you want to do like a linear plus by economy Bounty that is an opportunity for you to kind of see what you can build um outside of just like hahaha npx hard hat run scripts.deploy without the s.js network linear you know no one cares about that I mean we care that it works but like you get what I mean so yeah um so uh Oracle so if you guys are does everyone know what an oracle is here yeah okay cool yeah so oracles we have pragma umbrella Redstone if you're used to using chain link chain link is not deployed um on linear but there are other options as well um gelatos really cool it's another option for fastly transactions this is notifications do you have a question oh sorry yeah yeah so the native token is ether yeah the native token is ether so that is like the purpose of a roll-up right everything is like ethereum uh oh you have another question stop so I don't know if I can answer it all yeah you have a lot of time we have uh we have 10 minutes more yeah so we'll ask MTVM five sorry um what is the end game in terms of decentralization for sequencers oh and so on yeah through oh I had this in a different thing right here oh okay so actually this is something that's really interesting that I think most people don't know um how many of you guys know what multi-prover is multi-prover okay cool the only person who has a question so anyways like oh that's fine this is actually what I think again like I keep positioning Linea as something really cool but actually linea's true value prop I think Is our commitment to collaboration so starting off with like what's important with an L2 right is our road map so we're getting to that type too like number one if we want to say we're type two and commit it and say it publicly we have to be there uh so that's on their way uh the next piece is like how do you believe something is secure so uh focusing on open sourcing are stacked right now we want to kind of keep it in-house make sure everything's like secure do all the audits first before like that code is publicly released that is our next stage um and then yes like a roll-up will not exist without decentralization like ultimately the key why roll-up Swan over side chains is security and if you have a centralized sequencer and know like you can have Bad actors not that I'm a bad actor but you get what I mean maybe I'll leave and then all the Bad actors will appear but the last piece actually is multi-proofer um so when we talk about just one like proving system what happens right if there's a bug in the prover everyone's like uh I don't want to say f-u-c-k-e-d right um so the multi-prover theory is actually saying hey we have so many diverse implementations of the zkevm and like that's kind of also where like optimistic Roll-Ups have a completely different implementation structure right so if I'm passing those transactions through multiple approvers to reach like a consensus of truthfulness that is a much more secure model than like something like just a single prover right I think it feeds into why you have like multi-clients on ethereum with like bezoo and Geth and like all these different things the diversity is what promotes security so we are very committed to this um not every I don't want to throw a shade so I'm just going to say we are very committed to this so other Roll-Ups if you want to do this with us feel free there are there are it's in the works um yes you have a question I mean I guess it could be slower but I mean ultimately okay yes yes okay I I think it would be slower but I mean just like looking at the roll-up space right things are getting faster and faster and faster and it becomes a trade-off of yeah do you care about that versus do you care about like security and I yes um we I mean like honestly this is phase four so the actual implementation details haven't been decided it is a very difficult problem to solve and it requires a lot of coordination unfortunately everybody in the space right now is racing to decentralize um well I guess the first part is actually like racing to mainnet and then racing to type 2 and then racing to decentralization and once all that is figured out then like that kind of conversation about like is it fast enough like Is it feasible even like it is a very difficult problem to solve and those conversations are like happening in the sense of like we want this to happen together um but not necessarily like we've already committed engineering time to figuring it out um yes last question right Security Council do you mean who's running the notes uh no no no it's stuff like upgrades and things like that right all right so right now everything is under consensus right it's uh decisions are made by our engineering team um but again those that information is public um and like uh what do you call it I don't think any other protocols at that level yet where governance and actually maybe arbitrim's token is what's doing that I don't know I can't speak for others but that that's where we are right now um so we are in Phase zero I don't I don't know if the security Council has been established yet I think it's happening I imagine it will be Beijing metamask everyone in consensus like stakeholders external stakeholders as well uh let me let me rephrase this the decisions being made right now are internal consensus the security Council must include outside actors in order to actually be in effective security Council right so that's where we're at cool don't ask me any more questions because now I'm sweating a lot yeah thank you [Applause]
Automatic transcript — names and jargon may be misspelled.