Skip to content

Commit eabb513

Browse files
committed
ci: Download Zisk proving key
1 parent 9720f8f commit eabb513

1 file changed

Lines changed: 28 additions & 4 deletions

File tree

.github/workflows/riscv-bench.yml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,38 @@ jobs:
108108
name: minimal-ixe
109109
- name: Install Zisk toolchain (ziskup, latest)
110110
# `--cpu` picks the CPU build (no GPU on the runner) and `--nokey` skips
111-
# the proving/verify keys — together they avoid ziskup's interactive
112-
# /dev/tty prompts, and execute needs no keys. `--prefix $HOME/.zisk`
113-
# pins the install where cargo-zisk's ZiskPaths fallback looks (the
114-
# runner sets XDG_CONFIG_HOME, which would otherwise relocate it).
111+
# ziskup's key install — both avoid its interactive /dev/tty prompts.
112+
# We keep `--nokey` because the upstream `zisk-setup` bucket only carries
113+
# the upstream circuit's key; our blake3-precompile fork has a different
114+
# circuit (extra Blake3f AIR), so we restore the fork-matching key from
115+
# our own S3 in the next step. `--prefix $HOME/.zisk` pins the install
116+
# where cargo-zisk's ZiskPaths fallback looks (the runner sets
117+
# XDG_CONFIG_HOME, which would otherwise relocate it).
115118
run: |
116119
curl -L https://raw.githubusercontent.com/0xPolygonHermez/zisk/main/ziskup/install.sh \
117120
| bash -s -- --cpu --nokey -y --prefix "$HOME/.zisk"
118121
echo "$HOME/.zisk/bin" >> "$GITHUB_PATH"
122+
# Execute still needs a proving key present: zisk-host calls
123+
# `client.setup()` (which the SDK runs before the execute branch), and that
124+
# loads the circuit's const-tree files. We host the fork-matching key in a
125+
# public S3 bucket WITHOUT the const-trees — exactly like Zisk's released
126+
# `zisk-provingkey-*.tar.gz` on `storage.googleapis.com/zisk-setup` — and
127+
# regenerate them here with `cargo-zisk check-setup -a`, which is how
128+
# `ziskup` itself populates them. That keeps the artifact ~3 GB (gzip)
129+
# instead of ~48 GB. The object name carries the fork rev so a circuit
130+
# change can't silently reuse a stale key. Public bucket → plain curl, no
131+
# AWS creds.
132+
- name: Restore Zisk proving key (fork circuit) from S3
133+
run: |
134+
mkdir -p "$HOME/.zisk"
135+
curl -fSL --retry 3 \
136+
https://argument-zisk-setup.s3.amazonaws.com/zisk-provingkey-blake3-8f9e24d5-cpu.tar.gz \
137+
-o /tmp/zisk-provingkey.tar.gz
138+
tar -C "$HOME/.zisk" -xzf /tmp/zisk-provingkey.tar.gz
139+
rm -f /tmp/zisk-provingkey.tar.gz
140+
# Regenerate the const-tree files omitted from the artifact (CPU build,
141+
# so no --gpu). This is the "may take a while" step ziskup prints.
142+
cargo-zisk check-setup --proving-key "$HOME/.zisk/provingKey" -a
119143
- name: Zisk — execute minimal.ixe (assert failures == 0)
120144
run: |
121145
cd zisk

0 commit comments

Comments
 (0)