From ETH1 to ETH2: Opportunities and Challenges

EDCON 2020 · August 2020 · 21:33

Vitalik Buterin reviews Ethereum 2.0’s goals, proof-of-stake rationale, Medalla testing and phased deployment at EDCON 2020. The organizer’s recap highlights testing risks and uncertainties around proof of stake and sharding, alongside the long-term roadmap.

Speakers

Topics

From EDCON 2020, hosted by EDCON.

Transcript

[Music] yay okay um so hello everyone um good to uh well i'm not seeing you i guess you're i guess you're seeing me right now but still good to know that everyone is seeing me um so i guess today what i will be talking about is some kind of general things to do with eth2 and basically a kind of understanding youth two in terms of the history and of where east 2 started from and some of the challenges and

uh kind of some of the i guess steps that uh the ethereum to an approve of steak and scaling uh i guess uh road road map and movement has taken along the way um so first of all happy birthday ethereum ethereum is um as of uh july the 30th uh five years old um so yay and and uh this cake picture i yeah i got uh i found on the internet just happens to have five candles on it so that made my uh photoshopping or rather kind of gimping job very easy so yay five candles for five years if you're um if your aim is five years old now um so moving on um eth2

right or ethereum 2.0 or serenity or there's a kind of a lot of names for it and there is kind of two main goals for eth2 so first of all there is a more secure and efficient and of consensus through proof of stake so i talk about proof of stake a lot i talk about you know the need to replace proof of work with something more efficient um there's a yeah faq um if you just search proof of stake faq you can find it that uh goes through all of my reasons for why proof of stake is great and uh proof of stake is the is the future of crypto um sharding um is the other major goal and sharding enables much higher scalability by moving away from every node needing to verify every

transaction and there's a bunch of other incidental improvements along the way right so i have a bunch of kind of small examples um ssz so replacing uh rlp with a simple serialize um which is just simpler and more efficient binary trees instead of hextree is stateless client verification um better light client support and there's a long list of lessons that we've learned from each one that are kind of interesting um by themselves but they tend to be fairly small and technical so i'll kind of skip past them and just say no there's a lot of things that we learned and eth2 is trying really hard to make all of those things better but you probably know all this right but

so let's uh kind of go back and look at the history of youth too yeah so uh proof of stake in ethereum started with this blog post to have on the right screenshotted which which proposes a slasher a punitive proof of stake algorithm and slash here is interesting because it's the first um i believe um proof-of-stake proposal that seriously it takes um into consideration this idea that we should look for and penalize misbehavior right so we should actually like look out for the possibility that validators

would uh like misbehave say by signing two conflicting blocks and we should act just like make that not be a good strategy by just explicitly adding a penalty for it so this was done in response to one of the main criticisms of proof of stake which is this idea called nothing at stake which is basically that like if a proof of stake chain without penalty is uh splits and there's two competing chains then it's in everyone's interest to just support both of the chins so they can get rewards on either side no matter which which side wins but if everyone does that then everyone just keeps voting on on both chins and then if there's more chains everyone keeps voting on even more

chains and so the system never kind of convert ends up converging on one even if there's no attacker so adding penalties and slasher are going to fix fixes this though swasher does have some prop uh some problems and and it's definitely not the sort of um like there's a a risk of it getting stuck and there's a bunch of other issues but uh it did kind of introduce that really core concept right this concept of what we call slashing this idea that if you get caught um and you know doing some provably malicious action then you can be penalized as part of the protocol november 2014 um we i released a blog post on the ethereum blog where i introduced the notion of weak

subjectivity right so this is the security model of proof of stake that basically says that uh and if clients have to log on and go online like once every some period of time so for example once every four months and the idea here basically is that like nothing at stake relies on this idea that we can penalize misbehavior but in order to penalize you have to ha there has to have to be coins that are locked into some into the system that the penalty can be taken away from right because once uh those coins are not locked then whoever is supposed to get those coins can take them out and move them somewhere else and the protocol has no way to penalize you anymore i mean and so the question

is kind of how long do you keep those coins locked and um to prevent attacks where an attacker tries to start a chain that's an even older one then when those coins got locked um basically what happens is that you just require the client to log on once in a while and a chain that um basically if a client sees a chain then another chain that tries to revert too many blocks back in history is just illegal like a client just doesn't accept it right so this this also applies in the context of 51 attacks so for example in a situation similar to like say where etc got a got attacked and there were 51 attacks about a week ago in a proof of

stake system what would happen is that we would just kind of coordinate around not accepting the attacker chain and furthermore the algorithms can be designed in such a way that anyone who participated in the attacker chain just gets slashed um 2015 a first sharding paper released so if you have actually heard of this paper i'm it's sitting in github it's i think github um slash v butter and slash scalability paper um dash paper underscore paper one of those two you can find it if you just like do some archaeology digging through my uh through my repos um but the paper is like fairly long it does some math around quadratic sharding super quadratic sharding

committees hypercube designs a lot of interesting things um so 2015 was also around the um the time when we started kind of really going deeper and trying to come up with better proof sake algorithms uh so in 2014 we were kind of not certain whether or not proof of stake is really viable or a thing um but by the end of 2014 we're basically kind of certain you know proof of stake is extremely theoretically sound and we're going forward with it 2016 a lot of research of traditional bft theory 2017 at the beginning of the year um i released this uh post uh called the minimal slashing conditions um

which then got refined a bit and turned into the casper ffg paper right so this is this thing at the on the from myself and virgil and what basically the idea behind casper ffg is the trust then of combined together the benefits of what i call chain-based proof-of-stake or kind of nakamoto style group of steak where you just have blocks coming in one at a time and it's a chain um with a traditional bft consensus so things like pbft tendermint you know basically things that have some kind of two-thirds rule in them and they don't technically have to have a two-thirds world what they usually do so proof-of-stake design philosophy right um

probably the most important thing in proof-of-stake design philosophy is this idea that attack must be cheaper than defense so in proof of work like there's this kind of inherent symmetry right attack is as expensive as defense if it takes a hundred thousand dollars for the good guys to make some sequence of blocks it takes a hundred thousand and one dollars for the attacker to make a longer series of blocks and fork that chain away so chains are only as difficult to destroy as they are to create which puts a serious cap on proof of work chains security and i in this post even argue that and if that kind of one-to-one attack defense uh relationship like basically violates the cipher punk ethos right the cypher product ethos is fundamentally about

this idea that and if on the internet we can make a defense be much cheaper than attack and cryptography accomplishes this and proof of work does not accomplish this but proof of stake can especially if you use penalties um also talk about how an occasional reliance on social consensus is okay so like weak subjectivity is an example recovery from 51 attacks is an example so if a 51 attack happens you don't just have to kind of sit back and accept it and accept the attacker's chain as being legitimate you can kind of as a community say well no screw you were not accepting your chain and now your coins are burned and you know muhahaha you can't attack us again um which is definitely looking like a

better and better security strategy especially in light of milk systems like etc for example just being 51 attacked over and over again um relying on economic incentives for security so basically like the idea is that these are open systems and and in an open system you can't um like if someone does something like first of all you can't know that people won't do something bad because you know them as a person and you can't know that people won't do things something bad because like because some government will go after them because they might be anonymous which makes it really hard for governments to go after them so instead of trying to rely on a kind

of trust based and a various person-specific incentives we just rely on economic incentives rewards penalties the ideal goal is to make it impossible to do a 51 attack without losing millions of eth to that east being slasher to that east being lost in the inactivity league so we have a proof of stake based on the casper ffg plus lmd ghost as i mentioned combines together the benefits of a traditional bft consensus and the chain based consensus and also ghost on this wonderful algorithm from aviva's ohio and united ensemble and scheme that we adapted to approve or flat adapted to a prostate context so then we can also go into a sharding

right so shorting is this idea that instead of every node that processing every chain every no or or every transaction every node only processes a small portion of the transactions and we do this by splitting the transactions up between a bunch of short chains um in the e2 case it starts off at 64 shard chains and every node really needs to only process one shard chain and these shard chains are kind of tightly coupled together through the speaking chain and they all kind of talk to each other through the beacon chain right so here i have a diagram if something happens over here where you see the letter a and then that gets linked into the beacon chain through this thing and this is a symbol for a cross link um and then the next shard block in some other chart b i kind of hash links to that

beacon block and so now through a kind of hash chain b is aware of a and so and if receipts that get generated by a can be are in it can be verified inside of b so as i often call sharding or this kind of shorting quadratic sharding the reason basically is that so a regular in a regular chain the capacity of the system is a linear in the um capacity of a node basically because the capacity even though it just determines how many transactions you can process right so that's the nfo of n or ofc as i say and then here it's ofc squared right so because the capacity of a computer determines two things it determines both the um number of shards that we can process

right because every node has to process the beacon chain and the beacon chain has to keep track of all the shards um so the number of shards you can have is kind of bounded by the power of a node but also the power of a node determines how large the blocks inside of the shard chains can be right so the load of the beacon chain is proportional to the number of shards and the load of a shard chain is proportional to the size of a shard both are proportional to the capacity of a node and so the total number of transactions the thing can process is proportional to the capacity of a node squared and my latest viewpoint is basically that quadratic sharding is probably all that we'll need going forward pretty much forever like you can totally multi-layer the scheme and expand it and i actually talk

about that in my scalability paper from 2015 you can do cubic charting exponential sharding but i think like in practice going beyond quadratic actually introduces more problems than it's worth and that's one of the kind of research journeys that we made right the research journey basically being kind of starting off with a whole bunch of these wild ideas and designs and then really pushing them hard through this filter of basically pragmatism and simplification so back to the history 2018 e3 development started june 2018 we did this pivot from trying to design these two around the existing eth1 chain to designing an independent beacon chain march 2020 the gasper paper this is this paper for uh and

jan did um a lot of great work along with a lot of other people and daniel so i'm gonna have helped a lot with coordinating um basically combining together a vlad's lmt ghost with my casper ffg um and trying to create this a kind of holistic consensus mechanism um june uh and since after that we wrote a whole bunch of specs uh there's a lot of excitement about specs last year june 2020 yay phase zero multi-client test debt and august 2020 now v0 multi-client test debt that we market a little bit more heavily right so that's the medela test that um yay mentality has dead

i know i got a validator do you have do you have a validator there uh there that's the how do i points to do the like uncle sam will want to propaganda thing there we go um you figure it out um so okay a future of um eth2 right so we have talked about the history we can talk about the future as well uh so first of all enough to reduce risks the eth2 deployment process is split into phases right so phase zero which is proof of stake phase one which is short chains um but phase one only adds sharding for data it does not add sharding for computation which is

an important distinction um the sec um then after a phase one we have phase one point five and uh phase one point five uh and it is what will adds what we call the merge which is basically where we kind of shut down the eth1 chain shut down the proof of work and all of the eth1 state so balances contracts code storage from these one chain is kind of moved on to eth2 and users can transact on it um phase two uh so sharding is not just data but also adds computation processes transactions and then phase three plus aka ethereum 2.x and if ongoing improvements to safety efficiency scalability hopefully adding zero knowledge proofs

to everything though the basic structure of the eth2 chain may well kind of never be changed again now this is contentious so i know some people do want to uh kind of um retain optionality to be more uh to be more radical in the future and there's other people that are in favor of uh kind of becoming more uh more and more ossified over time because you know eq actually is sufficient for what we want to do with blockchains um so you know we'll see and i do think that realistically we're going to see more and more ossification over time but you know the future is the future and so a long-term real map this is this thing that i have published on twitter a few months ago where basically talk about all of the

different things that go into eth2 right so here's where we are today um in phase zero preparation and so multi-client test that we got that client optimizations we got a lot of that can have a bit more of that more audits happening as we speak deposit contract basically have that um then phase zero launch um then peer-to-peer networking preparation for sharding so the a big difference between a kind of existing networks and uh shorted networks is that in a shortage system you have to also kind of share the peer-to-peer like you can't just have a gossip system where everyone broadcast messages to everyone you have to kind of create systems that allow nodes to judicially download only a portion of the content

so in phase zero we're kind of already using this for attestation to some extent um but um in phase one this one becomes kind of the backbone of the entire thing um then implementation audits tests um each one is one is also very important uh stateless clients um this is a kind of the witness size bounding triad as i've been recently calling it gas repricing so changing to binary trees code mercallization making it possible to have a kind of smaller proofs that a block is valid where that proof doesn't require you to have the entire state um client optimizations um eip1559 the second of economic upgra fee market upgrade um a bunch of

pre-compiles eth1 to e3 merge specification implementation so a bunch of things happening over here and then here we have a kind of east 2.x right so a single secret leader election kind of basically a way of choosing block proposers that doesn't um expo publicly expose as much information ahead of time making a lot of progress on that recently being more friendly to npc validators which would allow things like more secure staking pools um advanced cryptographies snarking and starting things casper cbc and lots of cool stuff so challenges that remain right so first of all testing is hard and we've done a lot of testing we want to do more testing but testing is hard

we know that from the experience that we had in eth1 and in eth2 and we need to do a whole bunch of testing as well implementing phase one implementing phase one is something that's gonna start very soon as i mentioned shorted peer-to-peer networking is one challenge aside from that i think phase one is actually simpler than phase zero so i'm hoping it's not going to be too bad i'm merging eth1 into ease too so this is kind of combining together two separate different systems that's that kind of you know the the crypto equivalent of of space docking um between uh where um you know the shuttle and the and the space station are made by uh um two different companies or

uh or even two different countries right so basically kind of taking these two kind of very intricate systems they're going to have mid-flight in mid-flight and uh kind of all in this online procedure uh just sort of combining them together and kind of you know basically having a kind of one airplane fly into the other airplane's hangar okay fine i'm mixing metaphors um economics of uh proof of stake contain unknowns uh so how many people how much east will participate um what are the pooling and centralization risks economics of sharding contain unknowns um also a lot of centralization risks um so but at the same time you know every system has centralization risks right so

i given proof of work has centralization risks we have to kind of live with the ongoing fear that something will happen in the asic market that'll um centralize the whole ecosystem and so on and so forth but but you know so i am confident that proof of stake is going to be better but at the same time like we have to admit that bruvo steak and sharding do both contain these unknown unknowns so there we go hmm um let's see i've been told the countdown is one minute more than one minute ago so i

guess i'm done you