chore(l1,l2): bump ZisK to v1.1.0-alpha - #7156
Conversation
… both guest manifests, raise ZISK_VERSION in the CI install action, and refresh the two affected lockfiles (pil2-proofman moved to crates.io and several ZisK crates were renamed with a `zisk-` prefix, so the entries change shape as well as version). Re-pin ZISK_RUST_TOOLCHAIN from zisk-0.5.1 to zisk-3.0.0. The two pins are coupled through who supplies the guest linker script, and v1.1.0-alpha reverses that relationship: `zisk-build` now injects its own script with `-C link-arg=-T`, so the toolchain has to be one whose riscv64ima-zisk-zkvm-elf target spec embeds none. Kept on the old pin the link takes both scripts and rust-lld fails with "region 'rom' already defined". No source changes are needed. `zkvm-interface/zkvm_accelerators.h` is unchanged, so the hand-written extern "C" bindings in the ZisK crypto provider still match, and the `cargo-zisk` build/execute/prove/verify flags the prover backend drives are unchanged too. The BLS12-381 MSM and pairing accelerators now reject a zero-length pair list, which the levm precompiles already reject before the call. The guest ELF changes: the new linker script moves the whole RAM layout (stack now at 0xa0000000, output_data at 0xa0410000), so any pinned ZisK verification key has to be regenerated. The stateless-validator guest is not covered here. It reaches ZisK through `ere-platform-zisk` at a pinned ere rev, which still resolves v1.0.0-alpha; moving it needs an ere release carrying eth-act/ere#404 and would drag in unrelated sp1/openvm changes, so it belongs in its own change.
|
🤖 Kimi Code ReviewOverall, this is a well-structured dependency upgrade PR for the Zisk zkVM integration. The changes are consistent across workspace and guest binary configurations, and the documentation accurately explains the toolchain/SDK version coupling. Critical Build Configuration — The updated comment (lines 16-28) correctly documents the inverted dependency relationship between SDK and toolchain regarding linker scripts. This is a critical detail:
If these versions drift, linking will fail with "region 'rom' already defined" errors. The comment explicitly warns about this, which is excellent defensive documentation. Dependency Source Migration The migration of Version Consistency All version pins are consistent:
Minor Suggestion In ziskos = { git = "https://github.com/0xPolygonHermez/zisk.git", tag = "v1.1.0-alpha", default-features = false }This ensures the guest binary doesn't accidentally enable host-side features that could break the zkVM guest environment. Security Note Both versions are alpha releases. Ensure the The PR is ready to merge after considering the default-features suggestion. Automated review by Kimi (Moonshot AI) · kimi-k2.5 · custom prompt |
🤖 Claude Code ReviewNo hardcoded memory-map assumptions in the ethrex-side code that the new ELF layout would break. Review: chore(l1,l2): bump ZisK to v1.1.0-alpha (
|
🤖 Codex Code ReviewNo findings in the PR diff. The change is a dependency/toolchain bump only, and the in-repo version sync points are consistent: Residual risk: I could not run a local Automated review by OpenAI Codex · gpt-5.4 · custom prompt |
|
Follow-up for the stateless-validator half tracked in #7157. |
…nch was opened and carries its own ZisK pins. `tooling/zkevm_bench` is a standalone workspace depending on `ethrex-guest-program` with the `zisk` feature, so its committed lockfile went stale the moment the `ziskos` tag moved. Its lint job runs `cargo clippy --locked` and then asserts the lock is unmodified, so this would have failed CI on the first run after merging main in. Also moves `zkevm-bench-setup` and the tool's README from v1.0.0-alpha to v1.1.0-alpha, and pins the Rust toolchain the target installs. ziskup takes whatever release is newest, which for v1.0.0-alpha was already the wrong pairing — that target could not have linked a guest as written. Pinning it to the version CI uses keeps the local path and CI on the same footing. Left alone on purpose: the v1.0.0-alpha strings in the tool's test fixtures, its sample report, and docs/ziskemu-output.md. Those record a real captured `ziskemu -X` run rather than a version we install, and rewriting them would misdescribe the capture.
The bump moves the emulator the zkEVM benchmark shells out to, and v1.1.0-alpha's release notes rework emulator statistics, so the AIR-cost parser needed checking rather than assuming. Ran `ziskemu -X` from the v1.1.0-alpha toolchain against a guest ELF built from this tree: the only structural change is a new `ROM USAGE` line after `RAM USAGE`. Every label `parse_air_cost` matches is still emitted unchanged, and `ROM` is not one of them, so it is skipped like any other unrecognised label. The committed fixture stays on its v1.0.0-alpha capture — it records a real run.
|
Heads up that the scope grew after the approval, since main moved underneath this branch.
Left on v1.0.0-alpha on purpose: the tool's test fixtures, its sample report, and
|
Motivation
ZisK v1.1.0-alpha is out. It carries soundness fixes (
MemAlignon non-aligned memory operations, narrow unsigned loads leaving high bytes unconstrained, signed-division zero results in the Arith state machine, BLAKE2b message permutation, DMA transpilation under dynamic jumps), a reworked BLAKE2b arithmetization (24 → 8 rows per round), more efficient Main/Binary arithmetization, and a.sbss-aware linker script. Upstream's own upgrade note is explicit that ELFs must be rebuilt against it.Description
Bumps the
ziskostag incrates/guest-program/Cargo.tomlandcrates/guest-program/bin/zisk/Cargo.toml, raisesZISK_VERSIONin.github/actions/install-zisk, and refreshes the workspace and ZisK-guest lockfiles. The lock churn is larger than a version string because pil2-proofman moved to crates.io and several ZisK crates gained azisk-prefix (zkvm-interface→zisk-zkvm-interface,lib-c→zisk-lib-c,precompiles-helpers→zisk-precomp-helpers,circuit→zisk-circuit).The one non-mechanical part is
ZISK_RUST_TOOLCHAIN, re-pinned fromzisk-0.5.1tozisk-3.0.0. That pin exists because ziskup installs whatever toolchain release is newest, and the two versions have to agree on who supplies the guest linker script. v1.1.0-alpha reverses the direction of that dependency:zisk-buildnow injects its own script (-C link-arg=-T<zisk_linker_script.ld>), so the toolchain must be one that embeds none. On the old pin the link takes both and fails:No source changes were needed:
zkvm-interface/zkvm_accelerators.his byte-identical between the two tags, so the hand-writtenextern "C"bindings in the ZisK crypto provider still match.cargo-ziskbuild/execute/prove/verifyflags the prover backend drives are unchanged, andziskos::entrypoint!stayed compatible with a plainfn().zkvm_bls12_g1_msm/zkvm_bls12_g2_msm/zkvm_bls12_pairingnow returnZKVM_EFAILon a zero-length pair list. Unreachable from here — all three levm precompiles reject empty calldata before building the pair vector.Two things worth flagging for reviewers:
0xa0000000,.output_dataat0xa0410000instead of0xa0020000), so any pinned ZisK verification key has to be regenerated. Nothing on-chain depends on it today —ZiskBackend::prover_type()is stillunimplemented!().ere-platform-ziskat a pinned ere rev, which still resolves v1.0.0-alpha. feat: update zisk to v1.1.0-alpha eth-act/ere#404 bumps it upstream but landed after ere v0.15.0, so there is no release (and therefore noere-compiler-ziskrelease image) carrying it yet, and moving the sharedERE_REVwould also pull in unrelated sp1/openvm changes. Separate change once ere cuts a release.Also in this PR: the
zkevm_benchworkspacetooling/zkevm_benchlanded on main after this branch was opened, and it carries its own ZisK coupling. Three things needed doing, none of them optional:ziskostag moved, because it depends onethrex-guest-programwith theziskfeature. Its lint step runscargo clippy --lockedand then asserts the lock is unmodified, so this was a guaranteed CI failure on the first run after merging main in. That makes three lockfiles this bump has to touch.make zkevm-bench-setupand the tool's README still said v1.0.0-alpha. Bumped, and the Rust toolchain the target installs is now pinned to the same release CI uses — ziskup takes whatever is newest, which for v1.0.0-alpha was already the wrong pairing, so that target could not have linked a guest as written.ziskemu -Xand parses the AIR-cost report, and v1.1.0-alpha reworks emulator statistics. Rather than assume, I ranziskemu -Xfrom the new toolchain against a guest ELF built from this tree: the only structural change is an addedROM USAGEline. Every labelparse_air_costmatches is still emitted unchanged andROMis not one of them, so it is skipped like any unrecognised label. Noted indocs/ziskemu-output.md.Deliberately left on v1.0.0-alpha: the tool's test fixtures, its sample report, and the committed
fixtures/ziskemu_sample.txt. Those record a real captured run rather than a version we install, so rewriting the strings would misdescribe the capture.How to Test
No CI job builds the ZisK guest ELF — the prover lint job only runs
cargo check/clippy, which do not enablezisk-build-elf— so the toolchain pairing above was verified by hand on an x86_64 Debian 13 box provisioned exactly likeinstall-ziskdoes it (ziskup v1.1.0-alpha +cargo-zisk toolchain install -t zisk-3.0.0):All pass.
readelf -lWon the produced ELF shows the v1.1.0-alpha memory map, confirming the SDK's script won rather than a stale one from the toolchain. Re-pinning the toolchain back tozisk-0.5.1and rebuilding reproduces theregion 'rom' already definedfailure quoted above, so the pin change is load-bearing rather than cosmetic.Checklist
STORE_SCHEMA_VERSION(crates/storage/lib.rs) if the PR includes breaking changes to theStorerequiring a re-sync.