ZKPodcast: Gavin Wood on Polkadot, Sharding and Substrate

24 Apr 2019 · 1:05:42

Recorded in 2018, this ZKPodcast episode has Gavin Wood, Ethereum co-founder and founder of Parity Technologies and Polkadot, walk through the early history of Polkadot and Substrate. He covers how the project's ideas took shape, who was involved in its earliest days, and the coding practices that led Substrate to become its own framework. The conversation also touches on blockchain sharding, tracing the concept's roots and how it informed Polkadot's multi-chain design.

Speakers

Topics

Transcript

[Music] welcome to zero knowledge a podcast where we explore the latest in blockchain technology and the decentralized web the show is hosted by me Anna and me Fredrik [Music] in this episode would sit down with Gavin wood to talk about polka dots some aetherium sharding history and what substrates is so before we start this episode we just wanted to let you know

about an upcoming event called the web 3 summit happening in Berlin from October 22nd through 24th both Fredrik and I will be on site and will be organizing a meet-up for the zero-knowledge community so please keep your eye on our twitter at zero knowledge fm and if you're around come say hi so I hope to see you there now here's our interview with Gavin hello everyone and welcome back Gavin wood to this show for those who don't know Gavin is the founder and CTO of etherium or was and he's the founder of parity and is now working on a new project called polka dots super happy to

sit down with you again thanks for having me hi Gavin so we know you pretty well but we're really excited to have you back on so far in the podcast we've mentioned polka dot a couple times so we now have a chance to actually like set the scene for a polka dot so I think to start I'm definitely curious where did polka dot come from well a back story to polka dot I guess is relatively nebulous it the the beginnings of it were basically my considerations for scaling out aetherium which I I started thinking about and sort of mid to late 2014 now after leaving the etherium foundation I was very heavily involved in development

for the party ethereum client and not thinking so much about sort of next-generation protocols or scaling or anything like that I was I was pretty focused on just making sure we've made a theorem as well as we could but around mid 2016 once the party theorem client had hit 1.0 and we're relatively happy with the progress on that it sort of came to the to the fourth my mind that I started thinking about how we might how a theory and might might scale eventually now this was something that was meant to be in development for late 2015 and and much of 2016 and as someone who was sort of taking part in the core dev calls at the

time where we were discussing you know what was gonna happen with ethereum and all of the sort of ideas and really looking for in some sense you know sort of technical leadership from the wrister theorem research team we were getting relatively sort of a lot of I would how do I put it interesting ideas where we're coming but relatively little concrete sort of specifications or descriptions of what the final solution will be was was you know was wasn't being handed over to us so it was at this point I started thinking right well you know sooner or later parity is gonna have to start creating something that is a scalable version of etherium and it's

going to be sort of with or without you know the foundations help so that's basically when I started thinking about what would become polkadot now in late summer of 2016 I was in San Francisco with another guy from Paraty merit cut of it and you know we were we were sort of chatting about you know how cool you know sort of parity theorem was and how cool it would be to sort of really build on it and what the next generation of aetherium of the etherium protocol was going to look like and I was sort of talking about some of the directions that the etherion foundation we guys were going in what Vlad was talking about what the talat was talking about what I had sort of put forward in a couple of years before and we actually met with with j-kwon as well from cosmos

at the time who was sort of describing what cosmos looked like then I think it was called something else like goo Newhouse and some some you know significantly worse name we you know over the next day or two we're sort of hanging around in San Francisco I think it was a particular cafe that we spent on bar or something that we spent a few hours I forget where it was exactly where basically we put together what would become polka dot I it was we took ideas sort of that have been on the back burner and really it was like right let's how do we do this how do we make a scalable theorem everyone do it as as quickly as simply and as speedily as yeah as quickly as possible then let's let's just think

about how we would do it so polka dot or at least a sort of proto polka dot came from that and what polka dot was was a realization on top of that that actually this framework that I've just sort of described it doesn't require the individual chains to be all of the same type they don't all have to be shards of aetherium they can actually in principle be be any kind of chain one question here where she was shardene already proposed at this point the idea of you know splitting up the etherium state into many different and pieces and processing them in parallel in some way was you know was sort of really it was around since day one of a theory I mean it's like this is where a theorem will go eventually but the specific idea of

how it was going to happen like technically speaking and how the game theory was going to make sure that you know validators could ever possibly attack the network that wasn't that was still really hasn't been ironed out it really nailed down at all so yeah we're talking like two years ago when basically it was like the polka dot paper was was being discussed in these meetings like so you're in this these the etherium court have calls reserve frustration a little bit kind of like a sense of like I want to go faster I'm definitely from from the side from our side from parity and certainly from my my side yeah we're getting fed up of waiting you know this is what the etherion Research guys were meant to be delivering and and

there was relatively little the appearance of progress no you know I'm sure if you sort of dive deeper into it there was progress happening behind the scenes ideas were being tried there were people thinking about it there was sort of you know to and fro as is often the case with creativity but from our point of view it was you know it was time to get moving guys and if you weren't gonna sort of tell us what to do then we're gonna go ahead and figure it out for ourselves I think that's always like when you're talking about research and in general when you're trying come up with a solution to a problem in that way it's not it's exactly what do you say like it's not that there's not progress but you kind of think of something new and so this would actually be a better solution to this piece or

this would be better here and then you kind of I mean is the tired old quote of like perfect is the enemy of good where you kind of just keep chasing the perfect solution and you kind of never actually do anything one of my old bosses I once went to him and said like I I'm implementing this thing or I'm trying to implement this thing and I can't like figure out what the perfect solution here is like before like on paper before I start writing code like what should I do what do you think is the best solution and he was like why are you even thinking about this just start writing code and eventually you get to something that works so there's like these two like extremes either you

know don't think about anything just write code or try to think about everything and never write code so obviously have to put yourself somewhere in between I mean do you think also though like in that in those in that scenario there's so many constraints right like these proposals are made but you're kind of in this you're dealing with an existing protocol with something that has its definitions limitations I feel like if you're in one of these kind of conversations it's obviously going to be a lot harder to really implement something into an existing thing than to be able to start from scratch and that's basically what you guys did yeah I mean it's absolutely true I did it you know I've always been fairly clear that you

know upgrading upgrading any system in situ is really hard upgrading a decentralized system in the city is like nearly impossible so you know I don't want to I want to dismiss in any in any way you know the efforts of other people particularly within aetherium but it was simply a reflection of our own sort of I guess mindset at the time we'd implemented a bunch of stuff we were ready for the next chapter and the you know the Dexter hadn't been written so it was up to us to pick up the pan so it's a recap it was actually sort of a solution to the etherium charting problem scaling problem letter and

whatever you want to call it and you kind of made this protocol this idea but then added the additional abstraction on top that each shard can be different from the other one even today when we're talking about aetherium charting they're talking about all shards being homogeneous so they're all the same and they're all running the same VM and the same kind of model was there any complication in adding that abstraction on top T's you have to like significantly rethink anything in how you'd like thought of this protocol not at all in fact it was a just a logical implication of the protocol as it was that was meant to be just the sharded variant of etherium basically we sort of worked out the game theory worked out

the various actors and there was a little bit in it that said right this is where this actor should check that this block is actually a valid etherion block and then it was like right well actually hold on if all they're doing is checking that this block is a valid etherion block then we can just switch out the is a valid etherion block bit for is a valid block of blockchain x and it was as simple as that so you have this idea you're in San Francisco you're chatting with Merrick what happens after that you have this idea for this protocol was it like you sat down one day and was like here it is you wrote it out and it was done or was it kind of like you had to go over it a few times you're duh you

had to refine it how did that go how was that part so I think the key the key elements of the idea were basically in place in that bar at that time in San Francisco there was really nothing significant that was added to the to the protocol itself after that a guy called Wendell Davis arrived in San Francisco and we met up with him so I told him yeah we got this kind of cool idea what do you and he was like yeah this is a cool idea - should do as it turned out sort of Wendell Wendell ended up helping out the and we say go guys I need you know his time is relatively limited but otherwise I think he would

have been you know where was the word sort of vague ideas that was gonna help out with the project beyond that really it was a case of flying back to Berlin setting aside a week or two and and just bashing out this paper that basically said you know had all of the bits in it but I think I think it's worth pointing that yeah when I was when I was sort of typing out the paper there was the word refinement that that got in there part of the ayah part of the refinements were certainly in the direction of governance perhaps not sort of what we think of governance but the technical foundations of the governance specifically this idea that the power chains would be defined

in terms of web assembly which you know is now fairly central to polkadot to the project and also in some sense that the the main the relay chain itself would also be would also be defined in terms of what assembly and of course the name at the time it was called something else it went through three or four you know you can you tell us what some of the previous names are will you will you admit it on air actually you said okay one of the first name was called this parity which I caught right because it was like this for a chains right yeah II disparate and it was obviously tied into the branding but yeah after consulting a

few people on that there was it was considered a little too negative I think a later one was into Plex I went as far as to buy the domain for that but yeah that's a little blends into the background of the Aeons cosmos eternity Definity sort of math fight sounds a little 90s to me so I'm pretty happy polka dot actually arose through the paper so I wrote the paper and I've written the yellow paper before and there was already like a beige paper and red paper and an orange paper and one on so the colors have been done as far as I was concerned so I wondered what was next

there's patterns and excellence you've had colors you move on the patterns and it's like so could have like I'm on a strike strike a strike paper but stripes already associated in a finance world right so it was the obvious well polka-dots fun flanks and it fits on it fits if they're change little you can make it fit in a so you touched a little bit on governance there I was curious if that like was always part of the the construction and I like that you separated it a little bit as well I've heard the term technical governance used before I quite like that term - like there's human governance and like organizing people around the cause and there's technical governance how do you

actually implement a change on a chain for instance was that always like part of the idea or like was that something that came out of frustration with being unable to like change ethereum or where did that come from two main directions possibly three so first was the Dow so the Dow bit the disaster there I'm a little impressed that we actually managed to make a rescue attempt I mean we did end up with etherion plastic but you know I'm fairly impressed that that it worked out the way it did but anyway to ensure that if 90% or even 70% effort

of a community sort of feels about some particular way about something that you know that that should be able to be expressed and enacted in a automated with decentralized fashion I think is good then there was the the etherium hard forks so rolling out a hard fork is a pain in the ass we're seeing that even more so these days with sharding and casper and a few were the sort of technical improvements to aetherium and to be clear like just what most people or like Z catch people or whatever would call network

upgrades they're not like contentious hard fork so like trying to split the chain or anything just upgrades yeah that's right so basically non-controversial technical alterations to make it better and these are often kind of risky operationally heavy communications heavy operations that are very difficult to organize and people's general aversion to such things because of course most the people behind this at developers who and not generally the best people in the world at communications or organization or operations and so the the the the reluctance to actually do anything about

hard Forks is resulting in a lack of innovation and we see it you know sort of maxed out with Bitcoin but that that sort of inertia is is also fitting its way to a theory and I wanted this chain to be able to avoid that so that was that was the second thing the third one I guess something has always been in the back of my mind this this little me cast my mind back so it's March 2014 and battalion and and me are doing a an ethereal meetup in Silicon Valley and there's arrived maybe 40 people there and we basically just sort of describing

what it is that were planning on doing and look we've got like a faith proof of concept and isn't it cool and we get to the end of the talk and some guy with a Stanford t-shirt you know very it reminded me a bit there's a film and George Clooney was in called something and he there was that there was a girl and he was after the girl and the girl had a father who was in the FBI and the girl bro brought him a boyfriend that was sort of George Clooney's love competitor and the boyfriend was obviously a bit stupid and he had a t-shirt on with massive letters FBI and the dad was like you know is that why you I heard you're undercover and you know this is this kind of reminded

me a little bit that I need this does the Stanford impression I just really wanted you to know exactly you know so he stood up and this is like basically the first time and you know I've done a few public talks and this was the first time and only time that you know someone from the audience has given me such a hard time on a question and his question was how how'd you upgrade it you know this isn't gonna you this idea is great but how you know it's not gonna last forever and you want to upgrade it how do greater and the answer was well you know people upgrade you know you don't have the diversion then there's a block number and then you're great and he's like yeah well that's not gonna work is it at the time I was like of course it

will work at we find you know in some sense it was fine it happened a couple of times now we've done like what three four hard walk but he was he absolutely had a point which was that it's not easy and it could definitely be improved and at the time we didn't have an answer for him because there was no really I mean webassembly wasn't wasn't around there was a few sort of a couple of precursors the rebbe assembly but they weren't really yet you know the capacity that we could do what we wanted to do with them there was a lot of um but again it wasn't an acceptable solution for this it had numerous drawbacks so really there wasn't a technical solution and and whereas I should have said yes that's a good point

I actually tried to sort of make him understand an upgrade path and upgrade mechanism wasn't necessary and of course it fell on deaf ears but also you know I was yeah I was definitely done playing you didn't realize at the time that Stanford dude was actually predicting some of the future indeed now he was as it turned out he wasn't actually a Stanford dude it was just a dude who quite liked the idea of going the Stanford and I think you know he just got the t-shirt from a friend but nonetheless in he had a good point and that's that that has sort of been in the back of my mind for some time because either say it was the only time of I've you know I we were we were like arguing

back and forth or must have been five or six minutes which in a meet up is a fairly sizable chunk of time to be you know focused on a single point that you don't really agree on and it did stick in my mind and I think this is almost my way of saying yeah you know fair cop what we get into it now nice so this is funny because I actually have a question sort of related to this I was wondering what the best question you've been asked about polka dot is well I don't answer meta questions on principle so I'm just gonna throw it back at you and that was the very best also maybe you don't know right now what the best question was on polka dot and

you'll find out two years later so D in a little bit more on the technical side of like what the protocol actually is can you give a high-level view just like what the players are in this in this network and what their roles are sure well the polka dot paper mentioned for this thing two roles for the people that maintain polka dot so there was the the validators and nominators the Co laters and the fisherman in the let's say revised model in some sense it's still correct and you can if you want to split things into these four groups but I

actually prefer to to meld together the validators and the nominators because they basically fulfill more or less the same role and meld together the collectors in the fishermen because basically being a claytor implies you're a fisherman and it seems unlikely that someone would would choose explicitly to be one and not the other it's a relatively minor configuration point so in in the sort of new model there's really just validators and colleges and validators the main difference between them is the validators sit the relay chain so they maintain a single chain they keep synced to that chain looking at the blocks and they're helping create new blocks and the co

laterz are sitting on a para chain so they don't sit on the relay chain at least not and as a full node perhaps as a light client and they they look out for new chain new blocks on the pirate Ain and they basically help putting together just to clarify like the in aetherium sharding terms a pair chain would be a shard and the relay chain would be like what they call the the beacon chain or whatever so it's like one central chain and then a pair of chain is like a shard but it doesn't have to look like the other sharks that's actually I was curious about that like in the polkadot protocol is there a center is there if there's a central block chain with pair chains coming off of it yeah so the relay chain is is is

what you might call that the center so it's it's it's and it has it validates a bunch of other chains para chains that are that control that own state but they do so under the rules so that they set themselves and to the to the to the relay chain so the reach a relay chain is like this neutral third party that basically keeps the power chain at its word so the parrot chain wants to do something that it's not really about this against the rules that it set up for itself it's the relay chain that says no that's not against your rules if the relay chain where the security lies - that's right I have a question now about the

individual roles so you mentioned so now there's more like - so if you look in the context of like nodes would that be individual nodes making a decision about what which role they take or would a single node take on many roles I'm just curious where those roles really live a single well it's really about actors rather than nodes for example a an actor who wanted to be a parrot Ain collator so maybe it's imagine there's a pair of chain called web chain just to pick a name out of the air so there's a pair of chain called web chain and I want to be a web chain collator

because I'm gonna get paid in web chain tokens then I will run a full client a full node on WIPO chain the parrot ade and running that I will probably also because I want to be a co later I will also have to run a light node like client on the relay chain because I have to I have to know what's going on another relay chain to know whether it went to my well I have to know what's going on just a part of the sort of technicals so you know I'm actually running two sort of nodes I'm running a light node and the full node if I'm just a validator on the on the relay chain then I just run a full node of the relay chain so it doesn't make sense really to talking in terms of nodes but it does

make sense to talk in terms of actors it's quite reasonable that you will get a large actor who who runs multiple nodes so maybe runs a single well maybe runs a full node on the relay chain because they want to be a validator but they've got so many tokens and so much power and they've got so many Amazon instances they also run full nodes for fifty power chains and they that producing all of this all these blocks would they have to also run you sort of mention the light clients but they have to have a light client for each one of those Terra trains but I would hope not at least in you know possibly in version

1.0 I would hope not by the time we get to version one point gotya we touched a little bit on the sort of governance aspect of this already saying that you know uh they run web assembly but how do they actually run web assembly where does this mean I know the nomenclature so it's sort of like obvious to me well we're talking about run times for a blockchain I don't know if that makes sense to everyone though so you would essentially have you define your blockchain in some code then there compiles to webassembly this is your runtime but what are these runtimes actually doing like how does

this webassembly piece work and so you can split a blockchain up into two components if you like two sets of logic one of the components looks after things like ensuring that the block chain has peers but the node has peers I should say ensuring that there's a database so you can store stuff to block or from instance instance ensuring that there's the logic to be able to synchronize that database when it connects to other peers and ensuring that there's appropriate logic to author new blocks and

critically to be able to recognize correctly authored other people's blocks so if you're synchronization code says yeah we've got all these blocks coming in it looks great then you need the bit of logic that says it might look great but these are not the blocks of our chain although they are the blocks of our chain but they're not the blocks of our specific bits of the chain that we're interested in they might be badly finalized blocks they might be like malicious validators they might be double signed or they might just be a part of the the sort of a chain that has fallen by the wayside a stale stale fork as they say so that's one part one part is looking after the construction and

maintenance of the chain so it's either you're making your own block so you're looking for blocks from other people and you're creating this sort of chain the other part is looking after what it means for those blocks to have happened so in Bitcoin to take a simple example what it means for you know some transaction outputs to be spent is that some balance has moved from being able to be accessed by one key or set of keys to being able to be accessed by some other condition which is probably keys or sets of keys that's what makes Bitcoin Bitcoin and not aetherium with a theory most of it

remains the same all of the stuff that I just described synchronization strategies working out with whether it's the canonical chain the right chain or whether it's something that also fell by the wayside it's all the same pretty much there are a one or two minor details that have changed but it's very much the same thing but the bit that works out how the transactions what they mean right how they change things that's different that's very very different and that's why theorem is a smart contract platform and bitcoin is a currency well the runtime is that bit that is different the bit that is makes a theorem a smart contract platform and Bitcoin a currency that that that second bit that I described that's the run time we can

also call it if being very technical and strict and academic we also call it the state transition function right because it's the function that the bit of logic the definition that that defines how the state transitions from one block or one transaction to any of all this we're talking about the state database well the state database is part of that database layer unlike how you actually store this but basically how you update that state database is defined by the state transition function yeah that's right so your blockchain is pretty much our the model if you like the computation model so if you're describing this to someone from the 60s and you know they just wanted you know

tell me what pop chain is and you wanted to describe a relatively high level what the model is there's some storage which is a database key value database pretty much a theorem is a little bit more complicated because the keys are actually account IDs and the values are actually balances not like transaction counts and other trees of key value pairs but by and large there is some structured state database or storage that sticks around between blocks and there is some code that takes your block which is basically just a bunch of actions and your previous storage and just tells you what the new storages or whether it or is invalid so either says

no is a valid no good or it says yeah it's valid and here is the new the new storage and that's what you put in your database and it's as simple as that so yeah so how does governance fit into the state transition function well governance is is a bit of a is a bit of an umbrella term so there are two bits that are useful to talk about with governance so the one is this sort of underlying fundamental reason why governance particularly binding governance is even possible and the other one is the specific mechanisms under which people or actors in the in the system can govern like how do they actually have their decisions be be made

so one of them is about enacting decisions the other one is about making decisions so I'll do the enacting decisions first cuz it's easier and it's closer to what we've been talking about so in acting decisions is about the webassembly so basically it's saying right well the key thing about governance is firstly it should be possible to alter the database in some way that we cannot foresee because it might get into a into some state that we don't mean it's going to for example there might be a dowel and it turns out that the Dow is like completely locked up a bunch of money and it's going to be stolen if we don't do anything for 30 days and we really want to alter the database so the Dow has no money in fact that thousand exists and everyone that

put money in the Dow has donated you know so it's a completely completely arbitrary alteration there's no real way of encoding this alteration upfront we just have to be able to say well under the circumstances we need to be able to alter it in some arbitrary way the other thing that we want to do is we want to say well look we've got this cool technical improvement and we need to deploy it which basically means changing this function this runtime is state-transition motion and we need and we don't know what we're going to do upfront inevitably and there's no real way of ever being able to say well this is a non-controversial agreement and this is a controversial you know it's like no there is either you're going to upgrade your state transition function

your runtime or you're not and so it's useful to be able to do that and that's the other thing that webassembly makes possible so by having this general format for expressing the runtime logic we can allow for that to be altered arbitrarily down the line so it's true and complete you know the lovely turing-complete phrase it basically means we can anything that we can think of down the line we can replace it with that in current aetherium setup it's not like that no so in the current theorem setup it is what programmers would call hard-coded so you know there is the etherium specification the protocol and they implement that and that protocol

doesn't involve there's no way of that protocol changing itself whereas with polka dot the protocol is self describing so the genesis block the this is like very cool beautiful sort of sort of things that for the mathematician inside of you with etherium the Genesis block included the balances of various people that have taken part in the crowd sale so the Genesis block is this kind of initialization data that goes into the storage or the database of the blockchain the state of the Bob train if you like the Genesis block of polka dot includes polka dot right so the Genesis block of polka dot includes an entry in there that goes under the label code and that is the code of polka dot of the polka dot runner tiger

so that describes polka dots state transition function and that's the code that gets queried every time a new block comes in to say hey is this block actually a valid polka dot block and if so could you tell me how it changes the state and then it's the polka dot client that looks at the result of that and decides hey okay that was a good polka dot floor company in the database I'm going to change the states in this way or that was invalid and the person that gave it to me I'm going to punish them now at the moment there aren't really any other block chains that do it so tears are sort of wants to do it and they've they've got something that's sort of similar in their room in their road map but in principle at least this idea of abstracting the state transition

function and encoding it in some turing-complete general fashion and sticking it on the chain itself that's that's a new thing and that's what enables basically having that code on the chain itself is what enables upgrading it because you can just issue in a transaction that basically says ok replace the code with this version of the code which is an a complete representation of the runtime and then after that block you are now running on the new runtime would the fear then though be what happens if you do one of these upgrades and it's like kind of taking you in the wrong direction does this open up like the door to more to a malicious actor doing something or you

know what's the problem with it inevitably it is a powerful mechanism and must be tempered with an appropriate means of governing when these upgrades should happen so that leads to the second part they were talking about before that's right so aside from potential bugs now if there are potential bugs you can't really prevent bugs you can do your best to make sure they don't get in one way of doing that is by formally specifying you know the specific mechanism by which upgrades should be able to be allowed and then making sure that multiple people when they implement that mechanism they end up with roughly the same end up with something that results in the same thing so you can have multiple implementations

that what we did with theorem it's likely what will do with polka dot so leaving but potential bugs aside for the moment then we need to be very careful with a mechanism in general so one one very simple governance mechanism is give GAF the key right and gap will decide when polka dot should be rendered that's basically if were honest the etherium mechanism right Vitalik has the the general key to etherium if metallic says will upgrade a theorem in this way then aside from your aetherium classic temper centers if the room will pretty much be upgraded we're not gonna do that for polka dot because it's it's not decentralized then it's not really you know don't you want the key no I know is there's far too much with great power comes great responsibility I don't want that responsibility so no rather this is

something that should be left in the hands of the people who are most exposed to polka dot becoming good or that right polka dot succeeding or failing and as such as the paper sort of pointed out in the place we quantify how much exposure you have to the polka dot network success by the number of dot tokens that you own or that you have leased have control over and so the underlying means of making decisions within polka dot of you know potentially of grading or doing some out of bands arbitrary alteration to the storage the database is is through a vote that is weighted by the number of tokens that you control now this is a

gain tempered with a few other mechanisms and will likely in the future be tempered with a few more in order to try to ensure that that malicious actors have a hard time pushing through something that is bad for the network but it is also worth remembering that bad for the network is an extremely subjective term and there's no way of ever having a single network that makes progress in a good direction while keeping everybody under the same roof doesn't just doesn't exist people some people will never agree and when it comes to a crunch point one either you don't make progress or one half Forks

off and you know they can fork offers for all okay if they're like in some of those mechanisms like are you touching on quadratic voting is that not a thing is that too basic what's where you add on that topic quadratic voting has some interesting potential it's the really cool thing about it doesn't work unless you're civil resistant and polka dot has no intrinsic civil resistance mechanism because hey it's basically impossible like there are potential ways you can do it at a higher level but when you're talking about the level that polka dots at it's really not you know either you closed it off to a known set of

participants or it's not civil resistant kind of like if it has if it's completely anonymous participation then how would you ever have identity but so one thing that I like about this system and this design is that whatever structure we come up with today and make into like this is version one of polkadot there's no reason to believe that we will never come up with a better thing and because we actually have this upgrade mechanism we can upgrade to the better thing in the future including the wave voting including the way governance happens I mean the governance system can be used to remove the governance system but if so going back to that like having no one

holds the key so you're like how would a community ever vote for its own voting rights or how would it like how would that happen I guess based on percentages or the number of people who weigh in favor versus so the like I said the system that we have at the moment is not necessarily that which will be it in the Genesis block you know there's probably some iterations to come yet perhaps fairly substantial ones but at the moment the system that we have is based around the idea of a referendum so if you want to get something through if you want to chain make a change using the governance system and this can be a change just a one-off change the storage or it could be a an upgrade to

the two polka-dot itself then it goes it must go to referendum with a referendum assuming everyone comes out and votes you expect there to be a more than 50 percent that vote in favor of the change for it to work turnout being what it is it's actually quite unlikely that the whole of the stakeholder community will come out and vote so in the case if you get 50% plus one votes in favor of a change the change goes through nothing will stop that right majority carries always if if there's like a full turn now even if there's like less of a full turn up but you still get 50% plus one of the votes of the total stake in the

system it will go through if you get less than 50% plus one at the total of the total stake in the system voting for it then but still a majority or indeed maybe not even a majority then it goes the decision is made dependent upon the councils approve of it so the council is a is a body that is elected through approval voting so again this comes back to stakeholder weighted voting but the council is a body that basically either makes it more likely that a referendum that does not have full turnout will go through or at least elevates it to the level of a

simple majority making it go through if the council doesn't like a referendum then it must go through the hard way if it's together at all which is that either you get everyone to come out and that's a 50% plus one so basically the whole of the stake of the system votes and at least 50% Ott's like more than 50% votes in favor or you have substantially more yes votes than no votes so you cannot basically overturn the council's what disapproval by having a substantially greater number of yes votes than herbs as you get closer to that magic 50% plus one yes

votes you need fewer and fewer or less less and less of a an advantage over the no votes once you hit that 50% plus one you need no advantage over the no votes you've now got it because you've got 50% as one so is there's a nice little curve that you can draw but at the relatively low turnout you need an awful lot more votes than the no vote so basically a small number of no votes can prevent a change that the council doesn't think is a good idea from happening and that's a means of avoiding you know someone strong arming the network into a change that not everyone thinks is a great idea I think as a bit of context maybe not everyone is sort of involved in in the

blockchain space is deeply and like touching on these governance things but I think any any voting or like any governor's protocol that depends on having high turnout is doomed to fail like if you are saying that if we get a hundred percent participation this protocol is perfect it sort of okay but that doesn't matter because in reality what we see with a lot of these toking curated registries and with a lot of attended governance right now the average turnout is more like 2% 5% most people just buy tokens and hold them and don't give a about what the project is because their investors they're speculators so depending on how having high turnout is obviously not super

great I kind of want to ask some questions about you and your background I had this question today so I was wondering how many blockchains have you built I've I built the vast majority of the at least the earlier versions of the C++ ethereum chain and I was fairly heavily involved in the parity ethereum chain and I also um fairly heavily involved in the polkadot chain and the substrate code base and if not directly programming on it's very close to the parity Bitcoin implementation yeah I

think I'm just I'm very curious about what that process is like building a blockchain I know it's got a little bit of a vague question but it's I mean it's it's much the same as at least initially as much the same as many other projects you know there's a lot of hacking around there's a lot of bashing out code but I guess one of the things that differs a little is when you can finally pick off a test net and this usually happens in maybe two months six weeks - took - ten weeks after you've after you've started your development and it's pretty cool

like you can open it up to the public you can start to get users and by very virtue of it being a network where you know people that sort of peer-to-peer they're connecting with each other they're asking you know down low whether some particular version works or how they manage to get so many peers or configurations all the rest of it it's a little more community oriented than some projects that you might do you release and you get some users the question here is is it designed like in the design process do you have to design more do you have to figure out more before you start releasing it or can you actually iterate like you do with normal software when I was building the very early the sort of first version of a theory I mean

you know early 2014 there was definitely a serration there but it was iteration done in tandem with Vitalik and Jeff so for sure we were designing to a large degree as we went along we had ether pads and no relation that allowed us to you know collaborate in real-time on specifications and it was in fact the large ether pad that sort of held all of the latest specifications as to what it was that vitalik and I had chatted about that eventually turned into the yellow paper right so there were various there was one particular ether pad was the EVM specification and there were a few of the things like I

think call or whatever that were a bit fiddly a bit hard to get right and they weren't well defined in the in the white paper so you know after me and Battaglia could sort of figured out between us Jeff needed to know as well and there were one or two other people who were sort of interested so when NEFA pad typed it all out I maintained it and that was that was pretty much necessary for writing blockchain where there are multiple implementations and this is before test not even yeah this was around the PRC to POC three so there was a girl early test nets but they weren't I think POC five maybe was our really big test net that sort of kept going for several months so it was before them it was in relatively early stages maybe

around February March and yeah it was it's notable that eventually more and more sort of disambiguation x' got lumped in with the EVM spec and at one day it was like I think it was early April 2014 it was like right I'm gonna just put this into a paper cause there's enough math content now it won't take that much which I did who are the early people on those test myths like did you know everyone who is participating no there were there was some sort of usual suspects that sort of got in early and stuck around I remember that the proc guys the People's Republic of Doug were were pretty were pretty early at developing smart contracts and I heard you know

from people around that they one of them at least the guy who wrote some of the smart contract still codes in lll which was basically the first functional smart contract language and I mean functional as in you could use it rather than functionalize it it was good yeah so yeah there are a few for sure there were there were there were some some cool people that stuck around in the ecosystem so then on test night you were iterating you're adding what did you learn from like going through at that time to now like are you do you feel like that creation part is different it's much the same sort of you know fun of having people that you know sort of

using very sort of excited about what you're coding and you've stopped putting you stuff in for them there's not that much that's that's different I mean that's definitely there's more that's similar than them what then what's different it's a little different I guess in in in terms of where the theorem it was a smart contract platform so you had you had more actual legit users rather than people who are sort of interested from a sort of early adopter DevOps point of view to try and understand what what it takes to run a node with a theory I mean you had those guys as well but you had also the people that were like actually really interested in deploying smart contracts and I hope that we'll get back as we start doing our first smart contract powertrain I hope that will will sort of

be able to start kicking around with those users as well so having built all these different implementations of different block chains like you mentioned earlier there are some commonalities obviously what are the lessons like broadly the lessons learnt learn from having built these things so probably the biggest lesson was what happened with the C++ ethereum and what happened with parathion theorem which is that you you code it and you know if you're a decent coder you write things in modules and you try and be generic as much as possible the abstract which allows you to iterate and fast and sort of experiment and and refactor relatively easily and with CPP aetherium time came I think it was

probably early 2015 where it was clear proof of authority there were people who wanted a proof of authority style Network so they weren't keen on mining they had interested or semi trusted people and they wanted them to be able to run a blockchain and so I you know there was already appropriate abstractions pretty much so it didn't take too much refactoring in order to basically make it configurable so the same codebase can be used for both the etherium main net also approval Authority Network and then fast forward we're doing parity etherium and one of the first things that I did was I made sure that there was a generic way of configuring a network that allowed us to have multiple different consensus

mechanisms be sort of pluggable and it wasn't so surprising when later there was you know lots of lots of talk of pluggable consensus what we need pluggable consensus says whoever it was a he AI thing and it's like yeah we we know we did that you know I was coding that up like you know one or two years ago and it was it's been in parity aetherium from the beginning with substrate we go one further and so this is the real lesson learn with substrate it's like it's not enough to have pluggable consensus we want pluggable runtime we want pluggable everything we want to be able to make something that is 100 percent generic but also really easy to develop on and so yeah I mean it lesson learned from a life of coding is

you know be as flexible as you can don't be floppy don't try and like literally as you say you know sort of work out the very best possible solution before you actually code anything you know you got though there is definitely a balance so you know it's important that you don't try to be over flexible but you definitely need to to push it towards the the degree of abstraction generis ISM and flexibility and that's that's definitely true for blockchain as well we haven't really described substrate in any detail what's what's the difference between substrate and polka-dot and how are they related this in much the same way that you know what

I learned from CPP aetherium and when I started doing parity a theorem is like right we're going to do it in this way because we want to be able to show we've got pluggable consensus in much the same way that I approached those I approached that I came from with that approach to polka dot earlier still and that's where substrate came from so substrate is basically a necessary artifact necessary consequence of wanting to make things as generic as I could so substrate is in some sense parities just parities version of polka dot it's certainly it's parities version of what we call the polka dot runtime environment which is the bit of polka dot that isn't the runtime right so earlier I was talking about the runtime

which is the bit that's sort of the nature of the blockchain I think that makes a theorem a smart contract platform the thing that makes Bitcoin a currency well the thing that makes polka dot a pair of chain platform is the runtime but if you if you ignore that and you just say right well this is a platform that uses lip p2p and web assembly in order to make a governor ball upgradeable blockchain right that's basically other than that just generic that substrate and it's also the the basic idea the specification now if you like is also known as the polka dot runtime environment so it's like a generalized framework for building block chains do you have to use it with polka dot can you only build pair of chains

with it or can you use it to like build your own thing completely separately now it's wholly generic so it's although if you use it it will probably be fairly easy for you to turn your substrate chain into a pair of chain and that's the idea that's the road map but at the moment it's it's really just a framework for building block chains and getting them out and working really quickly and it comes with a bunch of cool things like you know you get automatic upgrade ability which is not something that's generally available in block chains at all you get to use Lib Peter B which is relatively cutting-edge you get to use webassembly with the the optimization

that we have that basically makes it all run at native speed as long as you're running an up-to-date node so there's you know there's a lot that's that's going for it you basically get most of the technology behind polka dot for free would you call substrate a toolkit what is it well there's you know if we go back to the to the late nineties early noughties there was there were two main things on linux that let you build gooeys there was a cutie or cute as you know the the guys in Norway call it but I think everyone else just calls it cutie and there was there was GTA now these were considered toolkits GZ the T and GT Haven two different for kit but cute was positioned there's a framework

because you could use it as a tool kit had a tool kit sort of inside it that let you know but but the whole thing sort of taken together was a framework I think it basically the difference between the two is that a toolkit is like it doesn't impose anything on you there are just things in it that you can use and you just pick a few of them and use them and it is all good a framework sort of says right well you can't have it your own way from the top level we tell you how how it's everything is going to be sort of structured and then within that structure you work within it and you can add your own bits to it so whereas one is like you add on the other is like you take away one is additive the other subtractive and I

think substrate is definitely more the the subtractive thing so it's definitely more of a framework so it's basically says right this is how the blockchain is going to be and you can add your own components to it you can remove some of the components you can make it you can sort of turn it from the inside into what you want but from the outside it more or less gonna look like substrate did substrate come from I guess I think you've sort of mentioned this but was it like the fact that you wanted to create these like proof of Authority block chains it was like from there that you've got this idea of like being able to quickly spin up things was it from there is there a line from sort of the POA idea to this or is there was a line but it's indirect so the CPB aetherium

one of the reasons that I made it more generic than it would otherwise have been was in order to support blockchains and certainly one of the one of the key design decisions that went in early on like from day one of parity aetherium was to be able to sort POA and eventually POS blockchains so parity you know one of the things it's working on the moment and I read probably knows better than I do but is is a POS version of aetherium with POS obviously standing for a proof of stake and that's that uses the same basic abstraction mechanism that was put in on day one of parity at their room and now of course

it's not just POA POS or changing all that we actually want to change the entire runtime so we're not we're not just concerned with how many blocks are made or what finalization mechanism we're talking about but rather the nature of the blockchain itself is answer is this a currency blockchain is this is my contract what chain is this is the name registration blockchain is this a a parrot a NAND intercommunication blockchain or is it just some new blockchain that we haven't thought of yet that you know is yet to be invented are most of the substrate the resulting blockchain from substrate are they usually proof of stake is there any or is it really open you can be anything or is it really in a POS space it really is very open oh wow okay it

does have at the moment at least it does have a fixed consensus mechanism but that is a next-generation consensus mechanism that works very nicely that said we do eventually hope for even the consensus mechanism to become modular and potentially pluggable now the reason that that's not our priority right now is because a were really happy with our current consensus mechanism and B there are subtleties to modularizing the consensus mechanism particularly making the network giving the runtime or the the thing that can be switched in and out that currently is the runtime giving it real-time access to their network that is a massive potential security issue and as long as it's running effect

sandboxed at them which is what it does at the moment because all it's doing is executing some determining whether some block is valid and telling you what the changes are to the storage as long as that's all it's doing there's very limited damage that anyone could ever do to your computer as soon as you say oh okay well it's also going to define what the consensus mechanism is and therefore which computers it's allowed to connect to and what there are like what it should be saying to them then you've got like and potentially also keys and you know the whole thing mass vastly escalates in terms of seriousness and it's not something we want to deal with other projects are attempting it tezo's being a notable one and we'll see how they go that said I mean you could build

that on a layer below so you're saying that like if you said that the consensus algorithm is not choosable at runtime like sorry you define it in your Genesis block and it's just hard coded into the client and it's it chooses the one that you know that is configured that from scratch and you can't change it then it's obviously a lot easier to build around this but you're still running into some like considerations depending on how crazy to go with your consensus algorithm so earlier in this episode we were talking about upgrading ethereum this sort of frustration that came when people were talking about shardene but there's still a lot of kind of debate

and work to happen I think you've sort of answered it but I I feel like now that we understand a little bit more about polka-dot about a lot of the ideas that you have maybe you can say again why not just upgrade aetherium why not just build on that we certainly do plan on upgrading a theorem when the time comes and you know supporting that as best as we can but it's a big job it's a difficult job and there are many different stakeholders that must all be probably brought into alignment over that upgrade process and that's not something that we are positioned to be able to do so in the meantime and as it turns out there's

quite a lot of meantime we wanted to to bring that forward now we could have gone one of two ways we could have gone towards the keep as much as you can from etherium and kind of do do the minimal set of changes in order to in order shot so basically we could have done charted etherium the parity way if we were doing that it seems to me that it would be unlikely for us to really put forward anything that would become successful because eventually we knew we would know for sure that there would be a an alternative incompatible version of the roughly the same thing from a bunch of other people that sort

of more broadly represented the etherium community so the alternative was simply to say right well let's let's start afresh and let's build something that we think is not just a sharded version or theorem in fact maybe not in the slightest bit really a shattered version or theorem but something that is perhaps technically similar but that fulfills an alternative sort of niche or spot in the solution space and that's that was just by far the obvious correct decision do you think I mean well these will polka dot work with aetherium with the shards is this all gonna kind of be used in tandem yeah I sent Lee hope so I mean it's um it's difficult to tell of

course until until we have the newer theorem which as I say is not something that's looking likely for a while at least but given what what we know of the direction that that's going in it does seem to me that the two will cooperate fairly well and that the etherium bridge which was always sort of noted to be a part of polka dot will be will be possible with the a new aetherium Jasper addition that's a shot into Casper and not anything else that begins with show I kind of like that it's sort of it actually sounds like I mean we you're sort of bringing two projects initiated

potentially back together somewhere down the line where they become connected and maybe serve slightly different purposes but actually can work together yeah that's right I don't see them as being in a huge amount of competition I think I think by and large they serve different purposes the etherium network is really about ensuring it's geared towards smart contracts it's a level of abstraction is very much at the user sort of level it's the sorts of programs it handles a sort of small snippets that benefit hugely from being in the same environment as other small snippets of code polka dots rather different it's

the abstraction that it works around is this is chains so we're talking about high volume one or very few levels of fixed functionality and where interrupts interoperability between these pieces of fixed function high volume and pieces of fixed functionality is relatively small that said I do think you know there will be some degree of interoperability that happens within the etherium network and I think there'll be some degree of smart contract provision that happens within polka dot but I think nonetheless by and large that they're gonna be pushing in different directions so I want to say thank you so much for sitting down with us going through all of this not at all we have wanted to have you on before I'm

so glad that we got a chance to do it to our listeners thanks for listening thanks flew me you