diff --git a/.gitignore b/.gitignore index ca3d15c12..1f2b2537d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ *.tar.gz *.deb -*.exe src/bitcoin src/zcashd src/zcash-cli @@ -122,6 +121,9 @@ src/komodod src/komodo-tx src/komodo-test src/wallet-utility +src/komodo-cli.exe +src/komodod.exe +src/komodo-tx.exe #output during builds, symbol tables? *.dSYM diff --git a/.travis.yml b/.travis.yml index a8c43acd2..077a3e82c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,8 +41,8 @@ matrix: exclude: - 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; fi +- 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: @@ -57,11 +57,11 @@ 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 [ "$TRAVIS_PULL_REQUEST" = "false" ]; then openssl aes-256-cbc -K $encrypted_11153c0bb86c_key -iv $encrypted_11153c0bb86c_iv + -in AUTH_KEY.json.enc -out AUTH_KEY.json -d; fi - 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 -- rm AUTH_KEY.json && rm AUTH_KEY.json.enc - +- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then gcloud auth activate-service-account --key-file AUTH_KEY.json; fi +- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then rm AUTH_KEY.json; fi +- rm AUTH_KEY.json.enc diff --git a/README-mac.md b/README-mac.md index c085cb617..a7748d81c 100644 --- a/README-mac.md +++ b/README-mac.md @@ -6,16 +6,10 @@ And Homebrew: http://brew.sh/ -And this is the list of brew packages you'll need installed: +then use the brewfile to install the necessary packages: ```shell -brew tap discoteq/discoteq; brew install flock -brew install autoconf autogen automake -brew tap homebrew/versions; brew install homebrew/versions/gcc5 -brew install binutils -brew install protobuf -brew install coreutils -brew install wget +brew bundle ``` Get all that installed, then run: diff --git a/kmd/linux/verus-cli/README.txt b/kmd/linux/verus-cli/README.txt index 6a11e966a..303105448 100644 --- a/kmd/linux/verus-cli/README.txt +++ b/kmd/linux/verus-cli/README.txt @@ -1,7 +1,7 @@ VerusCoin Command Line Tools v0.3.3-beta Contents: -komodod - the Komodo daemon -komodo-cli - Komodo command line utility +komodod - VerusCoin's enhanced Komodo daemon +komodo-cli - VerusCoin's 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 diff --git a/kmd/mac/verus-cli/README.txt b/kmd/mac/verus-cli/README.txt index dc474ec4d..8131295ee 100644 --- a/kmd/mac/verus-cli/README.txt +++ b/kmd/mac/verus-cli/README.txt @@ -1,9 +1,10 @@ VerusCoin Command Line Tools v0.3.3-beta Contents: -komodod - the Komodo daemon -komodo-cli - Komodo command line utility +komodod - VerusCoin's enhanced Komodo daemon. +komodo-cli - VerusCoin's enhanced 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. +verusd - wrapper for komodod that sets the VerusCoin parameters to defaults properly +fetch_params.sh - utility to download the zcash parameters needed to start the VerusCoin command line tools and scripts 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: diff --git a/kmd/windows/verus-cli/README.txt b/kmd/windows/verus-cli/README.txt index 0020cfe20..88db1c863 100644 --- a/kmd/windows/verus-cli/README.txt +++ b/kmd/windows/verus-cli/README.txt @@ -1,10 +1,16 @@ VerusCoin Command Line Tools v0.3.3-beta Contents: -komodod.exe - the Komodo daemon -komodo-cli.exe - Komodo command line utility +komodod.exe - VerusCoin's enhanced Komodo daemon +komodo-cli.exe - iVerusCoin's 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 defaults properly +The first time on a new system you will need to run ./fetchparams.sh before using komodod or verusd. +Many virus scanniong products interfere with the VerusCoin tool's ability to open ports and will need to be configfured to allow what the scanner says is unsafe behavior. Extreme cases can result in the virus scanner deleting Agama.exe or moving it to "protect" the system. You will needs to disable those features and re-extract the verus-cli-windows.zip file if that happens. Run verusd.bat to launch komodod, and use verus.bat to run commands such as: verus.bat stop Which signals komodod.exe (if it is running) to stop running. + +Note that if you pass in command line options to verus.bat or verusd.bat that include an = like -ac_veruspos=50 you must surround it with double quotes like this: +verusd.bat "-ac_veruspos=50" +Otherwise Windows will drop the = and pass the two values in as separate command line options. diff --git a/kmd/windows/verus-cli/fetch-params.bat b/kmd/windows/verus-cli/fetch-params.bat new file mode 100644 index 000000000..1d856c733 --- /dev/null +++ b/kmd/windows/verus-cli/fetch-params.bat @@ -0,0 +1,21 @@ +@echo off +call :GET_CURRENT_DIR +cd %THIS_DIR% +IF NOT EXIST %APPDATA%\ZcashParams ( +MKDIR %APPDATA%\ZcashParams +) +IF NOT EXIST %APPDATA%\ZcashParams\sprout-proving.key ( + ECHO Downloading Zcash trusted setup sprout-proving.key, this may take a while ... + .\wget64.exe --progress=dot:giga --continue --retry-connrefused --waitretry=3 --timeout=30 https://zensystem.io/downloads/sprout-proving.key -O %APPDATA%\ZcashParams\sprout-proving.key +) +IF NOT EXIST %APPDATA%\ZcashParams\sprout-verifying.key ( + ECHO Downloading Zcash trusted setup sprout-verifying.key, this may take a while ... + .\wget64.exe --progress=dot:giga --continue --retry-connrefused --waitretry=3 --timeout=30 https://z.cash/downloads/sprout-verifying.key -O %APPDATA%\ZcashParams\sprout-verifying.key +) +goto :EOF +:GET_CURRENT_DIR +pushd %~dp0 +set THIS_DIR=%CD% +popd +goto :EOF + diff --git a/kmd/windows/verus-cli/wget64.exe b/kmd/windows/verus-cli/wget64.exe new file mode 100644 index 000000000..f6fb628e4 Binary files /dev/null and b/kmd/windows/verus-cli/wget64.exe differ diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index c9bbd967d..d80996b8b 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -32,7 +32,7 @@ using namespace std; -extern int32_t ASSETCHAINS_ALGO, ASSETCHAINS_EQUIHASH; +extern int32_t ASSETCHAINS_ALGO, ASSETCHAINS_EQUIHASH, ASSETCHAINS_LWMAPOS; /** * Return average network hashes per second based on the last 'lookup' blocks, @@ -320,7 +320,7 @@ UniValue setgenerate(const UniValue& params, bool fHelp) if (params.size() > 1) { nGenProcLimit = params[1].get_int(); - if (nGenProcLimit == 0) + if (ASSETCHAINS_LWMAPOS == 0 && nGenProcLimit == 0) fGenerate = false; } @@ -375,12 +375,12 @@ UniValue getmininginfo(const UniValue& params, bool fHelp) obj.push_back(Pair("genproclimit", (int)GetArg("-genproclimit", -1))); if (ASSETCHAINS_ALGO == ASSETCHAINS_EQUIHASH) { - obj.push_back(Pair("localsolps" , getlocalsolps(params, false))); - obj.push_back(Pair("networksolps", getnetworksolps(params, false))); + obj.push_back(Pair("localsolps" , getlocalsolps(params, false))); + obj.push_back(Pair("networksolps", getnetworksolps(params, false))); } else { - obj.push_back(Pair("localhashps" , getlocalsolps(params, false))); + obj.push_back(Pair("localhashps" , GetBoolArg("-gen", false) ? getlocalsolps(params, false) : (double)0.0)); } obj.push_back(Pair("networkhashps", getnetworksolps(params, false))); obj.push_back(Pair("pooledtx", (uint64_t)mempool.size()));