From e44f30222e118fdc937ea1312341bbba50cc4c9d Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 30 Apr 2018 10:11:13 -0700 Subject: [PATCH 01/19] Update node list from dev branch, since these nodes are no bueno and confuse people on Github --- INSTALL.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index d37c80108..4a8b08ae6 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -13,9 +13,11 @@ mkdir -p ~/.hush echo "rpcuser=username" >> ~/.hush/hush.conf echo "rpcpassword=`head -c 32 /dev/urandom | base64`" >>~/.hush/hush.conf -echo "addnode=node.myhush.network" >> ~/.hush/hush.conf -echo "addnode=mmc01.madbuda.me" >> ~/.hush/hush.conf -echo "addnode=zdash.suprnova.cc" >> ~/.hush/hush.conf +echo "addnode=explorer.myhush.org" >> ~/.hush/hush.conf +echo "addnode=dnsseed.myhush.org" >> ~/.hush/hush.conf +echo "addnode=dnsseed2.myhush.org" >> ~/.hush/hush.conf +echo "addnode=dnsseed.bleuzero.com" >> ~/.hush/hush.conf +echo "addnode=dnsseed.hush.quebec" >> ~/.hush/hush.conf ``` ## Download proving key From 0d3435b0acbc4bc6a671c2ceb44642223ccfdc48 Mon Sep 17 00:00:00 2001 From: FireMartZ Date: Wed, 9 May 2018 20:51:34 -0400 Subject: [PATCH 02/19] Update cross compile instructions. --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 4a8b08ae6..9339176c7 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -60,7 +60,7 @@ Get dependencies: sudo apt-get install \ build-essential pkg-config libc6-dev m4 g++-multilib \ autoconf libtool ncurses-dev unzip git python \ - zlib1g-dev wget bsdmainutils automake + zlib1g-dev wget bsdmainutils automake cmake g++-mingw-w64-x86-64 ``` Make sure to create a HUSH configuration file as described above. From 355f5678932254630b60c73782b70de64a1613a5 Mon Sep 17 00:00:00 2001 From: RedCat90 <40126169+RedCat90@users.noreply.github.com> Date: Sat, 9 Jun 2018 15:21:59 -0400 Subject: [PATCH 03/19] Update unit-tests.md Updated "The latter framework is preferred for new Zcash unit tests." to "The latter framework is preferred for new Hush unit tests." --- doc/unit-tests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/unit-tests.md b/doc/unit-tests.md index 97dcd701e..bbe88ede9 100644 --- a/doc/unit-tests.md +++ b/doc/unit-tests.md @@ -12,6 +12,6 @@ There are two scripts for running tests: The main test suite uses two different testing frameworks. Tests using the Boost framework are under ``src/test/``; tests using the Google Test/Google Mock framework are under ``src/gtest/`` and ``src/wallet/gtest/``. The latter framework -is preferred for new Zcash unit tests. +is preferred for new Hush unit tests. RPC tests are implemented in Python under the ``qa/rpc-tests/`` directory. From bf7132004bbcd372cc5aa461305c9c1066265bc6 Mon Sep 17 00:00:00 2001 From: RedCat90 <40126169+RedCat90@users.noreply.github.com> Date: Sat, 9 Jun 2018 15:31:02 -0400 Subject: [PATCH 04/19] Update unit-tests.md Update directory from qa/zcash/ to qa/hush/ --- doc/unit-tests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/unit-tests.md b/doc/unit-tests.md index bbe88ede9..b8b298a99 100644 --- a/doc/unit-tests.md +++ b/doc/unit-tests.md @@ -6,7 +6,7 @@ and tests weren't explicitly disabled. There are two scripts for running tests: -* ``qa/zcash/full-test-suite.sh``, to run the main test suite +* ``qa/hush/full-test-suite.sh``, to run the main test suite * ``qa/pull-tester/rpc-tests.sh``, to run the RPC tests. The main test suite uses two different testing frameworks. Tests using the Boost From 5ddd3bfe0c82e87a3e82cde04556088411b88de4 Mon Sep 17 00:00:00 2001 From: Team ChainStrike Date: Wed, 3 Oct 2018 06:35:24 +1000 Subject: [PATCH 05/19] It was a grave error to comment this line out, which makes txn_count always zero and skips important code --- src/komodo_validation011.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_validation011.h b/src/komodo_validation011.h index 6a4e8a007..2f5c11a41 100644 --- a/src/komodo_validation011.h +++ b/src/komodo_validation011.h @@ -1195,7 +1195,7 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) if ( pindex != 0 ) { height = pindex->nHeight; - //txn_count = block.vtx.size(); + txn_count = block.vtx.size(); //fprintf(stderr, "txn_count=%d\n", txn_count); for (i=0; i Date: Wed, 3 Oct 2018 06:44:35 +1000 Subject: [PATCH 06/19] This debug logging is now redundant --- src/komodo_validation011.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_validation011.h b/src/komodo_validation011.h index 2f5c11a41..49afd2fd3 100644 --- a/src/komodo_validation011.h +++ b/src/komodo_validation011.h @@ -1065,7 +1065,7 @@ void komodo_notarized_update(int32_t nHeight,int32_t notarized_height,uint256 no NOTARIZED_HEIGHT = np->notarized_height = notarized_height; NOTARIZED_HASH = np->notarized_hash = notarized_hash; NOTARIZED_DESTTXID = np->notarized_desttxid = notarized_desttxid; - LogPrintf("dpow: NOTARIZED (HEIGHT,HASH,DESTTXID) = (%d, %s, %s)\n", NOTARIZED_HEIGHT, NOTARIZED_HASH.GetHex().c_str(), NOTARIZED_DESTTXID.GetHex().c_str()); + //LogPrintf("dpow: NOTARIZED (HEIGHT,HASH,DESTTXID) = (%d, %s, %s)\n", NOTARIZED_HEIGHT, NOTARIZED_HASH.GetHex().c_str(), NOTARIZED_DESTTXID.GetHex().c_str()); if ( MoM != zero && MoMdepth > 0 ) { NOTARIZED_MOM = np->MoM = MoM; From f3fc52922c870bb6039d7662ca5dfd06d4058c52 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Thu, 4 Oct 2018 05:14:10 -0700 Subject: [PATCH 07/19] Update to latest libsodium release, since 1.0.11 is unsupported and URL changed to releases/old/unsupported/, which broke fresh builds --- depends/packages/libsodium.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/depends/packages/libsodium.mk b/depends/packages/libsodium.mk index d7717bbfc..27b9b10fa 100644 --- a/depends/packages/libsodium.mk +++ b/depends/packages/libsodium.mk @@ -1,8 +1,8 @@ package=libsodium -$(package)_version=1.0.11 +$(package)_version=1.0.16 $(package)_download_path=https://download.libsodium.org/libsodium/releases/ -$(package)_file_name=libsodium-1.0.11.tar.gz -$(package)_sha256_hash=a14549db3c49f6ae2170cbbf4664bd48ace50681045e8dbea7c8d9fb96f9c765 +$(package)_file_name=libsodium-1.0.16.tar.gz +$(package)_sha256_hash=eeadc7e1e1bcef09680fb4837d448fbdf57224978f865ac1c16745868fbd0533 $(package)_dependencies= $(package)_config_opts= From 7c96bf6aeb9fd87bb19ec2b81f854af184a458bf Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Thu, 4 Oct 2018 23:53:54 -0700 Subject: [PATCH 08/19] Start doing the needful for our next release --- README.md | 4 ++-- configure.ac | 4 ++-- contrib/devtools/gen-manpages.sh | 1 + doc/man/hush-cli.1 | 8 ++++---- doc/man/hush-tx.1 | 8 ++++---- doc/man/hushd.1 | 12 ++++++------ 6 files changed, 19 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 9dd93225f..746c2be5f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# HUSH 1.0.14 +# HUSH 2.0.0 ## What is HUSH? @@ -7,7 +7,7 @@ HUSH (formerly Zdash) is a code fork of [ZCash](https://z.cash/) which has it's own genesis block. Based on Bitcoin's code, it intends to offer a far higher standard of privacy through a sophisticated zero-knowledge proving scheme that preserves -confidentiality of transaction metadata. +confidentiality of transaction metadata. This software is the HUSH node and command-line client. It downloads and stores the entire history of HUSH transactions; depending on the speed of your computer and network diff --git a/configure.ac b/configure.ac index 6a26a3ed8..4ff059697 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,8 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) -define(_CLIENT_VERSION_MAJOR, 1) +define(_CLIENT_VERSION_MAJOR, 2) define(_CLIENT_VERSION_MINOR, 0) -define(_CLIENT_VERSION_REVISION, 14) +define(_CLIENT_VERSION_REVISION, 0) define(_CLIENT_VERSION_BUILD, 50) define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50))) define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1))) diff --git a/contrib/devtools/gen-manpages.sh b/contrib/devtools/gen-manpages.sh index a03c1fd2d..69b2960fd 100755 --- a/contrib/devtools/gen-manpages.sh +++ b/contrib/devtools/gen-manpages.sh @@ -1,4 +1,5 @@ #!/bin/sh +alias sed=gsed TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)} SRCDIR=${SRCDIR:-$TOPDIR/src} diff --git a/doc/man/hush-cli.1 b/doc/man/hush-cli.1 index b522ff4e9..05b967786 100644 --- a/doc/man/hush-cli.1 +++ b/doc/man/hush-cli.1 @@ -1,9 +1,9 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3. -.TH HUSH-CLI "1" "March 2018" "hush-cli v1.0.14-a0d4aef" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH HUSH-CLI "1" "October 2018" "hush-cli v1.0.13-72e2e60" "User Commands" .SH NAME -hush-cli \- manual page for hush-cli v1.0.14-a0d4aef +hush-cli \- manual page for hush-cli v1.0.13-72e2e60 .SH DESCRIPTION -Hush RPC client version v1.0.14\-a0d4aef +Hush RPC client version v1.0.13 .PP In order to ensure you are adequately protecting your privacy when using Hush, please see . diff --git a/doc/man/hush-tx.1 b/doc/man/hush-tx.1 index ae3184a35..ae75d0e68 100644 --- a/doc/man/hush-tx.1 +++ b/doc/man/hush-tx.1 @@ -1,9 +1,9 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3. -.TH HUSH-TX "1" "March 2018" "hush-tx v1.0.14-a0d4aef" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH HUSH-TX "1" "October 2018" "hush-tx v1.0.13-72e2e60" "User Commands" .SH NAME -hush-tx \- manual page for hush-tx v1.0.14-a0d4aef +hush-tx \- manual page for hush-tx v1.0.13-72e2e60 .SH DESCRIPTION -Hush hush\-tx utility version v1.0.14\-a0d4aef +Hush hush\-tx utility version v1.0.13 .SS "Usage:" .TP hush\-tx [options] [commands] diff --git a/doc/man/hushd.1 b/doc/man/hushd.1 index 2a587ac13..97038cb21 100644 --- a/doc/man/hushd.1 +++ b/doc/man/hushd.1 @@ -1,9 +1,9 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3. -.TH HUSHD "1" "March 2018" "hushd v1.0.14-a0d4aef" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH HUSHD "1" "October 2018" "hushd v1.0.13-72e2e60" "User Commands" .SH NAME -hushd \- manual page for hushd v1.0.14-a0d4aef +hushd \- manual page for hushd v1.0.13-72e2e60 .SH DESCRIPTION -Hush Daemon version v1.0.14\-a0d4aef +Hush Daemon version v1.0.13 .PP In order to ensure you are adequately protecting your privacy when using Hush, please see . @@ -54,7 +54,7 @@ Specify data directory \fB\-disabledeprecation=\fR .IP Disable block\-height node deprecation and automatic shutdown (example: -\fB\-disabledeprecation\fR=\fI\,1\/\fR.0.14) +\fB\-disabledeprecation\fR=\fI\,1\/\fR.0.13) .HP \fB\-exportdir=\fR .IP @@ -79,7 +79,7 @@ mempool will accept (default: 0 = no limit applied) .HP \fB\-par=\fR .IP -Set the number of script verification threads (\fB\-2\fR to 16, 0 = auto, <0 = +Set the number of script verification threads (\fB\-4\fR to 16, 0 = auto, <0 = leave that many cores free, default: 0) .HP \fB\-pid=\fR From d9b4ba02f5a540245015bbc360270b2569e0471b Mon Sep 17 00:00:00 2001 From: Jonathan Duke Leto Date: Sat, 6 Oct 2018 15:46:36 +0200 Subject: [PATCH 09/19] Remove gsed hack and update man pages to say 2.0.0 --- contrib/devtools/gen-manpages.sh | 1 - doc/man/hush-cli.1 | 14 +++++++------- doc/man/hush-tx.1 | 14 +++++++------- doc/man/hushd.1 | 16 ++++++++-------- 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/contrib/devtools/gen-manpages.sh b/contrib/devtools/gen-manpages.sh index 69b2960fd..a03c1fd2d 100755 --- a/contrib/devtools/gen-manpages.sh +++ b/contrib/devtools/gen-manpages.sh @@ -1,5 +1,4 @@ #!/bin/sh -alias sed=gsed TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)} SRCDIR=${SRCDIR:-$TOPDIR/src} diff --git a/doc/man/hush-cli.1 b/doc/man/hush-cli.1 index 05b967786..8605c4e26 100644 --- a/doc/man/hush-cli.1 +++ b/doc/man/hush-cli.1 @@ -1,9 +1,9 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. -.TH HUSH-CLI "1" "October 2018" "hush-cli v1.0.13-72e2e60" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3. +.TH HUSH-CLI "1" "October 2018" "hush-cli v2.0.0" "User Commands" .SH NAME -hush-cli \- manual page for hush-cli v1.0.13-72e2e60 +hush-cli \- manual page for hush-cli v2.0.0 .SH DESCRIPTION -Hush RPC client version v1.0.13 +Hush RPC client version v2.0.0 .PP In order to ensure you are adequately protecting your privacy when using Hush, please see . @@ -70,9 +70,9 @@ Timeout in seconds during HTTP requests, or 0 for no timeout. (default: In order to ensure you are adequately protecting your privacy when using Hush, please see . -Copyright (C) 2009-2017 The Bitcoin Core Developers -Copyright (C) 2015-2017 The Zcash Developers -Copyright (C) 2016-2017 The Hush Developers +Copyright (C) 2009-2018 The Bitcoin Core Developers +Copyright (C) 2015-2018 The Zcash Developers +Copyright (C) 2016-2018 The Hush Developers This is experimental software. diff --git a/doc/man/hush-tx.1 b/doc/man/hush-tx.1 index ae75d0e68..555151b10 100644 --- a/doc/man/hush-tx.1 +++ b/doc/man/hush-tx.1 @@ -1,9 +1,9 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. -.TH HUSH-TX "1" "October 2018" "hush-tx v1.0.13-72e2e60" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3. +.TH HUSH-TX "1" "October 2018" "hush-tx v2.0.0" "User Commands" .SH NAME -hush-tx \- manual page for hush-tx v1.0.13-72e2e60 +hush-tx \- manual page for hush-tx v2.0.0 .SH DESCRIPTION -Hush hush\-tx utility version v1.0.13 +Hush hush\-tx utility version v2.0.0 .SS "Usage:" .TP hush\-tx [options] [commands] @@ -88,9 +88,9 @@ Set register NAME to given JSON\-STRING In order to ensure you are adequately protecting your privacy when using Hush, please see . -Copyright (C) 2009-2017 The Bitcoin Core Developers -Copyright (C) 2015-2017 The Zcash Developers -Copyright (C) 2016-2017 The Hush Developers +Copyright (C) 2009-2018 The Bitcoin Core Developers +Copyright (C) 2015-2018 The Zcash Developers +Copyright (C) 2016-2018 The Hush Developers This is experimental software. diff --git a/doc/man/hushd.1 b/doc/man/hushd.1 index 97038cb21..c53ecf6db 100644 --- a/doc/man/hushd.1 +++ b/doc/man/hushd.1 @@ -1,9 +1,9 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. -.TH HUSHD "1" "October 2018" "hushd v1.0.13-72e2e60" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3. +.TH HUSHD "1" "October 2018" "hushd v2.0.0" "User Commands" .SH NAME -hushd \- manual page for hushd v1.0.13-72e2e60 +hushd \- manual page for hushd v2.0.0 .SH DESCRIPTION -Hush Daemon version v1.0.13 +Hush Daemon version v2.0.0 .PP In order to ensure you are adequately protecting your privacy when using Hush, please see . @@ -54,7 +54,7 @@ Specify data directory \fB\-disabledeprecation=\fR .IP Disable block\-height node deprecation and automatic shutdown (example: -\fB\-disabledeprecation\fR=\fI\,1\/\fR.0.13) +\fB\-disabledeprecation\fR=\fI\,2\/\fR.0.0) .HP \fB\-exportdir=\fR .IP @@ -504,9 +504,9 @@ console, 600 otherwise) In order to ensure you are adequately protecting your privacy when using Hush, please see . -Copyright (C) 2009-2017 The Bitcoin Core Developers -Copyright (C) 2015-2017 The Zcash Developers -Copyright (C) 2016-2017 The Hush Developers +Copyright (C) 2009-2018 The Bitcoin Core Developers +Copyright (C) 2015-2018 The Zcash Developers +Copyright (C) 2016-2018 The Hush Developers This is experimental software. From 01a05b57a89aa6fe2ae2d5e2ed4caa7579c45095 Mon Sep 17 00:00:00 2001 From: FireMartZ Date: Sun, 7 Oct 2018 15:40:03 -0400 Subject: [PATCH 10/19] Change logs from stderr to debug.log (if 'dpow' logging is enabled) --- src/komodo_validation011.h | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/komodo_validation011.h b/src/komodo_validation011.h index d640331af..cb5a9c6d9 100644 --- a/src/komodo_validation011.h +++ b/src/komodo_validation011.h @@ -90,7 +90,7 @@ int32_t gettxout_scriptPubKey(int32_t height,uint8_t *scriptPubKey,int32_t maxsi { if ( GetTransaction(txid,tx,hashBlock,false) == 0 ) { - fprintf(stderr,"ht.%d couldnt get txid.%s !\n",height,txid.GetHex().c_str()); + LogPrint("dpow","ht.%d couldnt get txid.%s !\n",height,txid.GetHex().c_str()); return(-1); } } @@ -104,7 +104,7 @@ int32_t gettxout_scriptPubKey(int32_t height,uint8_t *scriptPubKey,int32_t maxsi { const CWalletTx& wtx = it->second; tx = *wtx.tx; - fprintf(stderr,"found tx in wallet\n"); + LogPrint("dpow","found tx in wallet\n"); } } } @@ -117,11 +117,11 @@ int32_t gettxout_scriptPubKey(int32_t height,uint8_t *scriptPubKey,int32_t maxsi for (i=0; i voutsize.%d\n",height,n,(int32_t)tx.vout.size()); + LogPrint("dpow","gettxout_scriptPubKey ht.%d n.%d > voutsize.%d\n",height,n,(int32_t)tx.vout.size()); return(-1); } @@ -578,9 +578,9 @@ CBlockIndex *komodo_chainactive(int32_t height) { if ( height <= tipindex->nHeight ) return(chainActive[height]); - else fprintf(stderr,"komodo_chainactive height %d > active.%d\n",height,chainActive.Tip()->nHeight); + else LogPrint("dpow","komodo_chainactive height %d > active.%d\n",height,chainActive.Tip()->nHeight); } - fprintf(stderr,"komodo_chainactive null chainActive.Tip() height %d\n",height); + LogPrint("dpow","komodo_chainactive null chainActive.Tip() height %d\n",height); return(0); } @@ -589,7 +589,7 @@ uint32_t komodo_heightstamp(int32_t height) CBlockIndex *ptr; if ( height > 0 && (ptr= komodo_chainactive(height)) != 0 ) return(ptr->nTime); - else fprintf(stderr,"komodo_heightstamp null ptr for block.%d\n",height); + else LogPrint("dpow","komodo_heightstamp null ptr for block.%d\n",height); return(0); } @@ -766,7 +766,7 @@ void komodo_importpubkeys() } } if ( dispflag != 0 ) - fprintf(stderr,"%d Notary pubkeys imported\n",dispflag); + LogPrint("dpow","%d Notary pubkeys imported\n",dispflag); } int32_t komodo_init() @@ -847,7 +847,7 @@ int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestam } memcpy(pubkeys,elected_pubkeys0,n0 * 33); if ( ASSETCHAINS_SYMBOL[0] != 0 ) - fprintf(stderr,"%s height.%d t.%u elected.%d notaries\n",ASSETCHAINS_SYMBOL,height,timestamp,n0); + LogPrint("dpow","%s height.%d t.%u elected.%d notaries\n",ASSETCHAINS_SYMBOL,height,timestamp,n0); return(n0); } else //if ( (timestamp != 0 && timestamp <= KOMODO_NOTARIES_TIMESTAMP2) || height <= KOMODO_NOTARIES_HEIGHT2 ) @@ -858,7 +858,7 @@ int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestam for (i=0; inHeight <= NOTARIZED_HEIGHT ) { - fprintf(stderr,"komodo_disconnect unexpected reorg pindex->nHeight.%d vs %d\n",(int32_t)pindex->nHeight,NOTARIZED_HEIGHT); + LogPrint("dpow","komodo_disconnect unexpected reorg pindex->nHeight.%d vs %d\n",(int32_t)pindex->nHeight,NOTARIZED_HEIGHT); komodo_clearstate(); // bruteforce shortcut. on any reorg, no active notarization until next one is seen } } @@ -987,7 +987,7 @@ int32_t komodo_notarizeddata(int32_t nHeight,uint256 *notarized_hashp,uint256 *n if ( np != 0 ) { if ( np->nHeight >= nHeight || (i < NUM_NPOINTS && np[1].nHeight < nHeight) ) - fprintf(stderr,"warning: flag.%d i.%d np->ht %d [1].ht %d >= nHeight.%d\n",flag,i,np->nHeight,np[1].nHeight,nHeight); + LogPrint("dpow","warning: flag.%d i.%d np->ht %d [1].ht %d >= nHeight.%d\n",flag,i,np->nHeight,np[1].nHeight,nHeight); *notarized_hashp = np->notarized_hash; *notarized_desttxidp = np->notarized_desttxid; return(np->notarized_height); @@ -1103,17 +1103,17 @@ int32_t komodo_checkpoint(int32_t *notarized_heightp,int32_t nHeight,uint256 has { if ( nHeight < notarized_height ) { - fprintf(stderr,"nHeight.%d < NOTARIZED_HEIGHT.%d\n",nHeight,notarized_height); + LogPrint("dpow","nHeight.%d < NOTARIZED_HEIGHT.%d\n",nHeight,notarized_height); return(-1); } else if ( nHeight == notarized_height && memcmp(&hash,¬arized_hash,sizeof(hash)) != 0 ) { - fprintf(stderr,"nHeight.%d == NOTARIZED_HEIGHT.%d, diff hash\n",nHeight,notarized_height); + LogPrint("dpow","nHeight.%d == NOTARIZED_HEIGHT.%d, diff hash\n",nHeight,notarized_height); return(-1); } - } else fprintf(stderr,"unexpected error notary_hash %s ht.%d at ht.%d\n",notarized_hash.ToString().c_str(),notarized_height,notary->nHeight); + } else LogPrint("dpow","unexpected error notary_hash %s ht.%d at ht.%d\n",notarized_hash.ToString().c_str(),notarized_height,notary->nHeight); } else if ( notarized_height > 0 ) - fprintf(stderr,"%s couldnt find notarized.(%s %d) ht.%d\n",ASSETCHAINS_SYMBOL,notarized_hash.ToString().c_str(),notarized_height,pindex->nHeight); + LogPrint("dpow","%s couldnt find notarized.(%s %d) ht.%d\n",ASSETCHAINS_SYMBOL,notarized_hash.ToString().c_str(),notarized_height,pindex->nHeight); return(0); } @@ -1223,7 +1223,7 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) } } } else if ( block.vtx[i].vin[j].prevout.hash != zero ) { - fprintf(stderr,"%s cant get scriptPubKey for ht.%d txi.%d vin.%d\n",ASSETCHAINS_SYMBOL,height,i,j); + LogPrint("dpow","%s cant get scriptPubKey for ht.%d txi.%d vin.%d\n",ASSETCHAINS_SYMBOL,height,i,j); } } @@ -1249,6 +1249,6 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) printf("%s ht.%d\n",ASSETCHAINS_SYMBOL,height); LogPrintf("dpow: [%s] ht.%d txi.%d signedmask.%llx numvins.%d numvouts.%d notarized.%d special.%d\n",ASSETCHAINS_SYMBOL,height,i,(long long)signedmask,numvins,numvouts,notarized,specialtx); } - } else fprintf(stderr,"komodo_connectblock: unexpected null pindex\n"); + } else LogPrint("dpow","komodo_connectblock: unexpected null pindex\n"); } From eb2c570489ba2aef5b3d4a88afd2a94e66321e3a Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Sun, 7 Oct 2018 21:51:52 +0200 Subject: [PATCH 11/19] Fix coredump on txindex=0 nodes --- src/komodo_validation011.h | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/komodo_validation011.h b/src/komodo_validation011.h index d640331af..e1aa8cd3a 100644 --- a/src/komodo_validation011.h +++ b/src/komodo_validation011.h @@ -96,16 +96,10 @@ int32_t gettxout_scriptPubKey(int32_t height,uint8_t *scriptPubKey,int32_t maxsi } else { - CWallet * const pwallet = vpwallets[0]; - if ( pwallet != 0 ) + if ( GetTransaction(txid,tx,hashBlock,true) == 0 ) { - auto it = pwallet->mapWallet.find(txid); - if ( it != pwallet->mapWallet.end() ) - { - const CWalletTx& wtx = it->second; - tx = *wtx.tx; - fprintf(stderr,"found tx in wallet\n"); - } + fprintf(stderr,"ht.%d couldnt get txid.%s !\n",height,txid.GetHex().c_str()); + return(-1); } } @@ -1223,9 +1217,9 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) } } } else if ( block.vtx[i].vin[j].prevout.hash != zero ) { - fprintf(stderr,"%s cant get scriptPubKey for ht.%d txi.%d vin.%d\n",ASSETCHAINS_SYMBOL,height,i,j); + //if (IS_NOTARY) + // fprintf(stderr,"%s cant get scriptPubKey for ht.%d txi.%d vin.%d\n",ASSETCHAINS_SYMBOL,height,i,j); } - } numvalid = bitweight(signedmask); if ( numvalid >= KOMODO_MINRATIFY ) From 217f2084f66cb5959df1e8c1631248d6692ba8e4 Mon Sep 17 00:00:00 2001 From: FireMartZ Date: Sun, 7 Oct 2018 18:43:41 -0400 Subject: [PATCH 12/19] Update proton download path. --- depends/packages/proton.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/depends/packages/proton.mk b/depends/packages/proton.mk index aa49f380f..39428f54b 100644 --- a/depends/packages/proton.mk +++ b/depends/packages/proton.mk @@ -1,6 +1,6 @@ package=proton $(package)_version=0.17.0 -$(package)_download_path=http://apache.cs.utah.edu/qpid/proton/$($(package)_version) +$(package)_download_path=https://archive.apache.org/dist/qpid/proton/$($(package)_version) $(package)_file_name=qpid-proton-$($(package)_version).tar.gz $(package)_sha256_hash=6ffd26d3d0e495bfdb5d9fefc5349954e6105ea18cc4bb191161d27742c5a01a $(package)_patches=minimal-build.patch @@ -21,4 +21,3 @@ endef define $(package)_stage_cmds cd build; $(MAKE) VERBOSE=1 DESTDIR=$($(package)_staging_prefix_dir) install endef - From f55e417bc51c4101ac8ce317acca5e36eca18fa9 Mon Sep 17 00:00:00 2001 From: FireMartZ Date: Sun, 7 Oct 2018 21:48:19 -0400 Subject: [PATCH 13/19] Update rust package. --- depends/packages/rust.mk | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/depends/packages/rust.mk b/depends/packages/rust.mk index 3647e61ce..742fe477f 100644 --- a/depends/packages/rust.mk +++ b/depends/packages/rust.mk @@ -1,11 +1,40 @@ package=rust -$(package)_version=1.16.0 +$(package)_version=1.28.0 $(package)_download_path=https://static.rust-lang.org/dist -$(package)_file_name=rust-$($(package)_version)-x86_64-unknown-linux-gnu.tar.gz -$(package)_sha256_hash=48621912c242753ba37cad5145df375eeba41c81079df46f93ffb4896542e8fd +$(package)_file_name_linux=rust-$($(package)_version)-x86_64-unknown-linux-gnu.tar.gz +$(package)_sha256_hash_linux=2a1390340db1d24a9498036884e6b2748e9b4b057fc5219694e298bdaa37b810 $(package)_file_name_darwin=rust-$($(package)_version)-x86_64-apple-darwin.tar.gz -$(package)_sha256_hash_darwin=2d08259ee038d3a2c77a93f1a31fc59e7a1d6d1bbfcba3dba3c8213b2e5d1926 +$(package)_sha256_hash_darwin=5d7a70ed4701fe9410041c1eea025c95cad97e5b3d8acc46426f9ac4f9f02393 +$(package)_file_name_mingw32=rust-$($(package)_version)-x86_64-pc-windows-gnu.tar.gz +$(package)_sha256_hash_mingw32=55c07426f791c51c8a2b6934b35784175c4abb4e03f123f3e847109c4dc1ad8b + +ifeq ($(host_os),mingw32) +$(package)_build_subdir=buildos +$(package)_extra_sources = $($(package)_file_name_$(build_os)) + +define $(package)_fetch_cmds +$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \ +$(call fetch_file,$(package),$($(package)_download_path),$($(package)_file_name_$(build_os)),$($(package)_file_name_$(build_os)),$($(package)_sha256_hash_$(build_os))) +endef + +define $(package)_extract_cmds + mkdir -p $($(package)_extract_dir) && \ + echo "$($(package)_sha256_hash) $($(package)_source)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \ + echo "$($(package)_sha256_hash_$(build_os)) $($(package)_source_dir)/$($(package)_file_name_$(build_os))" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \ + $(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \ + mkdir mingw32 && \ + tar --strip-components=1 -xf $($(package)_source) -C mingw32 && \ + mkdir buildos && \ + tar --strip-components=1 -xf $($(package)_source_dir)/$($(package)_file_name_$(build_os)) -C buildos +endef + +define $(package)_stage_cmds + ./install.sh --destdir=$($(package)_staging_dir) --prefix=$(host_prefix)/native --disable-ldconfig && \ + cp -r ../mingw32/rust-std-x86_64-pc-windows-gnu/lib/rustlib/x86_64-pc-windows-gnu $($(package)_staging_dir)$(host_prefix)/native/lib/rustlib +endef +else define $(package)_stage_cmds ./install.sh --destdir=$($(package)_staging_dir) --prefix=$(host_prefix)/native --disable-ldconfig endef +endif \ No newline at end of file From cae75b122cfd47e2f2a202beb8a99da7c3d9a6a1 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 8 Oct 2018 06:42:36 +0200 Subject: [PATCH 14/19] Organize install instructions and clarify some stuff --- INSTALL.md | 73 ++++++++++++------------------------------------------ 1 file changed, 16 insertions(+), 57 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index a8387e925..b942a5a8a 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,40 +1,22 @@ # Installing Hush -## Linux Install with Windows via VirtualBox -VirtualBox 5.2.8 (released February 27 2018) -https://www.virtualbox.org/wiki/Download_Old_Builds_5_2 - -Or click below for direct download -https://download.virtualbox.org/virtualbox/5.2.8/VirtualBox-5.2.8-121009-Win.exe - -Ubuntu Install -Download Ubuntu 16.04.4 LTS (Xenial Xerus) from your favorite mirror, or find it below. -http://www.gtlib.gatech.edu/pub/ubuntu-releases/xenial/ - -Or click below for direct download -http://www.gtlib.gatech.edu/pub/ubuntu-releases/xenial/ubuntu-16.04.4-desktop-amd64.iso - -Set up VirtualBox to install from Ubuntu ISO, 4 Gigs of RAM and 20 GB of storage will work. - ---- +## Download and Install Hush v1.0.13 Stable Release -## Linux Install with VPS (<$3/month) -Ubuntu 16.04 VPS with CPU: 1 vCore, RAM: 512 MB, Storage: and 20 GB SSD will work. +This method can be used to install release packages: -Create a new username, just replace "CREATE_NEW_USERNAME" with a new name. ```sh -adduser CREATE_NEW_USERNAME && adduser CREATE_NEW_USERNAME sudo +cd ~ +sudo wget https://github.com/MyHush/hush/releases/download/v1.0.13/hush-1.0.13-afad8af-amd64.deb +sudo dpkg -i hush-1.0.13-afad8af-amd64.deb ``` -Reboot and log in as new user ---- +To install Hush from source, read on. -## Update Ubuntu +## Build HUSH dependencies -After installation is complete open terminal and do an update. -```sh -sudo apt-get update && sudo apt-get upgrade -y -``` +The following build process generally applies to Ubuntu (and similar) Linux +distributions. For best results it is recommended to use Ubuntu Linux 16.04 +or later. ## Swap Space (Optional) You will need at least 4GB of RAM to build hush from git source, OR you can @@ -47,28 +29,7 @@ sudo mkswap /swapfile sudo swapon /swapfile ``` -Now make the swap work better. Add a line to sysctl.conf -```sh -sudo nano /etc/sysctl.conf -``` -add to last line of file: -``` -vm.swappiness=10 -``` - -Then make it so the swap gets mounted when the server reboots. Edit the fstab file -```sh -sudo nano /etc/fstab -``` -add to last line of file: -``` -/swapfile none swap sw 0 0 -``` - -## Build HUSH dependencies -The following build process generally applies to Ubuntu (and similar) Linux -distributions. For best results it is recommended to use Ubuntu Linux 16.04 -or later. +To install build depedencies: ```sh sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib \ @@ -76,12 +37,6 @@ sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib \ bsdmainutils automake curl unzip nano ``` -## Download and Install Hush v1.0.13 Stable Release -```sh -cd ~ -sudo wget https://github.com/MyHush/hush/releases/download/v1.0.13/hush-1.0.13-afad8af-amd64.deb -sudo dpkg -i hush-1.0.13-afad8af-amd64.deb -``` ## Download proving key ```sh @@ -89,6 +44,9 @@ sudo dpkg -i hush-1.0.13-afad8af-amd64.deb ``` ## Create a HUSH configuration file (*important*): + +You can compile Hush without this, but need a config file to run hushd. + ```sh mkdir -p ~/.hush echo "rpcuser=username" >> ~/.hush/hush.conf @@ -101,7 +59,8 @@ echo "addnode=dnsseed.hush.quebec" >> ~/.hush/hush.conf ``` ## Run a HUSH Node -```ssh + +```sh ./hushd ``` From 343ee57c9021e184a3e1e0f4b478a4f898ce835f Mon Sep 17 00:00:00 2001 From: FireMartZ Date: Mon, 8 Oct 2018 12:49:27 -0400 Subject: [PATCH 15/19] Update INSTALL.md --- INSTALL.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index fc75e32a5..cfd3edb25 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -29,16 +29,22 @@ sudo mkswap /swapfile sudo swapon /swapfile ``` -To install build depedencies: +## Build on Linux: + ```sh +# install build depedencies sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib \ autoconf libtool ncurses-dev unzip git python zlib1g-dev wget \ bsdmainutils automake curl unzip nano +# pull +git clone https://github.com/MyHush/hush.git +cd hush +# Build +./zcutil/build.sh -j$(nproc) ``` - -## Download proving key +## Download proving key: ```sh ./zcutil/fetch-params.sh ``` From d9102073b45dda01706f1e44d3f567fae6721b3c Mon Sep 17 00:00:00 2001 From: FireMartZ Date: Mon, 8 Oct 2018 17:31:38 -0400 Subject: [PATCH 16/19] Update debian package filename. --- INSTALL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index cfd3edb25..0e1d799a7 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -6,8 +6,8 @@ This method can be used to install release packages: ```sh cd ~ -sudo wget https://github.com/MyHush/hush/releases/download/v2.0.0/hush-2.0.0-b4f1a4ce-amd64.deb -sudo dpkg -i hush-2.0.0-b4f1a4ce-amd64.deb +sudo wget https://github.com/MyHush/hush/releases/download/v2.0.0/hush-2.0.0-c7d6ba61-amd64.deb +sudo dpkg -i hush-2.0.0-c7d6ba61-amd64.deb ``` To install Hush from source, read on. From 21739aad768c8e960090d8e5645e9e898c88964d Mon Sep 17 00:00:00 2001 From: FireMartZ Date: Mon, 8 Oct 2018 21:37:00 -0400 Subject: [PATCH 17/19] Update HUSH wallet link. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 746c2be5f..9be86dd2a 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ The section of using the command line is relevant to HUSH. ### Not content with command line use of HUSH? -A [HUSH GUI Wallet](https://github.com/MyHush/hush-swing-wallet-ui/releases/tag/v0.71.2-beta) +A [HUSH GUI Wallet](https://github.com/MyHush/hush-swing-wallet-ui/releases) License ------- From f25acdf47bed346e65b7d7fd88233f1943e7ba07 Mon Sep 17 00:00:00 2001 From: FireMartZ Date: Mon, 8 Oct 2018 21:45:18 -0400 Subject: [PATCH 18/19] Move dpow print outs from stdout to debug log file. --- src/komodo_validation011.h | 44 +++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/komodo_validation011.h b/src/komodo_validation011.h index a50e5728e..169963340 100644 --- a/src/komodo_validation011.h +++ b/src/komodo_validation011.h @@ -142,7 +142,7 @@ int32_t komodo_importaddress(std::string addr) return(1); } } - printf("%s -> komodo_importaddress failed valid.%d\n",addr.c_str(),address.IsValid()); + LogPrint("dpow","%s -> komodo_importaddress failed valid.%d\n",addr.c_str(),address.IsValid()); } return(-1); } @@ -514,7 +514,7 @@ int32_t decode_hex(uint8_t *bytes,int32_t n,char *hex) if ( n > 0 ) { bytes[0] = unhex(hex[0]); - printf("decode_hex n.%d hex[0] (%c) -> %d hex.(%s) [n*2+1: %d] [n*2: %d %c] len.%ld\n",n,hex[0],bytes[0],hex,hex[n*2+1],hex[n*2],hex[n*2],(long)strlen(hex)); + LogPrint("dpow","decode_hex n.%d hex[0] (%c) -> %d hex.(%s) [n*2+1: %d] [n*2: %d %c] len.%ld\n",n,hex[0],bytes[0],hex,hex[n*2+1],hex[n*2],hex[n*2],(long)strlen(hex)); } bytes++; hex++; @@ -754,7 +754,7 @@ void komodo_importpubkeys() //fprintf(stderr,"pubkey=%s, addr=%s\n", pubkey, addr.c_str() ); if ( (val= komodo_importaddress(addr)) < 0 ) - LogPrintf("dpow: error importing (%s)\n",addr.c_str()); + LogPrint("dpow","dpow: error importing (%s)\n",addr.c_str()); else if ( val == 0 ) dispflag++; } @@ -954,7 +954,7 @@ int32_t komodo_notarizeddata(int32_t nHeight,uint256 *notarized_hashp,uint256 *n { if ( NPOINTS[i].nHeight >= nHeight ) { - LogPrintf("dpow: flag.1 i.%d np->ht %d [%d].ht %d >= nHeight.%d, last.%d num.%d\n",i,np->nHeight,i,NPOINTS[i].nHeight,nHeight,last_NPOINTSi,NUM_NPOINTS); + LogPrint("dpow","dpow: flag.1 i.%d np->ht %d [%d].ht %d >= nHeight.%d, last.%d num.%d\n",i,np->nHeight,i,NPOINTS[i].nHeight,nHeight,last_NPOINTSi,NUM_NPOINTS); flag = 1; break; } @@ -1007,7 +1007,7 @@ void komodo_notarized_update(int32_t nHeight,int32_t notarized_height,uint256 no sep = "/"; #endif sprintf(fname,"%s%snotarizations%s",GetDefaultDataDir().string().c_str(), sep.c_str(), suffix.c_str()); - LogPrintf("dpow: fname.(%s)\n",fname); + LogPrint("dpow","dpow: fname.(%s)\n",fname); if ( (fp= fopen(fname,"rb+")) == 0 ) fp = fopen(fname,"wb+"); else @@ -1030,12 +1030,12 @@ void komodo_notarized_update(int32_t nHeight,int32_t notarized_height,uint256 no NOTARIZED_MOMDEPTH = np->MoMdepth; //fprintf(stderr,"%d ",np->notarized_height); fpos = ftell(fp); - } else LogPrintf("dpow: %s error with notarization ht.%d %s\n",ASSETCHAINS_SYMBOL,N.notarized_height,pindex->GetBlockHash().ToString().c_str()); + } else LogPrint("dpow","dpow: %s error with notarization ht.%d %s\n",ASSETCHAINS_SYMBOL,N.notarized_height,pindex->GetBlockHash().ToString().c_str()); } if ( ftell(fp) != fpos ) fseek(fp,fpos,SEEK_SET); } - LogPrintf("dpow: finished loading %s [pubkey %s]\n",fname,NOTARY_PUBKEY.c_str()); + LogPrint("dpow","dpow: finished loading %s [pubkey %s]\n",fname,NOTARY_PUBKEY.c_str()); didinit = 1; } if ( notarized_height == 0 ) @@ -1045,16 +1045,16 @@ void komodo_notarized_update(int32_t nHeight,int32_t notarized_height,uint256 no } if ( notarized_height >= nHeight ) { - LogPrintf("dpow: komodo_notarized_update REJECT notarized_height %d > %d nHeight\n",notarized_height,nHeight); + LogPrint("dpow","dpow: komodo_notarized_update REJECT notarized_height %d > %d nHeight\n",notarized_height,nHeight); return; } pindex = komodo_chainactive(notarized_height); if ( pindex == 0 || pindex->GetBlockHash() != notarized_hash || notarized_height != pindex->nHeight ) { - LogPrintf("dpow: komodo_notarized_update reject nHeight.%d notarized_height.%d:%d\n",nHeight,notarized_height,(int32_t)pindex->nHeight); + LogPrint("dpow","dpow: komodo_notarized_update reject nHeight.%d notarized_height.%d:%d\n",nHeight,notarized_height,(int32_t)pindex->nHeight); return; } - LogPrintf("dpow: komodo_notarized_update nHeight.%d notarized_height.%d prev.%d\n",nHeight,notarized_height,NPOINTS!=0?NPOINTS[NUM_NPOINTS-1].notarized_height:-1); + LogPrint("dpow","dpow: komodo_notarized_update nHeight.%d notarized_height.%d prev.%d\n",nHeight,notarized_height,NPOINTS!=0?NPOINTS[NUM_NPOINTS-1].notarized_height:-1); portable_mutex_lock(&komodo_mutex); NPOINTS = (struct notarized_checkpoint *)realloc(NPOINTS,(NUM_NPOINTS+1) * sizeof(*NPOINTS)); np = &NPOINTS[NUM_NPOINTS++]; @@ -1073,7 +1073,7 @@ void komodo_notarized_update(int32_t nHeight,int32_t notarized_height,uint256 no { if ( fwrite(np,1,sizeof(*np),fp) == sizeof(*np) ) fflush(fp); - else LogPrintf("dpow: error writing notarization to %d\n",(int32_t)ftell(fp)); + else LogPrint("dpow","dpow: error writing notarization to %d\n",(int32_t)ftell(fp)); } // add to stored notarizations portable_mutex_unlock(&komodo_mutex); @@ -1092,7 +1092,7 @@ int32_t komodo_checkpoint(int32_t *notarized_heightp,int32_t nHeight,uint256 has { notary = mapBlockIndex[notarized_hash]; if ( IS_NOTARY ) - printf("nHeight.%d -> (%d %s)\n",pindex->nHeight,notarized_height,notarized_hash.ToString().c_str()); + LogPrint("dpow","nHeight.%d -> (%d %s)\n",pindex->nHeight,notarized_height,notarized_hash.ToString().c_str()); if ( notary->nHeight == notarized_height ) // if notarized_hash not in chain, reorg { if ( nHeight < notarized_height ) @@ -1132,7 +1132,7 @@ void komodo_voutupdate(int32_t txi,int32_t vout,uint8_t *scriptbuf,int32_t scrip opretlen = scriptbuf[len++]; opretlen += (scriptbuf[len++] << 8); } - printf("opretlen.%d vout.%d [%s].(%s)\n",opretlen,vout,(char *)&scriptbuf[len+32*2+4],ASSETCHAINS_SYMBOL); + LogPrint("dpow","opretlen.%d vout.%d [%s].(%s)\n",opretlen,vout,(char *)&scriptbuf[len+32*2+4],ASSETCHAINS_SYMBOL); if ( vout == 1 && opretlen-3 >= 32*2+4 && strcmp(ASSETCHAINS_SYMBOL,(char *)&scriptbuf[len+32*2+4]) == 0 ) { len += iguana_rwbignum(0,&scriptbuf[len],32,(uint8_t *)&hash); @@ -1158,12 +1158,12 @@ void komodo_voutupdate(int32_t txi,int32_t vout,uint8_t *scriptbuf,int32_t scrip } else { - LogPrintf("dpow: VALID %s MoM.%s [%d]\n",ASSETCHAINS_SYMBOL,MoM.ToString().c_str(),MoMdepth); + LogPrint("dpow","dpow: VALID %s MoM.%s [%d]\n",ASSETCHAINS_SYMBOL,MoM.ToString().c_str(),MoMdepth); } } komodo_notarized_update(height,*notarizedheightp,hash,desttxid,MoM,MoMdepth); - LogPrintf("dpow: %s ht.%d NOTARIZED.%d %s %sTXID.%s lens.(%d %d)\n",ASSETCHAINS_SYMBOL,height,*notarizedheightp,hash.ToString().c_str(),"KMD",desttxid.ToString().c_str(),opretlen,len); - } else LogPrintf("dpow: notarized.%d ht %d vs prev %d vs height.%d\n",notarized,*notarizedheightp,NOTARIZED_HEIGHT,height); + LogPrint("dpow","dpow: %s ht.%d NOTARIZED.%d %s %sTXID.%s lens.(%d %d)\n",ASSETCHAINS_SYMBOL,height,*notarizedheightp,hash.ToString().c_str(),"KMD",desttxid.ToString().c_str(),opretlen,len); + } else LogPrint("dpow","dpow: notarized.%d ht %d vs prev %d vs height.%d\n",notarized,*notarizedheightp,NOTARIZED_HEIGHT,height); } } } @@ -1187,7 +1187,7 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) else { if ( pindex->nHeight != hwmheight ) - LogPrintf("dpow: %s hwmheight.%d vs pindex->nHeight.%d t.%u reorg.%d\n",ASSETCHAINS_SYMBOL,hwmheight,pindex->nHeight,(uint32_t)pindex->nTime,hwmheight-pindex->nHeight); + LogPrint("dpow","dpow: %s hwmheight.%d vs pindex->nHeight.%d t.%u reorg.%d\n",ASSETCHAINS_SYMBOL,hwmheight,pindex->nHeight,(uint32_t)pindex->nTime,hwmheight-pindex->nHeight); } if ( pindex != 0 ) @@ -1225,11 +1225,11 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) if ( numvalid >= KOMODO_MINRATIFY ) notarized = 1; if ( IS_NOTARY ) - printf("(tx.%d: ",i); + LogPrint("dpow","(tx.%d: ",i); for (j=0; j= (int32_t)sizeof(uint32_t) && len <= (int32_t)sizeof(scriptbuf) ) { @@ -1238,10 +1238,10 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) } } if ( NOTARY_PUBKEY33[0] != 0 ) - printf(") "); + LogPrint("dpow",") "); if ( NOTARY_PUBKEY33[0] != 0 ) - printf("%s ht.%d\n",ASSETCHAINS_SYMBOL,height); - LogPrintf("dpow: [%s] ht.%d txi.%d signedmask.%llx numvins.%d numvouts.%d notarized.%d special.%d\n",ASSETCHAINS_SYMBOL,height,i,(long long)signedmask,numvins,numvouts,notarized,specialtx); + LogPrint("dpow","%s ht.%d\n",ASSETCHAINS_SYMBOL,height); + LogPrint("dpow","dpow: [%s] ht.%d txi.%d signedmask.%llx numvins.%d numvouts.%d notarized.%d special.%d\n",ASSETCHAINS_SYMBOL,height,i,(long long)signedmask,numvins,numvouts,notarized,specialtx); } } else LogPrint("dpow","komodo_connectblock: unexpected null pindex\n"); From 24d581ff8afda6d816c14dbf3164f2900d043d24 Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 9 Oct 2018 20:59:43 -0400 Subject: [PATCH 19/19] Define HAVE_CONFIG_H to windres to fetch version from config/bitcoin-config.h Fixes #150 --- src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index 369b1d54b..731172124 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -613,7 +613,7 @@ clean-local: .rc.o: @test -f $(WINDRES) - $(AM_V_GEN) $(WINDRES) -DWINDRES_PREPROC -i $< -o $@ + $(AM_V_GEN) $(WINDRES) -DWINDRES_PREPROC -DHAVE_CONFIG_H -i $< -o $@ .mm.o: $(AM_V_CXX) $(OBJCXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \