SP1 dev environment runbook
Version: 2026-06-23 · Status: Active · dev-only research runbook Companion docs:- SP1 dev scaffold overview (fixtures, claims, programs) — in the private research scaffold
- SP1 candidate decision — why SP1 is a candidate (not committed) proving stack
- Proof-readiness architecture — how a proof would attach to the Readiness Packet
- Proof claim schema — the
ProofClaimshape andproofExtensionintegration point - ZK proof-artifact roadmap — staged, non-production ZK/SP1 next steps
1. Purpose
This runbook documents how to stand up a controlled, reproducible developer environment to build and run the dev-only SP1 candidate program forreadiness_score_v1, and how to compare its execute-mode output against the
deterministic execute-output fixture already committed in the private research scaffold.
SP1 is a candidate proof system in WalletWall. WalletWall is proof-ready, not
SP1-dependent — every readiness surface works today with no prover in the loop.
A previous local validation attempt (2026-06-23) could not run the host script because
Rust, Cargo, and the SP1 toolchain were not installed in the agent environment
(rustc/cargo/rustup returned command-not-found, exit 127). This runbook exists so a
developer with a controlled Linux/WSL/macOS environment can install the toolchain, run the
execute-mode host, and — only on success — update the fixture’s metadata honestly.
Workflow at a glance
Execute mode never generates a proof. A canonical-value mismatch is investigated, not silently rewritten — see Compare against the fixture below.2. Scope
In scope:- Installing Rust (via
rustup) and the Succinct SP1 toolchain in a controlled dev environment. - Verifying the toolchain is on
PATH. - Building the dev-only SP1 zkVM guest program in the private research scaffold.
- Running the dev-only execute-mode host in the private research scaffold.
- Comparing the execute-mode output against the committed deterministic fixture.
- Updating only the metadata of the execute-output fixture after a successful local run.
3. Non-goals
This runbook does not:- Generate a ZK proof, proving key, or verifier key. Execute mode runs the guest in a RISC-V emulator and produces no proof. This is not production verification.
- Add SP1 to CI, default
npm test,npm run lint, ornpm run build. Proof generation and Rust compilation never run in default CI. - Add an SP1 dependency to the root app
package.jsonor any JS/Vite bundle. - Import Rust/SP1 code into the Vite/browser runtime or any app entrypoint.
- Add custody, yield, wallet signing, deposits, withdrawals, pooling, staking, or any on-chain write behavior.
- Execute, refresh, mutate, or add any Dune query, or change any Dune behavior.
- Claim WalletWall is ZK-secured, quantum-proof, guaranteed, insured, or production custody.
4. Prerequisites
- A POSIX-style shell (Linux, macOS, or WSL2). See §5.
git,curl, and a C toolchain (build-essential/ Xcode CLT) for native builds.- Disk: the SP1 toolchain and a
target/build directory can consume several GB. - Network access to fetch the Rust and SP1 toolchains (one-time install).
- No WalletWall secrets,
.env, Dune API key, or wallet material is needed or used.
Recommended environment
- WSL2 Ubuntu (recommended on Windows) — a real Linux userland; the SP1 installer and
cargo provework as documented upstream. - GitHub Codespaces / a Linux devcontainer — disposable, reproducible, and isolated from your host.
- Linux or macOS local shell — native
bash/zsh.
riscv32im-succinct-zkvm-elf and the SP1 installer is written for
Linux/macOS shells. A Linux-style environment avoids the most common toolchain friction.Windows guidanceNative Windows PowerShell without Rust/SP1 on PATH will fail — this is exactly what
the previous local validation attempt documented (rustc/cargo/rustup →
command-not-found, exit 127). The SP1 installer (curl -L https://sp1.succinct.xyz | bash)
expects a POSIX shell.On Windows, use WSL2 Ubuntu:/mnt/c/..., accepting slower I/O). Run every command in this runbook from
the Ubuntu/WSL shell, not PowerShell.WSL / Codespaces guidanceInside WSL2 Ubuntu or a Codespace/devcontainer, ensure the base build tools are present:Install Rust
rustup (the official installer), then load it into the current shell:Install SP1 tooling
sp1up installs the SP1 toolchain, including cargo prove. The exact installer URL and
command names are owned by Succinct and may change between SP1 versions — always defer to
the current Succinct SP1 docs rather than to a pinned copy here. The SP1 install is
optional and is not part of normal WalletWall development.Build / check the guest program
#![no_main] and the sp1-zkvm runtime, so it must be built with
cargo prove build (not plain cargo build):cargo prove --help
and follow the installed CLI; update this runbook if the SP1 CLI surface has changed.The native stand-in guest crate (nosp1-zkvmdependency) builds with ordinarycargo build/cargo testand is useful for checking the scoring logic without the SP1 toolchain. It is a sibling experiment, not a substitute for the SP1 guest.
Run the execute-mode host
cargo run does not behave as documented, follow
the installed SP1 CLI help and update this runbook accordingly. Execute mode is intentional:
proof generation (client.prove()) is gated and out of scope for this runbook.Check the expected canonical output
sig=0.91, dorm=0.4, bal=0.72), the execute-mode
host must print these values:{"recommendationState":"migrate","score":65,"scoreBand":"elevated"}.Commitments (must be unchanged from the canonical fixture):outputCommitment:0x39b6eef94782ccd26f33a41be397308adcdc8242fcf4fd0dfb884ca260545032inputCommitment:0x7044bbbeb4bb043f3917caf8f6641475b0a0c5599f33bff136f8582b72529bef
outputCommitment is sha256(stableStringify({ recommendationState, score, scoreBand }))
and the inputCommitment is sha256(stableStringify(committedInputs)) — sha256 hashes over
the committed fixture content, not ZK commitments.How to compare against the fixture
score / scoreBand / recommendationState against the committed
execute-output fixture in the private research scaffold:node --test).
Run them after any fixture edit:How to update fixture metadata after success
validationStatus→"locally_executed"toolchainStatus.rust/.cargo/.sp1Toolchain→ the observed version strings (e.g."available 1.x.x")localValidationAttempt→ record the commands run, the environment, and the result- the cycle count, if produced
- a timestamp of the validation
14. What not to commit
Never commit build artifacts, caches, or secrets produced by this workflow:target/(any Rust/Cargo build directory) — excluded by each crate’s.gitignore.Cargo.lock— the SP1 crates are dev-only and not committed per their crate-local.gitignore; do not add aCargo.lockfor them.- Compiled guest ELF binaries (
*.elf) and any proof blobs. - Generated dependency folders and build caches (
.cargoregistry caches,~/.sp1, etc.). - Private keys, proving keys, or verifier keys.
- Wallet data, seed phrases, or any key material.
.envfiles or any secret-bearing configuration.- Dune outputs from paid/credit-consuming execution — this workflow never touches Dune.
- Any large binary artifact.
15. Troubleshooting
rustc / cargo / rustup: command not found (exit 127)
rustc / cargo / rustup: command not found (exit 127)
PATH.Fix: Run §6; source "$HOME/.cargo/env"; reopen the shell.cargo prove: no such subcommand
cargo prove: no such subcommand
sp1up); verify with cargo prove --version.Installer script fails on Windows PowerShell
Installer script fails on Windows PowerShell
cargo prove build fails on the riscv32im-succinct-zkvm-elf target
cargo prove build fails on the riscv32im-succinct-zkvm-elf target
sp1up; ensure sp1-zkvm / sp1-sdk versions match the installed
toolchain.Linker / openssl build errors
Linker / openssl build errors
build-essential pkg-config libssl-dev (§5.2).Output score/band differs from fixture
Output score/band differs from fixture
16. Rollback / cleanup
This workflow is fully reversible and leaves nothing behind in the app.Remove local build artifacts
Optionally remove the toolchains entirely
Discard fixture metadata edits (optional)
git checkout on the committed
execute-output fixture restores the committed version. No app, CI, or Dune state is
affected by any step in this runbook.
