An interactive, structure-faithful visualization of Chia's Proof of Space and Time (PoST) — the timelord's three VDF chains, the farmer's proof of space, the block "lock", and transaction blocks — run at a tiny k = 8 toy scale so the entire consensus dance fits on screen and runs live in the browser.
The trick is the scale: at k=8 a plot is 7 tables of ~256 entries (drawable), a sub-slot is a few hundred VDF squarings (steppable), and a proof is 64 leaves you can walk one match at a time. The structure and formulas are the real Chia ones; only the magnitudes are shrunk.
It's all driven by one scrubbable timeline, with deep-dive modals reachable from the controls:
- Timeline — the three chains (Challenge / Infused Challenge / Reward) advancing as binary-quadratic-form VDFs, with signage points, infusion points, the deficit/ICC lifecycle, challenge folding, transaction-block rails, and a live "Now / Next slot change" readout.
- ⏱ Proof of Time — step the sequential class-group squarings
g → g² → … → g^(2^T), watch the form(a,b,c)change whileb² − 4ac = Δstays invariant, and see the O(1) n-wesolowski check. - 🔍 Plot scan — every plot at a signage point: the plot-filter leading-zero bits vs the threshold, and the
required_itersmeter showing which quality is small enough to win. - 🌳 Plot — the whole 7-table forest the proof lives in, in bucketed strips; hover a bucket to see its
matches; the winning proof path is lit up. Keys →
plot_id→ F1 seeds it all. - 🧬 Proof of space — the 64-leaf proof tree, steppable table-by-table, match-by-match, and down to the inner m-search of a single match; plus the cheap verification recipe and the memory⇄time tradeoff.
- 🔒 Puzzle — how a block is locked by nested plot-key / pool-key signatures, with a tamper toggle that breaks the foliage signature when you rewrite the reward address.
- 💸 Transaction blocks — the two rails (
prev_block_hashfor every block,prev_transaction_block_hashfor the sparse tx chain), theis_transaction_blockrule, and reward settlement. - 📖 Textbook — the concepts and a "Key formulas" reference, all typeset with KaTeX.
Faithful in structure and formulas, scaled in magnitude, ported from the real Chia sources:
- VDF (Time) — a real class-group VDF: repeated squaring of binary quadratic forms with a discriminant
derived from the challenge (no trusted setup), certified by an n-wesolowski proof. Ported from
chiavdf(nucomp.h,vdf_new.h,create_discriminant.h). - Proof of space — the real chiapos 7-table forward propagation: F1, the adjacent-bucket matching with
the
(2m+parity)²quadratic, Fx, the 64-leaf proof and quality. Ported in shape fromchiapos. Constants are decoupled/shrunk so the forest is healthy at k=8 (the realkBC=15113,kExtraBits=6need k≥18 — which is exactly why chiapos can't plot k=8). - Signatures — real BLS12-381 (
@noble/curves) for plot, farmer, and pool keys. - Consensus rules — iteration math, the deficit/ICC rules, and
is_transaction_blockare ported fromchia-blockchain(pot_iterations.py,deficit.py,prev_transaction_block.py,block_creation.py).
Stand-ins, clearly labeled in the UI: ChaCha8/BLAKE3 → SHA-256 for F1/Fx, and the plotting "phases" (sort/compress) are not modeled — it's the forward-propagation forest, not a real plot file.
A deterministic, seeded, headless simulation core emits a typed event stream that a React + Canvas UI scrubs over. Cryptographic primitives sit behind interfaces.
src/
sim/ headless, deterministic, seeded — the brain
constants.ts toy k=8 consensus constants (mainnet values quoted)
iterations.ts required_iters / sp_iters / ip_iters (pot_iterations.py)
timelord.ts forward pass: 3 chains, deficit/ICC, tx rule (timelord.py + deficit.py)
plot.ts BLS plot keys, plot_id, the plot filter
proofofspace.ts the chiapos-style 7-table forest, proof + quality
farmer.ts real proof-of-space block production
events.ts the typed event stream the UI consumes
crypto/ real primitives behind interfaces
classgroup.ts binary quadratic form class group (chiavdf)
wesolowski.ts single + n-wesolowski VDF proofs
vdf.ts / bls.ts / hash.ts / rng.ts
ui/ React + Canvas + KaTeX
TimelineCanvas, Inspector, and the modals above, Math (KaTeX), Textbook
The core is covered by 40 tests (group axioms, proof round-trips, deficit transitions, the farmer pipeline).
npm install
npm run dev # dev server
npm test # sim-core tests (vitest)
npm run build # typecheck + production buildDeployed to GitHub Pages from main via .github/workflows/deploy.yml.
Built as a learning tool; not affiliated with the Chia Network. Mechanics cross-checked against the upstream
chia-blockchain, chiavdf, and chiapos repositories.