-
Notifications
You must be signed in to change notification settings - Fork 157
chore(l2): include zkVM ELFs and VKs in the releases #5244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 15 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
55326df
Include zkvm elfs and vks in the releases
b0ac68e
Attach tag to zkvm vks
9b81c0b
Write risc0 elf to out dir & fix release workflow
09c7e93
Fix download verification keys step
941ac61
Update step name
9197dec
Use mv back
a546d85
Fix release tag workflow
afeef14
Rollback
48b6a4a
Apply suggestion from @Copilot
ilitteri 29c1703
Release vks in ethrex-verification-keys.tar.gz
3510728
Make steps consistent
918c561
Require package-verification-keys for finalizing the release
e1e5ba0
Pack elf and vks in ethrex-guests.tar.gz
42db4fe
Merge branch 'main' into ethrex_zkvm_elf_releases
ilitteri f7f8464
Rename workflow steps
0d0073d
Remove needless step
57351d2
Fix
5e55a28
Merge branch 'main' into ethrex_zkvm_elf_releases
ilitteri 316586f
Fix
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -149,6 +149,114 @@ jobs: | |
| name: verification_keys | ||
| path: verification_keys/ | ||
|
|
||
| # There's a separate job to build the guest programs for SP1 and RISC0 since | ||
| # they need to be built without the l2 features. | ||
| build-ethrex-guest: | ||
| strategy: | ||
| matrix: | ||
| zkvm: | ||
| - sp1 | ||
| - risc0 | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Free Disk Space | ||
| uses: ./.github/actions/free-disk | ||
|
|
||
| - name: Setup Rust Environment | ||
| uses: ./.github/actions/setup-rust | ||
|
|
||
| - name: Install SP1 | ||
| if: ${{ matrix.zkvm == 'sp1' }} | ||
| env: | ||
| SHELL: /bin/bash | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| curl -L https://sp1up.succinct.xyz | bash | ||
| ~/.sp1/bin/sp1up --version 5.0.8 | ||
|
|
||
| - name: Install RISC0 | ||
| if: ${{ matrix.zkvm == 'risc0' }} | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| curl -L https://risczero.com/install | bash | ||
| ~/.risc0/bin/rzup install cargo-risczero 3.0.3 | ||
| ~/.risc0/bin/rzup install risc0-groth16 | ||
| ~/.risc0/bin/rzup install rust | ||
|
|
||
| - name: Build ethrex elf - ${{ matrix.zkvm }} | ||
| run: | | ||
| cargo build --release --package guest_program --features ${{ matrix.zkvm }} | ||
| mkdir -p ${{ matrix.zkvm }}_verification_keys | ||
| if [ "${{ matrix.zkvm }}" = "sp1" ]; then | ||
| mv crates/l2/prover/src/guest_program/src/${{ matrix.zkvm }}/out/riscv32im-succinct-zkvm-elf ethrex-riscv32im-${{ matrix.zkvm }}-elf-${{ github.ref_name }} | ||
| mv crates/l2/prover/src/guest_program/src/${{ matrix.zkvm }}/out/riscv32im-succinct-zkvm-vk-bn254 ${{ matrix.zkvm }}_verification_keys/ethrex-riscv32im-${{ matrix.zkvm }}-vk-bn254-${{ github.ref_name }} | ||
| mv crates/l2/prover/src/guest_program/src/${{ matrix.zkvm }}/out/riscv32im-succinct-zkvm-vk-u32 ${{ matrix.zkvm }}_verification_keys/ethrex-riscv32im-${{ matrix.zkvm }}-vk-u32-${{ github.ref_name }} | ||
| elif [ "${{ matrix.zkvm }}" = "risc0" ]; then | ||
| mv crates/l2/prover/src/guest_program/src/${{ matrix.zkvm }}/out/riscv32im-risc0-elf ethrex-riscv32im-${{ matrix.zkvm }}-elf-${{ github.ref_name}} | ||
| mv crates/l2/prover/src/guest_program/src/${{ matrix.zkvm }}/out/riscv32im-risc0-vk ${{ matrix.zkvm }}_verification_keys/ethrex-riscv32im-${{ matrix.zkvm }}-vk-${{ github.ref_name}} | ||
| fi | ||
|
|
||
| - name: Upload ethrex guest elf artifact - ${{ matrix.zkvm }} | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ethrex-riscv32im-${{ matrix.zkvm }}-elf-${{ github.ref_name }} | ||
| path: ethrex-riscv32im-${{ matrix.zkvm }}-elf-${{ github.ref_name }} | ||
|
|
||
| - name: Upload ethrex guest verification keys - ${{ matrix.zkvm }} | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ matrix.zkvm }}_verification_keys | ||
| path: ${{ matrix.zkvm }}_verification_keys/ | ||
|
|
||
| # Creates ethrex-guests.tar.gz artifact including both SP1 and | ||
| # RISC0 elf and verification keys. | ||
| package-ethrex-guest: | ||
| needs: | ||
| - build-ethrex-guest | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Download SP1 elf artifact | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: ethrex-riscv32im-sp1-elf-${{ github.ref_name }} | ||
| path: ethrex_guests/sp1/ethrex-riscv32im-sp1-elf-${{ github.ref_name }} | ||
|
|
||
| - name: Download SP1 verification keys artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: sp1_verification_keys | ||
| path: ethrex_guests/sp1/ | ||
|
|
||
| - name: Download RISC0 elf artifact | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: ethrex-riscv32im-risc0-elf-${{ github.ref_name }} | ||
| path: ethrex_guests/risc0/ethrex-riscv32im-risc0-elf-${{ github.ref_name }} | ||
|
|
||
| - name: Download RISC0 verification keys artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: risc0_verification_keys | ||
| path: ethrex_guests/risc0/ | ||
|
|
||
| - name: Archive ethrex guests | ||
| run: | | ||
| cd ethrex_guests/ | ||
| tar -czvf ethrex-guests.tar.gz . | ||
|
|
||
| - name: Upload ethrex guests artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ethrex-guests.tar.gz | ||
| path: ethrex-guests.tar.gz | ||
|
|
||
| package-contracts: | ||
| needs: | ||
| - build-ethrex | ||
|
|
@@ -221,8 +329,10 @@ jobs: | |
| finalize-release: | ||
| needs: | ||
| - build-ethrex | ||
| - build-ethrex-guest | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is not needed since it is required in |
||
| - build-docker | ||
| - package-contracts | ||
| - package-ethrex-guest | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout Code | ||
|
|
@@ -234,7 +344,7 @@ jobs: | |
| uses: actions/download-artifact@v4 | ||
| with: | ||
| path: ./bin | ||
| pattern: "ethrex*" | ||
| pattern: "ethrex*" # This includes the binaries, elf files, ethrex-verification-keys.tar.gz, and ethrex-contracts.tar.gz | ||
|
|
||
| - name: Get previous tag | ||
| run: | | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not needed