Updating versions

This commit is contained in:
Asher Dawes
2018-10-14 21:08:15 -07:00
parent e7ff7048c0
commit db2a0ee777
5 changed files with 56 additions and 22 deletions

View File

@@ -5,7 +5,7 @@ stages:
variables: variables:
VERSION: 0.3.14 VERSION: 0.4.0
VERUS_CLI_LINUX: "Verus-CLI-Linux-v${VERSION}-beta.tar.gz" VERUS_CLI_LINUX: "Verus-CLI-Linux-v${VERSION}-beta.tar.gz"
VERUS_CLI_WINDOWS: "Verus-CLI-Windows-v${VERSION}-beta.zip" VERUS_CLI_WINDOWS: "Verus-CLI-Windows-v${VERSION}-beta.zip"
VERUS_CLI_MACOS: "Verus-CLI-MacOS-v${VERSION}-beta.tar.gz" VERUS_CLI_MACOS: "Verus-CLI-MacOS-v${VERSION}-beta.tar.gz"

View File

@@ -1,4 +1,4 @@
VerusCoin Command Line Tools v0.3.13-beta VerusCoin Command Line Tools v0.4.0-beta
Contents: Contents:
komodod - VerusCoin's enhanced Komodo daemon komodod - VerusCoin's enhanced Komodo daemon

View File

@@ -2,10 +2,17 @@
set -eu set -eu
PARAMS_DIR="$HOME/.zcash-params" if [[ "$OSTYPE" == "darwin"* ]]; then
PARAMS_DIR="$HOME/Library/Application Support/ZcashParams"
else
PARAMS_DIR="$HOME/.zcash-params"
fi
SPROUT_PKEY_NAME='sprout-proving.key' SPROUT_PKEY_NAME='sprout-proving.key'
SPROUT_VKEY_NAME='sprout-verifying.key' SPROUT_VKEY_NAME='sprout-verifying.key'
SAPLING_SPEND_NAME='sapling-spend.params'
SAPLING_OUTPUT_NAME='sapling-output.params'
SAPLING_SPROUT_GROTH16_NAME='sprout-groth16.params'
SPROUT_URL="https://z.cash/downloads" SPROUT_URL="https://z.cash/downloads"
SPROUT_IPFS="/ipfs/QmZKKx7Xup7LiAtFRhYsE1M7waXcv9ir9eCECyXAFGxhEo" SPROUT_IPFS="/ipfs/QmZKKx7Xup7LiAtFRhYsE1M7waXcv9ir9eCECyXAFGxhEo"
@@ -14,10 +21,12 @@ SHA256ARGS="$(command -v sha256sum >/dev/null || echo '-a 256')"
WGETCMD="$(command -v wget || echo '')" WGETCMD="$(command -v wget || echo '')"
IPFSCMD="$(command -v ipfs || echo '')" IPFSCMD="$(command -v ipfs || echo '')"
CURLCMD="$(command -v curl || echo '')"
# fetch methods can be disabled with ZC_DISABLE_SOMETHING=1 # fetch methods can be disabled with ZC_DISABLE_SOMETHING=1
ZC_DISABLE_WGET="${ZC_DISABLE_WGET:-}" ZC_DISABLE_WGET="${ZC_DISABLE_WGET:-}"
ZC_DISABLE_IPFS="${ZC_DISABLE_IPFS:-}" ZC_DISABLE_IPFS="${ZC_DISABLE_IPFS:-}"
ZC_DISABLE_CURL="${ZC_DISABLE_CURL:-}"
function fetch_wget { function fetch_wget {
if [ -z "$WGETCMD" ] || ! [ -z "$ZC_DISABLE_WGET" ]; then if [ -z "$WGETCMD" ] || ! [ -z "$ZC_DISABLE_WGET" ]; then
@@ -28,7 +37,6 @@ function fetch_wget {
local dlname="$2" local dlname="$2"
cat <<EOF cat <<EOF
Retrieving (wget): $SPROUT_URL/$filename Retrieving (wget): $SPROUT_URL/$filename
EOF EOF
@@ -49,22 +57,38 @@ function fetch_ipfs {
local dlname="$2" local dlname="$2"
cat <<EOF cat <<EOF
Retrieving (ipfs): $SPROUT_IPFS/$filename Retrieving (ipfs): $SPROUT_IPFS/$filename
EOF EOF
ipfs get --output "$dlname" "$SPROUT_IPFS/$filename" ipfs get --output "$dlname" "$SPROUT_IPFS/$filename"
} }
function fetch_curl {
if [ -z "$CURLCMD" ] || ! [ -z "$ZC_DISABLE_CURL" ]; then
return 1
fi
local filename="$1"
local dlname="$2"
cat <<EOF
Retrieving (curl): $SPROUT_URL/$filename
EOF
curl \
--output "$dlname" \
-# -L -C - \
"$SPROUT_URL/$filename"
}
function fetch_failure { function fetch_failure {
cat >&2 <<EOF cat >&2 <<EOF
Failed to fetch the Zcash zkSNARK parameters! Failed to fetch the Zcash zkSNARK parameters!
Try installing one of the following programs and make sure you're online: Try installing one of the following programs and make sure you're online:
* ipfs * ipfs
* wget * wget
* curl
EOF EOF
exit 1 exit 1
} }
@@ -77,7 +101,7 @@ function fetch_params {
if ! [ -f "$output" ] if ! [ -f "$output" ]
then then
for method in wget ipfs failure; do for method in wget ipfs curl failure; do
if "fetch_$method" "$filename" "$dlname"; then if "fetch_$method" "$filename" "$dlname"; then
echo "Download successful!" echo "Download successful!"
break break
@@ -102,12 +126,20 @@ EOF
# Use flock to prevent parallel execution. # Use flock to prevent parallel execution.
function lock() { function lock() {
local lockfile=/tmp/fetch_params.lock local lockfile=/tmp/fetch_params.lock
# create lock file if [[ "$OSTYPE" == "darwin"* ]]; then
eval "exec 200>/$lockfile" if shlock -f ${lockfile} -p $$; then
# acquire the lock return 0
flock -n 200 \ else
&& return 0 \ return 1
|| 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 { function exit_locked_error {
@@ -122,10 +154,8 @@ function main() {
cat <<EOF cat <<EOF
Zcash - fetch-params.sh Zcash - fetch-params.sh
This script will fetch the Zcash zkSNARK parameters and verify their This script will fetch the Zcash zkSNARK parameters and verify their
integrity with sha256sum. integrity with sha256sum.
If they already exist locally, it will exit now and do nothing else. If they already exist locally, it will exit now and do nothing else.
EOF EOF
@@ -147,17 +177,21 @@ EOF
The parameters are currently just under 911MB in size, so plan accordingly The parameters are currently just under 911MB in size, so plan accordingly
for your bandwidth constraints. If the files are already present and for your bandwidth constraints. If the files are already present and
have the correct sha256sum, no networking is used. have the correct sha256sum, no networking is used.
Creating params directory. For details about this directory, see: Creating params directory. For details about this directory, see:
$README_PATH $README_PATH
EOF EOF
fi fi
cd "$PARAMS_DIR" cd "$PARAMS_DIR"
# Sprout parameters:
fetch_params "$SPROUT_PKEY_NAME" "$PARAMS_DIR/$SPROUT_PKEY_NAME" "8bc20a7f013b2b58970cddd2e7ea028975c88ae7ceb9259a5344a16bc2c0eef7" fetch_params "$SPROUT_PKEY_NAME" "$PARAMS_DIR/$SPROUT_PKEY_NAME" "8bc20a7f013b2b58970cddd2e7ea028975c88ae7ceb9259a5344a16bc2c0eef7"
fetch_params "$SPROUT_VKEY_NAME" "$PARAMS_DIR/$SPROUT_VKEY_NAME" "4bd498dae0aacfd8e98dc306338d017d9c08dd0918ead18172bd0aec2fc5df82" fetch_params "$SPROUT_VKEY_NAME" "$PARAMS_DIR/$SPROUT_VKEY_NAME" "4bd498dae0aacfd8e98dc306338d017d9c08dd0918ead18172bd0aec2fc5df82"
# Sapling parameters:
fetch_params "$SAPLING_SPEND_NAME" "$PARAMS_DIR/$SAPLING_SPEND_NAME" "8e48ffd23abb3a5fd9c5589204f32d9c31285a04b78096ba40a79b75677efc13"
fetch_params "$SAPLING_OUTPUT_NAME" "$PARAMS_DIR/$SAPLING_OUTPUT_NAME" "2f0ebbcbb9bb0bcffe95a397e7eba89c29eb4dde6191c339db88570e3f3fb0e4"
fetch_params "$SAPLING_SPROUT_GROTH16_NAME" "$PARAMS_DIR/$SAPLING_SPROUT_GROTH16_NAME" "b685d700c60328498fbde589c8c7c484c722b788b265b72af448a5bf0ee55b50"
} }
main main

View File

@@ -1,4 +1,4 @@
VerusCoin Command Line Tools v0.3.13-beta VerusCoin Command Line Tools v0.4.0-beta
Contents: Contents:
komodod - VerusCoin's enhanced Komodo daemon. komodod - VerusCoin's enhanced Komodo daemon.
komodo-cli - VerusCoin's enhanced Komodo command line utility. komodo-cli - VerusCoin's enhanced Komodo command line utility.

View File

@@ -1,4 +1,4 @@
VerusCoin Command Line Tools v0.3.13-beta VerusCoin Command Line Tools v0.4.0-beta
Contents: Contents:
komodod.exe - VerusCoin's enhanced Komodo daemon komodod.exe - VerusCoin's enhanced Komodo daemon
komodo-cli.exe - VerusCoin's Komodo command line utility komodo-cli.exe - VerusCoin's Komodo command line utility