CBDH CBDH Consensus & Transaction Validation 2 — Questions and Answers
Question 1: What is MVCC (Multi-Version Concurrency Control) in the context of Hyperledger Fabric?
- A method for encrypting ledger blocks
- A conflict detection mechanism that invalidates transactions whose read data changed since simulation (Correct answer)
- A gossip protocol variant
- A certificate revocation strategy
Correct answer: A conflict detection mechanism that invalidates transactions whose read data changed since simulation
Fabric uses MVCC to detect phantom reads by comparing the read-set key versions from endorsement time against the committed world state at validation time.
Question 2: In Hyperledger Fabric, what is the 'read set' in a transaction's read-write set?
- The list of chaincode functions called
- The set of keys and their versions read during chaincode simulation (Correct answer)
- The list of peers that endorsed the transaction
- The output events emitted by chaincode
Correct answer: The set of keys and their versions read during chaincode simulation
The read set captures each key accessed via GetState along with its version (block number + transaction index) at simulation time, used later for MVCC conflict detection.
Question 3: What does 'phantom read' protection in Hyperledger Fabric ensure?
- Encrypted reads are decrypted correctly
- A transaction is invalidated if the range query result would differ at commit time versus simulation time (Correct answer)
- All peers read from the same block simultaneously
- CouchDB queries return consistent results
Correct answer: A transaction is invalidated if the range query result would differ at commit time versus simulation time
Phantom read protection invalidates transactions where a range query's result set would be different at commit time due to intervening writes, maintaining serializability.
Question 4: Which ordering service consensus mode in Fabric requires an external Apache Kafka and ZooKeeper cluster?
- Solo
- Raft
- Kafka-based ordering (Correct answer)
- BFT ordering
Correct answer: Kafka-based ordering
The Kafka-based ordering service relies on external Kafka brokers and ZooKeeper for crash fault tolerant ordering, though it has been deprecated in favor of Raft.
Question 5: What is the 'Solo' ordering service in Hyperledger Fabric primarily used for?
- Production deployments with single-org channels
- High-throughput enterprise ordering
- Development and testing environments only (Correct answer)
- Byzantine fault tolerant consensus
Correct answer: Development and testing environments only
The Solo orderer runs as a single process with no fault tolerance and is only suitable for development and testing, not production.
Question 6: In a Raft ordering service, what role does the 'leader' node play?
- Validates endorsement signatures
- Receives client transactions and replicates them to follower orderers before cutting blocks (Correct answer)
- Issues identity certificates to peers
- Manages the gossip protocol for peers
Correct answer: Receives client transactions and replicates them to follower orderers before cutting blocks
The Raft leader is the single orderer that receives all transactions, appends them to its log, replicates to followers, and cuts blocks once consensus is reached.
What is MVCC (Multi-Version Concurrency Control) in the context of Hyperledger Fabric?