← Learn · proving a hop
Hop proofs: version 1 and version 2
A hop proves that its mover did the Cantor work of the move: one tree for each axis, and one temporal tree, combined into a single number called hop_n. Version 1 of the hop proof published a fingerprint of hop_n. Checking that fingerprint meant doing the whole hop again.
Version 2 is called residue openings. A residue is the remainder left when hop_n is divided by a prime. The prover computes one residue for each of many primes, which gives a long list of small numbers. It hashes the list into a Merkle tree, and the tree's 32-byte root, the seal, goes in the event. Then it publishes 16 openings: blocks of the list, each with the hashes that link it to the seal. The 16 blocks are chosen by a hash of the seal. Drawing them costs work, called the re-roll price, counted in attempts. One attempt is one small Cantor tree, computed modulo the hop's first prime. A verifier checks one attempt against the re-roll price, derives 17 primes, computes 16 residues itself, and makes 16 short climbs, hashing each opened block up the tree to see that it reaches the seal. It never builds hop_n. Chain rules revision 2026-10-08-residue-openings requires version 2 (section 8.12).
Every number below is computed in your browser by cyberspace-core, the TypeScript implementation of the specification, at commit fe6133a. This site's tests check the same computations against the golden vectors in hop-residue-vectors.json.
Why version 1 had to change
Version 1's proof is a fingerprint, SHA256(SHA256(hop_n)) (section 5.6). A fingerprint is all or nothing. Nobody can work backwards from it, and nobody can check it a little bit. The only way to check it is to rebuild every tree from the bottom row up, combine the roots into hop_n, hash it twice and compare. So the verifier does exactly the work the mover did. At height 20 that is about 4 seconds for the mover and another 4 seconds for anyone who checks, for every hop in the chain, and checking a long chain means replaying the whole journey (section 5.9).
Version 2 keeps the Cantor work exactly as it was. The trees, region_n, K, the temporal tree and hop_n do not change, and neither does any location key. Only the commitment at the end changes. The specification measured the result on 40 linked hops at h20. Making them took about a fifth longer than under version 1. Checking them was about 1,040 times faster than making them under version 1, and about 1,250 times faster than making them under version 2 (section 5.12).
Terms
- Residue: what is left over when a number is divided by a modulus, written x mod p. It is where the number lands on a clock with p positions. For example, 64,450,752 mod 7 is 2.
- Hop prime: one of the m primes of a hop, each derived on its own from the previous event id and its index j. A hop prime is a number between 261 and 262 that passes the base-2 strong probable prime test. Nobody proves that it is prime, because p_j is defined as the number the search returns.
- Seal: the Merkle root over the hop's residues, 8 residues to a leaf. It is the value of the hop's
prooftag. - Re-roll price: the work a prover must spend to obtain one set of sample positions, on average one sixteenth of an honest hop at the hop's heights. The nonce that pays it is the hop's
mntag. - Opening: one block of 8 residues and its inclusion path to the seal. The 16 openings are the hop's
mptag. - Climb: to hash a node together with its sibling to get their parent, and to repeat that level by level up the tree. An opening's climb starts at the leaf of its block and must end at the seal.
- Level 1: the check every verifier runs: the form of the tags, the price, and the 16 samples (section 5.11). Level 2 is a full audit that rebuilds every root and the whole seal, and costs what making the hop costs.
What 16 checks are worth
A prover whose sealed list holds the true residue at only some of its positions passes the 16 checks only if all 16 samples land on true residues. If a fraction f of the list is true, that happens with probability about f16 (section 5.11):
| Share of the sealed list that is true | Chance of passing all 16 checks |
|---|---|
| 99 percent | 85 percent |
| 90 percent | 19 percent, about 1 in 5 |
| 75 percent | 1 percent |
| 50 percent | 1 in 65,536 |
| 1 in 16 | 1 in 264 |
Those odds alone would not stop a prover from skipping a little work and drawing again until the samples missed it. The re-roll price does that. Every fresh set of samples costs at least one sixteenth of the work that can be skipped, and at that price no fraction of skipped work lowers the expected cost of an accepted proof. The Cantor trees themselves need no price: every residue depends on every leaf, so the cheap way to most residues is to build the trees.
Hops made before the change
A verifier of revision 2026-10-08-residue-openings rejects version 1 hops, which carry a proof_hash in proof and no mn or mp tag. The exception is the hops listed by event id in grandfathered-v1-hops.txt, whose proof is accepted without being recomputed while everything else about them is still checked. The list is filled from a final census at the cutover, and each hop on it is audited first. There is no date cutoff, because created_at can be backdated and an event id cannot be forged (section 5.13).
Where the numbers come from
The demonstration imports cyberspace-core at commit fe6133a665bd5dd8e83f3ea1b82c30153600796e and runs it as it is, with its WebAssembly word kernel where the browser allows it and its JavaScript kernel otherwise; both give the same values. Version 2's residues are computed the way a verifier computes one, from the trees carried on each prime's clock, never by dividing hop_n. The page's own test runs every prover, check and verifier vector of hop-residue-vectors.json through the same code, reproduces the spec's tampered vectors byte for byte, and checks the version 1 proof_hash and lookup id of the worked example in section 5.7. The specification is rendered here at commit 9210d6dff166. The timings in Step 4 are measured in your browser on small hops; the timings in Step 5 are the figures of section 5.12, measured on one machine. The reference for all of it is hop-residue-reference.py.