Introduction to Distributed Ledgers
Understand how distributed ledgers function, the consensus mechanisms that secure them, and the various ledger architectures used.
Summary
Read Summary
Flashcards
Save Flashcards
Quiz
Take Quiz
Quick Practice
How does a distributed ledger record information differently than a central database?
1 of 17
Summary
Distributed Ledger Overview
What Is a Distributed Ledger?
A distributed ledger is a record-keeping system spread across many computers, called nodes, rather than stored in a single central database. Instead of one bank or institution maintaining the authoritative version, every participant in the network maintains an identical copy of the ledger. Think of it like giving every person in a group their own copy of a shared notebook—when someone writes a new entry, everyone updates their notebook simultaneously.
The fundamental principle behind distributed ledgers is trust through transparency. Instead of relying on a central authority (like a bank) to tell you the truth about your account balance, you can verify the ledger's state yourself. You don't need to trust any single institution; you trust the system because it's designed so that deception is nearly impossible.
How Synchronization Works
Nodes don't operate independently. They use defined rules to synchronize with each other. When a transaction is proposed, the network must agree that it's valid before recording it. This agreement process, called consensus, ensures all copies of the ledger remain consistent even as new transactions arrive continuously.
Data Replication and Immutability
One of the most important security features of a distributed ledger is that no single participant can secretly alter or delete data. Here's why: since thousands of copies exist, any attempt to change one copy would be immediately obvious because it wouldn't match all the others.
When a new transaction arrives, the network follows this sequence:
Validation: Participating nodes independently verify that the transaction follows all agreed-upon rules. For example, in a financial system, they check that the sender actually has sufficient funds.
Approval: Once enough nodes approve (the exact number depends on the specific system), the transaction is accepted.
Recording: The transaction is added to a new block or record and becomes part of an immutable chain of history. "Immutable" means once recorded, the transaction cannot be changed without detection.
Distribution: Every node updates its copy of the ledger to include the new block.
This process means that altering historical data would require changing it on thousands of computers simultaneously—a practical impossibility.
Nodes and the Verification Process
Nodes are simply computers that participate in the network. Each node stores a complete copy of the ledger and performs two critical functions:
Independent Verification: Before a transaction can be accepted, nodes independently verify its legitimacy. They don't trust other nodes or a central authority—they check the facts themselves. For financial transactions, each node verifies that the sender has enough balance. This decentralized verification is what enables the network to operate without a trusted intermediary.
Consensus Building: The network doesn't automatically accept every transaction. Instead, nodes must reach consensus—a supermajority agreement—before a transaction is permanently recorded. This prevents rejected or fraudulent changes from being unilaterally imposed by any single participant or small group.
Transparency: Because each node maintains the entire transaction history, anyone can trace the complete activity on the network. This creates an auditable record that cannot be hidden or selectively revealed.
Benefits of Distributed Ledgers
Distributed ledgers offer several advantages that traditional centralized systems cannot match:
Decentralization: By eliminating the need for a single trusted intermediary (like a bank), the system doesn't depend on any one organization remaining honest or competent.
Tamper-evident security: The design makes it nearly impossible to alter past records without detection. The redundancy across thousands of nodes means unauthorized changes are caught immediately.
Auditable transparency: The complete history is transparent and traceable. Regulators, users, and auditors can all independently verify what actually happened on the network.
Financial transaction recording: Distributed ledgers enable secure recording and transfer of value (money, assets, etc.) without requiring a central bank or financial institution.
<extrainfo>
The benefits section might not be directly tested, but understanding why distributed ledgers are useful will help you grasp why various consensus mechanisms and architectural choices exist.
</extrainfo>
Consensus Mechanisms
Why Consensus Matters
The most critical challenge in a distributed ledger is getting thousands of independent computers to agree on the same state. Consensus is the formal mechanism nodes use to reach this agreement.
Without consensus, you'd face the double-spending problem: Imagine you transfer $10 to Alice and $10 to Bob, but you only have $10 total. Which payment is valid? In a centralized bank, the bank decides. In a distributed system, nodes must collectively decide. Consensus mechanisms prevent situations like this by establishing rules that all nodes follow to validate and order transactions.
Consensus also ensures ledger consistency: Even if some nodes are slow, offline, or even acting maliciously, the remaining honest nodes can still agree on which transactions are valid. This keeps all copies of the ledger synchronized.
Proof of Work
Proof of Work is a consensus mechanism that requires nodes to solve a difficult computational puzzle before they can add a new block to the ledger. Here's how it works:
A node that wants to propose a new block must solve a puzzle (usually cryptographic in nature). Solving the puzzle requires significant computational effort—the node must try millions or billions of combinations before finding a solution. The key insight: it's hard to solve the puzzle, but easy for other nodes to verify that a solution is correct.
Once a node solves the puzzle, it broadcasts the new block and its solution to the network. Other nodes quickly verify the solution, and if it's correct, they accept the new block. The node that solved the puzzle receives a reward (typically newly created cryptocurrency or transaction fees).
Difficulty Adjustment: The puzzle difficulty is calibrated to control how quickly new blocks are created. If too many nodes are competing to solve puzzles, the difficulty increases automatically, so blocks are created at a predictable rate (e.g., every 10 minutes). This prevents the ledger from becoming flooded with blocks.
The security of Proof of Work comes from its computational cost: to fraudulently change past transactions, an attacker would need to redo all the computational work of every block since the one they want to change, all while the honest network continues adding new blocks. This becomes prohibitively expensive.
<extrainfo>
Proof of Work is energy-intensive and slow, which is why other mechanisms were invented. Understanding these tradeoffs will help you see why different networks make different choices.
</extrainfo>
Practical Byzantine Fault Tolerance
Practical Byzantine Fault Tolerance (PBFT) is a different consensus approach inspired by a classical computer science problem: how can a group of generals coordinate a battle when some might be traitors sending conflicting messages?
In PBFT, a fixed set of validators are responsible for reaching consensus. The algorithm works by exchanging multiple rounds of messages among these validators:
In each round, validators communicate with each other about which transactions should be accepted.
Through message exchanges and voting, they can identify which transactions have the support of the honest majority.
The system can tolerate up to one-third of validators being faulty or actively dishonest—as long as two-thirds are honest, consensus is achievable.
The critical difference from Proof of Work: PBFT doesn't require solving computational puzzles. Instead, it uses cryptographic voting among a known group. This makes PBFT faster and more energy-efficient, but it requires that participants are identified and trusted not to be the one-third of bad actors. It also doesn't scale well to networks with millions of participants—it works best with tens or hundreds of validators.
Other Consensus Types
<extrainfo>
Proof of Stake: Instead of solving computational puzzles, validators are chosen based on how much cryptocurrency they lock up as collateral. If a validator approves fraudulent transactions, their stake is forfeited ("slashed"). This makes attacking the network expensive because bad actors lose their investment.
Delegated Proof of Stake: Token holders don't validate transactions themselves; instead, they vote to elect a smaller group of delegates who do the validation. This reduces the number of active validators while keeping the system relatively decentralized through voting.
</extrainfo>
Ledger Architectures
So far we've discussed what distributed ledgers are and how they reach consensus. But there are different ways to actually structure and organize the transactions within a ledger. Two major architectures are the blockchain and the directed acyclic graph.
Linear Chain of Blocks
The most famous architecture is the blockchain, a linear chain of blocks. Here's how it's organized:
Transactions are grouped into blocks. Each block contains a batch of transactions plus a cryptographic hash of the previous block. A hash is like a unique fingerprint for data—even a tiny change to the previous block produces a completely different hash.
By including the previous block's hash, each block cryptographically references the one before it, creating a chain. This chain is what makes the ledger immutable: to fraudulently change a transaction buried five blocks in the past, you'd have to recalculate the hash of that block, then recalculate the hash of the next block (since its hash included the modified previous hash), and so on for all five blocks. Meanwhile, the network continues adding new blocks, so you'd have to keep recalculating forever. It's this computational cascade that makes blockchain tampering impractical.
The linear structure is intuitive: transactions are processed in a strict sequence, and the ledger has a clear "head" (the most recent block).
Directed Acyclic Graph Architecture
A directed acyclic graph (or DAG) is an alternative way to organize transactions that can be more flexible than a linear chain. In a DAG:
Transactions are recorded as vertices (points or nodes) connected by edges (directional lines).
A transaction can reference multiple previous transactions rather than just one.
The structure is acyclic, meaning you cannot follow the connections in a circle—there's no path that leads back to where you started.
This architecture enables some practical advantages. Because transactions can reference multiple predecessors, they can be confirmed more quickly—a new transaction can be accepted once a few previous transactions approve it, rather than waiting for an entire block to be processed. This can result in higher throughput (more transactions processed per second) compared to traditional linear blockchains.
However, DAGs introduce complexity: determining the canonical order of transactions becomes trickier without a strict linear sequence, and consensus algorithms must be carefully designed to handle this flexibility.
Permissioned vs. Permissionless
An important architectural choice is who is allowed to participate in the network:
Permissionless ledgers allow anyone to join the network, read the ledger, and participate in consensus without permission. These are maximally decentralized but can be slower and use more energy (since anyone can try to solve puzzles or validate transactions).
Permissioned ledgers restrict who may read or write data, or who may participate in consensus. For example, a bank might create a private ledger where only authorized institutions can add transactions. This allows tighter control and better performance but requires trusting the entity that grants permissions.
Common Misconceptions to Avoid
Understanding what a distributed ledger is not is just as important as understanding what it is:
"A Distributed Ledger Is Always a Blockchain"
This is false. Blockchains are a type of distributed ledger with a linear chain structure. But directed acyclic graphs and other structures also qualify as distributed ledgers. Don't assume distributed ledger = blockchain—they're not synonymous.
"Consensus Means All Nodes Process Transactions at the Same Speed"
This is a common confusion. Consensus only means that nodes eventually agree on the same order and state of transactions—not that they process them simultaneously at identical speeds. A node might be offline for an hour, then reconnect and synchronize to match the rest of the network. The ledger's state becomes consistent, but not through real-time simultaneity.
"Decentralization Means There Are No Rules"
This misses the point entirely. Decentralized systems absolutely have rules—the consensus mechanism enforces those rules. Instead of a central authority deciding what's allowed, the network's protocol (its ruleset) decides. Breaking the rules means other nodes will reject your transactions. Decentralization shifts power from a central institution to the rules themselves.
Flashcards
How does a distributed ledger record information differently than a central database?
It records information across many computers (nodes) rather than in one location.
What does each node in a distributed ledger store?
A complete copy of the ledger.
Who can verify the state of a distributed ledger without a central authority?
The users.
What is the primary benefit of replication in a distributed ledger?
No single participant can alter or delete data without detection.
What happens once enough nodes approve a proposed transaction?
It is added to a new block or record in an immutable chain.
Is a distributed ledger always a blockchain?
No, other structures like directed acyclic graphs also qualify.
What is the purpose of a consensus mechanism in a distributed ledger?
To agree on which new entries are valid and ensure all copies remain identical.
What fraudulent activity does consensus primarily prevent?
Double-spending.
What does Proof of Work require nodes to do before adding a block?
Solve a computational puzzle.
What aspect of Proof of Work controls the speed of block creation?
The puzzle difficulty.
What percentage of validators can be faulty for the PBFT algorithm to still function?
Up to one-third ($1/3$).
How do validators participate in a Proof of Stake system?
By locking up cryptocurrency as collateral.
What is the role of token holders in Delegated Proof of Stake (DPoS)?
They elect a smaller group of delegates to validate transactions.
How are blocks linked together in a linear chain architecture?
Each block references the cryptographic hash of the previous block.
How are transactions recorded in a Directed Acyclic Graph (DAG)?
As vertices connected by edges without forming cycles.
What defines a permissionless distributed ledger?
Any participant can join and contribute to consensus.
What is the primary restriction in a permissioned distributed ledger?
Restrictions on who may read or write to the ledger.
Quiz
Introduction to Distributed Ledgers Quiz Question 1: When a transaction is proposed, what must participating nodes do?
- Verify that it follows the agreed‑upon rules. (correct)
- Immediately add it to the ledger without checks.
- Ignore it until a central authority approves.
- Broadcast it to only a subset of nodes.
Introduction to Distributed Ledgers Quiz Question 2: What happens after enough nodes approve a proposed transaction?
- The transaction is added to a new block or record. (correct)
- The transaction is discarded permanently.
- The transaction is sent back for further verification.
- The transaction remains pending indefinitely.
Introduction to Distributed Ledgers Quiz Question 3: What determines whether a transaction is added to the ledger?
- Consensus among the nodes. (correct)
- Approval from a single administrator.
- Random selection of a node.
- Time of day when the transaction is submitted.
Introduction to Distributed Ledgers Quiz Question 4: How are unilateral tampering attempts handled in a distributed ledger?
- Rejected changes are reflected across the network, preventing tampering. (correct)
- They are allowed as long as the attacker controls a single node.
- They cause the entire network to shut down.
- They are hidden from other participants.
Introduction to Distributed Ledgers Quiz Question 5: What does a tamper‑evident design provide?
- Resistance to unilateral data changes. (correct)
- Ability for any node to edit past records.
- Complete anonymity of all participants.
- Automatic deletion of old transactions.
Introduction to Distributed Ledgers Quiz Question 6: How does a transparent and auditable history benefit users?
- Anyone can trace all activity on the network. (correct)
- Only the network operator can view transactions.
- Transactions become untraceable after verification.
- Audits are performed exclusively by external auditors.
Introduction to Distributed Ledgers Quiz Question 7: What does consensus ensure about copies of the ledger?
- All copies remain identical. (correct)
- Each copy contains unique private data.
- Copies diverge after each new block.
- Only the majority copy is considered valid.
Introduction to Distributed Ledgers Quiz Question 8: How does consensus help prevent fraudulent activities?
- By preventing double‑spending and similar fraud. (correct)
- By allowing anyone to alter past transactions.
- By requiring a central authority to approve each trade.
- By obfuscating transaction amounts.
Introduction to Distributed Ledgers Quiz Question 9: What must nodes do in a proof‑of‑work system before adding a block?
- Solve a computational puzzle. (correct)
- Obtain permission from a central server.
- Sign the block with a private key only.
- Vote on the block’s content.
Introduction to Distributed Ledgers Quiz Question 10: What does the difficulty of the proof‑of‑work puzzle control?
- How quickly new blocks are created. (correct)
- The size of each transaction.
- The number of nodes in the network.
- The amount of stored data per block.
Introduction to Distributed Ledgers Quiz Question 11: What proportion of validators can be faulty while PBFT still works?
- Up to one‑third of validators. (correct)
- Exactly half of the validators.
- All validators must be honest.
- Any number, as long as they are known.
Introduction to Distributed Ledgers Quiz Question 12: In proof‑of‑stake systems, what do validators do to participate?
- Lock up cryptocurrency as collateral. (correct)
- Solve complex mathematical puzzles.
- Obtain permission from a central bank.
- Broadcast random hashes to the network.
Introduction to Distributed Ledgers Quiz Question 13: What does each block in a linear chain reference?
- The hash of the previous block. (correct)
- The hash of the next block.
- A random number generated by the node.
- The public key of the transaction sender.
Introduction to Distributed Ledgers Quiz Question 14: What characteristic defines a permissionless ledger?
- Any participant can join and contribute to consensus. (correct)
- Only a fixed group of validators may participate.
- Read access is restricted to a central authority.
- Transactions must be approved by a governing body.
Introduction to Distributed Ledgers Quiz Question 15: Which statement corrects a common misconception about distributed ledgers?
- They are not always blockchains; DAGs are also distributed ledgers. (correct)
- All distributed ledgers must use a linear chain of blocks.
- Distributed ledgers always require a central bank.
- Every ledger automatically guarantees instant finality.
Introduction to Distributed Ledgers Quiz Question 16: How does a directed acyclic graph (DAG) represent transactions?
- As vertices connected by edges without forming cycles. (correct)
- As sequential blocks linked together by cryptographic hashes.
- As entries in a single linear chain with timestamps.
- As rows in a centralized database table.
Introduction to Distributed Ledgers Quiz Question 17: What term is used for the individual computers that maintain a distributed ledger?
- Nodes (correct)
- Servers
- Clients
- Gateways
When a transaction is proposed, what must participating nodes do?
1 of 17
Key Concepts
Ledger Types
Distributed ledger
Permissioned ledger
Permissionless ledger
Immutability
Decentralization
Consensus Mechanisms
Consensus mechanism
Proof of work
Proof of stake
Practical Byzantine Fault Tolerance
Advanced Structures
Directed acyclic graph (DAG)
Definitions
Distributed ledger
A database that is replicated across multiple nodes, allowing participants to verify transactions without a central authority.
Consensus mechanism
A protocol that enables nodes in a distributed network to agree on the validity and order of new entries.
Proof of work
A consensus method where nodes solve computational puzzles to create new blocks and earn rewards.
Proof of stake
A consensus approach where validators lock up cryptocurrency as collateral to propose and validate new blocks.
Practical Byzantine Fault Tolerance
An algorithm that achieves agreement among nodes even when up to one‑third act maliciously, using multiple rounds of message exchange.
Directed acyclic graph (DAG)
A ledger structure that records transactions as vertices in a graph without cycles, enabling higher throughput than linear chains.
Permissioned ledger
A distributed ledger that restricts read and write access to authorized participants.
Permissionless ledger
An open distributed ledger that allows any participant to join the network and contribute to consensus.
Immutability
The property that once data is added to a ledger, it cannot be altered or deleted without detection.
Decentralization
The distribution of control and verification across many independent nodes, eliminating the need for a single trusted intermediary.