Computer Engineering is coming soon

We're still writing and reviewing the notes for every subject, and we'll open it when every subject is ready. Meanwhile you can practise aptitude, ask Aria about any subject, or see the branches that are ready.

History of blockchain and decentralisation

A clear, exam-focused history of blockchain and decentralisation from early timestamping and Merkle structures to Bitcoin and later developments, explaining key concepts and why decentralisation matters for engineers.

Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.

Why it matters

Blockchain history and decentralisation explain why systems like Bitcoin and Ethereum exist and how design choices (e.g., permissionless vs permissioned, proof-of-work vs other consensus) affect security, scalability and trust. An engineer uses this when designing or analysing blockchain systems, choosing consensus, evaluating attack models and explaining why decentralised designs are adopted in finance, supply chains and other domains.

Key ideas

  • Decentralisation: decentralisation is a property of a system where control, decision-making or authority is distributed among multiple independent parties rather than concentrated in a single central authority. Precise definition for blockchain work: "A system is decentralised if there is no single party whose removal or misbehaviour can unilaterally change the canonical state of the ledger." Assumption: network connectivity between honest nodes; if a single party controls a majority of a critical resource (hash power, stake, identities), decentralisation may be effectively broken.

  • Permissionless (often public) vs Permissioned (often private/consortium): A permissionless blockchain allows anyone to join and participate as full nodes or miners/validators; a permissioned blockchain restricts who may validate or write blocks (typical for enterprise consortia). Note: public/private visibility and permissionless/permissioned access are orthogonal properties.

  • Consensus: consensus is the process by which nodes agree on a single history of transactions (the canonical ledger). Formal statement: "A consensus protocol must satisfy safety (two honest nodes never decide conflicting histories) and liveness (honest proposals eventually get decided), under stated fault and network assumptions." Typical assumptions: bound on number or type of faulty nodes, synchrony/partial synchrony.

  • Proof-of-Work (PoW): PoW is a resource-based consensus method where participants solve computational puzzles (finding a nonce whose block hash meets a target difficulty). Exact property: PoW makes block creation probabilistically proportional to compute power; assuming an adversary controls <50% of total compute, the longest-chain rule gives probabilistic finality.

  • Merkle tree: a Merkle tree is a binary tree of hashes where leaf nodes are transaction hashes and each internal node is H(left || right). It gives efficient proofs that a transaction is included in a block: an inclusion proof is O(log n) hashes. Assumption: secure hash function. In Bitcoin specifically, pairs are hashed with double SHA-256 and if there is an odd leaf at a level, the last hash is duplicated.

  • Timestamping: cryptographic timestamping creates evidence that data existed at or before a time by embedding data hashes into an ordered structure (hash chain or trusted timestamp). Early systems used hash chaining to link document timestamps so older timestamps anchor later ones.

  • Double-spend problem: the double-spend problem in digital cash is the risk that the same digital token is spent more than once. Blockchain and consensus solve this by ordering transactions globally and rejecting conflicting spends.

  • Immutability (tamper-evidence): A ledger is immutable in practice if changing a past block requires an attacker to re-run sufficient work (PoW) or gain control over consensus resources; statement: "Under PoW, if the cost to recompute work for k blocks exceeds attacker's resources or economic value gained, the ledger is secure for k confirmations." Assumptions: cost model for hash power, honest majority.

Diagram to draw for exams: Draw a vertical chain of boxes labelled Block 0 (Genesis), Block 1, Block 2, ... Block n. Inside each box write: header: version, previous_hash, merkle_root, timestamp, difficulty/target (nBits), nonce; body: list of transactions T1, T2,... Draw arrows from each block's previous_hash field to the previous block. Beside Block i, draw a small binary tree showing leaf nodes as H(T1)..H(T4) and internal nodes as H(left||right), label root as merkle_root.

Derivation commonly asked: why hash pointers make tampering detectable. Step-by-step:

  1. Block i contains hash pointer h_{i-1} = H(block_{i-1}).
  2. If an adversary modifies block_{i-1}, the recomputed hash H(modified block_{i-1}) ≠ h_{i-1} with overwhelming probability (by second-preimage/collision resistance).
  3. Block i still stores h_{i-1}; node verifying calculates H(block_{i-1}) and finds mismatch, so tampering is detected.
  4. To hide change, adversary must change block_i to include H'(block_{i-1}); that changes H(block_i) and so on to the tip — so adversary must recompute work for all subsequent blocks (in PoW systems), which is costly.

Formulas

Probability(attacker mines next block) = q — q is the attacker's fraction of total mining (hash) power (unitless). Applies in PoW when mining is proportional to hash rate.

Expected time to find a block = 1 / (H_total * p_succ) — where H_total is total hashes per second (hash/s), p_succ is probability a single hash meets target; unit seconds. Applies to simplified PoW model.

Height(block) = number of blocks preceding it (genesis has height 0) — integer; used when counting confirmations.

Inclusion proof size ≈ O(log2(N)) hashes — N is transactions in a block. Units: number of hash values. Applies to Merkle trees.

Attack success probability after k confirmations decreases exponentially in k when q < 0.5 — intuitive statement: more confirmations (k) rapidly reduce the chance a q-fraction attacker can rewrite history. For exact probabilities, see the Bitcoin whitepaper’s Poisson model.

Note: exam students should memorise syntax/terms, not heavy formulas for history; focus on definitions and assumptions.

Worked examples

Example 1 — Model answer (history timeline, exam long question): Question: "Describe the key events that led to Bitcoin and explain how they contributed to blockchain design." Model answer (structured, full marks):

  1. Early cryptographic primitives (1970s–1990s): public-key cryptography and secure hash functions gave tools for digital signatures and hash chaining (define both). These primitives enable authentication and tamper-evidence.
  2. Merkle trees (Ralph Merkle, 1979): introduced efficient hash trees enabling compact proofs of inclusion and integrity of many items. Contribution: allowed blocks to commit efficiently to many transactions.
  3. Timestamping by Haber & Stornetta (1991): proposed linking document hashes in a chain to create tamper-evident timestamps. Contribution: the idea of chaining hashes across time.
  4. Attempts at digital cash and decentralised money (e.g., Hashcash by Adam Back, 1997; Bit Gold by Nick Szabo, c. 1998–2005; RPOW by Hal Finney, 2004): introduced ideas of proof-of-work and scarcity in digital tokens. Contribution: showed techniques to create costliness and uniqueness without central authority.
  5. The Byzantine Generals problem and consensus research (Lamport et al., 1982): formalised faults in distributed systems and motivated robust consensus protocols.
  6. Satoshi Nakamoto (2008) combined PoW, hash chains, peer-to-peer networking and incentives (block rewards) in the Bitcoin whitepaper; Bitcoin launched 2009 with genesis block. Contribution: first practical, permissionless system achieving distributed consensus and preventing double-spend without a central authority.
  7. Later developments: altcoins, smart contracts (Ethereum whitepaper 2013, mainnet 2015), private/consortium blockchains (Hyperledger), and research on scalability and alternative consensus (PoS; PBFT, 1999). Explain how each step addressed limitations (e.g., Ethereum for programmability, PBFT for low-latency permissioned systems). End with summary sentence linking historical ideas to modern trade-offs.

Example 2 — Small numerical tamper-detection demonstration (simplified hash): Question: "Show with a small example how changing a transaction in Block 1 affects later blocks." Setup (simple hash H defined as sum of ASCII codes mod 100 for clarity — not cryptographically secure; used only for illustration): Block 0 data = "GENESIS" → H0 = H("GENESIS") = 26 (computed as sum of ASCII codes 526 mod 100) Block 1 transactions: T1="A", T2="B". Compute tx hashes: hA=65, hB=66; merkle_root = H(65||66) (for this toy example treat 65 and 66 as single-byte values, so (65+66) mod100 = 31). Block1 header previous_hash = H0=26, merkle_root=31, nonce=0. Block1 hash = H(26||31||0) → (26+31+0) mod100 = 57. Block 2 header previous_hash=57, merkle_root=XX; Block2 hash = H(57||...)=say 50. Now change T1 from "A"(65) to "X"(88). New merkle_root = (88+66) mod100 = 54. Block1 hash becomes H(26||54||0) = (26+54) mod100 = 80 ≠ 57. Verifier recomputes H(block1) and finds mismatch with block2.previous_hash (which expected 57). To hide change, attacker must update block2.previous_hash to 80 and then recompute block2.hash and so on. This shows cascading recomputation and detects tampering. Final statement: In real systems, H is SHA-256 and recomputation requires recomputing PoW work.

Example 3 — Short algorithmic trace (simplified PoW): Question: "Illustrate PoW nonce search and why an attacker must redo work for k blocks." Trace: Target requires hash < 100 (toy). Miner finds nonce producing hash 42 after 1000 attempts. Next miner builds on that block and produces a child by finding its own nonce after 900 attempts. If attacker modifies block i, the attacker must find a nonce for modified block i (1000 attempts expected) and then for the child block (900) — total expected work increases, so cost grows with number of blocks to rewrite. Conclusion: rewriting k blocks costs roughly sum of expected work for each block.

Common mistakes

  • Mixing dates and inventors (e.g., attributing Merkle trees to Haber & Stornetta). State names and years carefully.
  • Treating PoW as deterministic rather than probabilistic — mining is a random process proportional to hash power.
  • Using the toy hash examples in real security arguments; always say "toy example for illustration; real systems use SHA-256 or similar."

For your exam

Question types you will see: definitions (blockchain, decentralisation, Merkle tree), short notes (Haber & Stornetta, Bit Gold, Bitcoin whitepaper), derivations (show how hash pointers detect tampering), diagrams (draw a blockchain and Merkle tree), and model-answer essays (timeline and impact). Full-marks answers include: clear definitions with bold terms, assumptions stated, a short timeline with contributors and dates, a labelled diagram where required, and a final paragraph connecting historical ideas to modern trade-offs (security vs scalability vs decentralisation). For derivations, show step-by-step logic and the precise assumption (e.g., collision-resistance of hash functions).

Quick check

  1. Who published the 2008 paper that formalised Bitcoin?
  2. Define "Merkle tree" in one sentence.
  3. Why is an honest majority (of hash power or stake) assumption important?

Answers: 1. Satoshi Nakamoto; 2. A Merkle tree is a binary hash tree where leaves are transaction hashes and each internal node is the hash of its children, enabling compact inclusion proofs; 3. Because consensus protocols (like PoW or PoS) rely on the majority resource holder to extend the canonical chain, preventing attackers who control less than the majority from rewriting history.

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?