-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5dfc439
commit 903e442
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: ELF | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- 'programs/**' | ||
- 'elf/**' | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'programs/**' | ||
- 'elf/**' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
elf: | ||
runs-on: | ||
- runs-on | ||
- runner=64cpu-linux-arm64 | ||
- run-id=${{ github.run_id }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install SP1 toolchain | ||
run: | | ||
curl -L https://sp1.succinct.xyz | bash | ||
~/.sp1/bin/sp1up | ||
~/.sp1/bin/cargo-prove prove --version | ||
source ~/.bashrc | ||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Verify the OP Succinct binaries | ||
run: | | ||
# Save verification keys | ||
RANGE_VK=$(cargo run --bin vkey --release | grep "Range ELF Verification Key Commitment:" | cut -d' ' -f6) | ||
AGGREGATION_VK=$(cargo run --bin vkey --release | grep "Aggregation ELF Verification Key:" | cut -d' ' -f6) | ||
# Build the binaries | ||
cargo prove build --elf-name range-elf --docker --tag latest | ||
cargo prove build --elf-name aggregation-elf --docker --tag latest | ||
# Save new verification keys | ||
NEW_RANGE_VK=$(cargo run --bin vkey --release | grep "Range ELF Verification Key Commitment:" | cut -d' ' -f6) | ||
NEW_AGGREGATION_VK=$(cargo run --bin vkey --release | grep "Aggregation ELF Verification Key:" | cut -d' ' -f6) | ||
# Compare the verification keys | ||
[ "$NEW_RANGE_VK" = "$RANGE_VK" ] || exit 1 | ||
[ "$NEW_AGGREGATION_VK" = "$AGGREGATION_VK" ] || exit 1 |