Skip to content

Commit a16c16e

Browse files
committed
add support for risc0 zk proofs
risc0 can be used as an alternative to sp1
1 parent 0ec16ac commit a16c16e

File tree

43 files changed

+3121
-7041
lines changed

Some content is hidden

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

43 files changed

+3121
-7041
lines changed

.github/workflows/publish-binaries.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
outputs:
2121
eif-hash: ${{ steps.artifact-hashes.outputs.eif-hash }}
2222
sp1-hash: ${{ steps.artifact-hashes.outputs.sp1-hash }}
23+
risc0-hash: ${{ steps.artifact-hashes.outputs.risc0-hash }}
2324
steps:
2425
- uses: actions/checkout@v4
2526

@@ -48,8 +49,10 @@ jobs:
4849
run: |
4950
EIF_SHA512=$(sha512sum synd-withdrawals/out/eif.bin | awk '{print $1}')
5051
SP1_SHA512=$(sha512sum sp1-build/synd-tee-attestation-zk-proofs-sp1-program | awk '{print $1}')
52+
RISC0_SHA512=$(sha512sum sp1-build/synd-tee-attestation-zk-proofs-risc0-program | awk '{print $1}')
5153
echo "eif-hash=$EIF_SHA512" >> $GITHUB_OUTPUT
5254
echo "sp1-hash=$SP1_SHA512" >> $GITHUB_OUTPUT
55+
echo "risc0-hash=$RISC0_SHA512" >> $GITHUB_OUTPUT
5356
5457
- name: Upload build artifacts
5558
uses: actions/upload-artifact@v4
@@ -92,7 +95,7 @@ jobs:
9295
echo "Got: $EIF_SHA512"
9396
exit 1
9497
else
95-
echo "eif.bin hash verification succeeded, hash: $(cat eif.bin.sha512)"
98+
echo "eif.bin hash verification succeeded, hash: $EIF_SHA512"
9699
fi
97100
98101
- name: Verify that hashes of sp1 program files match
@@ -104,7 +107,19 @@ jobs:
104107
echo "Got: $SP1_SHA512"
105108
exit 1
106109
else
107-
echo "sp1 program hash verification succeeded, hash: $(cat sp1-program.sha512)"
110+
echo "sp1 program hash verification succeeded, hash: $SP1_SHA512"
111+
fi
112+
113+
- name: Verify that hashes of risc0 program files match
114+
run: |
115+
RISC0_SHA512=$(sha512sum sp1-build/synd-tee-attestation-zk-proofs-risc0-program | awk '{print $1}')
116+
if [[ "$RISC0_SHA512" != "${{ needs.build.outputs.risc0-hash }}" ]]; then
117+
echo "Error: risc0 program hash doesn't match the one from the build job"
118+
echo "Expected: ${{ needs.build.outputs.risc0-hash }}"
119+
echo "Got: $RISC0_SHA512"
120+
exit 1
121+
else
122+
echo "risc0 program hash verification succeeded, hash: $RISC0_SHA512"
108123
fi
109124
110125
publish-release:
@@ -126,6 +141,7 @@ jobs:
126141
mv synd-withdrawals/out/eif.bin eif-${{ env.TAG_NAME }}.bin
127142
mv synd-withdrawals/server/app/server server-${{ env.TAG_NAME }}.bin
128143
mv sp1-build/synd-tee-attestation-zk-proofs-sp1-program sp1-zk-${{ env.TAG_NAME }}.elf
144+
mv sp1-build/synd-tee-attestation-zk-proofs-risc0-program risc0-zk-${{ env.TAG_NAME }}.elf
129145
130146
- name: Attach binaries to release
131147
uses: softprops/action-gh-release@v1
@@ -135,6 +151,7 @@ jobs:
135151
eif-${{ env.TAG_NAME }}.bin
136152
server-${{ env.TAG_NAME }}.bin
137153
sp1-zk-${{ env.TAG_NAME }}.elf
154+
risc0-zk-${{ env.TAG_NAME }}.elf
138155
139156
notify-failure:
140157
name: Notify on failure

0 commit comments

Comments
 (0)