Introduction
Every second the chain draws a random winning number (challenge).
Each 1 MB piece 8B tag wins if it happens to land close enough to challenge. “Close enough” is measured by a difficulty knob called solution range. The chain adjusts that knob so that, across all tickets in the world, only about one ticket in six seconds wins. The beauty is that a single division of the knob into a fixed constant tells you how many tickets—and therefore how many megabytes—must be online to make that six-second rhythm work.
1 — The tiny probability p
that one ticket wins
Every ticket is assigned a 64-bit number somewhere on the ruler from 0 to (2^{64}-1).
Each second the chain draws a fresh 64-bit challenge number.
A ticket wins if its number is within solution_range ⁄ 2 on either side of the challenge (wrapping around the ends of the ruler if necessary).
Because the ruler holds exactly (2^{64}) possible numbers and the highlighted window is
solution_range
numbers wide, the chance for one ticket is
2 — How many tickets n must exist to get one winner every six seconds
With n independent tickets checked every second, the chance that someone wins
in that second is
The chain wants that probability to equal \frac{1}{6} so blocks average one every
six seconds:
ref:
- subspace/crates/subspace-runtime-primitives/src/lib.rs at fd11d4bd31bda1c04ca8b698c0832ec03f83e1d7 · autonomys/subspace · GitHub
- subspace/crates/subspace-core-primitives/src/solutions.rs at fd11d4bd31bda1c04ca8b698c0832ec03f83e1d7 · autonomys/subspace · GitHub
3 — Turn tickets into storage
level | relation | comment |
---|---|---|
ticket (8-byte tag) | — | the unit that wins |
piece (1 MB record) | 1 piece ⇒ ½ ticket (erasure coding) | half the time the probed s-bucket is empty |
sector (≈ 1 GB file) | 1 000 pieces | a fully-plotted sector holds ≈ 500 tickets |
So the total pledged storage in megabytes is
ref:
- subspace/crates/subspace-core-primitives/src/pieces.rs at fd11d4bd31bda1c04ca8b698c0832ec03f83e1d7 · autonomys/subspace · GitHub
- subspace/crates/subspace-runtime/src/lib.rs at fd11d4bd31bda1c04ca8b698c0832ec03f83e1d7 · autonomys/subspace · GitHub
4 — Concrete example
solution_range = 12 417 612
step | formula | value |
---|---|---|
tickets | (n_{\text{tickets}} = 2^{64}/(6R)) | 247 588 453 047 |
pieces (MB) | (n_{\text{pieces}} = 2\times n_{\text{tickets}}) | 495 176 906 094 MB |
GB (÷ 1024) | 483 571 197 GB | |
TB (÷ 1024 again) | 472 237 TB | |
PB (÷ 1024 again) | ≈ 461 PB |
So a solution_range
of 12 417 612 implies the network holds roughly
4.95 × 10¹¹ pieces (≈ 461 petabytes) of fully-plotted history.
(Using decimal units instead of binary would give ≈ 495 PB.)