Distributed Ledgers: Blockchains & Permissioned Ledgers
Most distributed systems on Archon assume that every node is on the same side. Replicas might crash, networks might drop packets, clocks might drift — but nobody is lying. A Raft follower doesn't invent log entries. A Dynamo node doesn't claim to have stored a write it threw away.
Distributed ledgers start from a different place: several parties who do not trust each other want to keep one shared record of state, and none of them is willing to let another one run it. Banks settling trades with each other, a supply chain spanning competitors, or — in the most extreme case — anyone on the internet, anonymously, with no membership list at all.
This page covers three landmark designs that answer that problem in very different ways:
- Bitcoin (Nakamoto, 2008) — open membership, proof-of-work, probabilistic finality.
- Hyperledger Fabric (Androulaki et al., EuroSys 2018) — known members, a pluggable ordering service, and an execute-order-validate pipeline.
- Corda (Hearn, technical white paper, 2016 and later revisions) — known members, no global broadcast at all, with notaries that only prevent double-spends.
Along the way we cover proof-of-stake and BFT finality, and we end with an honest engineering assessment: most projects that proposed a blockchain would have been better served by a database, and the reasons why are worth understanding precisely.
Related pages
The Byzantine fault model and the bound are covered in Byzantine Fault Tolerance and, in protocol detail, Practical BFT. Smart contract vulnerabilities are covered in Web3 Security. Hash functions are covered in Hashing Algorithms.
1. The Problem: Shared State Among Mutually Distrusting Parties
1.1 Why a normal database doesn't fit (sometimes)
If five banks want a shared record of who owes whom, the obvious design is: one bank, or a jointly owned company, runs a database and the others access it over an API. That's how card networks, clearing houses and stock exchanges work. It works well — as long as everyone accepts the operator.
A distributed ledger is the answer when the parties will not accept a single operator:
- The operator could rewrite history — change a balance, delete a trade.
- The operator could censor — refuse a participant's transactions.
- The operator could fail or go out of business, taking the record with it.
- The operator might be a competitor who learns everyone's business from the data.
So each party wants a copy of the record, the ability to verify every change independently, and a way to agree on order without trusting any single party.
1.2 The requirements, stated precisely
| Requirement | Meaning | Typical mechanism |
|---|---|---|
| Tamper evidence | Nobody can change past entries without others noticing | Hash chains, Merkle trees, digital signatures |
| Independent validation | Each party checks every change against shared rules | Deterministic transaction validation (scripts, smart contracts) |
| Agreement on order | Everyone sees conflicting transactions (two spends of the same coin) in the same order | A consensus protocol tolerant of Byzantine faults, or a trusted ordering service |
| Authorisation | Only the owner of an asset can move it | Public-key signatures |
| Membership | Who is allowed to take part | Open (permissionless) or a known list (permissioned) |
The key insight is that the double-spend problem is an ordering problem. If Alice signs two transactions sending the same coin to Bob and Carol, both are validly signed. The system must agree on which came first and reject the other. Signatures prove who authorised something. Consensus decides which of several conflicting things happened.
1.3 Two very different trust models
Before Bitcoin, Byzantine agreement protocols (PBFT and family) assumed a known set of n participants, of whom at most are faulty. That bound only means something if you can count participants. On the open internet you can't: one attacker can create a million identities. This is a Sybil attack.
So there are two families:
- Permissionless ledgers have open membership. They need a way to make influence expensive rather than counted by identity: proof-of-work (computation), proof-of-stake (locked capital).
- Permissioned ledgers have a known membership, usually with X.509 identities issued by a consortium. They can use classical BFT protocols — or, if the ordering parties are trusted enough, even crash-fault-tolerant ones like Raft.
Part I — Bitcoin and Nakamoto Consensus
2. Architecture
Satoshi Nakamoto's nine-page white paper, "Bitcoin: A Peer-to-Peer Electronic Cash System" (October 2008), describes a system with no membership at all. Anyone can run a node, anyone can mine, and nodes can come and go at will.
flowchart TB
subgraph P2P["Open peer-to-peer network — anyone can join"]
direction LR
N1["Full node"] <--> N2["Full node"]
N2 <--> N3["Miner"]
N3 <--> N4["Full node"]
N4 <--> N5["Miner"]
N5 <--> N1
N2 <--> N5
end
W["Wallet signs a transaction"] -->|"broadcast"| N1
SPV["Light client (SPV)<br/>stores headers only"] -->|"Merkle proof request"| N4
subgraph Chain["Every full node keeps the chain"]
direction LR
B0["Block n-2<br/>hash of n-3<br/>Merkle root<br/>nonce"] --> B1["Block n-1<br/>hash of n-2"] --> B2["Block n<br/>hash of n-1"]
end
N3 -.->|"extend tip"| B2
2.1 The data model: chains of signatures and UTXOs
The paper defines a coin as a chain of digital signatures. Each owner transfers the coin by signing a hash of the previous transaction plus the next owner's public key. Anyone can verify the chain of ownership.
In practice, Bitcoin uses the UTXO model (unspent transaction outputs):
- A transaction has inputs, each referencing an output of an earlier transaction, plus a signature (more generally, a script satisfying the output's locking script).
- It has outputs, each with an amount and a locking script — normally "pay to whoever can sign with this key".
- The sum of inputs must be at least the sum of outputs. The difference is the fee for the miner.
- An output can be spent once. The set of all unspent outputs is the system's state.
The paper notes that transactions can combine and split value: multiple inputs, and usually two outputs — one to the payee, one returning change to the sender.
2.2 Blocks, hash chains and Merkle trees
Transactions are grouped into blocks. Each block header contains:
- the hash of the previous block header — this links blocks into a chain;
- the Merkle root of the block's transactions;
- a timestamp, a difficulty target, and a nonce.
Because each header includes the previous hash, changing anything in an old block changes its hash, which breaks the link from the next block, and so on to the tip. The paper describes this as a distributed timestamp server: each block proves the data existed at that time.
The Merkle root lets a node prove a transaction is in a block with only hashes. That gives Simplified Payment Verification (SPV): a light client keeps only block headers (80 bytes each) and asks full nodes for a Merkle branch for its transactions. The paper notes SPV is reliable as long as honest nodes control the network, but can be fooled by an attacker who overpowers it. It also lets nodes discard spent transactions' data while keeping the root, to save disk.
3. Proof-of-Work and the Longest Chain
3.1 Proof-of-work
To create a block, a miner must find a nonce such that the block header's double-SHA-256 hash is below a target. There's no shortcut: you try nonces until one works. The expected number of tries is set by the target, which the protocol adjusts to keep the average block interval near 10 minutes — the paper describes the difficulty as a moving average targeting a set number of blocks per hour; the implementation retargets every 2,016 blocks (about two weeks).
The paper's framing is "one-CPU-one-vote" instead of "one-IP-address-one-vote". Voting power is proportional to computation, which can't be faked with fake identities. (In practice it became "one-ASIC-farm-one-vote", but the principle is the same.)
3.2 The protocol in six steps
The paper's network rules, in our words:
- New transactions are broadcast to all nodes.
- Each node collects new transactions into a candidate block.
- Each node works on finding a proof-of-work for its block.
- When a node finds one, it broadcasts the block to all nodes.
- Nodes accept the block only if all its transactions are valid and not already spent.
- Nodes show acceptance by working on the next block, using the accepted block's hash as the previous hash.
And the fork rule: nodes always consider the chain with the most cumulative proof-of-work to be the correct one and keep extending it. The paper says "longest chain", meaning most work, not most blocks.
3.3 Forks and their resolution
Two miners can find blocks at nearly the same time. The network then has two competing tips. Each node works on the first one it received but keeps the other. When the next block is found on one branch, that branch has more work, and every honest node switches to it. Transactions in the abandoned block go back into the pool of pending transactions (if not already in the winning chain).
flowchart LR
B100["Block 100"] --> B101a["101 (miner A)<br/>contains tx T"]
B100 --> B101b["101' (miner B)<br/>does not contain T"]
B101b --> B102["102' — found first"]
B102 --> B103["103'"]
B101a -.->|"orphaned (stale)"| X["dropped — T returns to mempool"]
This is why a Bitcoin transaction is never final in the classical sense. A transaction in the tip block can disappear if a competing branch overtakes it.
3.4 Probabilistic finality — the paper's calculation
Section 11 of the white paper models an attacker racing the honest network. Let be the probability the honest network finds the next block, and the attacker's. The probability that an attacker who is blocks behind ever catches up is the gambler's-ruin result:
Nakamoto then accounts for the attacker's progress while the recipient waits, using a Poisson distribution with , and computes the probability of a successful double-spend after confirmations. The paper's table for "probability below 0.1%":
| Attacker's share q | Confirmations z needed |
|---|---|
| 0.10 | 5 |
| 0.15 | 8 |
| 0.20 | 11 |
| 0.25 | 15 |
| 0.30 | 24 |
| 0.35 | 41 |
| 0.40 | 89 |
| 0.45 | 340 |
The common "wait 6 confirmations" convention (about an hour) comes from this kind of analysis for an attacker with roughly 10% of hash power. Two important properties:
- Finality is a probability, never a certainty. It decreases exponentially with depth, as long as .
- The probability depends on an assumption about the attacker's share, which the recipient can't observe. As approaches 0.5, the required depth goes to infinity.
3.5 Worked example: a merchant's double-spend risk
A merchant sells a car for a Bitcoin payment and wants the risk of reversal below 0.1%. If they believe no single party controls more than 25% of hash power, the table says wait 15 confirmations — about 2.5 hours on average. If they're selling coffee, accepting after zero or one confirmation is fine, because the expected loss (price × probability of attack) is tiny compared with the attacker's cost.
This illustrates something important: in Nakamoto consensus, finality is a business decision that each recipient makes based on value at risk — not a protocol property.
3.6 Incentives
The first transaction in each block creates new coins for the block's creator (the block reward), plus transaction fees. The paper argues this encourages honesty: an attacker with more CPU power than all honest nodes would find it more profitable to mine honestly than to undermine the system that gives value to their own coins. That is an economic argument, not a cryptographic one, and much later research questions it in parts.
4. Guarantees and Limits of Nakamoto Consensus
4.1 What is guaranteed
Formal analyses (for example Garay, Kiayias and Leonardos's "Bitcoin Backbone" paper, EUROCRYPT 2015) show that under synchrony assumptions and an honest majority of hash power, the protocol achieves:
- Common prefix: honest nodes' chains, after removing the last k blocks, are prefixes of each other with probability exponentially close to 1 in k.
- Chain quality: a sufficient fraction of blocks in any long-enough segment are honest.
- Chain growth: the chain grows at a steady rate.
These rely on network delay being small compared with the block interval. That's why the interval is minutes, not milliseconds: a short interval with slow block propagation creates many forks and gives large miners an advantage.
4.2 The 51% attack — what it can and can't do
An attacker with a majority of hash power can build a longer private chain and release it, replacing recent history. That lets them:
- Double-spend their own coins — pay a merchant, then replace the chain with one where that payment never happened.
- Censor transactions by never including them, and orphaning others' blocks that do.
They cannot:
- Spend coins they don't have the keys for — signatures still apply.
- Create coins beyond the protocol's rules — honest full nodes reject invalid blocks regardless of their work.
Smaller proof-of-work chains, where renting enough hash power is cheap, have suffered real 51% attacks — Ethereum Classic had several deep reorganisations in 2019 and 2020 that enabled double-spends against exchanges.
4.3 Honest majority is not quite enough: selfish mining
Eyal and Sirer's "Majority Is Not Enough" (2014) showed that a mining pool can earn more than its fair share by withholding found blocks and releasing them strategically to waste honest miners' work. Depending on network conditions, this can be profitable with less than a third of the hash power, or even less if the pool wins most propagation races. The incentive argument from §3.6 is weaker than the white paper suggests.
4.4 Performance
Bitcoin's design prioritises decentralisation over throughput:
- Throughput of roughly 3–7 transactions per second with the original 1 MB block limit (SegWit in 2017 raised the effective limit somewhat).
- Latency to high-confidence finality of about an hour.
- Energy cost proportional to the value of the block reward, since miners compete until marginal cost meets marginal revenue.
Layer-2 systems such as the Lightning Network move most payments off-chain into payment channels and use the chain only for opening, closing and disputes.
5. Proof-of-Stake and BFT Finality
5.1 Replacing work with stake
Proof-of-stake replaces computation with locked capital: validators deposit (stake) tokens, and influence is proportional to stake. Misbehaviour that can be proved — such as signing two conflicting blocks for the same height — is slashed: the stake is destroyed. This makes attacks costly without burning energy.
PoS creates new problems that PoW didn't have:
- Nothing at stake. Signing on every fork costs nothing computationally, so validators need explicit penalties for doing so.
- Long-range attacks. Old validators who have withdrawn their stake could sign an alternative history from long ago at no cost. Defence: weak subjectivity — new nodes must get a recent trusted checkpoint from a social source.
- Wealth concentration affects decentralisation.
5.2 Two ways to finalise
Chain-based PoS with a finality gadget. Ethereum switched from proof-of-work to proof-of-stake in September 2022 ("the Merge"). Its consensus, Gasper, combines a fork-choice rule (LMD-GHOST) that keeps producing blocks every 12-second slot, with Casper FFG, a finality gadget. Every epoch (32 slots, 6.4 minutes), validators vote on checkpoints. A checkpoint is justified with votes from two thirds of stake and finalised when the next one is justified on top of it — normally after about two epochs, roughly 13 minutes. Casper FFG gives accountable safety: if two conflicting checkpoints are ever finalised, at least one third of the stake must have broken a slashing rule, and the protocol can prove who.
Classical BFT per block. Tendermint (now CometBFT, used by Cosmos chains) runs a PBFT-style round for every block: propose, prevote, precommit, with a two-thirds quorum of voting power. A block is final as soon as it's committed — no reorganisations. Tolerates fewer than one third Byzantine voting power. Under partition it halts rather than forking: it chooses safety over liveness, the opposite of Nakamoto consensus.
| Nakamoto PoW | Ethereum Gasper | Tendermint-style BFT | |
|---|---|---|---|
| Membership | Open | Open, stake-weighted | Stake-weighted validator set (often ~100–200 validators) |
| Finality | Probabilistic | Probabilistic per slot, deterministic at finalised checkpoints | Deterministic per block |
| Time to finality | ~60 min for high confidence | ~13 min | Seconds |
| Fault bound | Honest majority of hash power (less with selfish mining) | Less than 1/3 stake for safety | Less than 1/3 voting power |
| Under a network partition | Both sides continue; the shorter side's blocks are later orphaned | Blocks continue, finality stalls | Halts until two thirds can communicate |
| Message complexity | gossip per block | Aggregated signatures over large validator sets | per round (HotStuff-style designs reduce this) |
For the mechanics of PBFT, HotStuff and Tendermint, see Practical BFT. For the theory and the proof, see Byzantine Fault Tolerance. Note that BFT protocols can't guarantee both safety and liveness in a fully asynchronous network — FLP applies to them too — which is why they assume partial synchrony.
Part II — Permissioned Ledgers
6. Permissionless vs Permissioned
Once members are known, the ledger design space opens up:
| Permissionless | Permissioned | |
|---|---|---|
| Who can validate or write | Anyone | Members admitted by a consortium |
| Identity | Pseudonymous keys | Real-world identities with certificates |
| Sybil resistance | PoW or PoS | Admission control |
| Consensus | Nakamoto, PoS + BFT | BFT (PBFT, BFT-SMaRt, SmartBFT) or CFT (Raft, Kafka) |
| Throughput | Low (tens to thousands of tx/s) | Higher (thousands to tens of thousands of tx/s) |
| Finality | Probabilistic or minutes | Usually immediate |
| Privacy | Everything public by default | Can restrict visibility |
| Governance | Social, by fork | Legal agreements between members |
The trade-off is direct: a permissioned ledger gets performance and privacy by reintroducing trust in an admission authority. That raises an obvious question — if you already trust a consortium to admit members, could it run a database instead? §10 takes that question seriously.
7. Hyperledger Fabric: Execute-Order-Validate
Hyperledger Fabric came from IBM and became a Linux Foundation project. The EuroSys 2018 paper "Hyperledger Fabric: A Distributed Operating System for Permissioned Blockchains" (Androulaki et al.) explains its design as a reaction to how earlier blockchains execute transactions.
7.1 The problem with order-execute
Bitcoin and Ethereum use order-execute: first agree on the order of transactions (by consensus), then every node executes them sequentially in that order. The paper identifies the problems this causes for an enterprise platform:
- Sequential execution limits throughput. Every node executes every transaction one after another. A slow contract slows everything — and can be a denial-of-service attack.
- Code must be deterministic. Since every node re-executes, contracts in general-purpose languages (Go, Java) that call non-deterministic APIs (map iteration order, time, randomness) make nodes diverge. Earlier systems answered with domain-specific languages, such as Ethereum's Solidity on a deterministic VM.
- No confidentiality. Every node runs every contract, so every node sees all the data.
- Fixed trust model. The consensus protocol is hard-coded, and so is the assumption that all nodes must agree on every transaction's execution.
(Calvin and Fauna use the same order-execute pattern for a database — see Calvin & FaunaDB. The difference is that they're run by one operator who controls the code.)
7.2 Execute-order-validate
Fabric splits a transaction into three phases, run by different nodes:
sequenceDiagram
autonumber
participant Cl as Client (org A)
participant E1 as Endorsing peer (org A)
participant E2 as Endorsing peer (org B)
participant O as Ordering service
participant P as Every peer on the channel
Note over Cl: Endorsement policy for this chaincode<br/>= AND(orgA, orgB)
Cl->>E1: proposal (chaincode, args, signed)
Cl->>E2: proposal (chaincode, args, signed)
Note over E1,E2: EXECUTE — simulate against local state.<br/>Record read set (key, version) and write set.<br/>Nothing is committed yet
E1-->>Cl: endorsement = signed (read set, write set)
E2-->>Cl: endorsement = signed (read set, write set)
Note over Cl: Check the two results match
Cl->>O: transaction = proposal + endorsements
Note over O: ORDER — total order, cut blocks,<br/>hash-chain them. No execution
O->>P: block n
Note over P: VALIDATE — check endorsement policy (parallel),<br/>then per tx in order, check read versions<br/>still current (MVCC). Apply valid write sets
P-->>Cl: event: tx valid or invalid
1. Execute (endorsement). The client sends a signed proposal to the endorsing peers required by the chaincode's endorsement policy — for example "one peer from org A and one from org B". Each endorser simulates the chaincode against its current state. The result is a read set (keys with their versions) and a write set (keys with new values). The endorser signs this and returns it. Nothing is applied yet.
2. Order. The client assembles the endorsements into a transaction and sends it to the ordering service. The ordering service only establishes a total order, batches transactions into blocks, and hash-chains them. It does not execute or even need to understand the transactions. It delivers blocks to peers using atomic broadcast.
3. Validate. Each peer receiving a block:
- checks, for every transaction, that the endorsements satisfy the endorsement policy — done in parallel across transactions;
- then, in block order, checks each transaction's read set: are all read versions still the current versions in the state? If a previous transaction in this or an earlier block changed one of those keys, this transaction is marked invalid (an MVCC conflict);
- appends the whole block to its ledger — including invalid transactions, flagged as invalid — and applies the write sets of the valid ones to the state database.
7.3 Why this design
| Problem with order-execute | Fabric's answer |
|---|---|
| Sequential execution | Execution happens before ordering, in parallel, on only the endorsing peers |
| Non-deterministic code | Endorsers' results are compared; only matching, signed read/write sets are committed. Divergent execution produces mismatched endorsements, which fail the policy instead of corrupting state. Chaincode can be ordinary Go, Java or JavaScript |
| Confidentiality | Only endorsers named in the policy execute the chaincode. Channels give separate ledgers; private data collections share data only with authorised orgs, putting hashes on the shared ledger |
| Fixed trust model | Endorsement policies express per-application trust. The ordering service is pluggable |
Notice what this is: optimistic concurrency control, applied to a blockchain. Execution is speculative against a snapshot; the version check at validation is the OCC commit check; and because every peer validates the same block in the same order, every peer reaches the same decision. It's structurally similar to Fauna's design — speculative execution, then ordering, then deterministic validation.
7.4 The ordering service and its trust model
The ordering service is where consensus happens. Its history:
- The 2018 paper describes an ordering service built on Apache Kafka and ZooKeeper — crash-fault tolerant only — and mentions a prototype BFT ordering service based on BFT-SMaRt.
- Fabric v1.4.1 (2019) added a Raft-based ordering service, and Kafka-based ordering was later deprecated.
- Fabric v3.0 (2024) added a BFT ordering service (based on the SmartBFT library), so orderers no longer have to be trusted not to lie.
With Raft or Kafka ordering, the orderers are trusted to order honestly — a malicious orderer could, for example, show different blocks to different peers. Peers still independently validate signatures and endorsement policies, so orderers can't forge transactions, but they can censor and reorder. That's a reasonable trade-off in a consortium where the ordering nodes are run by several members under contracts, but it's not "trustless".
7.5 Identity: the Membership Service Provider
Every Fabric node and client has an X.509 certificate issued by its organisation's certificate authority. A Membership Service Provider (MSP) defines which CAs are trusted and maps certificates to organisations and roles. Endorsement policies refer to these organisations. This is where permissioning happens: no certificate, no participation.
7.6 Worked example: an MVCC conflict
Two transactions both try to update the inventory of item 42, current value 10 at version (block 7, tx 3).
| T1: sell 3 | T2: sell 5 | |
|---|---|---|
| Simulated read | item42 = 10 @ v(7,3) | item42 = 10 @ v(7,3) |
| Write set | item42 = 7 | item42 = 5 |
| Ordered into block 8 at | position 0 | position 1 |
| Validation | read version matches → valid, write item42 = 7 @ v(8,0) | read version v(7,3) ≠ current v(8,0) → invalid |
T2 sits in block 8 forever, flagged invalid. The client must re-submit it, and it will be re-simulated against the new state. This shows Fabric's main performance pathology: under contention on hot keys, many transactions are endorsed, ordered and stored, only to be invalidated. Applications must design keys to avoid hotspots — for example, by recording deltas as separate keys and summing them, instead of updating one counter.
7.7 Performance from the paper
The paper evaluated Fabric with Fabcoin, a UTXO-style cryptocurrency implemented on it. The headline: more than 3,500 transactions per second end-to-end, with latency of a few hundred milliseconds in their setup, and the system scaled well to over 100 peers. Validation was the bottleneck — dominated by signature verification on peers' CPUs — not ordering.
Later research pushed further. FastFabric (Gorenflo et al., 2019) reported around 20,000 transactions per second by separating peer roles, caching, and parallelising validation. Those are research configurations, not defaults.
8. Corda: Point-to-Point Ledger
Corda was developed by R3 with a consortium of banks. Its design is described in Mike Hearn's Corda: A Distributed Ledger technical white paper (first version 2016, revised several times since). It starts from a different observation: in finance, parties don't want to share their transactions with everyone, and they don't need to. A loan between bank A and bank B is nobody else's business. The only thing others need to be sure of is that an asset isn't spent twice.
8.1 No global broadcast
Corda has no global chain of blocks and no broadcast of transactions to all nodes. Each node stores only the facts it's a party to. Transactions are sent point-to-point between the parties involved, over authenticated messaging (AMQP over TLS). The "ledger" is the union of what every node knows, and no single node sees all of it.
That raises the question: without a global order, how do you stop double-spending? Corda's answer is the notary.
8.2 The data model: states, contracts, transactions
| Concept | Meaning |
|---|---|
| State | An immutable object representing a shared fact — "Bank A owes Bank B 10 million euros, due on 1 March". It lists its participants and names a contract and a notary. Corda uses a UTXO model: states are created and consumed, never updated in place |
| Contract | Code with a verify(transaction) function that decides whether a transaction is valid for states of that type. Must be deterministic — Corda runs it on the JVM with restrictions so every party gets the same answer |
| Transaction | Consumes input states, produces output states, and lists commands (intent, such as "Issue" or "Move") with the public keys required to sign. Can include reference states (read without consuming), attachments (JARs with contract code and data), and a time window |
| Notary | A service that signs a transaction only if none of its input states has been consumed before, and the time window is valid |
| Flow | A program that coordinates a business process between parties: build a transaction, collect signatures, get the notary's signature, distribute the result |
A transaction is valid when every contract governing its input and output states accepts it, every required signer has signed, and the notary has signed. Validity is checked by the parties themselves. Uniqueness — the anti-double-spend property — is the notary's only job. The white paper calls this separation of validity consensus (everyone checks the rules) from uniqueness consensus (someone ensures each input is used once).
8.3 A transaction end to end
sequenceDiagram
autonumber
participant A as Bank A node
participant B as Bank B node
participant N as Notary cluster
Note over A: Flow builds tx — input = cash state 0xa1 (owned by A),<br/>output = cash state owned by B, command Move signed by A
A->>A: run contract verify, sign
A->>B: send proposed tx
B->>A: request backchain for input 0xa1
A-->>B: transactions that created 0xa1 and its ancestors
Note over B: Verify every ancestor tx with its contracts,<br/>then verify this tx, then sign
B-->>A: signature
A->>N: notarise tx (input refs, time window, signatures)
Note over N: Has 0xa1 been consumed? No.<br/>Record it as consumed by this tx, sign
N-->>A: notary signature
A->>B: final signed tx
Note over A,B: Both record the tx. Nobody else learns of it
8.4 Notaries
A notary is usually not one machine. It's a cluster run by one or several parties, using a consensus protocol among its members. Corda's design lets notaries use crash-fault tolerant consensus (Raft) when the operator is trusted, or BFT consensus (the white paper discusses BFT-SMaRt) when it isn't. A network can have several notaries — for example, per jurisdiction — and a state can move from one notary to another with a notary-change transaction.
There are two kinds:
- Validating notaries see the full transaction and check its validity too, not just uniqueness. Stronger protection — a notary won't sign an invalid transaction — but the notary learns the transaction's contents.
- Non-validating notaries see only what's needed: the input state references, the time window, and the notary's own identity. Corda sends them a filtered transaction. Because a Corda transaction's id is the root of a Merkle tree over its components, the sender can reveal only some leaves plus the hashes needed to prove they belong to the transaction ("tear-offs"). More private, but a party could notarise an invalid transaction that spends someone else's state — the victim would detect it on verification, but their state is now consumed.
The same tear-off mechanism is used for oracles: a service that attests to an external fact ("the EUR/USD rate at 16:00 was 1.0832") signs only the part of the transaction containing that fact, without seeing the rest.
8.5 Backchain verification and its privacy cost
When B receives a state, it has to know that state is real — that it was created by a valid chain of transactions going back to an issuance. So Corda nodes perform backchain resolution: they request and verify the full history of transactions that led to each input state.
This is where Corda's privacy model has a weak point the white paper itself discusses: verifying the backchain reveals history to the recipient. If a cash state has passed through 50 owners, the 51st sees all 50 previous transactions. Ideas explored to reduce this include periodically re-issuing assets to "cut" the chain, confidential identities (fresh keys per transaction so history doesn't reveal who was involved), and secure enclaves or zero-knowledge proofs to verify history without seeing it.
8.6 Upgrades and backwards compatibility
A ledger that lasts decades has a special problem: old transactions must remain verifiable forever, because backchain resolution re-runs the contract code that governed them. And every node is run by a different organisation with its own upgrade schedule. Corda's approach has several layers:
- Contract code travels with the transaction. Contracts are in JAR attachments referenced by hash. A node verifying a 2019 transaction in 2026 loads the exact 2019 contract JAR. That's why contract execution must be deterministic and sandboxed: the same code must give the same answer on any future JVM.
- Contract constraints decide which JARs are allowed to govern a state, which in turn decides how contract code can be upgraded:
- Hash constraints pin a state to one exact JAR. Upgrading requires an explicit contract upgrade transaction, authorised by all participants, that consumes old states and re-issues them under the new contract.
- Whitelisted zone constraints let the network operator list acceptable JAR hashes per contract.
- Signature constraints (introduced in Corda 4) accept any JAR signed by a given key. The developer can release a new version and states move to it in the normal course of transactions — an implicit upgrade — with a rule preventing a transaction from moving a state back to an older version.
- Stable platform APIs and wire format. From Corda 1.0 (2017), R3 committed to API and wire stability: CorDapps written against a stable API keep working on newer platform versions. Corda's AMQP-based serialisation supports schema evolution — adding nullable properties, removing properties, evolving enums — so a node running a newer version of a data class can read messages and states written with an older one, and vice versa within limits.
- Network parameters and minimum platform version. The network operator publishes signed network parameters, including a minimum platform version. Features that need every node to understand them are only activated once the minimum is raised — after nodes have upgraded — so new nodes never send old nodes something they can't process. Parameter changes are proposed in advance and nodes accept them before a flag day.
This is a strong lesson for any long-lived distributed system, not just ledgers: version the code that interprets data along with the data, keep the wire format evolvable, and gate new behaviours behind a network-wide minimum version. Kafka's inter-broker protocol version, Cassandra's mixed-version rolling upgrades and Protocol Buffers' field rules all follow similar thinking.
9. Comparing the Designs
flowchart TB
subgraph BTC["Bitcoin — order-execute, broadcast"]
direction LR
b1["Broadcast tx to all"] --> b2["Miners order into blocks<br/>(PoW)"] --> b3["Every node executes<br/>and validates everything"]
end
subgraph FAB["Fabric — execute-order-validate"]
direction LR
f1["Endorsers simulate<br/>(policy-selected)"] --> f2["Orderers order blocks<br/>(Raft or BFT)"] --> f3["Every channel peer validates<br/>(policy + MVCC)"]
end
subgraph COR["Corda — point-to-point"]
direction LR
c1["Parties build and verify<br/>(contracts + backchain)"] --> c2["Notary checks uniqueness<br/>(Raft or BFT)"] --> c3["Only participants store"]
end
| Bitcoin | Ethereum (PoS) | Hyperledger Fabric | Corda | |
|---|---|---|---|---|
| Membership | Open | Open, staked validators | Permissioned (MSP, X.509) | Permissioned (network map, X.509) |
| Data model | UTXO | Accounts + contract storage | Key-value world state | UTXO-style states |
| Execution | Order, then execute everywhere | Order, then execute everywhere | Execute on endorsers, order, validate everywhere | Parties execute and verify, notary checks uniqueness |
| Who sees a transaction | Everyone | Everyone | Members of the channel (or private collection) | Only participants (and a validating notary) |
| Consensus | PoW, longest chain | Gasper | Raft (CFT) or SmartBFT ordering | Per-notary Raft or BFT |
| Finality | Probabilistic | ~13 min to finalised checkpoint | Immediate once in a block | Immediate once notarised |
| Contract language | Limited script | EVM languages (Solidity) | Go, Java, JavaScript | JVM languages (Kotlin, Java) |
| Throughput order of magnitude | Single-digit tx/s | Tens of tx/s on L1 | Thousands of tx/s (paper: 3,500+) | Depends on notary and flows; not a global bottleneck |
10. When Is a Distributed Ledger the Right Tool? An Honest Assessment
10.1 What you pay
A ledger costs much more than a database for the same workload:
- Throughput and latency. A single PostgreSQL primary handles tens of thousands of simple transactions per second with millisecond latency. Fabric's paper reports thousands with hundreds of milliseconds; public chains are far lower.
- Operational complexity. Each member runs nodes, certificate authorities, upgrades, and key management. Upgrades need coordination across organisations (see §8.6).
- Governance. Who admits members? Who decides on contract upgrades? Who handles a member that's been compromised? These are legal questions, and the ledger doesn't answer them.
- Immutability is a liability as well as a feature. Correcting errors means compensating transactions, not edits. Data-protection rules such as the right to erasure conflict with immutable replicated personal data, so designs keep personal data off-chain and store only hashes.
- The oracle problem. A ledger can only guarantee the integrity of what's inside it. If a shipment record says "container arrived", the ledger can't know whether that's true. The trust problem moves to whoever writes the data.
10.2 A decision procedure
Wüst and Gervais's paper "Do You Need a Blockchain?" (2018) gives a short decision flow. In our own form:
flowchart TB
Q1{"Do you need to store shared state?"} -->|"No"| DB["No ledger — use a database"]
Q1 -->|"Yes"| Q2{"Are there multiple writers?"}
Q2 -->|"No"| DB
Q2 -->|"Yes"| Q3{"Is there a trusted third party<br/>everyone accepts to operate it?"}
Q3 -->|"Yes"| DB2["Use a database run by that party<br/>(maybe with signed, verifiable audit logs)"]
Q3 -->|"No"| Q4{"Are all writers known?"}
Q4 -->|"No"| PL["Permissionless ledger"]
Q4 -->|"Yes"| Q5{"Is public verifiability needed?"}
Q5 -->|"Yes"| PUB["Public permissioned ledger"]
Q5 -->|"No"| PRIV["Private permissioned ledger —<br/>but first ask again whether a jointly governed<br/>database with signed logs would do"]
Most enterprise proposals end at the "trusted third party" question. A consortium almost always can set up a jointly owned operating company, governed by contract, running an ordinary database with access controls — and the participants' real fear (rewriting history) can be addressed directly with tamper-evident logs rather than consensus.
10.3 Tamper evidence without a blockchain
Many requirements described as "we need a blockchain" are really "we need to detect tampering". That's a much easier problem:
- Append-only Merkle-tree logs with signed tree heads, as used by Certificate Transparency (RFC 6962): the log operator can't remove or alter an entry without producing two inconsistent signed tree heads, which any auditor can catch. Google's Trillian is an open-source implementation. Sigstore's Rekor uses the same idea for software supply chains.
- Signed records in an ordinary database: each party signs its own writes, so no operator can forge them.
- Hash-chained audit tables and periodic publication of a digest somewhere public (even on a public blockchain — a single hash costs very little).
- Ledger databases such as SQL Server's ledger tables, or Amazon QLDB (which AWS announced it would discontinue in 2025, pointing customers to Aurora PostgreSQL — a hint at how much demand there was for a separate ledger product).
These give one operator, database performance and familiar tooling, while making tampering detectable by everyone.
10.4 Where ledgers have been used — and where they haven't worked
Being honest means looking at outcomes:
- Cryptocurrencies are the clearest case where a permissionless ledger is necessary by definition: the whole point is to have no operator.
- Large enterprise consortium projects have a mixed record. Maersk and IBM's TradeLens shipping platform, built on Hyperledger Fabric, announced its shutdown in late 2022, citing insufficient industry adoption. The Australian Securities Exchange halted its project to replace its CHESS settlement system with a distributed-ledger-based design in November 2022 and wrote off roughly AUD 250 million. In both cases the main problems reported were adoption, governance and delivery, not the consensus protocol — which is exactly the point: the hard part of a multi-party system is the multiple parties.
- Inter-institution workflows with clear asset ownership and point-to-point sharing (Corda's niche — some repo and trade-finance platforms) fit the model better, because the ledger replaces reconciliation between parties' own databases.
The pattern: ledgers tend to succeed when removing an operator is itself the product, or when they replace bilateral reconciliation between institutions that already each keep their own records. They tend to fail when used as a slower, more complex database for data that a single party could run.
Interview honesty
If an interviewer asks you to "design X on a blockchain", it's fine — often expected — to ask who the parties are and whether a trusted operator exists, and to explain the costs. Showing that you can say "this doesn't need a blockchain, here's a database with a signed audit log, and here's what would change my mind" is a strong answer.
11. What These Systems Got Right, What They Got Wrong, and Their Successors
Bitcoin — right: open membership with Sybil resistance by cost; a remarkably simple protocol; incentive design that has kept the system running since January 2009. Wrong or costly: throughput and latency; energy use; finality that's never absolute; mining centralisation in pools. Successors: proof-of-stake chains, layer-2 payment channels, BFT-finality chains.
Fabric — right: separating execution from ordering; pluggable consensus; per-application endorsement policies; ordinary programming languages. Wrong or costly: wasted work from MVCC invalidations under contention; operational weight (CAs, MSPs, channels, chaincode lifecycle across organisations); a long period with only crash-fault-tolerant ordering. Later: Raft ordering, decentralised chaincode lifecycle in v2.0, BFT ordering in v3.0.
Corda — right: privacy by not broadcasting; separating validity from uniqueness; serious attention to long-term upgrades and stable APIs. Wrong or costly: backchain resolution leaks history and grows with an asset's age; non-validating notaries trade safety for privacy; the JVM determinism requirement is hard to meet completely. Later: confidential identities, work on reissuance and chain-snipping, and more.
The idea that has spread most widely is not "blockchain" itself, but its components: Merkle trees for efficient verification (also in Git, Dynamo's anti-entropy, Certificate Transparency and IPFS), hash chains for tamper evidence, BFT consensus (HotStuff ideas in many systems) and deterministic replicated execution (shared with databases like Calvin).
12. Lessons for System Design Interviews
- Name the trust model first. Crash faults (Raft/Paxos), Byzantine faults with known members (PBFT, HotStuff), or open membership (PoW/PoS). Each costs much more than the one before.
- Double-spending is an ordering problem. Signatures prove authorisation; consensus decides order between conflicting transactions.
- Finality types: probabilistic (Nakamoto), checkpoint-based (Casper FFG), immediate (BFT per block, Fabric, Corda notary). Know the latency of each.
- Safety vs liveness under partition: Nakamoto keeps going and may reorganise; BFT halts.
- Execute-order-validate is optimistic concurrency. Expect invalidations under contention; design keys to avoid hotspots.
- Privacy changes the architecture. Broadcast-to-all ledgers can't keep data private between members; channels, private collections or point-to-point designs are needed.
- Long-lived systems need upgrade design from day one: version code with the data, evolvable wire formats, and network-wide minimum versions.
- Often the right answer is a database plus tamper-evident logs. Be ready to argue it.
13. Interview Questions
1. Why can't Bitcoin use PBFT?
PBFT needs a known set of n participants with at most f < n/3 faulty — the bound depends on counting identities. Bitcoin has open, anonymous membership, so an attacker can create unlimited identities (Sybil attack). Proof-of-work makes voting power proportional to computation, which can't be multiplied for free. PBFT's O(n²) messages also wouldn't scale to thousands of anonymous nodes.
2. Explain why Bitcoin finality is probabilistic and how a merchant should choose a confirmation count.
Any block can be replaced if a competing branch with more work appears, so a transaction is never certainly final. The probability that an attacker with share q < 0.5 overtakes z blocks falls exponentially with z. A merchant chooses z so that the expected loss (value × reversal probability, under an assumption about the largest attacker's share) is acceptable — few or no confirmations for small purchases, many more for large ones.
3. What can an attacker with 51% of hash power do? What can't they do?
They can double-spend their own coins by replacing recent history with a longer private chain, and censor transactions or orphan others' blocks. They can't spend others' coins (no keys), create coins beyond protocol rules, or make honest nodes accept invalid blocks — full nodes validate every block regardless of its work.
4. How does Tendermint's behaviour under a network partition differ from Bitcoin's?
Tendermint needs more than two thirds of voting power to commit each block. If a partition prevents that, it stops producing blocks — safety over liveness — and no committed block is ever reverted. Bitcoin keeps producing blocks on both sides; when the partition heals, the side with less work is orphaned and its transactions may be reversed — liveness over safety.
5. Walk through Fabric's execute-order-validate flow. Why did it move execution before ordering?
Client sends proposals to endorsers required by the policy; they simulate chaincode and sign read/write sets; the client submits the endorsed transaction to the ordering service, which orders it into blocks without executing; peers validate endorsement policies and check read-set versions in block order, applying valid write sets and flagging invalid ones. Moving execution first allows parallel execution, tolerates non-deterministic code (divergent results fail endorsement instead of forking state), limits who sees data, and makes trust per application.
6. Two Fabric transactions update the same key in the same block. What happens and how would you design around it?
Both were simulated against the same version. In validation, the first in block order passes and updates the version; the second's read set is now stale, so it's flagged invalid (MVCC conflict) and its write set is ignored. The client must resubmit. Design around it with delta keys (each transaction writes a new key like counter-txid and reads sum them), sharding hot keys, or batching updates.
7. How does Corda prevent double-spends without a global broadcast?
Each state names a notary. A transaction consuming states must be signed by their notary, which keeps a record of consumed state references and refuses to sign if any input was already consumed. Validity (contracts and signatures) is checked by the parties, uniqueness by the notary. Notaries can be Raft or BFT clusters.
8. What is the trade-off between validating and non-validating notaries in Corda?
A validating notary sees the full transaction and checks its contracts, so it won't sign an invalid transaction — but it learns the transaction's contents. A non-validating notary sees only a filtered transaction (input references, time window), which is more private, but it could notarise an invalid transaction that consumes someone's state; the problem is detected only when parties verify, after the state is already marked consumed.
9. Why does Corda need contract code to be deterministic and attached to transactions?
New owners verify an asset's whole backchain, re-running the contract code that governed each historical transaction, possibly years later on different JVMs. If the code weren't pinned (attachments by hash) and deterministic, verification results could differ between nodes or over time, and parties would disagree about whether an asset is valid.
10. A consortium of 8 hospitals wants a "blockchain" to share patient referral records. What do you recommend?
Ask the decision questions: multiple writers yes; is there an acceptable operator — a jointly governed health information exchange often exists or can be created. Patient data has erasure and confidentiality requirements that conflict with replicated immutable storage. Recommend a database run by the exchange with per-hospital access control, records signed by the writing hospital, and an append-only Merkle-tree audit log with published signed tree heads so any hospital can detect tampering. Reconsider a permissioned ledger only if no operator is acceptable — and even then keep personal data off-ledger.
11. Compare Fabric's execute-order-validate with Calvin's order-execute design.
Calvin agrees on order first and then executes deterministically everywhere, so there are no aborts from conflicts — it's pessimistic and requires deterministic code, with one trusted operator. Fabric executes first on a few endorsers, then orders, then validates with an optimistic version check, so conflicts become invalid transactions — it tolerates non-deterministic code and mutual distrust (signed endorsements), at the cost of wasted work under contention. Fauna is in between: speculative execution, ordering, then deterministic validation.
12. What does Casper FFG's "accountable safety" mean?
If two conflicting checkpoints are both finalised, then at least one third of the total stake must have signed votes that violate a slashing rule — and those votes are evidence. So a safety failure always comes with provable blame and a large, destroyable stake, which makes it expensive. It doesn't prevent the failure; it guarantees accountability.
Further Reading
- S. Nakamoto. Bitcoin: A Peer-to-Peer Electronic Cash System. 2008. — primary source for §§2–3, including the confirmation table.
- E. Androulaki et al. Hyperledger Fabric: A Distributed Operating System for Permissioned Blockchains. EuroSys 2018. — primary source for §7.
- M. Hearn (and later revisions with R. G. Brown). Corda: A Distributed Ledger. R3 technical white paper, 2016 onwards. — primary source for §8.
- J. Garay, A. Kiayias, N. Leonardos. The Bitcoin Backbone Protocol: Analysis and Applications. EUROCRYPT 2015.
- I. Eyal, E. G. Sirer. Majority Is Not Enough: Bitcoin Mining Is Vulnerable. Financial Cryptography 2014.
- V. Buterin, V. Griffith. Casper the Friendly Finality Gadget. 2017. And V. Buterin et al., Combining GHOST and Casper (Gasper), 2020.
- E. Buchman, J. Kwon, Z. Milosevic. The latest gossip on BFT consensus (Tendermint). 2018.
- K. Wüst, A. Gervais. Do You Need a Blockchain? Crypto Valley Conference 2018.
- C. Gorenflo, S. Lee, L. Golab, S. Keshav. FastFabric: Scaling Hyperledger Fabric to 20,000 Transactions per Second. ICBC 2019.
- B. Laurie, A. Langley, E. Kasper. Certificate Transparency. RFC 6962, 2013.
Related Archon pages: Byzantine Fault Tolerance · Practical BFT · FLP Impossibility · Web3 Security · Hashing Algorithms · Calvin & FaunaDB