Verification#
A Solux machine is a pure function of its transactions. Anyone can rebuild it from the chain, run it on their own computer, and compare.
Why it is reproducible#
- Same core. The program, the browser playground and the SDK run the same
Rust code (
crates/rv32), compiled to SBF for the validator and to WebAssembly elsewhere. - No outside input. The timer counts instructions, not seconds. Keys only
come from
Typetransactions. Nothing else reaches the machine. - Ordered history. Every Solux instruction takes the machine account as writable, so the validator runs them one after the other, and the ledger records that order.
What the check does#
- Read the machine account and its RAM account.
- List every successful transaction that touched the machine
(
getSignaturesForAddress), oldest first, and decode its Solux instructions. - Start a machine with zeroed RAM and the
Initarguments, then apply everyWriteandWriteLz,TypeandStep, in order, on the local core. - Compare the replayed CPU state (204 bytes) and RAM with the accounts, byte for byte.
import { verifyMachine } from "@solux/sdk";
const v = await verifyMachine("https://your-rpc", machineAddress);
// v.ok, v.cpuMatches, v.ramMatches, v.steps, v.instret, v.ramHash, v.output
It needs no key, and it does not trust the machine's owner, the RPC's account data alone, or the program's logs. A replay that misses a single Step does not match: the SDK's tests check that.
What it proves, and what it does not#
It proves that the accounts hold exactly what this code computes from these transactions. It does not prove the program itself is right: that is what reading its source is for. Publish the source and the ELF together, so anyone can rebuild the ELF and compare it with the uploaded memory.
Cost#
Verifying is local work plus reads. A Linux boot replays 59.5 million instructions in about a second on a laptop (the WebAssembly core runs near 200 million instructions per second); fetching its 4,400 transactions takes longer than running them. The RPC must keep the machine's whole history.