Chapter 1 Exercises
Section A: Conceptual Questions
Exercise 1.1 — Byzantine Generals Variations
The classic Byzantine Generals Problem assumes that messages between generals are delivered reliably (they arrive, and they are not altered in transit). The problem is only that generals themselves may be traitors.
(a) How does the problem change if messages can also be lost or delayed? Describe a specific scenario with four generals (one traitor) where message loss causes the loyal generals to disagree, even if the algorithm would have worked with reliable message delivery.
(b) In the original formulation, traitors can send different messages to different generals. What if traitors can also forge the signatures of other generals? (That is, General B receives a message that appears to come from General A, but was actually crafted by traitorous General C.) How does this change the difficulty of the problem?
(c) Lamport, Shostak, and Pease proved that consensus requires more than two-thirds of participants to be honest (i.e., the system can tolerate fewer than one-third traitors). Explain intuitively why one-third is the threshold. Consider what happens when exactly one-third of generals are traitors: can a loyal general distinguish between a scenario where a message comes from a traitor and a scenario where it comes from a loyal general relaying a traitor's message?
Exercise 1.2 — Mapping the Metaphor
For each element of the Byzantine Generals Problem, identify the corresponding element in a blockchain network:
| Byzantine Generals | Blockchain Network |
|---|---|
| A general | ? |
| A messenger | ? |
| The battle plan (attack/retreat) | ? |
| A traitor sending conflicting messages | ? |
| Loyal generals reaching agreement | ? |
| The rule for deciding the plan | ? |
Explain why each mapping is appropriate and where the analogy breaks down.
Exercise 1.3 — The Double-Spending Problem
Alice has one bitcoin and attempts to send it to both Bob and Carol simultaneously.
(a) In a centralized system (like a bank), explain the exact mechanism that prevents this double-spend. What data does the bank check? What happens to the second transaction?
(b) In Bitcoin, both transactions are broadcast to the network. Explain, conceptually, how the network resolves this conflict. (You do not need to describe the technical details of mining — we will cover that in Chapter 4. Focus on the logic: why can only one of the two transactions survive?)
(c) Suppose Alice controls 60% of the network's computing power. Can she successfully double-spend? Why or why not? What does this imply about the security assumptions of proof-of-work systems?
Exercise 1.4 — Defining Trust
The word "trustless" is commonly used to describe blockchain systems, but it is misleading.
(a) List at least five things a Bitcoin user must still trust for the system to work as intended. Consider the software, the protocol, the network, the cryptography, and the broader environment.
(b) A more accurate term might be "trust-minimized" or "trust-distributed." For each trust assumption you identified in part (a), explain how the trust is distributed rather than eliminated. Who or what bears the trust in each case?
(c) Write a paragraph arguing that the trust assumptions in a blockchain system are more reasonable than those in a traditional banking system. Then write a paragraph arguing the opposite. Evaluate which argument you find more compelling and why.
Section B: Applied Analysis
Exercise 1.5 — Does This Need a Blockchain?
For each of the following proposed applications, apply the decision framework from this chapter. Evaluate all four conditions explicitly:
- Are there multiple parties who need to share data?
- Can those parties not (or will they not) trust a single intermediary?
- Does the data need to be tamper-evident?
- Does the value of decentralization exceed its cost?
For each application, provide: (i) your evaluation of each condition (met/not met/ambiguous), (ii) a clear verdict (blockchain appropriate / not appropriate / depends on specifics), and (iii) a two-to-three-sentence justification. If you believe the answer is "depends," specify what additional information you would need to decide.
(a) A hospital network with five independent hospitals wants to share patient records so that a patient who visits any hospital in the network can have their full medical history available. The hospitals are competitors and do not fully trust each other to maintain accurate records.
(b) A single coffee shop wants to implement a digital loyalty card system (buy 10 coffees, get 1 free). The shop owner wants to prevent customers from forging stamps.
(c) A consortium of diamond mining companies, shipping companies, jewelers, and certification bodies wants to track the provenance of diamonds from mine to retail sale, ensuring conflict-free sourcing.
(d) A university wants to issue tamper-proof digital diplomas that graduates can share with employers, who can verify them without contacting the university.
(e) A social media platform wants to prevent the company from censoring user posts. Users want a guarantee that once content is published, it cannot be removed by any single party.
(f) A ride-sharing service wants to match drivers with riders. Currently Uber and Lyft take a 25-30% commission. A blockchain-based alternative could reduce this by removing the intermediary.
(g) An international aid organization distributes food vouchers to refugees. The organization wants to ensure vouchers are not duplicated, that aid reaches intended recipients, and that the distribution process is auditable by donor nations.
(h) A group of independent farmers in a developing country wants to create a shared record of land ownership. The government's official land registry is unreliable — records have been lost, altered by corrupt officials, and disputed in court for decades. Multiple NGOs, local government offices, and international development organizations would use the system.
(i) A sports betting company wants to use blockchain to prove that bet outcomes are determined fairly (provably fair gambling). Users currently must trust the company's random number generator.
(j) A group of 50 independent art galleries wants to jointly maintain a provenance registry for artworks, tracking ownership history from artist to current holder. Galleries sometimes dispute provenance claims, and fraud (fake provenance to inflate value) is a significant problem in the art market.
Exercise 1.6 — Analyzing Failure Modes
For each of the failed digital currency systems discussed in this chapter, identify the specific failure mode:
(a) DigiCash: What was the technical architecture? What was the business model? Why did the company fail despite having superior technology?
(b) e-gold: What made e-gold attractive to criminals? Could the same technology have succeeded with different operational choices (e.g., requiring identity verification)?
(c) Liberty Reserve: In what ways was Liberty Reserve similar to, and different from, Bitcoin? Why was Liberty Reserve's founder imprisoned while Bitcoin continues to operate legally in most jurisdictions?
(d) For each of these three systems, identify the single point of failure — the specific entity or component whose compromise or shutdown killed the system. Explain why Bitcoin does not have an equivalent single point of failure (or argue that it does, if you believe so).
Section C: Research Exercises
Exercise 1.7 — Reading the Bitcoin Whitepaper
The Bitcoin whitepaper ("Bitcoin: A Peer-to-Peer Electronic Cash System" by Satoshi Nakamoto, 2008) is freely available online and is only nine pages long. Read it and answer the following questions.
(a) The abstract mentions "a peer-to-peer distributed timestamp server." What is a timestamp server, and why is timestamping relevant to the double-spending problem?
(b) Section 2 describes transactions as a "chain of digital signatures." Draw or describe the chain for a bitcoin that has been transferred from Alice to Bob to Carol. What does each participant sign? What does each recipient verify?
(c) Section 4 introduces proof of work. In your own words (not Satoshi's), explain why proof of work is necessary. What would happen if blocks could be created without computational cost?
(d) Section 11, "Calculations," presents a probabilistic analysis of how likely an attacker is to catch up with the honest chain. Summarize the key conclusion: how does the probability of a successful attack change as more blocks are added after a transaction?
(e) The whitepaper does not mention the word "blockchain." When and how did this term enter common usage? (This requires external research.)
Exercise 1.8 — The Cypherpunk Legacy
Research the Cypherpunk's Manifesto by Eric Hughes (1993). It is a short document, available freely online.
(a) Hughes distinguishes between "privacy" and "secrecy." What is the distinction he draws? Why does he argue that privacy is necessary for an open society?
(b) Hughes writes: "Cypherpunks write code." What does he mean by this? How does this philosophy relate to the development of Bitcoin and other open-source cryptographic systems?
(c) Identify three specific technologies or systems that the cypherpunk movement directly produced or influenced (beyond Bitcoin). For each, briefly describe what it does and how it relates to the movement's goals.
Section D: Discussion and Debate
Exercise 1.9 — Steel-Manning Both Sides
A "steel man" is the opposite of a straw man: it is the strongest possible version of an argument you may disagree with.
(a) Steel-man the argument that cryptocurrency and blockchain technology represents a genuine technological innovation that will have lasting, positive impact on finance, governance, and technology. Present the three strongest points in favor of this position.
(b) Steel-man the argument that cryptocurrency is primarily a speculative bubble and that blockchain technology solves very few real problems more effectively than existing solutions. Present the three strongest points in favor of this position.
(c) After writing both, identify which specific claims in each argument are empirically testable (i.e., we can look at evidence to evaluate them) versus which are value judgments (i.e., they depend on what you prioritize). What evidence would you need to settle the empirically testable claims?
Exercise 1.10 — The Decentralization Spectrum
This chapter claims that "decentralization is a spectrum, not binary." Investigate this claim.
(a) Define what "decentralized" means in at least three different dimensions: architecture (where are the servers?), governance (who makes decisions about protocol changes?), and economic (who holds the tokens or mining power?). A system can be decentralized in one dimension and centralized in another.
(b) Evaluate Bitcoin on each of your three dimensions. Is it fully decentralized in each? If not, identify the centralizing forces. (For example: How many mining pools control the majority of hash rate? How are protocol changes decided? What is the distribution of bitcoin holdings?)
(c) Evaluate a system you use daily (a social media platform, a banking app, a messaging service) on the same three dimensions. How decentralized is it? Would it benefit from more decentralization? What would be the costs?
Exercise 1.11 — Historical Counterfactuals
(a) Suppose DigiCash had succeeded commercially in the late 1990s and ecash had become the dominant online payment system. How might this have changed the development of e-commerce, online advertising (which relies on tracking users), and surveillance capitalism? Would Bitcoin still have been created? Why or why not?
(b) Suppose the Bitcoin whitepaper had been published in 1998 instead of 2008 — the same time as b-money and BitGold. Would it have succeeded? What conditions in 2008 (the financial crisis, the state of internet infrastructure, the maturity of peer-to-peer networks) were necessary for Bitcoin's adoption?
(c) The 2008 financial crisis is often cited as context for Bitcoin's creation. The genesis block even references a bank bailout headline. But Satoshi had been working on Bitcoin before the crisis peaked. Do you think the financial crisis was necessary for Bitcoin's adoption, or was it merely coincidental? What evidence would support each position? Consider the role of economic sentiment, media coverage, and distrust of financial institutions in Bitcoin's early community.
Section E: Code Exercises
Exercise 1.12 — Exploring Hash Properties
These exercises require running Python code. If you have not used Python before, install Python 3.8+ from python.org and run the scripts from the command line with python hash_example.py. No external libraries are needed.
Using the code/hash_example.py file as a starting point:
(a) Modify the program to hash 100 sequential integers (0 through 99). For each pair of consecutive hashes, count how many hexadecimal characters differ. What is the average number of character differences? How does this relate to the avalanche effect?
(b) Implement a brute-force search for a "partial collision" — two different inputs whose SHA-256 hashes share the same first N hexadecimal characters. Start with N=1 (easy), then try N=2, N=3, and N=4. How does the search time scale as N increases? Can you predict how long N=8 would take?
(c) Modify the program to use MD5 (a weaker hash function) instead of SHA-256. Research why MD5 is considered insecure for cryptographic purposes. Does it still exhibit the avalanche effect?
Exercise 1.13 — Tamper Detection in Linked Blocks
Using the code/linked_blocks.py file:
(a) Add a validate_chain() function that checks every block in the chain and returns True if the chain is valid (all hash links are correct) or False if any block has been tampered with. Test it by modifying a block's data and verifying that validation fails.
(b) Add a find_tampered_block() function that not only detects tampering but identifies which specific block was modified. Return the index of the first tampered block.
(c) Modify the block structure to include a timestamp (the time the block was created). Then modify the validation function to also check that timestamps are in chronological order. Why might timestamp ordering be important in a real blockchain?
(d) Currently, anyone can create a block. Add a simple proof-of-work requirement: the hash of each block must start with "00" (two zeros). Modify the Block class to include a nonce and a method that increments the nonce until the hash meets the requirement. How many attempts does it take on average? What happens if you require three leading zeros? Four?
Exercise 1.14 — Building a Transaction
Extend the linked blocks implementation to include transactions instead of arbitrary data strings.
(a) Define a Transaction class with fields for sender, receiver, and amount. Modify the Block class to hold a list of transactions instead of a single data string.
(b) Add a function that computes the balance of any participant by scanning the entire chain and summing up all transactions involving that participant.
(c) Add validation logic that rejects a block if any transaction would result in a negative balance for the sender (i.e., the sender is trying to spend more than they have). This is a simplified version of transaction validation in real blockchain systems.
(d) Add a special "coinbase" transaction type that creates new coins (similar to how Bitcoin mining rewards work). The coinbase transaction has no sender — it creates coins from nothing and awards them to a specified recipient. Modify your balance function to account for coinbase transactions. Then create a chain where: (i) a coinbase transaction creates 50 coins for Alice, (ii) Alice sends 30 to Bob, (iii) Bob sends 10 to Carol, and (iv) verify that all balances are correct (Alice: 20, Bob: 20, Carol: 10).
(e) Add a to_dict() method to your Transaction class and a to_json() method to your Blockchain class that exports the entire chain as a JSON string. Verify that you can reconstruct the chain from the JSON representation. This serialization capability is essential for transmitting blockchain data over a network — something we will explore in Chapter 3.
Section F: Progressive Project Milestone
Exercise 1.15 — Decentralized Ballot Box: Problem Statement
Write a one-page (approximately 500-word) problem statement for the Decentralized Ballot Box project. Your problem statement should:
- Describe a specific community or organization that would use the system (you may use the HOA example from the chapter or choose your own).
- Identify at least three specific problems with the current (centralized) voting process used by that community.
- For each problem, explain how a blockchain-based system could address it.
- For each proposed blockchain solution, identify at least one new problem or trade-off it introduces.
- Conclude with a clear statement of the core question your project will explore: Under what conditions does a decentralized voting system provide genuine advantages over centralized alternatives?
This problem statement will evolve as you learn more. Save it — you will revisit and revise it in Chapter 7, after you understand proof of work, and again in Chapter 12, after you understand smart contracts.
Section G: Integrative Reflection
Exercise 1.16 — Writing a One-Page Explainer
Imagine you have been asked to explain blockchain technology to a family member or friend who has heard the term but has no technical background. Write a one-page explanation (approximately 500 words) that:
- Does not use any jargon without defining it first.
- Uses at least one concrete analogy or metaphor.
- Clearly states what problem blockchains solve and for whom.
- Honestly acknowledges at least one significant limitation.
- Does not include the phrases "revolutionary technology," "the future of finance," or "it's just a scam."
After writing your explanation, review it against the decision framework from this chapter. Does your explanation pass the test of ideological neutrality? Would a blockchain maximalist and a blockchain skeptic both find your explanation fair?
Exercise 1.17 — Timeline Construction
Create a detailed timeline of the events discussed in this chapter, from David Chaum's 1983 paper through the mining of Bitcoin's genesis block on January 3, 2009. For each event, include:
- The date (as precise as available)
- The person or entity involved
- What was proposed, created, or launched
- Why it mattered (one sentence)
- Whether it succeeded or failed, and why (one sentence)
Your timeline should include at least 12 distinct events. After constructing it, write a paragraph reflecting on the pattern you see. What was the trajectory from 1983 to 2009? Was Bitcoin inevitable, or could the same outcome have been achieved differently?