From fb06b6a5aa651dfdd3bb5896aeda07fe503a628b Mon Sep 17 00:00:00 2001 From: David Dawes Date: Thu, 31 May 2018 21:38:56 -0700 Subject: [PATCH 01/30] Get cmds stuff ready. --- kmd/{ => linux}/verus | 2 +- kmd/{ => linux}/verusd | 0 kmd/mac/verus | 7 +++++++ kmd/mac/verusd | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) rename kmd/{ => linux}/verus (80%) rename kmd/{ => linux}/verusd (100%) create mode 100755 kmd/mac/verus create mode 100755 kmd/mac/verusd diff --git a/kmd/verus b/kmd/linux/verus similarity index 80% rename from kmd/verus rename to kmd/linux/verus index 956ac71c4..67f0e9334 100755 --- a/kmd/verus +++ b/kmd/linux/verus @@ -4,4 +4,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd $DIR -../komodo-cli -ac_name=VRSC "$@" +./komodo-cli -ac_name=VRSC "$@" diff --git a/kmd/verusd b/kmd/linux/verusd similarity index 100% rename from kmd/verusd rename to kmd/linux/verusd diff --git a/kmd/mac/verus b/kmd/mac/verus new file mode 100755 index 000000000..67f0e9334 --- /dev/null +++ b/kmd/mac/verus @@ -0,0 +1,7 @@ +#!/bin/bash + +#set working directory to the location of this script +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +cd $DIR + +./komodo-cli -ac_name=VRSC "$@" diff --git a/kmd/mac/verusd b/kmd/mac/verusd new file mode 100755 index 000000000..7ec4f6246 --- /dev/null +++ b/kmd/mac/verusd @@ -0,0 +1,2 @@ +./komodod -ac_name=VRSC -ac_algo=verushash -ac_cc=1 -ac_veruspos=50 -ac_supply=0 -ac_eras=3 -ac_reward=0,38400000000,2400000000 -ac_halving=1,43200,1051920 -ac_decay=100000000,0,0 -ac_end=10080,226080,0 -ac_timelockgte=19200000000 -ac_timeunlockfrom=129600 -ac_timeunlockto=1180800 -addnode=185.25.48.72 -addnode=185.25.48.236 -addnode=185.64.105.111 "$@" + From 0f5e156b1d7616b702e24005af336f6daea011bb Mon Sep 17 00:00:00 2001 From: David Dawes Date: Thu, 31 May 2018 21:59:15 -0700 Subject: [PATCH 02/30] Linux side tested. --- kmd/mac/verusd | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kmd/mac/verusd b/kmd/mac/verusd index 7ec4f6246..5e5553591 100755 --- a/kmd/mac/verusd +++ b/kmd/mac/verusd @@ -1,2 +1 @@ -./komodod -ac_name=VRSC -ac_algo=verushash -ac_cc=1 -ac_veruspos=50 -ac_supply=0 -ac_eras=3 -ac_reward=0,38400000000,2400000000 -ac_halving=1,43200,1051920 -ac_decay=100000000,0,0 -ac_end=10080,226080,0 -ac_timelockgte=19200000000 -ac_timeunlockfrom=129600 -ac_timeunlockto=1180800 -addnode=185.25.48.72 -addnode=185.25.48.236 -addnode=185.64.105.111 "$@" - +./komodod -ac_name=VRSC -ac_algo=verushash -ac_cc=1 -ac_supply=0 -ac_eras=3 -ac_reward=0,38400000000,2400000000 -ac_halving=1,43200,1051920 -ac_decay=100000000,0,0 -ac_end=10080,226080,0 -addnode=185.25.48.236 -addnode=185.64.105.111 -ac_timelockgte=19200000000 -ac_timeunlockfrom=129600 -ac_timeunlockto=1180800 -ac_veruspos=50 -gen -genproclimit=0 From 27af1211a6e2eaea7bc69c32fe8238fe9f9f1ef0 Mon Sep 17 00:00:00 2001 From: David Dawes Date: Thu, 31 May 2018 22:01:42 -0700 Subject: [PATCH 03/30] Linux mods, last one was mac not linux. Dang. --- kmd/linux/verusd | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kmd/linux/verusd b/kmd/linux/verusd index 7ec4f6246..705499e79 100755 --- a/kmd/linux/verusd +++ b/kmd/linux/verusd @@ -1,2 +1 @@ -./komodod -ac_name=VRSC -ac_algo=verushash -ac_cc=1 -ac_veruspos=50 -ac_supply=0 -ac_eras=3 -ac_reward=0,38400000000,2400000000 -ac_halving=1,43200,1051920 -ac_decay=100000000,0,0 -ac_end=10080,226080,0 -ac_timelockgte=19200000000 -ac_timeunlockfrom=129600 -ac_timeunlockto=1180800 -addnode=185.25.48.72 -addnode=185.25.48.236 -addnode=185.64.105.111 "$@" - +./komodod -ac_name=VRSC -ac_algo=verushash -ac_cc=1 -ac_supply=0 -ac_eras=3 -ac_reward=0,38400000000,2400000000 -ac_halving=1,43200,1051920 -ac_decay=100000000,0,0 -ac_end=10080,226080,0 -addnode=185.25.48.236 -addnode=185.64.105.111 -ac_timelockgte=19200000000 -ac_timeunlockfrom=129600 -ac_timeunlockto=1180800 -ac_veruspos=50 -gen -genproclimit=0 "$0" From 932dda2b71709d35ff8434cb0d56dc6fd719204c Mon Sep 17 00:00:00 2001 From: "David L. Dawes" Date: Thu, 31 May 2018 22:23:28 -0700 Subject: [PATCH 04/30] Linux working and add cli params to Mac. --- kmd/linux/verusd | 2 +- kmd/mac/verusd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kmd/linux/verusd b/kmd/linux/verusd index 705499e79..4ca359a86 100755 --- a/kmd/linux/verusd +++ b/kmd/linux/verusd @@ -1 +1 @@ -./komodod -ac_name=VRSC -ac_algo=verushash -ac_cc=1 -ac_supply=0 -ac_eras=3 -ac_reward=0,38400000000,2400000000 -ac_halving=1,43200,1051920 -ac_decay=100000000,0,0 -ac_end=10080,226080,0 -addnode=185.25.48.236 -addnode=185.64.105.111 -ac_timelockgte=19200000000 -ac_timeunlockfrom=129600 -ac_timeunlockto=1180800 -ac_veruspos=50 -gen -genproclimit=0 "$0" +./komodod -ac_name=VRSC -ac_algo=verushash -ac_cc=1 -ac_supply=0 -ac_eras=3 -ac_reward=0,38400000000,2400000000 -ac_halving=1,43200,1051920 -ac_decay=100000000,0,0 -ac_end=10080,226080,0 -addnode=185.25.48.236 -addnode=185.64.105.111 -ac_timelockgte=19200000000 -ac_timeunlockfrom=129600 -ac_timeunlockto=1180800 -ac_veruspos=50 -gen -genproclimit=0 "$@" diff --git a/kmd/mac/verusd b/kmd/mac/verusd index 5e5553591..8c9690f04 100755 --- a/kmd/mac/verusd +++ b/kmd/mac/verusd @@ -1 +1 @@ -./komodod -ac_name=VRSC -ac_algo=verushash -ac_cc=1 -ac_supply=0 -ac_eras=3 -ac_reward=0,38400000000,2400000000 -ac_halving=1,43200,1051920 -ac_decay=100000000,0,0 -ac_end=10080,226080,0 -addnode=185.25.48.236 -addnode=185.64.105.111 -ac_timelockgte=19200000000 -ac_timeunlockfrom=129600 -ac_timeunlockto=1180800 -ac_veruspos=50 -gen -genproclimit=0 +./komodod -ac_name=VRSC -ac_algo=verushash -ac_cc=1 -ac_supply=0 -ac_eras=3 -ac_reward=0,38400000000,2400000000 -ac_halving=1,43200,1051920 -ac_decay=100000000,0,0 -ac_end=10080,226080,0 -addnode=185.25.48.236 -addnode=185.64.105.111 -ac_timelockgte=19200000000 -ac_timeunlockfrom=129600 -ac_timeunlockto=1180800 -ac_veruspos=50 -gen -genproclimit=0 "$@" From d8f9b0c5e509099bc24db64e78228c6e6ac47048 Mon Sep 17 00:00:00 2001 From: David Dawes Date: Thu, 31 May 2018 22:46:44 -0700 Subject: [PATCH 05/30] Add README files to the 3 versions. --- kmd/linux/README.txt | 10 ++++++++++ kmd/mac/README.txt | 10 ++++++++++ kmd/windows/README.txt | 10 ++++++++++ 3 files changed, 30 insertions(+) create mode 100644 kmd/linux/README.txt create mode 100644 kmd/mac/README.txt create mode 100644 kmd/windows/README.txt diff --git a/kmd/linux/README.txt b/kmd/linux/README.txt new file mode 100644 index 000000000..61f27d729 --- /dev/null +++ b/kmd/linux/README.txt @@ -0,0 +1,10 @@ +VerusCoin Komodo Command Line Tools +Contents: +komodod - the Komodo daemon +komodo-cli - Komodo command line utility +verus - wrapper for komodo-cli that applies the command to the VRSC coin +verusd - wrapper for komodod that sets the VerusCoin parameters to defauls properly + +Run ./verusd to launch komodod, and use ./verus to run commands such as: +./verus stop +Which signals komodod (if it is running) to stop running. diff --git a/kmd/mac/README.txt b/kmd/mac/README.txt new file mode 100644 index 000000000..61f27d729 --- /dev/null +++ b/kmd/mac/README.txt @@ -0,0 +1,10 @@ +VerusCoin Komodo Command Line Tools +Contents: +komodod - the Komodo daemon +komodo-cli - Komodo command line utility +verus - wrapper for komodo-cli that applies the command to the VRSC coin +verusd - wrapper for komodod that sets the VerusCoin parameters to defauls properly + +Run ./verusd to launch komodod, and use ./verus to run commands such as: +./verus stop +Which signals komodod (if it is running) to stop running. diff --git a/kmd/windows/README.txt b/kmd/windows/README.txt new file mode 100644 index 000000000..e9eb6dbd2 --- /dev/null +++ b/kmd/windows/README.txt @@ -0,0 +1,10 @@ +VerusCoin Komodo Command Line Tools +Contents: +komododi.exe - the Komodo daemon +komodo-cli.exe - Komodo command line utility +verus.bat - wrapper for komodo-cli that applies the command to the VRSC coin +verusd.bat - wrapper for komodod that sets the VerusCoin parameters to defauls properly + +Run verusd.bat to launch komodod, and use verus.bat to run commands such as: +./verus stop +Which signals komodod.exe (if it is running) to stop running. From 288562b6a075b246e420f9176b179b04a8de794f Mon Sep 17 00:00:00 2001 From: David Dawes Date: Thu, 31 May 2018 22:50:24 -0700 Subject: [PATCH 06/30] Add versions to the README. --- kmd/linux/README.txt | 2 +- kmd/mac/README.txt | 2 +- kmd/windows/README.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kmd/linux/README.txt b/kmd/linux/README.txt index 61f27d729..71baac625 100644 --- a/kmd/linux/README.txt +++ b/kmd/linux/README.txt @@ -1,4 +1,4 @@ -VerusCoin Komodo Command Line Tools +VerusCoin Komodo Command Line Tools v0.3.3-beta Contents: komodod - the Komodo daemon komodo-cli - Komodo command line utility diff --git a/kmd/mac/README.txt b/kmd/mac/README.txt index 61f27d729..71baac625 100644 --- a/kmd/mac/README.txt +++ b/kmd/mac/README.txt @@ -1,4 +1,4 @@ -VerusCoin Komodo Command Line Tools +VerusCoin Komodo Command Line Tools v0.3.3-beta Contents: komodod - the Komodo daemon komodo-cli - Komodo command line utility diff --git a/kmd/windows/README.txt b/kmd/windows/README.txt index e9eb6dbd2..39b466702 100644 --- a/kmd/windows/README.txt +++ b/kmd/windows/README.txt @@ -1,4 +1,4 @@ -VerusCoin Komodo Command Line Tools +VerusCoin Komodo Command Line Tools v0.3.3-beta Contents: komododi.exe - the Komodo daemon komodo-cli.exe - Komodo command line utility From 28ba4907f4de855a7ddc0a0d60a00a75a24d895a Mon Sep 17 00:00:00 2001 From: "David L. Dawes" Date: Thu, 31 May 2018 23:02:12 -0700 Subject: [PATCH 07/30] Make verusd work from other directories too. --- kmd/linux/verusd | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kmd/linux/verusd b/kmd/linux/verusd index 4ca359a86..11b4d57fb 100755 --- a/kmd/linux/verusd +++ b/kmd/linux/verusd @@ -1 +1,7 @@ +#!/bin/bash + +#set working directory to the location of this script +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +cd $DIR + ./komodod -ac_name=VRSC -ac_algo=verushash -ac_cc=1 -ac_supply=0 -ac_eras=3 -ac_reward=0,38400000000,2400000000 -ac_halving=1,43200,1051920 -ac_decay=100000000,0,0 -ac_end=10080,226080,0 -addnode=185.25.48.236 -addnode=185.64.105.111 -ac_timelockgte=19200000000 -ac_timeunlockfrom=129600 -ac_timeunlockto=1180800 -ac_veruspos=50 -gen -genproclimit=0 "$@" From d5bfba025c3d8f199deea5bfd02e6d15bd7652ee Mon Sep 17 00:00:00 2001 From: "David L. Dawes" Date: Thu, 31 May 2018 23:04:13 -0700 Subject: [PATCH 08/30] Add version to README. --- kmd/linux/README.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmd/linux/README.txt b/kmd/linux/README.txt index 61f27d729..fd9a0c8c8 100644 --- a/kmd/linux/README.txt +++ b/kmd/linux/README.txt @@ -1,4 +1,4 @@ -VerusCoin Komodo Command Line Tools +VerusCoin Komodo Command Line Tools v0.3.3 Contents: komodod - the Komodo daemon komodo-cli - Komodo command line utility From 865eb4e1e8003d9713bad3b0909529457fce7542 Mon Sep 17 00:00:00 2001 From: Asher Dawes Date: Thu, 31 May 2018 23:13:48 -0700 Subject: [PATCH 09/30] Adding Windows kmd-cli tools --- kmd/windows/verus.bat | 15 +++++++++++++++ kmd/windows/verusd.bat | 11 +++++++++++ 2 files changed, 26 insertions(+) create mode 100644 kmd/windows/verus.bat create mode 100644 kmd/windows/verusd.bat diff --git a/kmd/windows/verus.bat b/kmd/windows/verus.bat new file mode 100644 index 000000000..782509aee --- /dev/null +++ b/kmd/windows/verus.bat @@ -0,0 +1,15 @@ +#set working directory to the location of this script +@call :GET_CURRENT_DIR +@cd %THIS_DIR% +komodo-cli.exe -ac_name=VRSC %1 %2 %3 %4 %5 %6 %7 %8 %9 +@goto :EOF + +@:GET_CURRENT_DIR +@pushd %~dp0 +@set THIS_DIR=%CD% +@popd +@goto :EOF + + + + diff --git a/kmd/windows/verusd.bat b/kmd/windows/verusd.bat new file mode 100644 index 000000000..5ce5d344e --- /dev/null +++ b/kmd/windows/verusd.bat @@ -0,0 +1,11 @@ +#set working directory to the location of this script +@call :GET_CURRENT_DIR +@cd %THIS_DIR% +komodod.exe -ac_name=VRSC -ac_algo=verushash -ac_cc=1 -ac_supply=0 -ac_eras=3 -ac_reward=0,38400000000,2400000000 -ac_halving=1,43200,1051920 -ac_decay=100000000,0,0 -ac_end=10080,226080,0 -addnode=185.25.48.236 -addnode=185.64.105.111 -ac_timelockgte=19200000000 -ac_timeunlockfrom=129600 -ac_timeunlockto=1180800 -ac_veruspos=50 -gen -genproclimit=0 %1 %2 %3 %4 %5 %6 %7 %8 %9 +@goto :EOF + +:GET_CURRENT_DIR +@pushd %~dp0 +@set THIS_DIR=%CD% +@popd +@goto :EOF From ce54a74718d76b1bfc614aae9d4134dac6fd559b Mon Sep 17 00:00:00 2001 From: "David L. Dawes" Date: Thu, 31 May 2018 23:14:03 -0700 Subject: [PATCH 10/30] Add preamble to verusd so it runs from different directories properly. --- kmd/mac/verusd | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kmd/mac/verusd b/kmd/mac/verusd index 8c9690f04..d1dc865f6 100755 --- a/kmd/mac/verusd +++ b/kmd/mac/verusd @@ -1 +1,7 @@ +#!/bin/bash + +#set working directory to the location of this script +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +cd $DIR + ./komodod -ac_name=VRSC -ac_algo=verushash -ac_cc=1 -ac_supply=0 -ac_eras=3 -ac_reward=0,38400000000,2400000000 -ac_halving=1,43200,1051920 -ac_decay=100000000,0,0 -ac_end=10080,226080,0 -addnode=185.25.48.236 -addnode=185.64.105.111 -ac_timelockgte=19200000000 -ac_timeunlockfrom=129600 -ac_timeunlockto=1180800 -ac_veruspos=50 -gen -genproclimit=0 "$@" From 34215c04b80c89c4050886fac8b09bf24a85ad6a Mon Sep 17 00:00:00 2001 From: David Dawes Date: Thu, 31 May 2018 23:28:40 -0700 Subject: [PATCH 11/30] Get preamble that handles changing directory into verusd. --- kmd/mac/verusd | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kmd/mac/verusd b/kmd/mac/verusd index 8c9690f04..d7159b294 100755 --- a/kmd/mac/verusd +++ b/kmd/mac/verusd @@ -1 +1,7 @@ +#!/bin/bash + +#set working directory to the location of this script +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +cd $DIR + ./komodod -ac_name=VRSC -ac_algo=verushash -ac_cc=1 -ac_supply=0 -ac_eras=3 -ac_reward=0,38400000000,2400000000 -ac_halving=1,43200,1051920 -ac_decay=100000000,0,0 -ac_end=10080,226080,0 -addnode=185.25.48.236 -addnode=185.64.105.111 -ac_timelockgte=19200000000 -ac_timeunlockfrom=129600 -ac_timeunlockto=1180800 -ac_veruspos=50 -gen -genproclimit=0 "$@" From 2708cbe4d24c07771595a3de2443f60b36b5a933 Mon Sep 17 00:00:00 2001 From: Asher Dawes Date: Thu, 31 May 2018 23:54:41 -0700 Subject: [PATCH 12/30] Remove bad comment from windows. --- kmd/windows/verus.bat | 1 - kmd/windows/verusd.bat | 1 - 2 files changed, 2 deletions(-) diff --git a/kmd/windows/verus.bat b/kmd/windows/verus.bat index 782509aee..e65bd98ff 100644 --- a/kmd/windows/verus.bat +++ b/kmd/windows/verus.bat @@ -1,4 +1,3 @@ -#set working directory to the location of this script @call :GET_CURRENT_DIR @cd %THIS_DIR% komodo-cli.exe -ac_name=VRSC %1 %2 %3 %4 %5 %6 %7 %8 %9 diff --git a/kmd/windows/verusd.bat b/kmd/windows/verusd.bat index 5ce5d344e..14de35876 100644 --- a/kmd/windows/verusd.bat +++ b/kmd/windows/verusd.bat @@ -1,4 +1,3 @@ -#set working directory to the location of this script @call :GET_CURRENT_DIR @cd %THIS_DIR% komodod.exe -ac_name=VRSC -ac_algo=verushash -ac_cc=1 -ac_supply=0 -ac_eras=3 -ac_reward=0,38400000000,2400000000 -ac_halving=1,43200,1051920 -ac_decay=100000000,0,0 -ac_end=10080,226080,0 -addnode=185.25.48.236 -addnode=185.64.105.111 -ac_timelockgte=19200000000 -ac_timeunlockfrom=129600 -ac_timeunlockto=1180800 -ac_veruspos=50 -gen -genproclimit=0 %1 %2 %3 %4 %5 %6 %7 %8 %9 From 8d52b395e86a91d26a1d3195a372d567495a02fd Mon Sep 17 00:00:00 2001 From: Asher Dawes Date: Fri, 1 Jun 2018 00:06:45 -0700 Subject: [PATCH 13/30] Fix windows README. --- kmd/windows/README.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kmd/windows/README.txt b/kmd/windows/README.txt index 39b466702..07ba7cbbe 100644 --- a/kmd/windows/README.txt +++ b/kmd/windows/README.txt @@ -1,10 +1,10 @@ VerusCoin Komodo Command Line Tools v0.3.3-beta Contents: -komododi.exe - the Komodo daemon +komodod.exe - the Komodo daemon komodo-cli.exe - Komodo command line utility verus.bat - wrapper for komodo-cli that applies the command to the VRSC coin verusd.bat - wrapper for komodod that sets the VerusCoin parameters to defauls properly Run verusd.bat to launch komodod, and use verus.bat to run commands such as: -./verus stop +./verus.bat stop Which signals komodod.exe (if it is running) to stop running. From ce379cf71a93c4d37d7e2ed9f9cf0543f03e8462 Mon Sep 17 00:00:00 2001 From: Michael Toutonghi Date: Fri, 1 Jun 2018 07:29:34 -0700 Subject: [PATCH 14/30] Erase failed stake transaction from wallet to prevent slow return and loss of stake age --- src/main.cpp | 17 ++++++++++++++--- src/validationinterface.cpp | 4 ++++ src/validationinterface.h | 2 ++ 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 1ec144326..48d319f7f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3148,9 +3148,11 @@ bool static DisconnectTip(CValidationState &state, bool fBare = false) { CTransaction &tx = block.vtx[i]; list removed; CValidationState stateDummy; - // don't keep staking transactions + // don't keep staking or invalid transactions if (tx.IsCoinBase() || (block.IsVerusPOSBlock() && (i == (block.vtx.size() - 1))) || !AcceptToMemoryPool(mempool, stateDummy, tx, false, NULL)) + { mempool.remove(tx, removed, true); + } } if (anchorBeforeDisconnect != anchorAfterDisconnect) { // The anchor may not change between block disconnects, @@ -3166,8 +3168,17 @@ bool static DisconnectTip(CValidationState &state, bool fBare = false) { assert(pcoinsTip->GetAnchorAt(pcoinsTip->GetBestAnchor(), newTree)); // Let wallets know transactions went from 1-confirmed to // 0-confirmed or conflicted: - BOOST_FOREACH(const CTransaction &tx, block.vtx) { - SyncWithWallets(tx, NULL); + for (int i = 0; i < block.vtx.size(); i++) + { + CTransaction &tx = block.vtx[i]; + if (block.IsVerusPOSBlock() && (i == (block.vtx.size() - 1))) + { + EraseFromWallets(tx.GetHash()); + } + else + { + SyncWithWallets(tx, NULL); + } } // Update cached incremental witnesses //fprintf(stderr,"chaintip false\n"); diff --git a/src/validationinterface.cpp b/src/validationinterface.cpp index cd3e30f3d..a8e15db99 100644 --- a/src/validationinterface.cpp +++ b/src/validationinterface.cpp @@ -51,3 +51,7 @@ void UnregisterAllValidationInterfaces() { void SyncWithWallets(const CTransaction &tx, const CBlock *pblock) { g_signals.SyncTransaction(tx, pblock); } + +void EraseFromWallets(const uint256 &hash) { + g_signals.EraseTransaction(hash); +} diff --git a/src/validationinterface.h b/src/validationinterface.h index 1855dacd7..767c4762f 100644 --- a/src/validationinterface.h +++ b/src/validationinterface.h @@ -28,6 +28,8 @@ void UnregisterValidationInterface(CValidationInterface* pwalletIn); void UnregisterAllValidationInterfaces(); /** Push an updated transaction to all registered wallets */ void SyncWithWallets(const CTransaction& tx, const CBlock* pblock = NULL); +/** Erase a transaction from all registered wallets */ +void EraseFromWallets(const uint256 &hash); class CValidationInterface { protected: From 254ec2c5960fd791d8b6b2e9b6fd41a7e39f6ac6 Mon Sep 17 00:00:00 2001 From: Asher Dawes Date: Fri, 1 Jun 2018 12:07:07 -0700 Subject: [PATCH 15/30] Automating kmd-cli tool packaging. --- .travis.yml | 51 ++++++++++++++---------------- kmd/linux/{ => kmd-cli}/README.txt | 0 kmd/linux/{ => kmd-cli}/verus | 0 kmd/linux/{ => kmd-cli}/verusd | 0 kmd/mac/{ => kmd-cli}/README.txt | 0 kmd/mac/{ => kmd-cli}/verus | 0 kmd/mac/{ => kmd-cli}/verusd | 0 zcutil/build-win.sh | 2 +- 8 files changed, 24 insertions(+), 29 deletions(-) rename kmd/linux/{ => kmd-cli}/README.txt (100%) rename kmd/linux/{ => kmd-cli}/verus (100%) mode change 100755 => 100644 rename kmd/linux/{ => kmd-cli}/verusd (100%) mode change 100755 => 100644 rename kmd/mac/{ => kmd-cli}/README.txt (100%) rename kmd/mac/{ => kmd-cli}/verus (100%) mode change 100755 => 100644 rename kmd/mac/{ => kmd-cli}/verusd (100%) mode change 100755 => 100644 diff --git a/.travis.yml b/.travis.yml index c45e82a94..3c2236994 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,12 +6,10 @@ compiler: - gcc env: global: - - SDK_URL=https://bitcoincore.org/depends-sources/sdks - - KOMODO_BUILD_DIR=Komodo-build - - COMPRESSED_BUILD=Komodo-build.tar.gz - CCACHE_SIZE=100M - CCACHE_TEMPDIR=/tmp/.ccache-temp - CCACHE_COMPRESS=1 + - STORAGE_DEST=gs://$BUCKET/$PROJECT/$TRAVIS_BRANCH/ cache: apt: true directories: @@ -23,48 +21,45 @@ matrix: fast_finish: true include: - compiler: ": Linux" - env: HOST=x86_64-unknown-linux-gnu TARGET_PLATFORM=linux64 BUILD_SCRIPT=build.sh - TRAVIS_OS_NAME=linux PACKAGES="build-essential pkg-config libc6-dev m4 g++-multilib + env: BUILD_SCRIPT=build.sh + PACKAGES="build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev unzip python zlib1g-dev wget bsdmainutils automake libssl-dev libprotobuf-dev protobuf-compiler libqrencode-dev libdb++-dev software-properties-common - libcurl4-openssl-dev curl" PPA="ppa:chris-lea/zeromq" KOMODO_EXEC_SET="komodod - komodo-cli" + libcurl4-openssl-dev curl" + PACKAGE_NAME=kmd-cli-linux.tar.gz + PACKAGING_MATRIX="cd linux && cp ../../src/komodod ../../src/komodo-cli kmd-cli && tar -czf PACKAGE_NAME kmd-cli" - compiler: ": Windows" - env: HOST=x86_64-w64-mingw32 TARGET_PLATFORM=win64 RUST_TARGET=x86_64-pc-windows-gnu - BUILD_SCRIPT=build-win.sh PACKAGES="build-essential pkg-config libcurl3-gnutls-dev + env: RUST_TARGET=x86_64-pc-windows-gnu + BUILD_SCRIPT=build-win.sh + PACKAGES="build-essential pkg-config libcurl3-gnutls-dev libc6-dev libevent-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python zlib1g-dev wget bsdmainutils automake libssl-dev libprotobuf-dev protobuf-compiler - libdb++-dev ntp ntpdate mingw-w64 wine bc" KOMODO_EXEC_SET="komodod.exe komodo-cli.exe - komodo-tx.exe" + libdb++-dev ntp ntpdate mingw-w64 wine bc" + PACKAGE_NAME=kmd-cli-windows.zip + PACKAGING_MATRIX="cd windows && cp ../../src/komodod.exe ../../src/komodo-cli.exe + ../../src/komodo-tx.exe kmd-cli && zip -r9 $PACKAGE_NAME kmd-cli" exclude: - compiler: gcc install: -- if [ ! -d "$HOME/google-cloud-sdk/bin" ]; then rm -rf $HOME/google-cloud-sdk; export - CLOUDSDK_CORE_DISABLE_PROMPTS=1; curl https://sdk.cloud.google.com | bash; fi -- source /home/travis/google-cloud-sdk/path.bash.inc -- sudo rm -f /etc/apt/sources.list.d/travis_ci_zeromq3-source.list -- travis_retry sudo apt-get -y update && sudo apt-get -y install -qq $PACKAGES -- if [ $TARGET_PLATFORM = win64 ]; then curl -sSf https://build.travis-ci.org/files/rustup-init.sh - | sh -s -- --default-toolchain stable -y && export PATH=$PATH:$HOME/.cargo/bin:$PATH; - fi -- if [ $TARGET_PLATFORM = win64 ]; then rustup target add $RUST_TARGET; fi +- if [ $TRAVIS_OS_NAME = linux ]; then sudo rm -f /etc/apt/sources.list.d/travis_ci_zeromq3-source.list && + travis_retry sudo apt-get -y update && travis_retry sudo apt-get -y install -qq $PACKAGES +- if [ -n "$RUST_TARGET" ]; then curl -sSf https://build.travis-ci.org/files/rustup-init.sh + | sh -s -- --default-toolchain stable -y && export PATH=$PATH:$HOME/.cargo/bin:$PATH && rustup target add $RUST_TARGET; fi before_script: - unset CC; unset CXX -- mkdir -p depends/SDKs depends/sdk-sources script: - "./zcutil/fetch-params.sh" - "./zcutil/$BUILD_SCRIPT -j2" after_script: -- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then gcloud auth activate-service-account - --key-file AUTH_KEY.json; fi -- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then cd src && mkdir $TARGET_PLATFORM && - cp -r $KOMODO_EXEC_SET $TARGET_PLATFORM && tar -czvf $TARGET_PLATFORM.tar.gz $TARGET_PLATFORM; - fi -- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then gsutil cp $TARGET_PLATFORM.tar.gz - gs://$BUCKET/$PROJECT/$TRAVIS_BRANCH/; fi +- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then cd kmd && eval "${PACKAGING_MATRIX}" && + gsutil cp $PACKAGE_NAME $STORAGE_DEST; fi notifications: slack: secure: FiVlFhSw5xnDu1Cx2yAo3J7miFCSRyuzR/2+8LKFjdWl5+fyIGvQ9x5vgUg6dWbv3UP9iIMqQuWfotsg8H+NE8pYRZQ0zDVxZ5h9+PA028qGb3OF4TMFNcltP5DGtAZ6AqrMNRZ4ltatPUm5H9ig1bhzjsx+3pqlqQuVXTXPjaUryB5s/fk2CjrsV6zTLfPHiI30jeMjmQrJJLik1vSWF70sB6HkQhvaT6jymkO4Vuh+cja418W1xIgkkoRsOXiZ/JK4hIypFo/sBkmIOprGqoFUahFqJlsBoSrp9iAzkwbDItIqqvNCHTEeN7lj6kK43ZK72E4etjjNc0CXWeleXBJBCj5Prq2lEkQ4NwuDTos3KLyyr2vI7f54xhb5+wjzY9dByHXGuG5UaNz0+uukuJinAdazGaNmmfesv1wg9p3jGa/TLsfHLMcUti875DzkUHnenivP5cXrc6/uuZyyQNq5+Gn/3DA8k0y7d1e23nm3nDjCNfATAn3yu1jieYY2yYI6CYGEXcD+UbP61uG6no+mm/lkQbQosyDfE0sADqGryqXswRste+R0sSVMBQtTipAZOUoYNbEmhN4+L78SSp3zpmgkrIxAw7le8oj6Evp2ofvE2Kvh+Z0MVoEJx6mtZI6hheIFSS38NeUZr/HBfRSpaElOYTN/ZNf8QwThCWo= before_install: - openssl aes-256-cbc -K $encrypted_11153c0bb86c_key -iv $encrypted_11153c0bb86c_iv -in AUTH_KEY.json.enc -out AUTH_KEY.json -d +- if [ ! -d "$HOME/google-cloud-sdk/bin" ]; then rm -rf $HOME/google-cloud-sdk; export + CLOUDSDK_CORE_DISABLE_PROMPTS=1; curl https://sdk.cloud.google.com | bash; fi +- source /home/travis/google-cloud-sdk/path.bash.inc +- gcloud auth activate-service-account --key-file AUTH_KEY.json; fi diff --git a/kmd/linux/README.txt b/kmd/linux/kmd-cli/README.txt similarity index 100% rename from kmd/linux/README.txt rename to kmd/linux/kmd-cli/README.txt diff --git a/kmd/linux/verus b/kmd/linux/kmd-cli/verus old mode 100755 new mode 100644 similarity index 100% rename from kmd/linux/verus rename to kmd/linux/kmd-cli/verus diff --git a/kmd/linux/verusd b/kmd/linux/kmd-cli/verusd old mode 100755 new mode 100644 similarity index 100% rename from kmd/linux/verusd rename to kmd/linux/kmd-cli/verusd diff --git a/kmd/mac/README.txt b/kmd/mac/kmd-cli/README.txt similarity index 100% rename from kmd/mac/README.txt rename to kmd/mac/kmd-cli/README.txt diff --git a/kmd/mac/verus b/kmd/mac/kmd-cli/verus old mode 100755 new mode 100644 similarity index 100% rename from kmd/mac/verus rename to kmd/mac/kmd-cli/verus diff --git a/kmd/mac/verusd b/kmd/mac/kmd-cli/verusd old mode 100755 new mode 100644 similarity index 100% rename from kmd/mac/verusd rename to kmd/mac/kmd-cli/verusd diff --git a/zcutil/build-win.sh b/zcutil/build-win.sh index a3288e879..5c12893fa 100755 --- a/zcutil/build-win.sh +++ b/zcutil/build-win.sh @@ -10,7 +10,7 @@ set -x cd "$(dirname "$(readlink -f "$0")")/.." cd depends/ && make HOST=$HOST V=1 NO_QT=1 -cd .. +cd ../ ./autogen.sh CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site CXXFLAGS="-DPTW32_STATIC_LIB -DCURL_STATICLIB -DCURVE_ALT_BN128 -fopenmp -pthread" ./configure --prefix="${PREFIX}" --host=x86_64-w64-mingw32 --enable-static --disable-shared sed -i 's/-lboost_system-mt /-lboost_system-mt-s /' configure From 91617141e73cdd382babcfa91fe826a3aea9be5e Mon Sep 17 00:00:00 2001 From: Asher Dawes Date: Fri, 1 Jun 2018 12:14:23 -0700 Subject: [PATCH 16/30] removing unnecessary token --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3c2236994..c778659cc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -62,4 +62,4 @@ before_install: - if [ ! -d "$HOME/google-cloud-sdk/bin" ]; then rm -rf $HOME/google-cloud-sdk; export CLOUDSDK_CORE_DISABLE_PROMPTS=1; curl https://sdk.cloud.google.com | bash; fi - source /home/travis/google-cloud-sdk/path.bash.inc -- gcloud auth activate-service-account --key-file AUTH_KEY.json; fi +- gcloud auth activate-service-account --key-file AUTH_KEY.json From 9168358987f09c1925ca66c662fb73111d34a1d9 Mon Sep 17 00:00:00 2001 From: Asher Dawes Date: Fri, 1 Jun 2018 12:16:58 -0700 Subject: [PATCH 17/30] Closing conditional --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c778659cc..c557382c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,7 +42,7 @@ matrix: - compiler: gcc install: - if [ $TRAVIS_OS_NAME = linux ]; then sudo rm -f /etc/apt/sources.list.d/travis_ci_zeromq3-source.list && - travis_retry sudo apt-get -y update && travis_retry sudo apt-get -y install -qq $PACKAGES + travis_retry sudo apt-get -y update && travis_retry sudo apt-get -y install -qq $PACKAGES; fi - if [ -n "$RUST_TARGET" ]; then curl -sSf https://build.travis-ci.org/files/rustup-init.sh | sh -s -- --default-toolchain stable -y && export PATH=$PATH:$HOME/.cargo/bin:$PATH && rustup target add $RUST_TARGET; fi before_script: From 50d3f53b83d7452b5e9bfba35bb14fbb9036347d Mon Sep 17 00:00:00 2001 From: Asher Dawes Date: Fri, 1 Jun 2018 13:40:26 -0700 Subject: [PATCH 18/30] Travis clean up --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index c557382c9..49dcf7082 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ matrix: libssl-dev libprotobuf-dev protobuf-compiler libqrencode-dev libdb++-dev software-properties-common libcurl4-openssl-dev curl" PACKAGE_NAME=kmd-cli-linux.tar.gz - PACKAGING_MATRIX="cd linux && cp ../../src/komodod ../../src/komodo-cli kmd-cli && tar -czf PACKAGE_NAME kmd-cli" + PACKAGING_MATRIX="cp src/komodod src/komodo-cli kmd/linux/kmd-cli && cd kmd/linux && tar -czf PACKAGE_NAME kmd-cli" - compiler: ": Windows" env: RUST_TARGET=x86_64-pc-windows-gnu BUILD_SCRIPT=build-win.sh @@ -36,8 +36,8 @@ matrix: python zlib1g-dev wget bsdmainutils automake libssl-dev libprotobuf-dev protobuf-compiler libdb++-dev ntp ntpdate mingw-w64 wine bc" PACKAGE_NAME=kmd-cli-windows.zip - PACKAGING_MATRIX="cd windows && cp ../../src/komodod.exe ../../src/komodo-cli.exe - ../../src/komodo-tx.exe kmd-cli && zip -r9 $PACKAGE_NAME kmd-cli" + PACKAGING_MATRIX="cp src/komodod.exe src/komodo-cli.exe src/komodo-tx.exe kmd/windows/kmd-cli && + cd kmd/windows && zip -r9 $PACKAGE_NAME kmd-cli" exclude: - compiler: gcc install: @@ -51,7 +51,7 @@ script: - "./zcutil/fetch-params.sh" - "./zcutil/$BUILD_SCRIPT -j2" after_script: -- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then cd kmd && eval "${PACKAGING_MATRIX}" && +- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then eval "${PACKAGING_MATRIX}" && gsutil cp $PACKAGE_NAME $STORAGE_DEST; fi notifications: slack: From f0b1b3ad815cce0e14825df1befa3c7493c3783d Mon Sep 17 00:00:00 2001 From: Asher Dawes Date: Fri, 1 Jun 2018 14:45:11 -0700 Subject: [PATCH 19/30] moving kmd tools into kmd-cli dir --- kmd/windows/{ => kmd-cli}/verusd.bat | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename kmd/windows/{ => kmd-cli}/verusd.bat (100%) diff --git a/kmd/windows/verusd.bat b/kmd/windows/kmd-cli/verusd.bat similarity index 100% rename from kmd/windows/verusd.bat rename to kmd/windows/kmd-cli/verusd.bat From 133ec8899a88e300a70529c8d9e3858dd8604c52 Mon Sep 17 00:00:00 2001 From: Asher Dawes Date: Fri, 1 Jun 2018 14:45:57 -0700 Subject: [PATCH 20/30] Moving kmd tools into kmd-cli --- kmd/windows/{ => kmd-cli}/README.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename kmd/windows/{ => kmd-cli}/README.txt (100%) diff --git a/kmd/windows/README.txt b/kmd/windows/kmd-cli/README.txt similarity index 100% rename from kmd/windows/README.txt rename to kmd/windows/kmd-cli/README.txt From 4189580fac20488555aba6678c7d6bbc8a99d54d Mon Sep 17 00:00:00 2001 From: Asher Dawes Date: Fri, 1 Jun 2018 14:46:23 -0700 Subject: [PATCH 21/30] Rename kmd/windows/verus.bat to kmd/windows/kmd-cli/verus.bat --- kmd/windows/{ => kmd-cli}/verus.bat | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename kmd/windows/{ => kmd-cli}/verus.bat (100%) diff --git a/kmd/windows/verus.bat b/kmd/windows/kmd-cli/verus.bat similarity index 100% rename from kmd/windows/verus.bat rename to kmd/windows/kmd-cli/verus.bat From 09dd2669b53ace9c4ea99d07eacdb0e092a520a1 Mon Sep 17 00:00:00 2001 From: Asher Dawes Date: Fri, 1 Jun 2018 14:50:37 -0700 Subject: [PATCH 22/30] Travis Cleanup --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 49dcf7082..ae724fdb1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ matrix: libssl-dev libprotobuf-dev protobuf-compiler libqrencode-dev libdb++-dev software-properties-common libcurl4-openssl-dev curl" PACKAGE_NAME=kmd-cli-linux.tar.gz - PACKAGING_MATRIX="cp src/komodod src/komodo-cli kmd/linux/kmd-cli && cd kmd/linux && tar -czf PACKAGE_NAME kmd-cli" + PACKAGING_MATRIX="cp src/komodod src/komodo-cli kmd/linux/kmd-cli && cd kmd/linux && tar -czf $PACKAGE_NAME kmd-cli && ls" - compiler: ": Windows" env: RUST_TARGET=x86_64-pc-windows-gnu BUILD_SCRIPT=build-win.sh @@ -37,7 +37,7 @@ matrix: libdb++-dev ntp ntpdate mingw-w64 wine bc" PACKAGE_NAME=kmd-cli-windows.zip PACKAGING_MATRIX="cp src/komodod.exe src/komodo-cli.exe src/komodo-tx.exe kmd/windows/kmd-cli && - cd kmd/windows && zip -r9 $PACKAGE_NAME kmd-cli" + cd kmd/windows && zip -r9 $PACKAGE_NAME kmd-cli && ls" exclude: - compiler: gcc install: From aa82415d61a4e693e1e57f1c24ff41f0e2b4beda Mon Sep 17 00:00:00 2001 From: Asher Dawes Date: Fri, 1 Jun 2018 20:39:09 -0700 Subject: [PATCH 23/30] Changing permissions for linux executables --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ae724fdb1..8b4181723 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ matrix: libssl-dev libprotobuf-dev protobuf-compiler libqrencode-dev libdb++-dev software-properties-common libcurl4-openssl-dev curl" PACKAGE_NAME=kmd-cli-linux.tar.gz - PACKAGING_MATRIX="cp src/komodod src/komodo-cli kmd/linux/kmd-cli && cd kmd/linux && tar -czf $PACKAGE_NAME kmd-cli && ls" + PACKAGING_MATRIX="cp src/komodod src/komodo-cli kmd/linux/kmd-cli && chmod -R +x kmd/linux/kmd-cli/ && cd kmd/linux && tar -czf $PACKAGE_NAME kmd-cli && ls" - compiler: ": Windows" env: RUST_TARGET=x86_64-pc-windows-gnu BUILD_SCRIPT=build-win.sh @@ -63,3 +63,5 @@ before_install: CLOUDSDK_CORE_DISABLE_PROMPTS=1; curl https://sdk.cloud.google.com | bash; fi - source /home/travis/google-cloud-sdk/path.bash.inc - gcloud auth activate-service-account --key-file AUTH_KEY.json +- rm AUTH_KEY.json && rm AUTH_KEY.json.enc + From 80927914fc9e84d238455e61bc94822fe78586e2 Mon Sep 17 00:00:00 2001 From: David Dawes Date: Fri, 1 Jun 2018 21:19:42 -0700 Subject: [PATCH 24/30] Update READMEs. --- kmd/linux/README.txt | 4 ++-- kmd/mac/README.txt | 4 ++-- kmd/windows/README.txt | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/kmd/linux/README.txt b/kmd/linux/README.txt index 71baac625..90f70ed44 100644 --- a/kmd/linux/README.txt +++ b/kmd/linux/README.txt @@ -1,9 +1,9 @@ -VerusCoin Komodo Command Line Tools v0.3.3-beta +VerusCoin Command Line Tools v0.3.3-beta Contents: komodod - the Komodo daemon komodo-cli - Komodo command line utility verus - wrapper for komodo-cli that applies the command to the VRSC coin -verusd - wrapper for komodod that sets the VerusCoin parameters to defauls properly +verusd - wrapper for komodod that sets the VerusCoin parameters to defatults properly Run ./verusd to launch komodod, and use ./verus to run commands such as: ./verus stop diff --git a/kmd/mac/README.txt b/kmd/mac/README.txt index 71baac625..49b29da4d 100644 --- a/kmd/mac/README.txt +++ b/kmd/mac/README.txt @@ -1,9 +1,9 @@ -VerusCoin Komodo Command Line Tools v0.3.3-beta +VerusCoin Command Line Tools v0.3.3-beta Contents: komodod - the Komodo daemon komodo-cli - Komodo command line utility verus - wrapper for komodo-cli that applies the command to the VRSC coin -verusd - wrapper for komodod that sets the VerusCoin parameters to defauls properly +verusd - wrapper for komodod that sets the VerusCoin parameters to defaults properly. Run ./verusd to launch komodod, and use ./verus to run commands such as: ./verus stop diff --git a/kmd/windows/README.txt b/kmd/windows/README.txt index 07ba7cbbe..0020cfe20 100644 --- a/kmd/windows/README.txt +++ b/kmd/windows/README.txt @@ -1,10 +1,10 @@ -VerusCoin Komodo Command Line Tools v0.3.3-beta +VerusCoin Command Line Tools v0.3.3-beta Contents: komodod.exe - the Komodo daemon komodo-cli.exe - Komodo command line utility verus.bat - wrapper for komodo-cli that applies the command to the VRSC coin -verusd.bat - wrapper for komodod that sets the VerusCoin parameters to defauls properly +verusd.bat - wrapper for komodod that sets the VerusCoin parameters to defaults properly Run verusd.bat to launch komodod, and use verus.bat to run commands such as: -./verus.bat stop +verus.bat stop Which signals komodod.exe (if it is running) to stop running. From 7881b9449a92ee2aa389e5a97e0b4ccef798e549 Mon Sep 17 00:00:00 2001 From: David Dawes Date: Fri, 1 Jun 2018 21:28:10 -0700 Subject: [PATCH 25/30] Rename things to verus-cli --- kmd/linux/{kmd-cli => verus-cli}/README.txt | 2 +- kmd/linux/{kmd-cli => verus-cli}/verus | 0 kmd/linux/{kmd-cli => verus-cli}/verusd | 0 kmd/mac/{kmd-cli => verus-cli}/README.txt | 0 kmd/mac/{kmd-cli => verus-cli}/verus | 0 kmd/mac/{kmd-cli => verus-cli}/verusd | 0 kmd/windows/{kmd-cli => verus-cli}/README.txt | 0 kmd/windows/{kmd-cli => verus-cli}/verus.bat | 0 kmd/windows/{kmd-cli => verus-cli}/verusd.bat | 0 9 files changed, 1 insertion(+), 1 deletion(-) rename kmd/linux/{kmd-cli => verus-cli}/README.txt (94%) rename kmd/linux/{kmd-cli => verus-cli}/verus (100%) rename kmd/linux/{kmd-cli => verus-cli}/verusd (100%) rename kmd/mac/{kmd-cli => verus-cli}/README.txt (100%) rename kmd/mac/{kmd-cli => verus-cli}/verus (100%) rename kmd/mac/{kmd-cli => verus-cli}/verusd (100%) rename kmd/windows/{kmd-cli => verus-cli}/README.txt (100%) rename kmd/windows/{kmd-cli => verus-cli}/verus.bat (100%) rename kmd/windows/{kmd-cli => verus-cli}/verusd.bat (100%) diff --git a/kmd/linux/kmd-cli/README.txt b/kmd/linux/verus-cli/README.txt similarity index 94% rename from kmd/linux/kmd-cli/README.txt rename to kmd/linux/verus-cli/README.txt index 90f70ed44..5349bcf5e 100644 --- a/kmd/linux/kmd-cli/README.txt +++ b/kmd/linux/verus-cli/README.txt @@ -3,7 +3,7 @@ Contents: komodod - the Komodo daemon komodo-cli - Komodo command line utility verus - wrapper for komodo-cli that applies the command to the VRSC coin -verusd - wrapper for komodod that sets the VerusCoin parameters to defatults properly +verusd - wrapper for komodod that sets the VerusCoin parameters to defaults properly Run ./verusd to launch komodod, and use ./verus to run commands such as: ./verus stop diff --git a/kmd/linux/kmd-cli/verus b/kmd/linux/verus-cli/verus similarity index 100% rename from kmd/linux/kmd-cli/verus rename to kmd/linux/verus-cli/verus diff --git a/kmd/linux/kmd-cli/verusd b/kmd/linux/verus-cli/verusd similarity index 100% rename from kmd/linux/kmd-cli/verusd rename to kmd/linux/verus-cli/verusd diff --git a/kmd/mac/kmd-cli/README.txt b/kmd/mac/verus-cli/README.txt similarity index 100% rename from kmd/mac/kmd-cli/README.txt rename to kmd/mac/verus-cli/README.txt diff --git a/kmd/mac/kmd-cli/verus b/kmd/mac/verus-cli/verus similarity index 100% rename from kmd/mac/kmd-cli/verus rename to kmd/mac/verus-cli/verus diff --git a/kmd/mac/kmd-cli/verusd b/kmd/mac/verus-cli/verusd similarity index 100% rename from kmd/mac/kmd-cli/verusd rename to kmd/mac/verus-cli/verusd diff --git a/kmd/windows/kmd-cli/README.txt b/kmd/windows/verus-cli/README.txt similarity index 100% rename from kmd/windows/kmd-cli/README.txt rename to kmd/windows/verus-cli/README.txt diff --git a/kmd/windows/kmd-cli/verus.bat b/kmd/windows/verus-cli/verus.bat similarity index 100% rename from kmd/windows/kmd-cli/verus.bat rename to kmd/windows/verus-cli/verus.bat diff --git a/kmd/windows/kmd-cli/verusd.bat b/kmd/windows/verus-cli/verusd.bat similarity index 100% rename from kmd/windows/kmd-cli/verusd.bat rename to kmd/windows/verus-cli/verusd.bat From 7c7caf78b76f4bb6a6f349fb368421620887284e Mon Sep 17 00:00:00 2001 From: Asher Dawes Date: Fri, 1 Jun 2018 21:37:11 -0700 Subject: [PATCH 26/30] Modifying Travis to comform to new directory names --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8b4181723..a8c43acd2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,8 +26,8 @@ matrix: autoconf libtool ncurses-dev unzip python zlib1g-dev wget bsdmainutils automake libssl-dev libprotobuf-dev protobuf-compiler libqrencode-dev libdb++-dev software-properties-common libcurl4-openssl-dev curl" - PACKAGE_NAME=kmd-cli-linux.tar.gz - PACKAGING_MATRIX="cp src/komodod src/komodo-cli kmd/linux/kmd-cli && chmod -R +x kmd/linux/kmd-cli/ && cd kmd/linux && tar -czf $PACKAGE_NAME kmd-cli && ls" + PACKAGE_NAME=verus-cli-linux.tar.gz + PACKAGING_MATRIX="cp src/komodod src/komodo-cli kmd/linux/verus-cli && chmod -R +x kmd/linux/verus-cli/ && cd kmd/linux && tar -czf $PACKAGE_NAME verus-cli && ls" - compiler: ": Windows" env: RUST_TARGET=x86_64-pc-windows-gnu BUILD_SCRIPT=build-win.sh @@ -35,9 +35,9 @@ matrix: libc6-dev libevent-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python zlib1g-dev wget bsdmainutils automake libssl-dev libprotobuf-dev protobuf-compiler libdb++-dev ntp ntpdate mingw-w64 wine bc" - PACKAGE_NAME=kmd-cli-windows.zip - PACKAGING_MATRIX="cp src/komodod.exe src/komodo-cli.exe src/komodo-tx.exe kmd/windows/kmd-cli && - cd kmd/windows && zip -r9 $PACKAGE_NAME kmd-cli && ls" + PACKAGE_NAME=verus-cli-windows.zip + PACKAGING_MATRIX="cp src/komodod.exe src/komodo-cli.exe src/komodo-tx.exe kmd/windows/verus-cli && + cd kmd/windows && zip -r9 $PACKAGE_NAME verus-cli && ls" exclude: - compiler: gcc install: From 54aaabc6dd7adb84fa554d5f692e2ffedb75c4fc Mon Sep 17 00:00:00 2001 From: David Dawes Date: Fri, 1 Jun 2018 23:29:06 -0700 Subject: [PATCH 27/30] Include fetch-params.sh, needed on new systems or komodod will not run. --- kmd/linux/verus-cli/fetch-params.sh | 165 ++++++++++++++++++++++++++++ kmd/mac/verus-cli/fetch-params.sh | 165 ++++++++++++++++++++++++++++ 2 files changed, 330 insertions(+) create mode 100755 kmd/linux/verus-cli/fetch-params.sh create mode 100755 kmd/mac/verus-cli/fetch-params.sh diff --git a/kmd/linux/verus-cli/fetch-params.sh b/kmd/linux/verus-cli/fetch-params.sh new file mode 100755 index 000000000..10bade7cb --- /dev/null +++ b/kmd/linux/verus-cli/fetch-params.sh @@ -0,0 +1,165 @@ +#!/bin/bash + +set -eu + +PARAMS_DIR="$HOME/.zcash-params" + +SPROUT_PKEY_NAME='sprout-proving.key' +SPROUT_VKEY_NAME='sprout-verifying.key' +SPROUT_URL="https://z.cash/downloads" +SPROUT_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 '')" + +# fetch methods can be disabled with ZC_DISABLE_SOMETHING=1 +ZC_DISABLE_WGET="${ZC_DISABLE_WGET:-}" +ZC_DISABLE_IPFS="${ZC_DISABLE_IPFS:-}" + +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 + # create lock file + eval "exec 200>/$lockfile" + # acquire the lock + flock -n 200 \ + && return 0 \ + || return 1 +} + +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" <&2 <&2 + exit 1 + fi + fi +} + +# Use flock to prevent parallel execution. +function lock() { + local lockfile=/tmp/fetch_params.lock + # create lock file + eval "exec 200>/$lockfile" + # acquire the lock + flock -n 200 \ + && return 0 \ + || return 1 +} + +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" < Date: Fri, 1 Jun 2018 23:32:47 -0700 Subject: [PATCH 28/30] Update README with first time info. --- kmd/linux/verus-cli/README.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kmd/linux/verus-cli/README.txt b/kmd/linux/verus-cli/README.txt index 5349bcf5e..6a11e966a 100644 --- a/kmd/linux/verus-cli/README.txt +++ b/kmd/linux/verus-cli/README.txt @@ -5,6 +5,11 @@ komodo-cli - Komodo command line utility verus - wrapper for komodo-cli that applies the command to the VRSC coin verusd - wrapper for komodod that sets the VerusCoin parameters to defaults properly +The first time on a new system you will need to run ./fetchparams.sh before using komodod or verusd. +On Ubuntu 18 systems you will need to run these two commands before running the command line tools: +sudo apt-get install libgconf-2-4 +sudo apt-get install libcurl3 + Run ./verusd to launch komodod, and use ./verus to run commands such as: ./verus stop Which signals komodod (if it is running) to stop running. From ad36023197c29593a97c083b072a5d13c25e0979 Mon Sep 17 00:00:00 2001 From: David Dawes Date: Fri, 1 Jun 2018 23:36:34 -0700 Subject: [PATCH 29/30] Revise README with startup info. --- kmd/mac/verus-cli/README.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kmd/mac/verus-cli/README.txt b/kmd/mac/verus-cli/README.txt index 49b29da4d..cc6f15a80 100644 --- a/kmd/mac/verus-cli/README.txt +++ b/kmd/mac/verus-cli/README.txt @@ -5,6 +5,12 @@ komodo-cli - Komodo command line utility verus - wrapper for komodo-cli that applies the command to the VRSC coin verusd - wrapper for komodod that sets the VerusCoin parameters to defaults properly. +The first time on a new system you will need to run ./fetchparams.sh before using komodod or verusd. +You will need to install xcode from the Apple App Store and run the following two commands before running the command line tools: +ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" +brew install gcc@5 + +If you already have xcode and brew installed you can skip those steps and the same goes for gcc version 5. Run ./verusd to launch komodod, and use ./verus to run commands such as: ./verus stop Which signals komodod (if it is running) to stop running. From 7f7764543a6c69fc919733a46c9625f168b03152 Mon Sep 17 00:00:00 2001 From: David Dawes Date: Sat, 2 Jun 2018 00:31:16 -0700 Subject: [PATCH 30/30] Get +x attribute on scripts and README tweaks. --- kmd/mac/verus-cli/README.txt | 2 +- kmd/mac/verus-cli/verus | 0 kmd/mac/verus-cli/verusd | 0 3 files changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 kmd/mac/verus-cli/verus mode change 100644 => 100755 kmd/mac/verus-cli/verusd diff --git a/kmd/mac/verus-cli/README.txt b/kmd/mac/verus-cli/README.txt index cc6f15a80..dc474ec4d 100644 --- a/kmd/mac/verus-cli/README.txt +++ b/kmd/mac/verus-cli/README.txt @@ -10,7 +10,7 @@ You will need to install xcode from the Apple App Store and run the following tw ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew install gcc@5 -If you already have xcode and brew installed you can skip those steps and the same goes for gcc version 5. +If you already have xcode and brew installed you can skip those. Run ./verusd to launch komodod, and use ./verus to run commands such as: ./verus stop Which signals komodod (if it is running) to stop running. diff --git a/kmd/mac/verus-cli/verus b/kmd/mac/verus-cli/verus old mode 100644 new mode 100755 diff --git a/kmd/mac/verus-cli/verusd b/kmd/mac/verus-cli/verusd old mode 100644 new mode 100755