Many "build a blockchain" tutorials end where the hard part begins. You hash a few blocks into an array, and that is it. Nothing about forks, double spends, untrusted peers or light clients, which is where real blockchains succeed or fail.
The PlainChain course takes a different approach. It is built on PlainChain, our open-source blockchain node written from scratch in TypeScript. Each module removes one to three real functions from the node and asks you to write them back. The node's own tests tell you when you are right.
The six modules
- 01Merkle proofs: prove a transaction is in a block without downloading the block (
merkleProof,verifyMerkleProof). - 02Transaction rules and block hashes: the checks that stop coins being created from nothing (
validateTransactionStructure,computeBlockHash). - 03The UTXO set: who owns what, and how to undo it during a reorg (
validateTransaction,undoTransaction). - 04Block validity and fork choice: which chain wins and why (
validateBlock,isBetterChain,verifySeal). - 05The untrusted boundary: treating everything from the network as hostile (
parseWireBlock,penalize). - 06Building and verifying payments: a wallet and a light client (
buildTransaction,verifyInclusion).
What each module includes
- The idea from scratch, then a guided tour of the surrounding code
- A worked example with real hashes and amounts you can reproduce
- The implementation step by step, with the reason for each rule
- Common mistakes, and the test that catches each one
- The real attacks and bugs these rules stop
- A quiz with answers, and exercises beyond the tests
Who it is for
Engineers who can read TypeScript and want to understand, not just use, consensus, ledgers and light clients. It takes about 8 to 10 hours. You need Node.js and Git, nothing else.
Price and access
US$129 for the first 20 buyers, then US$199, as a one-time purchase. You enter your GitHub username at checkout and receive an invitation to the private course repository within a minute. It includes the exercise runner, the reference solution and a private Q&A space.
Want to try first? The free guide, Read the whole chain in an afternoon, covers the same six modules with one exercise each.
For teams
We also run one- or two-day live workshops for engineering teams about to build or operate a ledger, a payment system or a consensus protocol, remote or on site in the Toronto area. Each topic ends with the team writing an attack against a live node and watching it fail. Ask about a workshop, or see the PlainChain course page.