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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ OutputHashedPlatform::<OpenVMPlatform, Sha256>::write_whole_output(&large_output
| OpenVM | [`1.4.3`](https://github.com/openvm-org/openvm/tree/v1.4.3) | `RV32IMA` | V | | |
| Risc0 | [`3.0.4`](https://github.com/risc0/risc0/tree/v3.0.4) | `RV32IMA` | V | V | |
| SP1 | [`6.0.1`](https://github.com/succinctlabs/sp1/tree/v6.0.1) | `RV64IMA` | V | | |
| Zisk | [`0.16.0`](https://github.com/0xPolygonHermez/zisk/tree/v0.16.0) | `RV64IMA` | V | V | V |
| Zisk | [`0.16.1`](https://github.com/0xPolygonHermez/zisk/tree/v0.16.1) | `RV64IMA` | V | V | V |

## Examples

Expand Down
2 changes: 1 addition & 1 deletion docker/zisk/Dockerfile.cluster
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --de
# Clone repo
WORKDIR /app

RUN git clone https://github.com/han0110/zisk.git --depth 1 --branch patch/v0.16.0 /app
RUN git clone https://github.com/han0110/zisk.git --depth 1 --branch patch/v0.16.1 /app

# Whether to enable CUDA feature or not.
ARG CUDA
Expand Down
10 changes: 8 additions & 2 deletions scripts/sdk_installers/install_zisk_sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ensure_tool_installed "cargo" "to pre-build lib-c"

# Step 1: Download and run the script that installs the ziskup binary itself.
# Export SETUP_KEY=proving-no-consttree to download proving key without doing setup.
export ZISK_VERSION="0.16.0"
export ZISK_VERSION="0.16.1"
export SETUP_KEY=${SETUP_KEY:=proving-no-consttree}
curl "https://raw.githubusercontent.com/0xPolygonHermez/zisk/main/ziskup/install.sh" | bash
unset SETUP_KEY
Expand All @@ -47,6 +47,12 @@ unset SETUP_KEY
# re-used as long as the `ziskos` has the same version.
WORKSPACE=$(mktemp -d)
cargo init "$WORKSPACE" --name build-lib-c
cargo add lib-c --git https://github.com/0xPolygonHermez/zisk.git --tag "v$ZISK_VERSION" --manifest-path "$WORKSPACE/Cargo.toml"
cargo add lib-c --git https://github.com/han0110/zisk.git --branch "patch/v$ZISK_VERSION" --manifest-path "$WORKSPACE/Cargo.toml"
cargo build --manifest-path "$WORKSPACE/Cargo.toml"
rm -rf "$WORKSPACE"

# FIXME: Remove this step when upgrading to `v0.17.0`
# Step 3: Rebuild `ziskemu` using the patched repo
cargo install --git https://github.com/han0110/zisk.git --branch "patch/v$ZISK_VERSION" --locked ziskemu
CARGO_BIN="${CARGO_HOME:-$HOME/.cargo}/bin"
mv $CARGO_BIN/ziskemu $HOME/.zisk/bin/ziskemu
8 changes: 4 additions & 4 deletions tests/zisk/stock_nightly_no_std/src/memcpy.s
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copied from https://github.com/0xPolygonHermez/zisk/blob/v0.16.0/ziskos/entrypoint/src/dma/memcpy.s
# Copied from https://github.com/0xPolygonHermez/zisk/blob/v0.16.1/ziskos/entrypoint/src/dma/memcpy.s

.section ".note.GNU-stack","",@progbits
.text
Expand All @@ -8,9 +8,9 @@
.p2align 4
.type memcpy,@function
memcpy:
csrs 0x813, a2 # Marker: Write count (a2) to CSR 0x813
add x0,a0,a1
csrs 0x813, a1 # Marker: Write count (a2) to CSR 0x813
add x0,a0,a2
ret

.size memcpy, .-memcpy
.section .text.hot,"ax",@progbits
.section .text.hot,"ax",@progbits
8 changes: 4 additions & 4 deletions tests/zisk/stock_nightly_no_std/src/memmove.s
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copied from https://github.com/0xPolygonHermez/zisk/blob/v0.16.0/ziskos/entrypoint/src/dma/memmove.s
# Copied from https://github.com/0xPolygonHermez/zisk/blob/v0.16.1/ziskos/entrypoint/src/dma/memmove.s

.section ".note.GNU-stack","",@progbits
.text
Expand All @@ -8,8 +8,8 @@
.p2align 4
.type memmove,@function
memmove:
csrs 0x813, a2 # Marker: Write count (a2) to CSR 0x813
add x0,a0,a1
csrs 0x813, a1 # Marker: Write count (a2) to CSR 0x813
add x0,a0,a2
ret
.size memmove, .-memmove
.section .text.hot,"ax",@progbits
.section .text.hot,"ax",@progbits
4 changes: 2 additions & 2 deletions tests/zisk/stock_nightly_no_std/src/zisk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ unsafe extern "C" fn _zisk_main() {
crate::main();
}

// According to https://github.com/0xPolygonHermez/zisk/blob/v0.16.0/ziskos/entrypoint/src/lib.rs#L116
// According to https://github.com/0xPolygonHermez/zisk/blob/v0.16.1/ziskos/entrypoint/src/lib.rs#L232
core::arch::global_asm!(
r#"
.section .text.init
Expand Down Expand Up @@ -46,7 +46,7 @@ unsafe impl GlobalAlloc for SimpleAlloc {
#[global_allocator]
static HEAP: SimpleAlloc = SimpleAlloc;

// According to https://github.com/0xPolygonHermez/zisk/blob/v0.16.0/ziskos/entrypoint/src/lib.rs#L241
// According to https://github.com/0xPolygonHermez/zisk/blob/v0.16.1/ziskos/entrypoint/src/lib.rs#L241
#[no_mangle]
pub unsafe extern "C" fn sys_alloc_aligned(bytes: usize, align: usize) -> *mut u8 {
use core::arch::asm;
Expand Down
Loading