Skip to content

Commit

Permalink
add circuit-assets.txt (#354)
Browse files Browse the repository at this point in the history
* add circuit-assets.txt

* v0.13.1

* rename as md

* sym link not works well

* split checksum
  • Loading branch information
lispc authored Nov 22, 2024
1 parent 66b0aee commit 82f8ed3
Show file tree
Hide file tree
Showing 35 changed files with 85 additions and 1,370 deletions.
45 changes: 45 additions & 0 deletions circuit-assets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@


## Circuit Setup Files

Setup files are not related to circuit versions. Available in Scroll S3 or PSE S3:

```
for degree in 20 21 24 25 26
do
wget https://circuit-release.s3.us-west-2.amazonaws.com/setup/params${degree}
# or
# wget https://trusted-setup-halo2kzg.s3.eu-central-1.amazonaws.com/perpetual-powers-of-tau-raw-${degree} -O params${degree}
done
```

Checksum can be found [here](./params-sha256sum)

To know more about how these files are generated, see [here](https://github.com/han0110/halo2-kzg-srs?tab=readme-ov-file#download-the-converted-srs)


## Circuit Assets Files (VKs)


Assets files are related to circuit versions. Available in Github [v0.13.1 assets](./release-v0.13.1) and S3:

```
VERSION="v0.13.1"
wget https://circuit-release.s3.us-west-2.amazonaws.com/release-v${VERSION}/sha256sum
wget https://circuit-release.s3.us-west-2.amazonaws.com/release-v${VERSION}/chunk.protocol
wget https://circuit-release.s3.us-west-2.amazonaws.com/release-v${VERSION}/evm_verifier.bin
wget https://circuit-release.s3.us-west-2.amazonaws.com/release-v${VERSION}/evm_verifier.yul
wget https://circuit-release.s3.us-west-2.amazonaws.com/release-v${VERSION}/layer1.config
wget https://circuit-release.s3.us-west-2.amazonaws.com/release-v${VERSION}/layer2.config
wget https://circuit-release.s3.us-west-2.amazonaws.com/release-v${VERSION}/layer3.config
wget https://circuit-release.s3.us-west-2.amazonaws.com/release-v${VERSION}/layer4.config
wget https://circuit-release.s3.us-west-2.amazonaws.com/release-v${VERSION}/layer5.config
wget https://circuit-release.s3.us-west-2.amazonaws.com/release-v${VERSION}/layer6.config
wget https://circuit-release.s3.us-west-2.amazonaws.com/release-v${VERSION}/pi.data
wget https://circuit-release.s3.us-west-2.amazonaws.com/release-v${VERSION}/preprocessed_digest.hex
wget https://circuit-release.s3.us-west-2.amazonaws.com/release-v${VERSION}/proof.data
wget https://circuit-release.s3.us-west-2.amazonaws.com/release-v${VERSION}/vk_batch.vkey
wget https://circuit-release.s3.us-west-2.amazonaws.com/release-v${VERSION}/vk_bundle.vkey
wget https://circuit-release.s3.us-west-2.amazonaws.com/release-v${VERSION}/vk_chunk.vkey
```
5 changes: 5 additions & 0 deletions params-sha256sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
54ef75911da76d7a6b7ea341998aaf66cb06c679c53e0a88a4fe070dd3add963 params20
486e044cf98704e07f41137d2b89698dc03d1fbf34d13b60902fea19a6013b4b params21
f94fa4afa2f5147680f907d4dd96a8826206c26bd3328cd379feaed614b234de params24
dec49a69893fbcd66cd06296b2d936a6aceb431c130b2e52675fe4274b504f57 params25
b198a51d48b88181508d8e4ea9dea39db285e4585663b29b7e4ded0c22a94875 params26
Binary file removed release-v0.12.0/evm_verifier.bin
Binary file not shown.
1,248 changes: 0 additions & 1,248 deletions release-v0.12.0/evm_verifier.yul

This file was deleted.

Binary file removed release-v0.12.0/pi.data
Binary file not shown.
1 change: 0 additions & 1 deletion release-v0.12.0/preprocessed_digest.hex

This file was deleted.

Binary file removed release-v0.12.0/proof.data
Binary file not shown.
15 changes: 0 additions & 15 deletions release-v0.12.0/sha256sum

This file was deleted.

Binary file removed release-v0.12.0/vk_batch.vkey
Binary file not shown.
Binary file removed release-v0.12.0/vk_bundle.vkey
Binary file not shown.
1 change: 0 additions & 1 deletion release-v0.13.0/chunk.protocol

This file was deleted.

14 changes: 0 additions & 14 deletions release-v0.13.0/layer1.config

This file was deleted.

14 changes: 0 additions & 14 deletions release-v0.13.0/layer2.config

This file was deleted.

14 changes: 0 additions & 14 deletions release-v0.13.0/layer3.config

This file was deleted.

14 changes: 0 additions & 14 deletions release-v0.13.0/layer4.config

This file was deleted.

14 changes: 0 additions & 14 deletions release-v0.13.0/layer5.config

This file was deleted.

14 changes: 0 additions & 14 deletions release-v0.13.0/layer6.config

This file was deleted.

Binary file removed release-v0.13.0/vk_chunk.vkey
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
56 changes: 35 additions & 21 deletions release.sh
Original file line number Diff line number Diff line change
@@ -1,29 +1,43 @@
IN=integration/outputs/e2e_tests_20240819_131744/
OUT=release-v0.13.0
CIRCUIT_VERSION="v0.13.1"

mkdir -p $OUT
function download_s3() {
OUT=release-${CIRCUIT_VERSION}
aws --profile default s3 cp s3://circuit-release/$OUT $OUT --recursive
}

# copy snark protocol and verification keys
cp $IN/chunk_chunk_0.protocol $OUT/chunk.protocol
cp $IN/vk_chunk_0.vkey $OUT/vk_chunk.vkey
cp $IN/vk_batch_agg.vkey $OUT/vk_batch.vkey
cp $IN/vk_bundle_recursion.vkey $OUT/vk_bundle.vkey
function upload_s3() {
IN=integration/outputs/e2e_tests_20240819_131744/
OUT=release-${CIRCUIT_VERSION}

# copy verifier contract binary
cp $IN/evm_verifier.bin $OUT/evm_verifier.bin
cp $IN/evm_verifier.yul $OUT/evm_verifier.yul
mkdir -p $OUT

# copy public input and proof for the outermost circuit (recursive bundler)
cp $IN/pi_bundle_recursion.data $OUT/pi.data
cp $IN/proof_bundle_recursion.data $OUT/proof.data
# copy snark protocol and verification keys
cp $IN/chunk_chunk_0.protocol $OUT/chunk.protocol
cp $IN/vk_chunk_0.vkey $OUT/vk_chunk.vkey
cp $IN/vk_batch_agg.vkey $OUT/vk_batch.vkey
cp $IN/vk_bundle_recursion.vkey $OUT/vk_bundle.vkey

# dump the preprocessed digest into a separate hex file.
# preprocessed digest is the first 32 bytes of the public input.
xxd -l 32 -p $OUT/pi.data | tr -d '\n' | awk '{gsub("%", ""); print}' > $OUT/preprocessed_digest.hex
# copy verifier contract binary
cp $IN/evm_verifier.bin $OUT/evm_verifier.bin
cp $IN/evm_verifier.yul $OUT/evm_verifier.yul

# copy config values for each proving layer
cp ./integration/configs/* $OUT
# copy public input and proof for the outermost circuit (recursive bundler)
cp $IN/pi_bundle_recursion.data $OUT/pi.data
cp $IN/proof_bundle_recursion.data $OUT/proof.data

cd $OUT; sha256sum * > sha256sum; cd ..
# dump the preprocessed digest into a separate hex file.
# preprocessed digest is the first 32 bytes of the public input.
xxd -l 32 -p $OUT/pi.data | tr -d '\n' | awk '{gsub("%", ""); print}' >$OUT/preprocessed_digest.hex

aws --profile default s3 cp $OUT s3://circuit-release/$OUT --recursive
# copy config values for each proving layer
cp ./integration/configs/* $OUT

cd $OUT
sha256sum * > sha256sum
cd ..

aws --profile default s3 cp $OUT s3://circuit-release/$OUT --recursive
}

#upload_s3
download_s3

0 comments on commit 82f8ed3

Please sign in to comment.