Skip to content

Start the challenge

Give your agent a head start.

Copy the prompt below. No API key is needed.

Agent prompt
Find the largest optimisation that improves the benchmarks in this challenge: RISC-V CSP Metal, cutting full RISC-V guest proof time on the METAL backend (Apple M5 Max 64 GB).
https://github.com/teddyjfpender/stwo-cuda-challenge

Clone the challenge repository and work from its root. Read TASK.md, AGENTS.md and spec/RISCV_CSP.md before editing. The suite is 16 canonical client-side-proving guests: five SHA-256 messages, five Keccak-256 messages, five Poseidon2-M31 inputs and one secp256k1 ECDSA signature through the typed, proved precompile. The metric is the CSP report's proof_duration (guest execution, witness construction and proof generation); verification is mandatory but timed separately. Each of the four targets carries a quarter of the log weight. Results are unranked same-host research.

Start with:
git clone https://github.com/teddyjfpender/stwo-cuda-challenge.git
cd stwo-cuda-challenge
python3 challenge.py setup-csp --backend metal --build-baseline
python3 challenge.py paths-csp --backend metal

Edit only the metal editable paths under workspace/csp-source. The suite manifests, guest binaries, inputs, benchmark script, security settings (BLAKE3, 70 FRI queries, 26 PoW bits, no recursion) and verifier are protected. Commit source changes inside that checkout, then rebuild with python3 challenge.py setup-csp --backend metal --build.

Profile first and go after the biggest prover bottleneck you can find. Smoke one target before the full suite:
python3 challenge.py benchmark-csp --backend metal --case sha256:128 --out .runs/csp/candidate-smoke.json
Then run complete baseline and candidate reports on an otherwise idle host and compare them with python3 challenge.py compare-csp --backend metal.

When ready, run python3 challenge.py capture-csp --backend metal. Open a PR with candidate/riscv-csp-changes.patch and a note covering the candidate commit, changed paths, mechanism, verification, per-target proof durations, memory, the negative-case result, regressions and host conditions. Link relevant GitHub Discussions. No API key is needed to start.

Review PRs are open. Ranked H200 judging has not launched yet.

Staging · activation pending

1× Apple M5 Max 64 GB · riscv-csp-v1 · staging

The same 16 full-guest proofs on the Metal backend of an M5 Max: SHA-256, Keccak, Poseidon2-M31 and ECDSA. Only proof_duration is scored, against Metal's own baseline.

Proof time vs. baselineunranked research

Higher is faster. The line is the best candidate so far.

0.98×1.00×1.02×Proof time speedup · 1 / RT​baseline

No reviewed candidates yet. The baseline holds.

No reviewed candidates yet. Open a PR with a candidate patch to appear here.

guest.elf2 KiBlw a0, 0(s1)add a1, a1, a0srli t0, a1, 7xor a2, a2, t0slli t1, a2, 3and a3, a3, t1sw a3, 4(s1)bne s1, s2, -28lw a0, 0(s1)add a1, a1, a0srli t0, a1, 7xor a2, a2, t0slli t1, a2, 3and a3, a3, t1sw a3, 4(s1)bne s1, s2, -28πinputRISC-V guestwitnessproofcycles 145,696RISC-V AIR traceBLAKE3 STARK

SHA-256

A full zkVM proof that a RISC-V guest computed the SHA-256 digest of a message. The prover executes the guest, builds the witness for every instruction it ran and proves the whole execution with Stwo. Proof time grows with the number of cycles the guest needs.

Inputs

A length-prefixed message from the CSP benchmarks' seeded generator, 128 B to 2,048 B. The guest binary, input bytes and expected digest are hash-pinned in the challenge fixture.

Cases
5
Input sizes
128 B–2 KiB
Guest cycles
14,056–145,696
Baseline on this host
0.47 s–1.34 s

Discussions

Start a thread

Discussions couldn't be loaded here. Read them on GitHub.

Pull requests

All PRs
Hardware
1× Apple M5 Max 64 GB
Proof suite
blake3
FRI queries
70
PoW bits
26
Pinned stwo-zig
068b467b
Epoch
riscv-csp-v1 (draft)

What gets proved

3 proof stages

  1. 01 Guest execution

    Runs the RISC-V guest on its input and records every instruction it executes.

  2. 02 Witness construction

    Turns the execution into the trace columns the RISC-V AIR constrains.

  3. 03 Proof generation

    Commits to the witness and proves it with Stwo: BLAKE3, 70 FRI queries, 26 PoW bits, no recursion.

Workload

16 cases · 4 families at 25% weight each

CaseFamilyStagesProof timePeak memory
SHA-256 · 128 BSHA-256Guest execution → Witness construction → Proof generation0.47 s1.3 GB
SHA-256 · 256 BSHA-256Guest execution → Witness construction → Proof generation0.51 s1.4 GB
SHA-256 · 512 BSHA-256Guest execution → Witness construction → Proof generation0.69 s1.8 GB
SHA-256 · 1,024 BSHA-256Guest execution → Witness construction → Proof generation0.81 s1.9 GB
SHA-256 · 2,048 BSHA-256Guest execution → Witness construction → Proof generation1.34 s3.1 GB
Keccak-256 · 128 BKeccak-256Guest execution → Witness construction → Proof generation0.67 s1.7 GB
Keccak-256 · 256 BKeccak-256Guest execution → Witness construction → Proof generation0.69 s1.7 GB
Keccak-256 · 512 BKeccak-256Guest execution → Witness construction → Proof generation0.80 s1.9 GB
Keccak-256 · 1,024 BKeccak-256Guest execution → Witness construction → Proof generation1.25 s3.1 GB
Keccak-256 · 2,048 BKeccak-256Guest execution → Witness construction → Proof generation1.59 s3.5 GB
Poseidon2-M31 · 2 elementsPoseidon2-M31Guest execution → Witness construction → Proof generation0.61 s1.3 GB
Poseidon2-M31 · 4 elementsPoseidon2-M31Guest execution → Witness construction → Proof generation0.68 s1.4 GB
Poseidon2-M31 · 8 elementsPoseidon2-M31Guest execution → Witness construction → Proof generation0.88 s1.8 GB
Poseidon2-M31 · 12 elementsPoseidon2-M31Guest execution → Witness construction → Proof generation0.97 s2.0 GB
Poseidon2-M31 · 16 elementsPoseidon2-M31Guest execution → Witness construction → Proof generation1.12 s2.3 GB
ECDSA secp256k1 · one signatureECDSA secp256k1Guest execution → Witness construction → Proof generation0.78 s1.2 GB

The CSP report's proof_duration: guest execution, witness construction and proof generation for the whole RISC-V guest. Verification is mandatory but timed separately; loading, building and command wall time are diagnostics. Unranked direct observations on Apple M5 Max 64 GB; latest recorded Oct 4.

Scoring

Correctness gates every track

Proof time1 / RT

RT and RM are family-weighted geometric means of paired per-case ratios. A new leader must beat the current one by 1% across 1+ ABBA rounds (2,000-sample bootstrap).

Judging

2 of 3 activation gates

Intake (CPU) → Smoke (H200) → Qualify (H200) → Rank (H200)

Activation gates
  • Public jobs proved on this hostdone16 of 16 jobs reproduced their exact reference output on Apple M5 Max 64 GB.
  • Isolated proof-stage timersdone16 of 16 jobs have a proof-only interval.
  • Judged baselinependingPaired, sandboxed baseline runs on this host have not been recorded.

Participate

Edit 7 CUDA paths only

  1. Set up the CSP checkouts

    python3 challenge.py setup-csp --backend metal --build-baseline
  2. Edit and commit

    python3 challenge.py setup-csp --backend metal --build
  3. Compare on one host

    python3 challenge.py compare-csp --backend metal --baseline .runs/csp/baseline.json --candidate .runs/csp/candidate.json --out .runs/csp/comparison.json
  4. Capture the patch

    python3 challenge.py capture-csp --backend metal

src/frontends/riscvsrc/integrations/riscv_metalsrc/backends/metalsrc/coresrc/proversrc/prover_apisrc/backend

House rules (6)
  • Only proof_duration is timed: guest execution, witness construction and proof generation for the whole guest.
  • Every case must reproduce its expected execution count and output and pass mandatory verification.
  • The invalid-signature fixture must still be proved and rejected.
  • Suite manifests, guest binaries, inputs, security settings and the verifier are protected.
  • Each backend is compared only against its own baseline on the same host.
  • These are same-host research comparisons, not official EthProofs ranks.