Blockchain Developer Consensus Mechanisms 3 — Questions and Answers
Question 1: What is a 'long-range attack' in Proof of Stake?
- Attacking nodes over long network distances
- Rewriting history from an old block using past validator keys (Correct answer)
- Flooding the mempool
- Mining empty blocks
Correct answer: Rewriting history from an old block using past validator keys
Attackers use old validator keys to build an alternative chain from far back in history.
Question 2: In Proof of Work, what is the role of the 'difficulty' parameter?
- It sets transaction fees
- It adjusts how hard it is to find a valid block hash (Correct answer)
- It limits the number of validators
- It defines gas prices
Correct answer: It adjusts how hard it is to find a valid block hash
Difficulty adjusts the target hash threshold to keep block times roughly constant.
Question 3: Which attack involves a miner secretly mining a longer chain then releasing it to reverse transactions?
- Sybil attack
- 51% attack (Correct answer)
- Eclipse attack
- Replay attack
Correct answer: 51% attack
A 51% attack uses majority hash power to build and reveal a longer chain that reorganizes the ledger.
Question 4: What does a VRF (Verifiable Random Function) provide in consensus protocols like Algorand?
- Faster hashing
- Unpredictable yet verifiable random leader selection (Correct answer)
- Larger blocks
- Lower gas fees
Correct answer: Unpredictable yet verifiable random leader selection
A VRF generates randomness that is unpredictable in advance but publicly verifiable afterward, used for secret committee selection.
Question 5: In Practical Byzantine Fault Tolerance (PBFT), what are the three main phases?
- Pre-prepare, prepare, commit (Correct answer)
- Propose, mine, finalize
- Stake, vote, slash
- Sync, validate, broadcast
Correct answer: Pre-prepare, prepare, commit
PBFT reaches agreement through pre-prepare, prepare, and commit message rounds among replicas.
Question 6: What is the main trade-off of increasing PoW block frequency (shorter block times)?
- Higher fees only
- More orphaned/stale blocks and weaker security (Correct answer)
- Smaller blocks required
- No validators needed
Correct answer: More orphaned/stale blocks and weaker security
Faster blocks increase the rate of orphaned blocks due to propagation delays, reducing effective security.
Question 7: Which consensus approach is used by Hyperledger Fabric by default for ordering?
- Proof of Work
- Raft (crash fault tolerant) (Correct answer)
- Proof of Stake
- Proof of Burn
Correct answer: Raft (crash fault tolerant)
Hyperledger Fabric's ordering service commonly uses Raft, a crash-fault-tolerant consensus protocol.
What is a 'long-range attack' in Proof of Stake?