Welcome back. In this lesson, we'll take a step by step look at how blockchain works in an online transaction. The first step is creating a transaction message and sending it to the blockchain. Say I want to buy a piece of artwork, maybe a painting I saw in an online gallery, to buy it, I would open my wallet app. Say, for example, a Bitcoin wallet. Bitcoin is the most popular cryptocurrency. There are others I could use but I'll keep things simple and go with bitcoin. With my bitcoin wallet, I create a message specifying the amount of bitcoin I want to send to buy the painting. I enter the gallery's public key as where I'm sending that bitcoin to. Then, I use my private key to sign the message verifying that it's me who's sending it. This two-step process is called public-key cryptography. We'll talk more about that in upcoming lessons. Before I send the message, I double-check all the fields. Unlike other payment methods, there's no way to reverse a bitcoin transaction once it's made. Once I double check everything, I broadcast the message to the entire network of computers running the full Bitcoin blockchain. This is where the blockchain works behind the scenes. The computers connected to the blockchain network are known as nodes. Some nodes donate their processing power to solve a math problem associated with a new block. The Bitcoin community calls these people "miners," but it's actually the computers doing all the work. There is no skill involved. Each miner runs the blockchain software like a utility function in the background of their computer. Serious miners invest in high grade and specialized computers to boost their efficiency, but anyone with a computer can do it. Other than the equipment, the software makes mining a level playing field. The math problem itself is untouched by human hands. Not all nodes are mining however. Most of the nodes on the Bitcoin network simply verify data. They send it to peer connections. So, for my art purchase, the network verifies two pieces of data. One, that I have the amount of bitcoin I want to send and two, that it was actually me, Don Tapscott, who authorized the transaction. Then it recognizes my message as a transaction. Once that happens, miners race to order and record the new transactions into a block of data, and each block has to include the digest or hash of the previous block of transactions. A hash is like a fingerprint for a block. It identifies the block and its contents and it's always unique. In making a new block, the software attaches the hash to a random number called the nonce. Miners race to figure it out. The resulting block hash is a complex number with a certain number of zeros at the front of it. Even with all the computers working to solve the problem, it takes about 10 minutes to complete. These computers, or nodes, have to try different nonces until they stumble upon the right value. It's like winning the lottery but there's no skill involved. You can increase your chances by using more or better equipment as I mentioned. Or you can take another time honored way of playing the lottery, the lottery pool. Some people pool their nodes with other nodes. Like co-workers at an office buying lottery tickets together. Then if one of those nodes wins, they all split the reward. So, winning is a matter of luck, processing power, and the size of your mining pool. Before we continue, let's not lose sight of my transaction. Right now, it's still on the Bitcoin network but it hasn't been recorded as a block on the chain yet. It's still being ordered with all the other transactions in the network. The Bitcoin network total processing power is called the hash rate. The higher a network's hash rate, the more difficult it is to find the right nonce. When a miner finds a hash with the correct number of zeros, it shares its proof of work with other miners on the network. Proof of work is a record of the computations that it took to find the nonce. Along with the transactions, this gets included in the new block. Using proof of work to reach consensus in the network is the other big breakthrough in distributed computing. The other miners accept the block by beginning work on the next block which has to include the hash of the newly made block and so on. When everyone has accepted the block solution, the winning miner receives a set quantity of new bitcoins as a reward. The Bitcoin protocols mint the coins and send them to the miner automatically. Then the hashed block is added to the chain. Finally, we get to completing the transaction. Within 10 minutes of my original message, the art gallery and I each receive a confirmation: "Done deal." My transaction creates what's referred to as unspent transaction output. This means the gallery can spend it by doing just what I did: Sending a message, specifying the amount to send, and the address of the recipient, and then authorizing the transaction with their private key. If the artist knew both my public key and the gallery's, she could see that the deal went through and how much I paid. That's why we call it a public ledger. All transactions are transparent, but it's also pseudo-anonymous. Anyone can see my address and the gallery's but there are no names attached. You have to know those names separately to know what you're looking at. Meanwhile, while the artist readies my painting for delivery, more transactions are underway using bitcoin and more and more blocks are being added to the Bitcoin blockchain. Going forward, if you want to see a record of my purchase, it will still be there on the blockchain, verified and unchangeable. Every subsequent block only confirms my purchase. That all sounds a bit complicated. But from the point of view of the artist or me the buyer, it was simple and easy as pie, or it was a piece of cake, if you come out that way on the pie versus cake debate.