A blockchain is a replicated, append-only log in which entries are grouped into blocks, each linked to the previous one by a cryptographic hash, so altering history is detectable. As computer science it is a way for many parties who do not trust each other to agree on one ordered record without a central authority.
Key concepts
- Hash-linked blocks: each block holds the hash of its predecessor, so changing an old block breaks every later link.
- Merkle trees: hashing transactions in a tree lets anyone verify one entry against a small root.
- Digital signatures: public-key signatures authorise a transaction without revealing the private key.
- Consensus among strangers: proof of work, proof of stake and classic Byzantine protocols are different ways to agree on the next block.
- Fault models and trade-offs: open and permissioned networks, finality, throughput, and the costs of replicating everything everywhere.
- Smart contracts: deterministic programs executed by every node, which makes bugs and limits of determinism matter.
Vocabulary
- Node: a participant that stores and validates the ledger.
- Fork: a divergence in the chain that the protocol must resolve.
- Finality: the point at which a block will not be reverted.
- Permissioned ledger: a distributed ledger whose participants are known and approved.
- Determinism: every node computing the same result from the same inputs.
What to study, in order
- Hash functions and public-key signatures: what each guarantees.
- Implement a hash-linked chain and a Merkle tree in a few dozen lines.
- Study consensus in general first, then how proof of work and proof of stake differ.
- Build a toy ledger of several nodes on a lab network with signed transactions and a fork-resolution rule.
- Read about the limits: scalability, the cost of replication and when an ordinary database is the better design.
Related tags
#cryptography #consensus #distributed-systems #p2p #data-structures