From 5e44d3626c01202fdd74ef8f3022c69f728c9515 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Sun, 3 Mar 2019 21:05:13 +0900 Subject: [PATCH] Update UTXO Set for FastSync, and fix bug on save utxo --- contrib/FastSync/load-utxo-set.sh | 2 +- contrib/FastSync/save-utxo-set-in-bitcoind.sh | 7 +++-- contrib/FastSync/save-utxo-set.sh | 2 +- .../FastSync/sigs/NicolasDorier.utxo-sets.asc | 27 ++++++++++--------- contrib/FastSync/utxo-sets | 3 ++- 5 files changed, 23 insertions(+), 18 deletions(-) diff --git a/contrib/FastSync/load-utxo-set.sh b/contrib/FastSync/load-utxo-set.sh index 1b5c8ad..69b5056 100755 --- a/contrib/FastSync/load-utxo-set.sh +++ b/contrib/FastSync/load-utxo-set.sh @@ -23,7 +23,7 @@ if ! [[ "$NBITCOIN_NETWORK" ]]; then fi if ! [[ "$UTXO_DOWNLOAD_LINK" ]]; then - [[ $NBITCOIN_NETWORK == "mainnet" ]] && UTXO_DOWNLOAD_LINK="http://utxosets.blob.core.windows.net/public/utxo-snapshot-bitcoin-mainnet-551636.tar" + [[ $NBITCOIN_NETWORK == "mainnet" ]] && UTXO_DOWNLOAD_LINK="http://utxosets.blob.core.windows.net/public/utxo-snapshot-bitcoin-mainnet-565305.tar" [[ $NBITCOIN_NETWORK == "testnet" ]] && UTXO_DOWNLOAD_LINK="http://utxosets.blob.core.windows.net/public/utxo-snapshot-bitcoin-testnet-1445586.tar" fi diff --git a/contrib/FastSync/save-utxo-set-in-bitcoind.sh b/contrib/FastSync/save-utxo-set-in-bitcoind.sh index 72a8dec..4e6d5bb 100755 --- a/contrib/FastSync/save-utxo-set-in-bitcoind.sh +++ b/contrib/FastSync/save-utxo-set-in-bitcoind.sh @@ -25,6 +25,9 @@ fi cd /data TAR_NAME="utxo-snapshot-bitcoin-$NBITCOIN_NETWORK-$PRUNED_HEIGHT.tar" echo "Creating $TAR_NAME..." -tar -cf "$TAR_NAME" "$NETWORK_DIRECTORY/blocks/" -tar -rf "$TAR_NAME" "$NETWORK_DIRECTORY/chainstate/" +echo "Adding $NETWORK_DIRECTORY/blocks/*" +tar -cvf "$TAR_NAME" "$NETWORK_DIRECTORY/blocks/" +echo "Adding $NETWORK_DIRECTORY/chainstate/*" +tar -rvf "$TAR_NAME" "$NETWORK_DIRECTORY/chainstate/" +echo "TAR file created" exit diff --git a/contrib/FastSync/save-utxo-set.sh b/contrib/FastSync/save-utxo-set.sh index ceb3d4c..ab8e239 100755 --- a/contrib/FastSync/save-utxo-set.sh +++ b/contrib/FastSync/save-utxo-set.sh @@ -29,7 +29,7 @@ rm /var/lib/docker/volumes/generated_bitcoin_datadir/_data/utxo-snapshot-* # Run only bitcoind and connect to it SCRIPT="$(cat save-utxo-set-in-bitcoind.sh)" cd "`dirname $BTCPAY_ENV_FILE`" -docker-compose -f $BTCPAY_DOCKER_COMPOSE run -e "NBITCOIN_NETWORK=$NBITCOIN_NETWORK" bitcoind bash -c "$SCRIPT" +docker-compose -f $BTCPAY_DOCKER_COMPOSE run --rm -e "NBITCOIN_NETWORK=$NBITCOIN_NETWORK" bitcoind bash -c "$SCRIPT" btcpay-up.sh echo "Calculating the hash of the tar file..." diff --git a/contrib/FastSync/sigs/NicolasDorier.utxo-sets.asc b/contrib/FastSync/sigs/NicolasDorier.utxo-sets.asc index e67907f..09a7fb3 100644 --- a/contrib/FastSync/sigs/NicolasDorier.utxo-sets.asc +++ b/contrib/FastSync/sigs/NicolasDorier.utxo-sets.asc @@ -3,19 +3,20 @@ Hash: SHA256 fab994299273080bf7124c8c45c4ada867974ca747900178496a69e450cf713f utxo-snapshot-bitcoin-mainnet-551636.tar eabaaa717bb8eeaf603e383dd8642d9d34df8e767fccbd208b0c936b79c82742 utxo-snapshot-bitcoin-testnet-1445586.tar +8e18176138be351707aee95f349dd1debc714cc2cc4f0c76d6a7380988bf0d22 utxo-snapshot-bitcoin-mainnet-565305.tar -----BEGIN PGP SIGNATURE----- -wsFcBAEBCAAQBQJc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69DIsY1ijUBvFuBK3ep4Ge6AiAIiyuzjy1CoFAq7kPozhOLpveLeZR/m +NULTTJ3ZuD4avh4MLzrLqBuyvsXPI66/kHBgS64bF/NbQ3sfsfAdFceLWP2txL6A +M7OYcjrYATD1ivgAWde1LG6X0tZVI4jaic9JG4HszB49UieaJOSqjw4s8VLlI6e+ +f+oPSNE5JEZeRX/+P43GjHv2xZEU0aWGcrOdumL/LisfPuahnWbntrhvVM/7xlum +CZWyiH8XOCNLgwUX+mfcxqseu4t/C57I8XT/SuFNVDWRiEYBBNJ9cb+ThoIKgjMi +TTltY28Ko/vDqivlacPiyBguSoD8KgNOEvYs2CBEdO/1MK8VlLcaopx2TMRpDoYC +eppW98Av+MZp03l4PbFi +=jUwt -----END PGP SIGNATURE----- diff --git a/contrib/FastSync/utxo-sets b/contrib/FastSync/utxo-sets index fbce729..31dc8ee 100644 --- a/contrib/FastSync/utxo-sets +++ b/contrib/FastSync/utxo-sets @@ -1,2 +1,3 @@ fab994299273080bf7124c8c45c4ada867974ca747900178496a69e450cf713f utxo-snapshot-bitcoin-mainnet-551636.tar -eabaaa717bb8eeaf603e383dd8642d9d34df8e767fccbd208b0c936b79c82742 utxo-snapshot-bitcoin-testnet-1445586.tar \ No newline at end of file +eabaaa717bb8eeaf603e383dd8642d9d34df8e767fccbd208b0c936b79c82742 utxo-snapshot-bitcoin-testnet-1445586.tar +8e18176138be351707aee95f349dd1debc714cc2cc4f0c76d6a7380988bf0d22 utxo-snapshot-bitcoin-mainnet-565305.tar \ No newline at end of file