Okay, we're almost there. There's one thing that I haven't told you, and it's important. So it turns out it's really super easy to calculate a SHA-256. So why are we using 80 million petaflops of energy? So you can do this SHA-256 easily on your phone. Indeed the chipset on your mobile phone has hard wired into it a SHA-256 algorithm. So what's the big deal here? So one thing that's missing is the following problem, that we've got this hash connection between the data blocks. So I showed you an example previously where I tried to change block 1,000, but then the hash didn't match the hash that began block 1,001. So the network threw out that bad block. But what if I change block 1,000 and then 1,001 and 1,002 and basically keep on going through history to change, to make sure everything's linked even though I've changed the contents of block 1,000. So that's a problem. The way to avoid that is the following, and this is where the miners actually come in. So the miners take a block of transactions that they verified. So everybody that's spending has actually got the money. They do a SHA-256 of the transactions. But they're going to do something a little different. What they're going to do is to take all those transactions and then just add a number like 0 or 1 or 2. That number is called a nonce. So it's a number only once. So you don't repeat. So what these miners are looking for is a rare hash that takes a lot of computing power to actually get to. Do your remember earlier in the course I gave the example of Hello World and I did a 0, I did a one, and then I did Hello World and appended to Hello World was the number 4250, and that delivered four leading zeros. This is exactly what the miners are doing. They are cycling through numbers, doing a SHA-256 trying to get a number of leading zeros. So it turns out in the Bitcoin network, the number of leading zeros is not four. Four is fairly easy to get. Its 18. It's a huge number of leading zeros, and you could do the math yourself in terms of number of hashes, just 16 which is the base and then raise that to the power of 18. That's just an enormous number, and that's where all the computing power is actually coming in. So what does this mean? It means that it's just extremely unlikely that you can go back and edit block 1,000 and then essentially find these incredibly rare hashes that secure block 1,000 to 1,001 to 1,002, dot, dot, dot. That would take just an enormous amount of computing power and effectively this secures the history. So another way to think of the intuition here is the following. Suppose you've got five decks of cards and you shuffle the decks and then you turn over the first five cards. Suppose you're looking for five aces of spades in a row. This can be a lot of shuffling to get something like that. Similarly, for the Bitcoin blockchain, there's a lot of hashing that has to go on to get 18 leading zeros. That's where this computing power actually comes in. So it's an enormous amount of computing power. It's expensive computing power. It's expensive not just for the equipment, but it's expensive in terms of the energy that's being lost, and this is used to make sure that this blockchain is immutable. Another way of thinking about how unlikely it is to find a hash with 18 leading zeros, it's like winning the Powerball lottery twice in a row. So it is just extremely unlikely that you can actually discover this 18 leading zeros, which means a lot of computing power is necessary. So you might think "Well, what about advances in computing power? What about more power coming onto the network or some advances, thinner chips, things like that?" Well, it turns out that the program is immune to that. So if it's targeting 10 minutes in terms of finding SHA-256 with 18 leading zeros. Well, suppose it starts taking six minutes because more computing power comes on the network. Well, then the program automatically adjust the difficulty to try to target the 10 minutes. So think of it as the following, well, if it only takes six minutes to get 18 leading zeros, then we're going to require 19, and that will increase the length of time. It goes the other way also. So if computing power went off the network, then the difficulty with decrease from less than 18 to 17 or 16, and that would ensure blocks are added every 10 minutes. So this system again is ingenious. It is immune to increases in computing speed. It is immune because it's a hashing algorithm, the things like quantum computing. We'll talk about quantum a little later because there's another aspect of blockchain technology that is sensitive to quantum computing technology but not hashing. Hashing is basically a very secure way to construct this very special database. So the other thing that is very important to understand, once the miner finds the hash with the 18 leading zeros, it is immediate that we can verify that it actually works. So the miners are, "Here are your transactions. Here's my nonce, whatever number it is, 3,543,000,000," let's say. So you just take transactions, append the nonce into your program. Immediately, you can verify the 18 leading zeros. Once that's done, a new block is added to, in this case, the Bitcoin blockchain. The miner is rewarded in terms of freshly minted Bitcoin for this, and they also collect a small transactions fees. In this technology, there's a limited number of Bitcoin. The Bitcoin caps out at 21 million in the year about 2141 and that's it. The idea is by that point, the founder believed that there'd be sufficient transactions within this network, that very, very small transactions fees would be more than enough to reward the miners. So this is a very interesting technology. Anybody can do the mining. Anybody can do the verification. The network is who you trust, and it's just very secure because of the cost of this so-called proof of work. So to go back and redo history is extremely unlikely.