Blockchain Technology
Beyond cryptocurrencies, blockchain is a revolutionary method of storing and sharing data. It provides a decentralized, transparent, and immutable ledger that ensures trust without needing a central authority.
Learning Objectives
- 11.1.2.5 Explain the principles of blockchain technology
Expert Explanation: The Blockchain Process
Conceptual Anchor
The Public Ledger Analogy
Imagine a traditional bank: the bank keeps a private notebook (ledger) of all transactions. You
must trust the bank not to alter it.
Now, imagine a town square where everyone has an identical copy of the notebook. Every time a
transaction happens, it is announced publicly. Everyone writes it down. If someone tries to
cheat and change their notebook, the town compares copies and rejects the fake one. This is a
Distributed Ledger.
Rules & Theory
Network Architectures
To understand blockchain, we must understand the shift from centralized systems to distributed ledgers.
Comparing Centralized, Decentralized, and Distributed Networks.
Centralized
All nodes connect to a single central server. If the server fails, the entire network goes down.
Decentralized
Nodes connect to several main hubs. No single central authority, but still relies on large hubs.
Distributed
Every node connects to other nodes (P2P). Data is shared across all nodes. Highly fault-tolerant.
Key Characteristics of Blockchain
| Feature | What it means | Why it matters |
|---|---|---|
| Distributed | Data is copied across a P2P (Peer-to-Peer) network of computers (nodes). | No single point of failure. If one node goes offline, the network survives. |
| Immutable | Once data is recorded in a block, it cannot be altered or deleted. | Creates permanent, tamper-proof records for auditing and trust. |
| Transparent | Anyone on the network can view the transaction history. | Prevents fraud, as all participants verify the same truth. |
Anatomy of a Block
A blockchain is literally a chain of blocks. Every block contains three fundamental elements:
- Data: The information being stored. In Bitcoin, this is transaction details (Sender, Receiver, Amount). In healthcare, it could be medical records.
- Hash: The block's unique digital fingerprint (often using the SHA-256 algorithm). It is calculated based on the Data inside the block. If a single bit of Data changes, the entire Hash changes completely.
- Previous Hash: The hash of the block that came immediately before it. This is what mathematically "chains" the blocks together.
The Genesis Block
The very first block in a blockchain is called the Genesis Block. It is unique because it is the only block that has a "Previous Hash" of 00000000..., as there is no preceding block.
How Transactions Work
- Request: A user requests a transaction (e.g., sending money, transferring a digital asset).
- Broadcast: The request is broadcast to a P2P network of computers (nodes).
- Validation: The nodes use algorithms to validate the transaction and the user's status.
- Creation: Once verified, the transaction is combined with other transactions to create a new block of data.
- Chaining: The new block is added to the existing blockchain in a way that is permanent and unalterable.
- Completion: The transaction is complete.
Consensus Mechanisms
Because there is no central server, nodes must agree on which block is valid before adding it. This is called a Consensus Mechanism.
| Mechanism | How it works | Pros & Cons |
|---|---|---|
| Proof of Work (PoW) (e.g., Bitcoin) |
Nodes ("miners") compete to solve complex mathematical puzzles to validate a block. | Pro: Extremely secure. Con: Consumes massive amounts of electricity and computing power. |
| Proof of Stake (PoS) (e.g., Ethereum 2.0) |
Nodes ("validators") are chosen to validate blocks based on the amount of cryptocurrency they "stake" (lock up) as collateral. | Pro: Energy-efficient, faster. Con: Risk of centralization (those with the most wealth have the most control). |
Worked Examples
1 Tracking a Diamond (Supply Chain)
Scenario: A jewelry company wants to prove their diamonds are ethically sourced (conflict-free).
Blockchain Solution:
- Block 1 (Mine): Records when and where the diamond was mined.
- Block 2 (Cutter): Records who cut the diamond.
- Block 3 (Jeweler): Records the creation of the ring.
- Result: A customer can scan a QR code and see the entire, unalterable history of the diamond. No middleman can fake a certificate because the history is verified by the network.
2 The Hacker Scenario (Immutability in Action)
Scenario: A hacker tries to alter Block #42 to show that someone sent them 100 Bitcoin.
Analysis:
- If the hacker changes the Data in Block #42, the Hash of Block #42 immediately changes.
- Block #43 still contains the old "Previous Hash". Because they no longer match, the link is broken. Block #43 (and all subsequent blocks) become invalid.
- To succeed, the hacker would need to recalculate the hashes for Block #42, #43, #44, and every single block to the end of the chain.
- Simultaneously, they would need to take control of over 50% of the entire P2P network (a 51% Attack) to force the network to accept their tampered chain. On large blockchains, this requires mathematically impossible computing power.
Common Pitfalls
Blockchain = Cryptocurrency
Many people think Blockchain and Bitcoin are the same thing. Bitcoin is an application that uses blockchain technology. Blockchain itself is just the underlying database structure. It can be used for voting systems, medical records, supply chains, and legal contracts (Smart Contracts).
Tasks
What are the three main components of a block in a blockchain?
Explain how the "Previous Hash" secures the blockchain against tampering.
A hospital wants to use a distributed ledger to store patient medical records. Describe two benefits this provides over a centralized database.
Compare Proof of Work (PoW) and Proof of Stake (PoS). Why might an organization choose PoS over PoW for a new enterprise blockchain?
Self-Check Quiz
Q1: What does P2P stand for in the context of blockchain?
Q2: What happens to the hash of a block if you change just one character of data inside it?
Q3: True or False: You need a central bank to verify a blockchain transaction.
Q4: What is the name of the very first block in a blockchain?