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

Loading player…

'Inside Arbitrum' - Harry Kalodner

ETHGlobalSat, Oct 9, 2021, 12:00 AM

Join Harry Kalodner of Offchain Labs as he explains their scaling solution, Arbitrum.

Transcript

super excited to introduce introduce our next talk and that is harry from arbitram and here is going to talk about the internals of how arbitrarion works and how they're thinking about the optimistic world strategy so harry i'll ask you to turn on your video and kick us off with your presentation and welcome to the live stream awesome thanks for having me um really uh really excited to be here really excited to have a whole eighth global hackathon a hackathon devoted to uh scaling it was super fun uh getting to getting to see patrick's talk and uh and carl's talk and uh yeah really excited to be here let me just uh share some slides awesome um so yeah so i'm going to talk about arbitrary which is which is our solution to uh to scaling uh my name's harry klodner i'm co-founder and cto of off chain labs where we're developing arbitrary um and i want to start out by just talking about why arbitrary is awesome um and and kind of why why you should be excited about the future of scaling um chandak transactions are cheap that's that's you know i think that that's probably the uh the biggest thing i think people people get excited about especially if you're uh if you're watching the gas prices as they've as they've been on ethereum mainnet recently uh you start to really uh really wish you had some cheaper transactions um and they're cheap and it doesn't even rely it doesn't rely on any expensive photography um there's nothing kind of expensive to uh to run on ethereum at all um we're moving we're moving things into layer two um and it really feels like magic the whole the system is fully trustless it's permissionless and the security is derived from ethereum so you're not kind of trusting a security to some set of to some set of nodes that are kind of different from the regular old machines that are validating ethereum it's all still in that same ethereum security model now patrick was totally accurate when he said it's you know almost the same as ethereum a lot of times you know we kind of gloss over some of those like precise differences just because uh it gets into very nitty gritty details and kind of in terms of what matters um it's it's the same where it matters um and then particularly for arbitrary kind of one thing that i think is is a really big deal is is kind of full evm support and really easy porting um that kind of same contract you can deploy to ethereum you can also deploy an arbitrary using the exact same tool chain say whatever version of solidity you want viper or whatever whatever you're using um you can you can do the same thing on arbitrage which is which is pretty uh pretty useful um so the other cool thing is that we have a test net we've now had a test net out for i think about uh six months now uh we actually about a few weeks ago launched our uh our kind of test that which is a release candidate for our mainnet um as we kind of chug along um towards towards uh towards mainnet which is obviously where we want to be um and i think already in the last three weeks i just looked this up right beforehand uh there have been 174 000 transactions uh just over the last three weeks from 64 000 different senders so uh it's pretty cool and it's kind of open anybody can can use it deploy their contracts um whatever uh whatever you'd like to do with it um so kind of what is armature well so we'll start from the big picture um there's kind of a queue of transactions so if you look at that and kind of squint uh it kind of looks like blocks uh so similarly to ethereum we have our transactions they're in an order um we have some chain state and the state is what you get when you evaluate the transactions and then these transactions have some effects um and and that's kind of the the the mile-high view of the system um and then obviously we can we can dig down a little more and see what uh some of those details are um but there's kind of a bunch of initial questions that sort of pop out um when you're um thinking about this sort of when you're looking at that sort of high-level design um who keeps track of this information there's a bunch of different data there there are the transactions there's the state there are the outputs where is that how do we ensure that the state's actually correct and the outputs are correct like i can i can say hey you know trust me it's right but can you can you be that can you can you be sure of that um where do users come in so how do you actually get your transaction onto the chain and how do we interoperate with ethereum so is this thing just kind of floating on the outside is it connected and kind of it is connected how do we actually sort of navigate between the ethereum chain and the arbitrary chain um so just to kind of start off i want to talk about the the roll-up protocol itself which is basically how this thing is connected to ethereum and how it's secured and so first of all i'm going to answer that first question which is where are the transactions where is the inbox and the answer is it's on ethereum that ethereum is responsible for data availability um like it's come up in a number in the kind of previous couple talks um and exec whereas execution and storage don't happen on ethereum they're pushed off chain um but they still need to be correct because we want to be as kind of cl as secure as close to ethereum security as possible which means we can't we need to know that the execution and storage of the l2 system are correct and the way that arbitrary achieves this as an optimistic roll-up is through fraud proofs where a claim is made on chain and then anyone in the world can verify that claim and challenge it if it's wrong and i'm going to go into detail as to how that works and what this means is that the entire chain is secured by the ethereum blockchain so here's our roll-up protocol we have blocks we have a bunch of green check marks those are the blocks that everybody agrees on they've been verified um and we we all agree they're correct but now we have alice alice is creating new blocks and she's created this block 93 um and it's proposed so she's made a claim she's put down a bond and she says hey this is this is correct this is the correct new state um but bob comes along and he verifies alice's claim and he says wait a second that's wrong now bob is anybody bob could be me bob could be you he doesn't there's no there's no permission in here and so this could be anybody running a node who's willing to put down a state and so bob then makes a counter claim and he says well actually the state after 92 should be this and now we have a dispute which we need to settle somehow in some you know in some cases this kind of looks like a fork but ethereum needs to resolve it because there can only be one true roll-up chain and so we can't really allow this fork to go on and so the question then is how do we prove fraud how do we actually settle this dispute and so kind of to in order to talk about that i want to just sort of quickly restate the setup here which is that all the inputs to the chain are posted on ethereum and basically what happens from those inputs is deterministic and so if i'm honest and i'm looking at those inputs i know what's correct and then we have some validators and those validators have put down bonds and they've made claims about that execution so they both have some skin in the game and they're they're kind of liable to lose that bond if they've made an incorrect claim and anybody can do this so that's kind of our setup and then the question is so what happens now that there's kind of two conflicting claims well the answer for arbitrarium is we use an interactive challenge process and so we narrow down the dispute into smaller and smaller pieces and then run a small unit of dispute on chain so that ethereum can be the final judge of what's correct and what's incorrect so what does that look like so so in terms so what we do is a process called interactive bisection where essentially you can think about the entire initial claim was made and it said hey if you run these 10 000 transactions the end result is x well and then i come along and i say wait but x is wrong so you can come back and say well if i ran half of those transactions the result would be y now at that point either the first half of the transactions is wrong in which case i know the i know the error was introduced somewhere in there or it's correct in which case the second half must be wrong if the whole thing was wrong and so we continue along this process down and down until we get down to not a single transaction but actually a single step of execution which is then replayed on ethereum and so we've narrowed down this dispute over huge amounts of gas and huge amounts of computation into a very very limited small piece that has to be verified by ethereum and with the guarantee basically that if you're honest you can engage in this process and you know you'll win um and this is why basically and this is how we achieve this property that any honest validator can make sure that the chain executes correctly and interactive proving is awesome there are kind of various ways you can go about this from the process of kind of in a roll up knowing that the state transition is correct there's a lot of there's a lot of awesome stuff going on in the dk realm there are various ideas in the optimistic realm and i i'm my personal favorite you know i'm a little biased here but my personal favorite is is the way we do things which is interactive proving it's hyper efficient in the optimistic case i can just put down a single tiny little claim about vast amounts of computation and i can i can success and then i can if there's no challenge it will just kind of be accepted on everyone and so i can kind of bypass actually making claims about a lot of kind of about each individual transaction by just making one big crane it's also minimal in the cost of disputes in l1 so it's kind of super optimized in the happy case it's also super optimized in the unhappy case where we minimize how much work ethereum has to do in order to verify whether there was fraud or not by cutting down in these simple transactions into a smaller and smaller segment that's been challenged and then resolving just this relatively simple execution on chain and further from that the fact that we don't need the fact that we just need to run a single step means that the actual complexity of the contracts and transactions in layer two can doesn't get affected by the fraud process at all so essentially we could prove we could have transactions there are other reasons why you wouldn't want to have transactions that kind of use 100 billion gas or you or a contract that's you know a gigabyte in size you know don't get me wrong these are not unlimited but they're but they're not but there aren't restrictions in place from the prod proof mechanism which means we can escape out of the limitations that are in place in ethereum and have the l2 actually have kind of higher capacity for for gas in a single transaction higher capacity for for the size of contracts than ethereum has and for anybody who's developed on uh on aetherium for a while you almost certainly have hit that really annoying thing in solidity where your contract exceeds the size limit um and kind of having l2 make that situation better is a pretty big win um and finally implementation and fraud proof flexibility this is kind of a bit more of a technical point but essentially the arbitrary chain is kind of secured by ethereum but it can make its own choices because we only need to be able to emulate a single step of execution we can change around op codes as much as we want we can kind of alter the virtual machine and so basically this means that there's a lot of experiment experimentation that can be done with kind of the initial version of arbitrary mainnet we're kind of staying pretty pretty close to ethereum because kind of those are the tried and true um design choices that have you know done us well for a lot of years now but the capability is there to really experiment which is awesome um so now i want to kind of shift gears a little bit we've talked about the roll-up and how it's secure but what does this actually look like to a user um and so we've been kind of like looking at basically what happens at layer one on ethereum but now we're going to talk a little bit more about what the layer 2 chain actually is um and so the typical experience is kind of from a user perspective feels very much like ethereum or like a regular side chain where there's a network you connect to you send transactions and you get receipts back and you deploy contracts and you interact with those contracts it all just kind of feels like ethereum which is pretty cool because behind the scenes there's a lot of magic going on um the fact that you can deploy your contracts as the exact same byte code as you would deploy to ethereum deployed on arbitrary which means that you can use whatever version of solidity you want whatever version of viper you want you know any any any kind of weird evm language i've never even heard of the fact that like ethereum tooling just works is pretty magic and the reason the way we achieve that is over here on the right side and i'm going to talk about that a little bit more later but it's this magic layer called arbos um which is kind of the l2 operating system or runtime and actually does sort of the translation and does all of the bookkeeping for the layer 2 chain um and so you can kind of think of it as doing a lot of the things that an ethereum node does except trust essentially kind of trustlessly as part of the l2 chain itself as opposed to being part of the client and so that user experience this is really just reiterating what i was saying we have the standard endpoint which means it's kind of which means the chain is compatible out of the box with metamask with hard hat with whatever kind of your your kind of the tooling is that you're used to and we're kind of working really hard on kind of expanding out and supporting as much ethereum tooling as we possibly can because one of the key things about actually successfully getting people into into the l2 ecosystem is not forcing them to learn a lot of new stuff people are busy people are busy and they've already spent a lot of time learning ethereum tooling there's already been a huge amount of effort to improve ethereum ecosystem and tooling and we want to take advantage of that um and and so that's kind of a really big deal i think and so the user experience then is you're running a you have a node maybe it's you know a hosted node like maybe it's a road that you're running on your own computer either way um nodes always know the correct state and so kind of there was this whole validator protocol i was talking about before you don't really need to worry too much about that because the state is deterministic from the inputs so your node without even paying much attention to what the validators are doing will know the correct state and so you can just kind of ignore uh any sort of like you know fraud or challenges in the normal case because you know what the correct state is um and there's no need to kind of introduce any trust into the validators here um and you can use all of the same languages and tooling you're used to um and so just to give a little more detail into the thing i mentioned earlier the secret sauce arbo s so rbos is the l2 operating system of arbitrary it provides a lot of really cool features and we're going to be adding a lot more over time but just off the bat kind of we have this is where we get our generalized and safe l2 to l1 and l1 to l2 transaction bridging which is also kind of lets you really easily and kind of in a really simple way uh port tokens between the two chains um we get cool things like transaction batching and the ability to handle bls signatures at the chain level um rather than having to use smart contracts which is going to be really really valuable as time goes on for saving costs because it lets you cut down on that precious call data because it lets you cut down on how much resources are needed on ethereum in order to put your transaction into the roll-up um rbos is where we get our evm compatibility at the bytecode level there's this really cool thing which is basically when you deploy your contract it's actually compiled and or transpiled i should say because it's very simple um into kind of your l2 contracts um and so basically that's done in the l2 system which means that you don't need to worry about it on your computer it'll happen automatically and it'll happen securely because it happens kind of as part of the core system rather than sort of an auxiliary tool that you have to run um and this whole system is easily extensible with new transaction types and features and so kind of over time all of the cool ideas that are developed um in the context of ethereum and in the context of arbitrary as time goes on will be really easy to incorporate into the system um in in kind of a secure and kind of pretty rapid way um and so that kind of is going to really spur a lot of exciting development which i can't wait to see all right so i think now we've been through enough of the system that we can kind of put these various parts back together um and so if you look at this diagram i've probably touched on most of really all the components here but if you squint a little and zoom in you'll see a diagram with a bit more information in it um so this is kind of a little bit more realistic that first diagram is a bit of a simplification um but what this looks like is this is basically the fusion of the l1 system that i talked about and the l2 system i talked about where we have what's going on kind of off chain and here kind of off chain really means like just the actual hardware and software that people are running we have the layer one system running on ethereum which is the roll-up protocol which is the inbox that's where the validators are are staking and getting into challenges or getting slashed um and then we have kind of rbos and and kind of the evm compatibility layer where your smart contracts are being deployed to um and and this is kind of how how all the different parts come together um in a really neat way um so yeah so so kind of a little a little bit of background basically just on on who we are um as i said my name's harry um also i have two co-founders uh at off chain labs and steven um all of us will will be around uh on on discord uh both these both the eth global discord as well as the arbitrary discord um and would love to talk about any cool you know scaling projects ethereum stuff basically anything we we've been uh we've been in this space for for a lot of years now um ed is a uh professor well has has been at the full time at the company for a while but um is a princeton professor um who wrote and along with steven wrote the textbook on blockchains um a lot of years ago um and and we started out with armatrum as a as a research paper actually that we wrote together um before deciding that hey this could actually be practical um and and spinning it out into a real applied project uh which is how we we got to where we are today uh on the verge of actually kind of being having something ready to uh to scale ethereum and solve a lot of the the scaling problems that it's been happening that is it that it's been having um so at the hackathon um we have a lot of cool prizes this is the uh and i think you know some of this if you saw the video earlier you're going to hear some repetition uh because uh this is a slide i used in the promo video um but we have four different prizes totally 12 000 which we're really excited for uh for teams to win um that kind of bridge the uh bridge a lot of different areas related to scalability um some for just using arbor trim and deploying contracts and kind of making taking advantage of the scaling it provides some more wonky stuff like kind of working specifically towards cost chain interoperability or kind of integrating with the layer one protocol in interesting ways um and kind of one that i'm particularly excited about is is improving tooling so like for example and this one is kind of near and dear to my heart um there's a lot of work to do in helping in helping kind of understand and display what it means to have multiple chains people are kind of there there's already some work to this effect but still most of the kind of wallets and and kind of explorers and all of the kind of software around blockchains is really focused on kind of a particular chain um whereas now we're really migrating over to this world where there's kind of there's there's the you know there's the ethereum chain there's the arbitrary chain there's the optimistic ethereum chain there's the zka sync chain there's the loop ring chain there's the there's the matic chain there's you know there's there's you know so many and you know the tooling really needs to catch up and so kind of that's that's one area that we're really excited about uh and in particular um and so uh yeah just in terms of kind of like next steps and if you found this interesting kind of where what you should do next um so fred lax and daniel goldman um are giving a uh a workshop on uh on kind of the kind of the practical matter of building on arbitrary and kind of you know what there is to know you know it's gonna be pretty short because it's it's pretty easy um but there is some pretty cool stuff in there uh so you should get excited for that and that's on monday um also um we're on the east global discord but probably you know a lot more of the team and it will be a little more responsive on the uh on the off chain labs discord so just if you visit arbitrary io you'll get the link to our discord it's worth joining it's uh it's a lot of fun um and then there's some pretty nice developer documentation at uh developer.offchainlabs.com and in particular there's a section called inside arbitram um which uh you know hence where i got the title of this talk from um which goes into kind of way more detail than you could possibly imagine into into kind of all the different parts of the system um this this talk was basically kind of a sneak peek at some of the content in there and so kind of if you're really interested in kind of roll-ups and arbitrage and how all this stuff works i would highly recommend going and checking that out um so uh so yeah i think i'm coming in a little under time but you know i think i basically covered it so thanks for thanks for listening and excited for the panel

Automatic transcript — names and jargon may be misspelled.