Interactive · Back to What is Kaspa
GHOSTDAG playground
Miners don't take turns. Independent miners publish blocks whenever they find them, so more than one can arrive at once. Advance time and watch how many arrive together: most count, but pile up too many side by side and the extras get locked out.
Blocks arrive in parallel. How many, at once, varies every round.
Advanced: hide blocks, then release them
Publish nothing for a while and mine on your own, then bring your blocks back. The rest of the network doesn't wait for you. See what happens when it already moved on without you.
Advanced: how forgiving the network is
Every block can have some other blocks beside it that it never saw. This caps how many of those are still allowed to count. Lower it, and blocks get locked out sooner. Raise it, and more blocks keep counting even when a lot of them arrive at once.
The DAG
Hover or tap any block to see why.
Linear order
The one ordering every node agrees on: walk the main chain, and slot each block's counted neighbors in before its locked-out ones.
How the colors get decided
Every block names the tips its miner could see when it was made; those references are the whole data structure. A block's past is everything behind it, its future is everything built on top of it, and its anticone is everyone else: blocks that neither saw it nor were seen by it. Each block also picks the parent with the most accumulated work as its selected parent, chaining block to block into a main chain. A block counts (blue) if the number of already-counted blocks in its anticone stays under the cap, k. Over the cap, it's locked out (red) instead.
The DAG has no single "now": blocks keep arriving in parallel, with no one moment everyone agrees on. Kaspa's answer is the virtual block, a conceptual block that is never mined and never sent to anyone; it exists only on each node's own machine, standing in for "everything I've seen." Its parents, the virtual parents, are simply that node's current tips. Among those tips, the one with the most already-counted blocks behind it becomes the virtual selected parent, better known as the sink, the same rule an ordinary block uses to pick its own selected parent, just applied one level up, to the view itself rather than to a mined block.