Ben Edgington - ConsenSys - Ethereum London
Ethereum London·Wed, Oct 9, 2019, 12:00 AM
Ben Edgington R&D at ConsenSys, working in the research and development of fundamental blockchain protocols, primarily for Ethereum, as part of PegaSys (Protocol Engineering Groups and Systems). Hosted by: Imperial College Join our future events: https://www.meetup.com/ethereum/ Tweet us: https://twitter.com/ethldn
Transcript
thank you thanks come so this is my topic tonight aetherium - I mean I guess quite a lot of people are just getting used to a theorem one what is this a theory until I should warn you this talk normally takes about 90 minutes but I don't want to get between you lot and the pub so I've done some drastic slashing so forgive me if somebody goes by a bit quickly but I'll be around a bit later if if you want to talk about any of these things in a bit more depth can I use this thing it works just quick introduction of Who I am where I fit in and what are my credentials to talk about this stuff I've done this very nice simplified diagram we've got this etherium community now the the etherion community doesn't look anything like this is messy it's chaotic it's complicated but for the purpose of this evening it's a nice ellipse and I got involved in etherion stuff about three years ago but now where do I live well we've got this another nice ellipse and of course reality's nothing like that which is consensus the company now a thousand people worldwide all working in the etherium space and within consensus as the group I belong to Pegasus which is protocol engineering and systems we're focused on public Jaina theory and protocols and also Enterprise etherion protocols and within that I'm in the R&D team there are about 12 this now growing rapidly and seven of us in particular are working on aetherium - which is next generation if they're in protocols so this is a point theorems main net the etherium you know today is some would say overdue an upgrade why is this what's the problem with with today's main net well first problem is it's we we could say a victim of its own success so for the first couple of years this this graph shows the percentage of block utilization so what percentage of capacity is the etherion network running out all the way from it's in step three years ago right up to the present here a couple of weeks ago and for the like first couple of years unremarkable running about five or ten percent a capacity no big deal a couple of little spikes the famous infamous Dow hockey in June 2016 keeps coming up then we've got the network spam attacks just before death Khan to this sort of blip there and then sort of towards the second half of last year IC o---- fever then crypto kitties fever and then from since then the network's been running a 95 percent capacity or so which is bad news for a network the upshot of that at the time 64,000 pending transactions that's well over an hour's worth and today it was over seventy thousand when I when I checked today this means increased transaction cost it means that you know you don't know when your transactions going to get into a block it could be any time in the next hour is not a great user experience what's the other problem the other problem is a bit more subtle perhaps but what happened to the innovation on ethereum and I I when I joined the community it was understood a theorem was the exciting one with the roadmap it's where the innovation was happening we're going to move fast we're not going to break anything so here we're even from the earliest days scalability was on the table it was called chain fibers in those days you got gathered April 2015 but actually if you read the article he came up with side Arian in early 2014 proof of stake was also talked about for the etherium network that's the main reason I I was excited about it at the time again nearly five years ago now and and this is why I joined the community because unlike other blockchain communities at the time things were happening well but it's three years later it's four or five years later we don't even have bit shifting in the EVM yet I mean it's taken three years and that's still not not there it's going to come in the Constantinople fork doing it turns out that doing innovation on a network that's worth billions of dollars is really hard people are just ultra cautious nobody wants to do anything which is potentially disruptive and innovation has slowed almost to a crawl and that was kind of understood I mean you know this is from vitalik this is a bit of archaeology going back four and a half years and the point is you know you don't need to read all the text but so we fully expect we'll end up releasing etherium to at some point in 2020 well nearly 2016 I think we're a bit delayed from that but the point is that an upgrade to aetherium was always part of the plan and the take-home message tonight if you if you remember nothing else the take-home message is it's happening okay what's happening so I'll tell you about it here into and basically this is a brand new blockchain so I'll explain what I mean by that the two big themes here are proof of stake so this is what you may have come to know as Casper it's a kind of Sun of slasher that protocol that Vitaly wrote about five years ago and sharding which is scalability this is the child of chained fibers gavel woods protocol and the plan until quite recently was that each of these would be separately put on to the current main their task contracts so you would have a contract that managed the proof of stake you stake your ether into that contract it would manage the validators for proof of stake and all of the rules and everything would be on the current main net and similarly for sharding this scalability protocol you would have a contract and that contract would manage your stake in the validators and all of that but around june time this year there was a big sort of upheaval to this plan and you know on further examination it was decided that this this was not really going to be feasible the current main net is is too busy adding protocols fundamental protocols on top of it was was not going to be reliable because the transaction volumes are not available and there are various sort of protocol issues like minor front running and sort of things which just made it difficult to implement on on the current main net so around June time there was a new plan and this plan recognized that these two big innovations have a lot in common and that's a lot to be gained by unifying them and doing them together and in particular taking them both off the current main net and then putting them on a separate sidechain to the current main it and I'll show you a picture and that would solve a lot of problems and make it a lot more feasible and practical and really unblock the routes are delivering these things diagram is a next one but I mean just in terms of the overall design goals what what are the design goals for this new blockchain which we're calling etherium - well there are a couple of things is God I have and those are two things I just mentioned proof of stake and scalability because I've always been part of the etherium promise the theorem contract as it were but in delivering these there are some qualities that we we have to maintain so decentralization so as we design these protocols decentralization is key it has to be possible for - for anyone who wants to participate in securing the network to participate as low as possible barrier to entry is a design goal you shouldn't need to have a supercomputer or a server farm or an ASIC to to join join the party another design criterion is availability now this is this is a decentralized systems thing the thing is the idea is that no matter what happens your network he keeps running other blockchain protocols don't favor availability they favor consistency so your if there something threatens the consistency of the data on the system then the system stops so Definity protocol is like that if the network becomes splits the two halves will stop and and nothing will happen and that maintains the integrity of the data however the vision for etherium is as critical national infrastructure you know it banks hospitals who knows will be power companies or it should be building their infrastructure on it II can't stop it has to keep running so this is the kind of the World War three scenario Corps the the brexit scenario when we're cut off from the rest of the world you know will it keep running security of course is paramount ledger integrity under normal circumstances it should remain I went museum mutable word oops just did use well easy to build on continuity so it's interesting I've characterized this as a brand new blockchain but of course it's got a kind of inherit value from the current it theorem we don't want our current ether to go to to zero or to be become useless somehow that values got to continue into the new blockchain so there is a continuity between current etherium one and etherium two now those are the kind of the mandatory things but the another advantage of moving all of this innovation off the current main net is it kind of unblocks everybody's pet product project so for example II was um has been talked about for a long time as part of the etherion protocol very difficult to implement on current main net for all the reasons I've mentioned but because we're doing something new we can bring in these new things like II was um as the execution engine quantum resistance is a big topic who knows how long until quantum computers are able to crack the current cryptography it may be thirty years but it may not and other things which I won't go into now for sake of time and some some things that could be in its storage rent different kinds of proof of state consensus so what's it look like this thing so this is where we are today this is the proof-of-work main chain which i call the kind of anchor chain and this will will chug along producing blocks on average every 15 seconds for the foreseeable future so nothing changes in that respect alongside this we're gonna be adding this beacon chain which I call the coordination layer now it doesn't do any processing of user transactions you can't submit a transaction to the beacon chain but it maintains the proof of steak and the sharded system and I'll explain the sharded system in a moment so it does all of the maintenance of people's steaks enforcing the rules of that system it generates random numbers which is an interesting topic all in itself and just maintains itself next is what we call the the data layer so this is the blockchain this is a Sharda blockchain this is a thousand block chains executing in parallel alongside each other now in this architecture each of these shards is not doing any processing it's not doing any state calculation all it is is maintaining its own ordered log of transactions and that's what block chains do at their most fundamental they take all the transactions that come in and just log them in order and then you can recreate the state by replaying the transactions so and at that stage that's all that these shards are doing taking their own transactions and creating an ordered log and then the final stage is the execution layer where you put an engine on top which can actually interpret the transactions and is able to calculate your state your balance how many crypto kitty's you have and so on and so forth what are we changing right you don't need to look at this is I just wanted to put this up as a just a placeholder to say we're changing everything so there's a lot of lessons learned a lot of developments a lot of new technology even since the theorem was first designed and I'll drill down into each of these in a little more detail but what's the scope of work it touches everything the the makes a blockchain system we're touching the consensus protocol the concurrency of the blockchain the crypto economic model will changing the cryptography the state-transition which is what I just talked about the way it calculates your your balances and so forth the data structures used under the hood the networking layer the the way that transactions you know smart contracts talk to each other how they talk to each other across shards and so forth so you know it really is a a reworking of the current aetherium so let's we go through these quickly and you know this is really just a race of topics if any of these are particularly interesting to you come and grab me and we can talk about them in a bit more detail but we're changing the consensus Brad gold today is proof of work we burn huge amounts of electricity just doing these useless hash calculations in order for miners to get the right to mint a block there's this is horrible this is going to be replaced by proof of stake so this whole system the beacon chain and each of the shards will run a proof of state protocol so that means that people will stake ether 32 ether to become a validator in the system now proof of stake isn't on its own a consensus protocol is just kind of part of a consensus protocol there'll be committee based validation that's a bit different today every node validates everything in the new system committees of nodes will validate certain parts of the system and those need to be organized and that's why we need random numbers so it can be randomly selected randomly shuffled and this is how the security of the system is maintained and and there are some of the benefits to changing the consensus model you know the obvious environmental benefit finality on the current aetherium on current Bitcoin nothing is final it can all be replaced if there's a 51% attack or something like that it can be wound back as far as an attacker likes in the in the proof of stake system you can declare finality at certain points where the whole all participants agree we will never go back beyond that block that state is as near as immutable as you can possibly get decentralization I mentioned already regular block times is a minor thing but it's a user usability thing currently next block might be minted in in a second time or it might be a minute in the new system it will be well as some debate about the interval but probably eight seconds and it will be regular clockwork block production concurrency so the world computer the etherium the world computer the world computer is single threaded which is alarming you know even even my laptop's got you know multi cause but currently every node runs every transaction and they run serially and this is the bottleneck this is why etherium can't scale more than it currently does because every every laptop you know whatever the participants are I have to verify every transaction serially so what do we do in sharding we split that workload up so we've got these thousand shards each of them takes us thousandth of the state and a thousandth of the transactions coming in on average and so you can run this like a massively parallel computer running all in parallel and your throughput your capacity of your system increases by at least a thousand times there are there are other things like this regular block time and things which mean you can increase the the transaction capacity as well so this is this is immense scaling of the blockchain capacity without crypto economics now this is a tricky topic current crypto economic model in aetherium is very simple it's basically revolves around minor rewards and it's only reward based and you got some subtleties around gas costs but nothing too complicated in the proof of stake system it introduces a whole new slew of crypto economic levers so you've got staking so people actually have to put down ether to become validators it introduces not only carrot rewards for staking or rewards for mining but also stick you can be punished if you behave badly state can be taken away from you and that all of these need to be analyzed very carefully because they're very easy to get wrong and to have perverse incentives in the system that actually end up doing things you know incentivizing people to do things which you haven't imagined you know things like selfish mining and or an example of that cryptography it's one of the kind of ironies of crypto currencies that until now they haven't really done a lot of cryptography I mean it's basically hashing and signing which pretty basic cryptography honorable exception maybe Z cache in the theorem to we're going to go large in cryptography so randomness is is a huge topic it's needed in protocol to manage all these validators and sets of validators but also high quality randomness we're looking at putting that in place and allowing applications like lotteries and so forth and the other parts more worthy applications to access randomness because that's a huge missing piece of current blockchain technology which is actually very useful looking at changing the hash functions so currently it's the ketchup hash that has some inefficiencies so probably Blake too and a new hash function called mimic will be used signing of transactions so the current we're looking at using BLS signatures because you can do interesting things with BLS signatures you can aggregate many signatures into a single signature this is very useful when you've got a thousand committee of a thousand nodes that have to sign off on a transaction you don't want to be having to check a thousand signatures all the time if you can combine those into one signature then that makes a whole thing much more efficient so you can do that with these BLS aggregate signatures looking at changing the elliptic curve I mean it's still juris still out on exactly what we're going to use but it won't be the SEC P curve that's currently used in due course when the protocols are a bit more battle-hardened and understood as EK Starks is a zero knowledge proof protocol which could be extremely useful in the blockchain system in the etherium system to prove certain things so like clients can can accept a ZK starkers proof that the data that they're received has been calculated correctly for example and then there are other protocol level stuff like fault proofs data availability proofs which aren't going to changing a state-transition today it's very simple there's the etherion virtual machine it runs synchronously with the transactions every block the miner executes the transactions in order on the EVM then calculates the new state of everybody's accounts and contracts and so forth and then the state route is calculated and gets put into the block so it's all completely synchronous and done you know in lockstep at every block one of the interesting possibilities is delayed state execution you may know about a functional programming Haskell for example you can store up transactions in you store up the list of calculations that need to be executed and you only actually execute them when somebody wants the result so I might go for months without checking my balance in my account and then I want to know it one day so I log on to an executor node I check my balance and maybe for a small trivial fee it will calculate it will root out the transactions that have affected my balance and calculate it on demand and provide the result and this could be a huge efficiency gain in the system because a lot of the calculation is is probably quite wasted today that II was amazed is another big topic there data structures yeah I mean just to say we're changing you know lots of stuff under the hood so Patricia trees are part of the protocol of current aetherium there are alternatives which may be very useful even famous are LP serialization exchanging peer-to-peer networking def p2p is is a bit specialist looking at moving to something called lib p2p which can handle this sharded system so if you got a thousand block chains running in parallel they don't need to see each other's transactions all the time that would be a problem you want to be able to direct your transaction so that is shared only amongst the participants in in one shard so you need a protocol that allows messages to be multiplexed so that they're not being broadcast to all participants but only the subset that really need to see them live p2p gives us that kind of capability and then there's a whole sort of cross shard transaction piece so currently if you execute a contract calls to other contracts are synchronous you you they they get executed the first contract waits for the result you know the thread just carries on in the other contract it comes back and you've got the result it's fully synchronous crosh our transactions are more naturally in an asynchronous model where you you you make the call then you go and do something else and then then you maybe get a callback and deal with the result that's a kind of more natural programming paradigm for this sort of parallel shard model but it's you know is it reasonable to have one calling convention for in child transactions and a different calling convention when you're doing cross shard do do we really need developers to be aware of whether we're contracts are in the sharded system and so on so there's a lot of work to be done in terms of the programming model for this stuff and is there a soirée unified model or what's best on that front okay so that's really Whistlestop tour of what aetherium 2 looks like the big question is is when let me first tell you about how and the you know the kind of the people who are developing it and so forth research and so forth largely led by the theorem foundation Vitalik said a couple of weeks ago that there are no significant unsolved theoretical problems left for a theorem - which is good news there are quite a lot of interesting problems to solve but I think the big rocks are in place there's a spec for this we can chain which is being worked on at the moment so we can build this thing various teams are implementing it which I'll show you in a moment there are workshops every three months or so next one's in two weeks in Devcon we do fortnightly calls there's a get a channel you can look at what I'll do is I'll put these slides I'll push them out on Twitter this is my twitter handle and you can follow the links and you can see this stuff if you if you want to look into it for yourself teams so eight teams work globally that I'm aware of who are actually working on beacon chain implementation so putting this code into action the idea is early next year to have a test net where we can get this beacon chain bit up and running it turns out that it's architecture diagram is also a project plan so it's the stages in which this stuff will be delivered now this is totally straw man time scale based on some speculation from one of the etherion foundation researchers it could be shorter it could be longer I'm hoping for shorter but the idea is that within the next year probably tested early next year we deliver a beacon chain that is interoperable between the the client teams a year later we do this shard chains that process these logs of data and prove that we can do the communications and handle all of the logging and everything necessary and then about a year later we put the execution engine on and make it you know fully usable as a programmable block chain just quickly that seems like a long time but there are alternatives one of the good things about this kind of crunch in aetherium which has slowed things down a bit is that people are starting to look at where stuff should be done not everything should be done at the layer 1 protocol not everything needs to go on the blockchain you know it's much better if people think very carefully about where they put their data and what actually needs to go on the blockchain and you know two years ago and it was really cheap and really easy to put everything on the blockchain everyone just wrote very lazy code and just everything on the chain but now people are focused on actually working out really what's the minimum we need to do on the blockchain and that's the right question so things like plasma state journals true--but and so forth are working in this space and there's been a huge explosion in activity in this stuff lately which is great final remark from-from Vitalik theorem Warren is a couple of people's scrappy attempt to build the world computer aetherium to will actually be the world computer okay yep right yep so randomness yeah basically has to come from outside so the basic model is within the protocol T's of Randall construction now it's where so that means the participants are basically validators commit their own random data and this is kind of mashed up into a random number at each block there are problems with that is bias Abul you know the last persons who contribute can decide whether to contribute or not based on whether they like the outcome or not the protocol has been hardened so that it is resistant to to small amounts of bias in the in the randomness so that Randall construction we believe is good enough for the in protocol randomness if you want a high quality unpassable randomness you need to do something more sophisticated this is where this verifiable delay function technology comes in which you know if we can talk about or you can look affirm and it's it's a long story that one [Music] yeah great question which I don't know the answer to so I'll tell you after DEFCON a whisper and swarm yeah sorry sorry I think so migration a theorem one to a theorem to so there are kind of two levels of that there's kind of ether migration so there will be effectively a one-way transfer into the new chain so stagers will stake on the new on the old chain that will be locked and then when they want to release our stake it will come out in the sharded chain and then later people will be able to transfer across into the new chain what about what happened through theorem one in that in the long term the current main net one possibility is that the whole state of current etherium how big it is gigabyte or something now is transferred to a contract in the sharded chain and you run the EVM as a smart contract you can do that on e wasn't it's available today and so effectively the whole of current maenette becomes one contract on the new chain and we preserve you know all the stuff that's out there today remains preserved and then you can shut down the proof work chain and so it's fully proof a statement right so yeah 51% attack is is a problem for Prudhoe State proof-of-work proof of stake system should be safe against up to a third of Byzantine or bad actors so it is probably not as strong in that sense as proof of work so yeah the basic modeling has been done around up to a third of participants being or two-thirds being honest so yes and in terms of decentralization you know there's lots of argument about this I would argue that the inherent centralizing effects of proof of work like you know cost of power cost of cooling and you know economies of scale may proof-of-work inherently very centralizing proof of state maybe has different factors but I don't think it will be as strongly centralizing as proof of work this is the storage rent yeah I mean it's on one of the slides I died when passed it very quickly it's being talked about for the you know maybe theorem three I mean in that I'm no block trailing at the moment does story Trent the point is you can put data on you pay once at the beginning to kind of 20,000 gas or whatever and it's there forever which is kind of odd you know anodes around the world have to maintain this foot forever so the idea is that you periodically incrementally pay for what you store in the blockchain and there are ways to make that make that work but yeah this is this is speculative yeah yeah yeah we got time for one or two more cam yep it's a great question and you know if you want to find out what the etherium community is like and you can do your own compare and contrast I'm not going to say anything from up here you know you can sit in on the calls are on YouTube so that for nightly etherium two calls are there you can follow the getter you can follow the research site and and you make your own mind up about why the etherion community and the Bitcoin community differ but yeah I'm confident that we are pulling together that will that there aren't going to be any nasty Forks or or disputes yeah I'd like to give it a try I mean you know so we'll is proof of state going to be centralizing we'll find out in a few years time and I I don't think it can be worse than proof of work but it who knows it's got to be done I don't think proof of work is sustainable you know the at all it's very so encouraging decentralization is is a difficult problem because a centralized person you know a person with a lot to stake and behave like a decentralized person you know so if I've got a lot of ether I can I can put down a lot of 30 to eat stakes and nobody knows it's just me so it's very difficult unless you combine it with some identity anti-civil mechanism which is you know and all identity met and assurance mechanisms are somewhat centralized I mean it it becomes a problem so the yeah the the only way is really to give no advantage to people who seem to have bigger stakes in the protocol but it's hard to do [Applause]
Automatic transcript — names and jargon may be misspelled.