Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions .github/actions/install-zisk/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,20 @@ runs:
# and crates/guest-program/bin/zisk/Cargo.toml.
#
# ZISK_RUST_TOOLCHAIN pins the Rust toolchain release (0xPolygonHermez/rust tag)
# used to build guests. ziskup installs the *latest* toolchain release, which
# drifts independently of ZISK_VERSION: the zisk-1.0.0 and zisk-2.0.0 releases
# dropped the guest linker script from rustc's riscv64ima-zisk-zkvm-elf target
# spec, so guest links fail with undefined _global_pointer / _init_stack_top /
# _kernel_heap_* symbols. zisk-0.5.1 is the newest release whose rustc embeds the
# script (byte-identical to the one on the fork's default branch). Re-pin when
# upstream ships a script-bearing toolchain compatible with ZISK_VERSION.
# used to build guests, because ziskup installs whatever release is *latest* and
# that drifts independently of ZISK_VERSION. The two must agree on who supplies
# the guest linker script: since v1.1.0-alpha the SDK passes its own
# (`zisk-build` injects `-C link-arg=-T<zisk_linker_script.ld>`), so the pin has
# to name a toolchain whose riscv64ima-zisk-zkvm-elf target spec carries *no*
# embedded script — otherwise the link gets two with conflicting memory maps and
# rust-lld fails with "region 'rom' already defined".
# zisk-1.0.0 onwards dropped the embedded script; zisk-3.0.0 is the newest and is
# what ziskup itself installs today. (Before v1.1.0-alpha the dependency ran the
# other way: the SDK passed nothing, so the pin had to be zisk-0.5.1, the last
# release whose rustc still embedded a script.)
env:
ZISK_VERSION: "1.0.0-alpha"
ZISK_RUST_TOOLCHAIN: "zisk-0.5.1"
ZISK_VERSION: "1.1.0-alpha"
ZISK_RUST_TOOLCHAIN: "zisk-3.0.0"
run: |
source "$GITHUB_WORKSPACE/.github/scripts/retry.sh"

Expand Down
139 changes: 79 additions & 60 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,17 @@ sort-genesis-files:
bench-rlp: ## ⚡ Bench the RLP decoder/encoder
cd ./crates/common/rlp && cargo bench

zkevm-bench-setup: ## Install ZisK v1.0.0-alpha toolchain for the zkEVM benchmark (Linux)
zkevm-bench-setup: ## Install ZisK v1.1.0-alpha toolchain for the zkEVM benchmark (Linux)
sudo apt-get update
sudo apt-get install -y xz-utils jq curl build-essential qemu-system libomp-dev libgmp-dev nlohmann-json3-dev protobuf-compiler uuid-dev libgrpc++-dev libsecp256k1-dev libsodium-dev libpqxx-dev nasm libopenmpi-dev openmpi-bin openmpi-common libclang-dev clang gcc-riscv64-unknown-elf
mkdir -p $(HOME)/.zisk/bin
curl -fsSL "https://raw.githubusercontent.com/0xPolygonHermez/zisk/v1.0.0-alpha/ziskup/ziskup" -o $(HOME)/.zisk/bin/ziskup
curl -fsSL "https://raw.githubusercontent.com/0xPolygonHermez/zisk/v1.1.0-alpha/ziskup/ziskup" -o $(HOME)/.zisk/bin/ziskup
chmod +x $(HOME)/.zisk/bin/ziskup
$(HOME)/.zisk/bin/ziskup -v 1.0.0-alpha --nokey -y
$(HOME)/.zisk/bin/ziskup -v 1.1.0-alpha --nokey -y
# ziskup installs whatever Rust toolchain release is latest; pin it to the same
# one CI uses so a guest built here links the same way. See the comment in
# .github/actions/install-zisk/action.yml for why the two versions are coupled.
ZISK_HOME=$(HOME)/.zisk $(HOME)/.zisk/bin/cargo-zisk toolchain install -t zisk-3.0.0
@echo "Add $(HOME)/.zisk/bin to PATH (e.g. export PATH=$(HOME)/.zisk/bin:$$PATH). --nokey skips the (large) proving key — emulation doesn't need it."

# Using & so make calls this recipe only once per run
Expand Down
2 changes: 1 addition & 1 deletion crates/guest-program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ ff = { version = "0.13", default-features = false, optional = true }
# git source is fine here — guest-program is not published.
openvm-kzg = { git = "https://github.com/axiom-crypto/openvm-kzg.git", rev = "530a6ed413def5296b7e4967650ba4fc8fd92ea1", optional = true } # v1.4.1
# Must match ZISK_VERSION in .github/actions/install-zisk/action.yml.
ziskos = { git = "https://github.com/0xPolygonHermez/zisk.git", tag = "v1.0.0-alpha", optional = true, default-features = false, features = ["inputcpy"] }
ziskos = { git = "https://github.com/0xPolygonHermez/zisk.git", tag = "v1.1.0-alpha", optional = true, default-features = false, features = ["inputcpy"] }

[build-dependencies]
hex.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/guest-program/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Each subdirectory in `bin/` contains a guest implementation for a specific zkVM.
- **ELF output**: `bin/risc0/out/riscv32im-risc0-elf`
- **VK output**: `bin/risc0/out/riscv32im-risc0-vk`

### ZisK v1.0.0-alpha (Polygon)
### ZisK v1.1.0-alpha (Polygon)
- **Architecture**: RISC-V 64-bit
- **ELF output**: `bin/zisk/out/riscv64ima-zisk-elf`
- **Requires**: `cargo-zisk` toolchain installed
Expand Down
Loading
Loading