Toccata 101 · Part 1 · card 6
Blockdag described by rappers
Kaspa blocks move in parallel. Currently 10 blocks per second are processed by the network, and future hardforks are planned to increase that number too. Each block points at every block its miner lately saw, and this creates a DAG (Directed Acyclic Graph). We like to call it a BlockDAG. The final agreement is on one history.
From every block, the rule follows the parent with the most work behind it, those parents form one chain. Each block on that chain merges the blocks beside it that no chain block took before, in a fixed order: the well-connected ones counted (blue), the stragglers set aside (red) but kept.
a blockblue, merged and countedred, merged but set asidea chain blockmerged after these seconds, dashed
The red block you see was made at 1.0 s on fresh parents, and merged only 27 seconds later. There were more than 124 blue blocks beside it that never saw it on the network. The block is kept with all its transactions, but its miner was not paid.
The rule that picks the chain and colours the blocks is GHOSTDAG, in rusty-kaspa v2.0.1 consensus/src/processes/ghostdag/protocol.rs: the selected parent is the parent with the most blue work, a merged block is blue when at most k blue blocks sit beside it, red otherwise, with k = 124 at ten blocks a second (consensus/core/src/config/bps.rs, ghostdag_k, and target_time_per_block 100 ms). The order is in consensus/src/model/stores/ghostdag.rs (consensus_ordered_mergeset: the selected parent, then the merged blocks in increasing blue work), and a chain block processes its merged blocks in that order in virtual_processor/utxo_validation.rs. A red block's reward goes to the miner of the chain block that merged it, in consensus/src/processes/coinbase.rs (expected_coinbase_transaction). The blocks drawn here were read from api.kaspa.org on 9 September 2026 (each block's parents, blue score, blue work, chain status and merge sets), and the live drawing reads the same fields when you press the button. The numbers on the drawing are computed in your browser from those fields.