Browse Source

Updated zcparam URLs, removed logic for downloading in parts.

pull/334/head
Alex English 3 years ago
parent
commit
ade357cd3c
  1. 4
      zcutil/fetch-params.bat
  2. 27
      zcutil/fetch-params.sh

4
zcutil/fetch-params.bat

@ -12,7 +12,7 @@ SET sapling-spend.params=8e48ffd23abb3a5fd9c5589204f32d9c31285a04b78096ba40a79b7
SET sapling-output.params=2f0ebbcbb9bb0bcffe95a397e7eba89c29eb4dde6191c339db88570e3f3fb0e4
SET sprout-groth16.params=b685d700c60328498fbde589c8c7c484c722b788b265b72af448a5bf0ee55b50
SET "ZPARAMS_DIR=%APPDATA%\ZcashParams"
SET ZPARAMS_URL=https://z.cash/downloads
SET ZPARAMS_URL=https://verus.io/zcparams
CALL :MAIN
@ -84,4 +84,4 @@ FOR /f "skip=1 tokens=* delims=" %%# IN ('certutil -hashfile !file! SHA256') DO
)
)
SET "%~2=!sha256sum!"
GOTO :EOF
GOTO :EOF

27
zcutil/fetch-params.sh

@ -13,7 +13,7 @@ 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://download.z.cash/downloads"
SPROUT_URL="https://verus.io/zcparams"
SPROUT_IPFS="/ipfs/QmZKKx7Xup7LiAtFRhYsE1M7waXcv9ir9eCECyXAFGxhEo"
SHA256CMD="$(command -v sha256sum || echo shasum)"
@ -107,26 +107,17 @@ function fetch_params {
if ! [ -f "$output" ]
then
for i in 1 2
do
for method in wget ipfs curl failure; do
if "fetch_$method" "${filename}.part.${i}" "${dlname}.part.${i}"; then
echo "Download of part ${i} successful!"
break
fi
done
done
for i in 1 2
do
if ! [ -f "${dlname}.part.${i}" ]
then
fetch_failure
for method in wget ipfs curl failure; do
if "fetch_$method" "${filename}" "${dlname}"; then
echo "Download successful!"
break
fi
done
cat "${dlname}.part.1" "${dlname}.part.2" > "${dlname}"
rm "${dlname}.part.1" "${dlname}.part.2"
if ! [ -f "${dlname}" ]
then
fetch_failure
fi
"$SHA256CMD" $SHA256ARGS -c <<EOF
$expectedhash $dlname

Loading…
Cancel
Save