Block 10

Nodes, Rules & Consensus

Practical: node validation game, Byzantine generals, invalid block rejection.

Curriculum source adapted from My First Bitcoin Bitcoin Diploma, licensed CC BY-SA 4.0.

Lesson contents

Content plan

Block 10 — Nodes, Rules & Consensus Content Plan

Goal

Turn the relevant My First Bitcoin curriculum content in this block into a practical, interactive learning app.

Canonical practical direction

node validation game, Byzantine generals, invalid block rejection.

Source curriculum copied into this block

  • curriculum-content/4-how-problems-lead-to-solutions/3-the-quest-for-a-decentralized-currency.md
  • curriculum-content/5-what-is-bitcoin/1-how-does-bitcoin-work.md
  • curriculum-content/9-how-does-bitcoin-mining-work/1-bitcoin-nodes-and-miners.md
  • curriculum-content/11-back-matter/3-key-concepts.md

Key concepts to preserve

  • Decentralized coordination
  • Nodes enforce rules
  • Consensus without central authority
  • Invalid block rejection
  • Byzantine coordination framing

Practical app thesis

Node validation game where learners apply rules to blocks, reject invalid attempts, and compare centralized vs decentralized coordination.

Build-ready structure

Each block app should use this structure:

  1. Learn — short explanation adapted from the copied curriculum content.
  2. Try — the practical game/simulator for the block.
  3. Discuss — prompts for facilitators or groups.
  4. Apply — real-world scenario or decision.
  5. Build — printable/classroom extension.

Attribution requirement

Curriculum source adapted from My First Bitcoin Bitcoin Diploma, licensed CC BY-SA 4.0.

Practical app brief

Block 10 — Nodes, Rules & Consensus Practical App Brief

Working title

Nodes, Rules & Consensus

User outcome

Learners should be able to explain the concept by doing something practical, not by memorizing a definition.

Practical game/app

Node validation game where learners apply rules to blocks, reject invalid attempts, and compare centralized vs decentralized coordination.

Core interactions

  • Read a short setup scenario.
  • Make a decision, classification, tradeoff, or transaction.
  • See immediate feedback linked to the curriculum concept.
  • Replay with changed conditions.
  • End with a real-world application prompt.

Curriculum content to use

See CONTENT-PLAN.md and the copied curriculum-content/ folder inside this block.

Minimum viable app

  • One static HTML/CSS/JS page.
  • No backend required.
  • Mobile-first.
  • Works as a standalone GitHub Pages path.
  • Includes attribution to My First Bitcoin.

Curriculum lesson content

The source markdown has been rendered below as learner-readable HTML so the practical app can be built directly from the block page.

curriculum-content/11-back-matter/3-key-concepts.md

Key Concepts

Module 1
Module 2
Module 3
Module 4
Module 5
Module 6
Module 7
Module 8
Module 9
Module 10
curriculum-content/4-how-problems-lead-to-solutions/3-the-quest-for-a-decentralized-currency.md

4.3 The Quest for a Decentralized Currency

We have observed the progressive capture of money by banks and governments throughout history, leading to the fiat system we know today and its disastrous consequences for society. But the rise of new technologies like encryption and the internet have allowed new ideas to emerge, such as independent digital money — free of government intervention, open and accessible to all. Let's dive into the journey of those leading this revolutionary movement: the Cypherpunks.

The Cypherpunks

The computer can be used as a tool to liberate and protect people, rather than to control them.

_Hal Finney_

The second half of the 20th century saw the rise of powerful new technologies like personal computers and the internet. These innovations began to change how people communicate, share information, and organize society.

Some thinkers and programmers realized that these technologies could either increase individual freedom or allow governments and corporations to monitor and control people more easily.

This group became known as the Cypherpunks. They believed that cryptography, the use of mathematical code to secure information, could protect individual freedom in the digital age.

Cypherpunks worked on tools that could protect privacy online, secure communications, and allow people to interact on the internet without relying on centralized authorities.

One of their key goals was to create a form of digital money that people could use without banks or governments controlling it. Bitcoin was later created as a solution to this problem.

Definition – Definition of an orwellian future

Orwellian future refers to a dystopian society where a powerful authority, usually the government, closely controls people’s lives. In such a world, citizens are constantly watched, information is manipulated, and speaking against those in power can lead to punishment. Personal freedoms are limited, and the truth is often distorted to maintain control over the population.

Key figures in the Cypherpunk movement included Eric Hughes, Timothy C. May, and John Gilmore. In 1992, Eric Hughes wrote _A Cypherpunk Manifesto_, which argued that people should have the right to privacy and control over their digital lives.

Cypherpunks believed cryptography could protect individuals online. In 1991, Phil Zimmermann created PGP (Pretty Good Privacy), a tool that allowed people to send encrypted emails so that only the intended recipient could read them.

They believed encryption, combined with the internet and computers, could allow people to communicate and interact online without relying on central authorities.

However, one major problem remained unsolved: the world still lacked a decentralized digital currency that people could use freely on the internet.

Centralized vs Decentralized Systems
Centralized Systems

In a centralized system, everything revolves around one main authority, like a tall building in a city. This authority controls how the entire system works. Think of traditional banks as an example, where a small group makes all the decisions.

Problems with Centralized Systems

Note

In 2022, during peaceful protests in Canada, banks froze protestors' accounts, showing how a central authority could control financial access.

Decentralized Systems

Think of a decentralized system like a forest. Each tree is a separate part, and the whole forest is the system. Unlike a city with one central point, a decentralized system is more resilient and can keep going even if one part fails.

Benefits of Decentralized Systems

While decentralized systems have lots of advantages, making decisions together can be a bit tricky. It requires everyone to work together.

In a world of centralized and decentralized systems, it's all about who holds the power. Centralized systems give power to a small group, while decentralized systems spread it out, letting everyone have a say. This shift in power would mean a fairer future, where many people influence the system that shapes their lives.

Note

The Tor Network create a decentralized system where people can stay anonymous online and the network is hard to stop or censor.

Brief History of Digital Currencies

One of the key ideas discussed by the Cypherpunks was digital cash. They believed money should be separated from government control so people could send and receive payments freely and privately online.

Early cryptographer David Chaum created one of the first systems for digital cash using cryptography to make transactions secure and private. However, his system still relied on a central authority to operate, which meant it could fail or censor transactions.

Over the following decades, many Cypherpunks tried to design a form of digital money that did not depend on a central authority. While they introduced important innovations, none of their systems solved all the challenges needed for a secure, decentralized, and widely usable digital currency.

These attempts helped reveal what was missing. Later, someone built on these ideas and finally created a working system for decentralized digital currency.

Resources

▶ YouTube

curriculum-content/5-what-is-bitcoin/1-how-does-bitcoin-work.md

5.1 How Does Bitcoin Work?

The Nakamoto Consensus Mechanism

So, how does Bitcoin work? Bitcoin has lots of features, and the rabbit hole goes deep — very deep. Fortunately, if you're entering the Bitcoin world for the first time, you do not have to perfectly understand how it works to start using it.

The same is true for the internet: most people do not know how the TCP/IP protocol works, yet they send emails and messages, and post content on their social media every day. It's just like driving a car — most people do not know exactly how a car works, yet they do know how to drive.

Callout – Bitcoin is not widely adopted yet

Bitcoin is not widely adopted yet. It is still a pretty new technology, like the internet was during the 90s. Because of this, it can be helpful to focus on the fundamentals of Bitcoin, rather than on its technical aspects.

The key idea behind how Bitcoin operates can be condensed into one sentence: Bitcoin is a common set of rules agreed to by all network participants. You can think about it as playing a board game with friends. In a game like Monopoly, you are in agreement with the other players about specific rules. One of the rules of Monopoly is that only special “Monopoly bills” are to be accepted. If James (one of the players) decided against the rules to use toilet paper instead of Monopoly bills to buy a house, the other players would tell James he is a cheater and would simply stop playing with him. In short, to play the game, you need consensus on a set of rules and to agree with each other not to deviate from those rules, or you will be rejected.

This is essentially how Bitcoin works. Bitcoin is a network of people that agree on the same set of rules. These rules are mathematically bound, written in computer code, and accepted directly by everyone who runs the Bitcoin software. The rules of Bitcoin apply to all participants equally, which means that each player either follows the rules of the game or cannot play because the network will reject them.

For example, one of the rules of Bitcoin is "There will never be more than 21 million bitcoin." If someone were to create a million extra bitcoins for themselves, it would be of no use to them, because they would automatically be identified and rejected by everyone else. This is what makes Bitcoin so robust.

Info

It does not matter who you are or where you come from: if you enter the Bitcoin world, you must play by the same set of rules as everyone else.

This also applies to all the people and entities with disproportionate influence in the fiat world. In the Bitcoin world, there is no room for cheating or sabotage — everyone is treated equally, and no one can change that.

Callout

Did you know that, since 2009, Bitcoin has withstood tens of thousands of attempts to hack, tamper with, or alter it? Bitcoin has consistently proven that nobody can stop, control, or manipulate it.

The Players of the Game

To better understand the decentralization of Bitcoin, we need to dive deeper into the different roles within the network. In the Bitcoin world, various participants play distinct yet harmonious roles, contributing to the protocol's seamless functioning.

1. Miners: The Architects of Security

Miners are the backbone of Bitcoin. They work behind the scenes to maintain and secure the network through a mechanism called Proof-of-Work (PoW).

These players are armed with special computers that boast heavy computational power. They make this power available to the Bitcoin network, competing with each other in a worldwide lottery to add new blocks of transactions to Bitcoin’s decentralized ledger (the blockchain). Their commitment ensures the the ledger's immutability and guards against malicious attacks.

The decentralized nature of mining means that anyone can participate — in practice, however, competition is fierce. As a reward for their contribution, the first miner who solves the puzzle is rewarded in the form of new bitcoin, an incentive known as the block reward.

Bitcoin miners are distributed all over the world, safeguarding the network against centralization and ensuring Bitcoin's security stays robust and distributed.

2. Nodes: Gatekeepers of Validation

Bitcoin Nodes

Bitcoin nodes are run by ordinary people across the planet. These participants serve as the Bitcoin network's gatekeepers by running Bitcoin software on their computers on which they keep a copy of the entire ledger. Nodes validate transactions and ensure that all participants adhere to the consensus rules.

By distributing the responsibility of validation across a network of nodes, Bitcoin remains resilient against attacks and maintains its trustless nature. Nodes play a crucial role in upholding the integrity of the ledger, contributing to the Bitcoin's decentralization ethos.

3. Users: Empowered Participants

Users — the lifeblood of the Bitcoin network — are individuals who engage in transactions. You can think of users as regular people who just have empowered themselves by integrating Bitcoin into their lives. For example, some users save their money in bitcoin while others use it as money to buy groceries and receive their salary.

Bitcoin empowers users by eliminating the need for intermediaries like banks and governments, allowing for direct peer-to-peer transactions. This also means that users have full control over their money and transactions.

4. Developers and Projects: Architects of Innovation

The monetary system of the future won't build itself, nor will it be globally adopted in an ethically correct way without effort. That’s where Bitcoin developers and projects come into play. Developers wield their technical expertise to enhance and innovate on the Bitcoin protocol. These individuals contribute code, propose improvements, and address vulnerabilities, ensuring the network evolves in response to all types of challenges. Bitcoin's open-source nature invites collaboration, allowing developers worldwide to contribute to its growth.

The beauty of this decentralized development prevents a single entity from monopolizing control over the protocol. This happens through a consensus-driven process. Developers propose ideas and changes, and only those with the best ideas who are aligned with the broader vision for a better world receive support from the community, empowering Bitcoin's transparent and democratic evolution as it scales to 8 billion people.

Bitcoin projects involve diverse groups, from mission-driven nonprofits and corporations to groups and individuals who create valuable content. These people work together on a specific goal or focus within the bigger Bitcoin mission toward collective freedom. Bitcoin projects play a crucial role in shaping and promoting the adoption of Bitcoin, working toward a future that prioritizes the empowerment and freedom of the human race.


The Symphony

Bitcoin's decentralization can be thought of as a synergetic orchestra, a balancing act where all the different musicians make the most beautiful music together. There is no boss in the Bitcoin network: miners, nodes, users, developers, and projects perform their roles with autonomy and collaboration.

The decentralized ledger, maintained by nodes, guarantees transparency, while the proof-of-work mechanism provides security and deters centralization in mining; users experience financial sovereignty and empowerment, free from the control of the fiat system; developers, guided by consensus, ensure the protocol adapts to meet the evolving needs of humanity; Bitcoin projects, in their own unique ways, contribute to the broader mission of collective freedom.

Each participant in this decentralized orchestra plays a vital role in shaping Bitcoin's adoption and empowering humanity, contributing to the resilience and longevity of Bitcoin and creating a trust-free, borderless and empowering ecosystem.

Callout – Summary

The symphony of decentralization in Bitcoin resonates as a testament to Satoshi Nakamoto's vision and the immense passion of a global community seeking freedom and empowerment.

Networks


Activity: Consensus

https://qr.myfirstbitcoin.org/consensus.pdf

This is a class exercise where participants learn firsthand how difficult synchronizing actions is in a group without a defined leader. The intent is for participants to understand how agreement (consensus) is achieved in Bitcoin.

Key Points
  1. Consensus = agreement
  2. One big difference between a group with centralized control and one without is the question of trust. Decentralized groups like peer-to-peer networks do not have a leader and participants do not trust each other. They require a different way to coordinate.
  3. For developers of peer-to-peer networks, this is known as the Byzantine Generals Problem. Bitcoin solves this challenge with math and proof-of-work mining.
  4. Bitcoin being decentralized is critical to its value. Historically, human leaders always succumb to the temptation to debase money over the long term.
  5. The Nakamoto Consensus is named after the creator of Bitcoin, Satoshi Nakamoto. This consensus mechanism is how thousands of strangers who do not trust each other have maintained the Bitcoin ledger since 2009.
curriculum-content/9-how-does-bitcoin-mining-work/1-bitcoin-nodes-and-miners.md

9.1 Bitcoin Nodes and Miners

Bitcoin nodes may sound technical, but they are simply software that keeps a copy of the Bitcoin blockchain on a computer. The blockchain is a shared record of all Bitcoin transactions.

When you run your own node, you verify Bitcoin transactions yourself instead of trusting someone else. This gives you more independence and helps keep the Bitcoin network decentralized.

You can think of a Bitcoin node as a digital traffic officer with a few important jobs.

First, it keeps a copy of the blockchain, which is the history of all Bitcoin transactions.

Second, nodes connect with other nodes around the world and share information. One example is the list of new transactions waiting to be confirmed, which is called the mempool.

Third, nodes check that every transaction follows Bitcoin’s rules. If a transaction is invalid, the node rejects it.

Nodes also help new nodes join the network by sharing the blockchain with them. However, every new node still checks all the rules independently.

Anyone can run a node by installing software such as Bitcoin Core and downloading the blockchain. Once it is set up, the node continues to receive new blocks roughly every 10 minutes and verifies them before adding them to its copy of the blockchain.

Running a node helps make the Bitcoin network more secure and decentralized, because more people are independently verifying the system.

What Is a Bitcoin Node?

The purpose of mining is not the creation of new bitcoin; that’s the incentive system. Mining is the mechanism by which Bitcoin’s security is decentralized.

_Andreas M. Antonopoulos_

Callout

Miners collect unconfirmed transactions, form a block, and use energy to find a key that adds and secures the block.

Miners compete to add the next block of transactions to the blockchain. To do this, they must find a special number that creates a valid block hash. You can imagine it like searching for the right key among billions of possibilities. The first miner to find the correct hash wins the race and earns the right to add their block to the blockchain.

When a miner finds a valid hash, they share their block with the network. Other miners quickly verify that the solution is correct. If it is, the block is added to the blockchain, helping keep Bitcoin’s public ledger secure.

Miners earn bitcoin in two ways:

Bitcoin Halvings
20092012201620202024
50 BTC25 BTC12.5 BTC6.25 BTC3.125 BTC

Callout

Miners’ rewards for completing one block halve every 210,000 blocks, about every four years.

Bitcoin has a fixed maximum supply of 21,000,000 bitcoin, but all of them were not created when Bitcoin started. Instead, new bitcoin are gradually introduced into circulation through mining.

When miners successfully add a new block of transactions to the Bitcoin network, they receive a block reward in bitcoin. In the early days of Bitcoin, this reward was 50 bitcoin per block. This reward encouraged people to use computing power and electricity to help secure the network.

About every 210,000 blocks (roughly every 4 years), the block reward is cut in half. This event is called the halving. The halving slows down the creation of new bitcoin and helps ensure that the total supply will never exceed 21 million. Over time, this makes bitcoin increasingly scarce.

Definition – Circulating supply

Circulating supply refers to the total available amount of a currency. With Bitcoin, the total circulating supply is the number of coins that have been mined and are incirculation at any given time.

Definition – Bitcoin supply schedule

The Bitcoin supply schedule is the predetermined and public plan for the release of new bitcoin into circulation, designed to maintain Bitcoin’s scarcity over time.

 Bitcoin Supply Schedule

After each halving event, the bitcoin reward that miners receive for adding a block is cut in half. This reduces the rate at which new bitcoins are created.

Miners still earn transaction fees from the transactions included in the block they mine. Over time, these fees are expected to become a larger part of miners’ income.

Halvings are built into the Bitcoin protocol and happen automatically about every four years. Because of this, Bitcoin’s supply schedule is predictable and transparent.

The table below shows upcoming halvings, including the approximate date, the block number when they occur, the new block reward, and the percentage of the total bitcoin supply that will have been mined.

EventDateBlockRewardMined
5th Halving20281,050,0001.5625 BTC98.44 %
6th Halving20321,260,0000.78125 BTC99.22 %
7th Halving20361,470,0000.390625 BTC99.61 %

As more bitcoin are mined, the circulating supply keeps increasing until the maximum supply of 21,000,000 bitcoins is reached, which is expected around the year 2140. Because fewer new bitcoins are created over time, if demand increases, the price of Bitcoin can rise. This also encourages miners to keep securing the network by contributing their computing power.


What is a valid block hash in Bitcoin?

In Bitcoin, miners compete to find a special code called a block hash. This code identifies a block of transactions and allows it to be added to the blockchain.

Each block contains information about recent transactions and also includes the hash of the previous block. This links every block together, forming a chain from the very first block (the Genesis Block) to the most recent one.

A hash works like a digital fingerprint for the data in the block. If any information in the block were changed, the fingerprint would change as well. This makes it easy for anyone to verify that the blockchain’s transaction history has not been altered and helps keep the network secure.

Callout

Satoshi Nakamoto, the creator of Bitcoin, mined the Genesis Block, which unlocked a total of 50 bitcoin.

The Race to Mine a Block

Miners compete to find a valid block hash. The first miner to find one gets to add the new block to the blockchain and receive a bitcoin reward.

To be valid, the block’s hash must be lower than a number set by the network called the difficulty target. Because hashes are random, miners must keep trying different inputs until they find one that works.

If too many miners are competing, blocks would be found too quickly. If too few miners are participating, blocks would take too long to find. To keep the system running smoothly, Bitcoin automatically adjusts the difficulty every 2,016 blocks (about every two weeks).

This adjustment ensures that, on average, a new block is added to the blockchain about every 10 minutes.

Definition – Definition of difficulty level

The difficulty level in Bitcoin mining measures how hard it is to find a valid block hash. The network adjusts this difficulty every 2,016 blocks (about every two weeks) so that new blocks are added to the blockchain about every 10 minutes. The higher the difficulty, the harder it is for miners to find a valid block.

Info

By finding a valid block hash, a miner proves they have done the work required to add a new block to the blockchain. This process is called Proof of Work (PoW). It is the security mechanism that allows Bitcoin to confirm transactions and add new blocks to the blockchain. The miner who finds the valid hash first earns a reward in bitcoin, which includes the block reward and the transaction fees from the transactions included in that block.

Proof of Work (PoW) helps keep Bitcoin secure by making it extremely expensive for anyone to try to cheat or take control of the network. Instead, it is far more profitable to follow the rules.

Miners play four main roles:

  1. Collect transactions: Miners choose transactions that have been sent to the network and place them into a candidate block.
  2. Perform Proof of Work: Miners compete to solve a difficult mathematical puzzle by finding a valid block hash.
  3. Broadcast the block: The first miner to find a valid solution shares the new block with the network.
  4. Earn rewards: If the block is valid, it is added to the blockchain and the miner receives newly created bitcoin plus transaction fees.

Many miners around the world try to create the next block at the same time. When one miner finds a valid solution, the network checks the block. If everything is correct, it is added to the blockchain. Other competing blocks are discarded. This process keeps the network in agreement and prevents double-spending.