Examples#
Runnable experiments for every subpackage, built from the scripts under
examples/<name>/. Each one includes assertions, a figure, a “What to look
for” guide, and an exercise. Download any of them as a Python script or a
Jupyter notebook, or run it in the browser with JupyterLite. The guided
A guided course: from fingerprints to shared history gives a learning order across subpackages.
Cryptography
Hashing and commitments, Diffie-Hellman and RSA, blind signatures, secret sharing, elliptic curves, and Schnorr proofs and signatures.
Ledgers
Merkle trees and proofs, signed transfers, blocks, ledger state, and cumulative-work fork selection.
Agreement
Proof-of-work search and its expected cost, catch-up probabilities, and stake-weighted proposer selection.
Peer graphs, logical clocks, gossip and reliable broadcast, Kademlia and its attacks, block relay, forks, and transaction privacy.
Execution
A deterministic 256-bit stack machine with gas and atomic failure, Turing machines, Bitcoin Script, and smart contracts and their attacks.