Skip to content

Commit b632745

Browse files
agnusmorxavi-pinsachzkronos73RogerTaulehecmas
authored
Merge pull request #927 from 0xPolygonHermez/develop
Merge develop (0.17.0) into main ------------- Co-authored-by: Xavier Pinsach <10213118+xavi-pinsach@users.noreply.github.com> Co-authored-by: agnusmor <100322135+agnusmor@users.noreply.github.com> Co-authored-by: zkronos73 <zkronos73@gmail.com> Co-authored-by: Roger Taulé Buxadera <55488871+RogerTaule@users.noreply.github.com> Co-authored-by: zkronos73 <94566827+zkronos73@users.noreply.github.com> Co-authored-by: RogerTaule <roger.taulee@gmail.com> Co-authored-by: Héctor Masip Ardevol <hmasip@polygon.technology> Co-authored-by: rickb80 <75077385+rickb80@users.noreply.github.com> Co-authored-by: fractasy <fractasy@gmail.com>
2 parents 48cf7cc + 6b0a03e commit b632745

668 files changed

Lines changed: 55132 additions & 22346 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pr.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
uses: actions-rs/cargo@v1
4040
with:
4141
command: test
42-
args: --workspace --release --features no_lib_link
42+
args: --workspace --release
4343
env:
4444
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0 -C target-cpu=native
4545
RUST_BACKTRACE: 1
@@ -59,10 +59,10 @@ jobs:
5959
env:
6060
ZISK_GHA: "1"
6161
ZISK_REPO_DIR: ${{ github.workspace }}
62-
ZISK_TESTVECTORS_BRANCH: "main"
62+
ZISK_TESTVECTORS_BRANCH: "develop-0.3.0"
6363
DISTRIBUTED_PROCESSES: "2"
6464
DISTRIBUTED_THREADS: "64"
65-
PROVE_FLAGS: "-a -y"
65+
PROVE_FLAGS: "-y"
6666
TERM: xterm
6767
steps:
6868
- name: Checkout sources
@@ -86,6 +86,8 @@ jobs:
8686
./build_setup.sh
8787
8888
- name: Test sha_hasher
89+
env:
90+
ZISK_TEMPLATE_BRANCH: "pre-develop-0.17.0"
8991
run: |
9092
cd "$GITHUB_WORKSPACE/tools/test-env"
9193
./test_sha_hasher.sh
@@ -140,6 +142,8 @@ jobs:
140142
./build_zisk.sh
141143
142144
- name: Test sha_hasher
145+
env:
146+
ZISK_TEMPLATE_BRANCH: "pre-develop-0.17.0"
143147
run: |
144148
cd "$GITHUB_WORKSPACE/tools/test-env"
145149
./test_sha_hasher.sh
@@ -188,7 +192,7 @@ jobs:
188192
uses: actions-rs/cargo@v1
189193
with:
190194
command: clippy
191-
args: --all-targets -- -D warnings
192-
# args: --all-features --all-targets -- -D warnings -A incomplete-features
195+
# args: --all-targets -- -D warnings
196+
args: --all-features --all-targets -- -D warnings -A incomplete-features
193197
env:
194198
CARGO_INCREMENTAL: 1

.github/workflows/pr_emulator.yml

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
concurrency:
1919
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref || github.run_id }}
2020
cancel-in-progress: true
21-
21+
2222
jobs:
2323
riscof-elf-tests-rust:
2424
name: Riscof ELF tests (rust emulator)
@@ -52,41 +52,41 @@ jobs:
5252
cd "$GITHUB_WORKSPACE"
5353
sudo ./tools/emulate_all.sh $GITHUB_WORKSPACE/zisk-testvectors/riscof/riscof_work
5454
55-
riscof-elf-tests-asm:
56-
name: Riscof ELF tests (assembly emulator)
57-
runs-on: ubuntu-latest
58-
timeout-minutes: 240
59-
defaults:
60-
run:
61-
shell: bash
62-
env:
63-
ZISK_GHA: "1"
64-
ZISK_REPO_DIR: ${{ github.workspace }}
65-
TERM: xterm
66-
steps:
67-
- name: Increase shared memory (/dev/shm)
68-
run: |
69-
set -euxo pipefail
70-
df -h /dev/shm || true
71-
sudo mount -o remount,size=16G /dev/shm || sudo mount -o remount,size=16G /run/shm
72-
df -h /dev/shm
55+
# riscof-elf-tests-asm:
56+
# name: Riscof ELF tests (assembly emulator)
57+
# runs-on: ubuntu-latest
58+
# timeout-minutes: 240
59+
# defaults:
60+
# run:
61+
# shell: bash
62+
# env:
63+
# ZISK_GHA: "1"
64+
# ZISK_REPO_DIR: ${{ github.workspace }}
65+
# TERM: xterm
66+
# steps:
67+
# - name: Increase shared memory (/dev/shm)
68+
# run: |
69+
# set -euxo pipefail
70+
# df -h /dev/shm || true
71+
# sudo mount -o remount,size=16G /dev/shm || sudo mount -o remount,size=16G /run/shm
72+
# df -h /dev/shm
7373

74-
- name: Checkout sources
75-
uses: actions/checkout@v4
74+
# - name: Checkout sources
75+
# uses: actions/checkout@v4
7676

77-
- name: Checkout zisk-testvectors repo
78-
uses: actions/checkout@v4
79-
with:
80-
repository: 0xPolygonHermez/zisk-testvectors
81-
path: zisk-testvectors
77+
# - name: Checkout zisk-testvectors repo
78+
# uses: actions/checkout@v4
79+
# with:
80+
# repository: 0xPolygonHermez/zisk-testvectors
81+
# path: zisk-testvectors
8282

83-
- name: Install dependencies
84-
run: |
85-
cd "$GITHUB_WORKSPACE/tools/test-env"
86-
sudo ./install_deps.sh
83+
# - name: Install dependencies
84+
# run: |
85+
# cd "$GITHUB_WORKSPACE/tools/test-env"
86+
# sudo ./install_deps.sh
8787

88-
- name: Emulate in assembly Riscof ELF files
89-
run: |
90-
. "$HOME/.cargo/env"
91-
cd "$GITHUB_WORKSPACE"
92-
sudo ./tools/emulate_asm_all.sh $GITHUB_WORKSPACE/zisk-testvectors/riscof/riscof_work
88+
# - name: Emulate in assembly Riscof ELF files
89+
# run: |
90+
# . "$HOME/.cargo/env"
91+
# cd "$GITHUB_WORKSPACE"
92+
# sudo ./tools/emulate_asm_all.sh $GITHUB_WORKSPACE/zisk-testvectors/riscof/riscof_work

.github/workflows/release.yml

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
shell: bash
8585
run: |
8686
cd "$GITHUB_WORKSPACE/tools/test-env"
87-
./install_deps.sh
87+
./install_deps.sh --cuda
8888
8989
- name: Setup macOS env vars
9090
if: matrix.target == 'aarch64-apple-darwin'
@@ -95,13 +95,12 @@ jobs:
9595
echo "LIBFFI_LIB_DIR=/opt/homebrew/opt/libffi/lib" >> $GITHUB_ENV
9696
echo "LIBFFI_INCLUDE_DIR=/opt/homebrew/opt/libffi/include" >> $GITHUB_ENV
9797
98-
- name: Build binaries
98+
- name: Build binaries (CPU-only)
9999
shell: bash
100100
run: |
101-
cargo build --release --target "${{ matrix.target }}"
101+
cargo build --release --target "${{ matrix.target }}" --features "cpu-only"
102102
103-
- name: Archive binaries
104-
id: artifacts
103+
- name: Copy binaries
105104
env:
106105
PLATFORM_NAME: ${{ matrix.platform }}
107106
TARGET: ${{ matrix.target }}
@@ -112,11 +111,16 @@ jobs:
112111
113112
LIB_EXT=$([[ "${PLATFORM_NAME}" == "darwin" ]] && echo "dylib" || echo "so")
114113
115-
cp ./target/${TARGET}/release/cargo-zisk zisk-dist/bin/
114+
if [[ "${PLATFORM_NAME}" == "linux" ]]; then
115+
cp ./target/${TARGET}/release/cargo-zisk zisk-dist/bin/cargo-zisk-cpu
116+
cp ./target/${TARGET}/release/zisk-worker zisk-dist/bin/zisk-worker-cpu
117+
else
118+
cp ./target/${TARGET}/release/cargo-zisk zisk-dist/bin/
119+
cp ./target/${TARGET}/release/zisk-worker zisk-dist/bin/
120+
fi
116121
cp ./target/${TARGET}/release/ziskemu zisk-dist/bin/
117122
cp ./target/${TARGET}/release/riscv2zisk zisk-dist/bin/
118123
cp ./target/${TARGET}/release/zisk-coordinator zisk-dist/bin/
119-
cp ./target/${TARGET}/release/zisk-worker zisk-dist/bin/
120124
cp ./ziskup/ziskup zisk-dist/bin/
121125
cp ./target/${TARGET}/release/libziskclib.a zisk-dist/bin/
122126
@@ -127,6 +131,36 @@ jobs:
127131
cp ./emulator-asm/Makefile zisk-dist/zisk/emulator-asm
128132
fi
129133
134+
- name: Build binaries (GPU)
135+
if: matrix.platform == 'linux'
136+
shell: bash
137+
run: |
138+
tmp_log=$(mktemp)
139+
cargo build --release --target "${{ matrix.target }}" -vv 2>&1 | tee "${tmp_log}"
140+
if ! grep -qi "STARKS compiled with GPU support" "${tmp_log}"; then
141+
echo "Error: Zisk built without GPU support, aborting."
142+
exit 1
143+
fi
144+
145+
- name: Copy binaries (GPU)
146+
if: matrix.platform == 'linux'
147+
env:
148+
PLATFORM_NAME: ${{ matrix.platform }}
149+
TARGET: ${{ matrix.target }}
150+
ARCH: ${{ matrix.arch }}
151+
shell: bash
152+
run: |
153+
cp ./target/${TARGET}/release/cargo-zisk zisk-dist/bin/cargo-zisk-gpu
154+
cp ./target/${TARGET}/release/zisk-worker zisk-dist/bin/zisk-worker-gpu
155+
156+
- name: Archive binaries
157+
id: artifacts
158+
env:
159+
PLATFORM_NAME: ${{ matrix.platform }}
160+
TARGET: ${{ matrix.target }}
161+
ARCH: ${{ matrix.arch }}
162+
shell: bash
163+
run: |
130164
ARCHIVE_FILE="cargo_zisk_${PLATFORM_NAME}_${ARCH}.tar.gz"
131165
tar -czvf "$ARCHIVE_FILE" -C zisk-dist .
132166

.github/workflows/test_install_bin.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
- name: Create program
9898
shell: bash
9999
run: |
100-
cargo-zisk sdk new $HOME/guest
100+
cargo-zisk new $HOME/guest
101101
102102
- name: Build program
103103
shell: bash
@@ -130,7 +130,7 @@ jobs:
130130
shell: bash
131131
run: |
132132
cd $HOME/guest
133-
cargo-zisk prove -e target/elf/riscv64ima-zisk-zkvm-elf/release/guest -i host/tmp/input.bin -o proof -a -y -p 8000 -u 2>&1 | tee prove_output.log
133+
cargo-zisk prove -e target/elf/riscv64ima-zisk-zkvm-elf/release/guest -i host/tmp/input.bin -o proof.bin -y -p 8000 -u 2>&1 | tee prove_output.log
134134
if ! grep -F "Vadcop Final proof was verified" prove_output.log; then
135135
echo "❌ Prove program failed"
136136
exit 1
@@ -140,8 +140,8 @@ jobs:
140140
shell: bash
141141
run: |
142142
cd $HOME/guest
143-
cargo-zisk verify -p ./proof/vadcop_final_proof.bin 2>&1 | tee verify_output.log
144-
if ! grep -F "Stark proof was verified" verify_output.log; then
143+
cargo-zisk verify -p ./proof.bin 2>&1 | tee verify_output.log
144+
if ! grep -F "STARK proof was verified" verify_output.log; then
145145
echo "❌ Verify proof failed"
146146
exit 1
147147
fi

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
**/target
33

44
/*.tar.gz
5+
/*.json.gz
56
/riscof
67
/build*
78
/proofs*

0 commit comments

Comments
 (0)