New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Using Layer 2 Blockchains: A Hands on Intro with Zircuit

ETHGlobalWed, Oct 9, 2024, 12:00 AM

Join Jan Gorzny from Zircuit, for a workshop titled, "Using Layer 2 Blockchains: A Hands on Intro with Zircuit." Participants will receive a practical introduction to using rollups. Rollups are popular Layer 2 solution that aim to scale the Ethereum ecosystem. Attendees will learn about the fundamentals of rollup architecture, its benefits, & practical considerations for their use. The workshop will culminate in a guided exercise to interact with Zircuit, a zero-knowledge rollup with a focus on security. This workshop took place during ETHGlobal Brussels, a 3-day hackathon held in Brussels, Belgium from July 12 to 14, 2024. ETHGlobal Brussels brought together the most skilled web3 developers, designers and product builders from all around the globe for a weekend-long adventure to advance the Ethereum ecosystem! ---------------- Follow us: x.com/ethglobal Website: https://ethglobal.com Email us at: hello@ethglobal.com

Transcript

[Music] so what is zerit um zerit a fairly new zge rollup um we've been building for a couple years but uh we came out of stealth uh and started sort of showing off our test at a Dev connect in Istanbul in November of 2023 and what we wanted to do is take an optimistic rollup infrastructure um that one built by the optimism people who are doing good things and put in a zero knowledge proof system because we were sort of sick of waiting seven days for th alls and everyone just said it should work turns out it was a lot of work uh but nonetheless um you know we got here and it's great um and what that means is we have a VM and a node infrastructure where everything just works on ethereum so it should be as simple for everyone in this room to change an endpoint to their favorite tool whether that's metamask or hard hat or whatever people are using these days to build apps uh and it'll just work and we've tested this so I know that this is a true claim more or less um but it's really cool because you get all this cool stuff that works with optimism and and ethereum self out of the box with a Zer system that reduces the finality time and we got here through some research we had a lot of ideas for things on security and and um you know just different ways to do things in a rollup in the zero knowledge side for example there was always ways to optimize things but what we really wanted to do as a research idea was to figure out how to make um circuit more secure ecosystem than your average rollup ecosystem and this is a really hard challenge because zero knowledge proofs do that in the sort of sequencer you know ecosystem the infrastructure for the sequencer I can't cheat if I'm using a zero knowledge um proof system and I've you know done my job correctly and there are no bugs and things like this but that actually doesn't give us a lot of protection for the rest of the users on the space I mean certainly it means I can't make up money for myself and then rug pull my users that's very helpful but it's kind of a solve problem with the zero knowledge proof what we wanted to do instead was bring something that even dap developers and users of our Network would gain even without doing any extra work so what we want is to prevent hacks everywhere we can't do that we don't have total control of the ethereum network obviously so uh you know we can't do it everywhere but we can do it in some places namely on our rollup and so what we did was we actually add this idea of sequencer level security which I'll talk about very quickly in a couple of slides uh and I'll tell more about that but first let's focus on the first thing about building on it um and like I've already said anything that works on ethereum or on the optimism stack will work out of the box for us if it does doesn't let us know it's probably a small configuration issue or a bug but in principle everything really works so your your smart contracts are going to work your wallets are going to work but do note we're not on the super chain we're built on the op stack but because I uh we've done something different with our sequencer we're not on the super chain so you know it's going to be a slightly different setup but it should still be very easy then we took all the stuff that was good there and we already talked about how we put ZK circuits in there as AAP developer you don't need to know about that if you are interested in taking a look at our circuits or building stuff with the type of circuits that we were using we can point you to some places that look um kind of similar to what we're doing there are other open source projects right now that um you know use sort of a lot of the same ideas or were starting points for even our project and what this means is we have a nice developer experience or at least I hope so if it's not please let me know this is a hackathon part of what we're here is to get some feedback from you and um in terms of those zero knowledge proof systems um one of the places we could start was the privacy scaling expiration uh team zkm which has been out for a while I don't actually know if it's being maintained anymore I heard a rumor that it's not I haven't followed up um but if you interested in trying to build your own zik rollup or seeing how complicated it was to build a circuit or something like this take a look at these um they're very good they're not necessarily as performant as you'd want or they have different you know configurations that maybe aren't ideal but we ended up using them if you're interested and want to learn more about Halo 2 this is also a very good starting point because this is the proof system that we use and at the end of the day we glued these two things together to come up a circuit I've already said this uh and the result was something that has really really good easy to connect infra that works as well as a very good well-developed set of circuits that were customized and optimized to do whatever we want and enables us to do some of those things that we wanted to do namely add some security uh so I think the next slide is the sequencer level security which I'll talk about but also you know if you also have very ambitious goals for this accathon you want to build a roll up forking these two repos and trying to get them to talk to each other is is is non-trivial it does take some time so I encourage you to try but it's actually you know substantial amount of effort uh but it is a really cool challenge but what we really wanted to do is add some security okay I guess next slide I'm sorry I haven't practiced this one as much as I should have um so when you get from all of this is evm compatibility I think I've talked about this so in the interest of time I'm going to do this I will point out one note that I didn't talk about um we don't have support for cancoon so if you're building something that needs a transient storage the test net forer unfortunately will not support it at this time we're working on it but we got to get things up to date we just uh I think moved to Shanghai relatively recently sometime in the early year so everything up to that VM should work but anything else might need some things if you have questions or concerns or want to help us get there please let me know uh and you get better finality I've already talked about this so I I've alluded to this topic I'm going to spend some time here because I'm running out of time and I want to actually get to the Hands-On part of this I didn't actually want to be talking about what we're doing for too too long uh but the the main draw to circuit is really this idea of added security and the sequencer level security so what what we do is we have a sequencer that's currently centralized and we actually have an AI in there that will look at transactions and flag them as malicious or benign and if they're malicious they're going to go into quarantine and if they're benign they're just going to go so if you're an honest user does no difference to what your transaction does it's going to go through every time you're going to transfer your funds you're going to M your nfts you're going to do whatever you want to do on the blockchain but if you're a hacker and you're trying to execute something that certainly looks like the old stuff that we've seen or trying to do something else that is still new but you know it's going to wipe out a D5 protocol that's actually going to be flagged for quarantine and and put into quarantine which means your dap won't be wiped out if you're the DAP person who's getting attacked and if you're the attacker that you know transaction is not going to go through now uh that might be a little controversial but honestly we think it's a very pragmatic practical approach to security and everyone on the Chain gets it for free so if you build a defi app you come to zerit now you have an extra level of protection against Flash loans that you don't have on another level uh on a on a different network without doing any extra work and that's really really key we do all the lift with the AI to figure out what's a hack and what should be stopped um that does not mean you should deploy a code that has a bunch of errors or bugs please don't do that do your part you know write good engineering engineered uh smart contracts and defi da to protect your users um the SLS is the best effort service it could not CCH something but ideally it does the point is though we get this nice great thing that gives us more security guarantees right so in addition to transactions being well formed they also have to be well- intended in some some sense uh so that's what sequencer level security is and here's sort of how it works basically we do some stuff in the sequencer in the interest of time I'm not going to talk about it please hit up our docs um we have some prizes which I'll talk about near the end if you want to work on stuff related to SLS you need more details come find me or my colleagues and we'll see what we can do about sharing some of this information so that's zerc it in a in a lightning round that probably was too quick um but let's go on to the Hands-On part of this so if you've never used a rollup this might be interesting and it might be surprisingly easy if you have used a rollup this may not be as interesting but bear with me as I go through I'm here with circuits I'm going to point you to a bunch of tutorials and guides built from zirc uh docs. z.com is a great place to connect to our Network it has everything you need to know about connecting wallets or infrastructure or setting up you know whatever your Frameworks for development is um and we also you know have a standard Bridge e canonical bridge and a um standard block Explorer so Bridge or explorer. circuit.com will take you there feel free to use them please do use them if you're um trying to claim prizes for zerit you do need to have your code verified on explorer.

z.com uh and then if you need questions and we're not around or you know you're remote and you're not here in person ask us on on Discord we're happy to help and finally to other initiatives that aren't directly related to the hackathon but you might still be helpful um are build. zercom so it's a place where we reward Partnerships um went the ecosystem so if you finish a project and you think it's actually going to be going somewhere and you want to deploy it come talk to us and Deploy on our Network and when we go live and um we can sort of hook you up with all the support you need there and if you're into LRT and L LST reaking we can also offer you points by by reaking in stake. circuit.com but those are less important okay I feel like I'm talking a lot I've got six minutes left I got to get through this uh the Hands-On part we're going to use the Zera test net zerka test net is a test net unfortunately it's not quite live we're going live very soon but I don't want to promise any explicit dates especially as I'm being recorded and people you know always hold me to dates uh so you'll need sepolia eth good resources for sapoia um there's a bunch of faucets eth Global's got a really good one it also gives you um uh eth on circuit itself directly on circuit so you don't need to bridge necessarily if you withdraw on the E Global faucet but there's other ones also if you do find me around and your ask nice I can probably help you out a little bit I'm not going to give out tons but you know maybe I can uh do something otherwise once you connect it's pretty easy so I'll go through supp poio very quickly I'm going to use metamask for this example because I think a lot of people are still familiar with that maybe I'm just old and it's not popular but I like it uh basically to connect to spolia all you want to do is you want to uh switch this toggle to on so that you can see test networks and spolia should be baked in connect to that then you can go to the faucet collect the funds I was talking about and then to go to um zerit with those funds it's very easy just to bridge.

circuit.com uh after you add circuit testet to the network all of this is on the docs you don't need to worry about the specific numbers or chain ID or anything like this but it's just this easy you go into metamask you want to add yet another Network you say add custom Network because I don't think we're in there by default just yet add these details and everything just works then you go to bridge. circuit.com It'll ask you to connect with metamask hit next you'll be fine and then you just choose where you want to bridge um right now I think the support mostly is for eth spolia eth so take you know from spolia onto zerit put in some number in that field on the bottom left say I want a Bridget this modal will pop up and say approve this in your wallet and then the next slide you just go to you know metam mask and say approve and everything is done and everything works so that's it's just that easy Once you have e onoa um sorry on zirca testnet you can use it just like anything else you can send it to other people on circuit you can you know take your keys and put it into heart hat and produce or Foundry or whatever it is you want to do and and you're all set um I was going to say more but I I I didn't so there there's a lot of docs I'm going to give you some homework instead the withdrawal is a little bit more complicated it's not prohibitively complicated um go try it out more importantly go to try to deploy contracts on it I think that's the more exciting stuff and build on it and see what you can do with this and because we're at a hackathon try to win some prizes um if you're here we've got a lot of prizes out there there's ones for best project best Integra Integrations or analytics are still fairly new there's a lot of low hanging fruit that probably will work best defi best gaming and most creative project um you can see more on the E Global site for these descriptions they're pretty open-ended the best will just be the best whatever that means uh we want quality want completeness you know good code and we want some of these requirements which are a little bit of a mouthful but essentially a read me that says what you did why you did it how you did it that type of thing uh and stuff to be deployed on zuit what a surprise uh so that's all really good but what I would really like to emphasize if you do submit for a prize um the one thing I will really ask you for is a personal favor here is feedback if it didn't go that well if it you know didn't work out I want to hear because I I don't want my network to not be you know easy to use or anything like that so feedback is greatly appreciated and if you think it did go well but we could do something even better please let me know I think that's really really valuable feedback so thank you I encourage you to build on circuit so that when sequence level security is is lock uh I I I can I can send it to you or tweet about it or something yeah it's probably not the docs the doc should have everything else though um anyways build on us so when secret security is there you can use it thank you [Music]

Automatic transcript — names and jargon may be misspelled.