 Today's topic is for ecology a study of forks for newbies How many of you have any idea what I'm talking about where when I say forks? Yes Great Okay, and how many of you know what? Segwit or uasf 148 bit 148 is Great and how many people think that what I just said sounded like gibberish Fantastic Okay, let's get started We're in this unique moment in time when we are experienced the birth of a new technology a Radical disruptive new technology which is these open public blockchains Bitcoin Ethereum and hundreds and hundreds of others Systems that operate open to anyone Open access open innovation Systems where no one is in control No one has power over the system where it works through simple mathematical rules that everybody follows Except of course that for most people This technology is quite difficult to understand and If you frequent some of the online forums you start this journey you discover Bitcoin or Ethereum Or this one guy I met in Singapore who said I've been in the blockchain industry for a year and I just discovered Bitcoin Dead serious Had been to a Bank of America Presentation where they spent 45 minutes talking about blockchain without mentioning the dreaded b-word Bitcoin so this person spent a year studying hyperledger and R3 and Corda and then one day found out about this Bitcoin thing and then said oh, this is way more interesting For those of you who are new to this space, maybe you Stumbled upon it maybe You have that annoying friend or relative who has been telling you about this for two years and cannot talk about Anything else I'm that annoying person to my friends Maybe you ignored them until you heard that the price went off and you're really excited about the possibility of Making money and so now you're interested Maybe you're in computer science No matter how we all rise here many of us have gone down this rabbit hole where we Hear about this technology and then we decide to start reading and You start reading and you get bombarded with information Mining blockchains confirmation transaction hashing digital signatures private keys public keys addresses base 58 Bip32 Bip39 mnemonic seeds backup freezes. What the hell is going on and Maybe you waved through all of that and you set up your wallet and you receive a transaction And now you go online and you've read about a Civil war going on in Bitcoin and these people are threatening to fork and You don't know if that's just a different way of saying the f-word Some kind of technical thing that you don't quite understand and Just when you're about to grasp what a fork is you discover there's eight different types of forks and Some of us soft and some of them are hard And now you're even more confused because you've only ever used hard forks in your life And you think maybe soft forks would be kind of impractical Or you grew up with chopsticks Nevertheless, it's all very confusing and we use these terms and don't really define them So I'm going to take you on a little journey where we'll talk about this and explain what these things are a fork is A condition that occurs in an open blockchain whereby the state of the blockchain diverges into two states whereby part of the network Has a different perspective on the history of transactions than another part of the network All right, that's the basic definition of a fork. It's a divergence in Perspective of the state of the blockchain Now this occurs Naturally two or three times a week You don't even notice it And the reason it occurs naturally is because of timing differences and the propagation of blocks across the network So maybe there's a minor over here and they are doing their mining thing which you don't understand but let's say they're doing it rights just imagine, you know, they're over here and they're mining that's a pickaxe, right and They find that magical proof of work and they take their block and they throw it out into the world and they say I found it Meanwhile, they haven't noticed that over here. There's another miner and they're mining their mining way They find the block just a few seconds apart and they throw it to the world and say I found one Now half the people in this room We'll hear that one Half the people will hear that one Imagine if you're in a giant hall and everyone's playing bingo and two people shout bingo at the same time on opposite sides of the room And half the room here's the person near this and the other half here's the other person It's basically what happens public blockchain We cannot say just ask the central authority Because we took that part out. There is no central authority. So we can't just Ask someone which is the correct block every system on the network Decides for themselves based on the information they're hearing and Validating that information both of those blocks of valid half the network has validated the block they heard first as the most likely Block to be extending the blockchain the other half heard a different story Fear not We're no more than ten minutes away from resolving this messy situation as each group on the network Establishes what they think is the blockchain and from their perspective They start mining for the next block and when they do so in that next block They put a link to what they think is the parent half the network will choose one block as the parent The other half will choose the other block as the parent and the race is on. They're basically extending the two tips Right, but each side has picked a different tip to extend now What are the chances of two blocks being discovered at distant parts of the network again within a few seconds? Much much lower than the first time So in most cases within about ten minutes someone's gonna find the block They're going to build that block on only one side of the chain and that chain is going to become longer They will tell everyone on the network. Some people will go yay That's what I thought it was and some people will go hang on a second This new block that just made the chain longer Has a different parent one that I didn't know about. I'm on the wrong chain and They'll take the block that they thought was the tip and They'll take all of the transactions and throw them back into the pool and Mind them in the next block transactions will still go through ten minutes delayed in fact The two blocks probably had 95% the same transactions anyway So not much difference and life goes on this happens two to three times a week on Bitcoin For example, it happens much more often than Ethereum and like when that mind blocks more often This is a network and blockchain fork That is not deliberate But there are other types of forks and these are forks where One part of the network decides to change the rules and When they change the rules, they may do so in a way that is not compatible with the rest of the network if 51% of the network Specifically 51% of the miners the hashing power decides to change the rules That's called the 51% attack And we call it an attack because it's kind of rude to just take 51% of the network And decide to change the rules without Even asking the other 49% Everyone with me so far Great Fantastic now. Let's talk about hard forks versus soft forks When rules change they can change in two ways The rules can get looser or they can get tighter If the rules get looser meaning that Things that were previously in valid now the rules looser, so they're now valid That's a hard fork If the rules get tighter, which means that previously valid things are now no longer valid That's a soft fork and the difference is really simple a hard fork by expanding the rules Means that things will start appearing on the network that some people will consider invalid and they will not be able to Participate with the consensus rules without upgrading to the new rules It forces them to upgrade to the new rules or they are left behind And that's why we call it a hard fork because it is a forced upgrade of the minority chain in a soft fork Previously valid things are now invalid Which means the things will appear on the network that have tighter specifications than before but Everybody can keep following the rules because Those new things are still valid by the old rules, right? And that's a soft upgrade That's a way to change the consensus rules to introduce new features without loosening the rules. Everybody with me so far All right, this gets a bit confusing now So I'm going to use a different analogy To explain this a bit better and since we're talking about forks. Why don't we go directly to the restaurant business? So imagine if this blockchain is like a big decentralized restaurant Imagine if we had a restaurant with no chef and no managers, right? Kind of like these community kitchens We see for example in places like India where they feed 20,000 people out of a voluntary community endeavor fascinating phenomena So imagine the blockchain is that so in the back there are some cooks and They've invested in some big ovens and they're using a lot of electricity and They're cooking up meals blocks that they deliver to the customers They think they're in charge. There's a cashier taking orders That represents an exchange They think they're in charge There's people who are using this restaurant to do catering and buying huge quantities of food Ruch and services they think they're in charge and Finally, there's all the people eating at the restaurant and lately they've began to notice that maybe they're in charge So let's go back to our hard fork soft fork analogy Restaurant starts out. It's a vegetarian restaurant If the cooks decide to add pork to the menu, that's a hard fork a Lot of the people who come to this vegetarian restaurant will look at these rules and go hang on That's not valid and they will have to go to a different restaurant right So by expanding the recipe and adding something that wasn't there before like pork This is no longer quite a vegetarian restaurant That's a hard fork it requires everyone to upgrade their diet if they want to continue working there or eating there But if we took the vegetarian recipe And we took out butter and made it a vegan recipe Everybody who's vegetarian can still eat vegan No problem You don't have to be vegan to eat there. You can still be vegetarian and eat there Me teachers can eat there too. Everyone can eat vegan. It might not like it, but If it's good vegan So that's a soft fork. That's a tightening of the rules right a reduction in scope not a widening in scope and Now we have to look at these five groups The miners who are cooking up blocks in the background The users who are making transactions putting in orders for meals the merchants Who are buying the bulk of the services? Like a catering service the exchanges who are running a delivery service out of the restaurants and the cashiers Who are exchanging and finally Somewhere in there you may have not noticed someone's writing the recipes They really think they're in charge the developers But turns out they have probably the least power of all because nobody has to order from their menu And nobody has to cook the meals So they write the recipes, but no one really has to follow them Unless they want to and in this scenario everybody thinks they're in charge But in fact it takes everybody working together to keep the system running together If the miners stage a revolt and they stop cooking pork and all of the meals What happens next? Well, a lot of the end users are going to walk away. They're going to stop Validating these recipes If the developers writing you recipe that nobody cooks and nobody orders Doesn't really matter We now have these various types of forks, which I put into two categories soft and hard Now let's talk about how forks are activated. We have two new concepts that have been introduced in the last year as part of research minor activated And hues are activated Mesh those with harm and soft forks, and you have minor activated hard forks minor activated soft forks user activated hard forks user activated soft forks And these four categories Really are kind of the tip because there there is more complexity going on here user activated soft forks have become very interesting lately because There is a proposal to initiate a user activated soft fork on august 1st under a specification called bip 148 And what this user activated soft fork involves is all of the users of bitcoin who want to participate Stop accepting any blocks that do not signal Segregated witness, which is an upgrade that has been proposed more than a year ago Users want this upgrade Miners don't want to make this upgrade And users have decided to stop their foot and say well If you don't deliver this we will stop accepting your blocks to go back to my restaurant analogy The users have said we're going to start only ordering vegan off the menu. You don't have to cook vegan But if you don't we won't eat it. We won't order it. We won't have it delivered And so cook whatever you want, but we'll only eat vegan Right and that's an assertion of power by the user community saying turns out We're in charge Here's a little secret everyone who thinks they're in charge isn't They're only in charge if everybody else agrees with them They're only in charge If they come together and form consensus in large groups Of these five constituencies You can maybe make changes to bitcoin if you have three Probably best if you have four of the constituencies If you want to keep the system running efficiently and keep everyone on the same page Working together. You need to have overwhelming consensus. Otherwise it can be disruptive Users are asserting their power developers are asserting their power miners are asserting their power Exchanges and merchants are doing business deals and asserting their power. Everybody's asserting their power And stomping their feet and going i'm in charge No, you're not We all are at this tension And this tension is a design principle of open blockchains It is a necessary trade-off that ensures that no one No matter how well funded No matter how many troops Or violent thugs they can pull together Can hijack the system and make it do their bidding That is the design principle behind it and it creates a problem of inefficiency Yet the system has worked For almost eight years resisting all of these attempts To change it to modify it Here's something you need to know as a user if One of these attempts Results in a split a fork A fork that is irreconcilable You will have funds on both sides of the fork If you have funds before the split that's what happened with the theory that's what happened with the theory you have funds after the split It is probably smart Not to move those funds or try to send or receive funds in the immediate aftermath on the fork When things are still uncertain and there's the possibility of one side of the fork being subsumed by the other That particular thing is called a wipeout Let me describe how this works People start ordering off the vegan side of the menu There's a split in the kitchen The vegans will not eat the vegetarian food because it's not vegan But the vegetarians can still eat the vegan food. They stick to their sides of the kitchen right But as you know with the restaurant business as i'm sure you've often done yourself You walk up to a restaurant you peek into the window and you say, hmm looks kind of empty I'll move on And you walk a few doors down and you say, oh this place is really full. I'll eat here Now if the vegan side of the restaurant ends up having more customers Maybe some of the vegetarians drift over they can None of the vegans are going the other way. They can't That's the essence of a soft fork. It can move in one direction only How do you can threaten the vegetarians don't go over there? They're nasty vegans. You're gonna miss butter. I promise But eventually if all of the party's over there or if you're a cook and you're cooking and nobody's ordering your stuff And you need to make money because you've got an oven running all day and night You might decide to cook some vegan meals because that's where the wind is blowing And you might have this southern situation where Whoosh all the crowd moves and suddenly the other place is empty No one's cooking. No one's eating. No one's buying. No one's selling. That's called a wipeout In bitcoin or other blockchain systems. It happens due to a reorganization of the chain The two chains are moving The two sides are fighting block by block for who's going to have the longest valid chain for one side considers the other side invalid The vegans will not eat the vegetarian meal. And so there's a chance if the side That has that advantage gets one step ahead That the other side says, you know what that is about a chain and switch over All of the transactions get replayed And the chain gets wiped out that is a risk If you made transactions on the other chain, you may have a problem If you made transactions on both chains, you may have a problem with double spend So in the immediate aftermath of a fork hold Do not spend Do not Receive just sit tight for a while. How long? That depends on how it plays out. It took about two weeks for the Battle between ether and ethereum classic to stabilize at about 80 20 90 10 ratio that we see today and everybody to decide, you know what Plastic isn't going away. It's not going away in bitcoin That's a bit harder to happen because there is a two week retargeting period for difficulty That means that after two weeks whichever chain is in the minority will change its difficulty of To adapt to the new circumstances and speed up again If a minority chain gets to two weeks It will never go away We now have two bitcoins Right that is not a scenario. I want to see I believe that we should be looking for conservative Minimal changes that are safely done with plenty of notice and minimum disruption Many people seem to believe the same thing but there are also those who want to play a game of chicken A game of chicken is where you drive two cars towards each other There's only one way to win that game as you are barreling towards your opponents You pull the steering wheel off And you throw it out the window And if the other driver sees that they go, oh Game just changed Now I got to serve Swarov because they can't anymore UASF fifth 148 says August 1st we throw the steering wheel out the window And then we see what happens So this is The science of for ecology We are going to see and this is not a joke computer science departments specializing in consensus algorithms And the game theory of competing consensus models in open public blockchains Some of you may be thinking after you've heard all of this And maybe it's your first time In this space You're beginning to think this sounds completely crazy Why wouldn't you just elect a chef? Why wouldn't you appoint a manager? Who owns a restaurant like this? This is crazy We are in a world Where we have decided That the alternative won't do The alternative Is a school lunch Produced from a menu written by a committee at the department of education With every intermediate in the chain Stealing the meat pocketing a bribe and diverting rotten crack to your children In order to profit the most and every eight years There's an outbreak of famine because someone didn't figure out how much food to grow That's the system we're replacing And compared to that system Our crazy little decentralized experiment of the anyone can be a cook kitchen Sounds mighty interesting. Thank you so much for coming