#!/bin/bash set -eu PARAMS_DIR="$HOME/.zcash-params" REGTEST_PKEY_NAME='z9-proving.key' REGTEST_VKEY_NAME='z9-verifying.key' REGTEST_PKEY_URL="https://z.cash/downloads/$REGTEST_PKEY_NAME" REGTEST_VKEY_URL="https://z.cash/downloads/$REGTEST_VKEY_NAME" REGTEST_DIR="$PARAMS_DIR/regtest" # This should have the same params as regtest. We use symlinks for now. TESTNET3_DIR="$PARAMS_DIR/testnet3" function fetch_params { local url="$1" local output="$2" local dlname="${output}.dl" if ! [ -f "$output" ] then echo "Retrieving: $url" # Note: --no-check-certificate should be ok, since we rely on # sha256 for integrity, and there's no confidentiality requirement. # Our website uses letsencrypt certificates which are not supported # by some wget installations, so we expect some cert failures. wget \ --progress=dot:giga \ --no-check-certificate \ --output-document="$dlname" \ --continue \ "$url" # Only after successful download do we update the parameter load path: mv -v "$dlname" "$output" fi } cat <> "$README_PATH" <