Prover package: PROVE-SHARD.bat runs the shard at S_p and the two- and four-shard blocks on the GPU
prove-shard.sh: mode shard on block-338-shard1 (execute, core, compressed), then mode block on block-341-shards2 and block-344-shards4 (compressed proof per shard, aggregation), RESULT lines with timestamps, log uploaded after each stage. PROVE-BLOCK.bat keeps the small block (mode all; the CPU comparison is mode shard now). make-package.sh packs the aggregator crate and the simnet export too; README rewritten for the shard run. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
aa90c6f65b
commit
748912af9c
6 changed files with 118 additions and 20 deletions
|
|
@ -1,13 +1,14 @@
|
|||
@echo off
|
||||
rem Igneum proving v0: proves the fixture block (block-78-increment by default) inside WSL2 on the GPU
|
||||
rem (SP1_PROVER=cuda) and then on the CPU, prints the numbers and uploads the log to the Igneum log intake.
|
||||
rem Igneum proving: proves the fixture block (block-78-increment by default, one shard) inside WSL2 on the GPU
|
||||
rem (SP1_PROVER=cuda: shard 0 in all three stages, then the block end to end) and then on the CPU, prints the
|
||||
rem numbers and uploads the log to the Igneum log intake. For the shard fixtures at S_p use PROVE-SHARD.bat.
|
||||
rem PAUSE MINING FIRST (Ctrl+C in the START-MINING window): the prover needs the whole GPU and most of the RAM.
|
||||
rem Usage: PROVE-BLOCK.bat [fixture name, default block-78-increment] [cpu modes, default core]
|
||||
rem Usage: PROVE-BLOCK.bat [fixture name, default block-78-increment] [cpu mode, default shard]
|
||||
cd /d "%~dp0"
|
||||
set "FIXTURE=%~1"
|
||||
if "%FIXTURE%"=="" set "FIXTURE=block-78-increment"
|
||||
set "CPU_MODES=%~2"
|
||||
if "%CPU_MODES%"=="" set "CPU_MODES=core"
|
||||
if "%CPU_MODES%"=="" set "CPU_MODES=shard"
|
||||
set "DRIVE=%~d0"
|
||||
set "DRIVE=%DRIVE:~0,1%"
|
||||
set "REST=%~p0"
|
||||
|
|
|
|||
28
proving/windows-wsl2/PROVE-SHARD.bat
Normal file
28
proving/windows-wsl2/PROVE-SHARD.bat
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
@echo off
|
||||
rem Igneum proving, devnet v4 shards: proves one full shard at its proving-gas budget on the GPU (execute, core,
|
||||
rem compressed), then the two-shard and four-shard blocks end to end (shard proofs plus aggregation), prints the
|
||||
rem RESULT lines with a timestamp per stage and uploads the log to the Igneum log intake.
|
||||
rem PAUSE MINING FIRST (Ctrl+C in the START-MINING window): the prover needs the whole GPU and most of the RAM.
|
||||
rem Usage: PROVE-SHARD.bat [shard fixture, default block-338-shard1] [block fixtures, default "block-341-shards2 block-344-shards4"]
|
||||
cd /d "%~dp0"
|
||||
set "SHARD=%~1"
|
||||
if "%SHARD%"=="" set "SHARD=block-338-shard1"
|
||||
set "BLOCKS=%~2"
|
||||
if "%BLOCKS%"=="" set "BLOCKS=block-341-shards2 block-344-shards4"
|
||||
set "DRIVE=%~d0"
|
||||
set "DRIVE=%DRIVE:~0,1%"
|
||||
set "REST=%~p0"
|
||||
set "REST=%REST:\=/%"
|
||||
call :lower DRIVE
|
||||
set "LINUXDIR=/mnt/%DRIVE%%REST%"
|
||||
echo Running prove-shard.sh in Ubuntu-24.04 at %LINUXDIR% (shard fixture %SHARD%, block fixtures %BLOCKS%)
|
||||
wsl.exe -d Ubuntu-24.04 -- bash "%LINUXDIR%prove-shard.sh" "%SHARD%" "%BLOCKS%"
|
||||
echo.
|
||||
echo Finished. The log is next to this file (prove-shards-*.log) and was uploaded to the Mac side.
|
||||
pause
|
||||
exit /b 0
|
||||
|
||||
:lower
|
||||
for %%a in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do call set "%~1=%%%~1:%%a=%%a%%"
|
||||
for %%a in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do call set "%~1=%%%~1:%%a=%%a%%"
|
||||
exit /b
|
||||
|
|
@ -1,10 +1,11 @@
|
|||
Igneum proving v0 on a Windows 11 PC with an NVIDIA card (RTX 5090), through WSL2 Ubuntu 24.04.
|
||||
Igneum proving on a Windows 11 PC with an NVIDIA card (RTX 5090), through WSL2 Ubuntu 24.04. Devnet v4 shards (4 October 2026).
|
||||
1. Double-click SETUP-PROVER.bat. First run: it enables WSL2 and installs Ubuntu 24.04 (about 400 MB), then asks you to REBOOT.
|
||||
2. After the reboot Ubuntu opens once and asks for a username and password (any, e.g. igneum). Close it. Double-click SETUP-PROVER.bat again:
|
||||
it installs the CUDA toolkit for WSL (about 3 GB), Rust (about 500 MB), sp1up and the SP1 toolchain (about 300 MB download, 1 GB on disk), then pre-builds the prover.
|
||||
Downloads in total: about 4 to 5 GB (approximate). Time: 15 to 40 minutes depending on the connection and the CPU (approximate). The NVIDIA driver is NOT installed inside Ubuntu: Windows provides it. Docker is not needed (SP1 v6 runs a native sp1-gpu-server, which the SDK downloads on first use, about 134 MB).
|
||||
3. PAUSE MINING (Ctrl+C in the START-MINING window). The prover needs the whole GPU (24 GB of VRAM or more) and most of the RAM.
|
||||
4. Double-click PROVE-BLOCK.bat. It proves the fixture block on the GPU (execute, core proof, compressed proof, each verified), then a core proof on the CPU for comparison, prints the RESULT lines and uploads the log to the Igneum log intake (run_id prove-<PC name>-<stamp>).
|
||||
First run: 10 to 30 minutes of compiling before the first proof (approximate). The proof itself: seconds to a few minutes on the GPU, minutes to tens of minutes on the CPU (approximate, that is what this run measures).
|
||||
5. Resume mining afterwards. Results also land next to this file in results/*.json. Each line marked RESULT in the log is a number for docs/bench-log.md.
|
||||
4. Double-click PROVE-SHARD.bat. This is the phase 2 measurement: it proves one full shard at its proving-gas budget S_p (block-338-shard1, 6.75 M pgas: execute, core proof, compressed proof, each verified), then the two-shard block (block-341-shards2) and the four-shard block near the block budget B_p (block-344-shards4) end to end: a compressed proof per shard and the aggregated block proof by recursion, verified. Every stage prints a STAGE line and a RESULT line with a UTC timestamp. The log is uploaded to the Igneum log intake (run_id shards-<PC name>-<stamp>).
|
||||
First run: 10 to 30 minutes of compiling before the first proof (approximate). The proofs: unknown on this card, that is what this run measures (the 4 October morning run proved a 1,488-pgas block in 1.4 s core and 2.7 s compressed; a shard here carries 4,500x the pgas).
|
||||
5. PROVE-BLOCK.bat still proves the small block-78-increment (mode all: shard 0 in all three stages, then the block end to end), then a shard on the CPU for comparison.
|
||||
6. Resume mining afterwards. Results also land next to this file in results/*.json. Each line marked RESULT in the log is a number for docs/bench-log.md.
|
||||
Everything version-specific (CUDA 12.8 package name, SP1 v6.8.1, the server asset name) was read from the SP1 and NVIDIA documentation on 3 October 2026 and is approximate from that date on.
|
||||
|
|
|
|||
|
|
@ -9,17 +9,18 @@ OUT="${1:-$HOME/Desktop/igneum-prove-wsl2.zip}"
|
|||
STAGE="$(mktemp -d)/igneum-prove-wsl2"
|
||||
PKG="$STAGE/package"
|
||||
mkdir -p "$PKG/proving" "$PKG/vendor/igneum-node-exec/igneum"
|
||||
cp "$HERE/SETUP-PROVER.bat" "$HERE/setup-prover.ps1" "$HERE/setup-wsl.sh" "$HERE/prove-block.sh" "$HERE/PROVE-BLOCK.bat" "$HERE/README.txt" "$STAGE/"
|
||||
cp "$HERE/SETUP-PROVER.bat" "$HERE/setup-prover.ps1" "$HERE/setup-wsl.sh" "$HERE/prove-block.sh" "$HERE/PROVE-BLOCK.bat" "$HERE/prove-shard.sh" "$HERE/PROVE-SHARD.bat" "$HERE/README.txt" "$STAGE/"
|
||||
rsync -a --exclude target --exclude Cargo.lock "$ROOT/proving/igneum-prove" "$PKG/proving/"
|
||||
cp "$ROOT/proving/igneum-prove/Cargo.lock" "$PKG/proving/igneum-prove/" 2>/dev/null || true
|
||||
rsync -a "$ROOT/proving/fixtures" "$PKG/proving/"
|
||||
rsync -a --exclude target "$ROOT/vendor/igneum-node-exec/igneum/evm-types" "$PKG/vendor/igneum-node-exec/igneum/"
|
||||
# evm-types inherits thiserror from the node's workspace; pin it inline (the node's Cargo.toml line 346: 2.0.18) so the crate builds alone.
|
||||
perl -pi -e 's/^thiserror\.workspace = true/thiserror = { version = "2.0.18", default-features = false }/' "$PKG/vendor/igneum-node-exec/igneum/evm-types/Cargo.toml"
|
||||
# The exporter's input, so the fixture can be regenerated on the PC too.
|
||||
mkdir -p "$PKG/tools/evm-smoke" && cp "$ROOT/tools/evm-smoke/seq.json" "$PKG/tools/evm-smoke/" 2>/dev/null || true
|
||||
for f in "$STAGE/SETUP-PROVER.bat" "$STAGE/PROVE-BLOCK.bat" "$STAGE/README.txt" "$STAGE/setup-prover.ps1"; do perl -pi -e 's/\r?\n/\r\n/' "$f"; done
|
||||
for f in "$STAGE/setup-wsl.sh" "$STAGE/prove-block.sh"; do perl -pi -e 's/\r\n/\n/' "$f"; chmod +x "$f"; done
|
||||
# The exporters' inputs, so the fixtures can be regenerated on the PC too.
|
||||
mkdir -p "$PKG/tools/evm-smoke" "$PKG/tools/prove-fixtures" && cp "$ROOT/tools/evm-smoke/seq.json" "$PKG/tools/evm-smoke/" 2>/dev/null || true
|
||||
cp "$ROOT/tools/prove-fixtures/seq.json" "$PKG/tools/prove-fixtures/" 2>/dev/null || true
|
||||
for f in "$STAGE/SETUP-PROVER.bat" "$STAGE/PROVE-BLOCK.bat" "$STAGE/PROVE-SHARD.bat" "$STAGE/README.txt" "$STAGE/setup-prover.ps1"; do perl -pi -e 's/\r?\n/\r\n/' "$f"; done
|
||||
for f in "$STAGE/setup-wsl.sh" "$STAGE/prove-block.sh" "$STAGE/prove-shard.sh"; do perl -pi -e 's/\r\n/\n/' "$f"; chmod +x "$f"; done
|
||||
rm -f "$OUT"
|
||||
(cd "$(dirname "$STAGE")" && zip -qr "$OUT" "$(basename "$STAGE")")
|
||||
ls -la "$OUT"
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
# Igneum proving v0: proves one fixture block inside WSL2, GPU first (SP1_PROVER=cuda) then CPU for comparison,
|
||||
# prints the RESULT lines and uploads the log to the Igneum log intake. Run by PROVE-BLOCK.bat.
|
||||
# Usage: prove-block.sh [fixture name without .json, default block-78-increment] [cpu-modes, default core]
|
||||
# Igneum proving: proves one fixture block inside WSL2, GPU first (SP1_PROVER=cuda, mode all: shard 0 in all three
|
||||
# stages, then the block end to end) then CPU for comparison, prints the RESULT lines and uploads the log to the
|
||||
# Igneum log intake. Run by PROVE-BLOCK.bat. For the shard fixtures at S_p use prove-shard.sh.
|
||||
# Usage: prove-block.sh [fixture name without .json, default block-78-increment] [cpu mode, default shard]
|
||||
set -uo pipefail
|
||||
HERE="$(cd "$(dirname "$0")" && pwd)"
|
||||
FIXTURE="${1:-block-78-increment}"
|
||||
CPU_MODES="${2:-core}"
|
||||
CPU_MODES="${2:-shard}"
|
||||
export PATH="$HOME/.cargo/bin:$HOME/.sp1/bin:$PATH"
|
||||
CUDA_DIR="$(ls -d /usr/local/cuda-12.* 2>/dev/null | sort -V | tail -1 || true)"
|
||||
[ -n "$CUDA_DIR" ] && export PATH="$CUDA_DIR/bin:$PATH" && export LD_LIBRARY_PATH="$CUDA_DIR/lib64:/usr/lib/wsl/lib:${LD_LIBRARY_PATH:-}"
|
||||
|
|
@ -38,7 +39,7 @@ PY
|
|||
mkdir -p "$DEST"
|
||||
rsync -a --delete --exclude target "$HERE/package/" "$DEST/" 2>/dev/null || cp -r "$HERE/package/." "$DEST/"
|
||||
cd "$DEST/proving/igneum-prove"
|
||||
echo "building (first time: 10 to 30 minutes, approximate; the guest is compiled by cargo-prove inside the host build)"
|
||||
echo "building (first time: 10 to 30 minutes, approximate; both guests are compiled by cargo-prove inside the host build)"
|
||||
if ! cargo build --release -p igneum-prove-host --features igneum-prove-host/cuda 2>&1 | tail -3; then
|
||||
echo "BUILD FAILED"; upload; exit 1
|
||||
fi
|
||||
|
|
@ -47,12 +48,12 @@ FIX="$DEST/proving/fixtures/$FIXTURE.json"
|
|||
mkdir -p "$HERE/results"
|
||||
|
||||
|
||||
echo "=== GPU run: SP1_PROVER=cuda, modes execute + core + compressed (the first run downloads sp1-gpu-server, about 134 MB) ==="
|
||||
echo "=== GPU run: SP1_PROVER=cuda, mode all (shard 0: execute + core + compressed; then the block: shard proofs + aggregation); the first run downloads sp1-gpu-server, about 134 MB ==="
|
||||
SP1_PROVER=cuda RUST_LOG=info "$HOST" "$FIX" --mode all --out "$HERE/results/$FIXTURE-cuda-$STAMP.json"
|
||||
echo "gpu run exit $?"
|
||||
upload
|
||||
|
||||
echo "=== CPU run: SP1_PROVER=cpu, modes $CPU_MODES (for comparison; a core proof on the CPU can take many minutes) ==="
|
||||
echo "=== CPU run: SP1_PROVER=cpu, mode $CPU_MODES (for comparison; a shard on the CPU can take many minutes) ==="
|
||||
SP1_PROVER=cpu RUST_LOG=info "$HOST" "$FIX" --mode "$CPU_MODES" --out "$HERE/results/$FIXTURE-cpu-$STAMP.json"
|
||||
echo "cpu run exit $?"
|
||||
|
||||
|
|
|
|||
66
proving/windows-wsl2/prove-shard.sh
Executable file
66
proving/windows-wsl2/prove-shard.sh
Executable file
|
|
@ -0,0 +1,66 @@
|
|||
#!/usr/bin/env bash
|
||||
# Igneum proving, devnet v4 shards: on the GPU (SP1_PROVER=cuda) proves one full shard at its proving-gas
|
||||
# budget S_p (block-338-shard1: execute, core, compressed, each verified), then the two-shard and the
|
||||
# four-shard blocks end to end (compressed proof per shard, aggregation by recursion, verified), prints the
|
||||
# RESULT lines with a timestamp per stage and uploads the log to the Igneum log intake. Run by PROVE-SHARD.bat.
|
||||
# Usage: prove-shard.sh [shard fixture, default block-338-shard1] [block fixtures, default "block-341-shards2 block-344-shards4"]
|
||||
set -uo pipefail
|
||||
HERE="$(cd "$(dirname "$0")" && pwd)"
|
||||
SHARD_FIXTURE="${1:-block-338-shard1}"
|
||||
BLOCK_FIXTURES="${2:-block-341-shards2 block-344-shards4}"
|
||||
export PATH="$HOME/.cargo/bin:$HOME/.sp1/bin:$PATH"
|
||||
CUDA_DIR="$(ls -d /usr/local/cuda-12.* 2>/dev/null | sort -V | tail -1 || true)"
|
||||
[ -n "$CUDA_DIR" ] && export PATH="$CUDA_DIR/bin:$PATH" && export LD_LIBRARY_PATH="$CUDA_DIR/lib64:/usr/lib/wsl/lib:${LD_LIBRARY_PATH:-}"
|
||||
DEST="$HOME/igneum-prove"
|
||||
STAMP="$(date -u +%Y%m%d-%H%M%S)"
|
||||
LOG="$HERE/prove-shards-$STAMP.log"
|
||||
RUN_ID="shards-$(hostname)-$STAMP"
|
||||
exec > >(tee -a "$LOG") 2>&1
|
||||
echo "igneum proving devnet v4 shards, run $RUN_ID, $(date -u +%FT%TZ), host $(hostname), shard fixture $SHARD_FIXTURE, block fixtures $BLOCK_FIXTURES"
|
||||
nvidia-smi --query-gpu=name,memory.total,driver_version --format=csv,noheader 2>/dev/null || echo "nvidia-smi not available in WSL"
|
||||
echo "cpu: $(nproc) cores, ram: $(free -g | awk '/Mem:/ {print $2}') GB visible to WSL"
|
||||
|
||||
upload() {
|
||||
# Last 256 KB of the log to the intake, same URL and key as upload-log.bat (log uploads only).
|
||||
python3 - "$LOG" "$RUN_ID" <<'PY'
|
||||
import json, socket, sys, urllib.request
|
||||
path, run_id = sys.argv[1], sys.argv[2]
|
||||
data = open(path, 'rb').read()[-262144:].decode('utf-8', 'replace')
|
||||
body = json.dumps({"label": "shards-" + socket.gethostname(), "machine": socket.gethostname(), "run_id": run_id, "lines": data}).encode()
|
||||
req = urllib.request.Request("https://igneum-six.vercel.app/api/log", data=body, headers={"Content-Type": "application/json", "x-igneum-key": "***INTAKE-KEY-REMOVED***"})
|
||||
try:
|
||||
with urllib.request.urlopen(req, timeout=60) as r:
|
||||
print("upload:", r.status, r.read()[:200].decode('utf-8', 'replace'))
|
||||
except Exception as e:
|
||||
print("upload failed:", e)
|
||||
PY
|
||||
}
|
||||
|
||||
# Fresh sources from the package (edits on the Windows side are picked up), build with the cuda feature.
|
||||
mkdir -p "$DEST"
|
||||
rsync -a --delete --exclude target "$HERE/package/" "$DEST/" 2>/dev/null || cp -r "$HERE/package/." "$DEST/"
|
||||
cd "$DEST/proving/igneum-prove"
|
||||
echo "building (first time: 10 to 30 minutes, approximate; both guests are compiled by cargo-prove inside the host build)"
|
||||
if ! cargo build --release -p igneum-prove-host --features igneum-prove-host/cuda 2>&1 | tail -3; then
|
||||
echo "BUILD FAILED"; upload; exit 1
|
||||
fi
|
||||
HOST="$DEST/proving/igneum-prove/target/release/igneum-prove-host"
|
||||
FIXDIR="$DEST/proving/fixtures"
|
||||
mkdir -p "$HERE/results"
|
||||
|
||||
echo "=== GPU shard run: SP1_PROVER=cuda, $SHARD_FIXTURE, shard 0: execute + core + compressed (the first run downloads sp1-gpu-server, about 134 MB) ==="
|
||||
SP1_PROVER=cuda RUST_LOG=info "$HOST" "$FIXDIR/$SHARD_FIXTURE.json" --mode shard --shard 0 --out "$HERE/results/$SHARD_FIXTURE-cuda-$STAMP.json"
|
||||
echo "gpu shard run exit $? at $(date -u +%FT%TZ)"
|
||||
upload
|
||||
|
||||
for F in $BLOCK_FIXTURES; do
|
||||
echo "=== GPU block run: SP1_PROVER=cuda, $F: compressed proof per shard + aggregation ==="
|
||||
SP1_PROVER=cuda RUST_LOG=info "$HOST" "$FIXDIR/$F.json" --mode block --out "$HERE/results/$F-cuda-$STAMP.json"
|
||||
echo "gpu block run exit $? at $(date -u +%FT%TZ)"
|
||||
upload
|
||||
done
|
||||
|
||||
echo "=== SUMMARY (RESULT lines) ==="
|
||||
grep -h '^RESULT\|^STAGE\|^fixture\|exit' "$LOG" | sed 's/^/ /'
|
||||
upload
|
||||
echo "log: $LOG (uploaded as run_id $RUN_ID; on the Mac: node tools/logs.mjs $RUN_ID)"
|
||||
Loading…
Reference in a new issue