← Home
Foundations of Blockchain • Absolute Depth Edition
Unit 1 • Intro

Blockchain & Bitcoin Origins

Definition: A cryptographically secured, distributed ledger that maintains a growing list of records (blocks) linked via hashes.

🔍 Research Depth: Hash Strength

Blockchain relies on the Avalanche Effect of cryptographic hashes like SHA-256. A single bit change in the input results in a completely different hash output, ensuring Data Integrity. In Bitcoin, SHA-256 is used twice (Double-SHA) to mitigate certain crypto-analytic attacks.

Sybil Attack Defense

Blockchain protects against "Sybil attacks" (where one person creates many identities to control the network) by requiring physical-world costs (computation in PoW or capital in PoS) to participate in consensus.

1.3 Byzantine Generals Problem

Problem: How do multiple nodes agree on a single strategy when some nodes might be traitors (malicious) or communication lines are faulty?

Byzantine Generals Problem Illustration

Figure 1.2: The logical dilemma of reaching consensus in a decentralized, untrusted environment.

🔬 Technical Solution: PoW

Bitcoin solves this by adding a "Proof" that requires work. The "General" who finds the Nonce becomes the temporary leader. Because work costs energy, traitors cannot easily flood the network with fake messages without going bankrupt.

1.4 DLT: Beyond the Chain

  • Shared vs Distributed: A database can be shared but centralized. DLT is distributed across independent nodes where no node is "more equal" than others.
  • Immutability vs Append-Only: Blockchains are technically "append-only." Immutability is a property derived from the cost of rewriting history.

Exam Warning

Do not confuse Blockchain with DLT. Blockchain is a *linear* type of DLT. Other types include Directed Acyclic Graphs (DAGs) like IOTA.

Unit 2 • Architecture

Blockchain Classifications

Permissioned (Enterprise)

Optimized for high throughput (TPS). Uses protocols like PBFT or Raft because node identity is known. Examples: Hyperledger Fabric, J.P. Morgan Quorum.

Permissionless (Public)

Prioritizes censorship resistance over speed. Uses PoW/PoS. Examples: Bitcoin, Ethereum, Solana.

2.5 Technical Data Structure

Advanced Block Structure

The Block Header Components

  • Pre-Hash (32 bytes): Link to history.
  • Merkle Root: Summary of transactions.
  • Nonce (4 bytes): The variable for mining.
  • Difficulty Target: Controls block time (10 mins in BTC).
📜 Merkle Proof Efficiency

To verify a transaction exists in a block, you don't need all 2000 transactions. You only need the Merkle Path (log2 N hashes). For 1 million transactions, you only need ~20 hashes to prove inclusion!

Unit 3 • Consensus

Consensus Deep Dive

PoW vs PoS
  • PBFT (Practical Byzantine Fault Tolerance): High speed, used in Hyperledger. Can tolerate up to f = (n-1)/3 faulty nodes.
  • PoW (Proof of Work): Security through "Heat" (energy consumption). Prevents history rewriting.
  • PoS (Proof of Stake): Security through "Stakes" (financial penalty). Validators lose money if they cheat.

3.2 GHOST Protocol & Orphan Blocks

Definition: Greedy Heaviest Observed Subtree (GHOST) is an algorithm that includes "stale" or "orphan" blocks (Uncle blocks) into the chain calculation to improve security in high-speed networks like Ethereum.

🔍 Why it matters?

In networks with short block times, two miners might find a block at once. GHOST prevents centralization by rewarding the miner of the 'shorter' chain path, ensuring large mining pools don't have an unfair advantage.

Unit 4 • Bitcoin

Bitcoin Internal Mechanics

UTXO Model (Unspent Transaction Output)

Bitcoin doesn't have "balances." It has pieces of value (UTXO) that you "own" via your keys. Every transaction "consumes" old UTXOs and "creates" new ones. It is highly parallelizable compared to the Account model.

💻 Bitcoin Script

Bitcoin has a simple, stack-based programming language (non-Turing complete). OP_CHECKSIG is the opcode that verifies your digital signature allows you to spend a UTXO.

4.4 Enterprise Breakdown

FrameworkFocusPrivacy
FabricModular architecture (plug-and-play consensus).Channels (Private silos).
CordaLegal compliance for Finance.Point-to-point (No gloal broadcast).
QuorumPrivacy on Ethereum.Private transactions via Tessera.
Unit 5 • Automation

Smart Contracts & Oracles

Smart Contracts: Self-executing code on the EVM (Ethereum Virtual Machine). Once deployed, they are immutable and trustless.

🔮 The Oracle Problem

Blockchains are "closed loops"—they cannot see the real world (e.g., "Did it rain?"). **Oracles** are third-party services that feed external data into the blockchain. Decentralized Oracles (like Chainlink) use consensus to ensure that data is accurate.

Terminology

Gas Fees, Solidity, Turing Completeness, DAO (Decentralized Autonomous Organization), DApp.