From 11b2846ba5638b3dac5384c23cd50f4e470de8d2 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 8 Dec 2020 07:17:58 -0500 Subject: [PATCH] We don't fetch params --- zcutil/fetch-params.bat | 20 ---- zcutil/fetch-params.sh | 204 ---------------------------------------- 2 files changed, 224 deletions(-) delete mode 100644 zcutil/fetch-params.bat delete mode 100755 zcutil/fetch-params.sh diff --git a/zcutil/fetch-params.bat b/zcutil/fetch-params.bat deleted file mode 100644 index e2327d7e3..000000000 --- a/zcutil/fetch-params.bat +++ /dev/null @@ -1,20 +0,0 @@ -@echo off -call :GET_CURRENT_DIR -cd %THIS_DIR% -IF NOT EXIST %APPDATA%\ZcashParams ( -MKDIR %APPDATA%\ZcashParams -) -IF NOT EXIST %APPDATA%\ZcashParams\sapling-spend.params ( - ECHO Downloading Zcash trusted setup sapling-spend.key, this may take a while ... - .\wget64.exe --progress=dot:giga --continue --retry-connrefused --waitretry=3 --timeout=30 https://z.cash/downloads/sapling-spend.params -O %APPDATA%\ZcashParams\sapling-spend.params -) -IF NOT EXIST %APPDATA%\ZcashParams\sapling-output.params ( - ECHO Downloading Zcash trusted setup sapling-output.key, this may take a while ... - .\wget64.exe --progress=dot:giga --continue --retry-connrefused --waitretry=3 --timeout=30 https://z.cash/downloads/sapling-output.params -O %APPDATA%\ZcashParams\sapling-output.params -) -goto :EOF -:GET_CURRENT_DIR -pushd %~dp0 -set THIS_DIR=%CD% -popd -goto :EOF diff --git a/zcutil/fetch-params.sh b/zcutil/fetch-params.sh deleted file mode 100755 index 8b5d0bb6f..000000000 --- a/zcutil/fetch-params.sh +++ /dev/null @@ -1,204 +0,0 @@ -#!/bin/bash -# Copyright 2019 The Hush developers - -set -eu - -# We do not declare our own location because we can use the params -# from any other installed coins -if [[ "$OSTYPE" == "darwin"* ]]; then - PARAMS_DIR="$HOME/Library/Application Support/ZcashParams" -else - PARAMS_DIR="$HOME/.zcash-params" -fi - -SAPLING_SPEND_NAME='sapling-spend.params' -SAPLING_OUTPUT_NAME='sapling-output.params' -URL="https://z.cash/downloads" -IPFS="/ipfs/QmZKKx7Xup7LiAtFRhYsE1M7waXcv9ir9eCECyXAFGxhEo" - -SHA256CMD="$(command -v sha256sum || echo shasum)" -SHA256ARGS="$(command -v sha256sum >/dev/null || echo '-a 256')" - -WGETCMD="$(command -v wget || echo '')" -IPFSCMD="$(command -v ipfs || echo '')" -CURLCMD="$(command -v curl || echo '')" - -# fetch methods can be disabled with ZC_DISABLE_SOMETHING=1 -ZC_DISABLE_WGET="${ZC_DISABLE_WGET:-}" -ZC_DISABLE_IPFS="${ZC_DISABLE_IPFS:-}" -ZC_DISABLE_CURL="${ZC_DISABLE_CURL:-}" - -function fetch_wget { - if [ -z "$WGETCMD" ] || ! [ -z "$ZC_DISABLE_WGET" ]; then - return 1 - fi - - local filename="$1" - local dlname="$2" - - cat <&2 <&2 - exit 1 - fi - fi -} - -# Use flock to prevent parallel execution. -function lock() { - local lockfile=/tmp/fetch_params.lock - if [[ "$OSTYPE" == "darwin"* ]]; then - if shlock -f ${lockfile} -p $$; then - return 0 - else - return 1 - fi - else - # create lock file - eval "exec 200>$lockfile" - # acquire the lock - flock -n 200 \ - && return 0 \ - || return 1 - fi -} - -function exit_locked_error { - echo "Only one instance of fetch-params.sh can be run at a time." >&2 - exit 1 -} - -function main() { - - lock fetch-params.sh \ - || exit_locked_error - - cat <> "$README_PATH" <