Exercises: Alternative Consensus Mechanisms
Conceptual Questions
Exercise 17.1: Trilemma Mapping
For each of the following consensus mechanisms, identify which two corners of the blockchain trilemma (decentralization, security, scalability) it primarily optimizes for, and explain what it sacrifices in the third:
a) Bitcoin's Proof of Work b) EOS's Delegated Proof of Stake (21 block producers) c) Tendermint BFT (150 validators) d) Hedera Hashgraph (39 council members) e) Solana's Proof of History + Tower BFT
For each answer, provide specific evidence from the mechanism's design that supports your assessment.
Exercise 17.2: Finality Types
Explain the difference between probabilistic finality and instant (deterministic) finality. Then answer:
a) Why does Bitcoin require 6 confirmations (~60 minutes) for high-value transactions? b) Why does Tendermint not require any additional confirmations after a block is committed? c) A cross-chain bridge transfers assets from Ethereum to a Cosmos chain. At what point is it safe for the Cosmos chain to credit the user's account? What risks exist if the bridge credits the account too early? d) A payment terminal at a coffee shop needs to confirm a cryptocurrency transaction within 5 seconds. Which consensus mechanisms from this chapter would be suitable, and which would not? Explain your reasoning.
Exercise 17.3: DPoS Governance Analysis
Consider a DPoS blockchain with the following parameters: - 21 active block producers - 100 million total tokens in circulation - Each token grants one vote - Top 21 candidates by total weighted votes become block producers
a) What is the minimum number of tokens a cartel of block producers would need to control to guarantee they remain in the top 21, assuming all other token holders vote against them? (Hint: think about the worst case for the cartel.) b) In practice, voter participation in DPoS systems is often below 30%. How does low voter participation change the cartel's required token holdings? c) If block producers earn 1% annual rewards on the total supply (shared among 21 producers), each producer earns approximately how many tokens per year? How might this income incentivize or disincentivize cartel formation? d) Propose two specific mechanism design changes that could mitigate the cartel formation problem in DPoS. For each, explain the tradeoff it introduces.
Exercise 17.4: PBFT Message Complexity
In classical PBFT with n nodes tolerating f = floor((n-1)/3) Byzantine faults:
a) Calculate the total number of messages exchanged in one consensus round (pre-prepare + prepare + commit phases) for n = 4, n = 10, and n = 100. Show your work. b) HotStuff reduces per-round message complexity from O(n^2) to O(n). For n = 100, approximately how many messages does HotStuff require per round? How does this compare to your PBFT calculation? c) Why does reducing message complexity matter for blockchain applications but might not matter for a traditional distributed database with 5 nodes? d) Tendermint/CometBFT is based on PBFT but is used in blockchains with 100-175 validators. What practical limits does the O(n^2) message complexity place on the maximum validator set size? At what point do you think the communication overhead would make the system impractical?
Exercise 17.5: DAG vs. Chain
Draw (or describe in detail) the data structure for:
a) A linear blockchain with 6 blocks, showing the hash pointers connecting them. b) A simplified DAG (like the IOTA Tangle) with 10 transactions, where each new transaction references exactly 2 previous transactions.
Then answer: c) In the linear blockchain, if you want to add blocks at twice the current rate, what problem does this create? (Hint: think about propagation time and fork rate.) d) In the DAG, if you want to add transactions at twice the current rate, what problem might this create, if any? e) Why did IOTA need a centralized Coordinator despite the theoretical benefits of the DAG structure?
Applied Problems
Exercise 17.6: Consensus Selection
You are a blockchain architect for each of the following projects. For each, recommend the most appropriate consensus mechanism from those covered in this chapter, and justify your choice. Be specific about the tradeoffs you are accepting.
a) Supply chain tracking for a consortium of 12 pharmaceutical companies. Requirements: fast finality, high throughput, compliance with regulatory auditing requirements, all participants are known entities.
b) A decentralized social media platform aiming for censorship resistance. Requirements: low transaction fees, moderate throughput, resistance to censorship by governments or corporations, anyone should be able to participate.
c) A high-frequency decentralized exchange competing with centralized exchanges. Requirements: extremely fast transaction processing, sub-second finality, throughput of at least 10,000 order operations per second.
d) A community-governed digital currency for a city of 500,000 people. Requirements: energy efficiency, all residents can participate in governance, moderate throughput sufficient for daily transactions, resistance to capture by wealthy residents.
Exercise 17.7: Proof of History Analysis
Consider Solana's Proof of History mechanism:
a) If a SHA-256 hash takes approximately 300 nanoseconds on modern hardware, how many hashes are computed in one 400-millisecond Solana slot? b) A transaction is inserted at position 500,000 in the PoH hash chain for a given slot, and another transaction is at position 900,000. What can we infer about the time ordering of these transactions? Approximately how much time elapsed between them? c) To verify the entire PoH chain for one slot, a single core would need the same amount of time as generating it. If a validator has 16 cores, roughly how much faster can it verify the chain compared to a single core? What assumption makes this parallelization possible? d) An attacker wants to create a fraudulent PoH chain showing transactions in a different order. Why would this attack be difficult? What hardware advantage would the attacker need?
Exercise 17.8: Avalanche Snowball Simulation
In Avalanche's Snowball consensus, a validator samples k = 20 random validators and requires a supermajority of alpha = 14 to update its preference.
a) If 80% of the network prefers transaction A over conflicting transaction B, what is the probability that a random sample of 20 validators includes at least 14 who prefer A? (Use the binomial distribution or approximate.) b) If 51% of the network prefers A, what is the probability that a random sample of 20 includes at least 14 who prefer A? c) Based on your answers to (a) and (b), explain why Snowball consensus converges quickly when there is a clear majority but may take many rounds when preferences are split close to 50/50. d) How does this compare to PBFT, where a two-thirds supermajority of all validators (not a sample) is required? What advantage does sampling provide?
Exercise 17.9: Validator Economics
A Proof of Stake blockchain with Tendermint consensus has the following parameters: - 150 validator slots - Minimum stake to be a validator: 100,000 tokens - Token price: $2.00 - Annual staking reward: 8% of staked tokens - Validators must run a server costing $500/month
a) What is the minimum investment (in USD) to become a validator? b) What is the annual gross reward (in tokens and USD) for a validator staking the minimum amount? c) What is the annual net profit after server costs? d) If the token price drops 50% to $1.00, what happens to the validator's net annual income? At what token price does running a minimum-stake validator become unprofitable? e) How does this economic analysis relate to the decentralization properties of the network? What happens to the validator set when token prices decline significantly?
Research and Discussion
Exercise 17.10: Consensus Mechanism Comparison Report
Choose two consensus mechanisms from this chapter that take different approaches to the trilemma. Write a 500-word comparison that addresses:
a) The specific technical design choices each mechanism makes and why. b) The resulting position of each on the trilemma triangle. c) The real-world performance of each (look up current data on throughput, validator counts, and any notable incidents). d) Which applications each is best suited for and why. e) Your assessment of which approach is more likely to be relevant in 5 years, with justification.
Exercise 17.11: The Modularity Thesis
The final section of this chapter discusses the trend toward modular blockchain architectures that separate consensus, execution, and data availability into distinct layers. Research one of the following and write a brief (300-word) analysis:
a) How Celestia separates data availability from execution and consensus. b) How Ethereum's rollup-centric roadmap addresses the trilemma through layered architecture. c) How EigenLayer's restaking mechanism creates shared security for multiple services.
In your analysis, explain whether modularity actually weakens the blockchain trilemma or merely shifts the tradeoffs to a different layer.
Exercise 17.12: Critical TPS Analysis
Find the official documentation or websites for three different blockchains covered in this chapter. For each, find the claimed TPS (transactions per second) number and then research the actual, sustained TPS observed on mainnet (you can use block explorers or analytics sites).
a) What is the ratio between claimed TPS and actual sustained TPS for each? b) What accounts for the difference? c) Based on this analysis, propose a more honest metric that blockchain projects should report instead of peak TPS.