-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.sh
39 lines (33 loc) · 1.57 KB
/
release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# release version
if [[ -z "${SCROLL_ZKVM_VERSION}" ]]; then
echo "SCROLL_ZKVM_VERSION not set"
exit 1
else
DIR_OUTPUT="releases/${SCROLL_ZKVM_VERSION}"
fi
# directory to read assets from
if [[ -z "${SCROLL_ZKVM_TESTRUN_DIR}" ]]; then
echo "SCROLL_ZKVM_TESTRUN_DIR not set"
exit 1
else
DIR_INPUT="${SCROLL_ZKVM_TESTRUN_DIR}"
fi
# create all required directories for release
mkdir -p $DIR_OUTPUT/chunk
mkdir -p $DIR_OUTPUT/batch
mkdir -p $DIR_OUTPUT/bundle
# copy chunk-program related assets
cp ./crates/circuits/chunk-circuit/openvm/app.vmexe $DIR_OUTPUT/chunk/app.vmexe
cp ./crates/circuits/chunk-circuit/openvm/openvm.toml $DIR_OUTPUT/chunk/openvm.toml
# copy batch-program related assets
cp ./crates/circuits/batch-circuit/openvm/app.vmexe $DIR_OUTPUT/batch/app.vmexe
cp ./crates/circuits/batch-circuit/openvm/openvm.toml $DIR_OUTPUT/batch/openvm.toml
# copy bundle-program related assets
cp ./crates/circuits/bundle-circuit/openvm/app.vmexe $DIR_OUTPUT/bundle/app.vmexe
cp ./crates/circuits/bundle-circuit/openvm/openvm.toml $DIR_OUTPUT/bundle/openvm.toml
cp ./crates/circuits/bundle-circuit/openvm/verifier.bin $DIR_OUTPUT/bundle/verifier.bin
cp ./crates/circuits/bundle-circuit/openvm/verifier.sol $DIR_OUTPUT/bundle/verifier.sol
xxd -l 32 -p $DIR_INPUT/bundle/digest_1 | tr -d '\n' | awk '{gsub("%", ""); print}' > $DIR_OUTPUT/bundle/digest_1.hex
xxd -l 32 -p $DIR_INPUT/bundle/digest_2 | tr -d '\n' | awk '{gsub("%", ""); print}' > $DIR_OUTPUT/bundle/digest_2.hex
# upload to s3
aws --profile default s3 cp $DIR_OUTPUT s3://circuit-release/scroll-zkvm/$DIR_OUTPUT --recursive