Eth1 meets Eth2: forecasting the future

ETHCC 3 · March 2020 · 19:39

Alex Stokes considers how Ethereum’s existing execution chain and planned proof-of-stake system could come together.

Speakers

Topics

From ETHCC 3, hosted by Ethereum France.

Transcript

okay good morning everyone I'm Alex Stokes with the etherion foundation I'll be talking about how we're going to merge eath one into eath two and yeah hopefully what that even means will make sense after this talk so we're just gonna dive in there's not a time and hopefully there's room for questions so you guys have heard of eath two at this point I hope essentially there's this whole new network we're building it should give us increased security with proof of stake and increased throughput in terms of transactions with this like charted architecture so a key outcome right of this whole thing is that it's not that we're making a new network

we're making a sort of upgraded network and so we want it to look and feel like there's the sort of seamless migration from the etherium today to this new network I'm also sorry the clicker doesn't work so I have to walk back and forth right so this I would I just said eath one is this awesome thing we have today there's already all this stuff happening on it with defy right there's all this economic activity we can just sort of toss that out with this new v2 we have to like bring that you know into this new network and how we're gonna do that because of the design you'll see in just a second it's not immediately clear so this is the question how to merge 1 & 2 here's a quick little agenda I'll give

you some context on earth-2 so the other stuff makes sense there's kind of two different approaches right now this is very much sort of an open-ended research question as the best way to do this you can kind of summarize the two approaches the first one is building a bridge between the two networks and the other one is essentially making eighth one is special shard of the new network and we'll look at sort of what that what those means sort of mechanically then also we'll talk about some of the pros and cons and see what makes sense so it does go backwards it's okay this is fine [Music]

right so the first like really an important thing to know here is that if - there's essentially phases of it so it's being deployed in kind of these stages part of this is to like just get it right this whole thing is very complex so it's easier to get each piece right if there's smaller pieces rather than deploy this whole thing all at once right so yeah phase design we'll look at the phases in just a second importantly it'd be really nice if we get something out of each phase from eighth to four eighth one and that kind of actually informed a lot of this bridge approach and I'll kind of point that out as we go okay so these phases I keep talking about important ones phase zero one and

phase two so if they zero we have the lovely beacon chain this is supposed to be a block chain you know blocks point to their parents and it keeps going the way to think about it is that this is sort of like a system-level chain so it's going to basically keep track of who the validators of the system are and what the shards are doing and all the state of the shards and all this stuff right there aren't any sort of any user level transactions happening on this chain then we get to phase of one the phase after phase zero and we introduce all the shard chains and so what I try to do here is like these are beacon blocks in this chain the way to think about this

is that basically each shard is kind of its own block chain working in parallel okay so then these circles are the shard blocks and they're kind of connected this way but then I did this like smeary thing to show that there's many of them so right now there's a sixty-four right so rather than having like one eighth chain there's now 64 all working in parallel and that's where you get this like increased throughput also it's important note in phase one that basically these are just you can think of them as just like random bytes in the blocks there aren't transaction or smart contracts or any of the stuff yet it just literally you'll pay someone to put junk in there but it might be junk you care about then we have phase 2 phase 2 as his mission of state

execution so rather than now just having you know blobs of binary data in the shard box you now interpret those in certain ways and for example now it's like transactions to auger or make it out or Xerox these different things and so then finally by phase two we have what we know and love is eath one today but in this like much greater system also it's important to note that to do this in a way that feels nice to everyone has a lot of very like open into question still and so it's not immediately clear that we can just kind of go straight here the point phase zero phase one phase two there's still a lot to like to figure out here and that's

gonna inform kind of the conversation as we get to you know these different ways to merge in the two systems so like I said there's these two approaches first one build a bridge the idea is that you have the phone network and then you to network and they're completely separate networks they don't know about each other at all but what we can do is basically have light clients embedded into each network of the other one and so then they can learn about each other that way okay and yeah so there's arrows like eath to is like client of beef one and Heath ones like client of you two the other approach is you make eath one a special shard okay and I'll I'll talk a little

bit more about what that means when we get to that part but essentially you can imagine eath one is just kind of lifted and hoisted into the new system when it's ready and it should be quote seamless with the rest of the system and like ultimately that's we want something to look and feel like that that it's like quote seamless the question is like how do we get there and that's kind of what this slide is about is like where is always going so you basically want to like take the earth one state and move to the exact details are still TBD and the question is like how quickly can we do this basically there's a lot of benefits we'll get from the youth to

system for youth one and if we can like find ways to like migrate sooner rather than later then we definitely prefer that and that's part of the reason why we have the second approach that we'll look at after this building a bridge part is we think that we can probably get there faster so building a bridge again two separate networks we're gonna have like clients between them so the way to think about this well already today in the phase zero spec with the beacon chain you know this is set in stone it effectively is a like clients of the Thuong chain there's this deposit contract you might have heard of that's how validators into the new system from Leith one and teeth - it's not necessarily the best light client

but it is one and so if - already is aware of eath one block caches let's say and like the state of this deposit contract so then to like build a bridge right to go both ways you would then have to add some beef to light clients to eath one nodes so that then they're aware of the two state and then we can start doing lots of fun things and this is where these like benefits I listed or I motioned to earlier I would come into play so with the first phase phase zero we would get what you might have heard of this thing called the finality gadget the basic idea is that the beacon chain actually okay let me just have some nice photos we'll just skip ahead

so the idea this is the beacon chain right the thing I showed you earlier with the square blocks and all the colors so this is the beacon chain this is eath one chain the way that this light client works already on the beacon chain is that so many blocks it'll kind of ratchet up the youth one chain and learn about sort of a new block height right like a new block higher up the chain if everything goes according to plan and then there's a separate process that comes out of the sort of Casper proof of state can since this on the beacon chain which is called finality this is basically sort of how we get our Economic Security for the system the idea then is that we're learning about new eath one-blocks and as we finalized this chain they may sort of implicitly finalize all of these

one box you know that youthful unblocked and also all the ones before it and that's what this picture is trying to show so this is like finality it's like nice golden economic security keeping everything safe a big reason people are excited about this is that you could imagine and lowering the issuance right of the pre for work rewards because you are again relying on this modality so beacon chain security would kind of cover part of your security spend for the pork chain lower the block block Awards right then we have the next phase phase one this one is actually pretty

cool the idea is basically to use these shard chains as data so if I go back a lot right I said that these are just like random you know it's random binary data right so like one thing you can imagine is if there was a connection from eath one tooth - then you could then basically you know utilize this data for applications on eighth one right and so if you're familiar with these like sort of l2 constructions like roll-ups so zk roll up I'll toast ik roll up every so often they need to like commit state transitions to the chain right which again is just this binary data and so that's what you would use the shards for and phase one is exactly this that's

what this says and here's overwhelming photo so beacon chain eath one chain finality gadget is happening there's a point at which we then modify the eath one network to be aware of this eath to beacon state right state on this beacon chain and then because of that you then can effectively make proofs you know you would imagine there's like you know some contract here that then is like reading the beacon state right because now there's some fancy opcode that gives you that data The Beacon state then is like you know the state root of this thing you can essentially then make a very extended of proof into the sharp block

right and then like say hey there is this data at this point in time do some stuff with my real upstate locally to the contract here so layer 2 data all this stuff sardines lots of blocks scalability is the takeaway so and then kind of like I gave you the in first but basically then at some point we figure out phase two and all of those sort of research questions there and we can you know merge eath one into eath two and not have to do sorry all this stuff through the bridge and then it becomes quote seamless which would be nice so maybe

this sounds exciting but actually I guess I get out are there any questions yet okay wait to the end then it seems like this is kind of progressive and that was the idea behind the design is like hey at each stage we kind of do a little bit more and like get a little bit more out of it however there's some issues here that might not be obvious at first but basically because we're using like clients to go between the chains and we have this sort of like client bridge there's a question of latency so already I said there is this sorry already I said there was this ratcheting process right so like every so often if ii would learn about like a new eath one

block but it wouldn't be like block by block by block it would like skip a bunch of blocks and so already to like have finality extend to the youth one chain to do things like make proofs about data in the shard chains this would take some crazy amount of time right now it's like four or five hours of course for this to be useful we would shorten that but then you have all these attacks that could like come in either on the before consensus or the proof state consensus that could affect this bridge and that's where those stuff starts to get pretty dicey also there's like some operational concerns so like client infrastructure for the beacon chain was kind of deferred until

phase one what this means is that if we want to do this in phase zero and all this find out they gotta just stuff as they know to operator you'd have to run essentially a full eath to node and a full youth one node which a lot of people may not want to do because already we have issues with running eighth one nodes so that's not great okay so the bottom would like to take away from the previous bit is that this bridge could be kind of clunky and like open up five minutes lead to a bunch of these different attacks so instead you could imagine waiting until eath one is

ready to do this migration and just kind of do it early and you would basically taking some shortcuts around you space to questions just like do it as quickly as possible and the big bet here is actually making eath one stateless there's a lot of work on stateless aetherium which i might have a lot of time to go into but essentially you wouldn't need the eath one state to make at least to validate the chain because you'd attach the state to the transactions yeah the way to think about this is basically just wait until we can just pop the thing in and just move it in the main benefit here right is sort of this

native integration of eath one and eighth to the question is it might take a little bit longer compared to having this bridge but also you skipped all this like weird attack surface of having this very complicated like client thing both ways and of course the biggest risk area stateless clients there's a lot of early work on it and looks quite promising but that's something to consider and yeah it's not super clear what the path for it is so just remember right that like this is all one community we're here to like build all this stuff together so if you'd like to get involved there's stuff

happening all over the place Stefan III search the fellowship faith magicians forum github for like all this stuff this is me I'm like all these different services if you want to like ask me questions about this stuff I can point you to different places to get involved and now open it to questions I think we have a few minutes yeah so I think we'll do you yeah so let's see we are looking for some help with Trinity which is a Python client that is touching all of these questions stateless aetherium eath - oh if you're

looking to work on that kind of stuff definitely come talk to me good question if there block producers so that's exactly yeah so I kind of glossed over this because we were a little short on time but basically if we did this then it's not that so validators essentially are good eventually they'll touch every shard and this happens in like a stateless fashion which means that they don't need the state of some sort of

what's the execution environment on top of the thing on top of the shard right so instead you could then imagine splitting these rules out where there's like validators who are actually validating the chain in the stateless way then there's block producers themselves that didn't have the full state or maybe they go to like a state provider or something again we're having all those conversations in this data so theorem world right now same problem yeah so Piper Miriam is having a talk later at 12:30 1250 sorry I don't know what room but we will basically be

continuing the conversation here of like how are we gonna make all this work because it's not clear okay probably more of the ladder there are many eath two teams and a lot of them have their hands full with phase zero which is just like getting this beacon change shipped so you know these are interesting questions it's a little

bit down the road it does look like the fastest we could do this would be this making a special chart approach but that is blocked on having stateless clients for youth one so you know don't quote me on this it could take another two years let's say to get to stateless clients for youth one maybe another two years you get to phase one so the timeline is kind of line up yeah but it's guys if you want to keep asking questions you can guys can take it outside and use the whole the lobby to to keep it going I'm gonna quickly switch please clap yeah put your hands together Alex take the love