Skip to content
Tech Interview Prep
Technical interview guide

Consensus Mechanisms

How a distributed network of untrusted nodes agrees on a single canonical transaction history: Proof of Work, Proof of Stake, and BFT-style consensus.

Read
45 min
Practice MCQs
25
Interview Q&A
25
Edition
v3
Editorial status
Reviewed

Scope: NISTIR 8202; Bitcoin white paper; Ethereum proof-of-stake documentation reviewed 2026-09-04; CometBFT main specification reviewed 2026-09-04; PBFT, HotStuff, and Raft papers.

Curated: · Written: · Reviewed:

25 questions

MCQ-16A payments service marks an invoice paid as soon as its own node admits the transaction to its mempool. A customer's payment is later replaced by a conflicting transaction that returns the funds to the customer, and the invoice never settles on-chain. Which property of mempool state explains why the service's rule was wrong?
MCQ-17A replicated state machine runs the same binary on five nodes and applies the same ordered transaction log on each; the log is byte-identical on all of them. At height 812,004, nodes 1–4 compute state root 0x9f3a…; node 5 computes 0x41c7…. Replaying the log from genesis on node 5 reproduces 0x41c7… on every run, and replaying that same log on a sixth node reproduces 0x9f3a…. The block's single contract call reads the node's wall clock and iterates a Go map. Which cause fits the evidence?
MCQ-24A 5-node Raft cluster (N1–N5) runs a fault-injection schedule: the harness partitions {N1, N2} from {N3, N4, N5}. The client's write W reaches N1, the pre-partition leader, and is appended to N1's log. N3 then wins an election in the majority and commits the client's write X. Twenty seconds later the partition heals and N1 rejoins. Which statement describes the committed log on all five nodes after the heal?
MCQ-1A 5-node Raft cluster uses a 3-node quorum for elections, but a bug lets a leader commit an entry as soon as a majority of the nodes it can currently reach acknowledge it. The cluster partitions into {A, B} and {C, D, E}. A, the leader before the split, commits value X at log index 42 after B acknowledges. C, D and E elect a new leader and commit value Y at index 42. When the partition heals, A and C hold different values at index 42. Which statement correctly characterizes this run?
MCQ-2A five-node Raft cluster has R3 as leader for term 7. R3 sends entry X at index 40 to R1 and R2, and a different entry Y at index 40 to R4 and R5. All five nodes are up, no election timeout fires, and no node crashes. What happens?
MCQ-4A BFT cluster runs 3f+1 = 7 replicas and tolerates f = 2 Byzantine faults. Two replicas each gather commit votes from a set of distinct replicas and must be guaranteed to share at least one honest replica in common. What is the smallest number of votes per set that guarantees this?
MCQ-6A leader-based BFT cluster runs n = 4 validators, sized to tolerate f = 1 Byzantine fault; a block becomes final at a height once a quorum of validators have signed for it at that height, and every signature verifies against the replica that sent it. At height 10 the leader proposes block B and signs it; R2 and R3 also sign B, while R4 is unreachable and signs nothing. What is the state of block B?
MCQ-15An exchange credits deposits from a BFT chain with n = 7 validators that tolerates f = 2 Byzantine faults. A block arrives carrying signatures from 4 distinct validators. When is the deposit safe to credit?
MCQ-7Four validators A, B, C, and D run a BFT consensus protocol where a quorum is three votes. In round 1, A prevotes block X and receives prevotes for X from B and C, so A locks on X at round 1. In round 2, D proposes a conflicting block Y. A receives round-2 prevotes for Y from B, C, and D, and no round-2 prevotes for X. What should A do?
MCQ-3A validator in a partially synchronous BFT protocol times out waiting for the leader's block and wants to submit the timeout as evidence to slash the leader. Why does the timeout fail to prove malicious behavior?
MCQ-8A CometBFT node at height 100 has a validator set with 100 total voting power. Round 0 timed out with precommits for block A from validators holding 50 voting power. Round 1 timed out with precommits for block B from validators holding 55 voting power. What should the node do next?
MCQ-18A four-validator chain signs each precommit over the block hash only; height and round travel in the message but are outside the signed bytes. At height 811 round 0 the validators commit block Q. At height 812 round 0 the proposer is byzantine and re-broadcasts the three honest validators' height-811 precommits for block Q as height-812 precommits; block Q is again the proposal, and the honest nodes have not yet voted at 812. What happens?
MCQ-19A chain runs four validators A, B, C and D, each with voting power 1, and commits a block once 3 of the 4 have signed it, so it tolerates one faulty validator. From height 3000 the set becomes {A, B, C, E} with every weight still 1: D is removed and E joins. The rollout is a config-file edit plus a node restart, so when height 3000 is produced some nodes are signing under the old set and some under the new one, and both sides build on the same height-2999 block. Which statement is correct?
MCQ-9Two Bitcoin nodes are mining on a fork. Chain A has 6 blocks, each with a header hash that meets a target of 2^240. Chain B has 4 blocks, each with a header hash that meets a target of 2^236. Both chains are valid under all consensus rules. Which chain will a node running Bitcoin Core adopt as its active chain?
MCQ-10A proof-of-work chain targets 600-second blocks and the honest network hashes at 300 EH/s. An exchange credits a deposit after 6 confirmations. An attacker with 150 EH/s mines a private chain from the block before the deposit, aiming to replace it. Which outcome follows?
MCQ-11A proof-of-stake chain has 10,000 validators and 10 million tokens staked. Finality requires attestations from validators holding more than two-thirds of the staked tokens. An attacker controls 1 million tokens (10% of stake) and is selected to propose roughly 10% of blocks. They build a private fork from a finalized checkpoint and want it to become canonical. What can the attacker achieve?
MCQ-13A node is at slot 200. The last finalized checkpoint is at slot 180. Two competing chains exist: chain A and chain B. Chain A has 60% of the latest attestation weight, but its head block is a descendant of a block that conflicts with the finalized checkpoint at slot 180. Chain B has 40% of the latest attestation weight and descends from the finalized checkpoint. Which block does the node's fork choice select as head?
MCQ-12A validator on a 32 ETH Ethereum beacon-chain validator runs two beacon clients against the same validator key to avoid downtime during a client migration. At slot 100 the first client signs and broadcasts a beacon block for slot 100; at slot 101 the second client, still syncing, signs a different block for slot 100 and broadcasts it. Both blocks reach the network and are included in the same epoch. What is the immediate consensus-level consequence for this validator?
MCQ-14A proof-of-stake chain (hypothetical figures) has 900,000 ETH staked across 28,125 validators, 32 ETH each. A coalition of 9,400 validators: 33.4% of the stake: stops attesting and stays offline, while the remaining 18,725 validators keep attesting honestly. What happens over the following epochs?
MCQ-20A proof-of-stake chain lets a validator begin exiting at any time; 21 days later it is fully withdrawn and can no longer be slashed. A light client was last online 90 days ago and saved the block root it had at the time. On restart it syncs forward from that root and accepts a chain whose head conflicts with the head every full node reports. The conflicting chain carries valid signatures from the validator set recorded at that root, and those signers have since fully withdrawn. Which action restores the client to the network's chain?
MCQ-23A validator's signer produces the signature for a pre-vote at height 100 round 0, then writes height/round/step to `priv_validator_state.json` through a buffered writer that flushes to disk every 5 s, then returns the signature to the consensus reactor, which broadcasts it. The kernel OOM-kills the process ~1 ms after the signature is produced, before the buffered write reaches disk. On restart the file still reads height 99 round 0, so the node signs a different pre-vote at height 100 round 0 and is slashed for double signing. Which change to the signer removes this window?
MCQ-5A proof-of-stake chain runs 100 validators with equal bonded stake, and its consensus client treats more than 33 validators failing at once as a safety violation. An audit finds that 30 validators are operated by one staking provider, and 15 validators run by other operators are hosted in the same cloud region as those 30. What does the audit imply about the chain's fault tolerance?
MCQ-22In a hypothetical proof-of-stake chain, 100 validators each hold an equal stake. Slashing burns 1% of a validator's stake for a provable double-sign. A group controls 40 validators that all run in one cloud region and share a key-management service. The group double-signs to stall the chain for one epoch. An attacker holds a short position on a competing chain's token that pays 8 times the group's combined stake if the stall occurs. Slashing executes. What is the most likely outcome?
MCQ-21A four-replica HotStuff deployment (f = 1) uses a 500 ms view timeout. With a correct leader in place and a one-way network delay of 10 ms, commit latency measures about 40 ms. The replicas are then moved to a region where the one-way delay is 30 ms; the network stays healthy, GST holds, and the same correct leader remains. Processing time is negligible. What commit latency should the operators expect?
MCQ-25A clearing house settles transfers for 12 member banks. Every member has signed the same rulebook, accepts the clearing house as the sole operator, and can sue it for errors; no member distrusts another. Each member must hold a full replica of the ledger, and the ledger must survive the crash of any one member's node. Peak load is 18,000 transfers/s with a p99 commit latency budget of 40 ms. On the same 12-node hardware, a PBFT ordering service sustains 1,200 transfers/s at p99 380 ms, while a single-writer replicated database with synchronous standbys sustains 22,000 transfers/s at p99 26 ms. Which design should the clearing house deploy?