Verifiable Linux VMs on Ethereum by Carsten Munk

ETHDubai 2024 · 21 Apr 2024 · 7:45

Carsten Munk introduces Cartesi’s approach to proving the execution of RISC-V Linux virtual machines on Ethereum.

Speakers

Topics

From ETHDubai 2024, hosted by DeFi Dubai.

Transcript

all right so I'm cast monk from the kesa foundation and I'm here to talk to you a bit about how we do verifiable Linux virtual machines on ethereum and this is kind of like from a little while back to kind of like fit more in kind of like the more modular narrative is tweet from Hayden uh from unisub where he talks about that rollups are just chains and chains are just servers with superpowers like for example history that you can verify it history is basically using things like sequences like for example espresso or Celestia or all kind of like mediums out there kind of like or let's say dunk shotting something like that and also

that you can go and kind of like verify the history or kind of like the past a little bit like a time machine of these uh servers in the past which is where the virtual machines come in an execution layer and also additionally in this in the module set up things like ipfs ipfs and ethereum kind of enables that it a service that's accessible to everybody it's servers that can't be shut off because we get the content addressability of ipfs we get things like ethereum for the security and also importantly that these kind of like chains are able to kind of interoperate with other servers which is what we call bridging right and one of the things you kind of realize when you're looking at what uh

servers that are out there at the moment is that basically you find that these millions and millions of servers that exist there are typically running Linux like it's written using let's say existing programming languages it's written using uh normal tools and so on this kind of like where and I we'll talk a little bit about what kesi does and kind of like why this is important so what we have is the kessi machine it's uh let's say some people call this an lvm it's an open source risk 5 and risk five is this open source uh instruction set set it is very documented it's has a bunch of test cases it's running in real hardware and what we have done is kind

of like implementing a fully deterministic computer uh or machine where basically if you start out in one particular point of state of your machine you will always always uh end up in the same finalized state of the machine and where this is kind of interesting is that this is not like some restrict at small instruction set like only integers and memory access and those kind of things it's something that can actually run a unmodified ubun to for risk 5 it's not a new project it's something that's kind of been developed since uh since uh 2018 something we still developing on and at any point of execution history um of the machine basically uh all the machine state is in the memory you can

kind like turn it into one big mgle tree which means you can kind of like persist the machine at any kind of like particular step and resume execution from it and what we can do is that we can optimistically prove it like you probably have seen this maybe an optimism arbitrum they have this kind of optimistic verification game you find out kind of like the midpoint where you are agreeing about something uh where you're disagreeing about something kind of like let the underlying uh blockchain in this particular case ethereum um decide on kind of like what's the next step here one of the tricks we're doing here is that we are compiling this bigger emulator down into a much smaller instruction set which is the most basic risk five instruction set so when you're looking at our kind of like verification

game on chain it's basically imposs let's say with anybody with a basic computer science degree to actually tell that this thing is actually correctly implemented correctly in iterior um also additionally uh what we can do is it's also possible to prove this VM in setk by basically running this virtual machine inside soft like Risk zero um one of the nice things about it is that it's comes with an API as in that you can write into the memory you can get Merle proofs at any particular part of state and this my not very humble opinion here but basically the ultimate run time for computation is something that can run pretty much a 60 F uh 64bit operating system now what do I mean by that

general purpose and I think the definition of a general purpose VM today is not like I can run rust or something like that it's that you can run actual Doom in a unmodified manner on it this is basically Doom uh recompiled into risk 5 with a little bit of let's say uh modification so we can kind of show the frame buffers kind of while running but we can kind of go in and let's say have the nistic input as you're playing the game having replay put that into chain and uh then being able to kind of like execute the entire uh execution on chain and kind of decide let's say for example who has the highest high score additionally we can run things like Docker containers pretty much we can

interact with ipfs because the act of getting uh something content address from ipfs is something that's deterministic we can run uh python on it nodejs uh rust and basically it's as general purpose as it could be it's almost like real computer but except you can prove it to the blockchain it is something that's modular uh we're using it together with uh sequences like Express Celestia and also one of the things we're working on right now based on different reaking Primitives like igen layer and some of the other ones coming out is that essentially you can send out a sample or let's say your description of your machine out to the network get a bunch of samples back from uh op a bunch of operators on something like ion layer and then B basically

settle that uh sampling of the computation we sold into blockchain and you can and you can basically write your applications for this stuff in anything you want pretty much if you want to write in PHP have a huge Economic Security on this this is this is how you do it and this might sound let's say difficult and so on but in practice it's actually very easy you can go to a documentation you can quickly get started you selected you want to have something like a JavaScript application you start then editing this ja JavaScript application application it's not something that is like uh restricted uh or in some way kind of like significantly modified node.js it's actually node.js compiled into R5 that

you are playing with so anything you want to do in terms of let's say note modules and so on will actually work then you build it you can run it you can kind of start interacting with it in terms of kind of like sending transaction input to it and then you can kind of deploy it onto a let's say an any any ethereum based chain and at the moment we are also uh adding support to kind of like being able to for example very easily deploy into existing sequences uh or data available to layers layers like celestian espresso and that's pretty much it um and if you want to have any more information you can follow me on Twitter uh you can talk to some of us that are here at the conference uh read more about kessi uh or read the Deep technical specifics of

the kesa machine or don't join our Discord which has a very high level of signal it's not something where people are coming to kind do air drop farming or anything there's actually good develop conversation going on okay and that's pretty much it for my time [Applause] any questions otherwise feel free to join me afterwards all right thank you