A long row of temple columns, each standing on its own

A browser tab is a computer

Open a page, press Join, and your tab runs jobs for the network. A server runs each one again and gets the same bits.

Every network that wants your spare computer starts by asking you to install something. A daemon, a wallet, a container runtime, a driver. Most people stop right there, and they're right to. You shouldn't have to trust a stranger's installer to lend out an idle laptop.

So the first way to join Verse is a web page. Open /ask and press Join with this browser. That tab is now a machine on the network. Close it and it's gone. Nothing was installed, and nothing is left behind except a key in the browser's storage, so the tab is the same machine tomorrow.

What the tab actually does

It makes a key, in the page, and keeps it there. It opens one connection to the network and waits. When a job arrives, the tab runs it in a worker, inside the browser's own WebAssembly engine, and signs a receipt with that key: this program, this input, this output, this much work. Then a server runs the same job again. If the output and the work match, the tab's receipt stands. The tab is held to the same check as a rack server, because there is only one check.

The sandbox comes free. A job is a WebAssembly program with four functions it may call and no clock, no network and no files. A browser was already built to run exactly that kind of stranger's code safely. We didn't have to add a wall. We had to not knock one down.

The part that was hard

A receipt states how much work the job took, a count of instructions, and the re-run has to land on the same number. Our servers get that count from their engine. A browser's engine doesn't count.

So before a tab runs a program, it rewrites it: a small pass adds the counting to the program itself, in a way that reproduces what the server's engine would have counted. A test holds the two equal on every example program, and the live network holds them equal on a language model that burns twenty billion units an answer: a server re-runs the tab's answer and must land on the same number. One unit off and the tab would be an honest machine that looks like a liar.

It isn't a toy job

Press the second button on that page and the tab downloads a 141 MB language model, checks every piece against its hash, and starts answering real questions from /ask. Word for word what the servers answer, and the same count of work. Our live test does this in Chrome and in Safari's engine, and a server re-runs both.

The edges

A tab is a machine only while it's open. It reaches the network through our bridge, which can refuse it but can't sign for it. A browser used to differ from the servers' engine in one more corner, the bit pattern of a NaN, until twenty thousand random programs showed how often that mattered and the tab learned to leave the same NaN a server does. What is left is memory: a phone that can't give a program the room a server would answers differently. And a tab holds at most what a tab can hold: the big split model needs 211 MB a half, and no tab takes that yet.

The smallest step into a network should be a link. Here it is one.

Join from this tab ↗  ·  More writing ↗