published · 7 min read

Re-running a Computation Proves It's Consistent, Not That It's Right

How my verification system would have printed "VERIFIED" over a corrupted result, what changed, and how re-running compares with zkVMs, TEEs, rollups and rebuilders.

Two rows of eight bytes, both reading 0, 0, 0, 0, 5, 6, 7, 8, above the words VERIFIED over a wrong result.
These bytes are the wrong answer a test program returned.

An AI agent drafted this from my projects, and another agent checked the draft claim by claim against the code and the run records or briefs that were kept. The projects and opinions are mine.

My system, Verse, checks a machine you don't trust by having an independent machine re-run its work and compare the bytes. A test program showed it would print ✅ VERIFIED over a result that was wrong: both machines returned the same wrong bytes, because the bug sat in Verse's own host code, which both runs share.

Here is how it works. You send a small WebAssembly program and an input to a machine you don't trust. It runs the program and signs a receipt with hashes of code, input and output, plus the exact runtime version and how much work that took. Then an independent machine repeats that work with an identical program and input. The sandbox has no clock or network, and no randomness or files, so on the same pinned runtime a faithful re-run should produce byte-identical output. If it doesn't, my protocol treats the first machine as having lied, and that machine's own signed receipt is the evidence. That takes a second run, without a blockchain or trusted hardware, though today a trusted committee decides who is punished.

The bug every verifier agreed with

Input reaches a program when the host writes it into that program's memory at a fixed address. That address was 1024. It was also where the WebAssembly linker, wasm-ld, placed a C program's constant data by default, and it's exactly where a clang build put it. (Since LLVM 22 the default puts the stack first and data above 64 KiB.) So writing input overwrote the start of a lookup table in the program. A program reading eight bytes of it returned 0, 0, 0, 0, 5, 6, 7, 8 where the right answer was 1, 2, 3, 4, 5, 6, 7, 8.

When the verifier re-ran it, identical host code wrote to that address. That overwrite happened again and an identical wrong answer came back, byte for byte. Both outputs matched. Verification did exactly what it promises: it proved two machines computed the same thing. Because the bug was deterministic, every node reproduced it faithfully. Re-execution proves consistency and leaves correctness unproved.

On two machines the host writes input at address 1024 over the start of a lookup table, and both return 0, 0, 0, 0, 5, 6, 7, 8.
Both machines overwrite identical bytes, so their outputs match.

The first fix failed open

A scanner was meant to fix this, rejecting at load time any program whose data overlaps the region a host writes to. That scanner's first version stopped scanning and let the module through when it hit a kind of data segment it didn't expect. Adding one line of hand-written WebAssembly text, a passive segment in front of an overlapping segment, was enough to get past it.

The commit that landed the repair is stamped 14:52 UTC on August 2, under the message fix(security): close a VERIFIED-over-corrupted-computation hole, and 4 more. It gives the reasoning for that early exit, "wasmtime validates the module immediately after", and the next word is "Wrong".

A note in the security log after the fix:

A security check whose parser bails out on the unexpected is not a check.

The second fix nearly convicted innocent nodes

Nodes on the new version now rejected some programs that old-version nodes had accepted and run. Picture a provider on the old version that ran such a program in good faith and signed a receipt. A new-version verifier refuses to load that program, so it can't reproduce the result. To the protocol, a failed reproduction looks like a lie. That August 2 commit message says "The security fix was itself a false-conviction bug until the tag was bumped."

The way out was to treat the change as a new runtime profile, with a separate tag in every receipt, so nodes only judge receipts from their own profile.

A third verdict

All of this landed on a design that already had a third answer, and the second fix showed why it matters. A verifier that can't reproduce a result doesn't necessarily mean the provider lied: it might be on a different runtime version, might not have the program or input, or might lack the memory to run it. Verse has three verdicts. Verified means an independent node reproduced the exact output and work count. Caught means an independent node ran it under the same profile and got something different. Unverified means the verifier couldn't run it under comparable conditions, so it abstains. The CLI says so in as many words: "This is NOT an accusation".

A signed receipt passes through two questions and ends at one of three verdicts: Verified, Caught or Unverified.

Verse's design goal is to never convict an innocent node, and it pays for that by sometimes failing to convict a guilty node. A caveat: a conviction, a slash, takes the provider's bond. At default settings, a threshold of one without a dispute window, the first verifier's mismatch slashes at once. Protection against a false conviction needs a dispute window, and a threshold above one won't start without it.

A mismatch can also come from faulty hardware: Facebook engineers traced missing database files to a CPU core on which Scala's math.pow always returned 0 for certain inputs, and Google reports on the order of a few faulty cores per several thousand machines. Verse can't tell such a fault from a lie: a faulty provider core gets the provider slashed, and at default settings so does a faulty verifier core.

Verdicts don't carry over to other runtimes or other people

A receipt names its runtime version, for example wasmtime-46.0.3/core/det3. A verifier whose tag differs refuses to judge: "decline, not a conviction". Engine releases change the numbers: Wasmtime 46.0.0 changed fuel accounting for bulk-memory instructions. So VERIFIED under one tag doesn't carry over to another engine, or to the next patch release.

A verifier's signed report goes to the mint, the service that handles bonds and payments, and to the reputation registry. A client gets back only a plain, unsigned message from that verifier: a state and a line of text. Verse's SDK lists "the bridge's own re-run verdict" under what it does NOT verify. You can forward a receipt to anyone, and they can check the signature, but you can't forward the verdict as evidence.

How re-running compares with zkVMs, TEEs, rollups and rebuilders

zkVMs (RISC Zero, SP1) produce a proof that anyone can check without re-running the program or trusting a verifier. You trust the proof system and the code behind it instead. Proving costs a lot. Re-execution sits at the cheap end: it skips the prover, but it needs a verifier who actually re-runs, with input in the open. Luu and colleagues called the blockchain form of this problem the verifier's dilemma: when a script takes nontrivial computation, rational miners have an incentive to accept unvalidated chains.

TEEs (AWS Nitro, Intel TDX, AMD SEV-SNP) attest what was loaded into an enclave or confidential VM, and they can keep inputs private. You trust AWS or the chip vendor, and that the operator can't tamper with the hardware, which TEE.fail did to TDX and SEV-SNP with a memory-bus interposer. Verse doesn't trust hardware, and it doesn't give privacy, because verifiers must hold your input. Neither tells you the code was right.

Optimistic rollups (Arbitrum, Optimism) need only one honest party to convict, and they add an interactive bisection game, because their referee is a blockchain that can't afford to re-run a whole job. In Verse's design a full node would referee, so the game would collapse to one re-run, but that referee isn't built yet. In Verse today 1-of-N covers detection only: any single verifier with the same runtime tag and the data can catch a lie, while convicting takes a permissioned committee, and there is no bonded referee to break a split.

Rebuilders (rebuilderd, repro-threshold) already ship the signed attestation, and an experimental policy that trusts a package once k of your N rebuilders reproduce it. A rebuilder recreates the build environment recorded with the package and wants independent operators on different machines to agree. Verse pins the Wasmtime version, not the build or the CPU, and a verifier on another version abstains.

Four things a receipt doesn't tell you

A Verse receipt plus a matching re-run tells you that two nodes sharing a pinned runtime got identical bytes. It doesn't rule out a bug both runs share, in the program, in Verse's host (as above) or in the pinned engine; diverse implementations are the classic answer, though Knight and Leveson's 1986 experiment rejected the assumption that independently written versions fail independently. And it doesn't tell you that the verifiers are independent: today the verifier set is a permissioned committee. A provider and one colluding verifier can block a penalty.

A receipt also doesn't tell you that the input was available. A provider that withholds input can't be caught. The escrow design would leave it unpaid, but no client uses escrow today, and the paid flow pays on an abstention, and the security notes list that as open. Polkadot's validators also skip the vote on errors they treat as local to the machine, but its guide won't treat errors from the job process that way, because the job runs untrusted code and an attacker could use such errors to make validators abstain.

Nor does a receipt tell you that the program ran in bounded time: the work counter doesn't count seconds, deadlines aren't enforced, and every verifier pays the run's cost again.

Verse is demo-grade, and by its own README it has zero users.

Verse is at https://www.versemesh.org.