WBD187 Audio Transcription
Beginner’s Guide #6: How Bitcoin Works with Shinobi
Interview date: Friday 17th January 2020
Note: the following is a transcription of my interview with Shinobi from Block Digest. I have reviewed the transcription but if you find any mistakes, please feel free to email me. You can listen to the original recording here.
In Part 6 of the Bitcoin Beginner’s Guide, I am joined by Shinobi, host of Block Digest. In this episode, we are looking at how the Bitcoin protocol works. We discuss the supply & halvings, transactions & UTXOs, consensus rules, mining and nodes.
“When you have that central party in control of something as important as money, that is an immense amount of power over all other people. It’s just time and time again throughout human history, when people get that power, they abuse it.”
— Shinobi
Interview Transcription
Peter McCormack: Hey Shinobi. How you doing?
Shinobi: I'm doing all right. How about you Peter?
Peter McCormack: I'm doing pretty good. This is the second time we've done this, very different circumstances. I think I'll put the other one in the show notes and I think people can listen to that because that'll be kind of funny.
Shinobi: I think it will be fun.
Peter McCormack: All right, so I've been doing this Beginner's Guide. I've got friends coming to me saying, "Pete, tell me about Bitcoin." I send some of them to Lopp's website, which is useful, but I thought it'd be better to put kind of like a sequential bunch of interviews together to take people through a bunch of different bits related to Bitcoin just to kind of help them get started. So I started with Andreas around why we need Bitcoin and what is the reason it exists?
I've then covered what money is, I then went through explaining the pre-history of Bitcoin, all the different projects, Bit Gold, Ecash, so people had an understanding of what was coming in beforehand. Then I sat down with Stephan Livera and we talked about what Bitcoin is like at a top level. Then I've just covered Bitcoin's history, like a short version of Bitcoin's history with Marty Bent. Now I want to get a little bit more technical.
What I'm going to say is, anyone listening, they're not going to get it all after this. This is really just a starting point to explain how it works. But really they're going to have to go down the rabbit hole. So are you ready to go and do this?
Shinobi: Yeah, absolutely! Before we get started, just to kind of make that point for everybody listening, I just want to say right off the bat here, I supported Bitcoin XT when I first got to this space. That whole narrative of a big blocks, like that got me at first. Before I actually took my time and kind of thought everything through. It does take time.
Peter McCormack: Yeah, I mean it's okay to make mistakes, as long as you learn from them. I spoke to Jameson Lopp very early on and he was a supporter at one point of bigger blocks, which people will have heard me and Marty talk about in the last show. So when I first got in, I did an interview with Roger Ver because I was like, "well these bigger blocks sound interesting." I understand the argument. I think as long as you understand that, if you're sympathizing with maybe a bigger block or a smaller block, there's plenty of arguments to hear about and there's no right or wrong way of learning, I would say.
Shinobi: Yeah, exactly. It's like you don't just throw a high school kid freshman year into a college molecular biology class and just expect him to immediately get what the hell is going on. Things don't work like that!
Peter McCormack: No, we're patient. So just take your time and even if there's some things that are really confusing in this session, don't worry about it. There's stuff in the show notes to help you. Just keep digging and keep learning. Okay, well look, what we want to talk about today is how Bitcoin works. I don't want to cover Lightning, I just want to cover how the Bitcoin base chain works, the original starting point of Bitcoin.
But before we go into that, one of the things I thought would be good is to just talk about what the key principles of Bitcoin are, because this isn't just... Like my first real exposure to digital money would have been in kind of computer games where it was just a replacement for money within a game, whether it's my son on FIFA and he's got his points to buy and trade things, they're my first exposures to digital money, but this is completely different.
This is an actual replacement for real money in the real world. But there are some key principles behind Bitcoin for why it's going to be different. So do you want to run through what the key principles are for Bitcoin? Then if I've got any questions, I'll throw them at you Shinobi?
Shinobi: Yeah! Obviously, I think that the core most important one is the predictability of supply and the inflation rate. A lot of people would put that as like the 21 million coins. But honestly I don't think it matters whether Satoshi had picked 21 million like he did or 42 million or had some set amount of coins that was made every block forever.
Just as long as it was created and then set in stone, that people could count on this is predictably what's going to be happening in the future and then base their economic decisions around that, because it's... I don't think I need to go into the kind of chaos that uncertainty about things like that causes in the world economy.
Peter McCormack: Well I covered that with Parker when we talked about what money is and one of the problems we have with fiat money and I also saw this when I did my show about Argentina, is when governments print money and it's unpredictable, the value of the money you hold drops. One of the things about Bitcoin is like you say, it doesn't matter whether it had been 42 million or 21 million or 50 million, the fact that you know it's 21 million, you know it will always be 21 million, you can make your decisions based on that.
Shinobi: Exactly! Then obviously after that is the promise of censorship resistance and kind of permissionless access. I think those two things kind of go hand in hand and they're very tightly intertwined. I think the idea of censorship, it's obviously... I wouldn't say it's really just censorship is bad, it's more just that kind of long-term thinking ahead. They kind of throw something out there like the way the Founding Fathers of America thought about things. They didn't get things perfect and they screwed things up, but they sat and they thought ahead, "what are the consequences to things?"
When you have that central party in control of something as important as money, that is an immense amount of power over all other people and just time and time again through human history, when people get that power, they abuse it. The way that, kind of guaranteeing that it has that censorship resistance, is the permissionless access, that anybody can become a part of the network, that anybody with the capital can participate in processing transactions on the network and if there's somebody out there willing to pay enough for it, there's hopefully somebody out there willing to process that transaction.
Those two things kind of tightly intertwined and give that a neutral bedrock. We're kind of wrestling now with the political consequences in the world of the internet and just how that neutral platform is just opening so many things up to the light that you would have never dreamed would just be openly discussed and acknowledged 10, 15 years ago. I think at the end of that is a very positive outcome and Bitcoin is the potential tool to bring that neutrality to money that we're starting to see take over and have real world consequences when it comes to information.
Peter McCormack: Yeah, so the relevance of that is again, I'd never really thought too much about censorship, certainly financial censorship before Bitcoin, but that ability that anyone can just become part of the network and start sending transactions and creating transactions to anyone without any permission, without anyone censoring, was something that actually still took a bit of time to get my head around. Because I'm historically from a world whereby if I want to send somebody some money, certainly digitally, I have to get a bank account.
To get the bank account, I have to fill in forms and get ID and I might be rejected. That's something I have to go through. Also I've had the experience of trying to send money to certain places in the world would be very difficult. When I went out to Japan and did my interview with Mark Karpeles, I could not create an account to send money to the videographer that I worked with. One of the things about having something that is permissionless and censorship resistant, is it isn't just that anyone can join it and use it. It also removes a lot of the friction. The speed to which you can join the network and start creating transactions, that is reduced as well.
Shinobi: Yeah, I mean that's absolutely a huge benefit from that. I mean just look at like with BTCPay is doing and how easy that is starting to make it to just flip a switch and be able to accept money as a business on the internet. That's really a game changer when it comes to like... Okay, supposedly automation is coming and that's a whole can of worms we'll just open and close right away. So here's a way for people to start looking to make money for themselves.
Peter McCormack: Some people who will listen to this might think, "well I don't actually need this right now. I don't need a permissionless system and I don't need censorship resistance, I'm perfectly happy with my bank account. I can send money to my friends, I can get paid, I can pay my bills. I don't need that right now." But I think the lesson here is that there are plenty of people around the world who do need this. Just because you're maybe living in the US or Germany or the UK and you've got a fairly stable system that you don't essentially need it right now, but there are places in the world that do need it and history has taught us that it might come to one of us at some point.
Shinobi: Yeah and people say we don't need it in the West. I disagree! Paying attention, at least in the United States and I'm willing to bet probably in places in Europe as well, it's already becoming kind of a precedent that if you are a well-known figure of an unpopular political persuasion, you'll just have your bank accounts getting shut down with no reason given by financial institutions, because your political persuasion is a wrong thing. I think that's a trend that's definitely going to accelerate, that's not just going to stop and be a fluke.
Peter McCormack: Also, I actually saw a story in the news, I think it was yesterday or the day before, about a guy who'd been saving his whole life and he'd managed to save away about $87,000. He'd never actually put it in the bank because he didn't trust the banks because previous times when money had been seized, so he kept all in cash. But his daughter was like, because he was getting old, "you need to get this in the bank account." So she took it and she took it on an internal flight where you don't have to declare how much and I think it was the DEA, who seized the money!
Shinobi: You think that's bad? I forget when this was, I think it was a couple of years ago, but there was a Romanian immigrant, he had his money in the bank and withdrew it in cash. He had all the withdrawal receipts and was going to his parents in Romania and considering buying their house there for them. He had not even gotten to the airport, because he took a one hop domestic flight to the airport that he was leaving internationally from and didn't have to declare anything until the international airport and his money was confiscated. Even with all the legal documentation from the bank to prove that it was legal income!
Peter McCormack: So I think one of the things we add here in is that seizure is also a possibility. When your money is in the bank or you were trying to carry it and take it from potentially on an airline, there is the potential to be seized from you. Unless you say what it is, it's stolen. When you have it in Bitcoin, not only do you have a permissionless system and censorship resistance, but you're in a place where people can't actually seize the money from you.
They can't steal it from you and that's a really important thing for people to get their head around. So what I would say, even if somebody has listened to this, and even if they're thinking, "look, I don't think I need this now. It's not for me right now." Just being aware of the potential consequences and just digging into the news a bit and seeing that it is happening is, at least you should be aware that there's a possibility.
Shinobi: Yeah and I don't usually say things like this, but even if you don't think you need it, how many people around the world do you think do need it? Invest in that, that's a value you can capture.
Peter McCormack: And that's also one of the reasons I buy and I hold Bitcoin and I increase my holdings, is because one of the reasons is speculation and people talk about speculation more because you think the number's going to go up. But the reason I think the value of Bitcoin will go up is traveling around the world, having been to El Salvador recently and Argentina and traveling in different parts of the world.
I know there are places where it is more usable and if it's going to be more usable in places like that, it's also worth me considering buying and holding, speculating on the possibilities globally. All right, so what else we can add into that is that if we're sticking to the key principles of Bitcoin, one of the things that comes alongside the fact that it's a permissionless, censorship resistant protocol is that you then have irreversible transactions.
Shinobi: Yeah, that is absolutely a requirement, and that's kind of the whole reason that proof of work really comes into it. I'm going to kind of nit-pick here and say that strictly technically speaking, nothing on Bitcoin is completely irreversible. I forget the website, maybe I can look it up and get it to you to put in the show notes afterwards.
But Pieter Wuille actually runs a site with a lot of statistics and one of the statistics is how much time it would take for 100% of the current network hash rate to completely rewrite the entire chain from scratch and whenever I look at it, it's generally somewhere around like a year. But the idea is though that you make it so expensive to go back and undo things in the past that it's just not economically worth it as a miner. You'll make more money if you just keep mining on the next block and don't play shenanigans like that.
Peter McCormack: Well, so we'll get into that. We're going to talk about what proof of work is and how blocks are created and how hash rate works. But generally speaking, even though nothing is irreversible, generally speaking, we look at transactions on the Bitcoin blockchain as generally immutable. It's a system we create that we trust that after a certain period of time, that a transaction can't be reversed. So that's a couple of things that people have to consider.
They're going to be used to bank accounts whereby, if there's a transaction that's gone wrong or someone's stolen the money, they can usually phone up the bank and get it reversed. Or in the retail environment, if they bought something and they don't want it and they want to return it, or say it hasn't turned up, they can get the transactions reversed.
I think I had it once on eBay where I sold a phone and on the 180th day, somebody said they'd never received it and obviously they had, but the transaction was reversed and I didn't get the phone back and they got their money back. So I lost in that scenario. In the world of Bitcoin, once you've made a transaction, pretty much it's gone and that comes with consequences and things you have to consider.
Shinobi: Yeah, but it's kind of a tug of war and honestly, there's nothing really in the long-term to prevent people from building those kinds of things on top of Bitcoin, if they want them. It would just be an opt in kind of sandbox, but there's the trade-off of risk on the purchaser's side in that there's no take backs. But I mean there's also a lot of benefits from the merchant side, like your problem with the phone couldn't have happened if that was done in Bitcoin.
Peter McCormack: All right, so there's three other things under the key principles. I think what we'll go with first out of these last three, is let's go with the fact that essentially the system is pseudo-anonymous. Now people originally... I mean when I first used Bitcoin, when I used it with the Silk Road, I thought it was anonymous, but that's a myth, it's actually pseudo-anonymous. Do you want to explain what that means to people?
Shinobi: Yeah, this is actually a real simple thing to break down, I think. So anybody and everybody out there should be familiar with Twitter and 4chan. So 4chan is actually anonymous for the most part, it's literally just a number that things get posted under, there's no consistent names or identities. You just post something and it's thrown up there and nobody can really see who's saying or doing what.
Now Twitter is mostly pseudo-anonymous. I have my identity Shinobi on Twitter and it's obviously not my real name. So you don't really know who I am, but you can still tie everything I'm doing to Shinobi. But you don't know my real name and identity, but you know the entity that is Shinobi is doing all of these things that you see Shinobi do.
Peter McCormack: Yeah and if you relay that into the world of Bitcoin, what people have to understand is the blockchain is open. Anyone can see and anyone can follow any of the transactions. But if I was to create a wallet on an air gapped laptop anonymously over a Tor browser and then I was to meet somebody in the street and they'll send me some Bitcoin to that address, they can follow the transaction, but they don't know it's me. But at the time as perhaps when I would sign up with an exchange, if I was to sign up at a Kraken or a Coinbase and give over my ID and then buy some Bitcoin, they could track that Bitcoin to my ID and that difference is really important for people to understand.
Shinobi: Yeah I really think that that is the first thing that somebody coming into this space should consider before they buy Bitcoin, is are you comfortable with your name forever being in a database somewhere as you bought Bitcoin. If you are, go use the nice easy on ramps out there and if you're not, go use the cash platform, do the cash trading. If you're not comfortable with that trade off, things are probably going to get harder and harder for you as the years go on.
Peter McCormack: All right, so the next one I want to talk about is fungibility and this is still for some people, a little bit hard to get their head around. But one of the key principles of Bitcoin is that coins are fungible. Do you want to talk about that and the complexities with it?
Shinobi: Okay, so this is kind of a nuanced thing. Obviously this is kind of a debate whether Bitcoin is fungible or not right now, I would argue that it kind of is. So I guess I'll start with that first.
Peter McCormack: Do you want to explain what fungibility is though? Because some people wouldn't even have heard of or considered it.
Shinobi: So fungibility means one of two things. In the physical sense, it means that something is identical to another unit of that something, like two pieces of gold. If you melt them down and recast them, they're indistinguishable, they're the exact same thing or like two barrels of oil.
Then there's the legal concept of fungibility with regards to money, which was actually set by a precedent in a court case in Scotland in the 1700s where a bank note was stolen and then found by the serial number later and the judge essentially ruled that money is to be treated as if it were physically fungible because the economy would fall apart if you could just pick out a note with a serial number and go, "that was stolen from me" and take it from somebody, even though they did nothing wrong to acquire it.
So yeah, the argument that Bitcoin is fungible, is essentially that when you're making a Bitcoin transaction, you're effectively destroying coins. The inputs of those transactions and making new coins the outputs and things like CoinJoin kind of obscure those connections and make the point that there is no exact linkability between any certain coin. Every transaction is creating, and they're destroying and creating new coins like casting gold or melting gold and then kind of casting new gold bars from it.So that's kind of the argument that right now it's fungible. Then the argument that it isn't fungible is that with these inputs and outputs in a transaction, there's no iron connection between where any specific coin is flowing, but you can still tell UTXOs apart and still have some kind of relationship identified between them and so people argue it's not fungible because of that.
Peter McCormack: I think some of that might go over people's heads and I think certainly if you want to learn more searching up CoinJoin and just spend a bit of time reading about that will probably help people understand that a bit more. Okay, so the last key principle, and this is a very, very important one, but if you're not a developer, it might not be something you've really heard too much about it. You might have only heard, read about it online, but is open source and that the code and that Bitcoin is open source.
Shinobi: Yeah, so I think this is obviously one of the most important things. The reason behind that is just it's money that ultimately is the result of just software running on computers all over the world and to not have that be open, to not have all the source code out in the open, all of the changes made to that source code, see who's making them, how would you know what's actually going on? There would be way more barriers and roadblocks to actually making sure that the software is doing what it's actually supposed to be doing and that it's following the rules of Bitcoin that everybody thinks it is.
It's like, just pick any random thing, if it's hidden from you out of sight and you're not able to view it, then how can you actually verify what's going on? The mechanic that you take your car to, if you don't actually watch them fixing things, do you know what they actually did while your car was at the garage? I'm sure a lot of normal people in the world can appreciate the many mechanics out there that are not honest about what they do.
Peter McCormack: And there's plenty of scenarios where we trust people. We trust the phone networks and the manufacturers of the phones, but we know our calls are being listened to and our emails are being scanned and searched. In the world of Bitcoin, what we're trying to get to is a place of... I did an interview with Nick Szabo and people should go and listen to that, but he's famous for saying "trusted third parties are security holes." What we're trying to get to a point here is minimized trust, right? As low trust as possible.
Shinobi: Yeah, exactly! And we can never, I think, get to a point of perfect trustlessness. That would require everybody to know everything. But we can do orders of magnitude better than what we're doing today. Today is literally just everything's behind a closed door, like the banks and what's going on there? It's behind a closed door "just trust us." The government, what's going on? It's behind closed doors, "just trust us" and I think a rational person would be hard pressed to deny that a lot of aspects of society are really destabilizing all over the place and it's because everything's behind closed doors. "Just trust us" and we should not trust those people.
Peter McCormack: Yeah and that's one of the things is like, with Bitcoin being open source, anyone can contribute, anyone can read the code, anyone can check and make sure nobody is putting in sneaky bits of code that do things in their favour, which is great. But I'm not a techie, so I'm never going to review the code or check the code. So I put an amount of trust in the process or a trust in the people or trust in the key developers involved in the project. But that's okay because there's like a unit of trust over there amongst the developers themselves and that's something like what you said, you can't have perfect trustlessness. So that's an example of where I put a little bit of trust.
Shinobi: Yeah, but that trust, because all of this is open, is very modular. You say you're not a techie, you could learn to be. Or, do you not have friends who are? Do you not have friends who are closer to you, more trusted than Bitcoin developers? They could look at things and vouch for it. Just the fact that it's out in the open, you have a choice now in where to place your trust and how much trust to place there instead of just, there's that group in the closed room and you just have to trust them.
Peter McCormack: Okay, moving on from these principles, there are certain things that Bitcoin has to deliver on to ensure these key principles are met. We just covered trust and ensure there's a lot of trust. Something people are going to hear a lot about is decentralization. This is a term I think is often misused. It is sometimes I think used as a marketing term and people are going to hear about other alt coin projects and other crypto projects which talk about being decentralized. Something I've attached myself to is the concept of directional decentralization. There are projects that become more decentralized and there are projects that become more centralized over time.
Something I've really come to appreciate and notice, and I would say it's only been over the last six months of maybe three years in Bitcoin, is that I've noticed what's happening with Bitcoin is that when decisions are made on the future of the protocol or the future of mining, people are always considering the trade off for decentralization, "does this make Bitcoin more decentralized?" We should probably talk about what decentralized means, why it's important, but also the myriad of things it relates to because there are a whole bunch of things that come under the decentralization, whether it's development, whether it's nodes, whether it's mining.
Do you want to talk about firstly what decentralization is, why it's important and then let's talk about how Bitcoin is, and people who are working on Bitcoin, are trying to ensure that it stays maximally decentralized?
Shinobi: Well obviously something that's centralized, it's a central thing you're dependent on and I think the best example would be Netflix versus BitTorrent. If Netflix's server or their CDN that you're using goes down, you have no more Netflix. But if you're downloading TV shows or movies off BitTorrent, there are thousands of computers potentially across the world all uploading and downloading whatever you're trying to get and all of them would have to fail for you to not be able to get that TV show.
To really take it to the extreme, the entire internet itself out of DARPA, the research arm of the Pentagon in the United States, the idea was to have a decentralized communication system, so the military could still coordinate if America was hit with nuclear weapons and to have the communication system set up, so that a bunch of places getting bombed wouldn't take the entire communications system down, that the messages could route around those damaged nodes.
It's all about resilience to failure. If it's done right, the more decentralized something is, the more robust it is against different types of failure. But the more centralized something is, if something fails there, it brings the whole thing down.
Peter McCormack: There's a couple of things in there. Decentralization is important obviously as you said, as an infrastructure. For example, you have Bitcoin, which is maximally decentralized, a whole country can try and turn off Bitcoin or ban Bitcoin and it doesn't close it down, there's an infrastructure there. But there's also a part in terms of influence, the influence of individuals or small groups of people. The more centralized something is, the more they can have influence.
I think a good example of that will be if someone's new coming in, they might have heard of something called Ethereum, they might be thinking that this another crypto project they can invest in, but I've always found, as somebody who isn't as the most technical, that as I observe it, it feels like something which is becoming more centralized and that there are small groups of people or individuals who have influence over that.
Shinobi: Yeah, absolutely! Centralization and decentralization are two ends of a spectrum, plain and simple. That's not a binary or black and white thing and nothing is guaranteed to stay in the same place on that spectrum and yeah, things like... This is why I am such an avid supporter of Bitcoin but just essentially nothing else in this space because Bitcoin has demonstrated resistance to those centralized influences multiple times where Vitalik could literally snap his finger tomorrow and spit out 15 syllable words that nobody understood and go, "we need a hard fork" and everybody would just do it.
Peter McCormack: I'm with you on that one as well. I've become much more hardened and over time it's funny, it's almost like my hardened state for Bitcoin is almost like the blockchain itself. It's like I'm getting more personal confirmations over time the deeper I go, but one of the things that I see all the time is that the decisions that are made... I've been to a few Bit-dev meetups, I've spent time with people and the trade-offs are always there and people will have heard in the last show talking about the fork wars.
You know what I used to think Shinobi? I used to think that 2mb doesn't seem to be that big a deal, but actually it's a massive deal when you are considering the trade-offs for decentralization. If we look at that we want to have as many people running nodes as possible, that trade off to go to 2mb would have certainly led to a number of nodes dropping off the network.
Shinobi:Yeah, definitely. Actually if we're referring to the New York agreement and all that, it really could have made them as big as 8mb, when you take SegWit into account with a lot of multisig usage and that's according to a Bitfury study from I think 2016 if I remember right and that it would have knocked 90% of the nodes offline after six months.
Peter McCormack: The next thing is a very interesting point about being hard to change and that's something I observed in... So I re-watched your interview with John Carvalho and Vinny Lingham the other day and even though Vinny Lingham in our perspective, was on the wrong side of history here, I'm really glad that interview happened because it was a very important thing to observe. But something really stood out in that for me was when Vinny was talking about the reason he signed the New York agreement, the reason he was keen for the S2X and 2mb etc, was because he wanted a compromise and he wanted his word to be his bond.
John and yourself gave some very good retorts to that and so what happened yesterday when I was in a discussion on Twitter about blocks and somebody said it's really important that the community should find a compromise, if the community would have found a compromise, we'd avoided all these battles, we would have moved the technology forward but actually if something's hard to change, it's never going to be about compromises. It's really important that the changes are absolute necessity and that enough people want it to happen.
It's a bit like when you think about in terms of politics and voting. It's not usually in a lot of politics... I don't know the exact numbers but I know for example in the UK House of Commons, you have to have a certain percentage of the vote, it's not like if you get 51 versus 49 outside of referendums, you have to have a certain percentage and Bitcoin is similar, right? You have to have a very high...
Shinobi: Super majority?
Peter McCormack: ... Yeah, a super majority for things to happen. Otherwise if it's too easy to make things change, you can end up screwing the system.
Shinobi: Yeah and I think if this all works and Bitcoin succeeds, the natural conclusion is it will be impossible to get anybody to agree to change anything anymore, unless the option is we change this or Bitcoin breaks.
Peter McCormack: Which is amazing really, because when you think about it, again, I'll give my comparison to Ethereum, Ethereum is just this big super complex crazy blockchain that can do so much. In this essence, Bitcoin itself is actually very simple when you think about it. It is about being able to send money to somebody and that being confirmed. It's a very simple premise.
Shinobi: Yeah, but it can do a lot of complex stuff. I think I'm going to hold off until the next chunk of stuff, but I think the general analogy that I'm going to use to try and walk through how Bitcoin works is probably going to trigger a lot of people from the Ethereum space.
Peter McCormack: Well, so be it! One thing I will throw into here, that if anyone is listening to this, they should take any of my comments with a pinch of salt, because I'm on a journey learning and don't take anything I say as golden. A couple of minor points just to add on the end is like, and this goes back to the open source element but anyone can contribute, the last point I put is that it can't be turned off. They can't be turned off relates to decentralized, but I don't think we need to go into the details of that. My question to you is, why? Why are all these things so important?
Shinobi: Well we're really walking into a whole new phase of human history with how just omnipresent computers and computing technology is getting everywhere. If we don't start changing how we build an architect all of those systems, if we just let them stay these centralized things with these central points of failure, then we are going to end up putting God-like control over our lives in the hands of a select group of people in charge and that does not go well. We don't need to run that experiment again in human history to see the outcome, they will abuse it.
Peter McCormack: We talked about low trust, we're going to talk about how the Bitcoin protocol works in a bit more detail. Just before we do that, when I was searching online, I found a very interesting page which talks about the origins of low trust and there were like five elements to it. One we've talked about which is open source, the second is a peer-to-peer network, the third is cryptography, fourth decentralization, which we've talked about and the fifth is the verification of rules. Do you want to just talk about the parts of that we haven't already discussed? Which I think is going to be that is a peer-to-peer network, cryptography and the verification of rules.
Shinobi: The peer-to-peer network is mostly just the core point of emulating the internet's architecture itself. For the same reasons that the military wants it to be able to communicate between all its bases and troops if we were being bombed with nuclear weapons to be able to function, we want the base of global money system to just continue functioning.
Whether some country is trying to mess with the miners in that country or playing games with the internet to try to cut different parts of the network off from each other and no matter what is going on in the world to disrupt big parts of the Bitcoin network like the internet, we want the overall whole network to keep functioning, even if large portions of it are damaged. Otherwise, it's not really the type of thing that you can just expect to keep working with minimal control or oversight or involvement of all the types of power structures that we don't want involved in this.
Peter McCormack: Do you want to talk about cryptography? Because it's the first time we're going to mention this.
Shinobi: Yeah, I'm going to go down a bit of a rabbit hole here. I'm going to try to keep it quick and simple though! Historically cryptography was as simple as, you construct some message and write it down and then you have to put together a random sequence of something that is as long as that message and you modify the message with that and then the person who you're sending it to has to have that exact same random something and know how to reverse that modification. So it required the same kind of secret, rather the same exact secret being shared between two people to encrypt something. This is something I don't think is really well known.
But the long and short of it is John Nash, who a lot of people might know as the subject of "A Beautiful Mind", the Russell Crowe movie. In that movie, they had the whole plot point where he was dropping mail to the US government in the box that nobody ever read. In reality, he was actually corresponding with the NSA and they actually have the letters he wrote published on nsa.gov and one of the things he pointed out was that with very large prime numbers, in the simplest terms, you can just create these two numbers that have a relationship together as points on a graph with a universal point in common and then multiply data, pretty much take the data and take the public version of this number, the public pair in this pair of keys and just multiply them.
Then an equivalent reverse of that would get you the original data back. There's a way that using the historical concept of the two people having the same thing, where you can mathematically prove that as long as these are the only two people who know this secret, it's impossible mathematically for anybody else to read the message or break it.
But with this type of multiplication shrink, with these really large numbers, it's impossible to ever prove that this is unbreakable, but in practice it pretty much is. So one of the letters that John Nash wrote to the NSA that actually didn't happen according to the movie, is pointing this out to the NSA and pretty much explaining this is going to completely revolutionize cryptography and we need to get ahead of this before our enemies get ahead of this.
That's the earliest notion of that type of public, private, key asymmetric cryptography that I'm aware of. The interesting thing with that is you can not only just encrypt data but you can prove that a piece of data has been... Had this multiplication shrink done by a specific private key in one of these key pairs, you can prove that a specific key notarized a specific piece of data.
Peter McCormack: This is really important in a low trust environment such as Bitcoin, the cryptography enforces possession, right?
Shinobi: Exactly! That's the bedrock of this being able to function as money.
Peter McCormack: The last thing in this low trust environment is that there needs to be a set of rules and there needs to be a way of verifying these rules and this is what the nodes do. We're going to come onto that, I won't go into detail now. When I was trying to consider how Bitcoin works and there's multiple levels and we're going to run through that, I tried to separate who I think are the relevant parties in this.
I've put users of Bitcoin and there's two types, there's the users of Bitcoin who operate a node but there's going to be users of Bitcoin who don't operate a node and they could just be people hodling or companies which accept Bitcoin. I separated them out. There's the basic users of Bitcoin and this is users of Bitcoin who operate a node. You've then got the minors and then got the developers. Is that a fair way of categorizing the different groups within Bitcoin?
Shinobi: I would say it's simplistic, but I think it would be very overloading to try to make it any more complicated than that. All I would say is that you can absolutely be in multiple categories there.
Peter McCormack: Of course! Yeah without a doubt. There are plenty of developers who have a node, who may mine and also hold and accept Bitcoin so I fully understand that. But the reason I did that is I wanted to map out the journey of how Bitcoin works in terms of the starting point of someone deciding to create a transaction, how that transaction then goes through the network to be confirmed. I tried to think of a starting point and before we go into the detail, do you want to talk people through what actually happens from the point of a transaction being created to the end point where it's confirmed on the blockchain?
Shinobi: Okay, here's where I'll jump in with the triggering analogy. The most basic thing you need to understand is a UTXO, so an unspent transaction output. This is pretty much just a little computer program in a really simple computer language that has an amount of Bitcoin that's connected to it and you have to fulfill the right conditions of that program in order to destroy this program and then make a new one or new ones where you can divvy up that Bitcoin between them. What a user does is they get a UTXO that they control and a normal one is literally just going to have a public key or an address and go give me a signature on this UTXO from the corresponding private key.
The user takes this UTXO and they make a transaction where they put this UTXO in as an input and then they create a new output, so a potential future UTXO that this transaction is going to create and they decide what program is going to be in this UTXO to say what you have to give to destroy this and do this again later and then how much Bitcoin is going to be locked in it. You always have to take the leftover money and make a UTXO that sends it back to yourself or that just goes into a fee that miners can claim. They put this transaction together like this and then they sign it.
Peter McCormack: One thing we should add in there though, because if somebody's getting a bit confused right now thinking, "God this is going to be too complicated", a lot of the times when people are using and spending Bitcoin in the environments they're doing it, most of this will be done for them in the background. I know advanced users like you might be selecting your UTXOs to do this manually, but for most people for their first few transactions, this will all just be done in the background. Is that fair?
Shinobi: Yeah, absolutely. This is stuff that's just automated in the background in most software and I'm just trying to get this is... I've got a way to wrap this up at the end I think really nicely. You take your UTXO and make your transaction where that's an input with the new output, sign it and then submit it to the Bitcoin network. Then what happens here is it gets into the mempool of the nodes that you first send it to and that's where they store all the transactions that haven't got put in a block yet.
Peter McCormack: So that's you, me, anyone out there who's creating transactions, they all just get grouped up together?
Shinobi: Correct. Everybody running a full node can have a mempool and just collect it and broadcast all the unconfirmed transactions. They check it to make sure that it's valid, that the signature is valid, that the UTXO that it's spending actually exists and if it does, they broadcast it to all the nodes they're connected to and it floods all around the whole network with it being checked in the mempool, as each node gets it until it gets to a miner.
Then a miner is pretty much running a lot of specialized computer hardware, running electricity and hashing all of the transactions it grabs out of its mempool in a block and eventually it'll find a hash that meets the difficulty requirements, so it has so many leading zeros at the front of the hash for the block and then it blasts that block out to all the nodes it's connected to.
Then in the same way that a node did with each individual transaction, it gets the block, it checks the proof of work on the block to make sure that's valid and then if that's valid, it checks all the transactions inside it and it makes sure that all the UTXO program conditions were met properly, all the signatures are valid, all the other conditions are met and if it's valid, it broadcasts that block and then that's the newest block in the blockchain.
Peter McCormack: Okay, I'm going to try and make this even simpler for people who are listening for the first time, because I've got no doubt some people are going to go, "what just happened there?" In its simplest form, and we'll start with the blockchain, the blockchain is this sequential set of blocks which contain all the transactions. What would happen when I, as a new user, create a transaction that goes into a basket of a whole bunch of transactions and what's happening is these are being collected up for when the next block is ready, but the way blocks are created is that the miners themselves are competing to find the next block.
The reason they're competing is we have to have this thing, this proof of work and we have to have this way of making sure there will be a price to create a block, a cost to it, to give value to it and as they all compete, whoever finds the next block, whoever solves the puzzle, they get to attach that block into the blockchain and then all the miners start doing this is like a cycle. Does my simplified version still work?
Shinobi: Yes, and to tie it up with the analogy, the way you can think about it, is that UTXO and those transactions are little programs and they submit them to this virtual computer distributed all over the place that loads that program in it's RAM and that eventually the miners, the CPU of this computer, grab that program out of RAM and run it and the results of it gets stored in the hard drive, the blockchain.
It's literally like a virtual distributed global computer where anybody can come in and mine to be part of the CPU, anybody can come in and store the blockchain and validate it to make sure it's correct and be part of the hard drive and anybody can collect and broadcast these transactions or programs around in the RAM and it's just like an abstract global computer that just has only one process running, who is transferring the Bitcoin and from where to where.
Peter McCormack: Why does it work this way though Shinobi? Because it sounds like a very complicated way of making money work. If I want to create a transaction, why is it done in this way? Why has Bitcoin been designed this way?
Shinobi: Because it's just the way that it has to be done if you don't want central parties in control. The current state of the balances of everything that the UTXO set, all the little programs that are valid right now that haven't been run. That's pretty much the entire state of things. The only way that you can agree on changes in that is batch the programs that are run in a block, which changes the UTXO set. In order to do that, somebody has to do that change and somebody has to initiate that change. How do you actually handle that with software spread all over the place?
Traditionally it would be just put somebody in charge. But the whole concept and proof of work is when you hash this data over and over again and have this target requirement where there has to be this many zeros at the start of that hash at the beginning, as it proves that you are actually burning electricity. You can't fake that! That is a way where instead of having a set defined group of people or authority, you have this abstract authority that anybody can be a part of, anybody can come and go from that, you can prove literally by burning energy and that's all you need.
You don't need a specific key or to prove you are a specific person, just prove you burned this energy. That's how we can guarantee that this change happened and this is the one that we agree on and then the next change is built on that and okay, we agree on that and it proves that each set of changes had a real world cost and so somebody has to pay that cost again if they want to go back and change something. It solves two problems at once, not having the central party in control and not being able to set this up so that everybody agrees on what is the current state of everybody's balances.
Peter McCormack: Yeah, what we can throw in there, if people haven't understood it from what we've said so far, but the blockchain itself is just a ledger. It is a record of all the transactions that have ever happened and everybody on the network can have a copy of that. You can have a full copy of the blockchain, the ledger, I can and tens of thousands, even hundreds of thousands, millions of people if they wanted it around the world, everybody could have that and the way Bitcoin is designed is that we all agree what goes into that.
If you don't agree and you try and cheat the system, then you can't get away with it. It's a way that we can all just work together to make sure that we agree that transactions are real, transactions are valid and it's just I guess, game theory plus mathematics, plus cryptography, altogether to make sure we have a very honest network. Is that a fair, simple analogy explanation?
Shinobi: Yeah, the same kind of thing is like what we were talking about earlier with open source and just how the software is worked on except it's the actual system itself running and updating balances as people spend their Bitcoin. The same attitude about how is the system worked on applies to how does the system itself work? Everybody is checking everything, every balance update, every change to the state of the blockchain and everybody's balances to make sure everybody's following the rules.
Peter McCormack: When we talk about rules, we're talking about consensus and somebody who's coming in anew and trying to learn about this, when they search for consensus and they try and look up on it, they're going to come across potentially two different things. They're going to come across the consensus rules for Bitcoin, but they're also going to hear about something called social consensus. Let's do the consensus rules first because these are the rules by which Bitcoin works, these are the rules which stop people cheating the system. So do you want to explain what the consensus rules are? You don't have to list every single one of them, but what they are, how they work and how they are built into the software.
Shinobi: So the first thing to say really is consensus rules can only be applied to things in a block because the kind of problem with the mempool is there's no guarantee that everybody's mempool is the same. Whereas with a block, the way that miners are batching everything and stamping their proof of work on it, that's kind of the way we can prove there's only so many contenders for the next set of changes and guarantee everybody winds up on the same page. So we can only apply those checks really in terms of enforcing things inside the block. Just a quick few examples would be, it's a consensus rule that a miner can only give themselves so many new Bitcoin in every block except for the transaction fees. So it was originally...
Peter McCormack: We haven't covered that, so let's just very quickly explain that there's a block reward.
Shinobi: So in every block, a miner is allowed to give themselves so many Bitcoin just out of thin air in the block for mining it and that was originally 50 and then cut in half to 25, it's currently 12.5 and it's going to cut in half again soon and that kind of just keeps cutting in half until we reach 21 million Bitcoin. A consensus rule is when a node gets a block, it's going to check here now, "did the miner give itself more Bitcoin than it's allowed to in the special coinbase transaction that miners can make in a block? They didn't, the block is good".
If they gave themselves too much, then that node is just going to mark that block as invalid and ignore it. It's going to ban the node that sent them that block and refuse to connect to them again and then it's just going to wait for the next valid block. As far as a note is concerned, that block broke a rule. So that's not a valid set of changes to everything. Another example is this transaction with a UTXO as an input, has to have a signature that matches the key in this UTXO.
If there's any transaction in a block where the signature doesn't match that right public key like that, that block is invalid and all the nodes that get it will throw it out and ignore it. It's kind of enforcing the whole rules of the system. You can't print money out of thin air against the rules everybody agreed to, you can't spend somebody else's money without proof, without that like, :here's the password" or the equivalent of it to this money and that's the whole way that you kind of keep this in check. Otherwise it's just bits in a hard drive, we can make it say whatever we want, right?
Peter McCormack: And somebody listening to this, they can immediately go after the show, they could go and download Bitcoin Core onto their computer, they can sync the blockchain and they can become part of the network. They can start validating the rules. The one thing to say is they won't sit there themselves manually and doing it, but the software, the Bitcoin Core software will do that for them.
Shinobi: Yes and personally, this is going to sound kind of snobby, but I don't think you really are using Bitcoin if you aren't doing that, you're pretty much using a service that somebody else is running and just trusting them not to lie to you.
Peter McCormack: Well that's one of the things. So very early on, some people will probably buy their Bitcoin on an exchange or perhaps leave it there and when they're using that exchange, they're trusting the exchange. The next step is they might buy a hardware wallet and they might store their Bitcoin on a Trezor or a Ledger. But even at that point that they are trusting the node of the Trezor or Ledger. At the point where they become fully self-sovereign is when they have their own node and they are verifying the rules themselves. That's what you're saying, right?
Shinobi: Yes. I think this would be a good point to kind of go through really how all that kind of works from a user's point of view. Let's say that somebody sends you some Bitcoins and you download the block that that transaction sending you Bitcoin was in, that whole block looks valid. The miner didn't give themselves too much money. all the signatures are right and they match properly, but do you really know that that block is valid? Because another one of those rules is that that UTXO that's an input in all of those transactions has to be valid and it has to have never been spent before.
So how do you know that it wasn't spent before in one of the blocks before? So you have to go check the block before that. Then how do you know it didn't get spent before in the block before that? So you have to download the block before that and then the block before that. Ultimately if you sit and think about it, if you don't go download every block before that one where you were sent money all the way back to the very first block where the first Bitcoin was made, then you don't really know that that UTXO wasn't spent before and you're not being scammed.
Peter McCormack: So on the journey of becoming a Bitcoiner, I think most people have to accept, and it's a journey I've gone on, but at some point, you will want to download a node and validate the transactions. You don't have to do this from day one, but I think you should have it in the back of your mind that this is going to be part of the journey that you're going to take with Bitcoin. Or you're trusting somebody else.
Shinobi: Yeah, I mean you don't necessarily have to run out and do it right away or right now, but from the point of view of the whole system of Bitcoin, it's absolutely vital that even if you aren't running one now, that you are able to run one if you want to or need to because ultimately if you can't run that node and check that whole chain and the whole history of everything, then you can't really use Bitcoin trustlessly, you're just trusting that some guy with a database isn't lying to you.
Peter McCormack: So would you say a fair summary of this bit we've just covered is that the nodes validate the network and the miners are paid to secure it?
Shinobi: Yeah, the nodes are like the RAM and the hard drive and the miners are the processor that's actually running things.
Peter McCormack: All right, so let's do a bit more on mining.
Shinobi: Real quick though, the kind of key point about that is what good is a processor if it doesn't have any data or program to process?
Peter McCormack: So let's talk a bit about mining, because people are going to hear about mining and they're going to be, "whoa, what are you mining? Isn't that just like people digging for gold in the ground?" But the actual idea of mining is based on gold mining, right? It is based on the having to be work involved. So let's talk about of what mining is, in isolation to everything else, what the miners do and why they're so important.
Shinobi: So pretty much like I said earlier, mining is kind of the way that you get everybody to agree that this is the current state of things. So to get kind of technical, the way that ordering a system like this used to work or the idea of how it should work is you have everybody out there, they would still have a node that could download and check everything and kind of do the validation. But you would have a specific set of people that were picked that would have, let's say a public private key pair, who were in charge and instead of mining, you would just have these people take turn signing blocks and you would verify those signatures and see it was one of them and then check all the rules.
But ultimately those specific group of people could just stop signing or stop signing anything with something they didn't like in it. So when you come back to the mining and the proof of work, I think to be clear here, I should explain what a hash function is. So pretty much it's kind of a mathematical multiplication and I think I'm really overusing that, but that's really what a lot of the cryptography involved is, it's just algebra and multiplication. But you can take any amount of data and put it through this hashing algorithm and it will give you a piece of data of a certain length.
What the bits and the characters in that data are, are a result of what data you put it in, so that that hash that you get out is like a fingerprint of the data that you put in. It's statistically almost impossible to find any other data that would give out the exact same fingerprint. So pretty much what miners do is batch all of the transactions in a block and then hash that block and there's a little spot in the block, or a few spots actually, where they can just put in random numbers so that the fingerprint that comes out is different. One of the consensus rules is pretty much that a block has to have a certain number of leading zeros and this kind of adjusts itself, maybe we can get into a little more later.
If you put in a block and you keep hashing, eventually you get a hash out for this block with the right number of zeros in front of it and you can submit that out to the network and they can verify everything in the block, verify that hashing it with the right random number matches the hash with the correct amount of zeros and everybody's happy. But the thing is there, mathematically you don't ever know what hash is going to come out when you put data through a hash function that you've never put in it before, it's totally random.
So you can kind of model statistically how long is it going to take if I just keep doing this over and over to get a hash with this many zeros in it and so this whole kind of process of doing these hashes over and over and over again, is that you had to have actually done those calculations over and over and over again around this many times. That means you actually had to run a computer which costs money and electricity.
So to kind of go back to the whole way things used to work with just a set of people in charge with keys, a valid hash with the right number of zeros is kind of like a signature from the right key except that anybody can make it, you don't have to have that special private key to make it. So you've now got the whole system set up where everybody can find a way to agree on what changes are being made to everything, but you don't have to rely on the set group of people and it all just comes down to ultimately physics in that you can't fake doing this math, you actually have to burn energy to do it.
It's really kind of a brilliant little thing here, where this system kind of just... It flows into just a natural part of the universe and that's what makes it work.
Peter McCormack: So the way I used to think about the blockchain almost was like a skyscraper and each block is like a floor and all the miners are competing to build the next floor and they're fighting and they're trying to find the solution. Once they've built the next floor, then they're fighting and competing to build the next floor, but as you build more floors under this skyscraper, essentially the blocks, it would be very expensive to, if you wanted to go back and rebuild a floor, let's say four floors ago, it'd be very difficult. The amount of work to go back and do that, it isn't productive. So there's no cost benefit to go back and rebuild those floors. Do you understand my analogy?
Shinobi: Yes, and this kind of goes into another comparison with how things would have worked back in the old days with these identities and public keys and signatures. If those people with those keys decided they just wanted to go back and sign different things and then change things, they could just do that like that. But with proof of work, you actually have to go back and do all of those hashes all over again and that costs real money and real electricity. You can't just do it like that!
Peter McCormack: And we're not talking about small amounts of money here to do this, are we? I mean to re-org the blockchain, which is essentially an attack on Bitcoin, we're talking millions, tens of millions, even hundreds of millions of dollars to go and do this.
Shinobi: Yes, and that number is only going to grow and something in the really long term is eventually, it's not even going to just be like, "how much money does it cost?" It's going to be, "do you even have enough electricity at your disposal to go back and change things." Are you a big enough miner to do that all by yourself or do you have to go expand or convince other people.
If in the long-term, if Bitcoin is successful and we just keep having more miners come online, the more Bitcoin is worth until that reaches an equilibrium, I think it's very realistic to see a situation where relatively it's really cheap in dollar terms to attack Bitcoin, but to get the electricity you're going to have to shut the power off to New York city. Are you going to be able to do that? I don't think so.
Peter McCormack: Well that's the beauty because somebody might be thinking, "well, who's going to attack this?" I mean some greedy individual is not going to have the money or the power to possibly do that. There's no benefit to a miner with a lot of hash power doing this because by attacking the system themselves, they're actually destroying the value of the network they're actually working on. So the only real threat here with the right kind of capital is state level, government level of attack. But even this would be even really difficult for a state level attack on the system now as it grows.
Shinobi: And 10 or 20 years down the line, do you think that the population of New York state would be okay with it if the government just turned off all their electricity so they could attack Bitcoin? I think they might be very unhappy about that and do something about it.
Peter McCormack: So one of the things we should add into this is that in the blockchain there is the potential for blocks to be solved at the same time and there is the possibility for branches to exist. Do you want to talk about what that is and what actually happens within the system when different branches exist?
Shinobi: This is actually a really beautiful part of how this system works and it just comes back to tying in the universe because ultimately it kind of just solves itself. Let's say two miners on opposite sides of the world find a block at the same time and they shoot it out to the network. Different parts of the network are going to get, one or the other miner's block and go, "that's the block now" and then all of the miners move on to mining the next block.
So the way the hashing works, it's random, you don't know when you're going to get the valid header, you don't know who's going to get it and so whoever gets that next block, whichever of the two competing blocks for the last one it built on, that's the one that wins. That's the valid change because it kind of just works where whatever chain is the longest or has the most proof of work on a technical level actually on it, as long as it's valid, that's the one that all the nodes will consider the current state of things.
Peter McCormack: So this is where we come to confirmation. So one of the things that you'll see early on when somebody starts doing their first transactions, if they go and look at the blockchain, they'll see the number of confirmations and this is highly relevant at this point.
Shinobi: So when a miner gets a block and starts mining on top of it, that next block that he made that he's hashing on it actually has the hash of the previous block inside of it. So it kind of commits cryptographically to the block before it and so the whole concept of confirmations is how many blocks have been built on top of the block that your transaction was in, because every new block that gets built on top of it, that's another round of all the miners in the world, burning electricity hashing, that has real dollar cost to undo and each one on top is more cost and more expensive to undo it.
So you never get to a point where it's completely literally impossible to go on do anything, but you can very quickly get to a point where it would be so expensive to do that for what somebody would get that it's 99.99% never going to happen.
Peter McCormack: So the way I tried to look at it is with regard to value. For a very small transaction, say $10, you might trust one confirmation. But I tend myself to operate at the level of six confirmations. Once I hit six confirmations, I trust it. The reason I go with six, I mean there's a lot of the services that I've used who talk about six, but also I think there was one of the miners recently or at some point that sold four blocks in a row.
But what the theory here is and what you're saying, and also somebody talks to it like amber, is that the more blocks that are confirmed on top, the more amber that is sinking over the blockchain and hardening it and the less likely it is for someone to go back and re-engineer your transaction. Most people tend to think about six as a good starting point, right?
Shinobi: Yeah, that's kind of just based on best practices and just looking at the costs. But there hasn't really been any re-orgs or kind of competing branches that kept going before one won over the other, longer than a block or two, except for one or two kind of serious incidents in Bitcoin's history. So I think, unless you're settling like tens or hundreds of millions or billions of dollars, six confirmations should be good enough.
Peter McCormack: All right, so before we finish out on this, another part of the blockchain is that we have something called forks and there's two types, there's a soft fork and a hard fork. Let's explain what they are, what the difference is and why they're so important.
Shinobi: Well first off, both types of forks, a soft fork and a hard fork, are changes to the rules of Bitcoin. The major difference between the two of them is what type of changes. So with a hard fork, in the simplest terms, what you're doing is you're adding a rule that makes something that previously was against the rules, allowed now. So you're making something that was invalid before valid now and that's kind of looked at as a very dangerous thing for two reasons. One, is the logistics of coordinating that because once the change activates at whatever time or whatever specific block number it's set to activate with a hard fork, there is an instant break in the chain and anything that's building with these new rules is not going to be valid to any Bitcoin node out there that didn't update to the new rules.
So when you're talking about a big, global decentralized system, there's really no way to guarantee that everybody's ready, everybody's even willing to upgrade or wants to upgrade in the first place and if you kind of just break the network in half like that and a lot of people didn't want that upgrade or weren't ready, that can cause a lot of financial chaos. Then the second kind of reason they're dangerous is you're making a hard clean break like that with that risk of how difficult it is to coordinate and it's kind of setting a precedent that you can change the system without worrying about whether everybody in the system kind of agreed or opted into that change.
Once you start doing that, that's kind of a slippery slope. It's like if you do that once, what about the next time? What about, I want to do this thing now instead of what we did it for last time? I think there's a serious risk if that happens and it's not clear that the kind of hard fork or branch, if it's not a clean, everybody goes with it branch, it is a small minority that could just start fragmenting a system like Bitcoin. One of the consequences of this is also that people might not realize that it can create two separate coins. So if both branches are then mined, essentially there's two coins that exist in the system. What value do they have? Which is which?
That's one of the scary outcomes. It happened the first time with Bitcoin Cash and then it's happened more times than I can count since. But we've kind of been lucky every time it's happened that the people that hard forked were a small minority. It wasn't so much the system splitting as a small group of people going off and starting their own thing. But if it were to happen in a way where it wasn't so cleanly cut like that, maybe it's more split down the middle, that could get very disruptive and dangerous for Bitcoin. That would have a lot of negative consequences for it.
Peter McCormack: Are you one of those people who believes that in some ways and hopes that there will never be a hard fork?
Shinobi: Well, we're going to have to...
Peter McCormack: Is that possible?
Shinobi: ... Eventually, but that's not for a hundred years or so!
Peter McCormack: Is that that long-term bug that we know that's in the code or that kind of configuration that's in the system that I've heard about?
Shinobi: It's the timestamp bug. So the kind of data field in a Bitcoin block where it marks the time and date and year and everything that that block was made at, it's only got enough space for so many digits. So in like a hundred years, it'll fill up all the way to 9, 9, 9, 9, 9, 9, 9, unless we hard fork and fix that, as it will be against consensus rules for a Bitcoin block to be made after that.
Peter McCormack: Well, we'll let Pieter Wuille's grandchild fix that one. It's not going to be for us I think. So let's talk about soft forks then.
Shinobi: So a soft fork is pretty much taking something that used to be allowed and making it not allowed anymore. So you're making something that was valid, invalid and this is really nice because if it's done properly, everybody doesn't have to upgrade at once. So as long as we get the miners in the system or the super majority or even just the majority, although it would be less safe that way to update and enable the soft fork, then they just will not make blocks that break the rule the soft fork is implementing.
And because the rule is kind of getting tighter, you're taking something that used to be okay and just not allowing it, so any upgraded node is going to see those blocks and it will be valid to them too, because it's not breaking any of the old rules. It's just not allowing something that used to be okay and so it allows everybody to take our time and make sure everybody's okay with what's being added or upgraded and then everybody can just deploy it.
The miners can upgrade first and then everybody else can just upgrade as they can and it gets to a point where at first you're depending on the miners to enforce this new rule and stop the chain from splitting like it would with a hard fork, because that's still possible with a soft fork, for a new block to be made that's breaking the new soft fork rule. So old nodes would think that's valid and the ones that have upgraded would go, "no, that's wrong."
So at first when you do this, you're counting on the miners to safeguard that, but as over time, everybody upgrades, you get to a point where now everybody's just checking that new rule themselves, but it's a lot less disruptive because that split of the chain is only a possibility. With a hard fork, it's an absolute guarantee and there's a neat trick. This is how SegWit was done with a soft fork is, I said earlier that UTXO's have a little computer program in them that says what you have to do to spend the Bitcoin it's connected to.
Well, it's baked into the node and the whole protocol what that programming languages and so each little primitive thing you can do, like check a signature, or say "this coin can't be spent until after block 600,000", are each like a little sub routine in a whole program. You can take these little sub routines and build a whole program out of them, and there's these special little slots for programs that aren't defined yet, and the trick about that is if you use one of these before they're defined, it literally just says "true".
So no matter what you give the program or the UTXO, no matter what it says past "true", it will just interpret that as everything checks out and it's valid to the rules. So you can add whole new things, you can build programs out in these new slots and old nodes will just go, "oh that's okay" and not check the rule and it'll keep all of the nodes on the same page, even though you are technically adding something that wasn't possible before.
Peter McCormack: So this is probably a good point to talk a little bit about development and we won't go into too much detail. I've got an interview with Brian Bishop about how dev works in Bitcoin that I'll add it in the show notes, but we're talking about rules and the rules come from updates to the software and the software is changed by the developers. The bit I want to really talk about is these changes come from what is called a BIP, a Bitcoin Improvement Proposal?
Shinobi: Yeah.
Peter McCormack: So talk just very quickly, what is a BIP? How do they work? Why are they so important to Bitcoin?
Shinobi: It's pretty much just like a formal way to propose changes and not even necessarily changes. There's different types of BIPs. There's BIPs that are purely informational BIPs, there are BIPs for changing actual consensus rules and then there's BIPs for things around Bitcoin that are not related to consensus. Pretty much the idea is you just come with a BIP draft, offer your idea and just put it out there. The idea is just talk about it, talk to the other developers, other people in the communities, see what they think about it and take their criticism if any and actually work on addressing it.
You go through that initial process and if you're able to defend this idea to the point where the criticism is responded to and it's holding up well, it might get to the point where the developer managing BIP proposals, right now Luke Dashjr, will assign you a BIP number and actually formalize it as an accepted a Bitcoin Improvement Proposal. Then pretty much to really take it from that point, if it's an informational BIP, it's there, you're done.
If it's a BIP that doesn't really relate to the consensus rules, like the partially signed Bitcoin transaction, BIP 174 I think, just a standard format to have transactions that aren't finished and signed yet, so that all the Bitcoin wallets out there can collaborate easily on single transactions to keep everything compatible, you just need to go out there and get people to actually implement it.
Or if you are one of the crazy people who's actually pushing for consensus changes, you're in for a long fun ride of convincing everybody why we should make the change you're proposing and then the long fun road of ironing out all the problems implementing it, checking for more problems, ironing all of those out, thinking about future proofing it so that you don't make something somebody wants to do later more difficult and all the fun that entails thereafter.
Peter McCormack: But that's really important because that comes back to why I've become so hardened to Bitcoin. For somebody who did consider alternative projects, I've become very hardened and it comes back to that conservatism around Bitcoin and the point we talked about making it hard to change, because we are talking about people's money here. We're talking about a global financial system. Let's be honest, we don't want to fuck with people's money.
Shinobi: And as time goes on, I think consensus changes are going to take longer and longer to really talk through and get attention to implement and really convince people this is safe and solid to implements. Eventually, I think we will get to a point where consensus BIPs at least, will just be people talking about the future that will never come, because you're not realistically coordinating that.
Peter McCormack: So last thing on development, I used to have a web development business, 6, 7, 8 years ago and one of the things that used to scare me was bugs. We would put a new site live or new changes live and one of the rules was that we would never do it on a Friday, because you didn't want to ruin your weekend. But invariably there would always be bugs. But a bug on a website for a client is very different from a bug in Bitcoin and this is one of the reasons development is so slow and is so conservative, because bugs can be a very scary thing in the world of Bitcoin.
Shinobi: Yeah, if there's software, there's a possibility for bugs. I don't see that ever changing. It's human beings writing the software. People aren't perfect and things can happen, but it just is what it is. Last year there was the inflation bug where the Bitcoin Core software would have actually allowed you to take the same UTXO and include it in a transaction twice and effectively print Bitcoin out of thin air and it was never actually exploited, but that bug was there for a while before it was noticed and eventually patched but yeah, there can be bugs. That is absolutely a possibility.
Peter McCormack: But this is why Bitcoin is so important and why the ideology behind it so important, the attitudes of people, because if you compare it to something like Ethereum, which had that attitude of move fast, break things, that is actually a careless approach to software, which is also money, because we've seen say in Ethereum, where tens and hundreds of millions have been lost and locked up due to bugs.
Shinobi: Yeah and that's something not too dissimilar from what has happened to Bitcoin. So part of how the whole database of a Bitcoin works when you're storing transactions and UTXOs is they're indexed by the hash of the transaction that they were originally created in. There was an issue, a couple of times actually, where a miner was reusing the same address, so sending the Coinbase reward to the same address and there was no fees. So it was the exact same amount and it actually deleted, technically, the previous mining reward because the amount was the same, the address was the same.
So the transaction ID was exactly the same and there can be only one thing in the database with the same ID and so when it was realized that it was possible for this to happen, they actually... Everybody includes the number height that the block is, so like block 600,000 or whatever encoded in the coinbase transaction to guarantee that even if you reuse an address or something, there's something different to make sure that it has a different transaction ID to be indexed on here.
Peter McCormack: All right, so listen, I've got a few questions to finish out on, and thank you for this. This has been a monster of a show, but I've got a few questions to finish out on, and I will close out and explain to people that, don't worry if you found this confusing and if a lot of it's going over your head.
This really is just a starting point to give you an idea around how Bitcoin works, but one of the ways you can learn more is interacting with Bitcoin is by buying some, by moving some and by reading more. So people shouldn't be too worried if a lot of this is going over their heads, but I've just got a few questions to close out on. So the Bitcoin blockchain, each block is essentially 1mb. I know SegWit has something called block weight, which increases the block weight, but why 1mb and why so much resistance to increase that?
Shinobi: Well honestly just because a Satoshi picked a number, it's really that simple.
Peter McCormack: But whilst it's just a number, it's a flag for all the design around that number and the trade offs have to be considered for changing that number.
Shinobi: Well I think ultimately it just comes down to the decentralization as a spectrum, that's a move in the wrong direction. An anecdote from history to make that point is that there were actually two limits that Satoshi put in place. He actually put a hard limit, the 1mb limit that was a consensus rule and then he put a soft limit, which was just like a default configuration for miners, that wouldn't build a block smaller than 250kb.
I think it started at, and there is actually a long history for a couple of years leading up to the first wave of the block wars, where the miners kept ignoring developers and raising that soft limit until they just weren't enforcing any limit except the consensus rule. It got to a point where mining pools started centralizing because it was a taking longer to relay blocks, so there was a lot of two blocks at the same time and somebody losing money going on.
So everybody just pointed at the same mining pool to not have to deal with that and at the end of it, Matt Corallo ended up essentially having to build a centralized network within a network of Bitcoin nodes that just had way better connections between them and a little optimized software so that miners could hook up to that and relay blocks faster in order to deal with that.
So we already did see actual material consequences in this ecosystem to infrastructure centralizing a little bit and I feel like that kind of just... Not so much got written out of the history books, but nobody ever talks about that or really thinks about that we saw negative consequences. That wasn't a hypothetical, it happened and Matt had to effectively step in and solve it by building something arguably centralized.
Peter McCormack: Very interesting, I didn't even know that. Okay, so block times are around 10 minutes. Why does the 10 minute exist? Why isn't it quicker? Why isn't it slower? And how does it stay at approximately 10 minutes after all these years?
Shinobi: Okay, so this is another just arbitrary thing and I guess I'll deal with why it stays there first. This is the difficulty adjustment with mining and this is actually the one thing that really made Bitcoin work. This was the thing that glued all of the pieces together. Like I said earlier, there's a spot in the block where there's a timestamp, like what time, day, month, year etc that block was made at and every 2016 blocks, the network and every node looks back at those 2016 blocks, and the change in time in between blocks.
So when you go back to how the hashing of mining works and you having to hash so many times on average to get so many zeros in the hash, if you throw more computing power at the network than blocks are going to happen quicker, and quicker, and quicker, which would mean that money enters circulation faster, and faster, and faster. So by having this period of blocks where you look at the time between blocks and if it's getting shorter, the difficulty, or the number of zeros a block has to have at the start of its hash to be valid goes up. So you need more zeros and if the time between blocks has been getting longer than it goes down because less computing power is hashing on the network.
So doing that on average keeps it within that 10 minutes and also keeps the rate at which new money is being issued at about the same, instead of just coming into issuance faster and faster and faster and faster. The reasons to not make it faster comes down to keeping everybody on the same page. With 10 minutes, that's a lot of time for a block when it's found to propagate across the whole world through the network, for everybody to validate it, and then the miners to start working on the next one.
It's not that often that we have two blocks at the same time, but if you targeted a lower difficulty, so that blocks happened more often, then you would have more blocks happening at the same time more often and it would take longer for everybody to have some degree of confidence that this is the current state of things. Ultimately at a thermodynamic level when it comes to physics, having blocks come faster with less difficulty doesn't actually change the security guarantee from a proof of work point of view. It still averages out to the same amount of energy that has to be spent to go back and change the same period of time.
Peter McCormack: So the last thing to cover is there are fees in the network. To send a transaction, there is a fee, and also at some times in the lifecycle of the Bitcoin they've been particularly high, which is used sometimes as an attack factor against Bitcoin. But what drives the fee? What drives the fees up? Say if I was going to send you some Bitcoin Shinobi, there's a fee I've got to pay, what's the economics behind that? How does it all work?
Shinobi: Well it's pretty much just a free market. To go back to the analogy of Bitcoin as a computer, the consensus rule with the block size is a limit on how many programs the processor can run at one time, so how many transactions a miner can process at a time. So that being a scarce space, people are going to want to pay more for it if there's more people trying to use that scarce space, it's like there's one processor, abstractly obviously as there's miners all over the world, but in the analogy abstractly, there's one processor and it can only run so many programs at a time.
So it's just a highest bidder and we'll run the highest bidders programs first, and that's just how it is. It kind of sucks and yeah, when we had high fees back in the bull market of 2017, that was a really annoying time to deal with, but it's just the reality of what it is, but what we can do is take little tricks and find ways to make those programs more efficient so they take up less space in that processor cycle and they're cheaper to pay for, or just to touch on it real quick, things like Lightning network. I said that Bitcoin is like a computer with one process, just tracking the global changes of Bitcoin balances on the blockchain.
With things like Lightning channels, you can spin up a little sub-process that the main processor doesn't have to worry about until you close it out and so you can run the one program on the main processor and then spin it off into its own process, that the main processor doesn't have to worry about until you want to close that program. So there's a lot of technical ways that you can just really get way more efficient in how you use that processor and so hopefully allow more people to use it at once and keep the cost to use it down.
Peter McCormack: All right man, well listen, Lightning is going to be something that I'm going to cover as well. I'm going to do it towards the end of the beginner's guide because I think I just want people to get their head around the base chain of Bitcoin itself first, but definitely something I'm going to cover. This has been great Shinobi, you're an absolute monster. I think it'd been really helpful for people, I'm going to put a whole bunch of stuff in the show notes and as I said before, I don't think people should be scared, a lot might go over their head.
It's like most things in life, you learn about driving a car by driving a car, most of the things you learn by doing. So if somebody hasn't bought into Bitcoin yet, I think the next step is just to start dipping their toes in. Maybe buy some Bitcoin, move it around, start digging a bit deeper, listen to some other podcasts and watch some videos. The only way someone can learn is by really diving in and this isn't something you... There's no point where you're fully learned.
We're all still learning but it's just going to take time. You could spend months, even years, I'm three years in still learning, but I think it's really important to just to spend that time going down the rabbit hole and learning all these things.
Shinobi: You got to put the time in if you want to understand something. Nobody just becomes an expert in complicated things overnight, it takes time.
Peter McCormack: Well listen look, you've also got your own show and the various things you do. So if people want to follow your show, when they want to go have a listen, or they want to follow you, where's the best place to find you?
Shinobi: Oh well I'm at @brian_trollz on Twitter and you can find the podcast I do with my friends, Janine, Rick and Nopara from WasabiWallet, @blockdigest on Twitter. We also just started doing a written Medium blog off-shoot as well. Mind if I sneak a show for a something a little more financially motivated in here?
Peter McCormack: Of course man, go ahead dude! You've given me your time, please do it.
Shinobi: Me and Mr. Hodl also, we just took over a Bitcoin swag shop last month, bitcoinshirt.co. So if you guys out there dipping your toes in this space wants some edgy Bitcoin swag, go take a look.
Peter McCormack: Brilliant! Well look Shinobi, this has been absolutely fantastic. I am going to include our previous interview in there just to give a bit of context. I guess I was a little bit more open minded to other projects, I was giving time to Bitcoin Cash and I didn't really fully understand the consequences. You gave me a hard time about it, which on reflection I'm glad about.
We went back and forth, we ended up doing a show, but I think what's happened, I would say over maybe the last nine months ago or so, I think I've now understand where you were coming from and I think you probably also understand a bit about where I was coming from as well. But I think it was a funny show, it was good and I think people might want to have listened to that as well.
Shinobi: Yeah, I think you've grown a lot from that point. I do see also a lot more where you were coming from and think I was a little harsher than I should have been, but just keep at it man! One of these days when you get that node up and running, everybody will stop busting your balls about it.
Peter McCormack: I'm running four nodes now! I've got a Nodl, I've got a Casa, I've got Bitcoin Core, and I've got Knots running. So I've actually got four nodes running, but the way I talk about it is more of a journey and it's all timed into this beginner's guide. So there is a method to my madness! But listen, hopefully I'll see you soon, appreciate your time coming on today. I didn't realize we'd go for this long, but I think it's a monster show, and yeah, thanks for coming on man!
Shinobi: Yeah, I appreciate it. I hope I wasn't too all over the place for everybody!
Peter McCormack: No, I think it was pretty good. All right man, take care!
Shinobi: Thanks again!