Skip to content
Tech Interview Prep
Technical interview guide

Blockchain & Distributed Ledger Fundamentals

What a blockchain actually is: a replicated, append-only ledger, and why that structure trades off against a conventional database.

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

Scope: NISTIR 8202; Bitcoin white paper; Ethereum developer documentation and proof-of-stake behavior reviewed 2026-09-04; Hyperledger Fabric latest documentation; IPFS documentation reviewed 2026-09-04.

Curated: · Written: · Reviewed:

25 questions

MCQ-8What is protocol finality in Ethereum proof of stake?
MCQ-6A consortium of five banks runs a shared ledger for interbank settlement. Each bank operates one validating node, and a new bank can join only after the other four sign off on its identity documents and its node certificate is issued by the consortium's CA. The ledger replicates every transaction to all five nodes and runs a BFT ordering service among them. A regulator asks whether this deployment is a public or permissioned chain. Which answer is correct, and why?
MCQ-25A network upgrade narrows the set of valid blocks: any block that satisfies the new rules also satisfies the old ones. Which statement describes this upgrade and how nodes that have not upgraded behave?
MCQ-10A chain's governance approves raising the maximum block size from 1 MB to 2 MB. Nodes that have not upgraded still enforce the 1 MB limit and reject larger blocks, while upgraded nodes accept blocks up to 2 MB. Which term describes this change?
MCQ-14A CI job pulls a 40 MB release artifact by CID from three independent gateways and gets byte-identical files from all three. The job has never seen this artifact before and holds no publisher key. What does the CID itself establish about the bytes it just received?
MCQ-12A light client holds only the header of block N and fetches a Merkle proof for one address's balance from a full node. It recomputes the proof's root and compares it against a single field in the header. Which field is that, and what does it commit to?
MCQ-1A chain is 1,000,001 blocks tall, indices 0 through 1,000,000. A wallet cannot store the chain, so it keeps one commitment: H_head, the header digest of block 1,000,000. Each header carries its parent's header digest and a Merkle root over that block's transactions. A peer sends the full chain, and in it one transaction in block 999,000 has been edited; the peer re-mined blocks 999,000 through 1,000,000 at the same target, so every received header digest is below the target and every stored parent digest equals the actual header digest of its parent. The wallet hashes the received header of block 1,000,000 and compares it with H_head. What is the outcome?
MCQ-3A team is auditing a Bitcoin-style chain. An address holds three unspent outputs: 0.4 BTC (created at height 100), 0.6 BTC (height 250), and 1.0 BTC (height 400). At height 500 the wallet must pay 0.9 BTC to a merchant. The wallet builds one transaction that spends the 1.0 BTC output and returns 0.1 BTC to a fresh change address, leaving the 0.4 and 0.6 outputs untouched. A reviewer flags this as wasteful and asks why the wallet did not instead debit 0.9 BTC from the address's total balance and leave the 1.0 BTC output available. What does the wallet's construction actually do to the ledger state?
MCQ-13A payments chain appends one block per second, 400 signed transfers per block, so 30 days of history is 2,592,000 blocks and 1,036,800,000 transfers across about 4,000,000 accounts. Each transfer is a signed delta on the two accounts it names, and an account's current balance is the sum of its deltas since genesis. The team keeps only the block log and answers 'current balance' reads by looking up that account's transfer offsets in an index and summing those deltas. Reading one indexed record from disk and applying its delta costs 20 microseconds; applying a delta with the record already in memory costs 2 microseconds. Which p50 read latency does the index design give for one balance read?
MCQ-2A relayer verifies an ECDSA signature over an Ethereum transaction payload: `chainId=1`, `nonce=7`, `to=0xBob`, `value=100`, `from=0xAlice`. The recovered signer is `0xAlice`. The relayer submits it to a node on chain ID 1. The node rejects it with `nonce too low`. What does this rejection establish?
MCQ-4An account's next nonce is 42. The team broadcasts transaction A (nonce 42, maxFeePerGas 12 gwei) while the base fee is 30 gwei and holding steady. It then broadcasts transaction B (nonce 43, maxFeePerGas 60 gwei). Both are correctly signed and fit in a block. What happens to B?
MCQ-18A transaction to a contract, with no calldata, is sent with a gas limit of 100,000 and a gas price of 20 gwei. The call consumes 21,000 gas of intrinsic cost plus 13,000 gas of EVM execution, then hits a failing `require` and reverts. The transaction is included in a block. What is charged to the sender?
MCQ-11`Registry.batch()` takes a caller-supplied array of addresses and writes one previously untouched storage slot per address; each of those writes costs 22,100 gas (2,100 to touch the cold slot plus 20,000 to set it). A caller submits an array of 30 addresses with a transaction gas limit of 600,000. Ignore every other cost except the 21,000 intrinsic transaction gas and the 22,100 per element. What happens to the transaction's state changes and to what the sender is charged?
MCQ-17A vault contract compiled with Solidity 0.7.6 holds 4 ETH: 3 ETH from other users and 1 ETH deposited by an attacker contract, so `balances[attacker] == 1 ether`. Its withdraw function is: ```solidity function withdraw(uint256 amount) external { require(balances[msg.sender] >= amount, "insufficient"); (bool ok, ) = msg.sender.call{value: amount}(""); require(ok, "send failed"); balances[msg.sender] -= amount; } ``` The attacker contract's `receive()` re-enters `vault.withdraw(1 ether)` exactly once, guarded by a flag so it does not recurse further. The attacker then calls `withdraw(1 ether)`. What is the result?
MCQ-16A lending market on an EVM chain prices ETH collateral from the instantaneous reserves of a Uniswap V2 ETH/USDC pool rather than an external feed. The pool holds 1,000 ETH and 2,000,000 USDC. An attacker flash-borrows 5,000,000 USDC, swaps it into the pool, and the quoted price moves to about $24,500 per ETH; the attacker then borrows USDC against ETH collateral at that price and reverses the swap. The team argues the design has no oracle problem because the price is read from on-chain contract state. Which statement correctly explains why the attack worked?
MCQ-22A team must patch the logic of a live contract that holds user balances and mappings. Integrators already point at its address, so the address cannot change, and the stored balances cannot be migrated. The team also wants the logic to stay in one contract rather than being split across several. Which mechanism fits?
MCQ-15A team stores each customer's email address as raw UTF-8 bytes in a public EVM contract's storage, keyed by customer ID, so any node can serve lookups. The chain has ~8,000 full nodes, ~1,500 of them archive nodes, and retains full history. Fourteen months later a customer exercises a deletion right, and the team sends a transaction that sets the stored value to empty. After that transaction is finalized, what is the state of the email address on the chain?
MCQ-5A team runs an Ethereum JSON-RPC endpoint for a wallet backend. The endpoint is a single hosted provider that returns `eth_getBalance` and `eth_getLogs` results, and the team has no local execution client. A deposit-crediting job reads `eth_getLogs` for a contract and credits user balances. During a provider incident, the job credits a deposit that the canonical chain never included, and the team cannot tell whether the provider returned stale or fabricated data. They want the job to detect a provider that returns logs not present on the canonical chain, without running a validator. Which change achieves that?
MCQ-23An indexer follows ERC-20 `Transfer` logs on Ethereum mainnet. It stores the number and hash of every block it processes, and on restart it calls `eth_getLogs` from `lastProcessedBlock + 1`. Each event triggers a ~200 ms enrichment call and a ledger write, so re-processing a block is expensive. The process was down for 90 seconds; while it was down the chain reorged 3 blocks deep, and the canonical chain now holds two `Transfer` events in blocks 18,999,998–19,000,000 that the indexer has never seen. One account's indexed balance is 150 USDC below its on-chain balance. The team has seen reorgs of 1, 3 and 7 blocks in the past month. Which restart procedure keeps the indexer correct without re-processing blocks that did not change?
MCQ-19A payout service sends one on-chain transfer per payout. The worker signs with the next nonce, broadcasts, and waits 2 s for a receipt; on timeout it re-signs the same payout with the following nonce and broadcasts again. In one week, 90,000 payouts produced 1,400 timeouts and 37 recipients were paid twice. Every duplicate pair had two different transaction hashes and two different nonces, and both transactions mined. The service also pays the same recipient the same amount on different days, legitimately. Which change removes the duplicate payouts?
MCQ-7An exchange credits deposits on two chains. Chain A uses proof-of-work and the exchange waits for six confirmations; over a year it logs three reorgs, all one or two blocks deep, none reaching six. Chain B uses a BFT protocol where each block carries signatures from more than two-thirds of validators, and the exchange credits as soon as it sees those signatures; it has logged no reorgs. A new engineer proposes crediting Chain A after one confirmation to cut latency. What is the correct assessment?
MCQ-9At 14:03 your node and a peer each report a different head at height 19,204,881. Both blocks carry valid signatures from different, non-slashed producers, every node runs the same client version, and no protocol upgrade was scheduled. By 14:05 all nodes agree on one head. What most likely produced the two-minute disagreement?
MCQ-24A PBFT replicated state machine runs with 7 replicas and is configured for f = 2 Byzantine faults, the maximum n = 7 supports. During an incident, 3 of the 7 replicas are compromised and begin sending conflicting messages to different replicas. Which outcome should the operators expect?
MCQ-20A single regulated bank runs its own settlement ledger. The bank is the only party permitted to write entries, is legally accountable for every one, and must reverse a fraudulent entry within the same second; p99 write latency must stay under 10 ms. The team is choosing between a single-primary Postgres cluster and a permissioned BFT-replicated ledger. Which consideration decides in favor of Postgres?
MCQ-21A cross-chain bridge holds user deposits. Withdrawals are authorized by 5-of-8 signatures from a validator set the operating company appoints and can replace at will. The bridge contract sits behind an upgradeable proxy whose admin is a 3-of-5 multisig held by the same company. No validity or fraud proof is verified on either chain, and the team markets the bridge as 'trustless'. What is the smallest number of keys an attacker must control to move the bridge's entire balance to an address they choose?