-
Notifications
You must be signed in to change notification settings - Fork 118
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
Conversation
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.
Pull Request Overview
This PR adds support for building and distributing RISC0 ELF files alongside verification keys in the release workflow. The key changes include writing the RISC0 ELF binary to disk during the build process and updating the GitHub workflow to upload both ELF files and verification keys as release artifacts.
- Extracts and writes the RISC0 ELF binary to a file during the build process
- Adds a new CI job to build guest programs for both SP1 and RISC0 zkVMs
- Updates the release workflow to download and include verification keys as separate artifacts
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| crates/l2/prover/src/guest_program/build.rs | Adds extraction and writing of RISC0 ELF binary to file system |
| .github/workflows/tag_release.yaml | Adds new job to build guest programs and handle verification keys as separate artifacts |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/workflows/tag_release.yaml
Outdated
| mv crates/l2/prover/src/guest_program/src/${{ matrix.zkvm }}/out/riscv32im-risc0-vk ethrex-riscv32im-risc0-elf-${{ github.ref_name}} | ||
| mv crates/l2/prover/src/guest_program/src/${{ matrix.zkvm }}/out/riscv32im-risc0-vk ${{ matrix.zkvm }}_verification_keys/ethrex-riscv32im-risc0-vk-${{ github.ref_name}} |
Copilot
AI
Nov 8, 2025
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.
Missing closing brace in template expression. Both lines should use ${{ github.ref_name }} with a closing brace, not ${{ github.ref_name}}.
| mv crates/l2/prover/src/guest_program/src/${{ matrix.zkvm }}/out/riscv32im-risc0-vk ethrex-riscv32im-risc0-elf-${{ github.ref_name}} | |
| mv crates/l2/prover/src/guest_program/src/${{ matrix.zkvm }}/out/riscv32im-risc0-vk ${{ matrix.zkvm }}_verification_keys/ethrex-riscv32im-risc0-vk-${{ github.ref_name}} | |
| mv crates/l2/prover/src/guest_program/src/${{ matrix.zkvm }}/out/riscv32im-risc0-vk ethrex-riscv32im-risc0-elf-${{ github.ref_name }} | |
| mv crates/l2/prover/src/guest_program/src/${{ matrix.zkvm }}/out/riscv32im-risc0-vk ${{ matrix.zkvm }}_verification_keys/ethrex-riscv32im-risc0-vk-${{ github.ref_name }} |
Lines of code reportTotal lines added: Detailed view |
.github/workflows/tag_release.yaml
Outdated
| uses: actions/download-artifact@v4 | ||
| with: | ||
| path: ./bin | ||
| pattern: "*_verification_keys" # sp1_verification_keys, risc0_verification_keys |
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.
I'm not sure if the pattern needs to be instead "*_verification_keys/*"
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.
I'd put VKs and ELFs in a .tar file so we don't add 5 more files
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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
.github/workflows/tag_release.yaml
Outdated
| - name: Checkout code | ||
| uses: actions/checkout@v4 |
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
tomip01
left a comment
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.
Just a nit
| finalize-release: | ||
| needs: | ||
| - build-ethrex | ||
| - build-ethrex-guest |
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.
I think this is not needed since it is required in package-ethrex-guest
**Motivation** We need releases of ethrex's ELFs and VKs to use independently for proving L1 blocks execution. **Description** - Adds a `build-ethrex-guest` workflow to run with a mattrix strategy (for sp1 and risc0) that builds the `guest_program` crate with the features `sp1` and `risc0`. We need this as a separate job and cannot reuse the builds from ubuntu-22.04 for l2_gpu because the guest program being built there is different than the one we need for statelessly verifying L1 blocks. - Adds a `package-ethrex-guests` workflow to create `ethrex-guests.tar.gz` compressing SP1 and RISC0 elf and vks. - RISC0's ELF file is now generated. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Motivation
We need releases of ethrex's ELFs and VKs to use independently for proving L1 blocks execution.
Description
build-ethrex-guestworkflow to run with a mattrix strategy (for sp1 and risc0) that builds theguest_programcrate with the featuressp1andrisc0. We need this as a separate job and cannot reuse the builds from ubuntu-22.04 for l2_gpu because the guest program being built there is different than the one we need for statelessly verifying L1 blocks.package-ethrex-guestsworkflow to createethrex-guests.tar.gzcompressing SP1 and RISC0 elf and vks.