Unit 8: Reaching Consensus
Bitcoin transactions are signed, broadcast to the network, determined to be valid or invalid by nodes, and via the mining process, join the blockchain. This system is very carefully crafted to prevent fraud on the network without a central authority. How does a decentralized system decide who's transactions are valid? What happens if the same Bitcoin is sent to different people at the same time? How does the network come to an agreement on conflicting data? How is this process updated or changed? These questions are answered in this unit as you'll learn more about the mining process and the details of how consensus is achieved and maintained.
Completing this unit should take you approximately 3 hours.
Upon successful completion of this unit, you will be able to:
- understand the transaction validation process;
- explain how Bitcoin is updated while maintaining consensus;
- explain how "double spends" are prevented; and
- summarize the Bitcoin mining process and how consensus is achieved.
8.1: Elements of Valid Transactions
Now that we've learned about transactions and scripting, let's review the transaction validation process. This video walks through the checks that each validating node runs on all the transactions that it sees. Watch from the start until 6:37.
8.2: The Mining Process
Mining is essential to Bitcoin's decentralized consensus process. As we touched on in Unit 1, this process is how we prevent "double spends", how we determine who has what when, and how we decide on the "truth" on the network without any one entity being in charge of the process. This video walks through the mining process in detail. Watch from the beginning through 28:46.
8.3: Consensus
Now, we'll switch gears a bit from mining to the larger process of consensus. Here, we'll cover validating new blocks, the validation process, and blockchain difficulties such as forks.
Mining isn't just about mining rewards and preventing double spends; there are a variety of ways that confusion can occur on a decentralized network. The consensus process is about working through these issues. Let's continue by watching this presentation on mining and consensus and learn more about the technology being used and how the software works through problems such as which chain to follow in a fork. Watch from 28:47 through to 51:07.
To wrap up this section, we'll cover the possible attacks on a blockchain network and how they are mitigated.
8.4: Updating Consensus
Avoiding double spends, confusion, forks, and attacks, aren't the only complexities of a decentralized consensus mechanism, what happens when you want to update the consensus rules? How to you change a protocol that no one controls? In the last part of Chapter 10 we'll read through the various mechanisms for updating the the Bitcoin code and consensus rules. Read the Chapter 10 from "Changing the Consensus Rules" till the end.
8.5: Exercise: Create a Valid Transaction via Your Testnet Node
Now that we understand the major elements of consensus, let's learn where to dig up data on these factors and have a look at them.