igneum/proving/windows-wsl2/make-package.sh
igneum-labs 326953e0ac Proving v0: SP1 guest and host for one Igneum block, real-block fixtures, versioned ProofSystem trait, WSL2 package for the RTX 5090 run
proving/igneum-prove: core (port of igneum-exec at fb33069 as the block statement), program (SP1 v6.8.1 guest),
host (execute, core, compressed; ProofSystem trait with the stub and the SP1 implementation), export (cuts a block
out of igneum_exportSegments and checks every state root against the node's). Fixtures block-78-increment and
block-56-transfers from the 3-node simnet. proving/windows-wsl2: SETUP-PROVER.bat, setup-wsl.sh, PROVE-BLOCK.bat,
make-package.sh. docs/plans/proving-v0.md: the devnet v4 shard plan, what tonight's proof shows and does not, the
morning acceptance line. Mac CPU baseline (block 78: 626 k cycles, core 22.0 s and 7.3 MB, compressed 55.7 s and
1.27 MB, both verified) appended to docs/bench-log.md, left uncommitted because that file carries another agent's
pending changes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-03 22:30:12 +00:00

26 lines
2 KiB
Bash
Executable file

#!/usr/bin/env bash
# Builds igneum-prove-wsl2.zip (double-click setup and proof run for a Windows 11 PC) on the Mac.
# Packs this directory plus the proving sources and the execution layer's evm-types crate under package/, so the
# path dependency resolves on the PC without the repository. Usage: windows-wsl2/make-package.sh [out zip, default ~/Desktop/igneum-prove-wsl2.zip]
set -euo pipefail
HERE="$(cd "$(dirname "$0")" && pwd)"
ROOT="$(cd "$HERE/../.." && pwd)"
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/"
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
rm -f "$OUT"
(cd "$(dirname "$STAGE")" && zip -qr "$OUT" "$(basename "$STAGE")")
ls -la "$OUT"
unzip -l "$OUT" | tail -n +4 | awk '{print $4}' | sed '/^$/d' | grep -v '/$' | head -40