Skip to the content ForoHackers
Log inJoin

Blockchain and distributed ledgers: start here

Blockchain and distributed ledgers
#2941 · · Quote · Report

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

  1. Hash functions and public-key signatures: what each guarantees.
  2. Implement a hash-linked chain and a Merkle tree in a few dozen lines.
  3. Study consensus in general first, then how proof of work and proof of stake differ.
  4. Build a toy ledger of several nodes on a lab network with signed transactions and a fork-resolution rule.
  5. 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

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply