Skip to content
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

Add a script to download trusted setup key #153

Merged
merged 3 commits into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,9 @@ test-agg:
rows:
@cargo test --features prove_verify --release estimate_circuit_rows

# Could be called as `make download-setup -e degree=DEGREE params_dir=PARAMS_DIR`.
# As default `degree=25` and `params_dir=./prover/test_params`.
download-setup:
sh download_setup.sh ${degree} ${params_dir}

.PHONY: help fmt clippy test test-ci test-all
14 changes: 14 additions & 0 deletions download_setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
set -x
set -e

# Set degree to env AGG_DEGREE, first input or default value 25.
degree="${AGG_DEGREE:-${1:-25}}"

# Set the output dir to second input or default as `./prover/test_params`.
params_dir="${2:-"./prover/test_params"}"
mkdir -p "$params_dir"

output_file="$params_dir"/params"${degree}"
rm -f "$output_file"

axel -ac https://trusted-setup-halo2kzg.s3.eu-central-1.amazonaws.com/perpetual-powers-of-tau-raw-"$degree" -o "$output_file"
Loading