Let's Build a Blockchain
summary
Builds a working toy blockchain in Haskell with SHA-256 hashing and a UDP peer network, implements a simple proof-of-work difficulty 4 (the brute-force miner finds a proof like 5,252,668), runs a three-node UDP demo that reaches consensus via longest-chain, moves transactions from pool to blocks, and adds a UTXO cache to avoid expensive chain searches. Includes a minimal smart-contract model (key–value state, coin Gcoin), all in-memory and functional but intentionally inefficient for education.
AI-written summary · about
chapters (19)
- 0:00Start
- 0:50What Is a Blockchain
- 6:32Genesis Block
- 7:03State
- 10:48Add Transaction To Pool
- 12:04Mining
- 14:29Adding a Block
- 16:53Tamper-Evident Blockchain
- 19:23Proof of Work Algorithm
- 19:43Proof of Work
- 23:55Validating a Proof
- 26:25Consensus Algorithm
- 28:33Resolve Transactions
- 41:17The Princeton Bitcoin Book
- 41:57Transfer a Coin
- 43:09Transfer Coin
- 44:54Transfer Coins
- 47:32Double Spending
- 53:34Smart Contracts








