From 48159bd650ff8af1cdf9ef73c1ff07e48001b81b Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 8 Feb 2021 08:56:10 -0500 Subject: [PATCH 01/20] Update network RPC docs --- src/rpc/net.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp index 49498bc93..46c3cf24d 100644 --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -1,8 +1,7 @@ // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2020 The Hush developers +// Copyright (c) 2016-2021 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html - /****************************************************************************** * Copyright © 2014-2019 The SuperNET Developers. * * * @@ -241,8 +240,8 @@ UniValue addnode(const UniValue& params, bool fHelp, const CPubKey& mypk) "1. \"node\" (string, required) The node (see getpeerinfo for nodes)\n" "2. \"command\" (string, required) 'add' to add a node to the list, 'remove' to remove a node from the list, 'onetry' to try a connection to the node once\n" "\nExamples:\n" - + HelpExampleCli("addnode", "\"192.168.0.6:8233\" \"onetry\"") - + HelpExampleRpc("addnode", "\"192.168.0.6:8233\", \"onetry\"") + + HelpExampleCli("addnode", "\"192.168.0.6:18030\" \"onetry\"") + + HelpExampleRpc("addnode", "\"192.168.0.6:18030\", \"onetry\"") ); string strNode = params[0].get_str(); @@ -285,8 +284,8 @@ UniValue disconnectnode(const UniValue& params, bool fHelp, const CPubKey& mypk) "\nArguments:\n" "1. \"node\" (string, required) The node (see getpeerinfo for nodes)\n" "\nExamples:\n" - + HelpExampleCli("disconnectnode", "\"192.168.0.6:8233\"") - + HelpExampleRpc("disconnectnode", "\"192.168.0.6:8233\"") + + HelpExampleCli("disconnectnode", "\"192.168.0.6:18030\"") + + HelpExampleRpc("disconnectnode", "\"192.168.0.6:18030\"") ); CNode* pNode = FindNode(params[0].get_str()); @@ -317,7 +316,7 @@ UniValue getaddednodeinfo(const UniValue& params, bool fHelp, const CPubKey& myp " \"connected\" : true|false, (boolean) If connected\n" " \"addresses\" : [\n" " {\n" - " \"address\" : \"192.168.0.201:8233\", (string) The Hush server host and port\n" + " \"address\" : \"192.168.0.201:18030\", (string) The Hush server host and port\n" " \"connected\" : \"outbound\" (string) connection, inbound or outbound\n" " }\n" " ,...\n" From b8701726714467de151047f555290062ed631205 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 8 Feb 2021 11:44:32 -0500 Subject: [PATCH 02/20] bump ver and copyright year --- configure.ac | 2 +- src/clientversion.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 5f62a6e5e..3156d09e7 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 3) define(_CLIENT_VERSION_MINOR, 6) -define(_CLIENT_VERSION_REVISION, 1) +define(_CLIENT_VERSION_REVISION, 2) 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/src/clientversion.h b/src/clientversion.h index f7aeedc3f..98075253d 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -26,11 +26,11 @@ // client versioning and copyright year //! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it -// Must be kept in sync with configure.ac ! +// Must be kept in sync with configure.ac , ugh! #define CLIENT_VERSION_MAJOR 3 #define CLIENT_VERSION_MINOR 6 -#define CLIENT_VERSION_REVISION 1 -#define CLIENT_VERSION_BUILD 25 +#define CLIENT_VERSION_REVISION 2 +#define CLIENT_VERSION_BUILD 50 //! Set to true for release, false for prerelease or test build #define CLIENT_VERSION_IS_RELEASE true @@ -39,7 +39,7 @@ * Copyright year (2009-this) * Todo: update this when changing our copyright comments in the source */ -#define COPYRIGHT_YEAR 2020 +#define COPYRIGHT_YEAR 2021 #endif //HAVE_CONFIG_H From 9dc5e4e0e489e35a33a27fec02597bd402739003 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 8 Feb 2021 12:10:25 -0500 Subject: [PATCH 03/20] Default to using contrib asmap if -asmap CLI arg is specified with no argument --- src/init.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 0c1937b88..5cdf214d7 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -122,7 +122,7 @@ enum BindFlags { static const char* FEE_ESTIMATES_FILENAME="fee_estimates.dat"; -static const char* DEFAULT_ASMAP_FILENAME="ip_asn.map"; +static const char* DEFAULT_ASMAP_FILENAME="asmap.dat"; CClientUIInterface uiInterface; // Declared but not defined in ui_interface.h @@ -1089,8 +1089,15 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) // Read asmap file if configured if (mapArgs.count("-asmap")) { fs::path asmap_path = fs::path(GetArg("-asmap", "")); + + char cwd[1024]; + bool ret = getcwd(cwd, sizeof(cwd)); + fs::path pwd = fs::path(cwd); + fs::path contrib = pwd / "contrib" / "asmap"; + + // if no filepath, use the default in contrib if (asmap_path.empty()) { - asmap_path = DEFAULT_ASMAP_FILENAME; + asmap_path = pwd / DEFAULT_ASMAP_FILENAME; } if (!asmap_path.is_absolute()) { asmap_path = GetDataDir() / asmap_path; @@ -1107,8 +1114,10 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) const uint256 asmap_version = SerializeHash(asmap); addrman.m_asmap = std::move(asmap); // //node.connman->SetAsmap(std::move(asmap)); LogPrintf("Using asmap version %s for IP bucketing\n", asmap_version.ToString()); + + printf("%s: asmap version=%s with %d mappings\n", __func__, asmap_version.ToString(), asmap.size()); } else { - LogPrintf("Using /16 prefix for IP bucketing\n"); + LogPrintf("Using /16 prefix for IP bucketing, but why?\n"); } if (GetBoolArg("-salvagewallet", false)) { From 25aaca12833c12eacaefe16ce7ee94b05ecb9ae4 Mon Sep 17 00:00:00 2001 From: Duke Date: Mon, 8 Feb 2021 22:04:26 -0500 Subject: [PATCH 04/20] Turn on ASN map for peer bucketing by default The -asmap CLI arg now is given data by default, the first cryptocoin that I am aware doing this. Bitcoin Core has let asmap stuff languish on branches and PRs for a very long time, and it indeed has improved, but people in the streets needs something Right Now. In Bitcoin Core, -asmap is turned off by default and additionally, it's quite annoying to generate the file to give to it, which is not included with Bitcoin Core for either licensing or drama reasons, pick one. bitcoin-asmap looks promising, but still, will not be enabled by default, if it ever is merged: https://github.com/bitcoin/bitcoin/pull/18573 In Hush, we decided to turn it ON BY DEFAULT and additionally, revolutionarily, we give users the fucking data to use the damn feature, by default, without them having to do anything. Ignorance is bliss, just like Extreme Privacy. Recently SD 1.1.1 learned to do this in it's own inimitable way, so that release supports this feature without having Hush 3.6.2. Why is ASN mapping always better than /16 (Class B) Bucketing? It's just basic math. * A /16 means 65K "buckets" that a peer can be put into * Current (Jan 2020) ASN map has 7.4M buckets That means the ASN bucketing method has over 100000 times more buckets to put peers into, which means finer-grained filtering of peers into actual logical networks intead of just IP addresses that are close. Even an old out of date ASN map will always bucket peers better than a /16, and all cryptocoins should migrate to doing this by default. The main reason for this ASN bucketing is to defend against P2P layer attacks such as the "Erebus Attack" https://erebus-attack.comp.nus.edu.sg/ --- src/hushd | 1 + src/init.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/hushd b/src/hushd index ee773e005..477477d49 100755 --- a/src/hushd +++ b/src/hushd @@ -86,6 +86,7 @@ $KMD -ac_name=$NAME \ -ac_supply=$SUPPLY \ -ac_perc=$PERC \ -clientname=$CLIENTNAME \ + -asmap \ -addnode=$NODE1 \ -addnode=$NODE2 \ -addnode=$NODE3 \ diff --git a/src/init.cpp b/src/init.cpp index 5cdf214d7..7ecfe9dbd 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1093,11 +1093,11 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) char cwd[1024]; bool ret = getcwd(cwd, sizeof(cwd)); fs::path pwd = fs::path(cwd); - fs::path contrib = pwd / "contrib" / "asmap"; + fs::path contrib = pwd / ".." / "contrib" / "asmap"; // if no filepath, use the default in contrib if (asmap_path.empty()) { - asmap_path = pwd / DEFAULT_ASMAP_FILENAME; + asmap_path = contrib / DEFAULT_ASMAP_FILENAME; } if (!asmap_path.is_absolute()) { asmap_path = GetDataDir() / asmap_path; @@ -1112,10 +1112,10 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) return false; } const uint256 asmap_version = SerializeHash(asmap); + printf("%s: asmap version=%s with %lu mappings\n", __func__, asmap_version.ToString().c_str(), asmap.size()); addrman.m_asmap = std::move(asmap); // //node.connman->SetAsmap(std::move(asmap)); LogPrintf("Using asmap version %s for IP bucketing\n", asmap_version.ToString()); - printf("%s: asmap version=%s with %d mappings\n", __func__, asmap_version.ToString(), asmap.size()); } else { LogPrintf("Using /16 prefix for IP bucketing, but why?\n"); } From f0eccfcbd5612b1779803c9c863b03f08c40cfd1 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 16 Feb 2021 08:39:31 -0500 Subject: [PATCH 05/20] Update checkpoints --- src/chainparams.cpp | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index b956ec17f..297c5ddd7 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -557,7 +557,7 @@ void *chainparams_commandline() { { boost::assign::map_list_of (0, pCurrentParams->consensus.hashGenesisBlock) - // Generated at 1600532337 via hush3 contrib/checkpoints.pl by Duke Leto + // Last updated at 1613482505 via hush3 contrib/checkpoints.pl by Duke Leto (5000, uint256S("0x000000018f8543066baa9c5f83e981749da4cb625fad02c187b4a9c4693ebd60")) (10000, uint256S("0x00000002d177d1cbfeaf7c27a2a32766ea9063d222cbcc7623dc08355b07a3ad")) (15000, uint256S("0x000000008dbfbd5d5e27d819bf2989c5658c3494608bfa1320ad0b090660cd44")) @@ -690,10 +690,36 @@ void *chainparams_commandline() { (399000, uint256S("0x0000000d6741914a85e696364cda252340747a3b47f955b99c29e8163192c4cb")) (400000, uint256S("0x00000004956ccd26d7532b6bf229777675f326523b904f4e1f40b9535a124641")) (401000, uint256S("0x0000000a974824aa14a61c3b442a15d6bdf0aaa75f5c280d94e43898ef143463")) - (402000, uint256S("0x0000000c071f67605a6764573fd6524fd90628f9ea339ff55c7a20567093251e")), - (int64_t) 1611465410, // time of last checkpointed block - (int64_t) 708317, // total txs - (double) 1540 // txs in the last day before block 402232 + (402000, uint256S("0x0000000c071f67605a6764573fd6524fd90628f9ea339ff55c7a20567093251e")) + (403000, uint256S("0x00000000532805ef6cb2c755149a7fbf8b855528fcb513942fa7f5463bfc6cc4")) + (404000, uint256S("0x00000000a2638bf8b0a48d705b117f9ce7457e6fab16b16f70c66d9a50390a53")) + (405000, uint256S("0x0000001cb3b08ce66003deb4d05182ef6f74e4e17dceaf3fd272184cbc6118a4")) + (406000, uint256S("0x0000001292e18ce355fd9c608b029cf16ef459c47503899db896ea5aebf78e34")) + (407000, uint256S("0x0000000efdeebe216c58ac94d9d9bc5aa0d772509e98a256014ecfe1002d31d3")) + (408000, uint256S("0x00000009a0d66c11cc08a8f1d96c7acbd0a97165176045421eba3bc017a42e93")) + (409000, uint256S("0x00000001df73a93028f836593d32511b047e3f4abd73fb92db02809c751457cb")) + (410000, uint256S("0x0000000306911b54cfec6f566e0b8bed99a177ed10e4cc4ca9ff855c906e4b73")) + (411000, uint256S("0x0000000b273b786e21e636c40d4c979b754e97eb3ce9e76d22b8a1901f74a46a")) + (412000, uint256S("0x0000000e850a5c492e1aa8137a721b650297bc599886167def5663abe5804315")) + (413000, uint256S("0x00000005d8c4d2404a301aa254302e70d7f74dde1661279a1f55c0009c48bc94")) + (414000, uint256S("0x000000197263852a1d5f46fa495853723393a36e9c35230c681619aeb9935bf9")) + (415000, uint256S("0x000000119792e3de106d9cd0a91bb922ca1e2717816cd3d3b350578c99985698")) + (416000, uint256S("0x00000005b112e5e5adc86b0dd453cf55038656c0fad340c3a5177923d2f4b0cd")) + (417000, uint256S("0x0000001e947478180ca348d8b6ae653727092327d592d25dbde33fd1cf4ed8cb")) + (418000, uint256S("0x00000018ea0c59fcb9ef2946f6b44eae6794da0a9fa2327258748c5ff0d1ad0d")) + (419000, uint256S("0x0000001dee9250903e8c2bea76ac144dc2dbbeca60d7041dcd5706597ddd5e38")) + (420000, uint256S("0x000000047d784123e1ac2a5b7687b72a8bcf0ff43b02d71db52f7c8f967e3179")) + (421000, uint256S("0x00000015f35a10a8baefd4f0291742f68f84ce0417491c4be3a006cb4c3959e9")) + (422000, uint256S("0x00000004f8fb248fc0e9bf3d99e5379a8e8120c18357f52eabc74553deb7b1c5")) + (423000, uint256S("0x00000010239e5fc5489d350496950b27ab5f34e3774c424a12353bba7440d78e")) + (424000, uint256S("0x0000000a43a0a4a68b2cd61d20065eea7d8a27c20d64555c8320cd4a45d769e7")) + (425000, uint256S("0x000000104d409a2b87617ad6f7638d5000b6ec8aad5f54dee6d6b13e0f7f66b3")) + (426000, uint256S("0x0000000bdddcaaa58568a7d5da4380c5735b9d9374e8e393e14303fca51e374f")) + (427000, uint256S("0x00000002195dafd6ba01b4089c55e35521fed90bf95420abdb73e9edb0c7e779")) + (428000, uint256S("0x00000002ea968e35749a7f41c52e61b0f4635384020a82282d997594b017d446")), + (int64_t) 1613427108, // time of last checkpointed block + (int64_t) 746450, // total txs + (double) 1326 // txs in the last day before block 428724 }; } else { checkpointData = //(Checkpoints::CCheckpointData) From e2e6e44ca4a54ea7cf1fadbaf7b80426380ed01d Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 16 Feb 2021 13:34:20 -0500 Subject: [PATCH 06/20] Add new -maxdebugfilesize CLI option and default to 15MB --- src/util.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/util.cpp b/src/util.cpp index 9dea639b3..1f9383907 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -846,13 +846,13 @@ void AllocateFileRange(FILE *file, unsigned int offset, unsigned int length) { void ShrinkDebugFile() { - fprintf(stderr,"Shrinking %s\n", GetDataDir().c_str() ); // Scroll debug.log if it's getting too big boost::filesystem::path pathLog = GetDataDir() / "debug.log"; FILE* file = fopen(pathLog.string().c_str(), "r"); - unsigned int MAX_DEBUG_LOG_SIZE = 100*(1024*1024); // 100MB - if (file && boost::filesystem::file_size(pathLog) > MAX_DEBUG_LOG_SIZE ) - { + int maxlogsize = GetArg("-maxdebugfilesize", 15); + unsigned int MAX_DEBUG_LOG_SIZE = maxlogsize*(1024*1024); // convert to MB + if (file && boost::filesystem::file_size(pathLog) > MAX_DEBUG_LOG_SIZE ) { + fprintf(stderr,"Shrinking %s to be at most %d bytes\n", GetDataDir().c_str(), MAX_DEBUG_LOG_SIZE ); // Restart the file with some of the end std::vector vch(200000,0); fseek(file, -((long)vch.size()), SEEK_END); @@ -865,9 +865,9 @@ void ShrinkDebugFile() fwrite(begin_ptr(vch), 1, nBytes, file); fclose(file); } - } - else if (file != NULL) + } else if (file != NULL) { fclose(file); + } } #ifdef _WIN32 From 5ac04de029f5673cb96e46bbd4960ef86d4d9c07 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sun, 21 Feb 2021 08:21:31 -0500 Subject: [PATCH 07/20] Update manpages --- contrib/devtools/gen-manpages.sh | 5 +++-- doc/man/hush-cli.1 | 6 +++--- doc/man/hush-tx.1 | 6 +++--- doc/man/hushd.1 | 10 +++++----- src/chainparams.cpp | 14 ++++++++++---- 5 files changed, 24 insertions(+), 17 deletions(-) diff --git a/contrib/devtools/gen-manpages.sh b/contrib/devtools/gen-manpages.sh index 494f8da68..4acce0959 100755 --- a/contrib/devtools/gen-manpages.sh +++ b/contrib/devtools/gen-manpages.sh @@ -12,8 +12,9 @@ HUSHTX=${HUSHTX:-$SRCDIR/hush-tx} [ ! -x $HUSHD ] && echo "$HUSHD not found or not executable." && exit 1 -HUSHVER="v3.6.1" -#HUSHVER=$(./src/hushd --version|head -n2|tail -n1|cut -d' ' -f4|cut -d- -f1) +# use this if hushd is not running +#HUSHVER="v3.6.2" +HUSHVER=$(./src/hushd --version|head -n1|cut -d' ' -f4|cut -d- -f1) # Create a footer file with copyright content. # This gets autodetected fine for hushd if --version-string is not set, diff --git a/doc/man/hush-cli.1 b/doc/man/hush-cli.1 index 53029b0f3..857dbde06 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.10. -.TH HUSH-CLI "1" "January 2021" "hush-cli v3.6.1" "User Commands" +.TH HUSH-CLI "1" "February 2021" "hush-cli v3.6.2" "User Commands" .SH NAME -hush-cli \- manual page for hush-cli v3.6.1 +hush-cli \- manual page for hush-cli v3.6.2 .SH DESCRIPTION -Hush RPC client version v3.6.1\-cf5736569\-dirty +Hush RPC client version v3.6.2\-e2e6e44ca\-dirty .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 178d7eb09..6d4ac2f11 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.10. -.TH HUSH-TX "1" "January 2021" "hush-tx v3.6.1" "User Commands" +.TH HUSH-TX "1" "February 2021" "hush-tx v3.6.2" "User Commands" .SH NAME -hush-tx \- manual page for hush-tx v3.6.1 +hush-tx \- manual page for hush-tx v3.6.2 .SH DESCRIPTION -hush\-tx utility version v3.6.1\-cf5736569\-dirty +hush\-tx utility version v3.6.2\-e2e6e44ca\-dirty .SS "Usage:" .TP hush\-tx [options] [commands] diff --git a/doc/man/hushd.1 b/doc/man/hushd.1 index 2d5e5d2e5..54780a095 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.10. -.TH HUSHD "1" "January 2021" "hushd v3.6.1" "User Commands" +.TH HUSHD "1" "February 2021" "hushd v3.6.2" "User Commands" .SH NAME -hushd \- manual page for hushd v3.6.1 +hushd \- manual page for hushd v3.6.2 .SH DESCRIPTION -Hush Daemon version v3.6.1\-cf5736569\-dirty +Hush Daemon version v3.6.2\-e2e6e44ca\-dirty .PP In order to ensure you are adequately protecting your privacy when using Hush, please see . @@ -37,7 +37,7 @@ How thorough the block verification of \fB\-checkblocks\fR is (0\-4, default: 3) .HP \fB\-clientname=\fR .IP -Full node client name, default 'MagicBean' +Full node client name, default 'GoldenSandtrout' .HP \fB\-conf=\fR .IP @@ -143,7 +143,7 @@ Add a node to connect to and attempt to keep the connection open \fB\-asmap=\fR .IP Specify asn mapping used for bucketing of the peers (default: -ip_asn.map). Relative paths will be prefixed by the net\-specific datadir +asmap.dat). Relative paths will be prefixed by the net\-specific datadir location. .HP \fB\-banscore=\fR diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 297c5ddd7..fcd23a576 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -716,10 +716,16 @@ void *chainparams_commandline() { (425000, uint256S("0x000000104d409a2b87617ad6f7638d5000b6ec8aad5f54dee6d6b13e0f7f66b3")) (426000, uint256S("0x0000000bdddcaaa58568a7d5da4380c5735b9d9374e8e393e14303fca51e374f")) (427000, uint256S("0x00000002195dafd6ba01b4089c55e35521fed90bf95420abdb73e9edb0c7e779")) - (428000, uint256S("0x00000002ea968e35749a7f41c52e61b0f4635384020a82282d997594b017d446")), - (int64_t) 1613427108, // time of last checkpointed block - (int64_t) 746450, // total txs - (double) 1326 // txs in the last day before block 428724 + (428000, uint256S("0x00000002ea968e35749a7f41c52e61b0f4635384020a82282d997594b017d446")) + (429000, uint256S("0x00000007e213a5778b3a942016a7d7576c6c141f913342a1f627417c4f334224")) + (430000, uint256S("0x0000000f827d7a004367c15c973814cc47e32287b727ebe3a4cb581703979593")) + (431000, uint256S("0x0000000d709ec810da6a2f55ff5d10bff9a5580ffe4fee8ce27abaf175cb6312")) + (432000, uint256S("0x000000007d91ea56e7e129991aa33e57224d0f898a5a46b02efb81f40aae5ed8")) + (433000, uint256S("0x00000009da7df1aad22c96ed458fa7feae1216811568fb0e9c2f09db25dee3f0")) + (434000, uint256S("0x0000001003f3460d4b0414f94e35025c76f72b8607e0ea00c7790e10172ef8e3")), + (int64_t) 1613879454, // time of last checkpointed block + (int64_t) 752357, // total txs + (double) 1187 // txs in the last day before block 434429 }; } else { checkpointData = //(Checkpoints::CCheckpointData) From 3f7d51ce60470678aef6db592d4a15faeff7af5a Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 22 Feb 2021 08:15:19 -0500 Subject: [PATCH 08/20] Add asmap.dat to Debian package --- zcutil/build-debian-package.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/zcutil/build-debian-package.sh b/zcutil/build-debian-package.sh index 629a053d4..421129702 100755 --- a/zcutil/build-debian-package.sh +++ b/zcutil/build-debian-package.sh @@ -45,6 +45,7 @@ chmod 0755 -R $BUILD_DIR/* #cp $SRC_DEB/prerm $BUILD_DIR/DEBIAN # Copy binaries. We prefix our komodod binaries with hush- to prevent conflicting with # a stock komodod or other flavors of KMD +cp $SRC_PATH/contrib/asmap/asmap.dat $DEB_SHR cp $SRC_PATH/sapling-spend.params $DEB_SHR cp $SRC_PATH/sapling-output.params $DEB_SHR cp $SRC_PATH/src/komodod $DEB_BIN/hush-komodod From 30bfc7be3a3ef05ae5482bba2d436a74c29de469 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 22 Feb 2021 08:20:32 -0500 Subject: [PATCH 09/20] Add asmap to linux binary script --- contrib/devtools/gen-linux-binary-release.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/devtools/gen-linux-binary-release.sh b/contrib/devtools/gen-linux-binary-release.sh index a8ae359cb..47bd650fc 100755 --- a/contrib/devtools/gen-linux-binary-release.sh +++ b/contrib/devtools/gen-linux-binary-release.sh @@ -1,11 +1,12 @@ #!/bin/bash -# Copyright (c) 2016-2020 The Hush developers +# Copyright (c) 2016-2021 The Hush developers # Released under the GPLv3 #TODO: autodect version number, error handling -FILE="hush-3.6.0-linux-amd64.tar" +FILE="hush-3.6.2-linux-amd64.tar" mkdir build +cp contrib/asmap/asmap.dat build/ cp sapling*.params build/ cd src cp komodod komodo-cli komodo-tx hushd hush-cli hush-tx hush-smart-chain ../build From eb9a7cdd007a89fe591e768755660bd8f115dfbd Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 22 Feb 2021 08:34:53 -0500 Subject: [PATCH 10/20] Improve linux binary generation --- contrib/devtools/gen-linux-binary-release.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/contrib/devtools/gen-linux-binary-release.sh b/contrib/devtools/gen-linux-binary-release.sh index 47bd650fc..07e7af868 100755 --- a/contrib/devtools/gen-linux-binary-release.sh +++ b/contrib/devtools/gen-linux-binary-release.sh @@ -2,15 +2,22 @@ # Copyright (c) 2016-2021 The Hush developers # Released under the GPLv3 +set -e +set -x + #TODO: autodect version number, error handling FILE="hush-3.6.2-linux-amd64.tar" +TIME=$(perl -e 'print time') +mv build build.$TIME mkdir build cp contrib/asmap/asmap.dat build/ cp sapling*.params build/ cd src cp komodod komodo-cli komodo-tx hushd hush-cli hush-tx hush-smart-chain ../build cd ../build +strip komodo* tar -f $FILE -c * -gzip $FILE - +gzip -9 $FILE +sha256sum *.gz +du -sh *.gz From cec16658f1e36e10d455501cad16ec0f2a24c649 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 23 Feb 2021 07:43:28 -0500 Subject: [PATCH 11/20] Comments for future historians --- src/init.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index 7ecfe9dbd..caad515dc 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1,8 +1,10 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2020 The Hush developers +// Copyright (c) 2016-2021 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html +// What happened to the SuperNET devs, who were dedicated to privacy??? +// Did they go the way of the dodo when they embraced KYC? /****************************************************************************** * Copyright © 2014-2019 The SuperNET Developers. * * * From 00a7437ad818e5f06782cba4694e7f53d7efe20d Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 23 Feb 2021 07:54:40 -0800 Subject: [PATCH 12/20] Add -fPIC to make wolfssl happy on Ubuntu 16.04 --- depends/packages/wolfssl.mk | 2 +- src/Makefile.am | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/depends/packages/wolfssl.mk b/depends/packages/wolfssl.mk index 07f235838..d1e9ac08c 100644 --- a/depends/packages/wolfssl.mk +++ b/depends/packages/wolfssl.mk @@ -50,7 +50,7 @@ endef #endef define $(package)_build_cmds - $(MAKE) -j1 src/libwolfssl.la + $(MAKE) CPPFLAGS='-fPIC' -j1 src/libwolfssl.la endef define $(package)_stage_cmds diff --git a/src/Makefile.am b/src/Makefile.am index 1eb56ec24..0711b52cc 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,4 @@ -# Copyright 2016-2020 The Hush developers +# Copyright 2016-2021 The Hush developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html @@ -483,8 +483,8 @@ nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h # komodod binary # komodod_SOURCES = bitcoind.cpp -komodod_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) -komodod_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) +komodod_CPPFLAGS = -fPIC $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) +komodod_CXXFLAGS = -fPIC $(AM_CXXFLAGS) $(PIE_FLAGS) komodod_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) if TARGET_WINDOWS From fea60d8bee0b044f7235fac86fc5af604d9f6698 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 23 Feb 2021 16:17:56 +0000 Subject: [PATCH 13/20] Update 'INSTALL.md' --- INSTALL.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/INSTALL.md b/INSTALL.md index 0c4095e5c..809316604 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -42,6 +42,18 @@ cd hush3 ./build.sh -j$(nproc) ``` +## Building On Ubuntu 16.04 and older systems + +Some older compilers may not be able to compile modern code, such as gcc 5.4 which comes with Ubuntu 16.04 by default. Here is how to install gcc 7 on Ubuntu 16.04: + +``` +sudo add-apt-repository ppa:ubuntu-toolchain-r/test && \ +apt update && \ +apt-get install -y gcc-7 g++-7 && \ + update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 60 && \ + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 +``` + ## Run a HUSH Node ```sh From 36c655a07396b2f3769385405e81954fc1dcd434 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 23 Feb 2021 16:20:19 +0000 Subject: [PATCH 14/20] Update 'INSTALL.md' --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 809316604..7c7e5844f 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -4,7 +4,7 @@ To install a Debian package: - dpkg -i hush-3.5.0-amd4.deb + dpkg -i hush-3.6.2-amd4.deb To uninstall: From 15ef25bf65639950b9b12ec31253f4808a0a090f Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 23 Feb 2021 11:36:57 -0500 Subject: [PATCH 15/20] Try hard to find asmap.dat in all scenarios: src, binary, packages --- src/init.cpp | 51 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 6 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index caad515dc..2624945bf 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1097,13 +1097,52 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) fs::path pwd = fs::path(cwd); fs::path contrib = pwd / ".." / "contrib" / "asmap"; - // if no filepath, use the default in contrib + // If no asmap given (default), look for one + // First we look in PWD, the most common case (binaries) + // Then we look in /usr/share/hush, for Debian packages + // then we look in ../contrib/asmap/ for compiling from source case + // finally we try the parent directory .. as a last resort + // if no asmap can be found, something is wrong, and we exit if (asmap_path.empty()) { - asmap_path = contrib / DEFAULT_ASMAP_FILENAME; - } - if (!asmap_path.is_absolute()) { - asmap_path = GetDataDir() / asmap_path; + // Most binaries will have it in PWD + asmap_path = pwd / DEFAULT_ASMAP_FILENAME; + printf("%s: looking for asmap file at %s\n", __func__, asmap_path.c_str() ); + if(fs::exists(asmap_path)) { + printf("%s: found asmap file at %s\n", __func__, asmap_path.c_str() ); + } else { + // Debian Packages + asmap_path = fs::path("/usr/share/hush") / DEFAULT_ASMAP_FILENAME; + printf("%s: looking for asmap file at %s\n", __func__, asmap_path.c_str() ); + if(fs::exists(asmap_path)) { + printf("%s: found asmap file at %s\n", __func__, asmap_path.c_str() ); + } else { + // Source code + asmap_path = contrib / DEFAULT_ASMAP_FILENAME; + printf("%s: looking for asmap file at %s\n", __func__, asmap_path.c_str() ); + if(fs::exists(asmap_path)) { + printf("%s: found asmap file at %s\n", __func__, asmap_path.c_str() ); + } else { + // Last Resort: Check the parent directory + asmap_path = pwd / ".." / DEFAULT_ASMAP_FILENAME; + printf("%s: looking for asmap file at %s\n", __func__, asmap_path.c_str() ); + if(fs::exists(asmap_path)) { + printf("%s: found asmap file at %s\n", __func__, asmap_path.c_str() ); + } else { + // Shit is fucked up, die an honorable death + InitError(strprintf(_("Could not find any asmap file! Please report this bug to Hush Developers"))); + return false; + } + } + } + } + } else { + if (!asmap_path.is_absolute()) { + asmap_path = GetDataDir() / asmap_path; + } + printf("%s: looking for custom asmap file at %s\n", __func__, asmap_path.c_str() ); } + + //TODO: verify asmap_path is not a directory if (!fs::exists(asmap_path)) { InitError(strprintf(_("Could not find asmap file %s"), asmap_path)); return false; @@ -1115,8 +1154,8 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) } const uint256 asmap_version = SerializeHash(asmap); printf("%s: asmap version=%s with %lu mappings\n", __func__, asmap_version.ToString().c_str(), asmap.size()); + LogPrintf("Using asmap version %s for IP bucketing with %lu mappings\n", asmap_version.ToString(), asmap.size()); addrman.m_asmap = std::move(asmap); // //node.connman->SetAsmap(std::move(asmap)); - LogPrintf("Using asmap version %s for IP bucketing\n", asmap_version.ToString()); } else { LogPrintf("Using /16 prefix for IP bucketing, but why?\n"); From 61c162f5f584ae8e50f7ca9941a29665dc7a0dbc Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 23 Feb 2021 16:50:26 +0000 Subject: [PATCH 16/20] Update 'INSTALL.md' --- INSTALL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 7c7e5844f..0b2f084e7 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -44,10 +44,10 @@ cd hush3 ## Building On Ubuntu 16.04 and older systems -Some older compilers may not be able to compile modern code, such as gcc 5.4 which comes with Ubuntu 16.04 by default. Here is how to install gcc 7 on Ubuntu 16.04: +Some older compilers may not be able to compile modern code, such as gcc 5.4 which comes with Ubuntu 16.04 by default. Here is how to install gcc 7 on Ubuntu 16.04. Run these commands as root: ``` -sudo add-apt-repository ppa:ubuntu-toolchain-r/test && \ +add-apt-repository ppa:ubuntu-toolchain-r/test && \ apt update && \ apt-get install -y gcc-7 g++-7 && \ update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 60 && \ From e1d5c5b7315085c46c770bc85ada3b7a0a731c82 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Thu, 25 Feb 2021 16:07:27 -0500 Subject: [PATCH 17/20] Bump version to 3.6.3 and ++ proto version --- configure.ac | 2 +- src/clientversion.h | 4 ++-- src/version.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 3156d09e7..216f612bf 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 3) define(_CLIENT_VERSION_MINOR, 6) -define(_CLIENT_VERSION_REVISION, 2) +define(_CLIENT_VERSION_REVISION, 3) 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/src/clientversion.h b/src/clientversion.h index 98075253d..b2f606f64 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2014 The Bitcoin Core developers // Copyright (c) 2016-2017 The Zcash developers -// Copyright (c) 2016-2020 The Hush developers +// Copyright (c) 2016-2021 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html /****************************************************************************** @@ -29,7 +29,7 @@ // Must be kept in sync with configure.ac , ugh! #define CLIENT_VERSION_MAJOR 3 #define CLIENT_VERSION_MINOR 6 -#define CLIENT_VERSION_REVISION 2 +#define CLIENT_VERSION_REVISION 3 #define CLIENT_VERSION_BUILD 50 //! Set to true for release, false for prerelease or test build diff --git a/src/version.h b/src/version.h index 69c48d1a4..bc304b404 100644 --- a/src/version.h +++ b/src/version.h @@ -1,5 +1,5 @@ // Copyright (c) 2012-2014 The Bitcoin Core developers -// Copyright (c) 2016-2020 The Hush developers +// Copyright (c) 2016-2021 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html /****************************************************************************** @@ -21,7 +21,7 @@ #define HUSH_VERSION_H // network protocol versioning -static const int PROTOCOL_VERSION = 1987420; +static const int PROTOCOL_VERSION = 1987421; //! initial proto version, to be increased after version/verack negotiation static const int INIT_PROTO_VERSION = 209; //! In this version, 'getheaders' was introduced. From 9e6fa11e42a1bf89870c0cac0c04a76883ab5a63 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 26 Feb 2021 07:36:24 -0500 Subject: [PATCH 18/20] update man pages --- doc/man/hush-cli.1 | 8 ++++---- doc/man/hush-tx.1 | 8 ++++---- doc/man/hushd.1 | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/man/hush-cli.1 b/doc/man/hush-cli.1 index 857dbde06..9cb47f7a1 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.10. -.TH HUSH-CLI "1" "February 2021" "hush-cli v3.6.2" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH HUSH-CLI "1" "February 2021" "hush-cli v3.6.3" "User Commands" .SH NAME -hush-cli \- manual page for hush-cli v3.6.2 +hush-cli \- manual page for hush-cli v3.6.3 .SH DESCRIPTION -Hush RPC client version v3.6.2\-e2e6e44ca\-dirty +Hush RPC client version v3.6.3\-e1d5c5b73 .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 6d4ac2f11..c382b4cff 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.10. -.TH HUSH-TX "1" "February 2021" "hush-tx v3.6.2" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH HUSH-TX "1" "February 2021" "hush-tx v3.6.3" "User Commands" .SH NAME -hush-tx \- manual page for hush-tx v3.6.2 +hush-tx \- manual page for hush-tx v3.6.3 .SH DESCRIPTION -hush\-tx utility version v3.6.2\-e2e6e44ca\-dirty +hush\-tx utility version v3.6.3\-e1d5c5b73 .SS "Usage:" .TP hush\-tx [options] [commands] diff --git a/doc/man/hushd.1 b/doc/man/hushd.1 index 54780a095..3f9d28186 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.10. -.TH HUSHD "1" "February 2021" "hushd v3.6.2" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6. +.TH HUSHD "1" "February 2021" "hushd v3.6.3" "User Commands" .SH NAME -hushd \- manual page for hushd v3.6.2 +hushd \- manual page for hushd v3.6.3 .SH DESCRIPTION -Hush Daemon version v3.6.2\-e2e6e44ca\-dirty +Hush Daemon version v3.6.3\-e1d5c5b73 .PP In order to ensure you are adequately protecting your privacy when using Hush, please see . @@ -75,7 +75,7 @@ limit applied) .HP \fB\-par=\fR .IP -Set the number of script verification threads (\fB\-8\fR to 16, 0 = auto, <0 = +Set the number of script verification threads (\fB\-16\fR to 16, 0 = auto, <0 = leave that many cores free, default: 0) .HP \fB\-pid=\fR From cfeaa47fa3f3ace0627a1a3c1590d40699daa786 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Fri, 26 Feb 2021 08:42:59 -0500 Subject: [PATCH 19/20] Checkpoints up to 440k --- src/chainparams.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index fcd23a576..e44b1643c 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -722,10 +722,16 @@ void *chainparams_commandline() { (431000, uint256S("0x0000000d709ec810da6a2f55ff5d10bff9a5580ffe4fee8ce27abaf175cb6312")) (432000, uint256S("0x000000007d91ea56e7e129991aa33e57224d0f898a5a46b02efb81f40aae5ed8")) (433000, uint256S("0x00000009da7df1aad22c96ed458fa7feae1216811568fb0e9c2f09db25dee3f0")) - (434000, uint256S("0x0000001003f3460d4b0414f94e35025c76f72b8607e0ea00c7790e10172ef8e3")), - (int64_t) 1613879454, // time of last checkpointed block - (int64_t) 752357, // total txs - (double) 1187 // txs in the last day before block 434429 + (434000, uint256S("0x0000001003f3460d4b0414f94e35025c76f72b8607e0ea00c7790e10172ef8e3")) + (435000, uint256S("0x0000001c399778d54b821c0622087149f39ee688e80bb88b6960ec6e42788918")) + (436000, uint256S("0x0000000c4e21e0ac0f9541357c1a3ce483fd2dd210874ca930dc5b271c7e6b21")) + (437000, uint256S("0x00000003ce6d4b0ea02f483633abae9da2b71e62e14e08f20af13452ab6814a7")) + (438000, uint256S("0x0000000d845b717aec3b273f9cb2d894d3caa05f91b3ad41b6581adfd90b267c")) + (439000, uint256S("0x000000099a44794ccf54bcba10780b163b6a369292263df1d8d62d2d58cc7cea")) + (440000, uint256S("0x0000000b741bda60e14a5d668581f60bfb852b09249428ca7c3a59b01db31af0")), + (int64_t) 1614333866, // time of last checkpointed block + (int64_t) 759609, // total txs + (double) 1606 // txs in the last day before block 440133 }; } else { checkpointData = //(Checkpoints::CCheckpointData) From 1d260fb91997249aa3b9f46788c0869204fc5cd4 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Fri, 26 Feb 2021 11:33:22 -0500 Subject: [PATCH 20/20] Improve linux bin script --- contrib/devtools/gen-linux-binary-release.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/devtools/gen-linux-binary-release.sh b/contrib/devtools/gen-linux-binary-release.sh index 07e7af868..6d03d656d 100755 --- a/contrib/devtools/gen-linux-binary-release.sh +++ b/contrib/devtools/gen-linux-binary-release.sh @@ -5,8 +5,10 @@ set -e set -x -#TODO: autodect version number, error handling -FILE="hush-3.6.2-linux-amd64.tar" +#hardcode and uncomment if hushd is not running on this machine +#VERSION=3.6.3 +VERSION=$(./src/hushd --version|grep version|cut -d' ' -f4|cut -d- -f1|sed 's/v//g') +FILE="hush-$VERSION-linux-amd64.tar" TIME=$(perl -e 'print time') mv build build.$TIME