← Learn · crossing a wall

Hop versus sidestep

A wall can be crossed two ways, and both do work over the same leaves. A hop pairs them into a Cantor root, which grows with every level and is the same for everyone. A sidestep hashes them into a Merkle root, which stays 32 bytes at every level and is different for every traveler. In the scene the leaves sit on one row, the hop's tree grows up from them, and the sidestep's tree hangs down.

A sidestep only crosses

A sidestep moves exactly one Gibson, from the leaf touching the wall on one side to the leaf touching it on the other (section 6.3). From 7 to 8 is a valid sidestep across the height-4 wall, and so is 8 to 7. From 5 to 8 is not: the source must be 7, so the traveler hops from 5 to 7 first. From 7 to 11 is not either: the traveler sidesteps to 8 and hops on to 11. Pinning the source to the wall keeps every other Gibson of travel inside hops, which are the only moves that produce a region root. The scene checks this before it draws a verdict, as a verifier does before it looks at any hash.

The Merkle tree

Each leaf is hashed with SHA-256 behind a 64-byte prefix: the 22-byte domain CYBERSPACE_SIDESTEP_V2, the 32-byte id of the traveler's previous chain event, one axis byte, and nine zero bytes (section 6.4). Here that is 22 + 32 + 1 + 9 = 64 bytes, exactly one SHA-256 block, so an implementation hashes the prefix once and each leaf costs one more compression. Pairs of hashes are hashed upward until one 32-byte root remains. Because each node is fixed-size, the tree streams in h × 32 bytes of memory (section 6.5).

Why the seed: a toll, not a road

Switch the traveler in the scene and the Cantor root above the leaves stays put while every hash below changes. That is the design. Without the seed, the first identity to cross a wall would publish a root and openings that every later traveler could copy, and the wall would be priced for the pioneer and free for everyone after. With it, each traveler's tree is unique to their chain position, so everyone pays in full, every time. The hop is deliberately different: its root is canonical, because that is what lets two people at one place derive the same key (section 6.12).

Openings

A sidestep event publishes the destination leaf's path to the root plus eight more paths at positions derived from the root itself (section 6.10). The magenta path and the ringed leaves in the scene are those openings. A verifier recomputes the eight sampled leaves from the public seed and checks their paths, which costs seconds at any height. A prover who honestly computed a fraction f of the leaves and faked the rest passes with probability f8, so skipping a few leaves is cheap to try but saves little: the internal tree is half the work and cannot be skipped, and steering the samples means changing the root, which means rebuilding that tree. The protection comes mainly from that rebuild cost, not from the sample count (section 6.11).

Where each one wins

The hop's cost is its root: 85 × 2h bits per axis, held while it is built. The sidestep's cost is time: 2h+1 - 1 hashes and almost no memory. The "project to height" slider computes both at any height; a few rows:

HeightHop root per axisSidestep hashesSidestep memory
h2011.1 MB2,097,151640 bytes
h34182.5 GB34,359,738,3671,088 bytes
h4011.7 TB2,199,023,255,5511,280 bytes
h5012.0 PB2,251,799,813,685,2471,600 bytes
h6012.2 EB2,305,843,009,213,693,9511,920 bytes

Measured in the reference implementation, the two cross near h16; above that the sidestep is faster at every height, and far above it the hop is impossible because no one can store the root (section 6.14). A traveler hops when they want the region's root and sidesteps when they want to move.

Entering is not holding

The Merkle root says nothing about the Cantor root over the same leaves. A traveler who sidesteps into a region has proven the crossing, and holds none of the region's keys: every location key inside still needs the Cantor computation. You can walk into a building without having the keys. The region key scene shows what those keys open.