From dd8c6c600112fe325787ec5a71b8dffa24b3d027 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 21 Mar 2022 14:11:37 +0000 Subject: [PATCH 001/295] Update docs to non-legacy directory --- OLD_WALLETS.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/OLD_WALLETS.md b/OLD_WALLETS.md index cf46eb69b..99f96f46f 100644 --- a/OLD_WALLETS.md +++ b/OLD_WALLETS.md @@ -24,11 +24,14 @@ or this command line tool: https://git.hush.is/hush/hush3/src/master/contrib/con ### Using an old wallet.dat -Backup your old HUSH wallet.dat, and backup any current wallet.dat that is in your +Backup your old HUSH wallet.dat, and backup any current wallet.dat that is in ~/.komodo/HUSH3/ -directory. There is no way to lose funds, as long as you have backups!!! Make sure +OR + ~/.hush/HUSH3/ + +There is no way to lose funds, as long as you have backups!!! Make sure to make backups. Do not skip this step. Make sure any/all GUI wallets are stopped! Also make sure your old Hush node @@ -42,12 +45,12 @@ corrupt your wallet! Now copy your old Hush wallet.dat to - ~/.komodo/HUSH3/ + ~/.hush/HUSH3/ with a command like # DO NOT RUN THIS WITHOUT MAKING BACKUPS! - cp ~/.hush/wallet.dat ~/.komodo/HUSH3/ + cp ~/.hush/wallet.dat ~/.hush/HUSH3/ The reason this works is that both old HUSH and new HUSH are still Bitcoin Protocol coins, which both use secp256k1 public keys. Now start your HUSH3 node again, From 58d3d212859431fadc828d7f2cd4af9b1787d80e Mon Sep 17 00:00:00 2001 From: jahway603 Date: Sun, 15 May 2022 22:22:00 -0400 Subject: [PATCH 002/295] migrated more from mcro --- depends/packages/boost.mk | 2 +- depends/packages/utfcpp.mk | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index 3112ca7be..c925e52ef 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -1,7 +1,7 @@ package=boost $(package)_version=1_72_0 -$(package)_download_path=https://github.com/MyHush/boost/releases/download/v1.72.0/ +$(package)_download_path=https://boostorg.jfrog.io/artifactory/main/release/$(subst _,.,$($(package)_version))/source/ $(package)_sha256_hash=59c9b274bc451cf91a9ba1dd2c7fdcaf5d60b1b3aa83f2c9fa143417cc660722 $(package)_file_name=$(package)_$($(package)_version).tar.bz2 diff --git a/depends/packages/utfcpp.mk b/depends/packages/utfcpp.mk index fb7ca044e..623f6a592 100644 --- a/depends/packages/utfcpp.mk +++ b/depends/packages/utfcpp.mk @@ -1,8 +1,8 @@ $(package)_version=3.1 -$(package)_download_path=https://github.com/MyHush/$(package)/archive/ +$(package)_download_path=https://git.hush.is/jahway603/$(package)/archive $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_download_file=v$($(package)_version).tar.gz -$(package)_sha256_hash=ab531c3fd5d275150430bfaca01d7d15e017a188183be932322f2f651506b096 +$(package)_sha256_hash=eb4d5b9843a8411a20da8d011983e5351bf6c5893814f6756de8a31392185a98 define $(package)_stage_cmds cp -a ./source $($(package)_staging_dir)$(host_prefix)/include From 642ac9bda1f7c5efb2eac45bb00aa3919b26905a Mon Sep 17 00:00:00 2001 From: jahway603 Date: Wed, 6 Jul 2022 00:12:13 -0400 Subject: [PATCH 003/295] algo all day long --- src/rpc/misc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index 2933d7393..7a394dc89 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -295,7 +295,7 @@ UniValue getinfo(const UniValue& params, bool fHelp, const CPubKey& mypk) obj.push_back(Pair("testnet", Params().TestnetToBeDeprecatedFieldRPC())); obj.push_back(Pair("relayfee", ValueFromAmount(::minRelayTxFee.GetFeePerK()))); obj.push_back(Pair("errors", GetWarnings("statusbar"))); - if ( NOTARY_PUBKEY33[0] != 0 ) { + if ( NOTARY_PUBKEY33[0] != 0 ) { char pubkeystr[65]; int32_t notaryid; std::string notaryname; if( (notaryid= hush_whoami(pubkeystr,(int32_t)chainActive.LastTip()->GetHeight(),hush_chainactive_timestamp())) >= 0 ) { obj.push_back(Pair("notaryid", notaryid)); @@ -347,8 +347,8 @@ UniValue getinfo(const UniValue& params, bool fHelp, const CPubKey& mypk) if ( ASSETCHAINS_COMMISSION != 0 ) obj.push_back(Pair("commission", ASSETCHAINS_COMMISSION)); - if ( ASSETCHAINS_ALGO != ASSETCHAINS_EQUIHASH ) - obj.push_back(Pair("algo",ASSETCHAINS_ALGORITHMS[ASSETCHAINS_ALGO])); + + obj.push_back(Pair("algo",ASSETCHAINS_ALGORITHMS[ASSETCHAINS_ALGO])); } return obj; } From dfc3056ede5033e8370a22809004689d8a22c8e3 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Wed, 6 Jul 2022 01:08:55 -0400 Subject: [PATCH 004/295] algo twerking --- src/rpc/misc.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index 7a394dc89..83b15a92f 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -347,8 +347,9 @@ UniValue getinfo(const UniValue& params, bool fHelp, const CPubKey& mypk) if ( ASSETCHAINS_COMMISSION != 0 ) obj.push_back(Pair("commission", ASSETCHAINS_COMMISSION)); - - obj.push_back(Pair("algo",ASSETCHAINS_ALGORITHMS[ASSETCHAINS_ALGO])); + if ( ASSETCHAINS_ALGO == ASSETCHAINS_EQUIHASH ) + obj.push_back(Pair("algo",ASSETCHAINS_ALGORITHMS[ASSETCHAINS_ALGO])); + else obj.push_back(Pair("algo",ASSETCHAINS_ALGORITHMS[ASSETCHAINS_ALGO])); } return obj; } From e6ec40190c702c4bb9f2c6c4cd6972a5cef731c6 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Wed, 6 Jul 2022 11:50:39 -0400 Subject: [PATCH 005/295] algo now reflects N & K if equihash --- src/rpc/misc.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index 83b15a92f..50dd62090 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** @@ -348,7 +348,15 @@ UniValue getinfo(const UniValue& params, bool fHelp, const CPubKey& mypk) if ( ASSETCHAINS_COMMISSION != 0 ) obj.push_back(Pair("commission", ASSETCHAINS_COMMISSION)); if ( ASSETCHAINS_ALGO == ASSETCHAINS_EQUIHASH ) + { obj.push_back(Pair("algo",ASSETCHAINS_ALGORITHMS[ASSETCHAINS_ALGO])); + if ( ASSETCHAINS_NK[0] == 0 ) // display default for Hush + obj.push_back(Pair("algo N",200)); + else obj.push_back(Pair("algo N",ASSETCHAINS_NK[0])); + if ( ASSETCHAINS_NK[1] == 0 ) // display default for Hush + obj.push_back(Pair("algo K",9)); + else obj.push_back(Pair("algo K",ASSETCHAINS_NK[1])); + } else obj.push_back(Pair("algo",ASSETCHAINS_ALGORITHMS[ASSETCHAINS_ALGO])); } return obj; From 4768d302fd73888d27902361207ea77f5fd71eb7 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Wed, 6 Jul 2022 11:56:10 -0400 Subject: [PATCH 006/295] added jahway603 to AUTHORS --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index d2d49e2e0..20bd581e2 100644 --- a/AUTHORS +++ b/AUTHORS @@ -2,6 +2,7 @@ Duke Leto https://git.hush.is/duke https://github.com/leto Miodrag https://github.com/miodragpop +jahway603 https://git.hush.is/jahway603 https://github.com/jahway603 # The SuperNET Developers From b956945509be09917a34816ad22b1f221dc19887 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Tue, 12 Jul 2022 16:29:30 -0400 Subject: [PATCH 007/295] fixed utfcpp to use Hush gitea copy --- depends/packages/utfcpp.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/depends/packages/utfcpp.mk b/depends/packages/utfcpp.mk index 623f6a592..df000166c 100644 --- a/depends/packages/utfcpp.mk +++ b/depends/packages/utfcpp.mk @@ -1,8 +1,8 @@ $(package)_version=3.1 -$(package)_download_path=https://git.hush.is/jahway603/$(package)/archive +$(package)_download_path=https://git.hush.is/hush/$(package)/archive $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_download_file=v$($(package)_version).tar.gz -$(package)_sha256_hash=eb4d5b9843a8411a20da8d011983e5351bf6c5893814f6756de8a31392185a98 +$(package)_sha256_hash=ab531c3fd5d275150430bfaca01d7d15e017a188183be932322f2f651506b096 define $(package)_stage_cmds cp -a ./source $($(package)_staging_dir)$(host_prefix)/include From f55b77f65282a50e42922eff7c27daa4f10d28bd Mon Sep 17 00:00:00 2001 From: jahway603 Date: Tue, 12 Jul 2022 17:19:00 -0400 Subject: [PATCH 008/295] changed algo N & K to equihash N & K --- src/rpc/misc.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index 50dd62090..5d01384fb 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -349,15 +349,15 @@ UniValue getinfo(const UniValue& params, bool fHelp, const CPubKey& mypk) obj.push_back(Pair("commission", ASSETCHAINS_COMMISSION)); if ( ASSETCHAINS_ALGO == ASSETCHAINS_EQUIHASH ) { - obj.push_back(Pair("algo",ASSETCHAINS_ALGORITHMS[ASSETCHAINS_ALGO])); + obj.push_back(Pair("algo", ASSETCHAINS_ALGORITHMS[ASSETCHAINS_ALGO])); if ( ASSETCHAINS_NK[0] == 0 ) // display default for Hush - obj.push_back(Pair("algo N",200)); - else obj.push_back(Pair("algo N",ASSETCHAINS_NK[0])); + obj.push_back(Pair("equihash N", 200)); + else obj.push_back(Pair("equihash N", ASSETCHAINS_NK[0])); if ( ASSETCHAINS_NK[1] == 0 ) // display default for Hush - obj.push_back(Pair("algo K",9)); - else obj.push_back(Pair("algo K",ASSETCHAINS_NK[1])); + obj.push_back(Pair("equihash K", 9)); + else obj.push_back(Pair("equihash K", ASSETCHAINS_NK[1])); } - else obj.push_back(Pair("algo",ASSETCHAINS_ALGORITHMS[ASSETCHAINS_ALGO])); + else obj.push_back(Pair("algo", ASSETCHAINS_ALGORITHMS[ASSETCHAINS_ALGO])); } return obj; } From 398db65c0e00cc637c7c3ede6e714f23ec5aec2a Mon Sep 17 00:00:00 2001 From: jahway603 Date: Tue, 12 Jul 2022 18:26:05 -0400 Subject: [PATCH 009/295] NOW using special gitea file --- depends/packages/utfcpp.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/depends/packages/utfcpp.mk b/depends/packages/utfcpp.mk index df000166c..f031b46a5 100644 --- a/depends/packages/utfcpp.mk +++ b/depends/packages/utfcpp.mk @@ -1,7 +1,7 @@ $(package)_version=3.1 -$(package)_download_path=https://git.hush.is/hush/$(package)/archive -$(package)_file_name=$(package)-$($(package)_version).tar.gz -$(package)_download_file=v$($(package)_version).tar.gz +$(package)_download_path=https://git.hush.is/attachments +$(package)_file_name=11822fe4-3846-4ce4-9c84-ba0877a7b186 +$(package)_download_file=11822fe4-3846-4ce4-9c84-ba0877a7b186 $(package)_sha256_hash=ab531c3fd5d275150430bfaca01d7d15e017a188183be932322f2f651506b096 define $(package)_stage_cmds From 9bd41875d7240a733359254b422f393f5b03f596 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 12 Jul 2022 23:20:57 -0400 Subject: [PATCH 010/295] Return getinfo algo as a single key --- src/rpc/misc.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index 5d01384fb..cd8ee74b2 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -347,17 +347,14 @@ UniValue getinfo(const UniValue& params, bool fHelp, const CPubKey& mypk) if ( ASSETCHAINS_COMMISSION != 0 ) obj.push_back(Pair("commission", ASSETCHAINS_COMMISSION)); - if ( ASSETCHAINS_ALGO == ASSETCHAINS_EQUIHASH ) - { + if ( ASSETCHAINS_ALGO == ASSETCHAINS_EQUIHASH ) { + uint64_t N = ASSETCHAINS_NK[0] ? ASSETCHAINS_NK[0] : 200; + uint64_t K = ASSETCHAINS_NK[1] ? ASSETCHAINS_NK[1] : 9; + std::string equihash_algo = "equihash (" + std::to_string(N) + "," + std::to_string(K) + ")"; + obj.push_back(Pair("algo",equihash_algo)); + } else { obj.push_back(Pair("algo", ASSETCHAINS_ALGORITHMS[ASSETCHAINS_ALGO])); - if ( ASSETCHAINS_NK[0] == 0 ) // display default for Hush - obj.push_back(Pair("equihash N", 200)); - else obj.push_back(Pair("equihash N", ASSETCHAINS_NK[0])); - if ( ASSETCHAINS_NK[1] == 0 ) // display default for Hush - obj.push_back(Pair("equihash K", 9)); - else obj.push_back(Pair("equihash K", ASSETCHAINS_NK[1])); - } - else obj.push_back(Pair("algo", ASSETCHAINS_ALGORITHMS[ASSETCHAINS_ALGO])); + } } return obj; } From a3258de21769939d34b241fb6fe6ae97f53de06c Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 12 Jul 2022 23:29:36 -0400 Subject: [PATCH 011/295] less debug by default from IsInitialBlockDownload --- src/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 627a99f90..b8e64dc27 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2405,7 +2405,9 @@ bool IsInitialBlockDownload() LogPrintf("Leaving InitialBlockDownload (latching to false)\n"); latchToFalse.store(true, std::memory_order_relaxed); } else { - fprintf(stderr,"%s: state.%d ht.%d vs %d, t.%u\n",__func__, state,(int32_t)chainActive.Height(),(uint32_t)ptr->GetHeight(),(int32_t)ptr->GetBlockTime()); + if (fDebug) { + fprintf(stderr,"%s: state.%d ht.%d vs %d, t.%u\n",__func__, state,(int32_t)chainActive.Height(),(uint32_t)ptr->GetHeight(),(int32_t)ptr->GetBlockTime()); + } } return state; } From 9806119366b0f6cf8940d531014a601d9bef19c0 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Wed, 13 Jul 2022 01:04:03 -0400 Subject: [PATCH 012/295] optimized IsBanned() --- src/net.cpp | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/src/net.cpp b/src/net.cpp index ef029025b..db47d5ec7 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -547,35 +547,29 @@ void CNode::ClearBanned() bool CNode::IsBanned(CNetAddr ip) { - bool fResult = false; + LOCK(cs_setBanned); + for (std::map::iterator it = setBanned.begin(); it != setBanned.end(); it++) { - LOCK(cs_setBanned); - for (std::map::iterator it = setBanned.begin(); it != setBanned.end(); it++) - { - CSubNet subNet = (*it).first; - int64_t t = (*it).second; + CSubNet subNet = (*it).first; + int64_t t = (*it).second; - if(subNet.Match(ip) && GetTime() < t) - fResult = true; - } + if(subNet.Match(ip) && GetTime() < t) + return true; } - return fResult; + return false; } bool CNode::IsBanned(CSubNet subnet) { - bool fResult = false; + LOCK(cs_setBanned); + std::map::iterator i = setBanned.find(subnet); + if (i != setBanned.end()) { - LOCK(cs_setBanned); - std::map::iterator i = setBanned.find(subnet); - if (i != setBanned.end()) - { - int64_t t = (*i).second; - if (GetTime() < t) - fResult = true; - } + int64_t t = (*i).second; + if (GetTime() < t) + return true; } - return fResult; + return false; } void CNode::Ban(const CNetAddr& addr, int64_t bantimeoffset, bool sinceUnixEpoch) { From ff37b7a1ecd58b83190d68ff1ea2ee64e2f1e539 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Fri, 15 Jul 2022 11:43:05 -0400 Subject: [PATCH 013/295] update build.sh and CONTRIBUTING.md --- CONTRIBUTING.md | 4 ++-- INSTALL.md | 2 +- zcutil/build.sh | 6 ++++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3a2b1e08a..5866ab2e3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,7 +37,7 @@ Before we get started, here are a few things we expect from you (and that you sh ## How to contribute -If you'd like to contribute, start by searching through the [issues](https://github.com/MyHush/hush3/issues) and [pull requests](https://github.com/MyHush/hush3/pulls) to see whether someone else has raised a similar idea or question. +If you'd like to contribute, start by searching through the [issues](https://git.hush.is/hush/hush3/issues) and [pull requests](https://git.hush.is/hush/hush3/pulls) to see whether someone else has raised a similar idea or question. If you don't see your idea listed, and you think it can contribute to Hush, do one of the following: * **If your contribution is minor,** such as a fixing a typo, open a pull request. @@ -49,7 +49,7 @@ Don't write shitty code. Do not emulate "jl777 code style" from Komodo, we consi ## Setting up your environment -The Hush Core (hushd) is mainly written in C++ with specific modules written in C. Follow the [Install](https://github.com/MyHush/hush3/blob/master/INSTALL.md) instructions to build hushd from sources. For more informations about the Hush Platform and a full API documentation please visit the official [Hush Developer documentation](https://gilardh.github.io/dev-website/developers/) +The Hush Core (hushd) is mainly written in C++ with specific modules written in C. Follow the [Install](https://git.hush.is/hush/hush3/src/branch/master/INSTALL.md) instructions to build hushd from sources. For more informations about the Hush Platform and a full API documentation please visit the official [Hush Developer documentation](https://faq.hush.is/rpc/) Other Hush software is written in Rust or Go. We avoid Javascript at all costs. diff --git a/INSTALL.md b/INSTALL.md index 114ef1775..ad81f40b9 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -25,7 +25,7 @@ sudo swapon /swapfile # install build 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 curl unzip nano libsodium-dev + bsdmainutils automake curl unzip nano libsodium-dev cmake # clone git repo git clone https://git.hush.is/hush/hush3 cd hush3 diff --git a/zcutil/build.sh b/zcutil/build.sh index a5ecda2ca..42f4196b3 100755 --- a/zcutil/build.sh +++ b/zcutil/build.sh @@ -5,6 +5,12 @@ set -eu -o pipefail +# Check if cmake, a new dependency for randomx support, is installed on system and exits if it is not +if ! [ -x "$(command -v cmake)" ]; then + echo 'Error: cmake is not installed. Install cmake and try again.' >&2 + exit 1 +fi + function cmd_pref() { if type -p "$2" > /dev/null; then eval "$1=$2" From b6ee6ba57e4c1ad9961cedade9cff38adbb4f16c Mon Sep 17 00:00:00 2001 From: jahway603 Date: Fri, 15 Jul 2022 12:58:29 -0400 Subject: [PATCH 014/295] changed libsodium to gitea hosted version --- depends/packages/libsodium.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/depends/packages/libsodium.mk b/depends/packages/libsodium.mk index 0be8e1676..2d930c4ae 100644 --- a/depends/packages/libsodium.mk +++ b/depends/packages/libsodium.mk @@ -1,7 +1,8 @@ package=libsodium $(package)_version=1.0.18 -$(package)_download_path=https://github.com/MyHush/libsodium/releases/download/$($(package)_version)/ -$(package)_file_name=$(package)-$($(package)_version).tar.gz +$(package)_download_path=https://git.hush.is/attachments +$(package)_file_name=0d9f589e-a9f9-4ddb-acaa-0f1b423b32eb +$(package)_download_file=0d9f589e-a9f9-4ddb-acaa-0f1b423b32eb $(package)_sha256_hash=6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1 $(package)_dependencies= $(package)_config_opts= From 2efa9652e2d35f5bb2d1c6fe20d0f61e86715504 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Fri, 15 Jul 2022 22:21:41 -0400 Subject: [PATCH 015/295] fixed spacing in manpages --- doc/man/hush-cli.1 | 3 +++ doc/man/hush-tx.1 | 3 +++ doc/man/hushd.1 | 3 +++ 3 files changed, 9 insertions(+) diff --git a/doc/man/hush-cli.1 b/doc/man/hush-cli.1 index 6179f7d95..8f7861dbf 100644 --- a/doc/man/hush-cli.1 +++ b/doc/man/hush-cli.1 @@ -76,8 +76,11 @@ In order to ensure you are adequately protecting your privacy when using Hush, please see . Copyright (C) 2016-2021 Duke Leto and The Hush Developers + Copyright (C) 2016-2020 jl777 and SuperNET developers + Copyright (C) 2016-2018 The Zcash developers + Copyright (C) 2009-2014 The Bitcoin Core developers This is experimental Free Software! Fuck Yeah!!!!! diff --git a/doc/man/hush-tx.1 b/doc/man/hush-tx.1 index 54149df40..7b1124b70 100644 --- a/doc/man/hush-tx.1 +++ b/doc/man/hush-tx.1 @@ -89,8 +89,11 @@ In order to ensure you are adequately protecting your privacy when using Hush, please see . Copyright (C) 2016-2021 Duke Leto and The Hush Developers + Copyright (C) 2016-2020 jl777 and SuperNET developers + Copyright (C) 2016-2018 The Zcash developers + Copyright (C) 2009-2014 The Bitcoin Core developers This is experimental Free Software! Fuck Yeah!!!!! diff --git a/doc/man/hushd.1 b/doc/man/hushd.1 index f5c1dd68e..539f544be 100644 --- a/doc/man/hushd.1 +++ b/doc/man/hushd.1 @@ -713,8 +713,11 @@ In order to ensure you are adequately protecting your privacy when using Hush, please see . Copyright (C) 2016-2021 Duke Leto and The Hush Developers + Copyright (C) 2016-2020 jl777 and SuperNET developers + Copyright (C) 2016-2018 The Zcash developers + Copyright (C) 2009-2014 The Bitcoin Core developers This is experimental Free Software! Fuck Yeah!!!!! From afd3f93e2ead442a43818508bdd4cbdcbefc3e4d Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 18 Jul 2022 10:43:22 -0400 Subject: [PATCH 016/295] Throw error in wallet if ReadBlockFromDisk fails --- src/wallet/wallet.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 8d12d903a..bda0140f0 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1032,7 +1032,10 @@ int CWallet::VerifyAndSetInitialWitness(const CBlockIndex* pindex, bool witnessO //Cycle through blocks and transactions building sapling tree until the commitment needed is reached const CBlock* pblock; CBlock block; - ReadBlockFromDisk(block, pblockindex, 1); + if (!ReadBlockFromDisk(block, pblockindex, 1)) { + throw std::runtime_error( + strprintf("Cannot read block height %d (%s) from disk", pindex->GetHeight(), pindex->GetBlockHash().GetHex())); + } pblock = █ for (const CTransaction& tx : block.vtx) { @@ -1102,7 +1105,10 @@ void CWallet::BuildWitnessCache(const CBlockIndex* pindex, bool witnessOnly) //Cycle through blocks and transactions building sapling tree until the commitment needed is reached CBlock block; - ReadBlockFromDisk(block, pblockindex, 1); + if (!ReadBlockFromDisk(block, pblockindex, 1)) { + throw std::runtime_error( + strprintf("Cannot read block height %d (%s) from disk", pindex->GetHeight(), pindex->GetBlockHash().GetHex())); + } for (std::pair& wtxItem : mapWallet) { @@ -2721,7 +2727,11 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate) CBlock block; bool involvesMe = false; - ReadBlockFromDisk(block, pindex,1); + if (!ReadBlockFromDisk(block, pindex,1)) { + throw std::runtime_error( + strprintf("Cannot read block height %d (%s) from disk", pindex->GetHeight(), pindex->GetBlockHash().GetHex())); + } + BOOST_FOREACH(CTransaction& tx, block.vtx) { if (AddToWalletIfInvolvingMe(tx, &block, fUpdate)) { From c6e5b07a5906893bcf996ab4032e96a8882ac6c7 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Wed, 24 Aug 2022 23:38:19 -0400 Subject: [PATCH 017/295] You might be a king or a little street zsweeper, but sooner or later you will dance with the reaper --- src/Makefile.am | 2 + src/base58.cpp | 1 + src/compressor.cpp | 1 + src/consensus/upgrades.h | 7 ++- src/consensus/validation.h | 1 + src/core_read.cpp | 1 + src/core_write.cpp | 1 + src/fs.cpp | 1 + src/importcoin.cpp | 3 + src/init.cpp | 58 +++++++++++++++++++ src/key.cpp | 1 + src/merkleblock.cpp | 1 + src/noui.cpp | 1 + src/scheduler.cpp | 1 + src/transaction_builder.cpp | 5 ++ src/transaction_builder.h | 1 + src/uint256.cpp | 3 +- src/utilstrencodings.cpp | 1 + src/utiltime.cpp | 1 + ...asyncrpcoperation_saplingconsolidation.cpp | 4 +- src/wallet/wallet.cpp | 47 ++++++++++++++- src/wallet/wallet.h | 13 ++++- 22 files changed, 146 insertions(+), 9 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 5d73c049f..76f99f00c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -231,6 +231,7 @@ BITCOIN_CORE_H = \ version.h \ wallet/asyncrpcoperation_mergetoaddress.h \ wallet/asyncrpcoperation_saplingconsolidation.h \ + wallet/asyncrpcoperation_sweep.h \ wallet/asyncrpcoperation_sendmany.h \ wallet/asyncrpcoperation_shieldcoinbase.h \ wallet/crypter.h \ @@ -344,6 +345,7 @@ libbitcoin_wallet_a_SOURCES = \ zcbenchmarks.h \ wallet/asyncrpcoperation_mergetoaddress.cpp \ wallet/asyncrpcoperation_saplingconsolidation.cpp \ + wallet/asyncrpcoperation_sweep.cpp \ wallet/asyncrpcoperation_sendmany.cpp \ wallet/asyncrpcoperation_shieldcoinbase.cpp \ wallet/crypter.cpp \ diff --git a/src/base58.cpp b/src/base58.cpp index d46894ea0..f1ca396ab 100644 --- a/src/base58.cpp +++ b/src/base58.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2021 The Hush developers // Copyright (c) 2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/compressor.cpp b/src/compressor.cpp index ae7fe02ba..b55313486 100644 --- a/src/compressor.cpp +++ b/src/compressor.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2021 The Hush developers // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying diff --git a/src/consensus/upgrades.h b/src/consensus/upgrades.h index 7a72e798b..278c3e462 100644 --- a/src/consensus/upgrades.h +++ b/src/consensus/upgrades.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2018 The Zcash developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html @@ -17,8 +18,8 @@ * * ******************************************************************************/ -#ifndef ZCASH_CONSENSUS_UPGRADES_H -#define ZCASH_CONSENSUS_UPGRADES_H +#ifndef HUSH_CONSENSUS_UPGRADES_H +#define HUSH_CONSENSUS_UPGRADES_H #include "consensus/params.h" @@ -114,4 +115,4 @@ boost::optional NextActivationHeight( int nHeight, const Consensus::Params& params); -#endif // ZCASH_CONSENSUS_UPGRADES_H +#endif // HUSH_CONSENSUS_UPGRADES_H diff --git a/src/consensus/validation.h b/src/consensus/validation.h index edf38e294..848018728 100644 --- a/src/consensus/validation.h +++ b/src/consensus/validation.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying diff --git a/src/core_read.cpp b/src/core_read.cpp index 679d221f4..d092f6624 100644 --- a/src/core_read.cpp +++ b/src/core_read.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2021 The Hush developers // Copyright (c) 2009-2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/core_write.cpp b/src/core_write.cpp index bb996c700..67953e2fa 100644 --- a/src/core_write.cpp +++ b/src/core_write.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2021 The Hush developers // Copyright (c) 2009-2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/fs.cpp b/src/fs.cpp index a5e12f1cf..0c6a60014 100644 --- a/src/fs.cpp +++ b/src/fs.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2021 The Hush developers #include "fs.h" namespace fsbridge { diff --git a/src/importcoin.cpp b/src/importcoin.cpp index 16a8d3c64..f6da631c7 100644 --- a/src/importcoin.cpp +++ b/src/importcoin.cpp @@ -1,3 +1,6 @@ +// 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. * * * diff --git a/src/init.cpp b/src/init.cpp index e057282be..dd6666710 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -59,6 +59,7 @@ #include "wallet/wallet.h" #include "wallet/walletdb.h" #include "wallet/asyncrpcoperation_saplingconsolidation.h" +#include "wallet/asyncrpcoperation_sweep.h" #endif #include #include @@ -461,6 +462,16 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-consolidation", _("Enable auto Sapling note consolidation (default: false)")); strUsage += HelpMessageOpt("-consolidatesaplingaddress=", _("Specify Sapling Address to Consolidate. (default: all)")); strUsage += HelpMessageOpt("-consolidationtxfee", strprintf(_("Fee amount in Puposhis used send consolidation transactions. (default %i)"), DEFAULT_CONSOLIDATION_FEE)); + + strUsage += HelpMessageOpt("-zsweep", _("Enable zaddr sweeping, automatically move all shielded funds to a one address once per X blocks")); + strUsage += HelpMessageOpt("-zsweepaddress=", _("Specify the shielded address where swept funds will be sent)")); + strUsage += HelpMessageOpt("-zsweepfee", strprintf(_("Fee amount in puposhis used send sweep transactions. (default %i)"), DEFAULT_SWEEP_FEE)); + strUsage += HelpMessageOpt("-zsweepinterval", strprintf(_("Sweep shielded funds every X blocks (default %i)"), 5)); + strUsage += HelpMessageOpt("-zsweepmaxinputs", strprintf(_("Maximum number of shielded inputs to sweep per transaction (default %i)"), 8)); + // By default we only allow sweeping to the current wallet which must have the spending key of the sweep zaddr + // This hopefully will make it harder for people to accidentally sweep funds to a wrong zaddr and lose funds + strUsage += HelpMessageOpt("-zsweepexternal", _("Enable sweeping to an external wallet (default false)")); + strUsage += HelpMessageOpt("-deletetx", _("Enable Old Transaction Deletion")); strUsage += HelpMessageOpt("-deleteinterval", strprintf(_("Delete transaction every blocks during inital block download (default: %i)"), DEFAULT_TX_DELETE_INTERVAL)); strUsage += HelpMessageOpt("-keeptxnum", strprintf(_("Keep the last transactions (default: %i)"), DEFAULT_TX_RETENTION_LASTTX)); @@ -2054,6 +2065,53 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) } } + //Set Sweep + pwalletMain->fSweepEnabled = GetBoolArg("-zsweep", false); + + if (pwalletMain->fSweepEnabled) { + fSweepTxFee = GetArg("-zsweepfee", DEFAULT_SWEEP_FEE); + fSweepMapUsed = !mapMultiArgs["-zsweepaddress"].empty(); + + //Validate Sapling Addresses + vector& vSweep = mapMultiArgs["-zsweepaddress"]; + if (vSweep.size() != 1) { + return InitError("A single zsweep address must be specified."); + } + + for (int i = 0; i < vSweep.size(); i++) { + // LogPrintf("Sweep Address: %s\n", vSweep[i]); + auto zSweep = DecodePaymentAddress(vSweep[i]); + if (!IsValidPaymentAddress(zSweep)) { + return InitError("Invalid zsweep address"); + } + auto hasSpendingKey = boost::apply_visitor(HaveSpendingKeyForPaymentAddress(pwalletMain), zSweep); + auto allowSweepToExternalWallet = GetArg("-zsweepexternal", false); + + if (!hasSpendingKey) { + if (allowSweepToExternalWallet) { + LogPrintf("%s: sweeping funds to a zaddr in an external wallet\n", __func__); + } else { + return InitError("Wallet must have the spending key of zsweep address"); + } + } + } + + if (pwalletMain->fSaplingConsolidationEnabled) { + //Validate 1 Consolidation address only that matches the sweep address + vector& vaddresses = mapMultiArgs["-consolidatesaplingaddress"]; + if (vaddresses.size() == 0) { + fConsolidationMapUsed = true; + mapMultiArgs["-consolidatesaplingaddress"] = vSweep; + } else { + for (int i = 0; i < vaddresses.size(); i++) { + if (vSweep[0] != vaddresses[i]) { + return InitError("Consolidation can only be used on the sweep address when sweep is enabled."); + } + } + } + } + } + //Set Transaction Deletion Options fTxDeleteEnabled = GetBoolArg("-deletetx", false); fTxConflictDeleteEnabled = GetBoolArg("-deleteconflicttx", true); diff --git a/src/key.cpp b/src/key.cpp index 70ade77fb..83f831ada 100644 --- a/src/key.cpp +++ b/src/key.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2021 The Hush developers // Copyright (c) 2009-2014 The Bitcoin Core developers // Copyright (c) 2017 The Zcash developers // Distributed under the GPLv3 software license, see the accompanying diff --git a/src/merkleblock.cpp b/src/merkleblock.cpp index c12552f78..86df55cac 100644 --- a/src/merkleblock.cpp +++ b/src/merkleblock.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2021 The Hush developers // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying diff --git a/src/noui.cpp b/src/noui.cpp index 7a838d0bd..e0bd76e4d 100644 --- a/src/noui.cpp +++ b/src/noui.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2021 The Hush developers // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying diff --git a/src/scheduler.cpp b/src/scheduler.cpp index c243ca308..9c4ebf334 100644 --- a/src/scheduler.cpp +++ b/src/scheduler.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2021 The Hush developers // Copyright (c) 2015 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/transaction_builder.cpp b/src/transaction_builder.cpp index 3ff6269b2..0dfd5a299 100644 --- a/src/transaction_builder.cpp +++ b/src/transaction_builder.cpp @@ -104,6 +104,11 @@ bool TransactionBuilder::AddOpRetLast() return true; } +void TransactionBuilder::SetExpiryHeight(int nHeight) +{ + this->mtx.nExpiryHeight = nHeight; +} + void TransactionBuilder::AddOpRet(CScript &s) { opReturn.emplace(CScript(s)); diff --git a/src/transaction_builder.h b/src/transaction_builder.h index 89a8d6580..6c4d20302 100644 --- a/src/transaction_builder.h +++ b/src/transaction_builder.h @@ -77,6 +77,7 @@ public: TransactionBuilder(const Consensus::Params& consensusParams, int nHeight, CKeyStore* keyStore = nullptr); void SetFee(CAmount fee); + void SetExpiryHeight(int nHeight); // Returns false if the anchor does not match the anchor used by // previously-added Sapling spends. diff --git a/src/uint256.cpp b/src/uint256.cpp index 4883ac50b..97c0cb007 100644 --- a/src/uint256.cpp +++ b/src/uint256.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2021 The Hush developers // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying @@ -19,9 +20,7 @@ ******************************************************************************/ #include "uint256.h" - #include "utilstrencodings.h" - #include #include diff --git a/src/utilstrencodings.cpp b/src/utilstrencodings.cpp index 665f9bead..4a2815968 100644 --- a/src/utilstrencodings.cpp +++ b/src/utilstrencodings.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2021 The Hush developers // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying diff --git a/src/utiltime.cpp b/src/utiltime.cpp index aba3823ca..bc5e3d69c 100644 --- a/src/utiltime.cpp +++ b/src/utiltime.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2021 The Hush developers // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying diff --git a/src/wallet/asyncrpcoperation_saplingconsolidation.cpp b/src/wallet/asyncrpcoperation_saplingconsolidation.cpp index 2594fb4ce..361d04390 100644 --- a/src/wallet/asyncrpcoperation_saplingconsolidation.cpp +++ b/src/wallet/asyncrpcoperation_saplingconsolidation.cpp @@ -159,7 +159,7 @@ bool AsyncRPCOperation_saplingconsolidation::main_impl() { amountConsolidated += amountToSend; auto builder = TransactionBuilder(consensusParams, targetHeight_, pwalletMain); - //builder.SetExpiryHeight(targetHeight_ + CONSOLIDATION_EXPIRY_DELTA); + builder.SetExpiryHeight(targetHeight_ + CONSOLIDATION_EXPIRY_DELTA); auto actualAmountToSend = amountToSend < fConsolidationTxFee ? 0 : amountToSend - fConsolidationTxFee; LogPrintf("%s: %s Beginning to create transaction with Sapling output amount=%s\n", __func__, opid, FormatMoney(actualAmountToSend)); @@ -235,7 +235,7 @@ bool AsyncRPCOperation_saplingconsolidation::main_impl() { break; } - if(pwalletMain->CommitConsolidationTx(tx)) { + if(pwalletMain->CommitAutomatedTx(tx)) { LogPrint("zrpcunsafe", "%s: Committed consolidation transaction with txid=%s\n",opid, tx.GetHash().ToString()); amountConsolidated += actualAmountToSend; consolidationTxIds.push_back(tx.GetHash().ToString()); diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index bda0140f0..83f95cbb3 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -38,6 +38,7 @@ #include "crypter.h" #include "coins.h" #include "wallet/asyncrpcoperation_saplingconsolidation.h" +#include "wallet/asyncrpcoperation_sweep.h" #include "zcash/zip32.h" #include "cc/CCinclude.h" #include @@ -483,6 +484,9 @@ void CWallet::ChainTip(const CBlockIndex *pindex, if (fSaplingConsolidationEnabled) { RunSaplingConsolidation(pindex->GetHeight()); } + if (fSweepEnabled) { + RunSaplingSweep(pindex->GetHeight()); + } if (fTxDeleteEnabled) { DeleteWalletTransactions(pindex); } @@ -501,6 +505,43 @@ void CWallet::ChainTip(const CBlockIndex *pindex, } } +void CWallet::RunSaplingSweep(int blockHeight) { + // Sapling is always active since height=1 of HUSH+HSCs + // if (!NetworkUpgradeActive(blockHeight, Params().GetConsensus(), Consensus::UPGRADE_SAPLING)) { + // return; + // } + AssertLockHeld(cs_wallet); + if (!fSweepEnabled) { + return; + } + + if (nextSweep > blockHeight) { + return; + } + + //Don't Run if consolidation will run soon. + if (fSaplingConsolidationEnabled && nextConsolidation - 15 <= blockHeight) { + return; + } + + //Don't Run While consolidation is running. + if (fConsolidationRunning) { + return; + } + + fSweepRunning = true; + + std::shared_ptr q = getAsyncRPCQueue(); + std::shared_ptr lastOperation = q->getOperationForId(saplingSweepOperationId); + if (lastOperation != nullptr) { + lastOperation->cancel(); + } + pendingSaplingSweepTxs.clear(); + std::shared_ptr operation(new AsyncRPCOperation_sweep(blockHeight + 5)); + saplingSweepOperationId = operation->getId(); + q->addOperation(operation); +} + void CWallet::RunSaplingConsolidation(int blockHeight) { if (!NetworkUpgradeActive(blockHeight, Params().GetConsensus(), Consensus::UPGRADE_SAPLING)) { return; @@ -512,6 +553,10 @@ void CWallet::RunSaplingConsolidation(int blockHeight) { return; } + if (fSweepRunning) { + return; + } + int consolidateInterval = rand() % 5 + 5; if(fZdebug) @@ -530,7 +575,7 @@ void CWallet::RunSaplingConsolidation(int blockHeight) { } } -bool CWallet::CommitConsolidationTx(const CTransaction& tx) { +bool CWallet::CommitAutomatedTx(const CTransaction& tx) { CWalletTx wtx(this, tx); CReserveKey reservekey(pwalletMain); fprintf(stderr,"%s: %s\n",__func__,tx.ToString().c_str()); diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 15be2072d..f633f2564 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -785,6 +785,9 @@ private: std::vector pendingSaplingConsolidationTxs; AsyncRPCOperationId saplingConsolidationOperationId; + std::vector pendingSaplingSweepTxs; + AsyncRPCOperationId saplingSweepOperationId; + void AddToTransparentSpends(const COutPoint& outpoint, const uint256& wtxid); void AddToSaplingSpends(const uint256& nullifier, const uint256& wtxid); void AddToSpends(const uint256& wtxid); @@ -797,7 +800,13 @@ public: */ int64_t nWitnessCacheSize; bool needsRescan = false; + int nextConsolidation = 0; + bool fSaplingConsolidationEnabled = false; + bool fConsolidationRunning = false; + bool fSweepEnabled = false; + bool fSweepRunning = false; + int nextSweep = 0; void ClearNoteWitnessCache(); @@ -1181,12 +1190,14 @@ public: CAmount GetCredit(const CTransaction& tx, int32_t voutNum, const isminefilter& filter) const; CAmount GetCredit(const CTransaction& tx, const isminefilter& filter) const; CAmount GetChange(const CTransaction& tx) const; + void RunSaplingSweep(int blockHeight); + void ChainTip( const CBlockIndex *pindex, const CBlock *pblock, boost::optional> added); void RunSaplingConsolidation(int blockHeight); - bool CommitConsolidationTx(const CTransaction& tx); + bool CommitAutomatedTx(const CTransaction& tx); /** Saves witness caches and best block locator to disk. */ void SetBestChain(const CBlockLocator& loc); std::set> GetNullifiersForAddresses(const std::set & addresses); From 02ef7149011d9b221f58585dd00747661b9cdf09 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Thu, 25 Aug 2022 09:26:10 -0400 Subject: [PATCH 018/295] Commit forgotten files --- src/wallet/asyncrpcoperation_sweep.cpp | 313 +++++++++++++++++++++++++ src/wallet/asyncrpcoperation_sweep.h | 42 ++++ 2 files changed, 355 insertions(+) create mode 100644 src/wallet/asyncrpcoperation_sweep.cpp create mode 100644 src/wallet/asyncrpcoperation_sweep.h diff --git a/src/wallet/asyncrpcoperation_sweep.cpp b/src/wallet/asyncrpcoperation_sweep.cpp new file mode 100644 index 000000000..140c9902a --- /dev/null +++ b/src/wallet/asyncrpcoperation_sweep.cpp @@ -0,0 +1,313 @@ +// Copyright (c) 2016-2022 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 +#include "assert.h" +#include "boost/variant/static_visitor.hpp" +#include "asyncrpcoperation_sweep.h" +#include "init.h" +#include "key_io.h" +#include "rpc/protocol.h" +#include "random.h" +#include "sync.h" +#include "tinyformat.h" +#include "transaction_builder.h" +#include "util.h" +#include "utilmoneystr.h" +#include "wallet.h" + +extern string randomSietchZaddr(); + +CAmount fSweepTxFee = DEFAULT_SWEEP_FEE; +bool fSweepMapUsed = false; +const int SWEEP_EXPIRY_DELTA = 15; +boost::optional rpcSweepAddress; + +AsyncRPCOperation_sweep::AsyncRPCOperation_sweep(int targetHeight, bool fromRpc) : targetHeight_(targetHeight), fromRPC_(fromRpc){} + +AsyncRPCOperation_sweep::~AsyncRPCOperation_sweep() {} + +void AsyncRPCOperation_sweep::main() { + if (isCancelled()) + return; + + set_state(OperationStatus::EXECUTING); + start_execution_clock(); + + bool success = false; + + try { + success = main_impl(); + } catch (const UniValue& objError) { + int code = find_value(objError, "code").get_int(); + std::string message = find_value(objError, "message").get_str(); + set_error_code(code); + set_error_message(message); + } catch (const runtime_error& e) { + set_error_code(-1); + set_error_message("runtime error: " + string(e.what())); + } catch (const logic_error& e) { + set_error_code(-1); + set_error_message("logic error: " + string(e.what())); + } catch (const exception& e) { + set_error_code(-1); + set_error_message("general exception: " + string(e.what())); + } catch (...) { + set_error_code(-2); + set_error_message("unknown error"); + } + + stop_execution_clock(); + + if (success) { + set_state(OperationStatus::SUCCESS); + } else { + set_state(OperationStatus::FAILED); + } + + std::string s = strprintf("%s: Sapling Sweep transaction created. (status=%s", getId(), getStateAsString()); + if (success) { + s += strprintf(", success)\n"); + } else { + s += strprintf(", error=%s)\n", getErrorMessage()); + } + + LogPrintf("%s", s); +} + +bool AsyncRPCOperation_sweep::main_impl() { + LogPrint("zrpcunsafe", "%s: Beginning asyncrpcoperation_sweep.\n", getId()); + auto consensusParams = Params().GetConsensus(); + auto nextActivationHeight = NextActivationHeight(targetHeight_, consensusParams); + if (nextActivationHeight && targetHeight_ + SWEEP_EXPIRY_DELTA >= nextActivationHeight.get()) { + LogPrint("zrpcunsafe", "%s: Sweep txs would be created before a NU activation but may expire after. Skipping this round.\n", getId()); + setSweepResult(0, 0, std::vector()); + return true; + } + + std::vector saplingEntries; + libzcash::SaplingPaymentAddress sweepAddress; + std::map> mapAddresses; + + { + LOCK2(cs_main, pwalletMain->cs_wallet); + pwalletMain->GetFilteredNotes(saplingEntries, "", 11); + if (!fromRPC_) { + if (fSweepMapUsed) { + const vector& v = mapMultiArgs["-zsweepaddress"]; + for(int i = 0; i < v.size(); i++) { + auto zAddress = DecodePaymentAddress(v[i]); + if (boost::get(&zAddress) != nullptr) { + sweepAddress = boost::get(zAddress); + } + } + } else { + return false; + } + } else { + if (boost::get(&rpcSweepAddress) != nullptr) { + sweepAddress = boost::get(rpcSweepAddress); + } else { + return false; + } + } + + for (auto & entry : saplingEntries) { + //Map all notes by address + if (sweepAddress == entry.address) { + continue; + } else { + std::map>::iterator it; + it = mapAddresses.find(entry.address); + if (it != mapAddresses.end()) { + it->second.push_back(entry); + } else { + std::vector entries; + entries.push_back(entry); + mapAddresses[entry.address] = entries; + } + } + } + } + + int numTxCreated = 0; + std::vector sweepTxIds; + CAmount amountSwept = 0; + CCoinsViewCache coinsView(pcoinsTip); + bool sweepComplete = true; + + for (std::map>::iterator it = mapAddresses.begin(); it != mapAddresses.end(); it++) { + auto addr = (*it).first; + auto saplingEntries = (*it).second; + + libzcash::SaplingExtendedSpendingKey extsk; + if (pwalletMain->GetSaplingExtendedSpendingKey(addr, extsk)) { + + std::vector fromNotes; + CAmount amountToSend = 0; + int maxInputs = GetArg("-zsweepmaxinputs", 8); + if( maxInputs > 100 || maxInputs < 5) { + fprintf(stderr,"%s: Invalid zsweep maxinputs=%d is >100 and <5, setting to default of 8\n", __func__, maxInputs); + maxInputs = 8; + } + + //Count Notes availiable for this address + int targetCount = 0; + int noteCount = 0; + for (const SaplingNoteEntry& saplingEntry : saplingEntries) { + + libzcash::SaplingIncomingViewingKey ivk; + pwalletMain->GetSaplingIncomingViewingKey(boost::get(saplingEntry.address), ivk); + + if (ivk == extsk.expsk.full_viewing_key().in_viewing_key() && saplingEntry.address == addr) { + noteCount++; + } + } + + //Don't sweep if under the threshold + if (noteCount <= targetCount){ + continue; + } + + //if we make it here then we need to sweep and the routine is considered incomplete + sweepComplete = false; + + for (const SaplingNoteEntry& saplingEntry : saplingEntries) { + + libzcash::SaplingIncomingViewingKey ivk; + pwalletMain->GetSaplingIncomingViewingKey(boost::get(saplingEntry.address), ivk); + + //Select Notes from that same address we will be sending to. + if (ivk == extsk.expsk.full_viewing_key().in_viewing_key() && saplingEntry.address == addr) { + amountToSend += CAmount(saplingEntry.note.value()); + fromNotes.push_back(saplingEntry); + } + + if (fromNotes.size() >= maxInputs) + break; + + } + + int minQuantity = 1; + if (fromNotes.size() < minQuantity) + continue; + + CAmount fee = fSweepTxFee; + if (amountToSend <= fSweepTxFee) { + fee = 0; + } + amountSwept += amountToSend; + auto builder = TransactionBuilder(consensusParams, targetHeight_, pwalletMain); + { + LOCK2(cs_main, pwalletMain->cs_wallet); + builder.SetExpiryHeight(chainActive.Tip()->GetHeight()+ SWEEP_EXPIRY_DELTA); + } + LogPrint("zrpcunsafe", "%s: Beginning creating transaction with Sapling output amount=%s\n", getId(), FormatMoney(amountToSend - fee)); + + // Select Sapling notes + std::vector ops; + std::vector notes; + for (auto fromNote : fromNotes) { + ops.push_back(fromNote.op); + notes.push_back(fromNote.note); + } + + // Fetch Sapling anchor and witnesses + uint256 anchor; + std::vector> witnesses; + { + LOCK2(cs_main, pwalletMain->cs_wallet); + pwalletMain->GetSaplingNoteWitnesses(ops, witnesses, anchor); + } + + // Add Sapling spends + for (size_t i = 0; i < notes.size(); i++) { + if (!witnesses[i]) { + LogPrint("zrpcunsafe", "%s: Missing Witnesses. Stopping.\n", getId()); + break; + } + builder.AddSaplingSpend(extsk.expsk, notes[i], anchor, witnesses[i].get()); + } + + builder.SetFee(fee); + builder.AddSaplingOutput(extsk.expsk.ovk, sweepAddress, amountToSend - fee); + + // Add sietch zouts + int ZOUTS = 7; + for(size_t i = 0; i < ZOUTS; i++) { + // In Privacy Zdust We Trust -- Duke + string zdust = randomSietchZaddr(); + auto zaddr = DecodePaymentAddress(zdust); + if (IsValidPaymentAddress(zaddr)) { + CAmount amount=0; + auto sietchZoutput = boost::get(zaddr); + LogPrint("zrpcunsafe", "%s: Adding Sietch zdust output %d\n", __func__, i); // %d %s amount=%li\n", __func__, i, zaddr, amount); + + builder.AddSaplingOutput(extsk.expsk.ovk, sietchZoutput, amount); + } else { + LogPrint("zrpcunsafe", "%s: Invalid payment address %s! Stopping.\n", __func__, zdust); + // status = false; + break; + } + } + LogPrint("zrpcunsafe", "%s: Done adding %d sietch zouts\n", __func__, ZOUTS); + + auto maybe_tx = builder.Build(); + if (!maybe_tx) { + LogPrint("zrpcunsafe", "%s: Failed to build transaction %s.\n",__func__, getId()); + // status=false; + break; + } + CTransaction tx = maybe_tx.get(); + + if (isCancelled()) { + LogPrint("zrpcunsafe", "%s: Canceled. Stopping.\n", getId()); + break; + } + + pwalletMain->CommitAutomatedTx(tx); + LogPrint("zrpcunsafe", "%s: Committed sweep transaction with txid=%s\n", getId(), tx.GetHash().ToString()); + amountSwept += amountToSend - fee; + sweepTxIds.push_back(tx.GetHash().ToString()); + + } + } + + if (sweepComplete) { + int sweepInterval = GetArg("-zsweepinterval", 5); + if (sweepInterval < 1) { + fprintf(stderr,"%s: Invalid sweep interval of %d, setting to default of 5\n", __func__, sweepInterval); + sweepInterval = 5; + } + pwalletMain->nextSweep = sweepInterval + chainActive.Tip()->GetHeight(); + pwalletMain->fSweepRunning = false; + } + + LogPrint("zrpcunsafe", "%s: Created %d transactions with total Sapling output amount=%s\n", getId(), numTxCreated, FormatMoney(amountSwept)); + setSweepResult(numTxCreated, amountSwept, sweepTxIds); + return true; + +} + +void AsyncRPCOperation_sweep::setSweepResult(int numTxCreated, const CAmount& amountSwept, const std::vector& sweepTxIds) { + UniValue res(UniValue::VOBJ); + res.push_back(Pair("num_tx_created", numTxCreated)); + res.push_back(Pair("amount_swept", FormatMoney(amountSwept))); + UniValue txIds(UniValue::VARR); + for (const std::string& txId : sweepTxIds) { + txIds.push_back(txId); + } + res.push_back(Pair("sweep_txids", txIds)); + set_result(res); +} + +void AsyncRPCOperation_sweep::cancel() { + set_state(OperationStatus::CANCELLED); +} + +UniValue AsyncRPCOperation_sweep::getStatus() const { + UniValue v = AsyncRPCOperation::getStatus(); + UniValue obj = v.get_obj(); + obj.push_back(Pair("method", "sweep")); + obj.push_back(Pair("target_height", targetHeight_)); + return obj; +} diff --git a/src/wallet/asyncrpcoperation_sweep.h b/src/wallet/asyncrpcoperation_sweep.h new file mode 100644 index 000000000..8927bf8a3 --- /dev/null +++ b/src/wallet/asyncrpcoperation_sweep.h @@ -0,0 +1,42 @@ +// Copyright (c) 2016-2022 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 +#include "amount.h" +#include "asyncrpcoperation.h" +#include "univalue.h" +#include "zcash/Address.hpp" +#include "zcash/zip32.h" + +//Default fee used for sweep transactions +static const CAmount DEFAULT_SWEEP_FEE = 10000; +extern CAmount fSweepTxFee; +extern bool fSweepMapUsed; +extern boost::optional rpcSweepAddress; + +class AsyncRPCOperation_sweep : public AsyncRPCOperation +{ +public: + AsyncRPCOperation_sweep(int targetHeight, bool fromRpc = false); + virtual ~AsyncRPCOperation_sweep(); + + // We don't want to be copied or moved around + AsyncRPCOperation_sweep(AsyncRPCOperation_sweep const&) = delete; // Copy construct + AsyncRPCOperation_sweep(AsyncRPCOperation_sweep&&) = delete; // Move construct + AsyncRPCOperation_sweep& operator=(AsyncRPCOperation_sweep const&) = delete; // Copy assign + AsyncRPCOperation_sweep& operator=(AsyncRPCOperation_sweep&&) = delete; // Move assign + + virtual void main(); + + virtual void cancel(); + + virtual UniValue getStatus() const; + +private: + int targetHeight_; + bool fromRPC_; + + bool main_impl(); + + void setSweepResult(int numTxCreated, const CAmount& amountSwept, const std::vector& sweepTxIds); + +}; From 4aedeb557bcd83c8a3f36c49dfa7144500631f2f Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Sat, 27 Aug 2022 10:35:08 -0700 Subject: [PATCH 019/295] Add z_sweepstatus RPC --- src/init.cpp | 1 + src/rpc/server.h | 1 + src/wallet/asyncrpcoperation_sweep.cpp | 2 +- src/wallet/rpcwallet.cpp | 42 ++++++++++++++++++++++++++ src/wallet/wallet.h | 6 +++- 5 files changed, 50 insertions(+), 2 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index dd6666710..2827a2bb9 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -2086,6 +2086,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) } auto hasSpendingKey = boost::apply_visitor(HaveSpendingKeyForPaymentAddress(pwalletMain), zSweep); auto allowSweepToExternalWallet = GetArg("-zsweepexternal", false); + pwalletMain->sweepAddress = vSweep[i]; if (!hasSpendingKey) { if (allowSweepToExternalWallet) { diff --git a/src/rpc/server.h b/src/rpc/server.h index b6a20b559..b2c361765 100644 --- a/src/rpc/server.h +++ b/src/rpc/server.h @@ -472,6 +472,7 @@ extern UniValue z_getbalance(const UniValue& params, bool fHelp, const CPubKey& extern UniValue z_gettotalbalance(const UniValue& params, bool fHelp, const CPubKey& mypk); // in rpcwallet.cpp extern UniValue z_mergetoaddress(const UniValue& params, bool fHelp, const CPubKey& mypk); // in rpcwallet.cpp extern UniValue z_sendmany(const UniValue& params, bool fHelp, const CPubKey& mypk); // in rpcwallet.cpp +extern UniValue z_sweepstatus(const UniValue& params, bool fHelp, const CPubKey& mypk); // in rpcwallet.cpp extern UniValue z_shieldcoinbase(const UniValue& params, bool fHelp, const CPubKey& mypk); // in rpcwallet.cpp extern UniValue z_getoperationstatus(const UniValue& params, bool fHelp, const CPubKey& mypk); // in rpcwallet.cpp extern UniValue z_getoperationresult(const UniValue& params, bool fHelp, const CPubKey& mypk); // in rpcwallet.cpp diff --git a/src/wallet/asyncrpcoperation_sweep.cpp b/src/wallet/asyncrpcoperation_sweep.cpp index 140c9902a..a2b6a19c3 100644 --- a/src/wallet/asyncrpcoperation_sweep.cpp +++ b/src/wallet/asyncrpcoperation_sweep.cpp @@ -64,7 +64,7 @@ void AsyncRPCOperation_sweep::main() { set_state(OperationStatus::FAILED); } - std::string s = strprintf("%s: Sapling Sweep transaction created. (status=%s", getId(), getStateAsString()); + std::string s = strprintf("%s: Sweep transaction created. (status=%s", getId(), getStateAsString()); if (success) { s += strprintf(", success)\n"); } else { diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 42a145b94..e596ed03f 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3315,6 +3315,48 @@ UniValue getalldata(const UniValue& params, bool fHelp,const CPubKey&) return returnObj; } +UniValue z_sweepstatus(const UniValue& params, bool fHelp, const CPubKey& mypk) +{ + + if (!EnsureWalletIsAvailable(fHelp)) + return NullUniValue; + + if (fHelp || params.size() > 0) + throw runtime_error( + "z_sweepstatus\n" + "\nGive details about zsweep operations since the node was started." + "}\n" + "\nExamples:\n" + + HelpExampleCli("z_sweepstatus", "") + + HelpExampleRpc("z_sweepstatus", "") + ); + + LOCK2(cs_main, pwalletMain->cs_wallet); + + UniValue ret(UniValue::VOBJ); + auto amount_swept; + ret.push_back(Pair("zsweep", pwalletMain->fSweepEnabled)); + ret.push_back(Pair("running", pwalletMain->fSweepRunning)); + ret.push_back(Pair("amount_swept", amount_swept)); + + if (pwalletMain->fConsolidationRunning) { + ret.push_back(Pair("next_zsweep", pwalletMain->sweepInterval + chainActive.Tip()->GetHeight())); + } else { + if (pwalletMain->nextConsolidation == 0) { + ret.push_back(Pair("next_zsweep", chainActive.Tip()->GetHeight() + 1)); + } else { + ret.push_back(Pair("next_zsweep", pwalletMain->nextSweep)); + } + } + ret.push_back(Pair("zsweepinterval", pwalletMain->sweepInterval)); + ret.push_back(Pair("zsweepaddress", pwalletMain->sweepAddress)); + ret.push_back(Pair("zsweepmaxinputs", pwalletMain->sweepMaxInputs)); + ret.push_back(Pair("zsweepfee", pwalletMain->sweepFee)); + ret.push_back(Pair("zsweepexternal", pwalletMain->fSweepExternalEnabled)); + + return ret; +} + UniValue z_listreceivedaddress(const UniValue& params, bool fHelp,const CPubKey&) { if (!EnsureWalletIsAvailable(fHelp)) diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index f633f2564..ada169c73 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -805,8 +805,12 @@ public: bool fSaplingConsolidationEnabled = false; bool fConsolidationRunning = false; bool fSweepEnabled = false; + bool fSweepExternalEnabled = false; bool fSweepRunning = false; - int nextSweep = 0; + int nextSweep = 0; + int sweepInterval = 20; + int sweepMaxInputs = 200; + std::string sweepAddress = ""; void ClearNoteWitnessCache(); From 4eec81b1916302a895ed32aef93b9915f742b1cb Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sat, 27 Aug 2022 13:57:00 -0400 Subject: [PATCH 020/295] Fix some issues in z_sweepstatus --- src/wallet/rpcwallet.cpp | 3 +-- src/wallet/wallet.h | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index e596ed03f..c977e2764 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3334,10 +3334,9 @@ UniValue z_sweepstatus(const UniValue& params, bool fHelp, const CPubKey& mypk) LOCK2(cs_main, pwalletMain->cs_wallet); UniValue ret(UniValue::VOBJ); - auto amount_swept; ret.push_back(Pair("zsweep", pwalletMain->fSweepEnabled)); ret.push_back(Pair("running", pwalletMain->fSweepRunning)); - ret.push_back(Pair("amount_swept", amount_swept)); + ret.push_back(Pair("amount_swept", pwalletMain->amountSwept)); if (pwalletMain->fConsolidationRunning) { ret.push_back(Pair("next_zsweep", pwalletMain->sweepInterval + chainActive.Tip()->GetHeight())); diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index ada169c73..4ae4716cb 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -808,7 +808,9 @@ public: bool fSweepExternalEnabled = false; bool fSweepRunning = false; int nextSweep = 0; + int amountSwept = 0; int sweepInterval = 20; + int sweepFee = 10000; int sweepMaxInputs = 200; std::string sweepAddress = ""; From 37301759713fce42d434f2e38d3694fa200d9267 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sat, 27 Aug 2022 14:04:53 -0400 Subject: [PATCH 021/295] Add some logging when skipping sweep/consolidation --- src/wallet/wallet.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 83f95cbb3..8c6e82586 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -520,12 +520,14 @@ void CWallet::RunSaplingSweep(int blockHeight) { } //Don't Run if consolidation will run soon. - if (fSaplingConsolidationEnabled && nextConsolidation - 15 <= blockHeight) { + if (fSaplingConsolidationEnabled && nextConsolidation - 5 <= blockHeight) { + LogPrintf("%s: not consolidating since next sweep is within 5 blocks\n", __func__); return; } //Don't Run While consolidation is running. if (fConsolidationRunning) { + LogPrintf("%s: not sweeping since consolidation is currently running\n", __func__); return; } From 0e3889c96ae3fab105acc524b87450477ef7d744 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sat, 27 Aug 2022 15:03:11 -0400 Subject: [PATCH 022/295] List z_sweepstatus in RPC list --- src/wallet/rpcwallet.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index c977e2764..00d120f54 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -8536,6 +8536,7 @@ static const CRPCCommand commands[] = { "wallet", "z_anonsetblockdelta", &z_anonsetblockdelta, true }, { "wallet", "z_gettotalbalance", &z_gettotalbalance, false }, { "wallet", "z_mergetoaddress", &z_mergetoaddress, false }, + { "wallet", "z_sweepstatus", &z_sweepstatus, true }, { "wallet", "z_sendmany", &z_sendmany, false }, { "wallet", "z_shieldcoinbase", &z_shieldcoinbase, false }, { "wallet", "z_getoperationstatus", &z_getoperationstatus, true }, From 1748f0f2a30da57129d3e01bcab029498f1744b8 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sat, 27 Aug 2022 22:31:40 -0400 Subject: [PATCH 023/295] Improved logging and error checking in consolidation and sweeping --- ...asyncrpcoperation_saplingconsolidation.cpp | 22 +++++------ src/wallet/asyncrpcoperation_sweep.cpp | 38 +++++++++++-------- 2 files changed, 34 insertions(+), 26 deletions(-) diff --git a/src/wallet/asyncrpcoperation_saplingconsolidation.cpp b/src/wallet/asyncrpcoperation_saplingconsolidation.cpp index 361d04390..25c1f54ac 100644 --- a/src/wallet/asyncrpcoperation_saplingconsolidation.cpp +++ b/src/wallet/asyncrpcoperation_saplingconsolidation.cpp @@ -82,7 +82,7 @@ bool AsyncRPCOperation_saplingconsolidation::main_impl() { auto consensusParams = Params().GetConsensus(); auto nextActivationHeight = NextActivationHeight(targetHeight_, consensusParams); if (nextActivationHeight && targetHeight_ + CONSOLIDATION_EXPIRY_DELTA >= nextActivationHeight.get()) { - LogPrint("zrpcunsafe", "%s: Consolidation txs would be created before a NU activation but may expire after. Skipping this round.\n",opid); + LogPrintf("%s: Consolidation txs would be created before a NU activation but may expire after. Skipping this round.\n",opid); setConsolidationResult(0, 0, std::vector()); return status; } @@ -97,7 +97,7 @@ bool AsyncRPCOperation_saplingconsolidation::main_impl() { pwalletMain->GetFilteredNotes(saplingEntries, "", 11); if(saplingEntries.size() == 0) { - LogPrint("zrpcunsafe", "%s: Nothing to consolidate, done.\n",opid); + LogPrintf("%s: Nothing to consolidate, done.\n",opid); return true; } @@ -109,7 +109,7 @@ bool AsyncRPCOperation_saplingconsolidation::main_impl() { libzcash::SaplingPaymentAddress saplingAddress = boost::get(zAddress); addresses.insert(saplingAddress); } else { - LogPrint("zrpcunsafe", "%s: Invalid zaddr, exiting\n", opid); + LogPrintf("%s: Invalid zaddr, exiting\n", opid); return false; } } @@ -176,14 +176,14 @@ bool AsyncRPCOperation_saplingconsolidation::main_impl() { std::vector> witnesses; { LOCK2(cs_main, pwalletMain->cs_wallet); - LogPrint("zrpcunsafe", "%s: Fetching note witnesses\n", opid); + // LogPrint("zrpcunsafe", "%s: Fetching note witnesses\n", opid); pwalletMain->GetSaplingNoteWitnesses(ops, witnesses, anchor); } // Add Sapling spends for (size_t i = 0; i < notes.size(); i++) { if (!witnesses[i]) { - LogPrint("zrpcunsafe", "%s: Missing Witnesses. Stopping.\n", opid); + LogPrintf("%s: Missing Witnesses! Stopping.\n", opid); status=false; break; } @@ -213,7 +213,7 @@ bool AsyncRPCOperation_saplingconsolidation::main_impl() { // actually add our sietch zoutput, the new way builder.AddSaplingOutput(extsk.expsk.ovk, sietchZoutput, amount); } else { - LogPrint("zrpcunsafe", "%s: Invalid payment address %s! Stopping.\n", opid, zdust); + LogPrintf("%s: Invalid payment address %s! Stopping.\n", opid, zdust); status = false; break; } @@ -223,25 +223,25 @@ bool AsyncRPCOperation_saplingconsolidation::main_impl() { auto maybe_tx = builder.Build(); if (!maybe_tx) { - LogPrint("zrpcunsafe", "%s: Failed to build transaction.\n",opid); + LogPrintf("%s: Failed to build transaction.\n",opid); status=false; break; } CTransaction tx = maybe_tx.get(); if (isCancelled()) { - LogPrint("zrpcunsafe", "%s: Canceled. Stopping.\n", opid); + LogPrintf("%s: Canceled. Stopping.\n", opid); status=false; break; } if(pwalletMain->CommitAutomatedTx(tx)) { - LogPrint("zrpcunsafe", "%s: Committed consolidation transaction with txid=%s\n",opid, tx.GetHash().ToString()); + LogPrintf("%s: Committed consolidation transaction with txid=%s\n",opid, tx.GetHash().ToString()); amountConsolidated += actualAmountToSend; consolidationTxIds.push_back(tx.GetHash().ToString()); numTxCreated++; } else { - LogPrint("zrpcunsafe", "%s: Consolidation transaction FAILED in CommitTransaction, txid=%s\n",opid , tx.GetHash().ToString()); + LogPrintf("%s: Consolidation transaction FAILED in CommitTransaction, txid=%s\n",opid , tx.GetHash().ToString()); setConsolidationResult(numTxCreated, amountConsolidated, consolidationTxIds); status = false; break; @@ -249,7 +249,7 @@ bool AsyncRPCOperation_saplingconsolidation::main_impl() { } } - LogPrint("zrpcunsafe", "%s: Created %d transactions with total Sapling output amount=%s,status=%d\n",opid , numTxCreated, FormatMoney(amountConsolidated), (int)status); + LogPrintf("%s: Created %d transactions with total Sapling output amount=%s,status=%d\n",opid , numTxCreated, FormatMoney(amountConsolidated), (int)status); setConsolidationResult(numTxCreated, amountConsolidated, consolidationTxIds); return status; } diff --git a/src/wallet/asyncrpcoperation_sweep.cpp b/src/wallet/asyncrpcoperation_sweep.cpp index a2b6a19c3..60132bb38 100644 --- a/src/wallet/asyncrpcoperation_sweep.cpp +++ b/src/wallet/asyncrpcoperation_sweep.cpp @@ -75,11 +75,13 @@ void AsyncRPCOperation_sweep::main() { } bool AsyncRPCOperation_sweep::main_impl() { - LogPrint("zrpcunsafe", "%s: Beginning asyncrpcoperation_sweep.\n", getId()); + bool status=true; + auto opid=getId(); + LogPrintf("%s: Beginning asyncrpcoperation_sweep.\n", getId()); auto consensusParams = Params().GetConsensus(); auto nextActivationHeight = NextActivationHeight(targetHeight_, consensusParams); if (nextActivationHeight && targetHeight_ + SWEEP_EXPIRY_DELTA >= nextActivationHeight.get()) { - LogPrint("zrpcunsafe", "%s: Sweep txs would be created before a NU activation but may expire after. Skipping this round.\n", getId()); + LogPrintf("%s: Sweep txs would be created before a NU activation but may expire after. Skipping this round.\n", getId()); setSweepResult(0, 0, std::vector()); return true; } @@ -201,7 +203,7 @@ bool AsyncRPCOperation_sweep::main_impl() { LOCK2(cs_main, pwalletMain->cs_wallet); builder.SetExpiryHeight(chainActive.Tip()->GetHeight()+ SWEEP_EXPIRY_DELTA); } - LogPrint("zrpcunsafe", "%s: Beginning creating transaction with Sapling output amount=%s\n", getId(), FormatMoney(amountToSend - fee)); + LogPrintf("%s: Beginning creating transaction with Sapling output amount=%s\n", getId(), FormatMoney(amountToSend - fee)); // Select Sapling notes std::vector ops; @@ -222,7 +224,7 @@ bool AsyncRPCOperation_sweep::main_impl() { // Add Sapling spends for (size_t i = 0; i < notes.size(); i++) { if (!witnesses[i]) { - LogPrint("zrpcunsafe", "%s: Missing Witnesses. Stopping.\n", getId()); + LogPrintf("%s: Missing Witnesses! Stopping.\n", getId()); break; } builder.AddSaplingSpend(extsk.expsk, notes[i], anchor, witnesses[i].get()); @@ -244,8 +246,8 @@ bool AsyncRPCOperation_sweep::main_impl() { builder.AddSaplingOutput(extsk.expsk.ovk, sietchZoutput, amount); } else { - LogPrint("zrpcunsafe", "%s: Invalid payment address %s! Stopping.\n", __func__, zdust); - // status = false; + LogPrintf("%s: Invalid payment address %s! Stopping.\n", __func__, zdust); + status = false; break; } } @@ -253,22 +255,28 @@ bool AsyncRPCOperation_sweep::main_impl() { auto maybe_tx = builder.Build(); if (!maybe_tx) { - LogPrint("zrpcunsafe", "%s: Failed to build transaction %s.\n",__func__, getId()); - // status=false; + LogPrintf("%s: Failed to build transaction %s.\n",__func__, getId()); + status=false; break; } CTransaction tx = maybe_tx.get(); if (isCancelled()) { - LogPrint("zrpcunsafe", "%s: Canceled. Stopping.\n", getId()); + LogPrintf("%s: Canceled. Stopping.\n", getId()); break; } - pwalletMain->CommitAutomatedTx(tx); - LogPrint("zrpcunsafe", "%s: Committed sweep transaction with txid=%s\n", getId(), tx.GetHash().ToString()); - amountSwept += amountToSend - fee; - sweepTxIds.push_back(tx.GetHash().ToString()); - + if (pwalletMain->CommitAutomatedTx(tx)) { + LogPrintf("%s: Committed sweep transaction with txid=%s\n", getId(), tx.GetHash().ToString()); + amountSwept += amountToSend - fee; + sweepTxIds.push_back(tx.GetHash().ToString()); + numTxCreated++; + } else { + LogPrintf("%s: Sweep transaction FAILED in CommitTransaction, txid=%s\n",opid , tx.GetHash().ToString()); + setSweepResult(numTxCreated, amountSwept, sweepTxIds); + status = false; + break; + } } } @@ -282,7 +290,7 @@ bool AsyncRPCOperation_sweep::main_impl() { pwalletMain->fSweepRunning = false; } - LogPrint("zrpcunsafe", "%s: Created %d transactions with total Sapling output amount=%s\n", getId(), numTxCreated, FormatMoney(amountSwept)); + LogPrintf("%s: Created %d transactions with total output amount=%s\n", getId(), numTxCreated, FormatMoney(amountSwept)); setSweepResult(numTxCreated, amountSwept, sweepTxIds); return true; From 702c2163cd13137e71778beca613ab4b7f792dda Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 30 Aug 2022 21:05:09 -0400 Subject: [PATCH 024/295] Log if we have no zsweepaddress or an invalid zsweepaddress --- src/wallet/asyncrpcoperation_sweep.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wallet/asyncrpcoperation_sweep.cpp b/src/wallet/asyncrpcoperation_sweep.cpp index 60132bb38..b76915e92 100644 --- a/src/wallet/asyncrpcoperation_sweep.cpp +++ b/src/wallet/asyncrpcoperation_sweep.cpp @@ -103,12 +103,14 @@ bool AsyncRPCOperation_sweep::main_impl() { } } } else { + LogPrintf("%s: No zsweepaddress configured, exiting\n", opid); return false; } } else { if (boost::get(&rpcSweepAddress) != nullptr) { sweepAddress = boost::get(rpcSweepAddress); } else { + LogPrintf("%s: Invalid zsweepaddress, exiting\n", opid); return false; } } From b4b6988eb03cfc90332fbc82dec4e7e5d64b48be Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 30 Aug 2022 21:05:27 -0400 Subject: [PATCH 025/295] Log when we use fee=0 for small inputs --- src/wallet/asyncrpcoperation_sweep.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wallet/asyncrpcoperation_sweep.cpp b/src/wallet/asyncrpcoperation_sweep.cpp index b76915e92..721309385 100644 --- a/src/wallet/asyncrpcoperation_sweep.cpp +++ b/src/wallet/asyncrpcoperation_sweep.cpp @@ -197,9 +197,10 @@ bool AsyncRPCOperation_sweep::main_impl() { CAmount fee = fSweepTxFee; if (amountToSend <= fSweepTxFee) { - fee = 0; + LogPrintf("%s: Amount to send %s is <= fee, using fee=0", getId(), FormatMoney(amountToSend)); + fee = 0; } - amountSwept += amountToSend; + auto builder = TransactionBuilder(consensusParams, targetHeight_, pwalletMain); { LOCK2(cs_main, pwalletMain->cs_wallet); From b50c51f797c3b146ffb4bc81fa668e97e9d619cb Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 30 Aug 2022 21:05:57 -0400 Subject: [PATCH 026/295] Log value of status and correctly return status value instead of always returning success, derp --- src/wallet/asyncrpcoperation_sweep.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/wallet/asyncrpcoperation_sweep.cpp b/src/wallet/asyncrpcoperation_sweep.cpp index 721309385..780ddfa29 100644 --- a/src/wallet/asyncrpcoperation_sweep.cpp +++ b/src/wallet/asyncrpcoperation_sweep.cpp @@ -293,10 +293,9 @@ bool AsyncRPCOperation_sweep::main_impl() { pwalletMain->fSweepRunning = false; } - LogPrintf("%s: Created %d transactions with total output amount=%s\n", getId(), numTxCreated, FormatMoney(amountSwept)); + LogPrintf("%s: Created %d transactions with total output amount=%s, status=%d\n", getId(), numTxCreated, FormatMoney(amountSwept), (int)status); setSweepResult(numTxCreated, amountSwept, sweepTxIds); - return true; - + return status; } void AsyncRPCOperation_sweep::setSweepResult(int numTxCreated, const CAmount& amountSwept, const std::vector& sweepTxIds) { From 57baf25b0257c30636484b6ac8e8191b2f2ab320 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 30 Aug 2022 22:05:41 -0400 Subject: [PATCH 027/295] Do not add to amountConsolidated until we successfully create the tx and only do it once --- src/wallet/asyncrpcoperation_saplingconsolidation.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/wallet/asyncrpcoperation_saplingconsolidation.cpp b/src/wallet/asyncrpcoperation_saplingconsolidation.cpp index 25c1f54ac..f9f2ebe1e 100644 --- a/src/wallet/asyncrpcoperation_saplingconsolidation.cpp +++ b/src/wallet/asyncrpcoperation_saplingconsolidation.cpp @@ -157,7 +157,6 @@ bool AsyncRPCOperation_saplingconsolidation::main_impl() { if (fromNotes.size() < minQuantity) continue; - amountConsolidated += amountToSend; auto builder = TransactionBuilder(consensusParams, targetHeight_, pwalletMain); builder.SetExpiryHeight(targetHeight_ + CONSOLIDATION_EXPIRY_DELTA); auto actualAmountToSend = amountToSend < fConsolidationTxFee ? 0 : amountToSend - fConsolidationTxFee; @@ -219,8 +218,6 @@ bool AsyncRPCOperation_saplingconsolidation::main_impl() { } } LogPrint("zrpcunsafe", "%s: Done adding %d sietch zouts\n", opid, MIN_ZOUTS); - //CTransaction tx = builder.Build(); - auto maybe_tx = builder.Build(); if (!maybe_tx) { LogPrintf("%s: Failed to build transaction.\n",opid); From 88263995c81c5c62f367bf3c2bb3bf7eb8ce2d7f Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 30 Aug 2022 22:27:34 -0400 Subject: [PATCH 028/295] Do not coredump if pnode=NULL in RelayTransaction --- src/net.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/net.cpp b/src/net.cpp index db47d5ec7..7df4f5e90 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2125,6 +2125,10 @@ void RelayTransaction(const CTransaction& tx, const CDataStream& ss) // Only relay to randomly chosen 50% of peers BOOST_FOREACH(CNode* pnode, vRelayNodes) { + //TODO: correct fix is to correctly LOCK vRelayNodes + if(!pnode) + continue; + if(!pnode->fRelayTxes) continue; LOCK(pnode->cs_filter); From 26fd16cb523abddfc2ee38f7b1766ddef20d9434 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Wed, 31 Aug 2022 11:09:18 -0700 Subject: [PATCH 029/295] Avoid relaying expired transactions which causes other nodes to ban us --- src/wallet/wallet.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 8c6e82586..1db729e2f 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3121,6 +3121,13 @@ std::vector CWallet::ResendWalletTransactionsBefore(int64_t nTime) if (wtx.nTimeReceived > nTime) continue; + // Do not relay expired transactions, to avoid other nodes banning us + if (wtx.nExpiryHeight > 0 && wtx.nExpiryHeight < chainActive.LastTip->GetHeight()) { + fprintf(stderr,"%s: ignoring expired tx %s\n", wtx.GetHash().ToString().c_str() ); + // TODO: should we call EraseFromWallet(wtx) right here? + continue; + } + if ( (wtx.nLockTime >= LOCKTIME_THRESHOLD && wtx.nLockTime < now-HUSH_MAXMEMPOOLTIME) ) { if(fDebug) { From 4573a8336f84fb63e5d0641be520561aafe80ff8 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Wed, 31 Aug 2022 14:10:40 -0400 Subject: [PATCH 030/295] Fix compile error --- src/wallet/wallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 1db729e2f..d7b818723 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3122,7 +3122,7 @@ std::vector CWallet::ResendWalletTransactionsBefore(int64_t nTime) continue; // Do not relay expired transactions, to avoid other nodes banning us - if (wtx.nExpiryHeight > 0 && wtx.nExpiryHeight < chainActive.LastTip->GetHeight()) { + if (wtx.nExpiryHeight > 0 && wtx.nExpiryHeight < chainActive.LastTip()->GetHeight()) { fprintf(stderr,"%s: ignoring expired tx %s\n", wtx.GetHash().ToString().c_str() ); // TODO: should we call EraseFromWallet(wtx) right here? continue; From 63f9e2230818ee817c595b3ac5254d0904bbd103 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Wed, 31 Aug 2022 14:15:38 -0400 Subject: [PATCH 031/295] log the function name correctly --- src/wallet/wallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index d7b818723..229f49275 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3123,7 +3123,7 @@ std::vector CWallet::ResendWalletTransactionsBefore(int64_t nTime) // Do not relay expired transactions, to avoid other nodes banning us if (wtx.nExpiryHeight > 0 && wtx.nExpiryHeight < chainActive.LastTip()->GetHeight()) { - fprintf(stderr,"%s: ignoring expired tx %s\n", wtx.GetHash().ToString().c_str() ); + fprintf(stderr,"%s: ignoring expired tx %s\n", __func__, wtx.GetHash().ToString().c_str() ); // TODO: should we call EraseFromWallet(wtx) right here? continue; } From 0c2487c4271eaf80286478cb21ad8754ec281f0a Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 18 Jul 2022 10:43:22 -0400 Subject: [PATCH 032/295] Throw error in wallet if ReadBlockFromDisk fails --- src/wallet/wallet.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 8d12d903a..bda0140f0 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1032,7 +1032,10 @@ int CWallet::VerifyAndSetInitialWitness(const CBlockIndex* pindex, bool witnessO //Cycle through blocks and transactions building sapling tree until the commitment needed is reached const CBlock* pblock; CBlock block; - ReadBlockFromDisk(block, pblockindex, 1); + if (!ReadBlockFromDisk(block, pblockindex, 1)) { + throw std::runtime_error( + strprintf("Cannot read block height %d (%s) from disk", pindex->GetHeight(), pindex->GetBlockHash().GetHex())); + } pblock = █ for (const CTransaction& tx : block.vtx) { @@ -1102,7 +1105,10 @@ void CWallet::BuildWitnessCache(const CBlockIndex* pindex, bool witnessOnly) //Cycle through blocks and transactions building sapling tree until the commitment needed is reached CBlock block; - ReadBlockFromDisk(block, pblockindex, 1); + if (!ReadBlockFromDisk(block, pblockindex, 1)) { + throw std::runtime_error( + strprintf("Cannot read block height %d (%s) from disk", pindex->GetHeight(), pindex->GetBlockHash().GetHex())); + } for (std::pair& wtxItem : mapWallet) { @@ -2721,7 +2727,11 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate) CBlock block; bool involvesMe = false; - ReadBlockFromDisk(block, pindex,1); + if (!ReadBlockFromDisk(block, pindex,1)) { + throw std::runtime_error( + strprintf("Cannot read block height %d (%s) from disk", pindex->GetHeight(), pindex->GetBlockHash().GetHex())); + } + BOOST_FOREACH(CTransaction& tx, block.vtx) { if (AddToWalletIfInvolvingMe(tx, &block, fUpdate)) { From 43e0ec186b50b596008496ed8d044f0a2a79b485 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Sat, 3 Sep 2022 09:13:19 -0400 Subject: [PATCH 033/295] Get rid of CLIENT_DATE --- src/clientversion.cpp | 9 --------- src/clientversion.h | 1 - src/init.cpp | 2 +- src/wallet/rpcdump.cpp | 2 +- 4 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/clientversion.cpp b/src/clientversion.cpp index 5702fbb95..cd6126eb1 100644 --- a/src/clientversion.cpp +++ b/src/clientversion.cpp @@ -104,16 +104,7 @@ const std::string CLIENT_NAME = GetArg("-clientname", "GoldenSandtrout"); #endif #endif -#ifndef BUILD_DATE -#ifdef GIT_COMMIT_DATE -#define BUILD_DATE GIT_COMMIT_DATE -#else -#define BUILD_DATE __DATE__ ", " __TIME__ -#endif -#endif - const std::string CLIENT_BUILD(BUILD_DESC CLIENT_VERSION_SUFFIX); -const std::string CLIENT_DATE(BUILD_DATE); std::string FormatVersion(int nVersion) { diff --git a/src/clientversion.h b/src/clientversion.h index 1b2802b35..03657120e 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -73,7 +73,6 @@ static const int CLIENT_VERSION = extern const std::string CLIENT_NAME; extern const std::string CLIENT_BUILD; -extern const std::string CLIENT_DATE; std::string FormatVersion(int nVersion); diff --git a/src/init.cpp b/src/init.cpp index e057282be..6c0b81b75 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1063,7 +1063,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) LogPrintf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); - LogPrintf("Hush version %s (%s)\n", FormatFullVersion(), CLIENT_DATE); + LogPrintf("Hush version %s (%s)\n", FormatFullVersion()); // when specifying an explicit binding address, you want to listen on it // even when -connect or -proxy is specified diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index db2727923..8b3b932c1 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -677,7 +677,7 @@ UniValue dumpwallet_impl(const UniValue& params, bool fHelp, bool fDumpZKeys) std::sort(vKeyBirth.begin(), vKeyBirth.end()); // produce output - file << strprintf("# Wallet dump created by Hush %s (%s)\n", CLIENT_BUILD, CLIENT_DATE); + file << strprintf("# Wallet dump created by Hush %s (%s)\n", CLIENT_BUILD); file << strprintf("# * Created on %s\n", EncodeDumpTime(GetTime())); file << strprintf("# * Best block at time of backup was %i (%s),\n", chainActive.Height(), chainActive.Tip()->GetBlockHash().ToString()); file << strprintf("# mined on %s\n", EncodeDumpTime(chainActive.Tip()->GetBlockTime())); From b9101e67ab7703b064006f7e018463fe7a49684d Mon Sep 17 00:00:00 2001 From: jahway603 Date: Sat, 3 Sep 2022 09:20:09 -0400 Subject: [PATCH 034/295] removed unused file --- share/genbuild.sh | 51 ----------------------------------------------- 1 file changed, 51 deletions(-) delete mode 100755 share/genbuild.sh diff --git a/share/genbuild.sh b/share/genbuild.sh deleted file mode 100755 index a15cb34e4..000000000 --- a/share/genbuild.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh -if [ $# -gt 1 ]; then - cd "$2" -fi -if [ $# -gt 0 ]; then - FILE="$1" - shift - if [ -f "$FILE" ]; then - INFO="$(head -n 1 "$FILE")" - fi -else - echo "Usage: $0 " - exit 1 -fi - -DESC="" -SUFFIX="" -LAST_COMMIT_DATE="" -if [ -e "$(which git 2>/dev/null)" -a "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]; then - # clean 'dirty' status of touched files that haven't been modified - git diff >/dev/null 2>/dev/null - - # if latest commit is tagged and not dirty, then override using the tag name - RAWDESC=$(git describe --abbrev=0 2>/dev/null) - if [ "$(git rev-parse HEAD)" = "$(git rev-list -1 $RAWDESC 2>/dev/null)" ]; then - git diff-index --quiet HEAD -- && DESC=$RAWDESC - fi - - # otherwise generate suffix from git, i.e. string like "59887e8-dirty" - SUFFIX=$(git rev-parse --short HEAD) - git diff-index --quiet HEAD -- || SUFFIX="$SUFFIX-dirty" - - # get a string like "2012-04-10 16:27:19 +0200" - LAST_COMMIT_DATE="$(git log -n 1 --format="%ci")" -fi - -if [ -n "$DESC" ]; then - NEWINFO="#define BUILD_DESC \"$DESC\"" -elif [ -n "$SUFFIX" ]; then - NEWINFO="#define BUILD_SUFFIX $SUFFIX" -else - NEWINFO="// No build information available" -fi - -# only update build.h if necessary -if [ "$INFO" != "$NEWINFO" ]; then - echo "$NEWINFO" >"$FILE" - if [ -n "$LAST_COMMIT_DATE" ]; then - echo "#define BUILD_DATE \"$LAST_COMMIT_DATE\"" >> "$FILE" - fi -fi From 8ea5438a1615dfd135481519ab48ca9a5a37a813 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Sat, 3 Sep 2022 09:26:55 -0400 Subject: [PATCH 035/295] updated .gitignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index b2010491e..9fc50df80 100644 --- a/.gitignore +++ b/.gitignore @@ -31,7 +31,6 @@ libtool src/config/bitcoin-config.h src/config/bitcoin-config.h.in src/config/stamp-h1 -share/setup.nsi cache/ venv-mnf/ From 658160ce6cf73367020fb63e184e745a29ae5ac3 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Sat, 3 Sep 2022 09:44:59 -0400 Subject: [PATCH 036/295] still removing CLIENT_DATE --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index 6c0b81b75..e9adae1f4 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1501,7 +1501,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) //fprintf(stderr,"%s tik12\n", __FUNCTION__); LogPrintf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); - LogPrintf("Hush version %s (%s)\n", FormatFullVersion(), CLIENT_DATE); + LogPrintf("Hush version %s\n", FormatFullVersion()); if (fPrintToDebugLog) OpenDebugLog(); From 1085d15a2df6efd0b875e007ce4e68925b9da904 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Sat, 3 Sep 2022 09:51:59 -0400 Subject: [PATCH 037/295] Revert "removed unused file" This reverts commit b9101e67ab7703b064006f7e018463fe7a49684d. --- share/genbuild.sh | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100755 share/genbuild.sh diff --git a/share/genbuild.sh b/share/genbuild.sh new file mode 100755 index 000000000..a15cb34e4 --- /dev/null +++ b/share/genbuild.sh @@ -0,0 +1,51 @@ +#!/bin/sh +if [ $# -gt 1 ]; then + cd "$2" +fi +if [ $# -gt 0 ]; then + FILE="$1" + shift + if [ -f "$FILE" ]; then + INFO="$(head -n 1 "$FILE")" + fi +else + echo "Usage: $0 " + exit 1 +fi + +DESC="" +SUFFIX="" +LAST_COMMIT_DATE="" +if [ -e "$(which git 2>/dev/null)" -a "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]; then + # clean 'dirty' status of touched files that haven't been modified + git diff >/dev/null 2>/dev/null + + # if latest commit is tagged and not dirty, then override using the tag name + RAWDESC=$(git describe --abbrev=0 2>/dev/null) + if [ "$(git rev-parse HEAD)" = "$(git rev-list -1 $RAWDESC 2>/dev/null)" ]; then + git diff-index --quiet HEAD -- && DESC=$RAWDESC + fi + + # otherwise generate suffix from git, i.e. string like "59887e8-dirty" + SUFFIX=$(git rev-parse --short HEAD) + git diff-index --quiet HEAD -- || SUFFIX="$SUFFIX-dirty" + + # get a string like "2012-04-10 16:27:19 +0200" + LAST_COMMIT_DATE="$(git log -n 1 --format="%ci")" +fi + +if [ -n "$DESC" ]; then + NEWINFO="#define BUILD_DESC \"$DESC\"" +elif [ -n "$SUFFIX" ]; then + NEWINFO="#define BUILD_SUFFIX $SUFFIX" +else + NEWINFO="// No build information available" +fi + +# only update build.h if necessary +if [ "$INFO" != "$NEWINFO" ]; then + echo "$NEWINFO" >"$FILE" + if [ -n "$LAST_COMMIT_DATE" ]; then + echo "#define BUILD_DATE \"$LAST_COMMIT_DATE\"" >> "$FILE" + fi +fi From 7fc594d220830226777799400b59a17999b02ba1 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Sat, 3 Sep 2022 09:56:55 -0400 Subject: [PATCH 038/295] edits to genbuild.sh --- share/genbuild.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/share/genbuild.sh b/share/genbuild.sh index a15cb34e4..efe083f05 100755 --- a/share/genbuild.sh +++ b/share/genbuild.sh @@ -15,7 +15,6 @@ fi DESC="" SUFFIX="" -LAST_COMMIT_DATE="" if [ -e "$(which git 2>/dev/null)" -a "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]; then # clean 'dirty' status of touched files that haven't been modified git diff >/dev/null 2>/dev/null @@ -30,8 +29,6 @@ if [ -e "$(which git 2>/dev/null)" -a "$(git rev-parse --is-inside-work-tree 2>/ SUFFIX=$(git rev-parse --short HEAD) git diff-index --quiet HEAD -- || SUFFIX="$SUFFIX-dirty" - # get a string like "2012-04-10 16:27:19 +0200" - LAST_COMMIT_DATE="$(git log -n 1 --format="%ci")" fi if [ -n "$DESC" ]; then @@ -45,7 +42,4 @@ fi # only update build.h if necessary if [ "$INFO" != "$NEWINFO" ]; then echo "$NEWINFO" >"$FILE" - if [ -n "$LAST_COMMIT_DATE" ]; then - echo "#define BUILD_DATE \"$LAST_COMMIT_DATE\"" >> "$FILE" - fi fi From bf51d37e5dc20687f2bb820c0c95c6b6a7907032 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Sat, 3 Sep 2022 10:09:46 -0400 Subject: [PATCH 039/295] added copyright to genbuild.sh --- share/genbuild.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/genbuild.sh b/share/genbuild.sh index efe083f05..d4dc35ed4 100755 --- a/share/genbuild.sh +++ b/share/genbuild.sh @@ -1,4 +1,7 @@ #!/bin/sh +# Copyright (c) 2018-2022 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 if [ $# -gt 1 ]; then cd "$2" fi From 325dcec0ac790cae2dc2ed931f4ad73fab30483c Mon Sep 17 00:00:00 2001 From: jahway603 Date: Sat, 3 Sep 2022 10:22:00 -0400 Subject: [PATCH 040/295] remove unused function GetKeyID_NoCheck --- src/base58.cpp | 8 -------- src/base58.h | 2 -- 2 files changed, 10 deletions(-) diff --git a/src/base58.cpp b/src/base58.cpp index d46894ea0..831a4842e 100644 --- a/src/base58.cpp +++ b/src/base58.cpp @@ -323,14 +323,6 @@ bool CBitcoinAddress::GetKeyID(CKeyID& keyID) const return true; } -bool CBitcoinAddress::GetKeyID_NoCheck(CKeyID& keyID) const -{ - uint160 id; - memcpy(&id, &vchData[0], 20); - keyID = CKeyID(id); - return true; -} - bool CBitcoinAddress::IsScript() const { return IsValid() && vchVersion == Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS); diff --git a/src/base58.h b/src/base58.h index 6fa3f457f..1032a4f00 100644 --- a/src/base58.h +++ b/src/base58.h @@ -146,7 +146,6 @@ public: CTxDestination Get() const; bool GetKeyID(CKeyID &keyID) const; - bool GetKeyID_NoCheck(CKeyID& keyID) const; bool GetIndexKey(uint160& hashBytes, int& type, bool ccflag) const; bool IsScript() const; }; @@ -171,7 +170,6 @@ public: CTxDestination Get() const; bool GetKeyID(CKeyID &keyID) const; - bool GetKeyID_NoCheck(CKeyID& keyID) const; bool GetIndexKey(uint160& hashBytes, int& type, bool ccflag) const; bool IsScript() const; }; From 3327b25a288d5792a58c4723cfedcbf8578d40ea Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Sat, 3 Sep 2022 16:22:43 -0700 Subject: [PATCH 041/295] fix logging bug --- src/wallet/wallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 1db729e2f..453b486d8 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3123,7 +3123,7 @@ std::vector CWallet::ResendWalletTransactionsBefore(int64_t nTime) // Do not relay expired transactions, to avoid other nodes banning us if (wtx.nExpiryHeight > 0 && wtx.nExpiryHeight < chainActive.LastTip->GetHeight()) { - fprintf(stderr,"%s: ignoring expired tx %s\n", wtx.GetHash().ToString().c_str() ); + fprintf(stderr,"%s: ignoring expired tx %s\n", __func__, wtx.GetHash().ToString().c_str() ); // TODO: should we call EraseFromWallet(wtx) right here? continue; } From 5c8c7507ec30c6ccab5d3367634e25a74c0a2daa Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Tue, 6 Sep 2022 05:55:03 -0700 Subject: [PATCH 042/295] Add z_consolidationstatus RPC --- src/rpc/server.h | 1 + ...asyncrpcoperation_saplingconsolidation.cpp | 1 + src/wallet/rpcwallet.cpp | 40 +++++++++++++++++++ src/wallet/wallet.h | 1 + 4 files changed, 43 insertions(+) diff --git a/src/rpc/server.h b/src/rpc/server.h index b2c361765..3b3e11c6a 100644 --- a/src/rpc/server.h +++ b/src/rpc/server.h @@ -473,6 +473,7 @@ extern UniValue z_gettotalbalance(const UniValue& params, bool fHelp, const CPub extern UniValue z_mergetoaddress(const UniValue& params, bool fHelp, const CPubKey& mypk); // in rpcwallet.cpp extern UniValue z_sendmany(const UniValue& params, bool fHelp, const CPubKey& mypk); // in rpcwallet.cpp extern UniValue z_sweepstatus(const UniValue& params, bool fHelp, const CPubKey& mypk); // in rpcwallet.cpp +extern UniValue z_consolidationstatus(const UniValue& params, bool fHelp, const CPubKey& mypk); // in rpcwallet.cpp extern UniValue z_shieldcoinbase(const UniValue& params, bool fHelp, const CPubKey& mypk); // in rpcwallet.cpp extern UniValue z_getoperationstatus(const UniValue& params, bool fHelp, const CPubKey& mypk); // in rpcwallet.cpp extern UniValue z_getoperationresult(const UniValue& params, bool fHelp, const CPubKey& mypk); // in rpcwallet.cpp diff --git a/src/wallet/asyncrpcoperation_saplingconsolidation.cpp b/src/wallet/asyncrpcoperation_saplingconsolidation.cpp index f9f2ebe1e..5422e1715 100644 --- a/src/wallet/asyncrpcoperation_saplingconsolidation.cpp +++ b/src/wallet/asyncrpcoperation_saplingconsolidation.cpp @@ -108,6 +108,7 @@ bool AsyncRPCOperation_saplingconsolidation::main_impl() { if (boost::get(&zAddress) != nullptr) { libzcash::SaplingPaymentAddress saplingAddress = boost::get(zAddress); addresses.insert(saplingAddress); + consolidationAddress = zAddress; } else { LogPrintf("%s: Invalid zaddr, exiting\n", opid); return false; diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 00d120f54..749576178 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3315,6 +3315,45 @@ UniValue getalldata(const UniValue& params, bool fHelp,const CPubKey&) return returnObj; } +UniValue z_consolidationstatus(const UniValue& params, bool fHelp, const CPubKey& mypk) +{ + + if (!EnsureWalletIsAvailable(fHelp)) + return NullUniValue; + + if (fHelp || params.size() > 0) + throw runtime_error( + "z_consolidationstatus\n" + "\nGive details about consolidation operations since the node was started." + "}\n" + "\nExamples:\n" + + HelpExampleCli("z_consolidationstatus", "") + + HelpExampleRpc("z_consolidationstatus", "") + ); + + LOCK2(cs_main, pwalletMain->cs_wallet); + + UniValue ret(UniValue::VOBJ); + ret.push_back(Pair("consolidation", pwalletMain->fConsolidationEnabled)); + ret.push_back(Pair("running", pwalletMain->fConsolidationRunning)); + ret.push_back(Pair("amount_consolidated", pwalletMain->amountConsolidated)); + + if (pwalletMain->fConsolidationRunning) { + ret.push_back(Pair("next_consolidation", pwalletMain->consolidationInterval + chainActive.Tip()->GetHeight())); + } else { + if (pwalletMain->nextConsolidation == 0) { + ret.push_back(Pair("next_consolidation", chainActive.Tip()->GetHeight() + 1)); + } else { + ret.push_back(Pair("next_consolidation", pwalletMain->nextConsolidation)); + } + } + ret.push_back(Pair("consolidationinterval", pwalletMain->consolidationInterval)); + ret.push_back(Pair("consolidationaddress", pwalletMain->consolidationAddress)); + ret.push_back(Pair("consolidationtxfee",(int)fConsolidationTxFee)); + + return ret; +} + UniValue z_sweepstatus(const UniValue& params, bool fHelp, const CPubKey& mypk) { @@ -8537,6 +8576,7 @@ static const CRPCCommand commands[] = { "wallet", "z_gettotalbalance", &z_gettotalbalance, false }, { "wallet", "z_mergetoaddress", &z_mergetoaddress, false }, { "wallet", "z_sweepstatus", &z_sweepstatus, true }, + { "wallet", "z_consolidationstatus", &z_consolidationstatus, true }, { "wallet", "z_sendmany", &z_sendmany, false }, { "wallet", "z_shieldcoinbase", &z_shieldcoinbase, false }, { "wallet", "z_getoperationstatus", &z_getoperationstatus, true }, diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 4ae4716cb..7bf0d446a 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -813,6 +813,7 @@ public: int sweepFee = 10000; int sweepMaxInputs = 200; std::string sweepAddress = ""; + std::string consolidationAddress = ""; void ClearNoteWitnessCache(); From 9c5e5c550ccc803ff71b6c841c61c023e1961ef9 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 6 Sep 2022 09:20:53 -0400 Subject: [PATCH 043/295] Fix compile issues in z_consolidationstatus --- src/init.cpp | 1 + src/wallet/asyncrpcoperation_saplingconsolidation.cpp | 1 - src/wallet/rpcwallet.cpp | 7 ++++--- src/wallet/wallet.h | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 2827a2bb9..ce03bd7fb 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -2100,6 +2100,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) if (pwalletMain->fSaplingConsolidationEnabled) { //Validate 1 Consolidation address only that matches the sweep address vector& vaddresses = mapMultiArgs["-consolidatesaplingaddress"]; + pwalletMain->consolidationAddress = vaddresses[0]; if (vaddresses.size() == 0) { fConsolidationMapUsed = true; mapMultiArgs["-consolidatesaplingaddress"] = vSweep; diff --git a/src/wallet/asyncrpcoperation_saplingconsolidation.cpp b/src/wallet/asyncrpcoperation_saplingconsolidation.cpp index 5422e1715..f9f2ebe1e 100644 --- a/src/wallet/asyncrpcoperation_saplingconsolidation.cpp +++ b/src/wallet/asyncrpcoperation_saplingconsolidation.cpp @@ -108,7 +108,6 @@ bool AsyncRPCOperation_saplingconsolidation::main_impl() { if (boost::get(&zAddress) != nullptr) { libzcash::SaplingPaymentAddress saplingAddress = boost::get(zAddress); addresses.insert(saplingAddress); - consolidationAddress = zAddress; } else { LogPrintf("%s: Invalid zaddr, exiting\n", opid); return false; diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 749576178..745dc3ce4 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3334,12 +3334,13 @@ UniValue z_consolidationstatus(const UniValue& params, bool fHelp, const CPubKey LOCK2(cs_main, pwalletMain->cs_wallet); UniValue ret(UniValue::VOBJ); - ret.push_back(Pair("consolidation", pwalletMain->fConsolidationEnabled)); + ret.push_back(Pair("consolidation", pwalletMain->fSaplingConsolidationEnabled)); ret.push_back(Pair("running", pwalletMain->fConsolidationRunning)); ret.push_back(Pair("amount_consolidated", pwalletMain->amountConsolidated)); if (pwalletMain->fConsolidationRunning) { - ret.push_back(Pair("next_consolidation", pwalletMain->consolidationInterval + chainActive.Tip()->GetHeight())); + // TODO: set a static consolidationInterval instead of it being non-deterministic + // ret.push_back(Pair("next_consolidation", pwalletMain->consolidationInterval + chainActive.Tip()->GetHeight())); } else { if (pwalletMain->nextConsolidation == 0) { ret.push_back(Pair("next_consolidation", chainActive.Tip()->GetHeight() + 1)); @@ -3347,7 +3348,7 @@ UniValue z_consolidationstatus(const UniValue& params, bool fHelp, const CPubKey ret.push_back(Pair("next_consolidation", pwalletMain->nextConsolidation)); } } - ret.push_back(Pair("consolidationinterval", pwalletMain->consolidationInterval)); + // ret.push_back(Pair("consolidationinterval", pwalletMain->consolidationInterval)); ret.push_back(Pair("consolidationaddress", pwalletMain->consolidationAddress)); ret.push_back(Pair("consolidationtxfee",(int)fConsolidationTxFee)); diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 7bf0d446a..fdaee018b 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -809,6 +809,7 @@ public: bool fSweepRunning = false; int nextSweep = 0; int amountSwept = 0; + int amountConsolidated = 0; int sweepInterval = 20; int sweepFee = 10000; int sweepMaxInputs = 200; From 55703fdb95cf6300325341abb04d669e024797c0 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 6 Sep 2022 10:03:47 -0400 Subject: [PATCH 044/295] Do not ban nodes which relay expired transactions --- src/main.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index b8e64dc27..4e466ba45 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1304,10 +1304,12 @@ bool ContextualCheckTransaction(int32_t slowflag,const CBlock *block, CBlockInde // Check that all transactions are unexpired if (IsExpiredTx(tx, nHeight)) { // Don't increase banscore if the transaction only just expired - int expiredDosLevel = IsExpiredTx(tx, nHeight - 1) ? (dosLevel > 10 ? dosLevel : 10) : 0; + //int expiredDosLevel = IsExpiredTx(tx, nHeight - 1) ? (dosLevel > 10 ? dosLevel : 10) : 0; //string strHex = EncodeHexTx(tx); - //fprintf(stderr, "transaction exipred.%s\n",strHex.c_str()); - return state.DoS(expiredDosLevel, error("ContextualCheckTransaction(): transaction %s is expired, expiry block %i vs current block %i\n",tx.GetHash().ToString(),tx.nExpiryHeight,nHeight), REJECT_INVALID, "tx-overwinter-expired"); + //fprintf(stderr, "transaction expired.%s\n",strHex.c_str()); + + // Do not ban nodes which relay expired tx's, it's a bug not an attack + return state.DoS(0, error("ContextualCheckTransaction(): transaction %s is expired, expiry block %i vs current block %i\n",tx.GetHash().ToString(),tx.nExpiryHeight,nHeight), REJECT_INVALID, "tx-overwinter-expired"); } } From 456cf77b652c5afb63a00b079b5b9d46ffd0108b Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 6 Sep 2022 10:08:24 -0400 Subject: [PATCH 045/295] Exit RelayTransaction early if we have no nodes to relay to --- src/net.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/net.cpp b/src/net.cpp index 7df4f5e90..40e5070de 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2109,6 +2109,12 @@ void RelayTransaction(const CTransaction& tx, const CDataStream& ss) auto vRelayNodes = vNodes; + // If we have no nodes to relay to, there is nothing to do + if(vNodes.size() == 0) { + fprintf(stderr, "%s: No nodes to relay to!\n", __func__ ); + return; + } + // We always round down, except when we have only 1 connection auto newSize = (vNodes.size() / 2) == 0 ? 1 : (vNodes.size() / 2); From 85810121633dd38fd21d5723bd91ad8896028be8 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 6 Sep 2022 11:19:16 -0400 Subject: [PATCH 046/295] Sweep operations might not create any txs, so make logging more precise --- src/wallet/asyncrpcoperation_sweep.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/asyncrpcoperation_sweep.cpp b/src/wallet/asyncrpcoperation_sweep.cpp index 780ddfa29..fcf4769bb 100644 --- a/src/wallet/asyncrpcoperation_sweep.cpp +++ b/src/wallet/asyncrpcoperation_sweep.cpp @@ -64,7 +64,7 @@ void AsyncRPCOperation_sweep::main() { set_state(OperationStatus::FAILED); } - std::string s = strprintf("%s: Sweep transaction created. (status=%s", getId(), getStateAsString()); + std::string s = strprintf("%s: Sweep operation finished. (status=%s", getId(), getStateAsString()); if (success) { s += strprintf(", success)\n"); } else { From 8d8f988a1928ec6ff7d7dbce1649b6919aeeb499 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 6 Sep 2022 11:19:46 -0400 Subject: [PATCH 047/295] Delete expired txs from the wallet, since they can never be included in a block --- src/wallet/wallet.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 229f49275..e024d826c 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1715,9 +1715,9 @@ void CWallet::EraseFromWallet(const uint256 &hash) if (mapWallet.erase(hash)) CWalletDB(strWalletFile).EraseTx(hash); } - if(fDebug) { - LogPrintf("%s: erased txid %s\n", __func__, hash.ToString().c_str() ); - } + + LogPrintf("%s: erased txid %s\n", __func__, hash.ToString().c_str() ); + return; } @@ -3111,6 +3111,8 @@ std::vector CWallet::ResendWalletTransactionsBefore(int64_t nTime) // Sort them in chronological order multimap mapSorted; uint32_t now = (uint32_t)time(NULL); + + // vector of wallet transactions to delete std::vector vwtxh; uint32_t erased = 0, skipped = 0; @@ -3122,9 +3124,11 @@ std::vector CWallet::ResendWalletTransactionsBefore(int64_t nTime) continue; // Do not relay expired transactions, to avoid other nodes banning us + // Current code will not ban nodes relaying expired txs but older nodes will if (wtx.nExpiryHeight > 0 && wtx.nExpiryHeight < chainActive.LastTip()->GetHeight()) { fprintf(stderr,"%s: ignoring expired tx %s\n", __func__, wtx.GetHash().ToString().c_str() ); - // TODO: should we call EraseFromWallet(wtx) right here? + // append to list of txs to delete + vwtxh.push_back(wtx.GetHash()); continue; } @@ -3134,6 +3138,7 @@ std::vector CWallet::ResendWalletTransactionsBefore(int64_t nTime) LogPrintf("%s: skip Relaying wtx %s nLockTime %u vs now.%u\n", __func__, wtx.GetHash().ToString(),(uint32_t)wtx.nLockTime,now); } skipped++; + // TODO: this does not seem to handle rescanning+finding old coinbase txs correctly //vwtxh.push_back(wtx.GetHash()); continue; } @@ -3150,10 +3155,13 @@ std::vector CWallet::ResendWalletTransactionsBefore(int64_t nTime) } } - // TODO: this does not seem to handle rescanning+finding old coinbase txs correctly - // Unless we remove these unconfirmed txs from the wallet, they will + // Unless we remove these unconfirmed and/or expired txs from the wallet, they will // persist there forever. They are too old to be accepted by network // consensus rules, so we erase them. + // Expired txs are always unconfirmed, but unconfirmed tx's could be expired or not, + // i.e. expired txs are a subset of unconfirmed tx's. Expired tx's can never be included + // in a block because they are against consensus rules. Unconfirmed tx's might still be + // included in a future block. for (auto hash : vwtxh) { EraseFromWallet(hash); @@ -3174,6 +3182,7 @@ void CWallet::ResendWalletTransactions(int64_t nBestBlockTime) if (GetTime() < nNextResend || !fBroadcastTransactions) return; bool fFirst = (nNextResend == 0); + // TODO: BTC Core changed this to be every 12 hours instead of every 30 mins nNextResend = GetTime() + GetRand(30 * 60); if (fFirst) return; From 61ecffd07460beac9d8c71fe52fb2afb307289e9 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 6 Sep 2022 14:30:06 -0400 Subject: [PATCH 048/295] Change default sweep interval to 10 and consolidation to be deterministic every 45 blocks --- src/wallet/asyncrpcoperation_sweep.cpp | 8 ++++---- src/wallet/wallet.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wallet/asyncrpcoperation_sweep.cpp b/src/wallet/asyncrpcoperation_sweep.cpp index fcf4769bb..6045cf46f 100644 --- a/src/wallet/asyncrpcoperation_sweep.cpp +++ b/src/wallet/asyncrpcoperation_sweep.cpp @@ -284,10 +284,10 @@ bool AsyncRPCOperation_sweep::main_impl() { } if (sweepComplete) { - int sweepInterval = GetArg("-zsweepinterval", 5); - if (sweepInterval < 1) { - fprintf(stderr,"%s: Invalid sweep interval of %d, setting to default of 5\n", __func__, sweepInterval); - sweepInterval = 5; + int sweepInterval = GetArg("-zsweepinterval", 10); + if (sweepInterval < 5) { + fprintf(stderr,"%s: Invalid sweep interval of %d, setting to default of 10\n", __func__, sweepInterval); + sweepInterval = 10; } pwalletMain->nextSweep = sweepInterval + chainActive.Tip()->GetHeight(); pwalletMain->fSweepRunning = false; diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index e024d826c..8cee74ed2 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -559,7 +559,7 @@ void CWallet::RunSaplingConsolidation(int blockHeight) { return; } - int consolidateInterval = rand() % 5 + 5; + int consolidateInterval = 45; if(fZdebug) fprintf(stderr,"%s: height=%d interval=%d\n", __func__, blockHeight, consolidateInterval); From 3e75a2be225b7f3bdfc5394a53658725af8c7971 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Wed, 7 Sep 2022 00:35:08 -0400 Subject: [PATCH 049/295] delete unused zcbenchmarks --- src/Makefile.am | 2 - src/wallet/rpcwallet.cpp | 1 - src/zcbenchmarks.cpp | 405 --------------------------------------- src/zcbenchmarks.h | 27 --- 4 files changed, 435 deletions(-) delete mode 100644 src/zcbenchmarks.cpp delete mode 100644 src/zcbenchmarks.h diff --git a/src/Makefile.am b/src/Makefile.am index 5d73c049f..5364a6366 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -340,8 +340,6 @@ endif libbitcoin_wallet_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) libbitcoin_wallet_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) libbitcoin_wallet_a_SOURCES = \ - zcbenchmarks.cpp \ - zcbenchmarks.h \ wallet/asyncrpcoperation_mergetoaddress.cpp \ wallet/asyncrpcoperation_saplingconsolidation.cpp \ wallet/asyncrpcoperation_sendmany.cpp \ diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 42a145b94..c4827df02 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -33,7 +33,6 @@ #include "wallet.h" #include "walletdb.h" #include "primitives/transaction.h" -#include "zcbenchmarks.h" #include "script/interpreter.h" #include "zcash/zip32.h" #include "zcash/Note.hpp" diff --git a/src/zcbenchmarks.cpp b/src/zcbenchmarks.cpp deleted file mode 100644 index 3476918e6..000000000 --- a/src/zcbenchmarks.cpp +++ /dev/null @@ -1,405 +0,0 @@ -// 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 - -#include -#include -#include -#include -#include -#include -#include "coins.h" -#include "util.h" -#include "init.h" -#include "primitives/transaction.h" -#include "base58.h" -#include "crypto/equihash.h" -#include "chain.h" -#include "chainparams.h" -#include "consensus/upgrades.h" -#include "consensus/validation.h" -#include "main.h" -#include "miner.h" -#include "pow.h" -#include "rpc/server.h" -#include "script/sign.h" -#include "sodium.h" -#include "streams.h" -#include "txdb.h" -#include "wallet/wallet.h" -#include "zcbenchmarks.h" -#include "zcash/Zcash.h" -#include "zcash/IncrementalMerkleTree.hpp" -#include "zcash/Note.hpp" -#include "librustzcash.h" - -using namespace libzcash; -// This method is based on Shutdown from init.cpp -void pre_wallet_load() -{ - LogPrintf("%s: In progress...\n", __func__); - if (ShutdownRequested()) - throw new std::runtime_error("The Hush node is shutting down"); - - if (pwalletMain) - pwalletMain->Flush(false); -#ifdef ENABLE_MINING - GenerateBitcoins(false, NULL, 0); -#endif - UnregisterNodeSignals(GetNodeSignals()); - if (pwalletMain) - pwalletMain->Flush(true); - - UnregisterValidationInterface(pwalletMain); - delete pwalletMain; - pwalletMain = NULL; - bitdb.Reset(); - RegisterNodeSignals(GetNodeSignals()); - LogPrintf("%s: done\n", __func__); -} - -void post_wallet_load(){ - RegisterValidationInterface(pwalletMain); -#ifdef ENABLE_MINING - // Generate coins in the background - if (pwalletMain || !GetArg("-mineraddress", "").empty()) - GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain, GetArg("-genproclimit", 1)); -#endif -} - - -void timer_start(timeval &tv_start) -{ - gettimeofday(&tv_start, 0); -} - -double timer_stop(timeval &tv_start) -{ - double elapsed; - struct timeval tv_end; - gettimeofday(&tv_end, 0); - elapsed = double(tv_end.tv_sec-tv_start.tv_sec) + - (tv_end.tv_usec-tv_start.tv_usec)/double(1000000); - return elapsed; -} - -double benchmark_sleep() -{ - struct timeval tv_start; - timer_start(tv_start); - sleep(1); - return timer_stop(tv_start); -} - -#ifdef ENABLE_MINING -double benchmark_solve_equihash() -{ - CBlock pblock; - CEquihashInput I{pblock}; - CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); - ss << I; - - unsigned int n = Params(CBaseChainParams::MAIN).EquihashN(); - unsigned int k = Params(CBaseChainParams::MAIN).EquihashK(); - crypto_generichash_blake2b_state eh_state; - EhInitialiseState(n, k, eh_state); - crypto_generichash_blake2b_update(&eh_state, (unsigned char*)&ss[0], ss.size()); - - uint256 nonce; - randombytes_buf(nonce.begin(), 32); - crypto_generichash_blake2b_update(&eh_state, - nonce.begin(), - nonce.size()); - - struct timeval tv_start; - timer_start(tv_start); - std::set> solns; - EhOptimisedSolveUncancellable(n, k, eh_state, - [](std::vector soln) { return false; }); - return timer_stop(tv_start); -} - -std::vector benchmark_solve_equihash_threaded(int nThreads) -{ - std::vector ret; - std::vector> tasks; - std::vector threads; - for (int i = 0; i < nThreads; i++) { - std::packaged_task task(&benchmark_solve_equihash); - tasks.emplace_back(task.get_future()); - threads.emplace_back(std::move(task)); - } - std::future_status status; - for (auto it = tasks.begin(); it != tasks.end(); it++) { - it->wait(); - ret.push_back(it->get()); - } - for (auto it = threads.begin(); it != threads.end(); it++) { - it->join(); - } - return ret; -} -#endif // ENABLE_MINING - -double benchmark_verify_equihash() -{ - CChainParams params = Params(CBaseChainParams::MAIN); - CBlock genesis = Params(CBaseChainParams::MAIN).GenesisBlock(); - CBlockHeader genesis_header = genesis.GetBlockHeader(); - struct timeval tv_start; - timer_start(tv_start); - CheckEquihashSolution(&genesis_header, params); - return timer_stop(tv_start); -} - -double benchmark_large_tx(size_t nInputs) -{ - // Create priv/pub key - CKey priv; - priv.MakeNewKey(false); - auto pub = priv.GetPubKey(); - CBasicKeyStore tempKeystore; - tempKeystore.AddKey(priv); - - // The "original" transaction that the spending transaction will spend - // from. - CMutableTransaction m_orig_tx; - m_orig_tx.vout.resize(1); - m_orig_tx.vout[0].nValue = 1000000; - CScript prevPubKey = GetScriptForDestination(pub.GetID()); - m_orig_tx.vout[0].scriptPubKey = prevPubKey; - - auto orig_tx = CTransaction(m_orig_tx); - - CMutableTransaction spending_tx; - spending_tx.fOverwintered = true; - spending_tx.nVersionGroupId = SAPLING_VERSION_GROUP_ID; - spending_tx.nVersion = SAPLING_TX_VERSION; - - auto input_hash = orig_tx.GetHash(); - // Add nInputs inputs - for (size_t i = 0; i < nInputs; i++) { - spending_tx.vin.emplace_back(input_hash, 0); - } - - // Sign for all the inputs - auto consensusBranchId = NetworkUpgradeInfo[Consensus::UPGRADE_SAPLING].nBranchId; - for (size_t i = 0; i < nInputs; i++) { - SignSignature(tempKeystore, prevPubKey, spending_tx, i, 1000000, SIGHASH_ALL, consensusBranchId); - } - - // Spending tx has all its inputs signed and does not need to be mutated anymore - CTransaction final_spending_tx(spending_tx); - - // Benchmark signature verification costs: - struct timeval tv_start; - timer_start(tv_start); - PrecomputedTransactionData txdata(final_spending_tx); - for (size_t i = 0; i < nInputs; i++) { - ScriptError serror = SCRIPT_ERR_OK; - assert(VerifyScript(final_spending_tx.vin[i].scriptSig, - prevPubKey, - STANDARD_SCRIPT_VERIFY_FLAGS, - TransactionSignatureChecker(&final_spending_tx, i, 1000000, txdata), - consensusBranchId, - &serror)); - } - return timer_stop(tv_start); -} - -extern UniValue getnewaddress(const UniValue& params, bool fHelp, const CPubKey& mypk); // in rpcwallet.cpp -extern UniValue sendtoaddress(const UniValue& params, bool fHelp, const CPubKey& mypk); - -double benchmark_sendtoaddress(CAmount amount) -{ - UniValue params(UniValue::VARR); - auto addr = getnewaddress(params, false, CPubKey()); - - params.push_back(addr); - params.push_back(ValueFromAmount(amount)); - - struct timeval tv_start; - timer_start(tv_start); - auto txid = sendtoaddress(params, false, CPubKey()); - return timer_stop(tv_start); -} - -double benchmark_loadwallet() -{ - pre_wallet_load(); - struct timeval tv_start; - bool fFirstRunRet=true; - timer_start(tv_start); - pwalletMain = new CWallet("wallet.dat"); - DBErrors nLoadWalletRet = pwalletMain->LoadWallet(fFirstRunRet); - auto res = timer_stop(tv_start); - post_wallet_load(); - return res; -} - -extern UniValue listunspent(const UniValue& params, bool fHelp, const CPubKey& mypk); - -double benchmark_listunspent() -{ - UniValue params(UniValue::VARR); - struct timeval tv_start; - timer_start(tv_start); - auto unspent = listunspent(params, false, CPubKey()); - return timer_stop(tv_start); -} - -double benchmark_create_sapling_spend() -{ - auto sk = libzcash::SaplingSpendingKey::random(); - auto expsk = sk.expanded_spending_key(); - auto address = sk.default_address(); - SaplingNote note(address, GetRand(MAX_MONEY)); - SaplingMerkleTree tree; - auto maybe_cm = note.cm(); - tree.append(maybe_cm.get()); - auto anchor = tree.root(); - auto witness = tree.witness(); - auto maybe_nf = note.nullifier(expsk.full_viewing_key(), witness.position()); - if (!(maybe_cm && maybe_nf)) { - throw JSONRPCError(RPC_INTERNAL_ERROR, "Could not create note commitment and nullifier"); - } - - CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); - ss << witness.path(); - std::vector witnessChars(ss.begin(), ss.end()); - - uint256 alpha; - librustzcash_sapling_generate_r(alpha.begin()); - - auto ctx = librustzcash_sapling_proving_ctx_init(); - - struct timeval tv_start; - timer_start(tv_start); - - SpendDescription sdesc; - bool result = librustzcash_sapling_spend_proof( - ctx, - expsk.full_viewing_key().ak.begin(), - expsk.nsk.begin(), - note.d.data(), - note.r.begin(), - alpha.begin(), - note.value(), - anchor.begin(), - witnessChars.data(), - sdesc.cv.begin(), - sdesc.rk.begin(), - sdesc.zkproof.data()); - - double t = timer_stop(tv_start); - librustzcash_sapling_proving_ctx_free(ctx); - if (!result) { - throw JSONRPCError(RPC_INTERNAL_ERROR, "librustzcash_sapling_spend_proof() should return true"); - } - return t; -} - -double benchmark_create_sapling_output() -{ - auto sk = libzcash::SaplingSpendingKey::random(); - auto address = sk.default_address(); - - std::array memo; - SaplingNote note(address, GetRand(MAX_MONEY)); - - libzcash::SaplingNotePlaintext notePlaintext(note, memo); - auto res = notePlaintext.encrypt(note.pk_d); - if (!res) { - throw JSONRPCError(RPC_INTERNAL_ERROR, "SaplingNotePlaintext::encrypt() failed"); - } - - auto enc = res.get(); - auto encryptor = enc.second; - - auto ctx = librustzcash_sapling_proving_ctx_init(); - - struct timeval tv_start; - timer_start(tv_start); - - OutputDescription odesc; - bool result = librustzcash_sapling_output_proof( - ctx, - encryptor.get_esk().begin(), - note.d.data(), - note.pk_d.begin(), - note.r.begin(), - note.value(), - odesc.cv.begin(), - odesc.zkproof.begin()); - - double t = timer_stop(tv_start); - librustzcash_sapling_proving_ctx_free(ctx); - if (!result) { - throw JSONRPCError(RPC_INTERNAL_ERROR, "librustzcash_sapling_output_proof() should return true"); - } - return t; -} - -// Verify Sapling spend from testnet -// txid: abbd823cbd3d4e3b52023599d81a96b74817e95ce5bb58354f979156bd22ecc8 -// position: 0 -double benchmark_verify_sapling_spend() -{ - SpendDescription spend; - CDataStream ss(ParseHex("8c6cf86bbb83bf0d075e5bd9bb4b5cd56141577be69f032880b11e26aa32aa5ef09fd00899e4b469fb11f38e9d09dc0379f0b11c23b5fe541765f76695120a03f0261d32af5d2a2b1e5c9a04200cd87d574dc42349de9790012ce560406a8a876a1e54cfcdc0eb74998abec2a9778330eeb2a0ac0e41d0c9ed5824fbd0dbf7da930ab299966ce333fd7bc1321dada0817aac5444e02c754069e218746bf879d5f2a20a8b028324fb2c73171e63336686aa5ec2e6e9a08eb18b87c14758c572f4531ccf6b55d09f44beb8b47563be4eff7a52598d80959dd9c9fee5ac4783d8370cb7d55d460053d3e067b5f9fe75ff2722623fb1825fcba5e9593d4205b38d1f502ff03035463043bd393a5ee039ce75a5d54f21b395255df6627ef96751566326f7d4a77d828aa21b1827282829fcbc42aad59cdb521e1a3aaa08b99ea8fe7fff0a04da31a52260fc6daeccd79bb877bdd8506614282258e15b3fe74bf71a93f4be3b770119edf99a317b205eea7d5ab800362b97384273888106c77d633600"), SER_NETWORK, PROTOCOL_VERSION); - ss >> spend; - uint256 dataToBeSigned = uint256S("0x2dbf83fe7b88a7cbd80fac0c719483906bb9a0c4fc69071e4780d5f2c76e592c"); - - auto ctx = librustzcash_sapling_verification_ctx_init(); - - struct timeval tv_start; - timer_start(tv_start); - - bool result = librustzcash_sapling_check_spend( - ctx, - spend.cv.begin(), - spend.anchor.begin(), - spend.nullifier.begin(), - spend.rk.begin(), - spend.zkproof.begin(), - spend.spendAuthSig.begin(), - dataToBeSigned.begin() - ); - - double t = timer_stop(tv_start); - librustzcash_sapling_verification_ctx_free(ctx); - if (!result) { - throw JSONRPCError(RPC_INTERNAL_ERROR, "librustzcash_sapling_check_spend() should return true"); - } - return t; -} - -// Verify Sapling output from testnet -// txid: abbd823cbd3d4e3b52023599d81a96b74817e95ce5bb58354f979156bd22ecc8 -// position: 0 -double benchmark_verify_sapling_output() -{ - OutputDescription output; - CDataStream ss(ParseHex("edd742af18857e5ec2d71d346a7fe2ac97c137339bd5268eea86d32e0ff4f38f76213fa8cfed3347ac4e8572dd88aff395c0c10a59f8b3f49d2bc539ed6c726667e29d4763f914ddd0abf1cdfa84e44de87c233434c7e69b8b5b8f4623c8aa444163425bae5cef842972fed66046c1c6ce65c866ad894d02e6e6dcaae7a962d9f2ef95757a09c486928e61f0f7aed90ad0a542b0d3dc5fe140dfa7626b9315c77e03b055f19cbacd21a866e46f06c00e0c7792b2a590a611439b510a9aaffcf1073bad23e712a9268b36888e3727033eee2ab4d869f54a843f93b36ef489fb177bf74b41a9644e5d2a0a417c6ac1c8869bc9b83273d453f878ed6fd96b82a5939903f7b64ecaf68ea16e255a7fb7cc0b6d8b5608a1c6b0ed3024cc62c2f0f9c5cfc7b431ae6e9d40815557aa1d010523f9e1960de77b2274cb6710d229d475c87ae900183206ba90cb5bbc8ec0df98341b82726c705e0308ca5dc08db4db609993a1046dfb43dfd8c760be506c0bed799bb2205fc29dc2e654dce731034a23b0aaf6da0199248702ee0523c159f41f4cbfff6c35ace4dd9ae834e44e09c76a0cbdda1d3f6a2c75ad71212daf9575ab5f09ca148718e667f29ddf18c8a330a86ace18a86e89454653902aa393c84c6b694f27d0d42e24e7ac9fe34733de5ec15f5066081ce912c62c1a804a2bb4dedcef7cc80274f6bb9e89e2fce91dc50d6a73c8aefb9872f1cf3524a92626a0b8f39bbf7bf7d96ca2f770fc04d7f457021c536a506a187a93b2245471ddbfb254a71bc4a0d72c8d639a31c7b1920087ffca05c24214157e2e7b28184e91989ef0b14f9b34c3dc3cc0ac64226b9e337095870cb0885737992e120346e630a416a9b217679ce5a778fb15779c136bcecca5efe79012013d77d90b4e99dd22c8f35bc77121716e160d05bd30d288ee8886390ee436f85bdc9029df888a3a3326d9d4ddba5cb5318b3274928829d662e96fea1d601f7a306251ed8c6cc4e5a3a7a98c35a3650482a0eee08f3b4c2da9b22947c96138f1505c2f081f8972d429f3871f32bef4aaa51aa6945df8e9c9760531ac6f627d17c1518202818a91ca304fb4037875c666060597976144fcbbc48a776a2c61beb9515fa8f3ae6d3a041d320a38a8ac75cb47bb9c866ee497fc3cd13299970c4b369c1c2ceb4220af082fbecdd8114492a8e4d713b5a73396fd224b36c1185bd5e20d683e6c8db35346c47ae7401988255da7cfffdced5801067d4d296688ee8fe424b4a8a69309ce257eefb9345ebfda3f6de46bb11ec94133e1f72cd7ac54934d6cf17b3440800e70b80ebc7c7bfc6fb0fc2c"), SER_NETWORK, PROTOCOL_VERSION); - ss >> output; - - auto ctx = librustzcash_sapling_verification_ctx_init(); - - struct timeval tv_start; - timer_start(tv_start); - - bool result = librustzcash_sapling_check_output( - ctx, - output.cv.begin(), - output.cm.begin(), - output.ephemeralKey.begin(), - output.zkproof.begin() - ); - - double t = timer_stop(tv_start); - librustzcash_sapling_verification_ctx_free(ctx); - if (!result) { - throw JSONRPCError(RPC_INTERNAL_ERROR, "librustzcash_sapling_check_output() should return true"); - } - return timer_stop(tv_start); -} diff --git a/src/zcbenchmarks.h b/src/zcbenchmarks.h deleted file mode 100644 index c79081bc2..000000000 --- a/src/zcbenchmarks.h +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2016-2021 The Hush developers -#ifndef BENCHMARKS_H -#define BENCHMARKS_H - -#include -#include - -extern double benchmark_sleep(); -extern double benchmark_create_joinsplit(); -extern std::vector benchmark_create_joinsplit_threaded(int nThreads); -extern double benchmark_solve_equihash(); -extern std::vector benchmark_solve_equihash_threaded(int nThreads); -extern double benchmark_verify_joinsplit(const JSDescription &joinsplit); -extern double benchmark_verify_equihash(); -extern double benchmark_large_tx(size_t nInputs); -extern double benchmark_try_decrypt_notes(size_t nAddrs); -extern double benchmark_increment_note_witnesses(size_t nTxs); -extern double benchmark_connectblock_slow(); -extern double benchmark_sendtoaddress(CAmount amount); -extern double benchmark_loadwallet(); -extern double benchmark_listunspent(); -extern double benchmark_create_sapling_spend(); -extern double benchmark_create_sapling_output(); -extern double benchmark_verify_sapling_spend(); -extern double benchmark_verify_sapling_output(); - -#endif From b2987b43f01ef04bcfc6c67557b4a1db904944d3 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Wed, 7 Sep 2022 01:10:53 -0400 Subject: [PATCH 050/295] miner: fix MAXSOLS --- src/miner.cpp | 2 +- src/test/miner_tests.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index 71ce266ce..16c18146b 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -1732,7 +1732,7 @@ void static BitcoinMiner() ehSolverRuns.increment(); // Convert solution indices to byte array (decompress) and pass it to validBlock method. - for (size_t s = 0; s < eq.nsols; s++) { + for (size_t s = 0; s < std::min(MAXSOLS, eq.nsols); s++) { LogPrint("pow", "Checking solution %d\n", s+1); std::vector index_vector(PROOFSIZE); for (size_t i = 0; i < PROOFSIZE; i++) { diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp index ed2777c6d..52f0a0211 100644 --- a/src/test/miner_tests.cpp +++ b/src/test/miner_tests.cpp @@ -225,7 +225,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) // Convert solution indices to byte array (decompress) and pass it to validBlock method. std::set> solns; - for (size_t s = 0; s < eq.nsols; s++) { + for (size_t s = 0; s < std::min(MAXSOLS, eq.nsols); s++) { LogPrint("pow", "Checking solution %d\n", s+1); std::vector index_vector(PROOFSIZE); for (size_t i = 0; i < PROOFSIZE; i++) { From 8770fb7035f098cdd54f9c6eba9fe48b9197b893 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Thu, 8 Sep 2022 18:11:10 -0700 Subject: [PATCH 051/295] Hopefully avoid a coredump when consolidation=1 and consolidatesaplingaddress is not specified --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index ce03bd7fb..31073cf16 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -2100,11 +2100,11 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) if (pwalletMain->fSaplingConsolidationEnabled) { //Validate 1 Consolidation address only that matches the sweep address vector& vaddresses = mapMultiArgs["-consolidatesaplingaddress"]; - pwalletMain->consolidationAddress = vaddresses[0]; if (vaddresses.size() == 0) { fConsolidationMapUsed = true; mapMultiArgs["-consolidatesaplingaddress"] = vSweep; } else { + pwalletMain->consolidationAddress = vaddresses[0]; for (int i = 0; i < vaddresses.size(); i++) { if (vSweep[0] != vaddresses[i]) { return InitError("Consolidation can only be used on the sweep address when sweep is enabled."); From 4647bc85257033732a19c985f8fbe64f3328b15c Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Fri, 9 Sep 2022 06:30:06 -0700 Subject: [PATCH 052/295] Try to generate a stacktrace for runtime errors in consolidation --- src/wallet/asyncrpcoperation_saplingconsolidation.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wallet/asyncrpcoperation_saplingconsolidation.cpp b/src/wallet/asyncrpcoperation_saplingconsolidation.cpp index f9f2ebe1e..d75100be4 100644 --- a/src/wallet/asyncrpcoperation_saplingconsolidation.cpp +++ b/src/wallet/asyncrpcoperation_saplingconsolidation.cpp @@ -16,6 +16,7 @@ #include "util.h" #include "utilmoneystr.h" #include "wallet.h" +#include CAmount fConsolidationTxFee = DEFAULT_CONSOLIDATION_FEE; bool fConsolidationMapUsed = false; @@ -44,6 +45,11 @@ void AsyncRPCOperation_saplingconsolidation::main() { set_error_code(code); set_error_message(message); } catch (const runtime_error& e) { + const boost::stacktrace::stacktrace* st = boost::get_error_info(e); + if (st) { + std::cerr << *st << '\n'; + } + set_error_code(-1); set_error_code(-1); set_error_message("runtime error: " + string(e.what())); } catch (const logic_error& e) { From 8f49549a1d4fc3ae3808b47bfdeeb9e672308a94 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Fri, 9 Sep 2022 09:37:16 -0400 Subject: [PATCH 053/295] Fix stacktrace --- src/wallet/asyncrpcoperation_saplingconsolidation.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/wallet/asyncrpcoperation_saplingconsolidation.cpp b/src/wallet/asyncrpcoperation_saplingconsolidation.cpp index d75100be4..e578958bc 100644 --- a/src/wallet/asyncrpcoperation_saplingconsolidation.cpp +++ b/src/wallet/asyncrpcoperation_saplingconsolidation.cpp @@ -45,10 +45,7 @@ void AsyncRPCOperation_saplingconsolidation::main() { set_error_code(code); set_error_message(message); } catch (const runtime_error& e) { - const boost::stacktrace::stacktrace* st = boost::get_error_info(e); - if (st) { - std::cerr << *st << '\n'; - } + std::cerr << boost::stacktrace::stacktrace() << '\n'; set_error_code(-1); set_error_code(-1); set_error_message("runtime error: " + string(e.what())); From 85f7ac4c8c22600443e354c488829910abe40bc9 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Fri, 9 Sep 2022 15:14:01 -0700 Subject: [PATCH 054/295] Enable function names and line numbers in backtraces --- src/wallet/asyncrpcoperation_saplingconsolidation.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wallet/asyncrpcoperation_saplingconsolidation.cpp b/src/wallet/asyncrpcoperation_saplingconsolidation.cpp index e578958bc..79a0342a0 100644 --- a/src/wallet/asyncrpcoperation_saplingconsolidation.cpp +++ b/src/wallet/asyncrpcoperation_saplingconsolidation.cpp @@ -17,6 +17,11 @@ #include "utilmoneystr.h" #include "wallet.h" #include +#include + +// enable function names and line numbers in backtraces +#define BOOST_STACKTRACE_LINK +#define BOOST_STACKTRACE_USE_ADDR2LINE CAmount fConsolidationTxFee = DEFAULT_CONSOLIDATION_FEE; bool fConsolidationMapUsed = false; From 1259dd512dfe36cd0a8fe1a9bfd5b49a538bd00c Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sat, 10 Sep 2022 19:37:34 -0400 Subject: [PATCH 055/295] Fix 'not enough conversion params' bug --- src/wallet/asyncrpcoperation_saplingconsolidation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/asyncrpcoperation_saplingconsolidation.cpp b/src/wallet/asyncrpcoperation_saplingconsolidation.cpp index 79a0342a0..0d5fa35aa 100644 --- a/src/wallet/asyncrpcoperation_saplingconsolidation.cpp +++ b/src/wallet/asyncrpcoperation_saplingconsolidation.cpp @@ -86,7 +86,7 @@ void AsyncRPCOperation_saplingconsolidation::main() { bool AsyncRPCOperation_saplingconsolidation::main_impl() { bool status=true; auto opid=getId(); - LogPrintf("%s: Beginning AsyncRPCOperation_saplingconsolidation.\n", __func__, opid); + LogPrintf("%s: Beginning AsyncRPCOperation_saplingconsolidation\n", opid); auto consensusParams = Params().GetConsensus(); auto nextActivationHeight = NextActivationHeight(targetHeight_, consensusParams); if (nextActivationHeight && targetHeight_ + CONSOLIDATION_EXPIRY_DELTA >= nextActivationHeight.get()) { From 772160af6d940889608e6494ddf9f77a2d93eda1 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sat, 10 Sep 2022 19:38:08 -0400 Subject: [PATCH 056/295] Add more logging for consolidation + sweeping --- .../asyncrpcoperation_saplingconsolidation.cpp | 4 ++-- src/wallet/wallet.cpp | 13 +++++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/wallet/asyncrpcoperation_saplingconsolidation.cpp b/src/wallet/asyncrpcoperation_saplingconsolidation.cpp index 0d5fa35aa..6eb20d2e6 100644 --- a/src/wallet/asyncrpcoperation_saplingconsolidation.cpp +++ b/src/wallet/asyncrpcoperation_saplingconsolidation.cpp @@ -50,7 +50,7 @@ void AsyncRPCOperation_saplingconsolidation::main() { set_error_code(code); set_error_message(message); } catch (const runtime_error& e) { - std::cerr << boost::stacktrace::stacktrace() << '\n'; + std::cerr << "Consolidation stacktrace:" << '\n' << boost::stacktrace::stacktrace() << '\n'; set_error_code(-1); set_error_code(-1); set_error_message("runtime error: " + string(e.what())); @@ -73,7 +73,7 @@ void AsyncRPCOperation_saplingconsolidation::main() { set_state(OperationStatus::FAILED); } - std::string s = strprintf("%s: Sapling Consolidation transaction created. (status=%s", getId(), getStateAsString()); + std::string s = strprintf("%s: Sapling Consolidation operation complete. (status=%s", getId(), getStateAsString()); if (success) { s += strprintf(", success)\n"); } else { diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 8cee74ed2..e8434afcf 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -515,13 +515,14 @@ void CWallet::RunSaplingSweep(int blockHeight) { return; } + LogPrintf("%s: Sweep enabled at blockHeight=%d nextSweep=%d\n", __func__, blockHeight, nextSweep); if (nextSweep > blockHeight) { return; } //Don't Run if consolidation will run soon. if (fSaplingConsolidationEnabled && nextConsolidation - 5 <= blockHeight) { - LogPrintf("%s: not consolidating since next sweep is within 5 blocks\n", __func__); + LogPrintf("%s: not sweeping since next consolidation is within 5 blocks, nextConsolidation=%d , blockHeight=%d\n", __func__, nextConsolidation, blockHeight); return; } @@ -545,9 +546,10 @@ void CWallet::RunSaplingSweep(int blockHeight) { } void CWallet::RunSaplingConsolidation(int blockHeight) { - if (!NetworkUpgradeActive(blockHeight, Params().GetConsensus(), Consensus::UPGRADE_SAPLING)) { - return; - } + // Sapling is always active on HUSH+HSCs + //if (!NetworkUpgradeActive(blockHeight, Params().GetConsensus(), Consensus::UPGRADE_SAPLING)) { + // return; + //} LOCK(cs_wallet); @@ -555,6 +557,8 @@ void CWallet::RunSaplingConsolidation(int blockHeight) { return; } + LogPrintf("%s: consolidation enabled at blockHeight=%d fSweepRunning=%d\n", __func__, blockHeight, fSweepRunning ); + if (fSweepRunning) { return; } @@ -565,6 +569,7 @@ void CWallet::RunSaplingConsolidation(int blockHeight) { fprintf(stderr,"%s: height=%d interval=%d\n", __func__, blockHeight, consolidateInterval); if (blockHeight % consolidateInterval == 0) { + LogPrintf("%s: creating consolidation operation at blockHeight=%d\n", __func__, blockHeight); std::shared_ptr q = getAsyncRPCQueue(); std::shared_ptr lastOperation = q->getOperationForId(saplingConsolidationOperationId); if (lastOperation != nullptr) { From b06c3788510556b99cc61a829cb7e3874d52323a Mon Sep 17 00:00:00 2001 From: jahway603 Date: Sun, 11 Sep 2022 18:01:11 -0400 Subject: [PATCH 057/295] removed unused function mta_find_output --- .../asyncrpcoperation_mergetoaddress.cpp | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/wallet/asyncrpcoperation_mergetoaddress.cpp b/src/wallet/asyncrpcoperation_mergetoaddress.cpp index ac462f5b8..d1f207571 100644 --- a/src/wallet/asyncrpcoperation_mergetoaddress.cpp +++ b/src/wallet/asyncrpcoperation_mergetoaddress.cpp @@ -52,24 +52,6 @@ using namespace libzcash; extern UniValue sendrawtransaction(const UniValue& params, bool fHelp, const CPubKey& mypk); -int mta_find_output(UniValue obj, int n) -{ - UniValue outputMapValue = find_value(obj, "outputmap"); - if (!outputMapValue.isArray()) { - throw JSONRPCError(RPC_WALLET_ERROR, "Missing outputmap for JoinSplit operation"); - } - - UniValue outputMap = outputMapValue.get_array(); - assert(outputMap.size() == HUSH_NUM_JS_OUTPUTS); - for (size_t i = 0; i < outputMap.size(); i++) { - if (outputMap[i].get_int() == n) { - return i; - } - } - - throw std::logic_error("n is not present in outputmap"); -} - AsyncRPCOperation_mergetoaddress::AsyncRPCOperation_mergetoaddress( boost::optional builder, CMutableTransaction contextualTx, From 2a1cad1e5fbdf8081869a53b4399ef38c057ff87 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sun, 11 Sep 2022 20:10:28 -0400 Subject: [PATCH 058/295] Fix bug in z_sweepstatus --- src/wallet/rpcwallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 745dc3ce4..ced9b19b2 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3381,7 +3381,7 @@ UniValue z_sweepstatus(const UniValue& params, bool fHelp, const CPubKey& mypk) if (pwalletMain->fConsolidationRunning) { ret.push_back(Pair("next_zsweep", pwalletMain->sweepInterval + chainActive.Tip()->GetHeight())); } else { - if (pwalletMain->nextConsolidation == 0) { + if (pwalletMain->nextSweep == 0) { ret.push_back(Pair("next_zsweep", chainActive.Tip()->GetHeight() + 1)); } else { ret.push_back(Pair("next_zsweep", pwalletMain->nextSweep)); From 9347b1fa12215ce7291222656895d1bdb0bceb5a Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sun, 11 Sep 2022 20:18:01 -0400 Subject: [PATCH 059/295] Sweep Interval should be 10 to match other defaults --- src/wallet/wallet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index fdaee018b..147ed6dbc 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -810,7 +810,7 @@ public: int nextSweep = 0; int amountSwept = 0; int amountConsolidated = 0; - int sweepInterval = 20; + int sweepInterval = 10; int sweepFee = 10000; int sweepMaxInputs = 200; std::string sweepAddress = ""; From 5b15d790f9cd09779b7c842ce4eb01cadeafa4a1 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sun, 11 Sep 2022 21:56:21 -0400 Subject: [PATCH 060/295] Parse sweep+consolidation intervals on startup, add consolidationinterval config option, change consolidation interval default to 25, only validate consolidatesaplingaddress if consolidation is enabled --- src/init.cpp | 38 ++++++++++++++++++------ src/wallet/asyncrpcoperation_sweep.cpp | 7 +---- src/wallet/rpcwallet.cpp | 25 ++-------------- src/wallet/wallet.cpp | 40 +++++++++++++------------- src/wallet/wallet.h | 1 + 5 files changed, 54 insertions(+), 57 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 31073cf16..f71423e2a 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -2052,16 +2052,28 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) //Set Sapling Consolidation pwalletMain->fSaplingConsolidationEnabled = GetBoolArg("-consolidation", false); - fConsolidationTxFee = GetArg("-consolidationtxfee", DEFAULT_CONSOLIDATION_FEE); - fConsolidationMapUsed = !mapMultiArgs["-consolidatesaplingaddress"].empty(); + if(pwalletMain->fSaplingConsolidationEnabled) { + fConsolidationTxFee = GetArg("-consolidationtxfee", DEFAULT_CONSOLIDATION_FEE); + fConsolidationMapUsed = !mapMultiArgs["-consolidatesaplingaddress"].empty(); - //Validate Sapling Addresses - vector& vaddresses = mapMultiArgs["-consolidatesaplingaddress"]; - for (int i = 0; i < vaddresses.size(); i++) { - LogPrintf("Consolidating Sapling Address: %s\n", vaddresses[i]); - auto zAddress = DecodePaymentAddress(vaddresses[i]); - if (!IsValidPaymentAddress(zAddress)) { - return InitError("Invalid consolidation address"); + int consolidationInterval = GetArg("-consolidationinterval", 25); + if (consolidationInterval < 5) { + fprintf(stderr,"%s: Invalid consolidation interval of %d < 5, setting to default of 25\n", __func__, consolidationInterval); + consolidationInterval = 25; + } + + pwalletMain->consolidationInterval = consolidationInterval; + pwalletMain->nextConsolidation = pwalletMain->consolidationInterval + chainActive.Tip()->GetHeight(); + LogPrintf("%s: set nextConsolidation=%d\n", __func__, pwalletMain->nextConsolidation ); + + //Validate Sapling Addresses + vector& vaddresses = mapMultiArgs["-consolidatesaplingaddress"]; + for (int i = 0; i < vaddresses.size(); i++) { + LogPrintf("Consolidating Sapling Address: %s\n", vaddresses[i]); + auto zAddress = DecodePaymentAddress(vaddresses[i]); + if (!IsValidPaymentAddress(zAddress)) { + return InitError("Invalid consolidation address"); + } } } @@ -2069,6 +2081,14 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) pwalletMain->fSweepEnabled = GetBoolArg("-zsweep", false); if (pwalletMain->fSweepEnabled) { + int sweepInterval = GetArg("-zsweepinterval", 10); + if (sweepInterval < 5) { + fprintf(stderr,"%s: Invalid sweep interval of %d, setting to default of 10\n", __func__, sweepInterval); + sweepInterval = 10; + } + pwalletMain->sweepInterval = sweepInterval; + pwalletMain->nextSweep = pwalletMain->sweepInterval + chainActive.Tip()->GetHeight(); + LogPrintf("%s: set nextSweep=%d with sweepInterval=%d\n", __func__, pwalletMain->nextSweep, pwalletMain->sweepInterval ); fSweepTxFee = GetArg("-zsweepfee", DEFAULT_SWEEP_FEE); fSweepMapUsed = !mapMultiArgs["-zsweepaddress"].empty(); diff --git a/src/wallet/asyncrpcoperation_sweep.cpp b/src/wallet/asyncrpcoperation_sweep.cpp index 6045cf46f..1e7d324af 100644 --- a/src/wallet/asyncrpcoperation_sweep.cpp +++ b/src/wallet/asyncrpcoperation_sweep.cpp @@ -284,12 +284,7 @@ bool AsyncRPCOperation_sweep::main_impl() { } if (sweepComplete) { - int sweepInterval = GetArg("-zsweepinterval", 10); - if (sweepInterval < 5) { - fprintf(stderr,"%s: Invalid sweep interval of %d, setting to default of 10\n", __func__, sweepInterval); - sweepInterval = 10; - } - pwalletMain->nextSweep = sweepInterval + chainActive.Tip()->GetHeight(); + pwalletMain->nextSweep = pwalletMain->sweepInterval + chainActive.Tip()->GetHeight(); pwalletMain->fSweepRunning = false; } diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index ced9b19b2..eaa9e436a 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3337,18 +3337,8 @@ UniValue z_consolidationstatus(const UniValue& params, bool fHelp, const CPubKey ret.push_back(Pair("consolidation", pwalletMain->fSaplingConsolidationEnabled)); ret.push_back(Pair("running", pwalletMain->fConsolidationRunning)); ret.push_back(Pair("amount_consolidated", pwalletMain->amountConsolidated)); - - if (pwalletMain->fConsolidationRunning) { - // TODO: set a static consolidationInterval instead of it being non-deterministic - // ret.push_back(Pair("next_consolidation", pwalletMain->consolidationInterval + chainActive.Tip()->GetHeight())); - } else { - if (pwalletMain->nextConsolidation == 0) { - ret.push_back(Pair("next_consolidation", chainActive.Tip()->GetHeight() + 1)); - } else { - ret.push_back(Pair("next_consolidation", pwalletMain->nextConsolidation)); - } - } - // ret.push_back(Pair("consolidationinterval", pwalletMain->consolidationInterval)); + ret.push_back(Pair("next_consolidation", pwalletMain->nextConsolidation)); + ret.push_back(Pair("consolidationinterval", pwalletMain->consolidationInterval)); ret.push_back(Pair("consolidationaddress", pwalletMain->consolidationAddress)); ret.push_back(Pair("consolidationtxfee",(int)fConsolidationTxFee)); @@ -3377,16 +3367,7 @@ UniValue z_sweepstatus(const UniValue& params, bool fHelp, const CPubKey& mypk) ret.push_back(Pair("zsweep", pwalletMain->fSweepEnabled)); ret.push_back(Pair("running", pwalletMain->fSweepRunning)); ret.push_back(Pair("amount_swept", pwalletMain->amountSwept)); - - if (pwalletMain->fConsolidationRunning) { - ret.push_back(Pair("next_zsweep", pwalletMain->sweepInterval + chainActive.Tip()->GetHeight())); - } else { - if (pwalletMain->nextSweep == 0) { - ret.push_back(Pair("next_zsweep", chainActive.Tip()->GetHeight() + 1)); - } else { - ret.push_back(Pair("next_zsweep", pwalletMain->nextSweep)); - } - } + ret.push_back(Pair("next_zsweep", pwalletMain->nextSweep)); ret.push_back(Pair("zsweepinterval", pwalletMain->sweepInterval)); ret.push_back(Pair("zsweepaddress", pwalletMain->sweepAddress)); ret.push_back(Pair("zsweepmaxinputs", pwalletMain->sweepMaxInputs)); diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index e8434afcf..85faac38b 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -515,10 +515,11 @@ void CWallet::RunSaplingSweep(int blockHeight) { return; } - LogPrintf("%s: Sweep enabled at blockHeight=%d nextSweep=%d\n", __func__, blockHeight, nextSweep); if (nextSweep > blockHeight) { + LogPrintf("%s: Not time to sweep yet at blockHeight=%d nextSweep=%d\n", __func__, blockHeight, nextSweep); return; } + LogPrintf("%s: Sweep enabled at blockHeight=%d nextSweep=%d\n", __func__, blockHeight, nextSweep); //Don't Run if consolidation will run soon. if (fSaplingConsolidationEnabled && nextConsolidation - 5 <= blockHeight) { @@ -528,7 +529,7 @@ void CWallet::RunSaplingSweep(int blockHeight) { //Don't Run While consolidation is running. if (fConsolidationRunning) { - LogPrintf("%s: not sweeping since consolidation is currently running\n", __func__); + LogPrintf("%s: not sweeping since consolidation is currently running at height=%d\n", __func__, blockHeight); return; } @@ -557,29 +558,28 @@ void CWallet::RunSaplingConsolidation(int blockHeight) { return; } - LogPrintf("%s: consolidation enabled at blockHeight=%d fSweepRunning=%d\n", __func__, blockHeight, fSweepRunning ); - - if (fSweepRunning) { + if (nextConsolidation > blockHeight) { + LogPrintf("%s: Not time to consolidate yet at blockHeight=%d nextConsolidation=%d\n", __func__, blockHeight, nextConsolidation); return; } - int consolidateInterval = 45; + LogPrintf("%s: consolidation enabled at blockHeight=%d fSweepRunning=%d\n", __func__, blockHeight, fSweepRunning ); - if(fZdebug) - fprintf(stderr,"%s: height=%d interval=%d\n", __func__, blockHeight, consolidateInterval); - - if (blockHeight % consolidateInterval == 0) { - LogPrintf("%s: creating consolidation operation at blockHeight=%d\n", __func__, blockHeight); - std::shared_ptr q = getAsyncRPCQueue(); - std::shared_ptr lastOperation = q->getOperationForId(saplingConsolidationOperationId); - if (lastOperation != nullptr) { - lastOperation->cancel(); - } - pendingSaplingConsolidationTxs.clear(); - std::shared_ptr operation(new AsyncRPCOperation_saplingconsolidation(blockHeight + 5)); - saplingConsolidationOperationId = operation->getId(); - q->addOperation(operation); + if (fSweepRunning) { + LogPrintf("%s: not consolidating since sweep is currently running at height=%d\n", __func__, blockHeight); + return; } + + LogPrintf("%s: creating consolidation operation at blockHeight=%d\n", __func__, blockHeight); + std::shared_ptr q = getAsyncRPCQueue(); + std::shared_ptr lastOperation = q->getOperationForId(saplingConsolidationOperationId); + if (lastOperation != nullptr) { + lastOperation->cancel(); + } + pendingSaplingConsolidationTxs.clear(); + std::shared_ptr operation(new AsyncRPCOperation_saplingconsolidation(blockHeight + 5)); + saplingConsolidationOperationId = operation->getId(); + q->addOperation(operation); } bool CWallet::CommitAutomatedTx(const CTransaction& tx) { diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 147ed6dbc..f5e07e9da 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -811,6 +811,7 @@ public: int amountSwept = 0; int amountConsolidated = 0; int sweepInterval = 10; + int consolidationInterval = 25; int sweepFee = 10000; int sweepMaxInputs = 200; std::string sweepAddress = ""; From bd9006623c2ae9e1489111d64c87f5a3e7d29a94 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sun, 11 Sep 2022 22:41:03 -0400 Subject: [PATCH 061/295] Avoid coredumps in ReacceptWalletTransactions and log the situation, which is possibly caused by corrupt wallet tx data --- src/wallet/wallet.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 85faac38b..e9450161f 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2847,7 +2847,12 @@ void CWallet::ReacceptWalletTransactions() { const uint256& wtxid = item.first; CWalletTx& wtx = item.second; - assert(wtx.GetHash() == wtxid); + if(wtx.GetHash() != wtxid) { + LogPrintf("%s: Something funky going on, skipping this tx. wtx.GetHash() != wtxid (%s != %s)\n", __func__, wtx.GetHash().ToString().c_str(), wtxid.ToString().c_str() ); + continue; + } + // Crashing the node because of this is lame + // assert(wtx.GetHash() == wtxid); int nDepth = wtx.GetDepthInMainChain(); From 0edc5927e9da3f746093a0b1a2e201eba2717eeb Mon Sep 17 00:00:00 2001 From: jahway603 Date: Mon, 12 Sep 2022 00:50:50 -0400 Subject: [PATCH 062/295] depends: Add FreeBSD to hosts and builders --- depends/Makefile | 2 ++ depends/builders/freebsd.mk | 4 ++++ depends/hosts/freebsd.mk | 31 +++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 depends/builders/freebsd.mk create mode 100644 depends/hosts/freebsd.mk diff --git a/depends/Makefile b/depends/Makefile index 82acde0ac..05abb94db 100644 --- a/depends/Makefile +++ b/depends/Makefile @@ -39,6 +39,7 @@ build_vendor=$(word 2,$(subst -, ,$(build))) full_build_os:=$(subst $(build_arch)-$(build_vendor)-,,$(build)) build_os:=$(findstring linux,$(full_build_os)) build_os+=$(findstring darwin,$(full_build_os)) +build_os+=$(findstring freebsd,$(full_build_os)) build_os:=$(strip $(build_os)) ifeq ($(build_os),) build_os=$(full_build_os) @@ -49,6 +50,7 @@ host_vendor=$(word 2,$(subst -, ,$(canonical_host))) full_host_os:=$(subst $(host_arch)-$(host_vendor)-,,$(canonical_host)) host_os:=$(findstring linux,$(full_host_os)) host_os+=$(findstring darwin,$(full_host_os)) +host_os+=$(findstring freebsd,$(full_host_os)) host_os+=$(findstring mingw32,$(full_host_os)) host_os:=$(strip $(host_os)) ifeq ($(host_os),) diff --git a/depends/builders/freebsd.mk b/depends/builders/freebsd.mk new file mode 100644 index 000000000..7a61043e9 --- /dev/null +++ b/depends/builders/freebsd.mk @@ -0,0 +1,4 @@ +build_freebsd_CC = clang +build_freebsd_CXX = clang++ +build_freebsd_SHA256SUM = shasum -a 256 +build_freebsd_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o diff --git a/depends/hosts/freebsd.mk b/depends/hosts/freebsd.mk new file mode 100644 index 000000000..07436aef8 --- /dev/null +++ b/depends/hosts/freebsd.mk @@ -0,0 +1,31 @@ +freebsd_CFLAGS=-pipe +freebsd_CXXFLAGS=$(freebsd_CFLAGS) + +freebsd_release_CFLAGS=-O1 +freebsd_release_CXXFLAGS=$(freebsd_release_CFLAGS) + +freebsd_debug_CFLAGS=-O1 +freebsd_debug_CXXFLAGS=$(freebsd_debug_CFLAGS) + +freebsd_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC + +ifeq (86,$(findstring 86,$(build_arch))) +i686_freebsd_CC=gcc -m32 +i686_freebsd_CXX=g++ -m32 +i686_freebsd_AR=ar +i686_freebsd_RANLIB=ranlib +i686_freebsd_NM=nm +i686_freebsd_STRIP=strip + +x86_64_freebsd_CC=gcc -m64 +x86_64_freebsd_CXX=g++ -m64 +x86_64_freebsd_AR=ar +x86_64_freebsd_RANLIB=ranlib +x86_64_freebsd_NM=nm +x86_64_freebsd_STRIP=strip +else +i686_freebsd_CC=$(default_host_CC) -m32 +i686_freebsd_CXX=$(default_host_CXX) -m32 +x86_64_freebsd_CC=$(default_host_CC) -m64 +x86_64_freebsd_CXX=$(default_host_CXX) -m64 +endif From 1799c6c9bf15c38bbb9ffeea82404a4585241cae Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 12 Sep 2022 19:35:27 -0400 Subject: [PATCH 063/295] Remove zeromq support --- configure.ac | 40 ------ contrib/debian/copyright | 42 ------ contrib/zmq/zmq_sub.py | 45 ------ depends/packages/packages.mk | 2 +- depends/packages/zeromq.mk | 53 ------- doc/zmq.md | 107 -------------- qa/pull-tester/tests-config.sh.in | 1 - qa/rpc-tests/zmq_test.py | 93 ------------ src/Makefile.am | 23 +-- src/Makefile.gtest.include | 3 - src/Makefile.test.include | 4 - src/init.cpp | 35 +---- src/zmq/zmqabstractnotifier.cpp | 27 ---- src/zmq/zmqabstractnotifier.h | 45 ------ src/zmq/zmqconfig.h | 24 ---- src/zmq/zmqnotificationinterface.cpp | 181 ------------------------ src/zmq/zmqnotificationinterface.h | 39 ----- src/zmq/zmqpublishnotifier.cpp | 203 --------------------------- src/zmq/zmqpublishnotifier.h | 61 -------- 19 files changed, 3 insertions(+), 1025 deletions(-) delete mode 100755 contrib/zmq/zmq_sub.py delete mode 100644 depends/packages/zeromq.mk delete mode 100644 doc/zmq.md delete mode 100755 qa/rpc-tests/zmq_test.py delete mode 100644 src/zmq/zmqabstractnotifier.cpp delete mode 100644 src/zmq/zmqabstractnotifier.h delete mode 100644 src/zmq/zmqconfig.h delete mode 100644 src/zmq/zmqnotificationinterface.cpp delete mode 100644 src/zmq/zmqnotificationinterface.h delete mode 100644 src/zmq/zmqpublishnotifier.cpp delete mode 100644 src/zmq/zmqpublishnotifier.h diff --git a/configure.ac b/configure.ac index 794c486c0..801d7be75 100644 --- a/configure.ac +++ b/configure.ac @@ -151,12 +151,6 @@ AC_ARG_ENABLE([glibc-back-compat], [use_glibc_compat=$enableval], [use_glibc_compat=no]) -AC_ARG_ENABLE([zmq], - [AS_HELP_STRING([--disable-zmq], - [disable ZMQ notifications])], - [use_zmq=$enableval], - [use_zmq=yes]) - AC_ARG_ENABLE([experimental-asm], [AS_HELP_STRING([--enable-experimental-asm], [Enable experimental assembly routines (default is no)])], @@ -673,15 +667,6 @@ if test x$use_pkgconfig = xyes; then fi fi - if test "x$use_zmq" = "xyes"; then - PKG_CHECK_MODULES([ZMQ],[libzmq >= 4], - [AC_DEFINE([ENABLE_ZMQ],[1],[Define to 1 to enable ZMQ functions])], - [AC_DEFINE([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions]) - AC_MSG_WARN([libzmq version 4.x or greater not found, disabling]) - use_zmq=no]) - else - AC_DEFINE_UNQUOTED([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions]) - fi ] ) else @@ -718,28 +703,7 @@ fi #AC_CHECK_HEADER([gmpxx.h],,AC_MSG_ERROR(libgmpxx headers missing)) #AC_CHECK_LIB([gmpxx],[main],GMPXX_LIBS=-lgmpxx, [AC_MSG_ERROR(libgmpxx missing)]) - if test "x$use_zmq" = "xyes"; then - AC_CHECK_HEADER([zmq.h], - [AC_DEFINE([ENABLE_ZMQ],[1],[Define to 1 to enable ZMQ functions])], - [AC_MSG_WARN([zmq.h not found, disabling zmq support]) - use_zmq=no - AC_DEFINE([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])]) - AC_CHECK_LIB([zmq],[zmq_ctx_shutdown],ZMQ_LIBS=-lzmq, - [AC_MSG_WARN([libzmq >= 4.0 not found, disabling zmq support]) - use_zmq=no - AC_DEFINE([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])]) - else - AC_DEFINE_UNQUOTED([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions]) - fi - if test "x$use_zmq" = "xyes"; then - dnl Assume libzmq was built for static linking - case $host in - *mingw*) - ZMQ_CFLAGS="$ZMQ_CFLAGS -DZMQ_STATIC" - ;; - esac - fi fi # These packages don't provide pkgconfig config files across all @@ -824,8 +788,6 @@ else AC_MSG_RESULT(no) fi -AM_CONDITIONAL([ENABLE_ZMQ], [test "x$use_zmq" = "xyes"]) - AC_MSG_CHECKING([whether to build test_bitcoin]) if test x$use_tests = xyes; then AC_MSG_RESULT([yes]) @@ -894,7 +856,6 @@ AC_SUBST(CRYPTO_LIBS) AC_SUBST(SSL_LIBS) AC_SUBST(EVENT_LIBS) AC_SUBST(EVENT_PTHREADS_LIBS) -AC_SUBST(ZMQ_LIBS) AC_SUBST(GMP_LIBS) AC_SUBST(GMPXX_LIBS) AC_SUBST(LIBZCASH_LIBS) @@ -944,7 +905,6 @@ esac echo echo "Options used to compile and link:" echo " with wallet = $enable_wallet" -echo " with zmq = $use_zmq" echo " with test = $use_tests" echo " debug enabled = $enable_debug" echo " werror = $enable_werror" diff --git a/contrib/debian/copyright b/contrib/debian/copyright index f2d71c287..7bf3a707c 100644 --- a/contrib/debian/copyright +++ b/contrib/debian/copyright @@ -23,19 +23,6 @@ Copyright: 1990, 2016 Oracle and/or its affiliates; 2000-2005 INRIA, France Telecom License: BDB -Files: depends/sources/zeromq-*.tar.gz -Copyright: - 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. - 2007-2014 iMatix Corporation - 2009-2011 250bpm s.r.o. - 2010-2011 Miru Limited - 2011 VMware, Inc. - 2012 Spotify AB - 2013 Ericsson AB - 2014 AppDynamics Inc. - 2015-2016 Brocade Communications Systems Inc. -License: LGPL-with-ZeroMQ-exception - Files: depends/sources/google*.tar.gz Copyright: 2008 Google Inc. License: BSD-3clause-Google @@ -1056,35 +1043,6 @@ Comment: You should have received a copy of the GNU General Public License along with this program. If not, see . -License: LGPL-with-ZeroMQ-exception - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - . - On Debian systems the GNU Lesser General Public License (LGPL) is - located in '/usr/share/common-licenses/LGPL'. - . - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - -------------------------------------------------------------------------------- - SPECIAL EXCEPTION GRANTED BY COPYRIGHT HOLDERS - . - As a special exception, copyright holders give you permission to link this - library with independent modules to produce an executable, regardless of - the license terms of these independent modules, and to copy and distribute - the resulting executable under terms of your choice, provided that you also - meet, for each linked independent module, the terms and conditions of - the license of that module. An independent module is a module which is not - derived from or based on this library. If you modify this library, you must - extend this exception to your version of the library. - - Note: this exception relieves you of any obligations under sections 4 and 5 - of this license, and section 6 of the GNU General Public License. -Comment: - You should have received a copy of the GNU General Public License - along with this program. If not, see . - License: GNU-All-permissive-License Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice diff --git a/contrib/zmq/zmq_sub.py b/contrib/zmq/zmq_sub.py deleted file mode 100755 index 902fc73c5..000000000 --- a/contrib/zmq/zmq_sub.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python2 -# Copyright (c) 2014-2016 The Bitcoin Core 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 - -import array -import binascii -import zmq -import struct - -port = 28332 - -zmqContext = zmq.Context() -zmqSubSocket = zmqContext.socket(zmq.SUB) -zmqSubSocket.setsockopt(zmq.SUBSCRIBE, "hashblock") -zmqSubSocket.setsockopt(zmq.SUBSCRIBE, "hashtx") -zmqSubSocket.setsockopt(zmq.SUBSCRIBE, "rawblock") -zmqSubSocket.setsockopt(zmq.SUBSCRIBE, "rawtx") -zmqSubSocket.connect("tcp://127.0.0.1:%i" % port) - -try: - while True: - msg = zmqSubSocket.recv_multipart() - topic = str(msg[0]) - body = msg[1] - sequence = "Unknown"; - if len(msg[-1]) == 4: - msgSequence = struct.unpack(' #include #include - -#if ENABLE_ZMQ -#include "zmq/zmqnotificationinterface.h" -#endif - #include "librustzcash.h" using namespace std; @@ -103,10 +98,6 @@ CWallet* pwalletMain = NULL; #endif bool fFeeEstimatesInitialized = false; -#if ENABLE_ZMQ -static CZMQNotificationInterface* pzmqNotificationInterface = NULL; -#endif - #ifdef WIN32 // Win32 LevelDB doesn't use file descriptors, and the ones used for // accessing block files don't count towards the fd_set size limit @@ -269,14 +260,6 @@ void Shutdown() pwalletMain->Flush(true); #endif -#if ENABLE_ZMQ - if (pzmqNotificationInterface) { - UnregisterValidationInterface(pzmqNotificationInterface); - delete pzmqNotificationInterface; - pzmqNotificationInterface = NULL; - } -#endif - #ifndef WIN32 try { boost::filesystem::remove(GetPidFile()); @@ -491,14 +474,6 @@ std::string HelpMessage(HelpMessageMode mode) " " + _("(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)")); #endif -#if ENABLE_ZMQ - strUsage += HelpMessageGroup(_("ZeroMQ notification options:")); - strUsage += HelpMessageOpt("-zmqpubhashblock=
", _("Enable publish hash block in
")); - strUsage += HelpMessageOpt("-zmqpubhashtx=
", _("Enable publish hash transaction in
")); - strUsage += HelpMessageOpt("-zmqpubrawblock=
", _("Enable publish raw block in
")); - strUsage += HelpMessageOpt("-zmqpubrawtx=
", _("Enable publish raw transaction in
")); -#endif - strUsage += HelpMessageGroup(_("Debugging/Testing options:")); if (showDebug) { @@ -512,7 +487,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-stopafterblockimport", strprintf("Stop running after importing blocks from disk (default: %u)", 0)); strUsage += HelpMessageOpt("-nuparams=hexBranchId:activationHeight", "Use given activation height for specified network upgrade (regtest-only)"); } - string debugCategories = "addrman, alert, bench, coindb, db, deletetx, estimatefee, http, libevent, lock, mempool, net, tls, partitioncheck, pow, proxy, prune, rand, randomx, reindex, rpc, selectcoins, stratum, tor, zmq, zrpc, zrpcunsafe (implies zrpc)"; // Don't translate these + string debugCategories = "addrman, alert, bench, coindb, db, deletetx, estimatefee, http, libevent, lock, mempool, net, tls, partitioncheck, pow, proxy, prune, rand, randomx, reindex, rpc, selectcoins, stratum, tor, zrpc, zrpcunsafe (implies zrpc)"; // Don't translate these strUsage += HelpMessageOpt("-debug=", strprintf(_("Output debugging information (default: %u, supplying is optional)"), 0) + ". " + _("If is not supplied or if = 1, output all debugging information.") + " " + _(" can be:") + " " + debugCategories + "."); strUsage += HelpMessageOpt("-experimentalfeatures", _("Enable use of experimental features")); @@ -1728,14 +1703,6 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) return InitError(strprintf(_("Cannot find trusted certificates directory: '%s'"), pathTLSTrustredDir.string())); } -#if ENABLE_ZMQ - pzmqNotificationInterface = CZMQNotificationInterface::CreateWithArguments(mapArgs); - - if (pzmqNotificationInterface) { - RegisterValidationInterface(pzmqNotificationInterface); - } -#endif - if ( HUSH_NSPV_SUPERLITE ) { std::vector vImportFiles; diff --git a/src/zmq/zmqabstractnotifier.cpp b/src/zmq/zmqabstractnotifier.cpp deleted file mode 100644 index b2f1d0833..000000000 --- a/src/zmq/zmqabstractnotifier.cpp +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2015 The Bitcoin Core developers -// Distributed under the GPLv3 software license, see the accompanying -// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html - -#include "zmqabstractnotifier.h" -#include "util.h" - - -CZMQAbstractNotifier::~CZMQAbstractNotifier() -{ - assert(!psocket); -} - -bool CZMQAbstractNotifier::NotifyBlock(const CBlockIndex * /*CBlockIndex*/) -{ - return true; -} - -bool CZMQAbstractNotifier::NotifyBlock(const CBlock &) -{ - return true; -} - -bool CZMQAbstractNotifier::NotifyTransaction(const CTransaction &/*transaction*/) -{ - return true; -} diff --git a/src/zmq/zmqabstractnotifier.h b/src/zmq/zmqabstractnotifier.h deleted file mode 100644 index d9d3cb0de..000000000 --- a/src/zmq/zmqabstractnotifier.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2015 The Bitcoin Core developers -// Distributed under the GPLv3 software license, see the accompanying -// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html - -#ifndef HUSH_ZMQ_ZMQABSTRACTNOTIFIER_H -#define HUSH_ZMQ_ZMQABSTRACTNOTIFIER_H - -#include "zmqconfig.h" - -class CBlockIndex; -class CZMQAbstractNotifier; - -typedef CZMQAbstractNotifier* (*CZMQNotifierFactory)(); - -class CZMQAbstractNotifier -{ -public: - CZMQAbstractNotifier() : psocket(0) { } - virtual ~CZMQAbstractNotifier(); - - template - static CZMQAbstractNotifier* Create() - { - return new T(); - } - - std::string GetType() const { return type; } - void SetType(const std::string &t) { type = t; } - std::string GetAddress() const { return address; } - void SetAddress(const std::string &a) { address = a; } - - virtual bool Initialize(void *pcontext) = 0; - virtual void Shutdown() = 0; - - virtual bool NotifyBlock(const CBlockIndex *pindex); - virtual bool NotifyBlock(const CBlock& pblock); - virtual bool NotifyTransaction(const CTransaction &transaction); - -protected: - void *psocket; - std::string type; - std::string address; -}; - -#endif // HUSH_ZMQ_ZMQABSTRACTNOTIFIER_H diff --git a/src/zmq/zmqconfig.h b/src/zmq/zmqconfig.h deleted file mode 100644 index e561b0e7b..000000000 --- a/src/zmq/zmqconfig.h +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2015 The Bitcoin Core developers -// Distributed under the GPLv3 software license, see the accompanying -// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html - -#ifndef HUSH_ZMQ_ZMQCONFIG_H -#define HUSH_ZMQ_ZMQCONFIG_H - -#if defined(HAVE_CONFIG_H) -#include "config/bitcoin-config.h" -#endif - -#include -#include - -#if ENABLE_ZMQ -#include -#endif - -#include "primitives/block.h" -#include "primitives/transaction.h" - -void zmqError(const char *str); - -#endif // HUSH_ZMQ_ZMQCONFIG_H diff --git a/src/zmq/zmqnotificationinterface.cpp b/src/zmq/zmqnotificationinterface.cpp deleted file mode 100644 index 50838c9c9..000000000 --- a/src/zmq/zmqnotificationinterface.cpp +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright (c) 2015 The Bitcoin Core developers -// Distributed under the GPLv3 software license, see the accompanying -// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html - -#include "zmqnotificationinterface.h" -#include "zmqpublishnotifier.h" - -#include "version.h" -#include "main.h" -#include "streams.h" -#include "util.h" - -void zmqError(const char *str) -{ - LogPrint("zmq", "zmq: Error: %s, errno=%s\n", str, zmq_strerror(errno)); -} - -CZMQNotificationInterface::CZMQNotificationInterface() : pcontext(NULL) -{ -} - -CZMQNotificationInterface::~CZMQNotificationInterface() -{ - Shutdown(); - - for (std::list::iterator i=notifiers.begin(); i!=notifiers.end(); ++i) - { - delete *i; - } -} - -CZMQNotificationInterface* CZMQNotificationInterface::CreateWithArguments(const std::map &args) -{ - CZMQNotificationInterface* notificationInterface = NULL; - std::map factories; - std::list notifiers; - - factories["pubhashblock"] = CZMQAbstractNotifier::Create; - factories["pubhashtx"] = CZMQAbstractNotifier::Create; - factories["pubrawblock"] = CZMQAbstractNotifier::Create; - factories["pubrawtx"] = CZMQAbstractNotifier::Create; - factories["pubcheckedblock"] = CZMQAbstractNotifier::Create; - - for (std::map::const_iterator i=factories.begin(); i!=factories.end(); ++i) - { - std::map::const_iterator j = args.find("-zmq" + i->first); - if (j!=args.end()) - { - CZMQNotifierFactory factory = i->second; - std::string address = j->second; - CZMQAbstractNotifier *notifier = factory(); - notifier->SetType(i->first); - notifier->SetAddress(address); - notifiers.push_back(notifier); - } - } - - if (!notifiers.empty()) - { - notificationInterface = new CZMQNotificationInterface(); - notificationInterface->notifiers = notifiers; - - if (!notificationInterface->Initialize()) - { - delete notificationInterface; - notificationInterface = NULL; - } - } - - return notificationInterface; -} - -// Called at startup to conditionally set up ZMQ socket(s) -bool CZMQNotificationInterface::Initialize() -{ - LogPrint("zmq", "zmq: Initialize notification interface\n"); - assert(!pcontext); - - pcontext = zmq_init(1); - - if (!pcontext) - { - zmqError("Unable to initialize context"); - return false; - } - - std::list::iterator i=notifiers.begin(); - for (; i!=notifiers.end(); ++i) - { - CZMQAbstractNotifier *notifier = *i; - if (notifier->Initialize(pcontext)) - { - LogPrint("zmq", " Notifier %s ready (address = %s)\n", notifier->GetType(), notifier->GetAddress()); - } - else - { - LogPrint("zmq", " Notifier %s failed (address = %s)\n", notifier->GetType(), notifier->GetAddress()); - break; - } - } - - if (i!=notifiers.end()) - { - return false; - } - - return true; -} - -// Called during shutdown sequence -void CZMQNotificationInterface::Shutdown() -{ - LogPrint("zmq", "zmq: Shutdown notification interface\n"); - if (pcontext) - { - for (std::list::iterator i=notifiers.begin(); i!=notifiers.end(); ++i) - { - CZMQAbstractNotifier *notifier = *i; - LogPrint("zmq", " Shutdown notifier %s at %s\n", notifier->GetType(), notifier->GetAddress()); - notifier->Shutdown(); - } - zmq_ctx_destroy(pcontext); - - pcontext = 0; - } -} - -void CZMQNotificationInterface::UpdatedBlockTip(const CBlockIndex *pindex) -{ - for (std::list::iterator i = notifiers.begin(); i!=notifiers.end(); ) - { - CZMQAbstractNotifier *notifier = *i; - if (notifier->NotifyBlock(pindex)) - { - i++; - } - else - { - notifier->Shutdown(); - i = notifiers.erase(i); - } - } -} - -void CZMQNotificationInterface::BlockChecked(const CBlock& block, const CValidationState& state) -{ - if (state.IsInvalid()) { - return; - } - - for (std::list::iterator i = notifiers.begin(); i!=notifiers.end(); ) - { - CZMQAbstractNotifier *notifier = *i; - if (notifier->NotifyBlock(block)) - { - i++; - } - else - { - notifier->Shutdown(); - i = notifiers.erase(i); - } - } -} - -void CZMQNotificationInterface::SyncTransaction(const CTransaction &tx, const CBlock *pblock) -{ - for (std::list::iterator i = notifiers.begin(); i!=notifiers.end(); ) - { - CZMQAbstractNotifier *notifier = *i; - if (notifier->NotifyTransaction(tx)) - { - i++; - } - else - { - notifier->Shutdown(); - i = notifiers.erase(i); - } - } -} diff --git a/src/zmq/zmqnotificationinterface.h b/src/zmq/zmqnotificationinterface.h deleted file mode 100644 index 14542a983..000000000 --- a/src/zmq/zmqnotificationinterface.h +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2015 The Bitcoin Core developers -// Distributed under the GPLv3 software license, see the accompanying -// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html - -#ifndef HUSH_ZMQ_ZMQNOTIFICATIONINTERFACE_H -#define HUSH_ZMQ_ZMQNOTIFICATIONINTERFACE_H - -#include "validationinterface.h" -#include "consensus/validation.h" -#include -#include - -class CBlockIndex; -class CZMQAbstractNotifier; - -class CZMQNotificationInterface : public CValidationInterface -{ -public: - virtual ~CZMQNotificationInterface(); - - static CZMQNotificationInterface* CreateWithArguments(const std::map &args); - -protected: - bool Initialize(); - void Shutdown(); - - // CValidationInterface - void SyncTransaction(const CTransaction &tx, const CBlock *pblock); - void UpdatedBlockTip(const CBlockIndex *pindex); - void BlockChecked(const CBlock& block, const CValidationState& state); - -private: - CZMQNotificationInterface(); - - void *pcontext; - std::list notifiers; -}; - -#endif // HUSH_ZMQ_ZMQNOTIFICATIONINTERFACE_H diff --git a/src/zmq/zmqpublishnotifier.cpp b/src/zmq/zmqpublishnotifier.cpp deleted file mode 100644 index a712bce8a..000000000 --- a/src/zmq/zmqpublishnotifier.cpp +++ /dev/null @@ -1,203 +0,0 @@ -// Copyright (c) 2015 The Bitcoin Core developers -// Distributed under the GPLv3 software license, see the accompanying -// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html - -#include "zmqpublishnotifier.h" -#include "main.h" -#include "util.h" - -static std::multimap mapPublishNotifiers; - -static const char *MSG_HASHBLOCK = "hashblock"; -static const char *MSG_HASHTX = "hashtx"; -static const char *MSG_RAWBLOCK = "rawblock"; -static const char *MSG_RAWTX = "rawtx"; -static const char *MSG_CHECKEDBLOCK = "checkedblock"; - -// Internal function to send multipart message -static int zmq_send_multipart(void *sock, const void* data, size_t size, ...) -{ - va_list args; - va_start(args, size); - - while (1) - { - zmq_msg_t msg; - - int rc = zmq_msg_init_size(&msg, size); - if (rc != 0) - { - zmqError("Unable to initialize ZMQ msg"); - return -1; - } - - void *buf = zmq_msg_data(&msg); - memcpy(buf, data, size); - - data = va_arg(args, const void*); - - rc = zmq_msg_send(&msg, sock, data ? ZMQ_SNDMORE : 0); - if (rc == -1) - { - zmqError("Unable to send ZMQ msg"); - zmq_msg_close(&msg); - return -1; - } - - zmq_msg_close(&msg); - - if (!data) - break; - - size = va_arg(args, size_t); - } - return 0; -} - -bool CZMQAbstractPublishNotifier::Initialize(void *pcontext) -{ - assert(!psocket); - - // check if address is being used by other publish notifier - std::multimap::iterator i = mapPublishNotifiers.find(address); - - if (i==mapPublishNotifiers.end()) - { - psocket = zmq_socket(pcontext, ZMQ_PUB); - if (!psocket) - { - zmqError("Failed to create socket"); - return false; - } - - int rc = zmq_bind(psocket, address.c_str()); - if (rc!=0) - { - zmqError("Failed to bind address"); - zmq_close(psocket); - return false; - } - - // register this notifier for the address, so it can be reused for other publish notifier - mapPublishNotifiers.insert(std::make_pair(address, this)); - return true; - } - else - { - LogPrint("zmq", "zmq: Reusing socket for address %s\n", address); - - psocket = i->second->psocket; - mapPublishNotifiers.insert(std::make_pair(address, this)); - - return true; - } -} - -void CZMQAbstractPublishNotifier::Shutdown() -{ - assert(psocket); - - int count = mapPublishNotifiers.count(address); - - // remove this notifier from the list of publishers using this address - typedef std::multimap::iterator iterator; - std::pair iterpair = mapPublishNotifiers.equal_range(address); - - for (iterator it = iterpair.first; it != iterpair.second; ++it) - { - if (it->second==this) - { - mapPublishNotifiers.erase(it); - break; - } - } - - if (count == 1) - { - LogPrint("zmq", "Close socket at address %s\n", address); - int linger = 0; - zmq_setsockopt(psocket, ZMQ_LINGER, &linger, sizeof(linger)); - zmq_close(psocket); - } - - psocket = 0; -} - -bool CZMQAbstractPublishNotifier::SendMessage(const char *command, const void* data, size_t size) -{ - assert(psocket); - - /* send three parts, command & data & a LE 4byte sequence number */ - unsigned char msgseq[sizeof(uint32_t)]; - WriteLE32(&msgseq[0], nSequence); - int rc = zmq_send_multipart(psocket, command, strlen(command), data, size, msgseq, (size_t)sizeof(uint32_t), (void*)0); - if (rc == -1) - return false; - - /* increment memory only sequence number after sending */ - nSequence++; - - return true; -} - -bool CZMQPublishHashBlockNotifier::NotifyBlock(const CBlockIndex *pindex) -{ - uint256 hash = pindex->GetBlockHash(); - LogPrint("zmq", "zmq: Publish hashblock %s\n", hash.GetHex()); - char data[32]; - for (unsigned int i = 0; i < 32; i++) - data[31 - i] = hash.begin()[i]; - return SendMessage(MSG_HASHBLOCK, data, 32); -} - -bool CZMQPublishHashTransactionNotifier::NotifyTransaction(const CTransaction &transaction) -{ - uint256 hash = transaction.GetHash(); - LogPrint("zmq", "zmq: Publish hashtx %s\n", hash.GetHex()); - char data[32]; - for (unsigned int i = 0; i < 32; i++) - data[31 - i] = hash.begin()[i]; - return SendMessage(MSG_HASHTX, data, 32); -} - -bool CZMQPublishRawBlockNotifier::NotifyBlock(const CBlockIndex *pindex) -{ - LogPrint("zmq", "zmq: Publish rawblock %s\n", pindex->GetBlockHash().GetHex()); - - CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); - { - LOCK(cs_main); - CBlock block; - if(!ReadBlockFromDisk(block, pindex,1)) - { - zmqError("Can't read block from disk"); - return false; - } - - ss << block; - } - - return SendMessage(MSG_RAWBLOCK, &(*ss.begin()), ss.size()); -} - -bool CZMQPublishCheckedBlockNotifier::NotifyBlock(const CBlock& block) -{ - LogPrint("zmq", "zmq: Publish checkedblock %s\n", block.GetHash().GetHex()); - - CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); - { - LOCK(cs_main); - ss << block; - } - - return SendMessage(MSG_CHECKEDBLOCK, &(*ss.begin()), ss.size()); -} - -bool CZMQPublishRawTransactionNotifier::NotifyTransaction(const CTransaction &transaction) -{ - uint256 hash = transaction.GetHash(); - LogPrint("zmq", "zmq: Publish rawtx %s\n", hash.GetHex()); - CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); - ss << transaction; - return SendMessage(MSG_RAWTX, &(*ss.begin()), ss.size()); -} diff --git a/src/zmq/zmqpublishnotifier.h b/src/zmq/zmqpublishnotifier.h deleted file mode 100644 index d60276187..000000000 --- a/src/zmq/zmqpublishnotifier.h +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2015 The Bitcoin Core developers -// Distributed under the GPLv3 software license, see the accompanying -// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html - -#ifndef HUSH_ZMQ_ZMQPUBLISHNOTIFIER_H -#define HUSH_ZMQ_ZMQPUBLISHNOTIFIER_H - -#include "zmqabstractnotifier.h" - -class CBlockIndex; - -class CZMQAbstractPublishNotifier : public CZMQAbstractNotifier -{ -private: - uint32_t nSequence; //! upcounting per message sequence number - -public: - - /* send zmq multipart message - parts: - * command - * data - * message sequence number - */ - bool SendMessage(const char *command, const void* data, size_t size); - - bool Initialize(void *pcontext); - void Shutdown(); -}; - -class CZMQPublishHashBlockNotifier : public CZMQAbstractPublishNotifier -{ -public: - bool NotifyBlock(const CBlockIndex *pindex); -}; - -class CZMQPublishHashTransactionNotifier : public CZMQAbstractPublishNotifier -{ -public: - bool NotifyTransaction(const CTransaction &transaction); -}; - -class CZMQPublishRawBlockNotifier : public CZMQAbstractPublishNotifier -{ -public: - bool NotifyBlock(const CBlockIndex *pindex); -}; - -class CZMQPublishRawTransactionNotifier : public CZMQAbstractPublishNotifier -{ -public: - bool NotifyTransaction(const CTransaction &transaction); -}; - -class CZMQPublishCheckedBlockNotifier : public CZMQAbstractPublishNotifier -{ -public: - bool NotifyBlock(const CBlock &block); -}; - -#endif // HUSH_ZMQ_ZMQPUBLISHNOTIFIER_H From f11d50d17ebae03a26734fee422a9c7781e66275 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 12 Sep 2022 19:54:32 -0400 Subject: [PATCH 064/295] Update manpages to remove zmq options --- doc/man/hush-cli.1 | 9 +++------ doc/man/hush-tx.1 | 7 ++----- doc/man/hushd.1 | 34 +++++++--------------------------- 3 files changed, 12 insertions(+), 38 deletions(-) diff --git a/doc/man/hush-cli.1 b/doc/man/hush-cli.1 index 8f7861dbf..51f26c6a4 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.13. -.TH HUSH-CLI "1" "January 2022" "hush-cli v3.9.1" "User Commands" +.TH HUSH-CLI "1" "September 2022" "hush-cli v3.9.1" "User Commands" .SH NAME hush-cli \- manual page for hush-cli v3.9.1 .SH DESCRIPTION -Hush RPC client version v3.9.1\-804a4abbe\-dirty +Hush RPC client version v3.9.1\-1799c6c9b .PP In order to ensure you are adequately protecting your privacy when using Hush, please see . @@ -29,7 +29,7 @@ Specify configuration file (default: HUSH3.conf) .HP \fB\-datadir=\fR .IP -Specify data directory +Specify data directory (this path cannot use '~') .HP \fB\-testnet\fR .IP @@ -76,11 +76,8 @@ In order to ensure you are adequately protecting your privacy when using Hush, please see . Copyright (C) 2016-2021 Duke Leto and The Hush Developers - Copyright (C) 2016-2020 jl777 and SuperNET developers - Copyright (C) 2016-2018 The Zcash developers - Copyright (C) 2009-2014 The Bitcoin Core developers This is experimental Free Software! Fuck Yeah!!!!! diff --git a/doc/man/hush-tx.1 b/doc/man/hush-tx.1 index 7b1124b70..8318b2aa2 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.13. -.TH HUSH-TX "1" "January 2022" "hush-tx v3.9.1" "User Commands" +.TH HUSH-TX "1" "September 2022" "hush-tx v3.9.1" "User Commands" .SH NAME hush-tx \- manual page for hush-tx v3.9.1 .SH DESCRIPTION -hush\-tx utility version v3.9.1\-804a4abbe\-dirty +hush\-tx utility version v3.9.1\-1799c6c9b .SS "Usage:" .TP hush\-tx [options] [commands] @@ -89,11 +89,8 @@ In order to ensure you are adequately protecting your privacy when using Hush, please see . Copyright (C) 2016-2021 Duke Leto and The Hush Developers - Copyright (C) 2016-2020 jl777 and SuperNET developers - Copyright (C) 2016-2018 The Zcash developers - Copyright (C) 2009-2014 The Bitcoin Core developers This is experimental Free Software! Fuck Yeah!!!!! diff --git a/doc/man/hushd.1 b/doc/man/hushd.1 index 539f544be..eebf51b5b 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.13. -.TH HUSHD "1" "January 2022" "hushd v3.9.1" "User Commands" +.TH HUSHD "1" "September 2022" "hushd v3.9.1" "User Commands" .SH NAME hushd \- manual page for hushd v3.9.1 .SH DESCRIPTION -Hush Daemon version v3.9.1\-804a4abbe\-dirty +Hush Daemon version v3.9.1\-1799c6c9b .PP In order to ensure you are adequately protecting your privacy when using Hush, please see . @@ -49,7 +49,7 @@ Run in the background as a daemon and accept commands .HP \fB\-datadir=\fR .IP -Specify data directory +Specify data directory (this path cannot use '~') .HP \fB\-exportdir=\fR .IP @@ -414,24 +414,6 @@ Delete all wallet transactions and only recover those parts of the blockchain through \fB\-rescan\fR on startup (1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data) .PP -ZeroMQ notification options: -.HP -\fB\-zmqpubhashblock=\fR
-.IP -Enable publish hash block in
-.HP -\fB\-zmqpubhashtx=\fR
-.IP -Enable publish hash transaction in
-.HP -\fB\-zmqpubrawblock=\fR
-.IP -Enable publish raw block in
-.HP -\fB\-zmqpubrawtx=\fR
-.IP -Enable publish raw transaction in
-.PP Debugging/Testing options: .HP \fB\-debug=\fR @@ -440,8 +422,8 @@ Output debugging information (default: 0, supplying is optional). If is not supplied or if = 1, output all debugging information. can be: addrman, alert, bench, coindb, db, deletetx, estimatefee, http, libevent, lock, mempool, net, -tls, partitioncheck, pow, proxy, prune, rand, reindex, rpc, selectcoins, -stratum, tor, zmq, zrpc, zrpcunsafe (implies zrpc). +tls, partitioncheck, pow, proxy, prune, rand, randomx, reindex, rpc, +selectcoins, stratum, tor, zrpc, zrpcunsafe (implies zrpc). .HP \fB\-experimentalfeatures\fR .IP @@ -614,7 +596,8 @@ Hush Smart Chain options: .HP \fB\-ac_algo\fR .IP -Choose PoW mining algorithm, default is Equihash (200,9) +Choose PoW mining algorithm, either 'equihash' or 'randomx'. default is +Equihash (200,9) .HP \fB\-ac_blocktime\fR .IP @@ -713,11 +696,8 @@ In order to ensure you are adequately protecting your privacy when using Hush, please see . Copyright (C) 2016-2021 Duke Leto and The Hush Developers - Copyright (C) 2016-2020 jl777 and SuperNET developers - Copyright (C) 2016-2018 The Zcash developers - Copyright (C) 2009-2014 The Bitcoin Core developers This is experimental Free Software! Fuck Yeah!!!!! From 19b65600c2fec3973b2cf7f7d0fe29efe6800119 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 12 Sep 2022 20:07:16 -0400 Subject: [PATCH 065/295] Delete a zmq dingleberry --- qa/pull-tester/rpc-tests.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/qa/pull-tester/rpc-tests.sh b/qa/pull-tester/rpc-tests.sh index 8b8169a2f..153f7b4a6 100755 --- a/qa/pull-tester/rpc-tests.sh +++ b/qa/pull-tester/rpc-tests.sh @@ -92,10 +92,6 @@ testScriptsExt=( 'p2p-acceptblock.py' ); -if [ "x$ENABLE_ZMQ" = "x1" ]; then - testScripts+=('zmq_test.py') -fi - extArg="-extended" passOn=${@#$extArg} From fb45331b79b11391946b74d56f0212b8e016dd4f Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 12 Sep 2022 17:56:01 -0700 Subject: [PATCH 066/295] Be better about finding bash --- build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 864a20548..908ee2e15 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,5 @@ -#!/bin/bash -# Copyright (c) 2016-2021 The Hush developers +#!/usr/bin/env bash +# Copyright (c) 2016-2022 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 From c6e278154f7b19decde9b10fce7bc906a6e46adc Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 12 Sep 2022 18:03:36 -0700 Subject: [PATCH 067/295] Find bash on FreeBSD better --- src/hush-smart-chain | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hush-smart-chain b/src/hush-smart-chain index c5543b221..2a33f0ba0 100755 --- a/src/hush-smart-chain +++ b/src/hush-smart-chain @@ -1,5 +1,5 @@ -#!/bin/bash -# Copyright (c) 2016-2021 The Hush developers +#!/usr/bin/env bash +# Copyright (c) 2016-2022 The Hush developers # set working directory to the location of this script # readlink -f does not always exist DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" From 7cbf9bf61bd38955cdc80c1d3381e4cfe35a698a Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 12 Sep 2022 18:38:03 -0700 Subject: [PATCH 068/295] desprout --- src/test/test_bitcoin.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/test/test_bitcoin.h b/src/test/test_bitcoin.h index d80ab5165..bba2ce335 100644 --- a/src/test/test_bitcoin.h +++ b/src/test/test_bitcoin.h @@ -1,3 +1,6 @@ +// 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 #ifndef HUSH_TEST_TEST_HUSH_H #define HUSH_TEST_TEST_HUSH_H @@ -18,17 +21,11 @@ struct BasicTestingSetup { ~BasicTestingSetup(); }; -// Setup w.r.t. zk-SNARK API -struct JoinSplitTestingSetup: public BasicTestingSetup { - JoinSplitTestingSetup(); - ~JoinSplitTestingSetup(); -}; - /** Testing setup that configures a complete environment. * Included are data directory, coins database, script check threads * and wallet (if enabled) setup. */ -struct TestingSetup: public JoinSplitTestingSetup { +struct TestingSetup { CCoinsViewDB *pcoinsdbview; boost::filesystem::path pathTemp; boost::thread_group threadGroup; From 78f5021cc2db4079f0ada8eb97250e81ac438919 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Mon, 12 Sep 2022 22:38:53 -0400 Subject: [PATCH 069/295] starting to support zsweepexclude functionality --- src/init.cpp | 16 ++++++++++++++++ src/wallet/wallet.h | 1 + 2 files changed, 17 insertions(+) diff --git a/src/init.cpp b/src/init.cpp index 98f773b0f..3b0bc6bcd 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -471,6 +471,7 @@ std::string HelpMessage(HelpMessageMode mode) // By default we only allow sweeping to the current wallet which must have the spending key of the sweep zaddr // This hopefully will make it harder for people to accidentally sweep funds to a wrong zaddr and lose funds strUsage += HelpMessageOpt("-zsweepexternal", _("Enable sweeping to an external wallet (default false)")); + strUsage += HelpMessageOpt("-zsweepexclude", _("Addresses to exclude from sweeping (default none)")); strUsage += HelpMessageOpt("-deletetx", _("Enable Old Transaction Deletion")); strUsage += HelpMessageOpt("-deleteinterval", strprintf(_("Delete transaction every blocks during inital block download (default: %i)"), DEFAULT_TX_DELETE_INTERVAL)); @@ -2094,6 +2095,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) //Validate Sapling Addresses vector& vSweep = mapMultiArgs["-zsweepaddress"]; + vector& vSweepExclude = mapMultiArgs["-zsweepexclude"]; if (vSweep.size() != 1) { return InitError("A single zsweep address must be specified."); } @@ -2117,6 +2119,20 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) } } + for (int i = 0; i < vSweepExclude.size(); i++) { + // LogPrintf("Sweep Excluded Address: %s\n", vSweepExclude[i]); + auto zSweepExcluded = DecodePaymentAddress(vSweepExclude[i]); + if (!IsValidPaymentAddress(zSweepExcluded)) { + return InitError("Invalid zsweep address"); + } + auto hasSpendingKey = boost::apply_visitor(HaveSpendingKeyForPaymentAddress(pwalletMain), zSweepExcluded); + pwalletMain->sweepExcludeAddress = vSweepExclude[i]; + + if (!hasSpendingKey) { + return InitError("Wallet must have the spending key of zsweepexclude address"); + } + } + if (pwalletMain->fSaplingConsolidationEnabled) { //Validate 1 Consolidation address only that matches the sweep address vector& vaddresses = mapMultiArgs["-consolidatesaplingaddress"]; diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index f5e07e9da..2dfb9e6b1 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -815,6 +815,7 @@ public: int sweepFee = 10000; int sweepMaxInputs = 200; std::string sweepAddress = ""; + std::string sweepExcludeAddress = ""; std::string consolidationAddress = ""; void ClearNoteWitnessCache(); From ca3bb90e0c2a5ccd852c75c4511557280aef680a Mon Sep 17 00:00:00 2001 From: jahway603 Date: Mon, 12 Sep 2022 23:30:59 -0400 Subject: [PATCH 070/295] skip excluded address from zsweep --- src/wallet/asyncrpcoperation_sweep.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/wallet/asyncrpcoperation_sweep.cpp b/src/wallet/asyncrpcoperation_sweep.cpp index 1e7d324af..82dc1a40c 100644 --- a/src/wallet/asyncrpcoperation_sweep.cpp +++ b/src/wallet/asyncrpcoperation_sweep.cpp @@ -88,12 +88,18 @@ bool AsyncRPCOperation_sweep::main_impl() { std::vector saplingEntries; libzcash::SaplingPaymentAddress sweepAddress; + libzcash::SaplingPaymentAddress sweepExcludeAddress; std::map> mapAddresses; { LOCK2(cs_main, pwalletMain->cs_wallet); pwalletMain->GetFilteredNotes(saplingEntries, "", 11); + if (!fromRPC_) { + auto zAddressExclude = DecodePaymentAddress(pwalletMain->sweepExcludeAddress); + if (boost::get(&zAddressExclude) != nullptr) { + sweepExcludeAddress = boost::get(zAddressExclude); + } if (fSweepMapUsed) { const vector& v = mapMultiArgs["-zsweepaddress"]; for(int i = 0; i < v.size(); i++) { @@ -115,8 +121,11 @@ bool AsyncRPCOperation_sweep::main_impl() { } } + // Map all notes by address for (auto & entry : saplingEntries) { - //Map all notes by address + // do not need to sweep Excluded Address + if (sweepExcludeAddress == entry.address) { continue; } + // do not need to sweep the sweepAddress as that is the destination if (sweepAddress == entry.address) { continue; } else { From 0c22e263585e6b73414776db5135871ec7a7dc38 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Mon, 12 Sep 2022 23:47:49 -0400 Subject: [PATCH 071/295] updated z_sweepstatus --- src/wallet/rpcwallet.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 2f64df677..cc569baf4 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3369,6 +3369,7 @@ UniValue z_sweepstatus(const UniValue& params, bool fHelp, const CPubKey& mypk) ret.push_back(Pair("next_zsweep", pwalletMain->nextSweep)); ret.push_back(Pair("zsweepinterval", pwalletMain->sweepInterval)); ret.push_back(Pair("zsweepaddress", pwalletMain->sweepAddress)); + ret.push_back(Pair("zsweepexcludeaddress", pwalletMain->sweepExcludeAddress)); ret.push_back(Pair("zsweepmaxinputs", pwalletMain->sweepMaxInputs)); ret.push_back(Pair("zsweepfee", pwalletMain->sweepFee)); ret.push_back(Pair("zsweepexternal", pwalletMain->fSweepExternalEnabled)); From 88d3f116647356d367478e76b36ba850c4409170 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 13 Sep 2022 00:18:44 -0400 Subject: [PATCH 072/295] Save excluded address to be used later --- src/init.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/init.cpp b/src/init.cpp index 3b0bc6bcd..025d448e9 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -2121,6 +2121,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) for (int i = 0; i < vSweepExclude.size(); i++) { // LogPrintf("Sweep Excluded Address: %s\n", vSweepExclude[i]); + pwalletMain->sweepExcludeAddress = vSweepExclude[i]; auto zSweepExcluded = DecodePaymentAddress(vSweepExclude[i]); if (!IsValidPaymentAddress(zSweepExcluded)) { return InitError("Invalid zsweep address"); From b687d5f76ef8a0641431b6c80d49e92d72305dc4 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Tue, 13 Sep 2022 00:22:13 -0400 Subject: [PATCH 073/295] debug --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index 025d448e9..727a4e946 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -2120,7 +2120,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) } for (int i = 0; i < vSweepExclude.size(); i++) { - // LogPrintf("Sweep Excluded Address: %s\n", vSweepExclude[i]); + LogPrintf("Sweep Excluded Address: %s\n", vSweepExclude[i]); pwalletMain->sweepExcludeAddress = vSweepExclude[i]; auto zSweepExcluded = DecodePaymentAddress(vSweepExclude[i]); if (!IsValidPaymentAddress(zSweepExcluded)) { From 908240d07fd433d0f1dd375b38fa53347b96d890 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 13 Sep 2022 01:00:56 -0400 Subject: [PATCH 074/295] Make z_sweepstatus match up with config option name --- src/wallet/rpcwallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index cc569baf4..59be0f5bd 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3369,7 +3369,7 @@ UniValue z_sweepstatus(const UniValue& params, bool fHelp, const CPubKey& mypk) ret.push_back(Pair("next_zsweep", pwalletMain->nextSweep)); ret.push_back(Pair("zsweepinterval", pwalletMain->sweepInterval)); ret.push_back(Pair("zsweepaddress", pwalletMain->sweepAddress)); - ret.push_back(Pair("zsweepexcludeaddress", pwalletMain->sweepExcludeAddress)); + ret.push_back(Pair("zsweepexclude", pwalletMain->sweepExcludeAddress)); ret.push_back(Pair("zsweepmaxinputs", pwalletMain->sweepMaxInputs)); ret.push_back(Pair("zsweepfee", pwalletMain->sweepFee)); ret.push_back(Pair("zsweepexternal", pwalletMain->fSweepExternalEnabled)); From f90715192efb5377deb49ef04899cb56ce0b4c10 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Thu, 15 Sep 2022 09:38:48 -0400 Subject: [PATCH 075/295] Do not delete expired txs for now, it doesn't work correctly, and log more info about them --- src/wallet/wallet.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index e9450161f..3a84f267e 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3136,9 +3136,10 @@ std::vector CWallet::ResendWalletTransactionsBefore(int64_t nTime) // Do not relay expired transactions, to avoid other nodes banning us // Current code will not ban nodes relaying expired txs but older nodes will if (wtx.nExpiryHeight > 0 && wtx.nExpiryHeight < chainActive.LastTip()->GetHeight()) { - fprintf(stderr,"%s: ignoring expired tx %s\n", __func__, wtx.GetHash().ToString().c_str() ); + fprintf(stderr,"%s: ignoring expired tx %s with expiry %d at height %d\n", __func__, wtx.GetHash().ToString().c_str(), wtx.nExpiryHeight, chainActive.LastTip()->GetHeight() ); + // TODO: expired detection doesn't seem to work right // append to list of txs to delete - vwtxh.push_back(wtx.GetHash()); + // vwtxh.push_back(wtx.GetHash()); continue; } From b07f9db06dc348faf1fe0a2da8207aaec5b948e1 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Thu, 15 Sep 2022 19:39:57 -0400 Subject: [PATCH 076/295] Update for 75s blocks --- contrib/block_time.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/block_time.pl b/contrib/block_time.pl index 1b8c13351..e91f22d19 100755 --- a/contrib/block_time.pl +++ b/contrib/block_time.pl @@ -19,7 +19,7 @@ if ($block <= $blockcount) { die "That block has already happened!"; } else { my $diff = $block - $blockcount; - my $minutes = $diff*2.5; + my $minutes = $diff*1.25; # 75s in minutes my $seconds = $minutes*60; my $now = time; my $then = $now + $seconds; From 2ddf539185ab9ffe1a5714ead8574e2f30c932f4 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Thu, 15 Sep 2022 19:41:28 -0400 Subject: [PATCH 077/295] Check if hush-cli binary exists before using it --- contrib/block_time.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/block_time.pl b/contrib/block_time.pl index e91f22d19..0366aa8f9 100755 --- a/contrib/block_time.pl +++ b/contrib/block_time.pl @@ -8,6 +8,9 @@ use strict; # Given a block time, estimate when it will happen my $block = shift || die "Usage: $0 123"; my $hush = "./src/hush-cli"; +unless (-e $hush) { + die "$hush does not exist, aborting"; +} my $blockcount = qx{$hush getblockcount}; unless ($blockcount = int($blockcount)) { From 88c2ddbb9f6914c41c9120d0de8d1c883e639641 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Fri, 16 Sep 2022 11:12:46 +0000 Subject: [PATCH 078/295] Update 'contrib/debian/copyright' --- contrib/debian/copyright | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/debian/copyright b/contrib/debian/copyright index 7bf3a707c..6231c2023 100644 --- a/contrib/debian/copyright +++ b/contrib/debian/copyright @@ -2,7 +2,7 @@ Files: * Copyright: 2016-2020, The Hush developers 2009-2016, Bitcoin Core developers License: GPLv3 -Comment: https://hush.is/developers +Comment: https://hush.is Files: depends/sources/libsodium-*.tar.gz Copyright: 2013-2016 Frank Denis From 77d7aaba969a2b642d2f606535626bd356d33e51 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Fri, 16 Sep 2022 05:47:35 -0700 Subject: [PATCH 079/295] Return an array of addresses to exclude from zsweep in zsweep_status --- src/wallet/rpcwallet.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 59be0f5bd..246615a5a 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3369,7 +3369,12 @@ UniValue z_sweepstatus(const UniValue& params, bool fHelp, const CPubKey& mypk) ret.push_back(Pair("next_zsweep", pwalletMain->nextSweep)); ret.push_back(Pair("zsweepinterval", pwalletMain->sweepInterval)); ret.push_back(Pair("zsweepaddress", pwalletMain->sweepAddress)); - ret.push_back(Pair("zsweepexclude", pwalletMain->sweepExcludeAddress)); + UniValue excludes(UniValue::VARR); + // BOOST_FOREACH(const std::string& exclude, pwalletMain->sweepExcludeAddresses ) { + // excludes.push_back(exclude); + // } + excludes.push_back( pwalletMain->sweepExcludeAddress ); + ret.push_back(Pair("zsweepexclude", excludes)); ret.push_back(Pair("zsweepmaxinputs", pwalletMain->sweepMaxInputs)); ret.push_back(Pair("zsweepfee", pwalletMain->sweepFee)); ret.push_back(Pair("zsweepexternal", pwalletMain->fSweepExternalEnabled)); From f796d5d14eb57b21d6bb30559dd4329facf9aa14 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Fri, 16 Sep 2022 10:08:53 -0700 Subject: [PATCH 080/295] Support multiple zsweepexclude zaddrs --- src/init.cpp | 4 +-- src/wallet/asyncrpcoperation_sweep.cpp | 37 ++++++++++++++++++++------ src/wallet/wallet.h | 2 +- 3 files changed, 32 insertions(+), 11 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 727a4e946..cec462cf5 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -2121,17 +2121,17 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) for (int i = 0; i < vSweepExclude.size(); i++) { LogPrintf("Sweep Excluded Address: %s\n", vSweepExclude[i]); - pwalletMain->sweepExcludeAddress = vSweepExclude[i]; auto zSweepExcluded = DecodePaymentAddress(vSweepExclude[i]); if (!IsValidPaymentAddress(zSweepExcluded)) { return InitError("Invalid zsweep address"); } auto hasSpendingKey = boost::apply_visitor(HaveSpendingKeyForPaymentAddress(pwalletMain), zSweepExcluded); - pwalletMain->sweepExcludeAddress = vSweepExclude[i]; if (!hasSpendingKey) { return InitError("Wallet must have the spending key of zsweepexclude address"); } + // Add this validated zaddr to the list of excluded sweep zaddrs + pwalletMain->sweepExcludeAddresses.push_back( vSweepExclude[i] ); } if (pwalletMain->fSaplingConsolidationEnabled) { diff --git a/src/wallet/asyncrpcoperation_sweep.cpp b/src/wallet/asyncrpcoperation_sweep.cpp index 82dc1a40c..46962564d 100644 --- a/src/wallet/asyncrpcoperation_sweep.cpp +++ b/src/wallet/asyncrpcoperation_sweep.cpp @@ -74,6 +74,26 @@ void AsyncRPCOperation_sweep::main() { LogPrintf("%s", s); } +// Is this zaddr excluded from zsweep ? +bool IsExcludedAddress(libzcash::SaplingPaymentAddress zaddr) { + for( auto & sweepExcludeAddress : pwalletMain->sweepExcludeAddresses ) { + auto zAddressExclude = DecodePaymentAddress(sweepExcludeAddress); + + if (boost::get(&zAddressExclude) != nullptr) { + sweepExcludeAddress = boost::get(zAddressExclude); + } else { + // This is an invalid sapling zaddr + LogPrintf("%s: Invalid zsweepexclude zaddr %s, ignoring\n", opid, sweepExcludeAddress); + } + + if (sweepExcludeAddress == entry.address) { + return true; + } + } + + return false; +} + bool AsyncRPCOperation_sweep::main_impl() { bool status=true; auto opid=getId(); @@ -88,7 +108,6 @@ bool AsyncRPCOperation_sweep::main_impl() { std::vector saplingEntries; libzcash::SaplingPaymentAddress sweepAddress; - libzcash::SaplingPaymentAddress sweepExcludeAddress; std::map> mapAddresses; { @@ -96,16 +115,15 @@ bool AsyncRPCOperation_sweep::main_impl() { pwalletMain->GetFilteredNotes(saplingEntries, "", 11); if (!fromRPC_) { - auto zAddressExclude = DecodePaymentAddress(pwalletMain->sweepExcludeAddress); - if (boost::get(&zAddressExclude) != nullptr) { - sweepExcludeAddress = boost::get(zAddressExclude); - } if (fSweepMapUsed) { const vector& v = mapMultiArgs["-zsweepaddress"]; for(int i = 0; i < v.size(); i++) { auto zAddress = DecodePaymentAddress(v[i]); if (boost::get(&zAddress) != nullptr) { sweepAddress = boost::get(zAddress); + } else { + LogPrintf("%s: Invalid zsweepaddress configured, exiting\n", opid); + return false; } } } else { @@ -121,10 +139,13 @@ bool AsyncRPCOperation_sweep::main_impl() { } } - // Map all notes by address + // Map all notes (zutxos) by address for (auto & entry : saplingEntries) { - // do not need to sweep Excluded Address - if (sweepExcludeAddress == entry.address) { continue; } + // do not need to sweep Excluded Addresses + if(IsExcludedAddress(entry.address) { + continue; + } + // do not need to sweep the sweepAddress as that is the destination if (sweepAddress == entry.address) { continue; diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 2dfb9e6b1..3b932c4f5 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -815,7 +815,7 @@ public: int sweepFee = 10000; int sweepMaxInputs = 200; std::string sweepAddress = ""; - std::string sweepExcludeAddress = ""; + std::vector sweepExcludeAddresses = ""; std::string consolidationAddress = ""; void ClearNoteWitnessCache(); From 12fa3013cedfc9ee9a14a7593221934433f4b0f9 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Fri, 16 Sep 2022 13:11:32 -0400 Subject: [PATCH 081/295] Fix definition of sweepExcludeAddresses --- src/wallet/wallet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 3b932c4f5..ec2937a1d 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -815,7 +815,7 @@ public: int sweepFee = 10000; int sweepMaxInputs = 200; std::string sweepAddress = ""; - std::vector sweepExcludeAddresses = ""; + std::vector sweepExcludeAddresses; std::string consolidationAddress = ""; void ClearNoteWitnessCache(); From 35f376c8b5bcbd3d3550cbbc78b40a3d78648e75 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Fri, 16 Sep 2022 14:28:51 -0400 Subject: [PATCH 082/295] Fix bugs in excluding multiple zsweep zaddrs and report all excluded zsweep zaddrs in z_sweepstatus --- src/wallet/asyncrpcoperation_sweep.cpp | 13 +++++++------ src/wallet/rpcwallet.cpp | 7 +++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/wallet/asyncrpcoperation_sweep.cpp b/src/wallet/asyncrpcoperation_sweep.cpp index 46962564d..237af4cd3 100644 --- a/src/wallet/asyncrpcoperation_sweep.cpp +++ b/src/wallet/asyncrpcoperation_sweep.cpp @@ -80,15 +80,16 @@ bool IsExcludedAddress(libzcash::SaplingPaymentAddress zaddr) { auto zAddressExclude = DecodePaymentAddress(sweepExcludeAddress); if (boost::get(&zAddressExclude) != nullptr) { - sweepExcludeAddress = boost::get(zAddressExclude); + auto excludeAddress = boost::get(zAddressExclude); + if (excludeAddress == zaddr) { + return true; + } } else { // This is an invalid sapling zaddr - LogPrintf("%s: Invalid zsweepexclude zaddr %s, ignoring\n", opid, sweepExcludeAddress); + LogPrintf("%s: Invalid zsweepexclude zaddr %s, ignoring\n", sweepExcludeAddress); + continue; } - if (sweepExcludeAddress == entry.address) { - return true; - } } return false; @@ -142,7 +143,7 @@ bool AsyncRPCOperation_sweep::main_impl() { // Map all notes (zutxos) by address for (auto & entry : saplingEntries) { // do not need to sweep Excluded Addresses - if(IsExcludedAddress(entry.address) { + if(IsExcludedAddress(entry.address)) { continue; } diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 246615a5a..a09f33e79 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3370,10 +3370,9 @@ UniValue z_sweepstatus(const UniValue& params, bool fHelp, const CPubKey& mypk) ret.push_back(Pair("zsweepinterval", pwalletMain->sweepInterval)); ret.push_back(Pair("zsweepaddress", pwalletMain->sweepAddress)); UniValue excludes(UniValue::VARR); - // BOOST_FOREACH(const std::string& exclude, pwalletMain->sweepExcludeAddresses ) { - // excludes.push_back(exclude); - // } - excludes.push_back( pwalletMain->sweepExcludeAddress ); + BOOST_FOREACH(const std::string& exclude, pwalletMain->sweepExcludeAddresses ) { + excludes.push_back(exclude); + } ret.push_back(Pair("zsweepexclude", excludes)); ret.push_back(Pair("zsweepmaxinputs", pwalletMain->sweepMaxInputs)); ret.push_back(Pair("zsweepfee", pwalletMain->sweepFee)); From 62c9bce6f7d29ce4ed84547777b79011d1176351 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Fri, 16 Sep 2022 14:33:37 -0400 Subject: [PATCH 083/295] Correct error messsage about invalid zsweepexclude address --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index cec462cf5..63a8d9c8e 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -2123,7 +2123,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) LogPrintf("Sweep Excluded Address: %s\n", vSweepExclude[i]); auto zSweepExcluded = DecodePaymentAddress(vSweepExclude[i]); if (!IsValidPaymentAddress(zSweepExcluded)) { - return InitError("Invalid zsweep address"); + return InitError("Invalid zsweepexclude address"); } auto hasSpendingKey = boost::apply_visitor(HaveSpendingKeyForPaymentAddress(pwalletMain), zSweepExcluded); From 0938bd6b7b7e48ba226d1df5688bc2d294a57b29 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Fri, 16 Sep 2022 19:23:25 -0700 Subject: [PATCH 084/295] Log outpoint for failed Sapling witness lookup --- src/wallet/asyncrpcoperation_sendmany.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wallet/asyncrpcoperation_sendmany.cpp b/src/wallet/asyncrpcoperation_sendmany.cpp index 762d50021..5d5067772 100644 --- a/src/wallet/asyncrpcoperation_sendmany.cpp +++ b/src/wallet/asyncrpcoperation_sendmany.cpp @@ -435,7 +435,9 @@ bool AsyncRPCOperation_sendmany::main_impl() { // Add Sapling spends for (size_t i = 0; i < notes.size(); i++) { if (!witnesses[i]) { - throw JSONRPCError(RPC_WALLET_ERROR, "Missing witness for Sapling note"); + throw JSONRPCError(RPC_WALLET_ERROR, + strprintf( "Missing witness for Sapling note at outpoint %s", notes[i].op.ToString()) + ); } assert(builder_.AddSaplingSpend(expsk, notes[i], anchor, witnesses[i].get())); } From e1590836fd952a83e2e4187e4797b482300355c6 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Fri, 16 Sep 2022 23:17:08 -0400 Subject: [PATCH 085/295] Use the correct variable for missing witness error --- src/wallet/asyncrpcoperation_sendmany.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/asyncrpcoperation_sendmany.cpp b/src/wallet/asyncrpcoperation_sendmany.cpp index 5d5067772..28fad9c60 100644 --- a/src/wallet/asyncrpcoperation_sendmany.cpp +++ b/src/wallet/asyncrpcoperation_sendmany.cpp @@ -436,7 +436,7 @@ bool AsyncRPCOperation_sendmany::main_impl() { for (size_t i = 0; i < notes.size(); i++) { if (!witnesses[i]) { throw JSONRPCError(RPC_WALLET_ERROR, - strprintf( "Missing witness for Sapling note at outpoint %s", notes[i].op.ToString()) + strprintf( "Missing witness for Sapling note at outpoint %s", z_sapling_inputs_[i].op.ToString()) ); } assert(builder_.AddSaplingSpend(expsk, notes[i], anchor, witnesses[i].get())); From cd999f60be3c49275e87b3a1051adbc106942c2b Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sat, 17 Sep 2022 14:18:14 +0000 Subject: [PATCH 086/295] Update 'doc/release-process.md' --- doc/release-process.md | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/doc/release-process.md b/doc/release-process.md index b5dee897d..643d5f953 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -1,10 +1,39 @@ # Hush Release Process -## Pre-release +## High-Level Philosophy + +Beware of making high-risk changes (such as consensus changes, p2p layer changes and wallet/transaction changes) too close to a new release, because they will not get as much testing as they should. Don't merge large branches which haven't undergone lots of testing just before a release. + +## Check for changes on master that should be on dev + +Often there are trivial changes made directly on master, such as documentation changes. In theory, no code changes should happen on master without being on dev first, but it's better to be safe than sorry. We want the dev branch which undergoes testing to be as close as possible to what the master branch will become, so we don't want to merge dev into master and just assume everything works. So it's best to merge the master branch into dev just before merging the dev branch into master. + +To check if the master branch has any changes that the dev branch does not: + +``` +# this assumes you are working with https://git.hush.is/hush/hush3 as your remote +git checkout dev +git pull # make sure dev is up to date +git checkout master +git pull # make sure master is up to date +git diff dev...master # look at the set of changes which exist in master but not dev +``` + +If the last command has no output, congrats, there is nothing to do. If the last command has output, then you should merge master into dev: + +``` +git checkout dev +git merge --no-ff master # using the default commit message is fine +git push +``` + +The `--no-ff` flag above makes sure to make a merge commit, no matter what, even if a "fast forward" could be done. For those in the future looking back, it's much better to see evidence of when branches were merged. + + ### Git Issues -Look for Git issues that should be fixed in the next release. +Look for Git issues that should be fixed in the next release. Especially low-risk and simple things, like documentation changes, improvements to error messages and RPC help output. ### Pre-release checklist: * Is this release changing consensus rules? From 233b14d14bec59ce619514f3abbafd6a12f87009 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sat, 17 Sep 2022 14:21:42 +0000 Subject: [PATCH 087/295] Update 'doc/release-process.md' --- doc/release-process.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/release-process.md b/doc/release-process.md index 643d5f953..6c4977fd1 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -30,17 +30,17 @@ git push The `--no-ff` flag above makes sure to make a merge commit, no matter what, even if a "fast forward" could be done. For those in the future looking back, it's much better to see evidence of when branches were merged. - ### Git Issues Look for Git issues that should be fixed in the next release. Especially low-risk and simple things, like documentation changes, improvements to error messages and RPC help output. ### Pre-release checklist: - * Is this release changing consensus rules? + * Is this release changing consensus rules? Definitely update protocol version. ### Protocol Safety Checks: * Does MIN_PROTO_VERSION need to change? + * If it does, new nodes will not be able to talk to nodes with a version less than MIN_PROTO_VERSION ## Release dependencies @@ -50,4 +50,9 @@ Install deps on Linux: ## Release process -... + - Update checkpoints + - Update man pages + - Update copyright years (if applicable) with replace.pl + - Do a fresh clone and fresh sync with new checkpoints + - Stop node, wait 20 minutes, and then do a partial sync with new checkpoints + From 9dd4dcc7f9274643b43a393a28b201af9f280c3d Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sat, 17 Sep 2022 23:17:35 -0400 Subject: [PATCH 088/295] Update release docs --- doc/developer-notes.md | 7 +------ doc/release-process.md | 5 +++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/developer-notes.md b/doc/developer-notes.md index 87d2be84a..77233221c 100644 --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -45,12 +45,7 @@ The jq manual can be found here: https://stedolan.github.io/jq/manual/ # Making a new release of Hush - * Update version in configure.ac and src/clientversion.h - * Run ./contrib/devtools/gen-manpages.sh, commit + push results - * Update checkpoints - * Update protocol version in src/version.h if necessary - * Make Gitea release - * Make Git Tag (Gitea can do this) +See doc/release-process.md for details. # Testing a Branch diff --git a/doc/release-process.md b/doc/release-process.md index 6c4977fd1..e781cc75b 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -50,9 +50,14 @@ Install deps on Linux: ## Release process + - Update version in configure.ac and src/clientversion.h + - Update checkpoints + - Run ./contrib/devtools/gen-manpages.sh, commit + push results - Update checkpoints - Update man pages - Update copyright years (if applicable) with replace.pl - Do a fresh clone and fresh sync with new checkpoints - Stop node, wait 20 minutes, and then do a partial sync with new checkpoints + - Make Gitea release + - Make Git Tag (Gitea can do this) From 95f6a14ac36851a4cb6a5ee181311c57c831e776 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sat, 17 Sep 2022 23:31:47 -0400 Subject: [PATCH 089/295] Document updating hushd version --- doc/release-process.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/release-process.md b/doc/release-process.md index e781cc75b..bb8c5b67a 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -50,7 +50,12 @@ Install deps on Linux: ## Release process - - Update version in configure.ac and src/clientversion.h + - Update version in configure.ac and src/clientversion.h to update the hushd version + - In src/clientversion.h you update `CLIENT_VERSION_*` variables. Usually you will just update `CLIENT_VERSION_REVISION` + - If there is a consensus change, it may be a good idea to update `CLIENT_VERSION_MINOR` or `CLIENT_VERSION_MAJOR` + - To make a pre-release "beta" you can modify `CLIENT_VERSION_BUILD` but that is rarely done in Hush world. + - A `CLIENT_VERSION_BUILD` of 50 means "actual non-beta release" + - Make sure to keep the values in configure.ac and src/clientversion.h the same. The variables are prefixed wth an underscore in configure.ac - Update checkpoints - Run ./contrib/devtools/gen-manpages.sh, commit + push results - Update checkpoints From 5a145acd46fb8e89f33fc93f1373194ab9f38895 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sat, 17 Sep 2022 23:35:27 -0400 Subject: [PATCH 090/295] Add script to automate string replaces --- contrib/devtools/replace.pl | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 contrib/devtools/replace.pl diff --git a/contrib/devtools/replace.pl b/contrib/devtools/replace.pl new file mode 100755 index 000000000..601c781aa --- /dev/null +++ b/contrib/devtools/replace.pl @@ -0,0 +1,42 @@ +#!/usr/bin/perl +# Copyright (c) 2016-2022 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 + +use strict; +use warnings; +use autodie; +use Data::Dumper; +my ($find,$replace,@files) = @ARGV; + +usage() unless $find && defined $replace; +unless( @files ) { + printf "No files to replace stuff!"; + exit 0; +} + +my $fh; +print "Going to replace $find with $replace in " . scalar(@files) . " files\n"; + +for my $file (@files) { + if (-d $file) { + printf "Skipping directory $file\n"; + next; + } + unless ( -e $file ) { + printf "$file does not exist!\n"; + next; + } + open $fh, '<', $file; + my $content = join('',<$fh>); + $content =~ s/\Q$find\E/$replace/g; + close $fh; + + open $fh, '>', $file; + print $fh $content; + close $fh; +} + +sub usage { + die "$0 stringtofind stringtoreplace file [more files...]\n"; +} From 73789ba26b22d76477b9111692d6f8ea3daf892e Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sat, 17 Sep 2022 23:38:49 -0400 Subject: [PATCH 091/295] Yep --- doc/release-process.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/release-process.md b/doc/release-process.md index bb8c5b67a..ca4bd1b3d 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -60,7 +60,7 @@ Install deps on Linux: - Run ./contrib/devtools/gen-manpages.sh, commit + push results - Update checkpoints - Update man pages - - Update copyright years (if applicable) with replace.pl + - Update copyright years (if applicable) with contrib/devtools/replace.pl - Do a fresh clone and fresh sync with new checkpoints - Stop node, wait 20 minutes, and then do a partial sync with new checkpoints - Make Gitea release From 711cd8e2343bc589e3954b8837185560305d7967 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sun, 18 Sep 2022 00:05:27 -0400 Subject: [PATCH 092/295] Explain protocol version stuff --- doc/release-process.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/release-process.md b/doc/release-process.md index ca4bd1b3d..26c172a2b 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -39,8 +39,13 @@ Look for Git issues that should be fixed in the next release. Especially low-ris ### Protocol Safety Checks: - * Does MIN_PROTO_VERSION need to change? - * If it does, new nodes will not be able to talk to nodes with a version less than MIN_PROTO_VERSION + * Does `PROTOCOL_VERSION` in src/version.h need to be increased? + * All releases with a consensus change should increase the value by 1 + * This identifies a nodes protocol version to all other peers it connects to. + * Does `MIN_PEER_PROTO_VERSION` in src/version.h need to change? + * If it does, new nodes will not be able to talk to nodes with a version less than `MIN_PROTO_VERSION` + * The main use of these is for newer nodes that know they do not want to talk to older nodes to prevent connecting to older nodes efficiently + * For instance, when a new release has different consensus rules than older nodes, `MIN_PROTO_VERSION` prevents wasting lots of network bandwidth talking to incompatible nodes which will eventually be banned for disagreeing on consensus rules ## Release dependencies From 9b1b6fdc2e40d4e82a9131952ee43394c673dde2 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sun, 18 Sep 2022 00:24:10 -0400 Subject: [PATCH 093/295] Document checkpoints better --- doc/release-process.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/release-process.md b/doc/release-process.md index 26c172a2b..8f1412b61 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -63,7 +63,8 @@ Install deps on Linux: - Make sure to keep the values in configure.ac and src/clientversion.h the same. The variables are prefixed wth an underscore in configure.ac - Update checkpoints - Run ./contrib/devtools/gen-manpages.sh, commit + push results - - Update checkpoints + - Update checkpoints in src/chainparams.cpp via contrib/checkpoints.pl + - checkpoints.pl will just generate the data you need, it must be manually copied into the correct place - Update man pages - Update copyright years (if applicable) with contrib/devtools/replace.pl - Do a fresh clone and fresh sync with new checkpoints From 8e1ba0658d10a620b0d1e382ebc751170eb23f34 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sun, 18 Sep 2022 10:27:48 -0400 Subject: [PATCH 094/295] Ensure pindexPrev is not null before mining against it in both BitcoinMiner and RandomXMiner --- src/miner.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/miner.cpp b/src/miner.cpp index 16c18146b..72d6d04df 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -1102,6 +1102,14 @@ void static RandomXMiner() // Create new block unsigned int nTransactionsUpdatedLast = mempool.GetTransactionsUpdated(); CBlockIndex* pindexPrev = chainActive.LastTip(); + + // If we don't have a valid chain tip to work from, wait and try again. + if (pindexPrev == nullptr) { + fprintf(stderr,"%s: null pindexPrev, trying again...\n",__func__); + MilliSleep(1000); + continue; + } + if ( Mining_height != pindexPrev->GetHeight()+1 ) { Mining_height = pindexPrev->GetHeight()+1; @@ -1460,6 +1468,14 @@ void static BitcoinMiner() // unsigned int nTransactionsUpdatedLast = mempool.GetTransactionsUpdated(); CBlockIndex* pindexPrev = chainActive.LastTip(); + + // If we don't have a valid chain tip to work from, wait and try again. + if (pindexPrev == nullptr) { + fprintf(stderr,"%s: null pindexPrev, trying again...\n",__func__); + MilliSleep(1000); + continue; + } + if ( Mining_height != pindexPrev->GetHeight()+1 ) { Mining_height = pindexPrev->GetHeight()+1; From 703697404255a70451f756d1cc68ebebaecca9ea Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sun, 18 Sep 2022 10:53:47 -0400 Subject: [PATCH 095/295] Explain checkpoints a bit --- doc/release-process.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/release-process.md b/doc/release-process.md index 8f1412b61..c46f54b9a 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -61,10 +61,12 @@ Install deps on Linux: - To make a pre-release "beta" you can modify `CLIENT_VERSION_BUILD` but that is rarely done in Hush world. - A `CLIENT_VERSION_BUILD` of 50 means "actual non-beta release" - Make sure to keep the values in configure.ac and src/clientversion.h the same. The variables are prefixed wth an underscore in configure.ac - - Update checkpoints - Run ./contrib/devtools/gen-manpages.sh, commit + push results - Update checkpoints in src/chainparams.cpp via contrib/checkpoints.pl - checkpoints.pl will just generate the data you need, it must be manually copied into the correct place + - Checkpoint are a list of block heights and block hashes that tell a full node the correct block history of the blockchain + - Checkpoints make block verification a bit faster, because nodes can say "is this block a descendant of a checkpoint block" instead of doing full consensus checks, which take more time + - Checkpoints also provide a bit of security against some attacks that would create malicious chainforks - Update man pages - Update copyright years (if applicable) with contrib/devtools/replace.pl - Do a fresh clone and fresh sync with new checkpoints From 7e53907bdc78d94d8111099def744e4bfce89883 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sun, 18 Sep 2022 11:08:09 -0400 Subject: [PATCH 096/295] Update version to 3.9.2 --- configure.ac | 2 +- src/clientversion.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 801d7be75..e863c6384 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, 9) -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 03657120e..461c4c197 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -30,7 +30,7 @@ // Must be kept in sync with configure.ac , ugh! #define CLIENT_VERSION_MAJOR 3 #define CLIENT_VERSION_MINOR 9 -#define CLIENT_VERSION_REVISION 1 +#define CLIENT_VERSION_REVISION 2 #define CLIENT_VERSION_BUILD 50 //! Set to true for release, false for prerelease or test build From ad4600fb9fada48beed6073d29765272ca5f6946 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Sun, 18 Sep 2022 14:50:57 -0400 Subject: [PATCH 097/295] renamed to util --- Dockerfile | 4 ++-- Makefile.am | 2 +- build.sh | 2 +- {zcutil => util}/afl/afl-build.sh | 0 {zcutil => util}/afl/afl-get.sh | 0 {zcutil => util}/afl/afl-getbuildrun.sh | 0 {zcutil => util}/afl/afl-run.sh | 0 {zcutil => util}/afl/hush-wrapper | 0 {zcutil => util}/afl/hush-wrapper-g++ | 0 {zcutil => util}/afl/hush-wrapper-gcc | 0 {zcutil => util}/build-arm.sh | 0 {zcutil => util}/build-debian-package-ARM.sh | 0 {zcutil => util}/build-debian-package.sh | 0 {zcutil => util}/build-mac.sh | 0 {zcutil => util}/build-win.sh | 0 {zcutil => util}/build.sh | 0 {zcutil => util}/docker-entrypoint.sh | 0 {zcutil => util}/docker-hush-cli.sh | 0 {zcutil => util}/dragon.txt | 0 19 files changed, 4 insertions(+), 4 deletions(-) rename {zcutil => util}/afl/afl-build.sh (100%) rename {zcutil => util}/afl/afl-get.sh (100%) rename {zcutil => util}/afl/afl-getbuildrun.sh (100%) rename {zcutil => util}/afl/afl-run.sh (100%) rename {zcutil => util}/afl/hush-wrapper (100%) rename {zcutil => util}/afl/hush-wrapper-g++ (100%) rename {zcutil => util}/afl/hush-wrapper-gcc (100%) rename {zcutil => util}/build-arm.sh (100%) rename {zcutil => util}/build-debian-package-ARM.sh (100%) rename {zcutil => util}/build-debian-package.sh (100%) rename {zcutil => util}/build-mac.sh (100%) rename {zcutil => util}/build-win.sh (100%) rename {zcutil => util}/build.sh (100%) rename {zcutil => util}/docker-entrypoint.sh (100%) rename {zcutil => util}/docker-hush-cli.sh (100%) rename {zcutil => util}/dragon.txt (100%) diff --git a/Dockerfile b/Dockerfile index e1323ec2f..b89a159a0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,7 +26,7 @@ RUN ln -sf /hush/src/hushd /usr/bin/hushd && \ ln -sf /hush/src/hush-tx /usr/bin/hush-tx && \ ln -sf /hush/src/wallet-utility /usr/bin/hush-wallet-utility && \ ln -sf /hush/src/hush-smart-chain /usr/bin/hush-smart-chain && \ - ln -sf /hush/zcutil/docker-entrypoint.sh /usr/bin/entrypoint && \ - ln -sf /hush/zcutil/docker-hush-cli.sh /usr/bin/hush-cli + ln -sf /hush/util/docker-entrypoint.sh /usr/bin/entrypoint && \ + ln -sf /hush/util/docker-hush-cli.sh /usr/bin/hush-cli CMD ["entrypoint"] diff --git a/Makefile.am b/Makefile.am index bc04a0cdd..de977adfc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -233,7 +233,7 @@ endif endif dist_bin_SCRIPTS = -dist_noinst_SCRIPTS = autogen.sh zcutil/build-debian-package.sh zcutil/build.sh +dist_noinst_SCRIPTS = autogen.sh util/build-debian-package.sh util/build.sh EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.sh qa/pull-tester/run-bitcoin-cli qa/rpc-tests qa/hush $(DIST_DOCS) $(BIN_CHECKS) diff --git a/build.sh b/build.sh index 908ee2e15..1a2d1c8a0 100755 --- a/build.sh +++ b/build.sh @@ -4,4 +4,4 @@ # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html set -eu -o pipefail -./zcutil/build.sh --disable-tests $@ +./util/build.sh --disable-tests $@ diff --git a/zcutil/afl/afl-build.sh b/util/afl/afl-build.sh similarity index 100% rename from zcutil/afl/afl-build.sh rename to util/afl/afl-build.sh diff --git a/zcutil/afl/afl-get.sh b/util/afl/afl-get.sh similarity index 100% rename from zcutil/afl/afl-get.sh rename to util/afl/afl-get.sh diff --git a/zcutil/afl/afl-getbuildrun.sh b/util/afl/afl-getbuildrun.sh similarity index 100% rename from zcutil/afl/afl-getbuildrun.sh rename to util/afl/afl-getbuildrun.sh diff --git a/zcutil/afl/afl-run.sh b/util/afl/afl-run.sh similarity index 100% rename from zcutil/afl/afl-run.sh rename to util/afl/afl-run.sh diff --git a/zcutil/afl/hush-wrapper b/util/afl/hush-wrapper similarity index 100% rename from zcutil/afl/hush-wrapper rename to util/afl/hush-wrapper diff --git a/zcutil/afl/hush-wrapper-g++ b/util/afl/hush-wrapper-g++ similarity index 100% rename from zcutil/afl/hush-wrapper-g++ rename to util/afl/hush-wrapper-g++ diff --git a/zcutil/afl/hush-wrapper-gcc b/util/afl/hush-wrapper-gcc similarity index 100% rename from zcutil/afl/hush-wrapper-gcc rename to util/afl/hush-wrapper-gcc diff --git a/zcutil/build-arm.sh b/util/build-arm.sh similarity index 100% rename from zcutil/build-arm.sh rename to util/build-arm.sh diff --git a/zcutil/build-debian-package-ARM.sh b/util/build-debian-package-ARM.sh similarity index 100% rename from zcutil/build-debian-package-ARM.sh rename to util/build-debian-package-ARM.sh diff --git a/zcutil/build-debian-package.sh b/util/build-debian-package.sh similarity index 100% rename from zcutil/build-debian-package.sh rename to util/build-debian-package.sh diff --git a/zcutil/build-mac.sh b/util/build-mac.sh similarity index 100% rename from zcutil/build-mac.sh rename to util/build-mac.sh diff --git a/zcutil/build-win.sh b/util/build-win.sh similarity index 100% rename from zcutil/build-win.sh rename to util/build-win.sh diff --git a/zcutil/build.sh b/util/build.sh similarity index 100% rename from zcutil/build.sh rename to util/build.sh diff --git a/zcutil/docker-entrypoint.sh b/util/docker-entrypoint.sh similarity index 100% rename from zcutil/docker-entrypoint.sh rename to util/docker-entrypoint.sh diff --git a/zcutil/docker-hush-cli.sh b/util/docker-hush-cli.sh similarity index 100% rename from zcutil/docker-hush-cli.sh rename to util/docker-hush-cli.sh diff --git a/zcutil/dragon.txt b/util/dragon.txt similarity index 100% rename from zcutil/dragon.txt rename to util/dragon.txt From d2478acea453301bcfff0c89ac975e430f5d5168 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Sun, 18 Sep 2022 14:56:42 -0400 Subject: [PATCH 098/295] continued util change --- DEVELOPING.md | 2 +- util/afl/afl-build.sh | 12 ++++++------ util/afl/afl-get.sh | 4 ++-- util/afl/afl-getbuildrun.sh | 6 +++--- util/build-arm.sh | 2 +- util/build-debian-package-ARM.sh | 2 +- util/build-debian-package.sh | 2 +- util/build.sh | 6 +++--- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/DEVELOPING.md b/DEVELOPING.md index 0aae790f5..069fb7496 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -84,7 +84,7 @@ to generate new unix man pages for that version : After successfully compiling Hush, you can generate a debian package of these binaries with: - ./zcutil/build-debian-package.sh + ./util/build-debian-package.sh This command will not work on Mac OS X. Currently you cannot generate a Debian package from operating systems other than Linux. Oh well. diff --git a/util/afl/afl-build.sh b/util/afl/afl-build.sh index a64d47de3..74d5980ce 100755 --- a/util/afl/afl-build.sh +++ b/util/afl/afl-build.sh @@ -2,9 +2,9 @@ # 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 -# A wrapper around ./zcutil/build.sh for instrumenting the build with AFL: -# ./zcutil/afl/afl-build.sh -# You may obtain a copy of AFL using ./zcutil/afl/afl-get.sh. +# A wrapper around ./util/build.sh for instrumenting the build with AFL: +# ./util/afl/afl-build.sh +# You may obtain a copy of AFL using ./util/afl/afl-get.sh. set -eu -o pipefail @@ -12,11 +12,11 @@ export AFL_INSTALL_DIR=$(realpath "$1") FUZZ_CASE="$2" shift 2 export AFL_LOG_DIR="$(pwd)" -export ZCUTIL=$(realpath "./zcutil") +export UTIL=$(realpath "./util") cp "./src/fuzzing/$FUZZ_CASE/fuzz.cpp" src/fuzz.cpp -CONFIGURE_FLAGS="--enable-tests=no --enable-fuzz-main" "$ZCUTIL/build.sh" "CC=$ZCUTIL/afl/hush-wrapper-gcc" "CXX=$ZCUTIL/afl/hush-wrapper-g++" AFL_HARDEN=1 "$@" +CONFIGURE_FLAGS="--enable-tests=no --enable-fuzz-main" "$UTIL/build.sh" "CC=$UTIL/afl/hush-wrapper-gcc" "CXX=$UTIL/afl/hush-wrapper-g++" AFL_HARDEN=1 "$@" echo "You can now run AFL as follows:" -echo "$ ./zcutil/afl/afl-run.sh '$AFL_INSTALL_DIR' '$FUZZ_CASE'" +echo "$ ./util/afl/afl-run.sh '$AFL_INSTALL_DIR' '$FUZZ_CASE'" diff --git a/util/afl/afl-get.sh b/util/afl/afl-get.sh index 255adeb17..0156b5105 100755 --- a/util/afl/afl-get.sh +++ b/util/afl/afl-get.sh @@ -3,7 +3,7 @@ # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # Obtains and builds a copy of AFL from source. -# ./zcutil/afl/afl-get.sh +# ./util/afl/afl-get.sh set -eu -o pipefail @@ -32,5 +32,5 @@ make echo "You can now build hushd with AFL instrumentation as follows:" echo "$ make clean # if you've already built hushd without AFL instrumentation" -echo "$ ./zcutil/afl/afl-build.sh '$(pwd)' -j\$(nproc)" +echo "$ ./util/afl/afl-build.sh '$(pwd)' -j\$(nproc)" echo "...where is the name of a directory in src/fuzzing." diff --git a/util/afl/afl-getbuildrun.sh b/util/afl/afl-getbuildrun.sh index de9dba15b..5bd1986f9 100755 --- a/util/afl/afl-getbuildrun.sh +++ b/util/afl/afl-getbuildrun.sh @@ -16,8 +16,8 @@ export AFL_INSTALL_DIR=$(realpath "./afl-temp") if [ ! -d "$AFL_INSTALL_DIR" ]; then mkdir "$AFL_INSTALL_DIR" - ./zcutil/afl/afl-get.sh "$AFL_INSTALL_DIR" + ./util/afl/afl-get.sh "$AFL_INSTALL_DIR" fi -./zcutil/afl/afl-build.sh "$AFL_INSTALL_DIR" "$FUZZ_CASE" -j$(nproc) -./zcutil/afl/afl-run.sh "$AFL_INSTALL_DIR" "$FUZZ_CASE" "$@" +./util/afl/afl-build.sh "$AFL_INSTALL_DIR" "$FUZZ_CASE" -j$(nproc) +./util/afl/afl-run.sh "$AFL_INSTALL_DIR" "$FUZZ_CASE" "$@" diff --git a/util/build-arm.sh b/util/build-arm.sh index c721b3e57..a3a1b927b 100755 --- a/util/build-arm.sh +++ b/util/build-arm.sh @@ -22,7 +22,7 @@ EOF if [ "x$*" = 'x--help' ] then - cat ./zcutil/dragon.txt + cat ./util/dragon.txt cat < Date: Mon, 19 Sep 2022 01:09:36 +0000 Subject: [PATCH 099/295] Update 'doc/release-process.md' --- doc/release-process.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/release-process.md b/doc/release-process.md index c46f54b9a..9a41b71a9 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -73,4 +73,8 @@ Install deps on Linux: - Stop node, wait 20 minutes, and then do a partial sync with new checkpoints - Make Gitea release - Make Git Tag (Gitea can do this) + - Use contrib/devtools/gen-linux-binary-release.sh to make a Linux release binary + - Use util/build-debian-package.sh to make an x86 Debian package for the release + - Use util/build-debian-package-ARM.sh (does this still work?) to make an ARM Debian package for the release + - Upload the debian packages to the Gitea release page, with SHA256 sums From 4ae1d47aec67c2814566ba9bd2831bacfdd3ec9c Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 19 Sep 2022 01:11:22 +0000 Subject: [PATCH 100/295] Update 'doc/release-process.md' --- doc/release-process.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/release-process.md b/doc/release-process.md index 9a41b71a9..adc88c02c 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -62,6 +62,7 @@ Install deps on Linux: - A `CLIENT_VERSION_BUILD` of 50 means "actual non-beta release" - Make sure to keep the values in configure.ac and src/clientversion.h the same. The variables are prefixed wth an underscore in configure.ac - Run ./contrib/devtools/gen-manpages.sh, commit + push results + - PROTIP: Man page creation must be done after updating the version number and recompiling and before Debian package creation - Update checkpoints in src/chainparams.cpp via contrib/checkpoints.pl - checkpoints.pl will just generate the data you need, it must be manually copied into the correct place - Checkpoint are a list of block heights and block hashes that tell a full node the correct block history of the blockchain From a564bc017c6b6fc97506b16c7b4206774ec9ebe9 Mon Sep 17 00:00:00 2001 From: fekt Date: Mon, 19 Sep 2022 03:59:39 +0000 Subject: [PATCH 101/295] RandomX updates for build-win.sh --- util/build-win.sh | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/util/build-win.sh b/util/build-win.sh index 4b1960245..2e573281b 100755 --- a/util/build-win.sh +++ b/util/build-win.sh @@ -8,20 +8,36 @@ CC=x86_64-w64-mingw32-gcc-posix PREFIX="$(pwd)/depends/$HOST" set -eu -o pipefail - set -x -cd "$(dirname "$(readlink -f "$0")")/.." +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 -fopenmp -pthread" ./configure --prefix="${PREFIX}" --host=x86_64-w64-mingw32 --enable-static --disable-shared + +# Build CryptoConditions stuff WD=$PWD cd src/cc echo $PWD ./makecustom cd $WD -./autogen.sh -CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site CXXFLAGS="-DPTW32_STATIC_LIB -DCURL_STATICLIB -fopenmp -pthread" ./configure --prefix="${PREFIX}" --host=x86_64-w64-mingw32 --enable-static --disable-shared +# Build RandomX +cd src/RandomX +if [ -d "build" ] +then + ls -la build/librandomx* +else + mkdir build && cd build + CC="${CC} -g " CXX="${CXX} -g " cmake -DARCH=native .. + make +fi + +cd $WD + sed -i 's/-lboost_system-mt /-lboost_system-mt-s /' configure cd src/ CC="${CC} -g " CXX="${CXX} -g " make V=1 hushd.exe hush-cli.exe hush-tx.exe From c15f1a93b1f2715f4088be18b9025d05429bc91e Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 19 Sep 2022 05:41:59 -0700 Subject: [PATCH 102/295] Add randomx stuff to build-arm.sh --- util/build-arm.sh | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/util/build-arm.sh b/util/build-arm.sh index a3a1b927b..a9b747354 100755 --- a/util/build-arm.sh +++ b/util/build-arm.sh @@ -57,12 +57,25 @@ HOST=aarch64-unknown-linux-gnu BUILD=aarch64-unknown-linux-gnu make "$@" -C ./de ./autogen.sh CONFIG_SITE="$(pwd)/depends/aarch64-unknown-linux-gnu/share/config.site" ./configure --prefix="${PREFIX}" --host=aarch64-unknown-linux-gnu --build=aarch64-unknown-linux-gnu --with-gui=no --enable-rust=no "$HARDENING_ARG" "$LCOV_ARG" CXXFLAGS='-fwrapv -fno-strict-aliasing -g' -#BUILD CCLIB - +# Build CryptoConditions stuff WD=$PWD cd src/cc echo $PWD ./makecustom cd $WD -make "$@" V=1 +# Build RandomX +cd src/RandomX +if [ -d "build" ] +then + ls -la build/librandomx* +else + mkdir build && cd build + # TODO: Do things work without -DARCH=native ? + # TODO: Make an env var for using native arch + # CC="${CC} -g " CXX="${CXX} -g " cmake -DARCH=native .. + CC="${CC} -g " CXX="${CXX} -g " cmake .. + make +fi + +CC="${CC} -g " CXX="${CXX} -g " make "$@" V=1 From 9bf09f353b24ffb0353c04c7e9b10f5b12c26956 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 19 Sep 2022 05:47:35 -0700 Subject: [PATCH 103/295] Add readme to ./util dir --- util/README.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 util/README.md diff --git a/util/README.md b/util/README.md new file mode 100644 index 000000000..aadb9d08d --- /dev/null +++ b/util/README.md @@ -0,0 +1,4 @@ +# Hush utilities + +Scripts in this directory are used by Hush developers in the process of development +or in releasing a new version of Hush. From 84c9b786a73e2e34d4398accf4a3889a486fcec0 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 19 Sep 2022 05:52:53 -0700 Subject: [PATCH 104/295] Move checkpoints.pl to util/ --- contrib/README.md | 1 - doc/release-process.md | 2 +- src/chainparams.cpp | 6 +++--- util/README.md | 4 ++++ {contrib => util}/checkpoints.pl | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) rename {contrib => util}/checkpoints.pl (96%) diff --git a/contrib/README.md b/contrib/README.md index 916e4d094..ed2c7408b 100644 --- a/contrib/README.md +++ b/contrib/README.md @@ -8,7 +8,6 @@ Please fix bugs and report things you find. ## Hush Tools -checkpoints.pl - generate checkpoint data for main.cpp block\_time.pl - estimate when a Hush block will happen ## Wallet Tools diff --git a/doc/release-process.md b/doc/release-process.md index adc88c02c..715ff2e0f 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -63,7 +63,7 @@ Install deps on Linux: - Make sure to keep the values in configure.ac and src/clientversion.h the same. The variables are prefixed wth an underscore in configure.ac - Run ./contrib/devtools/gen-manpages.sh, commit + push results - PROTIP: Man page creation must be done after updating the version number and recompiling and before Debian package creation - - Update checkpoints in src/chainparams.cpp via contrib/checkpoints.pl + - Update checkpoints in src/chainparams.cpp via util/checkpoints.pl - checkpoints.pl will just generate the data you need, it must be manually copied into the correct place - Checkpoint are a list of block heights and block hashes that tell a full node the correct block history of the blockchain - Checkpoints make block verification a bit faster, because nodes can say "is this block a descendant of a checkpoint block" instead of doing full consensus checks, which take more time diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 23d7df788..db3a216da 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -557,14 +557,14 @@ void *chainparams_commandline() { pCurrentParams->consensus.vUpgrades[Consensus::UPGRADE_SAPLING].nActivationHeight = ASSETCHAINS_SAPLING; pCurrentParams->consensus.vUpgrades[Consensus::UPGRADE_OVERWINTER].nActivationHeight = ASSETCHAINS_OVERWINTER; - // Generated at 1575831755 via hush3 contrib/checkpoints.pl by Duke Leto + // Generated at 1575831755 via hush3 util/checkpoints.pl by Duke Leto if (strcmp(SMART_CHAIN_SYMBOL,"HUSH3") == 0) { - // Generated at 1596199654 via hush3 contrib/checkpoints.pl by Duke Leto + // Generated at 1596199654 via hush3 util/checkpoints.pl by Duke Leto checkpointData = //(Checkpoints::CCheckpointData) { boost::assign::map_list_of (0, pCurrentParams->consensus.hashGenesisBlock) - // Last updated at 1613482505 via hush3 contrib/checkpoints.pl by Duke Leto + // Last updated at 1613482505 via hush3 util/checkpoints.pl by Duke Leto (5000, uint256S("0x000000018f8543066baa9c5f83e981749da4cb625fad02c187b4a9c4693ebd60")) (10000, uint256S("0x00000002d177d1cbfeaf7c27a2a32766ea9063d222cbcc7623dc08355b07a3ad")) (15000, uint256S("0x000000008dbfbd5d5e27d819bf2989c5658c3494608bfa1320ad0b090660cd44")) diff --git a/util/README.md b/util/README.md index aadb9d08d..efc52a830 100644 --- a/util/README.md +++ b/util/README.md @@ -2,3 +2,7 @@ Scripts in this directory are used by Hush developers in the process of development or in releasing a new version of Hush. + +## Utilities + +checkpoints.pl - generate checkpoint data for chainparams.cpp diff --git a/contrib/checkpoints.pl b/util/checkpoints.pl similarity index 96% rename from contrib/checkpoints.pl rename to util/checkpoints.pl index ec0dd919d..5b49c2b3e 100755 --- a/contrib/checkpoints.pl +++ b/util/checkpoints.pl @@ -21,7 +21,7 @@ my $last = 0; my $now = time(); chomp($blocks); -print "// Generated at $now via hush3 contrib/checkpoints.pl by Duke Leto\n"; +print "// Generated at $now via hush3 util/checkpoints.pl by Duke Leto\n"; while (1) { $count++; From 93207a2faff8efbfe589f18c0e58da099259bb01 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 19 Sep 2022 05:59:41 -0700 Subject: [PATCH 105/295] Add copyrights to some devtools --- contrib/devtools/security-check.py | 3 +++ contrib/devtools/symbol-check.py | 1 + 2 files changed, 4 insertions(+) diff --git a/contrib/devtools/security-check.py b/contrib/devtools/security-check.py index 43c825bde..8eec65b0f 100755 --- a/contrib/devtools/security-check.py +++ b/contrib/devtools/security-check.py @@ -1,4 +1,7 @@ #!/usr/bin/env python +# Copyright (c) 2016-2022 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 ''' Perform basic ELF security checks on a series of executables. Exit status will be 0 if successful, and the program will be silent. diff --git a/contrib/devtools/symbol-check.py b/contrib/devtools/symbol-check.py index 664895a09..e86b54b2b 100755 --- a/contrib/devtools/symbol-check.py +++ b/contrib/devtools/symbol-check.py @@ -1,5 +1,6 @@ #!/usr/bin/env python # Copyright (c) 2014 Wladimir J. van der Laan +# Copyright (c) 2016-2022 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 ''' From 00aa7eaea46cfb2b930eef08acc02dd9e544664c Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 19 Sep 2022 06:08:53 -0700 Subject: [PATCH 106/295] Remove a tool that was inherited from BTC related to QT code that we don't even have (lulz) --- contrib/devtools/optimize-pngs.py | 73 ------------------------------- 1 file changed, 73 deletions(-) delete mode 100755 contrib/devtools/optimize-pngs.py diff --git a/contrib/devtools/optimize-pngs.py b/contrib/devtools/optimize-pngs.py deleted file mode 100755 index 38aaa00f3..000000000 --- a/contrib/devtools/optimize-pngs.py +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/env python - -import os -import sys -import subprocess -import hashlib -from PIL import Image - -def file_hash(filename): - '''Return hash of raw file contents''' - with open(filename, 'rb') as f: - return hashlib.sha256(f.read()).hexdigest() - -def content_hash(filename): - '''Return hash of RGBA contents of image''' - i = Image.open(filename) - i = i.convert('RGBA') - data = i.tostring() - return hashlib.sha256(data).hexdigest() - -#optimize png, remove various color profiles, remove ancillary chunks (alla) and text chunks (text) -#pngcrush -brute -ow -rem gAMA -rem cHRM -rem iCCP -rem sRGB -rem alla -rem text - -pngcrush = 'pngcrush' -git = 'git' -folders = ["src/qt/res/movies", "src/qt/res/icons", "src/qt/res/images"] -basePath = subprocess.check_output([git, 'rev-parse', '--show-toplevel']).rstrip('\n') -totalSaveBytes = 0 - -outputArray = [] -for folder in folders: - absFolder=os.path.join(basePath, folder) - for file in os.listdir(absFolder): - extension = os.path.splitext(file)[1] - if extension.lower() == '.png': - print("optimizing "+file+"..."), - file_path = os.path.join(absFolder, file) - fileMetaMap = {'file' : file, 'osize': os.path.getsize(file_path), 'sha256Old' : file_hash(file_path)}; - fileMetaMap['contentHashPre'] = content_hash(file_path) - - pngCrushOutput = "" - try: - pngCrushOutput = subprocess.check_output( - [pngcrush, "-brute", "-ow", "-rem", "gAMA", "-rem", "cHRM", "-rem", "iCCP", "-rem", "sRGB", "-rem", "alla", "-rem", "text", file_path], - stderr=subprocess.STDOUT).rstrip('\n') - except: - print "pngcrush is not installed, aborting..." - sys.exit(0) - - #verify - if "Not a PNG file" in subprocess.check_output([pngcrush, "-n", "-v", file_path], stderr=subprocess.STDOUT): - print "PNG file "+file+" is corrupted after crushing, check out pngcursh version" - sys.exit(1) - - fileMetaMap['sha256New'] = file_hash(file_path) - fileMetaMap['contentHashPost'] = content_hash(file_path) - - if fileMetaMap['contentHashPre'] != fileMetaMap['contentHashPost']: - print "Image contents of PNG file "+file+" before and after crushing don't match" - sys.exit(1) - - fileMetaMap['psize'] = os.path.getsize(file_path) - outputArray.append(fileMetaMap) - print("done\n"), - -print "summary:\n+++++++++++++++++" -for fileDict in outputArray: - oldHash = fileDict['sha256Old'] - newHash = fileDict['sha256New'] - totalSaveBytes += fileDict['osize'] - fileDict['psize'] - print fileDict['file']+"\n size diff from: "+str(fileDict['osize'])+" to: "+str(fileDict['psize'])+"\n old sha256: "+oldHash+"\n new sha256: "+newHash+"\n" - -print "completed. Total reduction: "+str(totalSaveBytes)+" bytes" From 644f43bcc616d1e1410d64c903862184aeff835d Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 19 Sep 2022 06:14:11 -0700 Subject: [PATCH 107/295] move gen-manpages to util/ --- {contrib/devtools => util}/gen-manpages.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {contrib/devtools => util}/gen-manpages.sh (100%) diff --git a/contrib/devtools/gen-manpages.sh b/util/gen-manpages.sh similarity index 100% rename from contrib/devtools/gen-manpages.sh rename to util/gen-manpages.sh From 432ea4b28b00d59ae916dfae2f7d70293cb073c3 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 19 Sep 2022 06:14:34 -0700 Subject: [PATCH 108/295] move replace.pl to util/ --- {contrib/devtools => util}/replace.pl | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {contrib/devtools => util}/replace.pl (100%) diff --git a/contrib/devtools/replace.pl b/util/replace.pl similarity index 100% rename from contrib/devtools/replace.pl rename to util/replace.pl From 2b809c56a0df61a4219de195374f5f3fad0b185a Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 19 Sep 2022 06:16:25 -0700 Subject: [PATCH 109/295] Move things to util/ and update docs+build system references --- DEVELOPING.md | 2 +- Makefile.am | 4 ++-- contrib/devtools/README.md | 2 +- doc/release-process.md | 6 +++--- src/Makefile.am | 4 ++-- {contrib/devtools => util}/security-check.py | 0 {contrib/devtools => util}/symbol-check.py | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) rename {contrib/devtools => util}/security-check.py (100%) rename {contrib/devtools => util}/symbol-check.py (99%) diff --git a/DEVELOPING.md b/DEVELOPING.md index 069fb7496..1de87fcc6 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -78,7 +78,7 @@ of a dependency or something inside of Rust, you will need `build.sh` . Make sure that you have updated all version numbers in hushd and compiled, then to generate new unix man pages for that version : - ./contrib/devtools/gen-manpages.sh + ./util/gen-manpages.sh ## Generating new debian packages diff --git a/Makefile.am b/Makefile.am index de977adfc..b76763e10 100644 --- a/Makefile.am +++ b/Makefile.am @@ -24,8 +24,8 @@ BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EX DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md) -BIN_CHECKS=$(top_srcdir)/contrib/devtools/symbol-check.py \ - $(top_srcdir)/contrib/devtools/security-check.py +BIN_CHECKS=$(top_srcdir)/util/symbol-check.py \ + $(top_srcdir)/util/security-check.py diff --git a/contrib/devtools/README.md b/contrib/devtools/README.md index fa03b6cff..1b82a47f0 100644 --- a/contrib/devtools/README.md +++ b/contrib/devtools/README.md @@ -14,7 +14,7 @@ still compatible with the minimum supported Linux distribution versions. Example usage after a gitian build: - find ../gitian-builder/build -type f -executable | xargs python contrib/devtools/symbol-check.py + find ../gitian-builder/build -type f -executable | xargs python util/symbol-check.py If only supported symbols are used the return value will be 0 and the output will be empty. diff --git a/doc/release-process.md b/doc/release-process.md index 715ff2e0f..7e1bdd39e 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -61,7 +61,7 @@ Install deps on Linux: - To make a pre-release "beta" you can modify `CLIENT_VERSION_BUILD` but that is rarely done in Hush world. - A `CLIENT_VERSION_BUILD` of 50 means "actual non-beta release" - Make sure to keep the values in configure.ac and src/clientversion.h the same. The variables are prefixed wth an underscore in configure.ac - - Run ./contrib/devtools/gen-manpages.sh, commit + push results + - Run ./util/gen-manpages.sh, commit + push results - PROTIP: Man page creation must be done after updating the version number and recompiling and before Debian package creation - Update checkpoints in src/chainparams.cpp via util/checkpoints.pl - checkpoints.pl will just generate the data you need, it must be manually copied into the correct place @@ -69,12 +69,12 @@ Install deps on Linux: - Checkpoints make block verification a bit faster, because nodes can say "is this block a descendant of a checkpoint block" instead of doing full consensus checks, which take more time - Checkpoints also provide a bit of security against some attacks that would create malicious chainforks - Update man pages - - Update copyright years (if applicable) with contrib/devtools/replace.pl + - Update copyright years (if applicable) with util/replace.pl - Do a fresh clone and fresh sync with new checkpoints - Stop node, wait 20 minutes, and then do a partial sync with new checkpoints - Make Gitea release - Make Git Tag (Gitea can do this) - - Use contrib/devtools/gen-linux-binary-release.sh to make a Linux release binary + - Use util/gen-linux-binary-release.sh to make a Linux release binary - Use util/build-debian-package.sh to make an x86 Debian package for the release - Use util/build-debian-package-ARM.sh (does this still work?) to make an ARM Debian package for the release - Upload the debian packages to the Gitea release page, with SHA256 sums diff --git a/src/Makefile.am b/src/Makefile.am index 797aac856..6a3e3dab8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -683,13 +683,13 @@ clean-local: check-symbols: $(bin_PROGRAMS) if GLIBC_BACK_COMPAT @echo "Checking glibc back compat of [$(bin_PROGRAMS)]..." - $(AM_V_at) READELF=$(READELF) CPPFILT=$(CPPFILT) $(top_srcdir)/contrib/devtools/symbol-check.py $(bin_PROGRAMS) + $(AM_V_at) READELF=$(READELF) CPPFILT=$(CPPFILT) $(top_srcdir)/util/symbol-check.py $(bin_PROGRAMS) endif check-security: $(bin_PROGRAMS) if HARDEN @echo "Checking binary security of [$(bin_PROGRAMS)]..." - $(AM_V_at) READELF=$(READELF) OBJDUMP=$(OBJDUMP) $(top_srcdir)/contrib/devtools/security-check.py $(bin_PROGRAMS) + $(AM_V_at) READELF=$(READELF) OBJDUMP=$(OBJDUMP) $(top_srcdir)/util/security-check.py $(bin_PROGRAMS) endif %.pb.cc %.pb.h: %.proto diff --git a/contrib/devtools/security-check.py b/util/security-check.py similarity index 100% rename from contrib/devtools/security-check.py rename to util/security-check.py diff --git a/contrib/devtools/symbol-check.py b/util/symbol-check.py similarity index 99% rename from contrib/devtools/symbol-check.py rename to util/symbol-check.py index e86b54b2b..312f27e5e 100755 --- a/contrib/devtools/symbol-check.py +++ b/util/symbol-check.py @@ -10,7 +10,7 @@ still compatible with the minimum supported Linux distribution versions. Example usage: - find ../gitian-builder/build -type f -executable | xargs python contrib/devtools/symbol-check.py + find ../gitian-builder/build -type f -executable | xargs python util/symbol-check.py ''' from __future__ import division, print_function import subprocess From 6cd6f7e0bac65a84e5354f0b7a77009926dfeb38 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 19 Sep 2022 06:18:25 -0700 Subject: [PATCH 110/295] Migrate readme docs to util/ --- contrib/devtools/README.md | 26 -------------------------- util/README.md | 36 ++++++++++++++++++++++++++++++++++-- 2 files changed, 34 insertions(+), 28 deletions(-) diff --git a/contrib/devtools/README.md b/contrib/devtools/README.md index 1b82a47f0..869fa31fe 100644 --- a/contrib/devtools/README.md +++ b/contrib/devtools/README.md @@ -2,28 +2,6 @@ This directory contains tools for developers working on this repository. -## security-check.py - -Perform basic ELF security checks on a series of executables. - -## symbol-check.py - -A script to check that the (Linux) executables produced by gitian only contain -allowed gcc, glibc and libstdc++ version symbols. This makes sure they are -still compatible with the minimum supported Linux distribution versions. - -Example usage after a gitian build: - - find ../gitian-builder/build -type f -executable | xargs python util/symbol-check.py - -If only supported symbols are used the return value will be 0 and the output will be empty. - -If there are 'unsupported' symbols, the return value will be 1 a list like this will be printed: - - .../64/test_bitcoin: symbol memcpy from unsupported version GLIBC_2.14 - .../64/test_bitcoin: symbol __fdelt_chk from unsupported version GLIBC_2.15 - .../64/test_bitcoin: symbol std::out_of_range::~out_of_range() from unsupported version GLIBCXX_3.4.15 - .../64/test_bitcoin: symbol _ZNSt8__detail15_List_nod from unsupported version GLIBCXX_3.4.15 ## update-translations.py @@ -36,7 +14,3 @@ It will do the following automatically: See doc/translation-process.md for more information. -## gen-manpages.sh - -A small script to automatically create manpages in ../../doc/man by running the release binaries with the -help option. -This requires help2man which can be found at: https://www.gnu.org/software/help2man/ diff --git a/util/README.md b/util/README.md index efc52a830..f672e73f1 100644 --- a/util/README.md +++ b/util/README.md @@ -3,6 +3,38 @@ Scripts in this directory are used by Hush developers in the process of development or in releasing a new version of Hush. -## Utilities +Utilities in this directory: -checkpoints.pl - generate checkpoint data for chainparams.cpp +## checkpoints.pl + +Generate checkpoint data for chainparams.cpp . This automates the creation of +block heights and block hashes by asking hushd for the data and then generating +the C++ code needed to embed them in the Hush source code. + +## security-check.py + +Perform basic ELF security checks on a series of executables. + +## symbol-check.py + +A script to check that the (Linux) executables produced by gitian only contain +allowed gcc, glibc and libstdc++ version symbols. This makes sure they are +still compatible with the minimum supported Linux distribution versions. + +Example usage after a gitian build: + + find ../gitian-builder/build -type f -executable | xargs python util/symbol-check.py + +If only supported symbols are used the return value will be 0 and the output will be empty. + +If there are 'unsupported' symbols, the return value will be 1 a list like this will be printed: + + .../64/test_bitcoin: symbol memcpy from unsupported version GLIBC_2.14 + .../64/test_bitcoin: symbol __fdelt_chk from unsupported version GLIBC_2.15 + .../64/test_bitcoin: symbol std::out_of_range::~out_of_range() from unsupported version GLIBCXX_3.4.15 + .../64/test_bitcoin: symbol _ZNSt8__detail15_List_nod from unsupported version GLIBCXX_3.4.15 + +## gen-manpages.sh + +A small script to automatically create manpages in ../../doc/man by running the release binaries with the -help option. +This requires help2man which can be found at: https://www.gnu.org/software/help2man/ From 5b105ce61a626edf0c215f5e852b72817319f6ae Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 19 Sep 2022 06:19:01 -0700 Subject: [PATCH 111/295] This tool does not exist in our repo --- contrib/devtools/README.md | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/contrib/devtools/README.md b/contrib/devtools/README.md index 869fa31fe..02694f222 100644 --- a/contrib/devtools/README.md +++ b/contrib/devtools/README.md @@ -2,15 +2,3 @@ This directory contains tools for developers working on this repository. - -## update-translations.py - -Run this script from the root of the repository to update all translations from transifex. -It will do the following automatically: - -- fetch all translations -- post-process them into valid and committable format -- add missing translations to the build system (TODO) - -See doc/translation-process.md for more information. - From 7000ba189cff59d4a85596785dcdaa749d8e376f Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 19 Sep 2022 06:20:15 -0700 Subject: [PATCH 112/295] Move the rest of devtools to util/ --- {contrib/devtools => util}/gen-linux-binary-release.sh | 0 {contrib/devtools => util}/split-debug.sh | 0 {contrib/devtools => util}/test-security-check.py | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename {contrib/devtools => util}/gen-linux-binary-release.sh (100%) rename {contrib/devtools => util}/split-debug.sh (100%) rename {contrib/devtools => util}/test-security-check.py (100%) diff --git a/contrib/devtools/gen-linux-binary-release.sh b/util/gen-linux-binary-release.sh similarity index 100% rename from contrib/devtools/gen-linux-binary-release.sh rename to util/gen-linux-binary-release.sh diff --git a/contrib/devtools/split-debug.sh b/util/split-debug.sh similarity index 100% rename from contrib/devtools/split-debug.sh rename to util/split-debug.sh diff --git a/contrib/devtools/test-security-check.py b/util/test-security-check.py similarity index 100% rename from contrib/devtools/test-security-check.py rename to util/test-security-check.py From dd83c0f427cbde4698d036533a15d1bc2e7f18fe Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 19 Sep 2022 06:20:41 -0700 Subject: [PATCH 113/295] Remove contrib/devtools/ --- contrib/devtools/README.md | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 contrib/devtools/README.md diff --git a/contrib/devtools/README.md b/contrib/devtools/README.md deleted file mode 100644 index 02694f222..000000000 --- a/contrib/devtools/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Contrib Devtools - -This directory contains tools for developers working on this repository. - From 54cfe10994241ef5d6e5f1cd3eb821843d853d3c Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 19 Sep 2022 06:25:18 -0700 Subject: [PATCH 114/295] Document all scripts in util/ --- util/README.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/util/README.md b/util/README.md index f672e73f1..a1ff2040f 100644 --- a/util/README.md +++ b/util/README.md @@ -5,12 +5,49 @@ or in releasing a new version of Hush. Utilities in this directory: +## build.sh + +Compile Hush full node code. + +## build-arm.sh + +Compile Hush full node code for ARM architecture. + +## build-debian-package.sh + +Builds an x86 Debain package for Hush. + +## build-debian-package-ARM.sh + +Builds an ARM Debain package for Hush. + +## build-mac.sh + +Compile Hush full node code for mac. NOTE: This is likely broken. + +## build-win.sh + +Compile Hush full node code for windows + ## checkpoints.pl Generate checkpoint data for chainparams.cpp . This automates the creation of block heights and block hashes by asking hushd for the data and then generating the C++ code needed to embed them in the Hush source code. +## docker-entrypoint.sh + +Script to use Hush with Docker. + +## docker-hush-cli.sh + +Convenience script to run hush-cli in a running Docker container. + +## replace.pl + +Replace a string in a set of files by another string. Very useful for updating +a variable name or value across many files, or updating copyrights. + ## security-check.py Perform basic ELF security checks on a series of executables. @@ -38,3 +75,7 @@ If there are 'unsupported' symbols, the return value will be 1 a list like this A small script to automatically create manpages in ../../doc/man by running the release binaries with the -help option. This requires help2man which can be found at: https://www.gnu.org/software/help2man/ + +## gen-linux-binary-release.sh + +Generate linux release binary. From 3a36f544aab5bef3cff524982f247078c2c12182 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 19 Sep 2022 07:15:08 -0700 Subject: [PATCH 115/295] Get rid of boost stacktrace stuff --- src/wallet/asyncrpcoperation_saplingconsolidation.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/wallet/asyncrpcoperation_saplingconsolidation.cpp b/src/wallet/asyncrpcoperation_saplingconsolidation.cpp index 6eb20d2e6..41f1fc07e 100644 --- a/src/wallet/asyncrpcoperation_saplingconsolidation.cpp +++ b/src/wallet/asyncrpcoperation_saplingconsolidation.cpp @@ -16,12 +16,6 @@ #include "util.h" #include "utilmoneystr.h" #include "wallet.h" -#include -#include - -// enable function names and line numbers in backtraces -#define BOOST_STACKTRACE_LINK -#define BOOST_STACKTRACE_USE_ADDR2LINE CAmount fConsolidationTxFee = DEFAULT_CONSOLIDATION_FEE; bool fConsolidationMapUsed = false; @@ -50,7 +44,6 @@ void AsyncRPCOperation_saplingconsolidation::main() { set_error_code(code); set_error_message(message); } catch (const runtime_error& e) { - std::cerr << "Consolidation stacktrace:" << '\n' << boost::stacktrace::stacktrace() << '\n'; set_error_code(-1); set_error_code(-1); set_error_message("runtime error: " + string(e.what())); From c7c2a98eafdb3c2eb6031df978b8ba75ece5aa6a Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 19 Sep 2022 11:41:31 -0400 Subject: [PATCH 116/295] Update manpages and add 'make manpages' target --- Makefile.am | 4 ++++ doc/man/hush-cli.1 | 6 +++--- doc/man/hush-tx.1 | 6 +++--- doc/man/hushd.1 | 35 ++++++++++++++++++++++++++++++++--- 4 files changed, 42 insertions(+), 9 deletions(-) diff --git a/Makefile.am b/Makefile.am index b76763e10..1cdfb6ab3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -247,4 +247,8 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-man clean-local: rm -rf test_bitcoin.coverage/ total.coverage/ +manpages: + ./util/gen-manpages.sh + echo "Please review the man pages changes to see if they look correct, then commit and push" + # I also heard about a bug in the UNIVAC but it's too big for this comment. -- Duke diff --git a/doc/man/hush-cli.1 b/doc/man/hush-cli.1 index 51f26c6a4..f2b36ac28 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.13. -.TH HUSH-CLI "1" "September 2022" "hush-cli v3.9.1" "User Commands" +.TH HUSH-CLI "1" "September 2022" "hush-cli v3.9.2" "User Commands" .SH NAME -hush-cli \- manual page for hush-cli v3.9.1 +hush-cli \- manual page for hush-cli v3.9.2 .SH DESCRIPTION -Hush RPC client version v3.9.1\-1799c6c9b +Hush RPC client version v3.9.2\-54cfe1099 .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 8318b2aa2..f34354e45 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.13. -.TH HUSH-TX "1" "September 2022" "hush-tx v3.9.1" "User Commands" +.TH HUSH-TX "1" "September 2022" "hush-tx v3.9.2" "User Commands" .SH NAME -hush-tx \- manual page for hush-tx v3.9.1 +hush-tx \- manual page for hush-tx v3.9.2 .SH DESCRIPTION -hush\-tx utility version v3.9.1\-1799c6c9b +hush\-tx utility version v3.9.2\-54cfe1099 .SS "Usage:" .TP hush\-tx [options] [commands] diff --git a/doc/man/hushd.1 b/doc/man/hushd.1 index eebf51b5b..9f69dd460 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.13. -.TH HUSHD "1" "September 2022" "hushd v3.9.1" "User Commands" +.TH HUSHD "1" "September 2022" "hushd v3.9.2" "User Commands" .SH NAME -hushd \- manual page for hushd v3.9.1 +hushd \- manual page for hushd v3.9.2 .SH DESCRIPTION -Hush Daemon version v3.9.1\-1799c6c9b +Hush Daemon version v3.9.2\-54cfe1099 .PP In order to ensure you are adequately protecting your privacy when using Hush, please see . @@ -314,6 +314,35 @@ Specify Sapling Address to Consolidate. (default: all) Fee amount in Puposhis used send consolidation transactions. (default 10000) .HP +\fB\-zsweep\fR +.IP +Enable zaddr sweeping, automatically move all shielded funds to a one +address once per X blocks +.HP +\fB\-zsweepaddress=\fR +.IP +Specify the shielded address where swept funds will be sent) +.HP +\fB\-zsweepfee\fR +.IP +Fee amount in puposhis used send sweep transactions. (default 10000) +.HP +\fB\-zsweepinterval\fR +.IP +Sweep shielded funds every X blocks (default 5) +.HP +\fB\-zsweepmaxinputs\fR +.IP +Maximum number of shielded inputs to sweep per transaction (default 8) +.HP +\fB\-zsweepexternal\fR +.IP +Enable sweeping to an external wallet (default false) +.HP +\fB\-zsweepexclude\fR +.IP +Addresses to exclude from sweeping (default none) +.HP \fB\-deletetx\fR .IP Enable Old Transaction Deletion From bf039e366514720fec03306025689c1cc8bad5c6 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 19 Sep 2022 11:42:13 -0400 Subject: [PATCH 117/295] Do not echo this echo command when running --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 1cdfb6ab3..84a4aed25 100644 --- a/Makefile.am +++ b/Makefile.am @@ -249,6 +249,6 @@ clean-local: manpages: ./util/gen-manpages.sh - echo "Please review the man pages changes to see if they look correct, then commit and push" + @echo "Please review the man pages changes to see if they look correct, then commit and push" # I also heard about a bug in the UNIVAC but it's too big for this comment. -- Duke From afcedbd06a1706c1cd59d31e837692198e02a80b Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 19 Sep 2022 11:43:37 -0400 Subject: [PATCH 118/295] Update docs about make manpages --- doc/release-process.md | 2 +- util/README.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/release-process.md b/doc/release-process.md index 7e1bdd39e..75ea5d4f1 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -61,7 +61,7 @@ Install deps on Linux: - To make a pre-release "beta" you can modify `CLIENT_VERSION_BUILD` but that is rarely done in Hush world. - A `CLIENT_VERSION_BUILD` of 50 means "actual non-beta release" - Make sure to keep the values in configure.ac and src/clientversion.h the same. The variables are prefixed wth an underscore in configure.ac - - Run ./util/gen-manpages.sh, commit + push results + - Run `make manpages`, commit + push results - PROTIP: Man page creation must be done after updating the version number and recompiling and before Debian package creation - Update checkpoints in src/chainparams.cpp via util/checkpoints.pl - checkpoints.pl will just generate the data you need, it must be manually copied into the correct place diff --git a/util/README.md b/util/README.md index a1ff2040f..0c7408f4d 100644 --- a/util/README.md +++ b/util/README.md @@ -76,6 +76,8 @@ If there are 'unsupported' symbols, the return value will be 1 a list like this A small script to automatically create manpages in ../../doc/man by running the release binaries with the -help option. This requires help2man which can be found at: https://www.gnu.org/software/help2man/ +When you type "make manpages" it runs this script. + ## gen-linux-binary-release.sh Generate linux release binary. From 50c4af69f1541d11102c59130c6e873b97fb698f Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 19 Sep 2022 12:54:03 -0400 Subject: [PATCH 119/295] More details about the release process --- doc/release-process.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/doc/release-process.md b/doc/release-process.md index 75ea5d4f1..e72aa90c4 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -62,13 +62,19 @@ Install deps on Linux: - A `CLIENT_VERSION_BUILD` of 50 means "actual non-beta release" - Make sure to keep the values in configure.ac and src/clientversion.h the same. The variables are prefixed wth an underscore in configure.ac - Run `make manpages`, commit + push results + - hushd must be running so the script can automatically get the correct version number + - There is a hack in the script where you can hardcode a version number if hushd isn't running. + - Comment out the HUSHVER line and uncomment the line above it with a hardcoded version number - PROTIP: Man page creation must be done after updating the version number and recompiling and before Debian package creation - Update checkpoints in src/chainparams.cpp via util/checkpoints.pl + - hushd must be running to run this script, since it uses hush-cli to get the data - checkpoints.pl will just generate the data you need, it must be manually copied into the correct place - - Checkpoint are a list of block heights and block hashes that tell a full node the correct block history of the blockchain - - Checkpoints make block verification a bit faster, because nodes can say "is this block a descendant of a checkpoint block" instead of doing full consensus checks, which take more time + - Checkpoints are a list of block heights and block hashes that tell a full node the correct block history of the blockchain + - Checkpoints make block verification a bit faster, because nodes can say "is this block a descendant of a checkpoint block?" instead of doing full consensus checks, which take more time - Checkpoints also provide a bit of security against some attacks that would create malicious chainforks - - Update man pages + - They only provide limited security, because they talk about the past, not future block heights. + - Try to generate checkpoints as close to the release as possible, so you can have a recent block height be protected. + - For instance, don't update checkpoints and then do a release a month later. You can always update checkpoint data again or multiple times - Update copyright years (if applicable) with util/replace.pl - Do a fresh clone and fresh sync with new checkpoints - Stop node, wait 20 minutes, and then do a partial sync with new checkpoints @@ -76,6 +82,7 @@ Install deps on Linux: - Make Git Tag (Gitea can do this) - Use util/gen-linux-binary-release.sh to make a Linux release binary - Use util/build-debian-package.sh to make an x86 Debian package for the release + - Debian packages should be done after you make manpages, because those are included in Debian packages - Use util/build-debian-package-ARM.sh (does this still work?) to make an ARM Debian package for the release - Upload the debian packages to the Gitea release page, with SHA256 sums From 473ec3040428212c062d02b25b6b7e831e4c7f52 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 19 Sep 2022 13:06:39 -0400 Subject: [PATCH 120/295] More checkpoint tribal knowledge --- doc/release-process.md | 6 ++++++ src/chainparams.cpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/release-process.md b/doc/release-process.md index e72aa90c4..7f57e3ad8 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -68,6 +68,12 @@ Install deps on Linux: - PROTIP: Man page creation must be done after updating the version number and recompiling and before Debian package creation - Update checkpoints in src/chainparams.cpp via util/checkpoints.pl - hushd must be running to run this script, since it uses hush-cli to get the data + - Run `./util/checkpoints.pl &> checkpoints.txt` to generate the latets checkpoint data + - By default it will generate checkpoints for every 1000 blocks, the "stride" + - You can get a different "stride" by passing it in as the first arg to the script + - To get checkpoint data for every 5000 blocks: `./util/checkpoints.pl 5000 &> checkpoints.txt` + - Currently checkpoints from before block 340k are given for every 5k blocks to keep the data smaller + - Look for line which says "HUSH mainnet checkpoint data" near line 560 in chainparams.cpp , that is where checkpoint data begins. - checkpoints.pl will just generate the data you need, it must be manually copied into the correct place - Checkpoints are a list of block heights and block hashes that tell a full node the correct block history of the blockchain - Checkpoints make block verification a bit faster, because nodes can say "is this block a descendant of a checkpoint block?" instead of doing full consensus checks, which take more time diff --git a/src/chainparams.cpp b/src/chainparams.cpp index db3a216da..be0b8ce42 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -559,7 +559,7 @@ void *chainparams_commandline() { pCurrentParams->consensus.vUpgrades[Consensus::UPGRADE_OVERWINTER].nActivationHeight = ASSETCHAINS_OVERWINTER; // Generated at 1575831755 via hush3 util/checkpoints.pl by Duke Leto if (strcmp(SMART_CHAIN_SYMBOL,"HUSH3") == 0) { - // Generated at 1596199654 via hush3 util/checkpoints.pl by Duke Leto + // HUSH mainnet checkpoint data checkpointData = //(Checkpoints::CCheckpointData) { boost::assign::map_list_of From 0fb9db169cd293a51ade5d1ffe4a56f372335d91 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 19 Sep 2022 13:12:37 -0400 Subject: [PATCH 121/295] Basic CLI help and error checking for a valid stride --- util/checkpoints.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/util/checkpoints.pl b/util/checkpoints.pl index 5b49c2b3e..b5eca7109 100755 --- a/util/checkpoints.pl +++ b/util/checkpoints.pl @@ -10,6 +10,16 @@ my $perday = 1152; my $hush = "./src/hush-cli"; my $gethash = "$hush getblockhash"; my $stride = shift || 1000; +if ($stride =~ m/help/) { + print "To generate checkpoint data every 1000 blocks: $0 &> checkpoints.txt\n"; + print "To generate checkpoint data every X blocks: $0 X &> checkpoints.txt\n"; + exit 0; +} + +unless ($stride == int($stride) and $stride >= 0) { + print "Invalid stride! Must be an integer > 0\n"; + exit 1; +} my $count = 0; my $blocks = qx{$hush getblockcount}; if($?) { From 92b387baed2fe2f87f35b4cc7dca55ba2f6487e4 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 19 Sep 2022 13:16:20 -0400 Subject: [PATCH 122/295] Allow custom starting height to generate checkpoint data --- util/checkpoints.pl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/util/checkpoints.pl b/util/checkpoints.pl index b5eca7109..ae273ed85 100755 --- a/util/checkpoints.pl +++ b/util/checkpoints.pl @@ -13,6 +13,7 @@ my $stride = shift || 1000; if ($stride =~ m/help/) { print "To generate checkpoint data every 1000 blocks: $0 &> checkpoints.txt\n"; print "To generate checkpoint data every X blocks: $0 X &> checkpoints.txt\n"; + print "To generate checkpoint data every X blocks starting at height Y: $0 X Y &> checkpoints.txt\n"; exit 0; } @@ -20,6 +21,13 @@ unless ($stride == int($stride) and $stride >= 0) { print "Invalid stride! Must be an integer > 0\n"; exit 1; } +my $start_height = shift || 0; + +unless ($start_height == int($start_height) and $start_height >= 0) { + print "Invalid start_height! Must be an integer > 0\n"; + exit 1; +} + my $count = 0; my $blocks = qx{$hush getblockcount}; if($?) { @@ -35,7 +43,7 @@ print "// Generated at $now via hush3 util/checkpoints.pl by Duke Leto\n"; while (1) { $count++; - my $block = $stride*$count; + my $block = $start_height + $stride*$count; if ($block > $blocks) { $last = $stride*($count-1); #print "last checkpointed block=$last\n"; From 53343051e82315ae00d25f16a3b4a275d2328004 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 19 Sep 2022 13:25:07 -0400 Subject: [PATCH 123/295] Fix bug in calculating the last checkpointed block that is used in the stats --- util/checkpoints.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/checkpoints.pl b/util/checkpoints.pl index ae273ed85..25cf5e3ad 100755 --- a/util/checkpoints.pl +++ b/util/checkpoints.pl @@ -45,7 +45,7 @@ while (1) { $count++; my $block = $start_height + $stride*$count; if ($block > $blocks) { - $last = $stride*($count-1); + $last = $start_height + $stride*($count-1); #print "last checkpointed block=$last\n"; last; } From d52ae9702606d8f4fec8756a2b40a83fd2b7b824 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 19 Sep 2022 13:25:26 -0400 Subject: [PATCH 124/295] Update checkpoint data up to block 1087000 --- src/chainparams.cpp | 285 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 280 insertions(+), 5 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index be0b8ce42..fe1470556 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -564,7 +564,7 @@ void *chainparams_commandline() { { boost::assign::map_list_of (0, pCurrentParams->consensus.hashGenesisBlock) - // Last updated at 1613482505 via hush3 util/checkpoints.pl by Duke Leto + // Generated at 1663607867 via hush3 util/checkpoints.pl by Duke Leto (5000, uint256S("0x000000018f8543066baa9c5f83e981749da4cb625fad02c187b4a9c4693ebd60")) (10000, uint256S("0x00000002d177d1cbfeaf7c27a2a32766ea9063d222cbcc7623dc08355b07a3ad")) (15000, uint256S("0x000000008dbfbd5d5e27d819bf2989c5658c3494608bfa1320ad0b090660cd44")) @@ -1109,11 +1109,286 @@ void *chainparams_commandline() { (811000, uint256S("0x000000135b3c8688693605a5878f5ffc9c486e13e4f12846e27b20da6486df29")) (812000, uint256S("0x000000130932327eb52b9229cb8574b552f39a83d8def5bd2ce12a6094f26093")) (813000, uint256S("0x0000000236505351e3ed94c075d7ab4f91cec65b4d15d8e47338833c744eaf00")) - (814000, uint256S("0x000000025cdfe869ed1ab7cf74c5fdad85e7c2b1b946b2c618d4035db2ae25cb")), - (int64_t) 1643000155, // time of last checkpointed block - (int64_t) 1256633, // total txs - (double) 1264 // txs in the last day before block 814560 + (814000, uint256S("0x000000025cdfe869ed1ab7cf74c5fdad85e7c2b1b946b2c618d4035db2ae25cb")) + (815000, uint256S("0x0000000df6cb366d1a19f44bf3965b113f230cace50ae43d902e36cc1b57c90f")) + (816000, uint256S("0x0000000ce78de6f9de658579a6f50e62b4c40dad76f8cd1c1734e18bb27ce36c")) + (817000, uint256S("0x00000002d556f863beff97cdff35ab19b8b95c8b17732a53794225fe4b1cf79b")) + (818000, uint256S("0x00000000a91755f89698a6039966df4917f14102c5b80c05367c4257f742b90b")) + (819000, uint256S("0x00000004267b5979c64305cb0f7bf39d226cde964311e38703eb9140e814cb76")) + (820000, uint256S("0x0000000607425566e85aaf1359ef51d3259ec2df92db17dc34590eb77285a502")) + (821000, uint256S("0x0000000294b9fa2516ab740b958360adf345415c669a4e13790d0ccd4fcd8131")) + (822000, uint256S("0x00000004c2002010881ddde59c8c8da131c9eeb2008d48516fe8797e3d9936af")) + (823000, uint256S("0x0000000181ba0fb0c33bcdd75f7498783edb6cf4a55cea03ee4b493ffe7911a4")) + (824000, uint256S("0x000000017bb225cfbe64692124d73ad171e629888f43b61df3f9bd457d112b95")) + (825000, uint256S("0x0000000a88847a0390971f151ad158ea274959ae17b41b7ad6879feb5ad08d49")) + (826000, uint256S("0x00000004aac5c10ff8e98390aa9528e360ac9d06abbb6e5a2b314595c40fdb8c")) + (827000, uint256S("0x00000006d00db50776c04ac598f74b2a98a4075f9bcbe316ec9efb3925513941")) + (828000, uint256S("0x0000000b327df01d652145ec09f4c78503e0f88ad68bebf2f3d22e7b66b067ee")) + (829000, uint256S("0x00000008113ea9b858888e82e0aff0d00e2be8f1d235aebfe36abdc9d0fc3f9e")) + (830000, uint256S("0x00000004449ac67abb08ffeb3cd8f830b6699ce39f1ae1abd95ce8c5d05f4696")) + (831000, uint256S("0x000000004f7397d147962983bb60a61702cb7d11c510269ced26e75df3be2690")) + (832000, uint256S("0x00000006ba456ab6e26a64da7332f634c571b102f69d22ef5e51a204496e4772")) + (833000, uint256S("0x0000000309517d3184a0bdeccd6e1bd3e2c99659ae80188636ec75c6f334de71")) + (834000, uint256S("0x00000000207fb66452b2586ad2323180c1c9c9859273c1732e33508ad3adb296")) + (835000, uint256S("0x0000000205b3cd0d3d5685aef16714eb825ecbac18ea7465406afe7f50ee2ad2")) + (836000, uint256S("0x000000019d49b8f7a3fbace5d74b484e8dd26959fb14ec0657426d81e0f98751")) + (837000, uint256S("0x0000000512cc6166087ff6ebd96d9f51082f6107ff0b132d569cf67019ab380c")) + (838000, uint256S("0x0000000217322c5faf9a90f5717c9082206fb6ea8c6910c7b8170ab4f12f4fd7")) + (839000, uint256S("0x00000003d36077dd9999f9a5323efb4e36224bd11f9b48a2d214996fd3740c27")) + (840000, uint256S("0x000000052f0c5fdb92f79d73c2c61e3ed4bf39615f3b6443cc0c06e9cecb6f1d")) + (841000, uint256S("0x00000001dfa9e6e2e2a90cde84d736281ce0acb2660154c51522bfadc403c596")) + (842000, uint256S("0x0000000225d380d6b39fe31bed0b3505a3de935cb0de55d51732237d0d9be477")) + (843000, uint256S("0x0000000157a60eeb0e41cafba5d4c7c0ca4ab2aee4a61be5025333234ce8578f")) + (844000, uint256S("0x00000004bd35390bcfc21f7ce16dbe8da9587bfb9e03a0c4e1fd98e956e1fd4f")) + (845000, uint256S("0x00000000974bf697ff50bbcf10937293456d341f10e8736a65a282f955e590b3")) + (846000, uint256S("0x000000027363e074bdada574f70de7175b4d03518cbf3ae9ced58e94a27b0fa7")) + (847000, uint256S("0x0000000547666106543dec3d692abef6e7d50d17f47fbeb4c759bc077516414d")) + (848000, uint256S("0x000000085af6002f63ea391dbbd212cb5f49048f4c1af21225e254e01c016c33")) + (849000, uint256S("0x000000022b41777e973c0d4721c7b50b09269ed9c773c7599d40e9ca4277dd90")) + (850000, uint256S("0x00000001729fbe957fe72a474c86a12e9a22fbcc4b85b91855f7e4d5904447bc")) + (851000, uint256S("0x000000019f079eab33e5f246d1fc0ce4e393566da78fc8c153ae16a6c5b7ac79")) + (852000, uint256S("0x00000003e2978814f57e0b0012c7624d010cba7f2341da6f822af8fab7d95967")) + (853000, uint256S("0x00000001b80a38e14cfbffcbaa9f66ca397a109467050ae24e416ee8494012ce")) + (854000, uint256S("0x00000002a158ec5176de19f9b6cb174966216e1777f512bd8a5233016483e1a8")) + (855000, uint256S("0x00000001685fa560dd08a137c3cae0024f52536f87ec0e1637cddc1f63ab0174")) + (856000, uint256S("0x000000012ca124b7033438beb46804c6efa1e3ce42eb8e90239a17de4b3838c5")) + (857000, uint256S("0x00000001d07b2ed47523d018445d1bc6425bdb9698ebaa2681278c35fe1aefeb")) + (858000, uint256S("0x0000000096eef875c36ec4a1285b7913e543c3da8fdcffab63bd6bf0059c8e75")) + (859000, uint256S("0x0000000408fff00975dad11a147e164550be93517d562fa1f1a89ddf0f10df1a")) + (860000, uint256S("0x00000000dfe2c0485688443569ef7b02b73abbb0c396fa90996f8ae5267a586a")) + (861000, uint256S("0x0000000275fc7eb611908f172df62457da86834f5773e192128c0344f68caa0e")) + (862000, uint256S("0x00000003dba02d1b0907336bcf1b9f840fb18c6a4290683bf2b02b31f7a18fca")) + (863000, uint256S("0x0000000382cbe3f592d09234fa03f00ec2419b3abe77fd9ad2289e9decc483c8")) + (864000, uint256S("0x0000000122211f2d84c96a22c9693f723fa40715e85bdaffb5275132f6b711c9")) + (865000, uint256S("0x0000000396b5aa22adb2cf49da07c414d038e641e1a022940c85476990d79fb2")) + (866000, uint256S("0x000000038dc1f303227c68dea63f5da71e39aee0f1e51810d0d6d101e5754803")) + (867000, uint256S("0x00000000be49b1bed6238e86cf254d8567bce736454e92ff150c2493e5a1f7c2")) + (868000, uint256S("0x0000000177a283b40cbeea2dc13e8e2ac2120ed37bb70d45da25164e6975f96b")) + (869000, uint256S("0x0000000398feb02eb7e55816bf0493978a8fbeede38441e54bd8a1522950b3ac")) + (870000, uint256S("0x00000003b506bbb8725b883c64f9e3958353b94a9798b4a525d6ddbfb4ce55eb")) + (871000, uint256S("0x000000010cc1a48093ff772811c08b4dcfd514d6bc5f5b7b1a4e61457846b5ae")) + (872000, uint256S("0x00000002b8926624aed8f722db56a39d5598188a27c4585ec804d24a26dfeb67")) + (873000, uint256S("0x000000009784a5f7fbbad6b1c837c47587799841879ea1dacfc4524c7416a69b")) + (874000, uint256S("0x00000002e8aeae774819da3151f0cadd7def30e8e49f3bd257a63cfda01d18df")) + (875000, uint256S("0x0000000053ea639a15c4c8aeda4a35249c2d160263bb07d0620368fa48a3b3b2")) + (876000, uint256S("0x000000041313c888752a0023edef7e222d1db67fb408c2fcde07f9931f25b7c5")) + (877000, uint256S("0x00000003285d233c0c96c9dff78705aa440eaf6e3a7df564f7bec30499d6a543")) + (878000, uint256S("0x000000020a138fbaaab927b2c80633f2ba629ac188e148fb1e879579f0d64699")) + (879000, uint256S("0x00000000e529899898619b9ac8b5e851792f7080eb1717870d24a3fcc02d6eb0")) + (880000, uint256S("0x000000052a432db1e1f301316e814a7c81ac99670c0d535852ca0eb357212f26")) + (881000, uint256S("0x000000017eb97455254d8e15186c91dabfdf0d6c83ac973d30753bb9d600dc43")) + (882000, uint256S("0x00000000e85d7154af2f3e76c486cd64e6699144985230dac70cdf11d6b76e64")) + (883000, uint256S("0x00000000ee27110c95368d2e9ac76f0a0b8bc51bb194a64c92a1eb026a50c025")) + (884000, uint256S("0x0000000270c508491570556486991df763cb65964cf47a6755f8a618cf502476")) + (885000, uint256S("0x00000001c8011638be3fb5e7753f136cf7309bf65be19cc75e04d40de632d3a5")) + (886000, uint256S("0x00000003b2ce8418f95c09d912abd975a3ed65e7520cce39984b91375a13f8e6")) + (887000, uint256S("0x0000000162a4592988a5f7a8c52d8a0427f363c25df7eacd797d8150019a522f")) + (888000, uint256S("0x0000000181a04b20393bff6706250323cee60807794f6e24573f33cf40d6eaeb")) + (889000, uint256S("0x000000016b8d7666f6fd9a7c739f148d070d3373497ec7aa1dc8e4aa2bcee418")) + (890000, uint256S("0x00000001997f47f53a6342e0361705cd623e00e45ef4a55183f6c0085ea3f475")) + (891000, uint256S("0x00000001e7b2a180a07f1676c27814433e2c6673421c2973e4aa8e27d86fe86f")) + (892000, uint256S("0x000000026b271168e39aa175d679d0a1dcea6170ae62191bc6f824503fbd4ef7")) + (893000, uint256S("0x00000001330b7dd01a6bf897bcc61495044efc65c38ecd2da6530aa3ad6240d1")) + (894000, uint256S("0x0000000464a74802df74a38d76411e5e388328a0d2d23093f8baf6f78aac2aec")) + (895000, uint256S("0x000000011ccec37a917aa7bf5206a968b4e602594040bddf4d23a73bc7de8dfd")) + (896000, uint256S("0x00000003073b7cf913770042b17b4294b49d527e21746a26bc6d1ab245573a15")) + (897000, uint256S("0x00000001a4ce2efb696e813847866bb4406c206c40f014072529f94e6e61c8b1")) + (898000, uint256S("0x00000004cc48c4f883f09a6b5d7b07ea58d5d30d55145a606f91f8431bcb0f8b")) + (899000, uint256S("0x000000021ad0d858df3847be91f708561775b109a1cc4ac03ae98b7bc6849d50")) + (900000, uint256S("0x00000004d583fb1fe9915522d67a7ce287b7bc0c8fdc533bc9d69bfa42c21114")) + (901000, uint256S("0x000000020f34f41547a6b99d171cca177b54162cd82ab451aa20c4309afffb8c")) + (902000, uint256S("0x00000001a34dc22f0c54724c0a5d216ffb69adf91d01ed6581287a5b33170b32")) + (903000, uint256S("0x00000000a1a169eec927f7a9f693baf3d245d8514bfee53da8df1b4cfbf49958")) + (904000, uint256S("0x0000000146348c6656e513d798b6a5c30a81515c03e12d9b9bd15bfb42773811")) + (905000, uint256S("0x00000003dfa16e4b5271a4fbbcd8dd765829aef9e98c187ffaaa0ce2533318e7")) + (906000, uint256S("0x00000003b39d37b17faa5d219f69bd414c1d6ff1605a1d345cd19bb2ab19a439")) + (907000, uint256S("0x00000001b22ae264c831db5dd6e0a710ba19683d6f7158fe0b2297266815c043")) + (908000, uint256S("0x0000000296b9af3429d1896f41c892c9093324e250e0e8dc1ca8e4b548035ff8")) + (909000, uint256S("0x00000001b59b5cd319cc4226134383c7385e9350f70a5c06cd24ebf06a0c22f1")) + (910000, uint256S("0x0000000609525a8843a5154ec5852e4a45f88568ce0488f71918979887336974")) + (911000, uint256S("0x00000001bc256a60a91b262f95ae6f7453698f88d41868dbe371495bddd2d8d1")) + (912000, uint256S("0x0000000203706048d0e63a013951083c2de38abb929a6f5900218340f044d5d0")) + (913000, uint256S("0x000000060371dbe13dc3892e852178b47edd9a50fa5bbdbf13b2db177ab6721c")) + (914000, uint256S("0x00000000731990dd05277da899c5cdc5c55677523c98dde26e40a0908eeca6c9")) + (915000, uint256S("0x00000003c0640fe26ee68893bfd18dcaa78b4137991d17731142aa6dcb135944")) + (916000, uint256S("0x00000001662152a289fc0d52778f385ac89f377c41dc63b22c75a87b636f4943")) + (917000, uint256S("0x0000000318a6f2bc69222c9c507411dd0ccbd896a55c8af7b8e3edee654b2de3")) + (918000, uint256S("0x000000008b763e8c2ab62a6579951f6ec6b3389c7c6b65a522e99a63bd97a739")) + (919000, uint256S("0x0000000233571d5f6478ae23ce41a82ebcb363f855d058d66f0ba3919c112a9e")) + (920000, uint256S("0x0000000427e137360eb41ccd29ace37e81cfb755319dcee91a92ba2a4882513d")) + (921000, uint256S("0x000000050e0477cb9b1778dba84589e3dd7d7dd1a1c2a02ad08d332ab97c6a3a")) + (922000, uint256S("0x00000003d9bcc0f005cd59b7a7ee7070b60d7bd9a446dd9683db3ceeac1de384")) + (923000, uint256S("0x000000044e167ff553280f6cb85fb2716ba05cc2ec757b83716feca57d2ec4f1")) + (924000, uint256S("0x00000002bdfd61d89711f727633220d8c9c0cd31ecfa21f31fe3f8da642dbdbd")) + (925000, uint256S("0x00000004d5ec42db6fc7ff14ffbafce84a4fed94bdd445aed8c0b4ca15341ec9")) + (926000, uint256S("0x000000038e14de8aa0edf65370930f7ce17020fffcafc05e9afb01bbcdb13c15")) + (927000, uint256S("0x000000014bf416862cbc79b1d01cb0856fc76bdbfcb70db4955d828b0103ef6c")) + (928000, uint256S("0x0000000265d1e1638d2426922f595f2438766a9ea63ca45f34cf80255da99fd3")) + (929000, uint256S("0x00000002d7cf1bb10144d67364fac39df662cb4e823fa1042950a5796a7771cc")) + (930000, uint256S("0x000000002b3f4a90dc91e81a1e7e6ea9b7d915de51ce50a093f50176fb60ce5b")) + (931000, uint256S("0x00000003bb7bda948663dfd60f3b2720cbbaa10b1f1bbc228fdfc04750be4ff1")) + (932000, uint256S("0x000000005c4638688394adc36df4bcc608df08ca56800ac4eaceeb677afd1a18")) + (933000, uint256S("0x00000004c3157df042d84b36f33e5ed6c4037f8e5b8d7987276ae3270358291e")) + (934000, uint256S("0x0000000393193988615a4c43c123297bef87cd6e376408028f55c36f77196362")) + (935000, uint256S("0x00000003c19101992896cbe965d52e45b2233f3f2002933db13066613e1c0f35")) + (936000, uint256S("0x00000000968337016832fbf62ef162c0aad8c02d6f37833792953d60082b16f0")) + (937000, uint256S("0x000000015e7a21a8dfff99e2ce3a7c822a31feeede401e9f3071064b201c34ce")) + (938000, uint256S("0x000000037f2d515c46071a1a273edcd6c79adae16aa3ee5c07430f6719dd6d72")) + (939000, uint256S("0x0000000267a840284290547bdb380d1e409a54ca9f1155cfad552c93e6679b2c")) + (940000, uint256S("0x00000000fd1f15835042e3a648a46ba8c678d4569fd314b273459c5aa92dd001")) + (941000, uint256S("0x000000038f904bec469e2f9cd513160b8d2a7f271da396fe38821b026366b818")) + (942000, uint256S("0x00000002f11f3b9fd10e9404fbf91eeed8774e2e45fe5216942c0bb04ebab656")) + (943000, uint256S("0x0000000304a091f4b993b8200d41eaeb0543c5a3103c5678ffc0a535dfc38236")) + (944000, uint256S("0x000000040bced4dbdcbe0604354c6a853c72dbb6b50c8c52da468cc8ad0e9681")) + (945000, uint256S("0x0000000046de24d9c0442378778f08322f3c58973d6c741f75f50ab022a7cf5e")) + (946000, uint256S("0x00000001cfd737ef7b4e7d34cbb02290d8c227822aaff0dd8a8d4d48c175f8c8")) + (947000, uint256S("0x00000004f4375fda1d75f98a764c91d8f7dc5a3bb1415e5fce9e6d7696c52c10")) + (948000, uint256S("0x0000000541269e0f44535d415895afdfa09dc6fe2cac0f1429fe29af92461d97")) + (949000, uint256S("0x000000021fa97dade883418f2e14ce58b609d4726613498ed6b9a7b7faef2b46")) + (950000, uint256S("0x00000003fcbf83d67ac4e7fc936122b825919e5b0960d177615b67486994ea0b")) + (951000, uint256S("0x000000016aaa78a202aaecb90dcf8ec793b389e7bb3673f4f13de2e85e1189a9")) + (952000, uint256S("0x00000003607fff01107d1613bd13d60f81d1ef474d20616bf6fac37092328a55")) + (953000, uint256S("0x000000035c19b9ef98b766ae081c501120eaffaa2bf49a313e1811c259e240b1")) + (954000, uint256S("0x00000003f242fafc14e936d5ab81f5558aa65b0bdfc5a92f650cba2d455827ae")) + (955000, uint256S("0x00000003d922090149b5120addc6175239f6063cbeb4ef30bc92ce83a1f9fce0")) + (956000, uint256S("0x00000003770c91edae96c9c7fe9c8876cdb16381b13cc11b9d95d00713cc8aec")) + (957000, uint256S("0x00000005019f09058db9216b101a61c2e61f37d2764640b1e9760cf7a281014c")) + (958000, uint256S("0x0000000456bff3b05a6e47dd4a94987bb5334d90e5aaf834c1f00b1676506b81")) + (959000, uint256S("0x00000004525f22d8c0fcf787c015cdfad4e8c4b9d787da88bd6ad647ea2aef5c")) + (960000, uint256S("0x000000010166f88f1fddf91deeaacc06b52e7da9d1298608f308f13f73e6c926")) + (961000, uint256S("0x000000055411b16bb2e1eb984978f039b95fd660f0f7170594c5645be5677df1")) + (962000, uint256S("0x000000049574e12129466441be84283e285ed61d37827fb7df003864fa67acbe")) + (963000, uint256S("0x0000000083eb3eb9f2568ad43cc9b8e827c23f9850e81a6f7be4e6ea16362cfe")) + (964000, uint256S("0x000000020ea47a19feaaf858655731e2d9f96ed2ab71d6dabea1c2583e26a829")) + (965000, uint256S("0x000000017b2a6a61ccb74789990c37fada264744d20e73174f86951ad58e1495")) + (966000, uint256S("0x000000032c4e3abb3a7ac60fcaf1b1b87520919906608a34c9f4eeb708ffc749")) + (967000, uint256S("0x0000000550923b03a1e361e3e92e43908012002223cc0fed14854d33da9b2065")) + (968000, uint256S("0x00000001ec98ed6e3c3efb5e98e7babb652d175675c4aa380e07d6f05dae4b4b")) + (969000, uint256S("0x0000000617320afeb83964ae57fc656f06fe3f6254b12f4ca94d5201efc2c211")) + (970000, uint256S("0x00000006ccb16c67a49ac724ec636d2f83c95a22bc41cc4df933a8b064092281")) + (971000, uint256S("0x00000000f71e012b5c671d06ca2111b6df8d50f5c16549a602e81f968052ee90")) + (972000, uint256S("0x000000012f6d713f64f6c9c54accca288df17af6006777cb435a3d1a6a84e843")) + (973000, uint256S("0x000000021c37257bf2e55c02444f11a1b60979d2d56a7290dbdb28b8b299238f")) + (974000, uint256S("0x000000001d83b9a5d53c759edf5c00ac184ac7d4266a8b396fcbb504cb4079c6")) + (975000, uint256S("0x00000005b82711efd762b2ea0d7595b28bdf5aed2d486811074e032cc628ed50")) + (976000, uint256S("0x00000003ecf59231d9cca098a845e93a66f4f41cf1c6dfd993ddb182d95a4efe")) + (977000, uint256S("0x000000015db47b61454bc4ace1c65c66fc89ec14d34a4ced7e2b61328bcd1f00")) + (978000, uint256S("0x0000000411d4a37aa6144f8637ee9c8aa011ab021eda959a4764419f8ec4f7f6")) + (979000, uint256S("0x00000002137f49143bbf727f8e4ce8deaa9fd42fc46cf0f3ca2b913a98c632a4")) + (980000, uint256S("0x000000033622593be50ba7ecf03bc657be6890563d082cc90474e09ad8f56fb5")) + (981000, uint256S("0x00000005c2e78844292d8680eb7abefe85c75cf8dbb362376ccb190a6d8e60b3")) + (982000, uint256S("0x00000003d8c71db0c573290b70da5d7cdf92145d3bc6715868f789fa3e25698e")) + (983000, uint256S("0x00000004d79d85d0aa71fce43a05136e4cc09938758aefd9e879d6e60be258a0")) + (984000, uint256S("0x00000003f65d68cacec0dfa9cccd4b46e15798b14be9ce6f22fde8e3c8618ec3")) + (985000, uint256S("0x0000000341d9dc96faca5e5a462b34b9c6d22d65ecfcc56d5147d57dda4c3a59")) + (986000, uint256S("0x00000007e9077e82512804c33e683b5dcca58ceb4d36e654abd178b89b68c202")) + (987000, uint256S("0x00000006929d5b93ee6fd6db9bf100988c85c92b8163ac701a20e98cd9082744")) + (988000, uint256S("0x00000005ff0c1652c244fe20d835f598a423cf1f76d36d1027b24fcbd7d8129f")) + (989000, uint256S("0x000000049340ad6d31f06a9ab1e7e9e619af8206348d1a36a2e8a0b3d78e954e")) + (990000, uint256S("0x0000000301852b2fab793862e4f6f674d5b6974f92d5580c718104b19c852288")) + (991000, uint256S("0x00000002a0910ad7941a9560656dbf6e5b867ad06a52c0b370511893ae817fe6")) + (992000, uint256S("0x0000000844f0b8293c8e63723582afc43af5400a3b0e0a6ea5de55d3c06a9224")) + (993000, uint256S("0x00000001e3cdb499844beb0253ed5950600226d871ddabf5f68a7f30f2188f76")) + (994000, uint256S("0x000000036830f331b19c825421c450dd41583981dcebca382e6ae43a642eec97")) + (995000, uint256S("0x0000000325c5d78ac4b9239ef04543a27c40d046bfb480df953647f11a728e21")) + (996000, uint256S("0x00000002813dd7f47bfa60fa6446b6cd77ac997556e6c2149d75f40ab2c7ad88")) + (997000, uint256S("0x000000052bc685e1ba66049fe51eccdf09094c2caf475eae0260e5aefb888281")) + (998000, uint256S("0x0000000000499a48e5cf027ece31a73326c4cf3f643e88c168425203adc20455")) + (999000, uint256S("0x0000000612d67c808d279e1c40210b503885e50019401f9a6c1ff17990a8c91e")) + (1000000, uint256S("0x00000002e920ff85f57a164e0637d12147e95428b4da8ca2f0dde4192f5df829")) + (1001000, uint256S("0x00000002ef1ed514a63699b72166e137de121ad58c75dbdf777657f5fea1a469")) + (1002000, uint256S("0x0000000234a7551d7fb913c25d70fc6093e637472186561f6fba96126e56c452")) + (1003000, uint256S("0x00000001a8010508ac92adc26a3bf0e779f217b25a0671dc9f7c3234e4355ba6")) + (1004000, uint256S("0x00000005fca0ef6af799a8716b3e5452d64a05c515957cfee853eccb52d066dc")) + (1005000, uint256S("0x000000003f765af69818f8b00281c8922f9546baef2d67650f0ef24cdcfd663f")) + (1006000, uint256S("0x0000000009db83f88a0e31f440df2b017f5acf47d7df88ce0fa82cd6f81506be")) + (1007000, uint256S("0x0000000241d71ce1f52e530f422927c852af90e91796580067087ab80e74584e")) + (1008000, uint256S("0x000000009636e5afe7665220dc079ad496f59d92209c58e3cc36d4db229afd42")) + (1009000, uint256S("0x0000000244b9c61ca661a38afbaed439a5562fd684998b37ab5dc760fd45cf9c")) + (1010000, uint256S("0x00000005048d906875b212da70fbfec2ebb7ee750373d8db1a3d6bc05bc54427")) + (1011000, uint256S("0x0000000297aef0dd91ea4d0617ee3132b4351a0c7c9bfe79fa20d2916ca9bfb5")) + (1012000, uint256S("0x0000000139aa7546bc07065e0e35cb73598e3ce2092aa1d971387374d98535da")) + (1013000, uint256S("0x00000005f12a5b5e7bc651c04c7f70f0c88301742fe894349c37326eb4e31655")) + (1014000, uint256S("0x00000001a789daba42b1c2f15c17bcdcf01416deab7dda2019b895b260d23c28")) + (1015000, uint256S("0x0000000411d719a1bc2b74863b324cdc4c45523bf238e340d16fc8c4456cc3c0")) + (1016000, uint256S("0x0000000447247919dcb1eabeaa830a29572fc2b80c92bde2ffb4dc9d07907fa1")) + (1017000, uint256S("0x000000046fb653d015992c57a2aafcf129b175c6e7e8f936c0d0705c9fcbf3df")) + (1018000, uint256S("0x00000004d43fe6a7441432f5f6f7745a5707afe528116dc54a6cb60c790910af")) + (1019000, uint256S("0x000000038863f02f95dbe67341d1c8e688971188ab64a027f6518297aa41685b")) + (1020000, uint256S("0x0000000736d3a59ad8bf3c343a7c043bead1eb4dd645a0ed3cc220df542b90c4")) + (1021000, uint256S("0x0000000356d22e60db8fd41a86ca8e5040f2af0766ea04e64f5d1a04e9d2b675")) + (1022000, uint256S("0x00000003823597fd08074b2d6432c440ac2a4cef811463bba973785ab9827d81")) + (1023000, uint256S("0x00000002004e0dc6f4029eb5593e70e70b2544dce9bddcda8739945315317922")) + (1024000, uint256S("0x0000000344a757dfea3eb5dbf6f6d036f886049a1232613fd48b293136705e0b")) + (1025000, uint256S("0x0000000027123b99a92b669dd0dfec10774806a021247d0bd57931bbed22f43d")) + (1026000, uint256S("0x000000032408ce350b1b345c4967e2639dccc77f4a1c7edd5e1e4e523733e025")) + (1027000, uint256S("0x0000000334486767dfafe2e1f90c63dd5de91bc129a7782878c4ecfcdde2d98e")) + (1028000, uint256S("0x00000002e5f0ab865aec0903a17debda315d318b467e79a04cae85618d74dde1")) + (1029000, uint256S("0x00000000fad3fadc2f8a5d00d8cd1e515ac1682dd171f7f822e6d4c7b34ba82d")) + (1030000, uint256S("0x00000001b00617506de39d33787569c95287b4d0a3371c56bc8b5e6a4f0e8c08")) + (1031000, uint256S("0x000000034a1f1bc2b2c8b3e208c2c30c38d2630d01caa21c38d1a5fb95ab0a0a")) + (1032000, uint256S("0x0000000195b52cc662fc3f7696fdcdcc524482bd4fed5002cfec03b522538dab")) + (1033000, uint256S("0x00000002359b267356ce02cd33593c7ccb80a7896982d51ae231da46d6866f01")) + (1034000, uint256S("0x0000000398eace8d23f033542a110a933520323de064be8f5b657cf4d6ac136b")) + (1035000, uint256S("0x0000000419b31e382cbd5a592dec4deb830f8133441cc82c2e444ff5819f0dc5")) + (1036000, uint256S("0x00000000c23d9d18e0767f977848a09813267781ba20861bec4b76b1d15a20db")) + (1037000, uint256S("0x00000007cccc9735c16959ee3d027077f2182ed1f4c16ddf47c5b2c5faeea0a9")) + (1038000, uint256S("0x000000056f554ff1bd5c2aa8cc7f5df055efd5500e514308314f0041257f4e60")) + (1039000, uint256S("0x0000000307fa4fe2c2676d68b4cb2548b3e2a3781df345aec1dbdf81fba1994b")) + (1040000, uint256S("0x00000002614fdf2700e084baadb82b6fc7bbf26a3c79c90641be4285cc03af78")) + (1041000, uint256S("0x00000007b3da5130af7ff6a7fa1245954d0092f6114ad19969d5d4daaef6c254")) + (1042000, uint256S("0x000000052ae6c8fea95051b95e7c74264cd627e3fac1d330bdc4847a4523df8f")) + (1043000, uint256S("0x000000032e59e2d4c0bb0f2d7f1c90bd2371d285c9374b4241bd57552f44ab0f")) + (1044000, uint256S("0x000000025b57cc68235a682cfc0f41789af12ecec2f0565edcf7838d2e1fdd7f")) + (1045000, uint256S("0x0000000139b009a949e556b50dcad7284e93aeb5755f9ded12ffe70444fceb39")) + (1046000, uint256S("0x0000000269288d0901870b3caa89018c9acb52b70f856009ff11158cb22c2832")) + (1047000, uint256S("0x00000004e4659c1b1af57087e56c92c29253480aa0be0bb4261a515773770de1")) + (1048000, uint256S("0x000000026e0696b27b2f8a1dbbbb663ecb994bf24753a5c279061dae8e0bf479")) + (1049000, uint256S("0x00000005862ead8de28385ea0970950130f82d775eab61705337b0adc5360c3f")) + (1050000, uint256S("0x00000007d2415d1422b2d69cc7be152720ed7b53730759019cfe90cc3ddb7365")) + (1051000, uint256S("0x00000001422a302d8b23e26a50d86b5cdbf61690f94af2710cb5d0ddd8e0af81")) + (1052000, uint256S("0x000000038d913635fbf6dfe4799a828b1520d2e29f4cde863a70f37c59fcbd3b")) + (1053000, uint256S("0x000000009c4f02597cb047c36d361e0fb77283f07bcd0bcb86fbbf6571892b3d")) + (1054000, uint256S("0x0000000780b6835844313311bc0ac91a9eb7d20dfe51266cddd7cce735552dd3")) + (1055000, uint256S("0x0000000659c01a5b3d7a1e1b33900c3527d900992a32269665c85e110769bae9")) + (1056000, uint256S("0x000000039f3f23dca824a90cbf6f2b1ac8ec8dfaa608d0bd212a5a657971ca2f")) + (1057000, uint256S("0x00000008840c70a3409e26819af871ce1bc2deaccd67f466830338e643732bbb")) + (1058000, uint256S("0x00000007df387a1596a278c3afce173437d10bbf8bfc1d65703c108051ccb8af")) + (1059000, uint256S("0x00000000bed5fc529d8e7578e09eeb982116f5dfe58ead782d6e4c6cf662f493")) + (1060000, uint256S("0x00000002135251aca1227134c34022b7400b8e5499143976fb290fc222c24663")) + (1061000, uint256S("0x00000001c9e002f08d86cf64e57a6bb4673745f2b8d2e937eea57430761955e8")) + (1062000, uint256S("0x00000002e95603528c26aefe6bbb76bb17d0b791f728310b4d3edd954b3d3325")) + (1063000, uint256S("0x000000067e2ffc24c9def026253dee09ef9217352924acb54faaeb8a46d88f0a")) + (1064000, uint256S("0x000000071e23fbe757e04f5b006c6d5e1e5682996d1eb4fb4611ebd064dd12ea")) + (1065000, uint256S("0x000000044f99fe07c4f06fb7da5ab33fb909e2e19104b4fe7831a1f4a7862966")) + (1066000, uint256S("0x00000001dea7668d9cb68470de451777f7ef4415251e77243760fe4bdeb75feb")) + (1067000, uint256S("0x000000040f9a4298cb9a303af92034b6e264a9f3ef939b48aac112d92700194c")) + (1068000, uint256S("0x000000031cf16353f1a15bf1cf0e8b75286ead82f110fdd00b7cef5b7973c684")) + (1069000, uint256S("0x00000001791735171e9cc623b0b66552de25808340907763c9c30934eaf927d4")) + (1070000, uint256S("0x000000044fdfb0a7eef30a2d582e2132833af92f15e9f64fef1daa73c3051bbc")) + (1071000, uint256S("0x00000005066bd8de3b90972861ec83225daca234b62cba386b615a2a20623c00")) + (1072000, uint256S("0x0000000470c89f0db6a224c14d171201a229d1a2aeb16519a513b965c1cb87dd")) + (1073000, uint256S("0x0000000581331131dc1ce222ec38e8415e7ea6a60b3b92beee8742b9863fa394")) + (1074000, uint256S("0x00000000099ef084c8b0fd97f5c620026bde4a19ce7576a4f5b05e428569c516")) + (1075000, uint256S("0x000000065a3c4f4e027e1ecc81fc5c57f489270ccf4a0283e1280469e598efee")) + (1076000, uint256S("0x000000029d923c0d279ac6b8e5f1a327191beab0f40fa41e762c3603a66bc31f")) + (1077000, uint256S("0x000000004f7bcc5b2e441025d570bd7c9f25d31eda4363357153782e4c407bc7")) + (1078000, uint256S("0x00000000201660f24e1c10c7a022bc684833e2e8e03b88d78d5f68e340e008c4")) + (1079000, uint256S("0x000000035e334ec68e40d27ed75e36fcb4c061f0ec69d8b9bc85f8227dbbbc0f")) + (1080000, uint256S("0x0000000480ee77b800ce36773a8c451ba66e702dec0628bdd6725f9a1f88a060")) + (1081000, uint256S("0x000000031f6d1a8dfd0d7700e1470908d9fc7c12624bda4183be79387efcd971")) + (1082000, uint256S("0x00000006267f4a8236efadafba755f8149206d8e531ebb36dd99e5f2f09797d7")) + (1083000, uint256S("0x000000017de5a4b6fa23df969646f07dc165f3adbff7fd9ebac34d739c42a8bf")) + (1084000, uint256S("0x00000004af141f9a5bc2d838d4f8624e1503c7e8d3048924dd850299ea65c360")) + (1085000, uint256S("0x00000003e9ed1a3e3593e19554280c5aa789e2182a42243e9f7bb63bd08ef4d7")) + (1086000, uint256S("0x000000069c32b803dca7ce354f422735c4b1995c43266de5bf288399e0f70324")) + (1087000, uint256S("0x000000027a91bb3d167380a39dc55ad2f8df57d95d08936407b2b1f257b91df6")) + ,(int64_t) 1663567436, // time of last checkpointed block + (int64_t) 1788273, // total txs + (double) 3139 // txs in the last day before block 1087529 + }; + // END HUSH mainnet checkpoint data } else { checkpointData = //(Checkpoints::CCheckpointData) { From 6845ec2087ce6dbfe411ab84e6513b68ce7b27d8 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 19 Sep 2022 13:32:41 -0400 Subject: [PATCH 125/295] Even more details about checkpoints --- doc/release-process.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/doc/release-process.md b/doc/release-process.md index 7f57e3ad8..b1176508f 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -68,12 +68,18 @@ Install deps on Linux: - PROTIP: Man page creation must be done after updating the version number and recompiling and before Debian package creation - Update checkpoints in src/chainparams.cpp via util/checkpoints.pl - hushd must be running to run this script, since it uses hush-cli to get the data - - Run `./util/checkpoints.pl &> checkpoints.txt` to generate the latets checkpoint data + - Look for line which says "END HUSH mainnet checkpoint data" near line 560 in chainparams.cpp , that is where checkpoint data ends + - Find the highest block height of data, let's call it HEIGHT + - Run `./util/checkpoints.pl 1000 HEIGHT &> checkpoints.txt` to generate the latest checkpoint data + - To copy the new data from checkpoints.txt into the file, one way in Vim is to type ":r checkpoints.txt" which will read in a file and paste it as the current cursor + - You will see 3 lines of "stats" at the end of the output, you just pasted in the newest stats. Delete the old stats that should be the 3 lines under the current stats + - The script generates a comment "Generated at ...", that should be moved to the very beginning of the checkpoint data + - Make sure the new code compiles, commit and push + - Run `./util/checkpoints.pl help` to see some basic help - By default it will generate checkpoints for every 1000 blocks, the "stride" - You can get a different "stride" by passing it in as the first arg to the script - To get checkpoint data for every 5000 blocks: `./util/checkpoints.pl 5000 &> checkpoints.txt` - Currently checkpoints from before block 340k are given for every 5k blocks to keep the data smaller - - Look for line which says "HUSH mainnet checkpoint data" near line 560 in chainparams.cpp , that is where checkpoint data begins. - checkpoints.pl will just generate the data you need, it must be manually copied into the correct place - Checkpoints are a list of block heights and block hashes that tell a full node the correct block history of the blockchain - Checkpoints make block verification a bit faster, because nodes can say "is this block a descendant of a checkpoint block?" instead of doing full consensus checks, which take more time From da5bd906af9dcf98750603747c844cd9062b3140 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 19 Sep 2022 13:54:20 -0700 Subject: [PATCH 126/295] Add a windows batch file for hush-smart-chain It would be nice to pass along all CLI params, not just the first 9, since we may need more than that. We should also add copyright lines. --- src/hush-smart-chain.bat | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/hush-smart-chain.bat diff --git a/src/hush-smart-chain.bat b/src/hush-smart-chain.bat new file mode 100644 index 000000000..dcbc64ebb --- /dev/null +++ b/src/hush-smart-chain.bat @@ -0,0 +1,7 @@ +@call :GET_CURRENT_DIR +@cd %THIS_DIR% +hushd %1 %2 %3 %4 %5 %6 %7 %8 %9 +@goto :EOF + +:GET_CURRENT_DIR +@pushd %~dp0 From bd8ebb6a1c8bef6c5a1a1759a8ad209d4294154a Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 19 Sep 2022 13:56:46 -0700 Subject: [PATCH 127/295] Pass along all CLI params, not just the first 9 --- src/hush-smart-chain.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hush-smart-chain.bat b/src/hush-smart-chain.bat index dcbc64ebb..303b08eeb 100644 --- a/src/hush-smart-chain.bat +++ b/src/hush-smart-chain.bat @@ -1,6 +1,6 @@ @call :GET_CURRENT_DIR @cd %THIS_DIR% -hushd %1 %2 %3 %4 %5 %6 %7 %8 %9 +hushd %* @goto :EOF :GET_CURRENT_DIR From c1286c4140293ce2c07827dedc7eb346cce1a00a Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 19 Sep 2022 13:58:21 -0700 Subject: [PATCH 128/295] Add copyright lines to HSC batch file --- src/hush-smart-chain.bat | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hush-smart-chain.bat b/src/hush-smart-chain.bat index 303b08eeb..3499da74f 100644 --- a/src/hush-smart-chain.bat +++ b/src/hush-smart-chain.bat @@ -1,3 +1,6 @@ +:: Copyright (c) 2016-2022 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 @call :GET_CURRENT_DIR @cd %THIS_DIR% hushd %* From f6457a7ce5898a58e4c8be3f6f0c0eb5a3d14fa4 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 19 Sep 2022 13:59:16 -0700 Subject: [PATCH 129/295] Clarify a confusing comment --- src/hush-smart-chain | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hush-smart-chain b/src/hush-smart-chain index 2a33f0ba0..ae6a56a27 100755 --- a/src/hush-smart-chain +++ b/src/hush-smart-chain @@ -9,6 +9,7 @@ cd $DIR DEFAULTS="" -# People should just use hushd going forward +# People can just use hushd going forward, but this script makes it +# more clear what is going on HUSH="./hushd" $HUSH $DEFAULTS "$@" From 2de20daa66871b7265e71f4a43f56b088c14dcc5 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 19 Sep 2022 15:13:47 -0700 Subject: [PATCH 130/295] Document z_sendmany 'z' ... --- src/wallet/rpcwallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index a09f33e79..b2fb8ab14 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4859,7 +4859,7 @@ UniValue z_sendmany(const UniValue& params, bool fHelp, const CPubKey& mypk) "\nWhen sending coinbase UTXOs to a zaddr, change is not allowed. The entire value of the UTXO(s) must be consumed." + HelpRequiringPassphrase() + "\n" "\nArguments:\n" - "1. \"fromaddress\" (string, required) The taddr or zaddr to send the funds from.\n" + "1. \"fromaddress\" (string, required) The taddr or zaddr to send the funds from. Use 'z' to spend from any zaddr.\n" "2. \"amounts\" (array, required) An array of json objects representing the amounts to send.\n" " [{\n" " \"address\":address (string, required) The address is a taddr or zaddr\n" From 5d2307a709a89f9683bb3bbbf7bb3d4d056b6083 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 19 Sep 2022 15:45:30 -0700 Subject: [PATCH 131/295] Update copyrights to 2022 --- Dockerfile | 2 +- Makefile.am | 2 +- autogen.sh | 2 +- contrib/block_time.pl | 2 +- contrib/fresh_clone_compile_and_run.sh | 2 +- contrib/hush_halvings | 2 +- contrib/hush_scanner | 2 +- contrib/hush_supply | 2 +- contrib/verify-commits/gpg.sh | 2 +- contrib/verify-commits/pre-push-hook.sh | 2 +- contrib/verify-commits/verify-commits.sh | 2 +- depends/funcs.mk | 2 +- doc/man/hush-cli.1 | 2 +- doc/man/hush-tx.1 | 2 +- doc/man/hushd.1 | 2 +- migratecoin.sh | 2 +- qa/hush/create_benchmark_archive.py | 2 +- qa/hush/create_wallet_200k_utxos.py | 2 +- qa/hush/full-test-suite.sh | 2 +- qa/hush/full_test_suite.py | 2 +- qa/pull-tester/rpc-tests.sh | 2 +- qa/pull-tester/run-bitcoin-cli | 2 +- qa/pull-tester/run-bitcoind-for-test.sh.in | 2 +- qa/pull-tester/tests-config.sh.in | 2 +- qa/rpc-tests/ac_private.py | 2 +- qa/rpc-tests/addressindex.py | 2 +- qa/rpc-tests/bip65-cltv-p2p.py | 2 +- qa/rpc-tests/bipdersig-p2p.py | 2 +- qa/rpc-tests/blockchain.py | 2 +- qa/rpc-tests/cryptoconditions.py | 2 +- qa/rpc-tests/cryptoconditions_channels.py | 2 +- qa/rpc-tests/cryptoconditions_dice.py | 2 +- qa/rpc-tests/cryptoconditions_faucet.py | 2 +- qa/rpc-tests/cryptoconditions_gateways.py | 2 +- qa/rpc-tests/cryptoconditions_heir.py | 2 +- qa/rpc-tests/cryptoconditions_oracles.py | 2 +- qa/rpc-tests/cryptoconditions_rewards.py | 2 +- qa/rpc-tests/cryptoconditions_token.py | 2 +- qa/rpc-tests/decodescript.py | 2 +- qa/rpc-tests/disablewallet.py | 2 +- qa/rpc-tests/dpowconfs.py | 2 +- qa/rpc-tests/feature_walletfile.py | 2 +- qa/rpc-tests/finalsaplingroot.py | 2 +- qa/rpc-tests/forknotify.py | 2 +- qa/rpc-tests/fundrawtransaction.py | 2 +- qa/rpc-tests/getblocktemplate.py | 2 +- qa/rpc-tests/getblocktemplate_longpoll.py | 2 +- qa/rpc-tests/getblocktemplate_proposals.py | 2 +- qa/rpc-tests/getchaintips.py | 2 +- qa/rpc-tests/hardforkdetection.py | 2 +- qa/rpc-tests/httpbasics.py | 2 +- qa/rpc-tests/invalidateblock.py | 2 +- qa/rpc-tests/invalidblockrequest.py | 2 +- qa/rpc-tests/ivk_import_export.py | 2 +- qa/rpc-tests/key_import_export.py | 2 +- qa/rpc-tests/keypool.py | 2 +- qa/rpc-tests/listtransactions.py | 2 +- qa/rpc-tests/maxblocksinflight.py | 2 +- qa/rpc-tests/mempool_nu_activation.py | 2 +- qa/rpc-tests/mempool_reorg.py | 2 +- qa/rpc-tests/mempool_resurrect_test.py | 2 +- qa/rpc-tests/mempool_spendcoinbase.py | 2 +- qa/rpc-tests/mempool_tx_expiry.py | 2 +- qa/rpc-tests/mempool_tx_input_limit.py | 2 +- qa/rpc-tests/merkle_blocks.py | 2 +- qa/rpc-tests/nodehandling.py | 2 +- qa/rpc-tests/nspv_client_test.py | 2 +- qa/rpc-tests/p2p-acceptblock.py | 2 +- qa/rpc-tests/p2p_node_bloom.py | 2 +- qa/rpc-tests/p2p_txexpiry_dos.py | 2 +- qa/rpc-tests/prioritisetransaction.py | 2 +- qa/rpc-tests/proxy_test.py | 2 +- qa/rpc-tests/pruning.py | 2 +- qa/rpc-tests/rawtransactions.py | 2 +- qa/rpc-tests/receivedby.py | 2 +- qa/rpc-tests/regtest_signrawtransaction.py | 2 +- qa/rpc-tests/reindex.py | 2 +- qa/rpc-tests/rest.py | 2 +- qa/rpc-tests/rewind_index.py | 2 +- qa/rpc-tests/rpcbind_test.py | 2 +- qa/rpc-tests/script_test.py | 2 +- qa/rpc-tests/signrawtransaction_offline.py | 2 +- qa/rpc-tests/signrawtransactions.py | 2 +- qa/rpc-tests/smartfees.py | 2 +- qa/rpc-tests/spentindex.py | 2 +- qa/rpc-tests/test_framework/authproxy.py | 2 +- qa/rpc-tests/test_framework/bignum.py | 2 +- qa/rpc-tests/test_framework/blockstore.py | 2 +- qa/rpc-tests/test_framework/blocktools.py | 2 +- qa/rpc-tests/test_framework/comptool.py | 2 +- qa/rpc-tests/test_framework/equihash.py | 2 +- qa/rpc-tests/test_framework/mininode.py | 2 +- qa/rpc-tests/test_framework/netutil.py | 2 +- qa/rpc-tests/test_framework/script.py | 2 +- qa/rpc-tests/test_framework/socks5.py | 2 +- qa/rpc-tests/test_framework/test_framework.py | 2 +- qa/rpc-tests/timestampindex.py | 2 +- qa/rpc-tests/txindex.py | 2 +- qa/rpc-tests/txn_doublespend.py | 2 +- qa/rpc-tests/wallet.py | 2 +- qa/rpc-tests/wallet_1941.py | 2 +- qa/rpc-tests/wallet_addresses.py | 2 +- qa/rpc-tests/wallet_anchorfork.py | 2 +- qa/rpc-tests/wallet_changeindicator.py | 2 +- qa/rpc-tests/wallet_import_export.py | 2 +- qa/rpc-tests/wallet_listnotes.py | 2 +- qa/rpc-tests/wallet_listreceived.py | 2 +- qa/rpc-tests/wallet_mergetoaddress.py | 2 +- qa/rpc-tests/wallet_nullifiers.py | 2 +- qa/rpc-tests/wallet_overwintertx.py | 2 +- qa/rpc-tests/wallet_persistence.py | 2 +- qa/rpc-tests/wallet_protectcoinbase.py | 2 +- qa/rpc-tests/wallet_sapling.py | 2 +- qa/rpc-tests/wallet_shieldcoinbase.py | 2 +- qa/rpc-tests/wallet_shieldcoinbase_sapling.py | 2 +- qa/rpc-tests/wallet_treestate.py | 2 +- qa/rpc-tests/walletbackup.py | 2 +- qa/rpc-tests/zapwallettxes.py | 2 +- qa/rpc-tests/zkey_import_export.py | 2 +- src/Makefile.am | 2 +- src/Makefile.gtest.include | 2 +- src/Makefile.test-hush.include | 2 +- src/addressindex.h | 2 +- src/addrman.cpp | 2 +- src/addrman.h | 2 +- src/alert.cpp | 2 +- src/alert.h | 2 +- src/alertkeys.h | 2 +- src/amount.cpp | 2 +- src/amount.h | 2 +- src/arith_uint256.cpp | 2 +- src/arith_uint256.h | 2 +- src/assetchains_stop | 2 +- src/asyncrpcoperation.cpp | 2 +- src/asyncrpcoperation.h | 2 +- src/asyncrpcqueue.cpp | 2 +- src/asyncrpcqueue.h | 2 +- src/base58.cpp | 2 +- src/bech32.cpp | 2 +- src/bech32.h | 2 +- src/bitcoin-cli.cpp | 2 +- src/bitcoind.cpp | 2 +- src/bloom.cpp | 2 +- src/cc/CCGateways.h | 2 +- src/cc/CCHeir.h | 2 +- src/cc/CCImportGateway.h | 2 +- src/cc/CCMarmara.h | 2 +- src/cc/CCOracles.h | 2 +- src/cc/CCPayments.h | 2 +- src/cc/CCPegs.h | 2 +- src/cc/CCPrices.h | 2 +- src/cc/CC_made_easy.md | 2 +- src/cc/CCassets.h | 2 +- src/cc/CCassetsCore.cpp | 2 +- src/cc/CCassetstx.cpp | 2 +- src/cc/CCauction.h | 2 +- src/cc/CCchannels.h | 2 +- src/cc/CCcustom.cpp | 2 +- src/cc/CCdice.h | 2 +- src/cc/CCfaucet.h | 2 +- src/cc/CCfsm.h | 2 +- src/cc/CCinclude.h | 2 +- src/cc/CClotto.h | 2 +- src/cc/CCrewards.h | 2 +- src/cc/CCtokens.cpp | 2 +- src/cc/CCtokens.h | 2 +- src/cc/CCtokenutils.cpp | 2 +- src/cc/CCtx.cpp | 2 +- src/cc/CCutilbits.cpp | 2 +- src/cc/CCutils.cpp | 2 +- src/cc/assets.cpp | 2 +- src/cc/auction.cpp | 2 +- src/cc/betprotocol.cpp | 2 +- src/cc/betprotocol.h | 2 +- src/cc/cclib.cpp | 2 +- src/cc/channels.cpp | 2 +- src/cc/crypto777/OS_portable.h | 2 +- src/cc/customcc.cpp | 2 +- src/cc/customcc.h | 2 +- src/cc/dapps/Makefile | 2 +- src/cc/dapps/cJSON.c | 2 +- src/cc/dapps/dappinc.h | 2 +- src/cc/dapps/dappstd.c | 2 +- src/cc/dapps/hushdex.c | 2 +- src/cc/dapps/zmigrate.c | 2 +- src/cc/dice.cpp | 2 +- src/cc/dilithium.c | 2 +- src/cc/dilithium.h | 2 +- src/cc/disputepayout.cpp | 2 +- src/cc/eval.cpp | 2 +- src/cc/eval.h | 2 +- src/cc/faucet.cpp | 2 +- src/cc/fsm.cpp | 2 +- src/cc/games/prices.c | 2 +- src/cc/games/prices.cpp | 2 +- src/cc/games/prices.h | 2 +- src/cc/games/tetris.c | 2 +- src/cc/games/tetris.h | 2 +- src/cc/gamescc.cpp | 2 +- src/cc/gamescc.h | 2 +- src/cc/gateways.cpp | 2 +- src/cc/heir.cpp | 2 +- src/cc/heir_validate.h | 2 +- src/cc/import.cpp | 2 +- src/cc/importgateway.cpp | 2 +- src/cc/importpayout.cpp | 2 +- src/cc/includes/cJSON.h | 2 +- src/cc/includes/curve25519.h | 2 +- src/cc/includes/libgfshare.h | 2 +- src/cc/includes/tweetnacl.h | 2 +- src/cc/includes/uthash.h | 2 +- src/cc/includes/utlist.h | 2 +- src/cc/lotto.cpp | 2 +- src/cc/makecclib | 2 +- src/cc/makerogue | 2 +- src/cc/musig.cpp | 2 +- src/cc/oracles.cpp | 2 +- src/cc/payments.cpp | 2 +- src/cc/pegs.cpp | 2 +- src/cc/prices.cpp | 2 +- src/cc/rewards.cpp | 2 +- src/cc/rogue/Makefile.in | 2 +- src/cc/rogue/armor.c | 2 +- src/cc/rogue/chase.c | 2 +- src/cc/rogue/command.c | 2 +- src/cc/rogue/cursesd.c | 2 +- src/cc/rogue/cursesd.h | 2 +- src/cc/rogue/daemon.c | 2 +- src/cc/rogue/daemons.c | 2 +- src/cc/rogue/extern.c | 2 +- src/cc/rogue/extern.h | 2 +- src/cc/rogue/fight.c | 2 +- src/cc/rogue/init.c | 2 +- src/cc/rogue/io.c | 2 +- src/cc/rogue/list.c | 2 +- src/cc/rogue/mach_dep.c | 2 +- src/cc/rogue/main.c | 2 +- src/cc/rogue/mdport.c | 2 +- src/cc/rogue/misc.c | 2 +- src/cc/rogue/monsters.c | 2 +- src/cc/rogue/move.c | 2 +- src/cc/rogue/new_level.c | 2 +- src/cc/rogue/options.c | 2 +- src/cc/rogue/pack.c | 2 +- src/cc/rogue/passages.c | 2 +- src/cc/rogue/potions.c | 2 +- src/cc/rogue/rings.c | 2 +- src/cc/rogue/rip.c | 2 +- src/cc/rogue/rogue.c | 2 +- src/cc/rogue/rogue.h | 2 +- src/cc/rogue/rogue_player.h | 2 +- src/cc/rogue/rooms.c | 2 +- src/cc/rogue/save.c | 2 +- src/cc/rogue/score.h | 2 +- src/cc/rogue/scrolls.c | 2 +- src/cc/rogue/state.c | 2 +- src/cc/rogue/sticks.c | 2 +- src/cc/rogue/things.c | 2 +- src/cc/rogue/vers.c | 2 +- src/cc/rogue/weapons.c | 2 +- src/cc/rogue/wizard.c | 2 +- src/cc/rogue/xcrypt.c | 2 +- src/cc/rogue_rpc.cpp | 2 +- src/cc/sudoku.cpp | 2 +- src/cc/utils.h | 2 +- src/chain.cpp | 2 +- src/chain.h | 2 +- src/chainparams.cpp | 2 +- src/chainparams.h | 2 +- src/chainparamsbase.cpp | 2 +- src/checkpoints.cpp | 2 +- src/checkpoints.h | 2 +- src/checkqueue.h | 2 +- src/clientversion.cpp | 2 +- src/clientversion.h | 2 +- src/coincontrol.h | 2 +- src/coins.cpp | 2 +- src/coins.h | 2 +- src/compressor.cpp | 2 +- src/consensus/params.h | 2 +- src/consensus/upgrades.cpp | 2 +- src/core_memusage.h | 2 +- src/core_read.cpp | 2 +- src/core_write.cpp | 2 +- src/crosschain.cpp | 2 +- src/crosschain.h | 2 +- src/crosschain_authority.cpp | 2 +- src/crypto/common.h | 2 +- src/crypto/equihash.h | 2 +- src/cryptoconditions/AUTHORS | 2 +- src/cryptoconditions/src/anon.c | 2 +- src/cryptoconditions/src/asn/BIT_STRING.c | 2 +- src/cryptoconditions/src/asn/BIT_STRING.h | 2 +- src/cryptoconditions/src/asn/CompoundSha256Condition.c | 2 +- src/cryptoconditions/src/asn/CompoundSha256Condition.h | 2 +- src/cryptoconditions/src/asn/Condition.c | 2 +- src/cryptoconditions/src/asn/Condition.h | 2 +- src/cryptoconditions/src/asn/ConditionTypes.c | 2 +- src/cryptoconditions/src/asn/ConditionTypes.h | 2 +- src/cryptoconditions/src/asn/Ed25519FingerprintContents.c | 2 +- src/cryptoconditions/src/asn/Ed25519FingerprintContents.h | 2 +- src/cryptoconditions/src/asn/Ed25519Sha512Fulfillment.c | 2 +- src/cryptoconditions/src/asn/Ed25519Sha512Fulfillment.h | 2 +- src/cryptoconditions/src/asn/EvalFulfillment.c | 2 +- src/cryptoconditions/src/asn/EvalFulfillment.h | 2 +- src/cryptoconditions/src/asn/Fulfillment.c | 2 +- src/cryptoconditions/src/asn/Fulfillment.h | 2 +- src/cryptoconditions/src/asn/INTEGER.c | 2 +- src/cryptoconditions/src/asn/INTEGER.h | 2 +- src/cryptoconditions/src/asn/NativeEnumerated.c | 2 +- src/cryptoconditions/src/asn/NativeEnumerated.h | 2 +- src/cryptoconditions/src/asn/NativeInteger.c | 2 +- src/cryptoconditions/src/asn/NativeInteger.h | 2 +- src/cryptoconditions/src/asn/OCTET_STRING.c | 2 +- src/cryptoconditions/src/asn/OCTET_STRING.h | 2 +- src/cryptoconditions/src/asn/PrefixFingerprintContents.c | 2 +- src/cryptoconditions/src/asn/PrefixFingerprintContents.h | 2 +- src/cryptoconditions/src/asn/PrefixFulfillment.c | 2 +- src/cryptoconditions/src/asn/PrefixFulfillment.h | 2 +- src/cryptoconditions/src/asn/PreimageFulfillment.c | 2 +- src/cryptoconditions/src/asn/PreimageFulfillment.h | 2 +- src/cryptoconditions/src/asn/RsaFingerprintContents.c | 2 +- src/cryptoconditions/src/asn/RsaFingerprintContents.h | 2 +- src/cryptoconditions/src/asn/RsaSha256Fulfillment.c | 2 +- src/cryptoconditions/src/asn/RsaSha256Fulfillment.h | 2 +- src/cryptoconditions/src/asn/Secp256k1FingerprintContents.c | 2 +- src/cryptoconditions/src/asn/Secp256k1FingerprintContents.h | 2 +- src/cryptoconditions/src/asn/Secp256k1Fulfillment.c | 2 +- src/cryptoconditions/src/asn/Secp256k1Fulfillment.h | 2 +- src/cryptoconditions/src/asn/SimpleSha256Condition.c | 2 +- src/cryptoconditions/src/asn/SimpleSha256Condition.h | 2 +- src/cryptoconditions/src/asn/ThresholdFingerprintContents.c | 2 +- src/cryptoconditions/src/asn/ThresholdFingerprintContents.h | 2 +- src/cryptoconditions/src/asn/ThresholdFulfillment.c | 2 +- src/cryptoconditions/src/asn/ThresholdFulfillment.h | 2 +- src/cryptoconditions/src/asn/asn_SET_OF.c | 2 +- src/cryptoconditions/src/asn/asn_SET_OF.h | 2 +- src/cryptoconditions/src/asn/asn_application.h | 2 +- src/cryptoconditions/src/asn/asn_codecs.h | 2 +- src/cryptoconditions/src/asn/asn_codecs_prim.c | 2 +- src/cryptoconditions/src/asn/asn_codecs_prim.h | 2 +- src/cryptoconditions/src/asn/asn_internal.h | 2 +- src/cryptoconditions/src/asn/asn_system.h | 2 +- src/cryptoconditions/src/asn/ber_decoder.c | 2 +- src/cryptoconditions/src/asn/ber_decoder.h | 2 +- src/cryptoconditions/src/asn/ber_tlv_length.c | 2 +- src/cryptoconditions/src/asn/ber_tlv_length.h | 2 +- src/cryptoconditions/src/asn/ber_tlv_tag.c | 2 +- src/cryptoconditions/src/asn/ber_tlv_tag.h | 2 +- src/cryptoconditions/src/asn/constr_CHOICE.c | 2 +- src/cryptoconditions/src/asn/constr_CHOICE.h | 2 +- src/cryptoconditions/src/asn/constr_SEQUENCE.c | 2 +- src/cryptoconditions/src/asn/constr_SEQUENCE.h | 2 +- src/cryptoconditions/src/asn/constr_SET_OF.c | 2 +- src/cryptoconditions/src/asn/constr_SET_OF.h | 2 +- src/cryptoconditions/src/asn/constr_TYPE.c | 2 +- src/cryptoconditions/src/asn/constr_TYPE.h | 2 +- src/cryptoconditions/src/asn/constraints.c | 2 +- src/cryptoconditions/src/asn/constraints.h | 2 +- src/cryptoconditions/src/asn/der_encoder.c | 2 +- src/cryptoconditions/src/asn/der_encoder.h | 2 +- src/cryptoconditions/src/asn/per_decoder.c | 2 +- src/cryptoconditions/src/asn/per_decoder.h | 2 +- src/cryptoconditions/src/asn/per_encoder.c | 2 +- src/cryptoconditions/src/asn/per_encoder.h | 2 +- src/cryptoconditions/src/asn/per_opentype.c | 2 +- src/cryptoconditions/src/asn/per_opentype.h | 2 +- src/cryptoconditions/src/asn/per_support.c | 2 +- src/cryptoconditions/src/asn/per_support.h | 2 +- src/cryptoconditions/src/asn/xer_decoder.c | 2 +- src/cryptoconditions/src/asn/xer_decoder.h | 2 +- src/cryptoconditions/src/asn/xer_encoder.c | 2 +- src/cryptoconditions/src/asn/xer_encoder.h | 2 +- src/cryptoconditions/src/asn/xer_support.c | 2 +- src/cryptoconditions/src/asn/xer_support.h | 2 +- src/cryptoconditions/src/cryptoconditions.c | 2 +- src/cryptoconditions/src/ed25519.c | 2 +- src/cryptoconditions/src/eval.c | 2 +- src/cryptoconditions/src/include/cJSON.c | 2 +- src/cryptoconditions/src/include/cJSON.h | 2 +- src/cryptoconditions/src/include/libbase58.h | 2 +- src/cryptoconditions/src/include/sha256.c | 2 +- src/cryptoconditions/src/include/sha256.h | 2 +- src/cryptoconditions/src/include/tweetnacl.c | 2 +- src/cryptoconditions/src/include/tweetnacl.h | 2 +- src/cryptoconditions/src/internal.h | 2 +- src/cryptoconditions/src/json_rpc.c | 2 +- src/cryptoconditions/src/prefix.c | 2 +- src/cryptoconditions/src/preimage.c | 2 +- src/cryptoconditions/src/secp256k1.c | 2 +- src/cryptoconditions/src/threshold.c | 2 +- src/cryptoconditions/src/utils.c | 2 +- src/dbwrapper.cpp | 2 +- src/dbwrapper.h | 2 +- src/deprecation.cpp | 2 +- src/deprecation.h | 2 +- src/fs.cpp | 2 +- src/fs.h | 2 +- src/gtest/json_test_vectors.cpp | 2 +- src/gtest/json_test_vectors.h | 2 +- src/gtest/main.cpp | 2 +- src/gtest/test_block.cpp | 2 +- src/gtest/test_checkblock.cpp | 2 +- src/gtest/test_checktransaction.cpp | 2 +- src/gtest/test_deprecation.cpp | 2 +- src/gtest/test_equihash.cpp | 2 +- src/gtest/test_httprpc.cpp | 2 +- src/gtest/test_keys.cpp | 2 +- src/gtest/test_keystore.cpp | 2 +- src/gtest/test_libzcash_utils.cpp | 2 +- src/gtest/test_mempool.cpp | 2 +- src/gtest/test_merkletree.cpp | 2 +- src/gtest/test_metrics.cpp | 2 +- src/gtest/test_miner.cpp | 2 +- src/gtest/test_noteencryption.cpp | 2 +- src/gtest/test_pedersen_hash.cpp | 2 +- src/gtest/test_pow.cpp | 2 +- src/gtest/test_random.cpp | 2 +- src/gtest/test_rpc.cpp | 2 +- src/gtest/test_sapling_note.cpp | 2 +- src/gtest/test_tautology.cpp | 2 +- src/gtest/test_transaction_builder.cpp | 2 +- src/gtest/test_txid.cpp | 2 +- src/gtest/test_upgrades.cpp | 2 +- src/gtest/test_validation.cpp | 2 +- src/gtest/test_zip32.cpp | 2 +- src/gtest/utils.cpp | 2 +- src/hash.cpp | 2 +- src/hash.h | 2 +- src/httprpc.cpp | 2 +- src/httpserver.cpp | 2 +- src/httpserver.h | 2 +- src/hush-tx.cpp | 2 +- src/hush.h | 2 +- src/hush/tlsenums.h | 2 +- src/hush/tlsmanager.cpp | 2 +- src/hush/tlsmanager.h | 2 +- src/hush/utiltls.cpp | 2 +- src/hush/utiltls.h | 2 +- src/hush_bitcoind.h | 2 +- src/hush_cJSON.h | 2 +- src/hush_ccdata.h | 2 +- src/hush_curve25519.h | 2 +- src/hush_events.h | 2 +- src/hush_gateway.h | 2 +- src/hush_globals.h | 2 +- src/hush_kv.h | 2 +- src/hush_nSPV.h | 2 +- src/hush_nSPV_fullnode.h | 2 +- src/hush_nSPV_wallet.h | 2 +- src/hush_notary.h | 2 +- src/hush_pax.h | 2 +- src/hush_structs.h | 2 +- src/hush_utils.h | 2 +- src/importcoin.cpp | 2 +- src/importcoin.h | 2 +- src/init.cpp | 2 +- src/init.h | 2 +- src/key.cpp | 2 +- src/key.h | 2 +- src/key_io.cpp | 2 +- src/key_io.h | 2 +- src/keystore.cpp | 2 +- src/keystore.h | 2 +- src/main.cpp | 2 +- src/main.h | 2 +- src/merkleblock.cpp | 2 +- src/metrics.cpp | 2 +- src/metrics.h | 2 +- src/miner.h | 2 +- src/net.cpp | 2 +- src/net.h | 2 +- src/netbase.cpp | 2 +- src/notarizationdb.cpp | 2 +- src/notarizationdb.h | 2 +- src/noui.cpp | 2 +- src/pow.cpp | 2 +- src/pow.h | 2 +- src/pow/tromp/equi_miner.h | 2 +- src/pow/tromp/osx_barrier.h | 2 +- src/prevector.h | 2 +- src/primitives/block.cpp | 2 +- src/primitives/block.h | 2 +- src/primitives/transaction.cpp | 2 +- src/primitives/transaction.h | 2 +- src/protocol.cpp | 2 +- src/protocol.h | 2 +- src/pubkey.cpp | 2 +- src/pubkey.h | 2 +- src/purge | 2 +- src/random.cpp | 2 +- src/rest.cpp | 2 +- src/rpc/blockchain.cpp | 2 +- src/rpc/client.cpp | 2 +- src/rpc/crosschain.cpp | 2 +- src/rpc/mining.cpp | 2 +- src/rpc/net.cpp | 2 +- src/rpc/rawtransaction.cpp | 2 +- src/rpc/register.h | 2 +- src/rpc/server.cpp | 2 +- src/rpc/server.h | 2 +- src/scheduler.cpp | 2 +- src/script/interpreter.cpp | 2 +- src/script/standard.cpp | 2 +- src/script/standard.h | 2 +- src/sendalert.cpp | 4 ++-- src/smartchains | 2 +- src/support/allocators/secure.h | 2 +- src/support/allocators/zeroafterfree.h | 2 +- src/sync.cpp | 2 +- src/test-hush/main.cpp | 2 +- src/test-hush/test_addrman.cpp | 2 +- src/test-hush/test_coinimport.cpp | 2 +- src/test-hush/test_cryptoconditions.cpp | 2 +- src/test-hush/test_eval_bet.cpp | 2 +- src/test-hush/test_eval_notarization.cpp | 2 +- src/test-hush/test_netbase_tests.cpp | 2 +- src/test-hush/test_parse_notarization.cpp | 2 +- src/test-hush/testutils.cpp | 2 +- src/test-hush/testutils.h | 2 +- src/test/Checkpoints_tests.cpp | 2 +- src/test/DoS_tests.cpp | 2 +- src/test/accounting_tests.cpp | 2 +- src/test/addrman_tests.cpp | 2 +- src/test/allocator_tests.cpp | 2 +- src/test/arith_uint256_tests.cpp | 2 +- src/test/base32_tests.cpp | 2 +- src/test/base58_tests.cpp | 2 +- src/test/base64_tests.cpp | 2 +- src/test/bctest.py | 2 +- src/test/bech32_tests.cpp | 2 +- src/test/bip32_tests.cpp | 2 +- src/test/bitcoin-util-test.py | 2 +- src/test/bloom_tests.cpp | 2 +- src/test/checkblock_tests.cpp | 2 +- src/test/coins_tests.cpp | 2 +- src/test/compress_tests.cpp | 2 +- src/test/convertbits_tests.cpp | 2 +- src/test/crypto_tests.cpp | 2 +- src/test/dbwrapper_tests.cpp | 2 +- src/test/equihash_tests.cpp | 2 +- src/test/getarg_tests.cpp | 2 +- src/test/hash_tests.cpp | 2 +- src/test/key_tests.cpp | 2 +- src/test/main_tests.cpp | 2 +- src/test/mempool_tests.cpp | 2 +- src/test/miner_tests.cpp | 2 +- src/test/mruset_tests.cpp | 2 +- src/test/multisig_tests.cpp | 2 +- src/test/netbase_tests.cpp | 2 +- src/test/pmt_tests.cpp | 2 +- src/test/policyestimator_tests.cpp | 2 +- src/test/pow_tests.cpp | 2 +- src/test/prevector_tests.cpp | 2 +- src/test/raii_event_tests.cpp | 2 +- src/test/reverselock_tests.cpp | 2 +- src/test/rpc_tests.cpp | 2 +- src/test/rpc_wallet_tests.cpp | 2 +- src/test/sanity_tests.cpp | 2 +- src/test/scheduler_tests.cpp | 2 +- src/test/script_P2PKH_tests.cpp | 2 +- src/test/script_P2SH_tests.cpp | 2 +- src/test/script_tests.cpp | 2 +- src/test/scriptnum_tests.cpp | 2 +- src/test/serialize_tests.cpp | 2 +- src/test/sha256compress_tests.cpp | 2 +- src/test/sighash_tests.cpp | 2 +- src/test/sigopcount_tests.cpp | 2 +- src/test/skiplist_tests.cpp | 2 +- src/test/test_bitcoin.cpp | 2 +- src/test/test_bitcoin.h | 2 +- src/test/timedata_tests.cpp | 2 +- src/test/torcontrol_tests.cpp | 2 +- src/test/transaction_tests.cpp | 2 +- src/test/uint256_tests.cpp | 2 +- src/test/univalue_tests.cpp | 2 +- src/test/util_tests.cpp | 2 +- src/test/wallet-utility.py | 2 +- src/timedata.cpp | 2 +- src/timedata.h | 2 +- src/torcontrol.cpp | 2 +- src/torcontrol.h | 2 +- src/transaction_builder.cpp | 2 +- src/transaction_builder.h | 2 +- src/tush-cli | 2 +- src/tushd | 2 +- src/txdb.cpp | 2 +- src/txdb.h | 2 +- src/txmempool.cpp | 2 +- src/txmempool.h | 2 +- src/uint256.cpp | 2 +- src/util.cpp | 2 +- src/util.h | 2 +- src/utilmoneystr.cpp | 2 +- src/utilstrencodings.cpp | 2 +- src/utiltime.cpp | 2 +- src/validationinterface.cpp | 2 +- src/validationinterface.h | 2 +- src/version.h | 2 +- src/wallet-utility.cpp | 2 +- src/wallet/asyncrpcoperation_mergetoaddress.cpp | 2 +- src/wallet/asyncrpcoperation_mergetoaddress.h | 2 +- src/wallet/asyncrpcoperation_saplingconsolidation.cpp | 2 +- src/wallet/asyncrpcoperation_sendmany.cpp | 2 +- src/wallet/asyncrpcoperation_sendmany.h | 2 +- src/wallet/asyncrpcoperation_shieldcoinbase.cpp | 2 +- src/wallet/asyncrpcoperation_shieldcoinbase.h | 2 +- src/wallet/crypter.cpp | 2 +- src/wallet/crypter.h | 2 +- src/wallet/db.cpp | 2 +- src/wallet/gtest/test_transaction.cpp | 2 +- src/wallet/gtest/test_wallet.cpp | 2 +- src/wallet/gtest/test_wallet_zkeys.cpp | 2 +- src/wallet/rpcdump.cpp | 2 +- src/wallet/rpchushwallet.cpp | 2 +- src/wallet/rpcwallet.cpp | 2 +- src/wallet/test/wallet_tests.cpp | 2 +- src/wallet/wallet.cpp | 2 +- src/wallet/wallet.h | 2 +- src/wallet/walletdb.cpp | 2 +- src/zcash/Address.cpp | 2 +- src/zcash/Address.hpp | 2 +- src/zcash/IncrementalMerkleTree.cpp | 2 +- src/zcash/IncrementalMerkleTree.hpp | 2 +- src/zcash/JoinSplit.cpp | 2 +- src/zcash/JoinSplit.hpp | 2 +- src/zcash/Note.cpp | 2 +- src/zcash/Note.hpp | 2 +- src/zcash/NoteEncryption.cpp | 2 +- src/zcash/NoteEncryption.hpp | 2 +- src/zcash/Proof.cpp | 2 +- src/zcash/Proof.hpp | 2 +- src/zcash/Zcash.h | 2 +- src/zcash/prf.cpp | 2 +- src/zcash/prf.h | 2 +- src/zcash/util.cpp | 2 +- src/zcash/util.h | 2 +- src/zcash/zip32.cpp | 2 +- src/zcash/zip32.h | 2 +- src/zush | 2 +- toolchain-info.sh | 2 +- util/afl/afl-build.sh | 2 +- util/afl/afl-get.sh | 2 +- util/afl/afl-getbuildrun.sh | 2 +- util/afl/afl-run.sh | 2 +- util/build-arm.sh | 2 +- util/build-debian-package.sh | 2 +- util/build-mac.sh | 2 +- util/build-win.sh | 2 +- util/checkpoints.pl | 2 +- util/docker-entrypoint.sh | 2 +- util/gen-manpages.sh | 2 +- 652 files changed, 653 insertions(+), 653 deletions(-) diff --git a/Dockerfile b/Dockerfile index b89a159a0..7e639b16f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 FROM ubuntu:16.04 diff --git a/Makefile.am b/Makefile.am index 84a4aed25..48c498853 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -# Copyright 2016-2021 The Hush developers +# Copyright 2016-2022 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 diff --git a/autogen.sh b/autogen.sh index 6932fae53..2aa9ad130 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 set -e diff --git a/contrib/block_time.pl b/contrib/block_time.pl index 0366aa8f9..cb11ed239 100755 --- a/contrib/block_time.pl +++ b/contrib/block_time.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 use warnings; diff --git a/contrib/fresh_clone_compile_and_run.sh b/contrib/fresh_clone_compile_and_run.sh index 54fc69ed6..9f92a0ca6 100644 --- a/contrib/fresh_clone_compile_and_run.sh +++ b/contrib/fresh_clone_compile_and_run.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 # OPEN BOUNTY diff --git a/contrib/hush_halvings b/contrib/hush_halvings index 80bb24b04..cfb899ced 100755 --- a/contrib/hush_halvings +++ b/contrib/hush_halvings @@ -1,5 +1,5 @@ #!/usr/bin/env perl -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Released under the GPLv3 use strict; diff --git a/contrib/hush_scanner b/contrib/hush_scanner index 6ec4300b9..af4ee4144 100755 --- a/contrib/hush_scanner +++ b/contrib/hush_scanner @@ -1,5 +1,5 @@ #!/usr/bin/env perl -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 use strict; diff --git a/contrib/hush_supply b/contrib/hush_supply index e12770f84..ef78fef3c 100755 --- a/contrib/hush_supply +++ b/contrib/hush_supply @@ -1,5 +1,5 @@ #!/usr/bin/env perl -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Released under the GPLv3 use warnings; use strict; diff --git a/contrib/verify-commits/gpg.sh b/contrib/verify-commits/gpg.sh index dc6eb9c61..b25d5dc5c 100755 --- a/contrib/verify-commits/gpg.sh +++ b/contrib/verify-commits/gpg.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 INPUT=$(. -Copyright (C) 2016-2021 Duke Leto and The Hush Developers +Copyright (C) 2016-2022 Duke Leto and The Hush Developers Copyright (C) 2016-2020 jl777 and SuperNET developers Copyright (C) 2016-2018 The Zcash developers Copyright (C) 2009-2014 The Bitcoin Core developers diff --git a/doc/man/hush-tx.1 b/doc/man/hush-tx.1 index f34354e45..4a01ad1e7 100644 --- a/doc/man/hush-tx.1 +++ b/doc/man/hush-tx.1 @@ -88,7 +88,7 @@ Set register NAME to given JSON\-STRING In order to ensure you are adequately protecting your privacy when using Hush, please see . -Copyright (C) 2016-2021 Duke Leto and The Hush Developers +Copyright (C) 2016-2022 Duke Leto and The Hush Developers Copyright (C) 2016-2020 jl777 and SuperNET developers Copyright (C) 2016-2018 The Zcash developers Copyright (C) 2009-2014 The Bitcoin Core developers diff --git a/doc/man/hushd.1 b/doc/man/hushd.1 index 9f69dd460..3cd181f7c 100644 --- a/doc/man/hushd.1 +++ b/doc/man/hushd.1 @@ -724,7 +724,7 @@ Enforce transaction\-rate limit, default 0 In order to ensure you are adequately protecting your privacy when using Hush, please see . -Copyright (C) 2016-2021 Duke Leto and The Hush Developers +Copyright (C) 2016-2022 Duke Leto and The Hush Developers Copyright (C) 2016-2020 jl777 and SuperNET developers Copyright (C) 2016-2018 The Zcash developers Copyright (C) 2009-2014 The Bitcoin Core developers diff --git a/migratecoin.sh b/migratecoin.sh index 95aea910c..f34215197 100644 --- a/migratecoin.sh +++ b/migratecoin.sh @@ -1,5 +1,5 @@ #!/usr/bin/bash -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 # This script makes the neccesary transactions to migrate diff --git a/qa/hush/create_benchmark_archive.py b/qa/hush/create_benchmark_archive.py index 68938297e..5f9a08721 100644 --- a/qa/hush/create_benchmark_archive.py +++ b/qa/hush/create_benchmark_archive.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 import binascii diff --git a/qa/hush/create_wallet_200k_utxos.py b/qa/hush/create_wallet_200k_utxos.py index 3499cdd70..d2174e864 100644 --- a/qa/hush/create_wallet_200k_utxos.py +++ b/qa/hush/create_wallet_200k_utxos.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2017 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/hush/full-test-suite.sh b/qa/hush/full-test-suite.sh index 0618ccdca..b7fb37f0a 100755 --- a/qa/hush/full-test-suite.sh +++ b/qa/hush/full-test-suite.sh @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Execute all of the automated tests related to Hush # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/hush/full_test_suite.py b/qa/hush/full_test_suite.py index 87fcc6ac0..c8cc05e45 100755 --- a/qa/hush/full_test_suite.py +++ b/qa/hush/full_test_suite.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 # Execute all of the automated tests related to Hush diff --git a/qa/pull-tester/rpc-tests.sh b/qa/pull-tester/rpc-tests.sh index 153f7b4a6..3bafe170c 100755 --- a/qa/pull-tester/rpc-tests.sh +++ b/qa/pull-tester/rpc-tests.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Released under the GPLv3 set -e -o pipefail diff --git a/qa/pull-tester/run-bitcoin-cli b/qa/pull-tester/run-bitcoin-cli index 74f9b19e8..2e7b326af 100755 --- a/qa/pull-tester/run-bitcoin-cli +++ b/qa/pull-tester/run-bitcoin-cli @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Released under the GPLv3 # This is a thin wrapper around bitcoin-cli that strips the Windows-style EOLs diff --git a/qa/pull-tester/run-bitcoind-for-test.sh.in b/qa/pull-tester/run-bitcoind-for-test.sh.in index 0ae527293..4527dff7b 100755 --- a/qa/pull-tester/run-bitcoind-for-test.sh.in +++ b/qa/pull-tester/run-bitcoind-for-test.sh.in @@ -1,7 +1,7 @@ #!/bin/bash # THIS FILE IS GENERATED FROM run-bitcoind-for-test.sh.in # Copyright (c) 2013-2014 The Bitcoin Core developers -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Released under the GPLv3 # HUSH_LOAD_TIMEOUT=500 diff --git a/qa/pull-tester/tests-config.sh.in b/qa/pull-tester/tests-config.sh.in index d48d5bbc5..824b9d2a1 100755 --- a/qa/pull-tester/tests-config.sh.in +++ b/qa/pull-tester/tests-config.sh.in @@ -1,7 +1,7 @@ #!/bin/bash # THIS FILE IS GENERATED FROM tests-config.sh.in # Copyright (c) 2013-2014 The Bitcoin Core developers -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Released under the GPLv3 BUILDDIR="@abs_top_builddir@" diff --git a/qa/rpc-tests/ac_private.py b/qa/rpc-tests/ac_private.py index 7c066529a..03675b6b1 100755 --- a/qa/rpc-tests/ac_private.py +++ b/qa/rpc-tests/ac_private.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2018 SuperNET developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/addressindex.py b/qa/rpc-tests/addressindex.py index 3f2e77c96..62483e40a 100755 --- a/qa/rpc-tests/addressindex.py +++ b/qa/rpc-tests/addressindex.py @@ -1,6 +1,6 @@ #!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 # Test addressindex generation and fetching diff --git a/qa/rpc-tests/bip65-cltv-p2p.py b/qa/rpc-tests/bip65-cltv-p2p.py index f8d637e64..60bab6854 100755 --- a/qa/rpc-tests/bip65-cltv-p2p.py +++ b/qa/rpc-tests/bip65-cltv-p2p.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 diff --git a/qa/rpc-tests/bipdersig-p2p.py b/qa/rpc-tests/bipdersig-p2p.py index bba8ff01b..f83f0a2c7 100755 --- a/qa/rpc-tests/bipdersig-p2p.py +++ b/qa/rpc-tests/bipdersig-p2p.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Distributed under the GPLv3/X11 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # diff --git a/qa/rpc-tests/blockchain.py b/qa/rpc-tests/blockchain.py index 7cd728d30..b66a6b3bc 100755 --- a/qa/rpc-tests/blockchain.py +++ b/qa/rpc-tests/blockchain.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/cryptoconditions.py b/qa/rpc-tests/cryptoconditions.py index 85016f2d5..2c6f95847 100755 --- a/qa/rpc-tests/cryptoconditions.py +++ b/qa/rpc-tests/cryptoconditions.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2018 SuperNET developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/cryptoconditions_channels.py b/qa/rpc-tests/cryptoconditions_channels.py index 9273efbe9..127df77ee 100755 --- a/qa/rpc-tests/cryptoconditions_channels.py +++ b/qa/rpc-tests/cryptoconditions_channels.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2018 SuperNET developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/cryptoconditions_dice.py b/qa/rpc-tests/cryptoconditions_dice.py index 894b25d0d..4f9d8c7c4 100755 --- a/qa/rpc-tests/cryptoconditions_dice.py +++ b/qa/rpc-tests/cryptoconditions_dice.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2018 SuperNET developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/cryptoconditions_faucet.py b/qa/rpc-tests/cryptoconditions_faucet.py index af9e8e033..3cccaf2db 100755 --- a/qa/rpc-tests/cryptoconditions_faucet.py +++ b/qa/rpc-tests/cryptoconditions_faucet.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2018 SuperNET developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/cryptoconditions_gateways.py b/qa/rpc-tests/cryptoconditions_gateways.py index b979e99ce..d60452269 100755 --- a/qa/rpc-tests/cryptoconditions_gateways.py +++ b/qa/rpc-tests/cryptoconditions_gateways.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2018 SuperNET developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/cryptoconditions_heir.py b/qa/rpc-tests/cryptoconditions_heir.py index 99ddb9af0..9ce32a625 100755 --- a/qa/rpc-tests/cryptoconditions_heir.py +++ b/qa/rpc-tests/cryptoconditions_heir.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2018 SuperNET developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/cryptoconditions_oracles.py b/qa/rpc-tests/cryptoconditions_oracles.py index 39672ba53..255b372f6 100755 --- a/qa/rpc-tests/cryptoconditions_oracles.py +++ b/qa/rpc-tests/cryptoconditions_oracles.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2018 SuperNET developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/cryptoconditions_rewards.py b/qa/rpc-tests/cryptoconditions_rewards.py index 7e4f0a879..3c1452ed4 100755 --- a/qa/rpc-tests/cryptoconditions_rewards.py +++ b/qa/rpc-tests/cryptoconditions_rewards.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2018 SuperNET developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/cryptoconditions_token.py b/qa/rpc-tests/cryptoconditions_token.py index 6df6b11a9..dbded0062 100755 --- a/qa/rpc-tests/cryptoconditions_token.py +++ b/qa/rpc-tests/cryptoconditions_token.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2018 SuperNET developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/decodescript.py b/qa/rpc-tests/decodescript.py index 70a7cdfbb..f4d63d317 100755 --- a/qa/rpc-tests/decodescript.py +++ b/qa/rpc-tests/decodescript.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2015 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/disablewallet.py b/qa/rpc-tests/disablewallet.py index ecefd096f..bb4cda6e5 100755 --- a/qa/rpc-tests/disablewallet.py +++ b/qa/rpc-tests/disablewallet.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/dpowconfs.py b/qa/rpc-tests/dpowconfs.py index 340db0bd6..89fb640ad 100755 --- a/qa/rpc-tests/dpowconfs.py +++ b/qa/rpc-tests/dpowconfs.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2019 Duke Leto who wrote "The SuperNET developers" while never agreeing to the developer agreement nor being listed in AUTHORS # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/feature_walletfile.py b/qa/rpc-tests/feature_walletfile.py index 5487a5245..b0364a7d3 100755 --- a/qa/rpc-tests/feature_walletfile.py +++ b/qa/rpc-tests/feature_walletfile.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 """Test wallet file location.""" diff --git a/qa/rpc-tests/finalsaplingroot.py b/qa/rpc-tests/finalsaplingroot.py index 15078709d..b82053eb0 100755 --- a/qa/rpc-tests/finalsaplingroot.py +++ b/qa/rpc-tests/finalsaplingroot.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2018 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/forknotify.py b/qa/rpc-tests/forknotify.py index d017d2409..1f615f930 100755 --- a/qa/rpc-tests/forknotify.py +++ b/qa/rpc-tests/forknotify.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/fundrawtransaction.py b/qa/rpc-tests/fundrawtransaction.py index daae872e4..3a9ac0ca6 100755 --- a/qa/rpc-tests/fundrawtransaction.py +++ b/qa/rpc-tests/fundrawtransaction.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/getblocktemplate.py b/qa/rpc-tests/getblocktemplate.py index 308a21729..6d771b360 100755 --- a/qa/rpc-tests/getblocktemplate.py +++ b/qa/rpc-tests/getblocktemplate.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2016 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/getblocktemplate_longpoll.py b/qa/rpc-tests/getblocktemplate_longpoll.py index f2bf82172..ab393755b 100755 --- a/qa/rpc-tests/getblocktemplate_longpoll.py +++ b/qa/rpc-tests/getblocktemplate_longpoll.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/getblocktemplate_proposals.py b/qa/rpc-tests/getblocktemplate_proposals.py index 61c33af1c..f75032091 100755 --- a/qa/rpc-tests/getblocktemplate_proposals.py +++ b/qa/rpc-tests/getblocktemplate_proposals.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/getchaintips.py b/qa/rpc-tests/getchaintips.py index e40664196..84c3f7f6c 100755 --- a/qa/rpc-tests/getchaintips.py +++ b/qa/rpc-tests/getchaintips.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/hardforkdetection.py b/qa/rpc-tests/hardforkdetection.py index f98d274a8..bcd13e0d4 100755 --- a/qa/rpc-tests/hardforkdetection.py +++ b/qa/rpc-tests/hardforkdetection.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # # Test hard fork detection diff --git a/qa/rpc-tests/httpbasics.py b/qa/rpc-tests/httpbasics.py index 034ff2a4d..ff5544a2c 100755 --- a/qa/rpc-tests/httpbasics.py +++ b/qa/rpc-tests/httpbasics.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/invalidateblock.py b/qa/rpc-tests/invalidateblock.py index 4edad27df..ea189ff85 100755 --- a/qa/rpc-tests/invalidateblock.py +++ b/qa/rpc-tests/invalidateblock.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/invalidblockrequest.py b/qa/rpc-tests/invalidblockrequest.py index e8440a8e7..f806d07ec 100755 --- a/qa/rpc-tests/invalidblockrequest.py +++ b/qa/rpc-tests/invalidblockrequest.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # # Distributed under the GPLv3/X11 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/ivk_import_export.py b/qa/rpc-tests/ivk_import_export.py index 6431edda2..a5eaf5233 100755 --- a/qa/rpc-tests/ivk_import_export.py +++ b/qa/rpc-tests/ivk_import_export.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2019 Bartlomiej Lisiecki # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/key_import_export.py b/qa/rpc-tests/key_import_export.py index 54b07b2ee..f7e13a732 100755 --- a/qa/rpc-tests/key_import_export.py +++ b/qa/rpc-tests/key_import_export.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2017 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/keypool.py b/qa/rpc-tests/keypool.py index a64d79525..0a22cae8a 100755 --- a/qa/rpc-tests/keypool.py +++ b/qa/rpc-tests/keypool.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/listtransactions.py b/qa/rpc-tests/listtransactions.py index ace7e9090..f82494ca2 100755 --- a/qa/rpc-tests/listtransactions.py +++ b/qa/rpc-tests/listtransactions.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/maxblocksinflight.py b/qa/rpc-tests/maxblocksinflight.py index b0c7ad66f..4b7e6e624 100755 --- a/qa/rpc-tests/maxblocksinflight.py +++ b/qa/rpc-tests/maxblocksinflight.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # # Distributed under the GPLv3/X11 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/mempool_nu_activation.py b/qa/rpc-tests/mempool_nu_activation.py index 36d8493cc..fead09452 100755 --- a/qa/rpc-tests/mempool_nu_activation.py +++ b/qa/rpc-tests/mempool_nu_activation.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2018 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/mempool_reorg.py b/qa/rpc-tests/mempool_reorg.py index 4c39eba46..e08b5985f 100755 --- a/qa/rpc-tests/mempool_reorg.py +++ b/qa/rpc-tests/mempool_reorg.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/mempool_resurrect_test.py b/qa/rpc-tests/mempool_resurrect_test.py index 3c3b1c9d7..6afad2c7d 100755 --- a/qa/rpc-tests/mempool_resurrect_test.py +++ b/qa/rpc-tests/mempool_resurrect_test.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/mempool_spendcoinbase.py b/qa/rpc-tests/mempool_spendcoinbase.py index 7a80d034e..ee6465868 100755 --- a/qa/rpc-tests/mempool_spendcoinbase.py +++ b/qa/rpc-tests/mempool_spendcoinbase.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/mempool_tx_expiry.py b/qa/rpc-tests/mempool_tx_expiry.py index 078028a6e..de43e3bf3 100755 --- a/qa/rpc-tests/mempool_tx_expiry.py +++ b/qa/rpc-tests/mempool_tx_expiry.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2018 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/mempool_tx_input_limit.py b/qa/rpc-tests/mempool_tx_input_limit.py index e88db77f1..28761aca8 100755 --- a/qa/rpc-tests/mempool_tx_input_limit.py +++ b/qa/rpc-tests/mempool_tx_input_limit.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2017 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/merkle_blocks.py b/qa/rpc-tests/merkle_blocks.py index 4d4103ed9..4de09a02d 100755 --- a/qa/rpc-tests/merkle_blocks.py +++ b/qa/rpc-tests/merkle_blocks.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/nodehandling.py b/qa/rpc-tests/nodehandling.py index ca5c7c319..f23e19ade 100755 --- a/qa/rpc-tests/nodehandling.py +++ b/qa/rpc-tests/nodehandling.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/nspv_client_test.py b/qa/rpc-tests/nspv_client_test.py index c232389f2..45606cec1 100755 --- a/qa/rpc-tests/nspv_client_test.py +++ b/qa/rpc-tests/nspv_client_test.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 import sys diff --git a/qa/rpc-tests/p2p-acceptblock.py b/qa/rpc-tests/p2p-acceptblock.py index 22bc4212d..4dccdfae5 100755 --- a/qa/rpc-tests/p2p-acceptblock.py +++ b/qa/rpc-tests/p2p-acceptblock.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # # Distributed under the GPLv3/X11 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/p2p_node_bloom.py b/qa/rpc-tests/p2p_node_bloom.py index 78d4021f3..6bbb3be57 100755 --- a/qa/rpc-tests/p2p_node_bloom.py +++ b/qa/rpc-tests/p2p_node_bloom.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2018 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/p2p_txexpiry_dos.py b/qa/rpc-tests/p2p_txexpiry_dos.py index bde410d6a..c870f2e74 100755 --- a/qa/rpc-tests/p2p_txexpiry_dos.py +++ b/qa/rpc-tests/p2p_txexpiry_dos.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2018 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/prioritisetransaction.py b/qa/rpc-tests/prioritisetransaction.py index 813f5c00d..4038c7a8f 100755 --- a/qa/rpc-tests/prioritisetransaction.py +++ b/qa/rpc-tests/prioritisetransaction.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2017 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/proxy_test.py b/qa/rpc-tests/proxy_test.py index 15b83c66c..1a200db56 100755 --- a/qa/rpc-tests/proxy_test.py +++ b/qa/rpc-tests/proxy_test.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2015 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/pruning.py b/qa/rpc-tests/pruning.py index 16714e0f2..44d8c8b5d 100755 --- a/qa/rpc-tests/pruning.py +++ b/qa/rpc-tests/pruning.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/rawtransactions.py b/qa/rpc-tests/rawtransactions.py index 872c4f28c..b59d4f073 100755 --- a/qa/rpc-tests/rawtransactions.py +++ b/qa/rpc-tests/rawtransactions.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/receivedby.py b/qa/rpc-tests/receivedby.py index bb50e07f3..a2e3bc224 100755 --- a/qa/rpc-tests/receivedby.py +++ b/qa/rpc-tests/receivedby.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/regtest_signrawtransaction.py b/qa/rpc-tests/regtest_signrawtransaction.py index aaeb9107a..520d7fca9 100755 --- a/qa/rpc-tests/regtest_signrawtransaction.py +++ b/qa/rpc-tests/regtest_signrawtransaction.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2018 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/reindex.py b/qa/rpc-tests/reindex.py index 988ee21f4..f8f06d96a 100755 --- a/qa/rpc-tests/reindex.py +++ b/qa/rpc-tests/reindex.py @@ -1,6 +1,6 @@ #!/usr/bin/env python2 # Copyright (c) 2014 The Bitcoin Core developers -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Released under the GPLv3 # # Test -reindex with CheckBlockIndex diff --git a/qa/rpc-tests/rest.py b/qa/rpc-tests/rest.py index 2be0254c7..a1ba0cc06 100755 --- a/qa/rpc-tests/rest.py +++ b/qa/rpc-tests/rest.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/rewind_index.py b/qa/rpc-tests/rewind_index.py index ea971a818..65d1d2a13 100755 --- a/qa/rpc-tests/rewind_index.py +++ b/qa/rpc-tests/rewind_index.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2018 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/rpcbind_test.py b/qa/rpc-tests/rpcbind_test.py index 17835c694..d95e9aca5 100755 --- a/qa/rpc-tests/rpcbind_test.py +++ b/qa/rpc-tests/rpcbind_test.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/script_test.py b/qa/rpc-tests/script_test.py index a4d59e2bc..4175e7d13 100755 --- a/qa/rpc-tests/script_test.py +++ b/qa/rpc-tests/script_test.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # # Distributed under the GPLv3/X11 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/signrawtransaction_offline.py b/qa/rpc-tests/signrawtransaction_offline.py index f0fba1c50..84f3e1888 100755 --- a/qa/rpc-tests/signrawtransaction_offline.py +++ b/qa/rpc-tests/signrawtransaction_offline.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 diff --git a/qa/rpc-tests/signrawtransactions.py b/qa/rpc-tests/signrawtransactions.py index 332ffd635..a7fe196b1 100755 --- a/qa/rpc-tests/signrawtransactions.py +++ b/qa/rpc-tests/signrawtransactions.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2015 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/smartfees.py b/qa/rpc-tests/smartfees.py index 0d689e9e8..19c233d4f 100755 --- a/qa/rpc-tests/smartfees.py +++ b/qa/rpc-tests/smartfees.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/spentindex.py b/qa/rpc-tests/spentindex.py index f4b8f9209..2300df6c3 100755 --- a/qa/rpc-tests/spentindex.py +++ b/qa/rpc-tests/spentindex.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/test_framework/authproxy.py b/qa/rpc-tests/test_framework/authproxy.py index c4bd79c04..32cf6fd0d 100644 --- a/qa/rpc-tests/test_framework/authproxy.py +++ b/qa/rpc-tests/test_framework/authproxy.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 diff --git a/qa/rpc-tests/test_framework/bignum.py b/qa/rpc-tests/test_framework/bignum.py index 6b764a389..cf6e9418f 100644 --- a/qa/rpc-tests/test_framework/bignum.py +++ b/qa/rpc-tests/test_framework/bignum.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 # This file is from python-bitcoinlib. diff --git a/qa/rpc-tests/test_framework/blockstore.py b/qa/rpc-tests/test_framework/blockstore.py index 9a7c2bd35..6687be3df 100644 --- a/qa/rpc-tests/test_framework/blockstore.py +++ b/qa/rpc-tests/test_framework/blockstore.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 # BlockStore: a helper class that keeps a map of blocks and implements diff --git a/qa/rpc-tests/test_framework/blocktools.py b/qa/rpc-tests/test_framework/blocktools.py index 9955b4324..260ea9f62 100644 --- a/qa/rpc-tests/test_framework/blocktools.py +++ b/qa/rpc-tests/test_framework/blocktools.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 # blocktools.py - utilities for manipulating blocks and transactions diff --git a/qa/rpc-tests/test_framework/comptool.py b/qa/rpc-tests/test_framework/comptool.py index a0f46d464..9daaae04e 100755 --- a/qa/rpc-tests/test_framework/comptool.py +++ b/qa/rpc-tests/test_framework/comptool.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 diff --git a/qa/rpc-tests/test_framework/equihash.py b/qa/rpc-tests/test_framework/equihash.py index 2f7b74c1e..e0d9cf306 100755 --- a/qa/rpc-tests/test_framework/equihash.py +++ b/qa/rpc-tests/test_framework/equihash.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 from operator import itemgetter diff --git a/qa/rpc-tests/test_framework/mininode.py b/qa/rpc-tests/test_framework/mininode.py index ecbef5e24..421691bcb 100755 --- a/qa/rpc-tests/test_framework/mininode.py +++ b/qa/rpc-tests/test_framework/mininode.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 # mininode.py - Bitcoin P2P network half-a-node diff --git a/qa/rpc-tests/test_framework/netutil.py b/qa/rpc-tests/test_framework/netutil.py index 07e7460ce..57baecdc0 100644 --- a/qa/rpc-tests/test_framework/netutil.py +++ b/qa/rpc-tests/test_framework/netutil.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/test_framework/script.py b/qa/rpc-tests/test_framework/script.py index 320151f7d..ae8a2fc7a 100644 --- a/qa/rpc-tests/test_framework/script.py +++ b/qa/rpc-tests/test_framework/script.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 # This file is modified from python-bitcoinlib. diff --git a/qa/rpc-tests/test_framework/socks5.py b/qa/rpc-tests/test_framework/socks5.py index 27f67225e..9138f221b 100644 --- a/qa/rpc-tests/test_framework/socks5.py +++ b/qa/rpc-tests/test_framework/socks5.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2015 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/test_framework/test_framework.py b/qa/rpc-tests/test_framework/test_framework.py index 55565a2d3..8fa2876ea 100755 --- a/qa/rpc-tests/test_framework/test_framework.py +++ b/qa/rpc-tests/test_framework/test_framework.py @@ -1,6 +1,6 @@ #!/usr/bin/env python2 # Copyright (c) 2014 The Bitcoin Core developers -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 # Base class for RPC testing diff --git a/qa/rpc-tests/timestampindex.py b/qa/rpc-tests/timestampindex.py index 17401d607..ca37d469d 100755 --- a/qa/rpc-tests/timestampindex.py +++ b/qa/rpc-tests/timestampindex.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/txindex.py b/qa/rpc-tests/txindex.py index 9424e75f9..89e5a6886 100755 --- a/qa/rpc-tests/txindex.py +++ b/qa/rpc-tests/txindex.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/txn_doublespend.py b/qa/rpc-tests/txn_doublespend.py index dd5fbafad..e3952f43e 100755 --- a/qa/rpc-tests/txn_doublespend.py +++ b/qa/rpc-tests/txn_doublespend.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/wallet.py b/qa/rpc-tests/wallet.py index 27b603a14..6ef8e3162 100755 --- a/qa/rpc-tests/wallet.py +++ b/qa/rpc-tests/wallet.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/wallet_1941.py b/qa/rpc-tests/wallet_1941.py index f69f04d4d..678e75af4 100755 --- a/qa/rpc-tests/wallet_1941.py +++ b/qa/rpc-tests/wallet_1941.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2016 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/wallet_addresses.py b/qa/rpc-tests/wallet_addresses.py index 67ffa2975..53f16fcc4 100755 --- a/qa/rpc-tests/wallet_addresses.py +++ b/qa/rpc-tests/wallet_addresses.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2018 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/wallet_anchorfork.py b/qa/rpc-tests/wallet_anchorfork.py index cab7a6d1e..46e5cf3c5 100755 --- a/qa/rpc-tests/wallet_anchorfork.py +++ b/qa/rpc-tests/wallet_anchorfork.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2018 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/wallet_changeindicator.py b/qa/rpc-tests/wallet_changeindicator.py index b1027c09c..21274208a 100755 --- a/qa/rpc-tests/wallet_changeindicator.py +++ b/qa/rpc-tests/wallet_changeindicator.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2018 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/wallet_import_export.py b/qa/rpc-tests/wallet_import_export.py index c5c71acd8..b3a266cbe 100755 --- a/qa/rpc-tests/wallet_import_export.py +++ b/qa/rpc-tests/wallet_import_export.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2018 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/wallet_listnotes.py b/qa/rpc-tests/wallet_listnotes.py index 6c80b96ac..66715a682 100755 --- a/qa/rpc-tests/wallet_listnotes.py +++ b/qa/rpc-tests/wallet_listnotes.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2018 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/wallet_listreceived.py b/qa/rpc-tests/wallet_listreceived.py index 3cbb49aae..ca48cb975 100755 --- a/qa/rpc-tests/wallet_listreceived.py +++ b/qa/rpc-tests/wallet_listreceived.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2018 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/wallet_mergetoaddress.py b/qa/rpc-tests/wallet_mergetoaddress.py index ea4a3b910..0684ccf1e 100755 --- a/qa/rpc-tests/wallet_mergetoaddress.py +++ b/qa/rpc-tests/wallet_mergetoaddress.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2017 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/wallet_nullifiers.py b/qa/rpc-tests/wallet_nullifiers.py index 7eed3c984..d2cd485cc 100755 --- a/qa/rpc-tests/wallet_nullifiers.py +++ b/qa/rpc-tests/wallet_nullifiers.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2016 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/wallet_overwintertx.py b/qa/rpc-tests/wallet_overwintertx.py index fdd7a1947..6f8c03dce 100755 --- a/qa/rpc-tests/wallet_overwintertx.py +++ b/qa/rpc-tests/wallet_overwintertx.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2018 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/wallet_persistence.py b/qa/rpc-tests/wallet_persistence.py index 4cf2c52f0..90076b867 100755 --- a/qa/rpc-tests/wallet_persistence.py +++ b/qa/rpc-tests/wallet_persistence.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2018 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/wallet_protectcoinbase.py b/qa/rpc-tests/wallet_protectcoinbase.py index c6f9c2760..9f91ff55f 100755 --- a/qa/rpc-tests/wallet_protectcoinbase.py +++ b/qa/rpc-tests/wallet_protectcoinbase.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2016 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/wallet_sapling.py b/qa/rpc-tests/wallet_sapling.py index 7e58a08d9..9cb120583 100755 --- a/qa/rpc-tests/wallet_sapling.py +++ b/qa/rpc-tests/wallet_sapling.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2018 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/wallet_shieldcoinbase.py b/qa/rpc-tests/wallet_shieldcoinbase.py index befd8c5a1..4747c2c1e 100755 --- a/qa/rpc-tests/wallet_shieldcoinbase.py +++ b/qa/rpc-tests/wallet_shieldcoinbase.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2017 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/wallet_shieldcoinbase_sapling.py b/qa/rpc-tests/wallet_shieldcoinbase_sapling.py index 6ef6da873..aa5d733e1 100755 --- a/qa/rpc-tests/wallet_shieldcoinbase_sapling.py +++ b/qa/rpc-tests/wallet_shieldcoinbase_sapling.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 import inspect diff --git a/qa/rpc-tests/wallet_treestate.py b/qa/rpc-tests/wallet_treestate.py index f3374ac21..d0dc37528 100755 --- a/qa/rpc-tests/wallet_treestate.py +++ b/qa/rpc-tests/wallet_treestate.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2016 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/walletbackup.py b/qa/rpc-tests/walletbackup.py index 33aa82694..f43947869 100755 --- a/qa/rpc-tests/walletbackup.py +++ b/qa/rpc-tests/walletbackup.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/zapwallettxes.py b/qa/rpc-tests/zapwallettxes.py index fb4b84caf..e14939fd0 100755 --- a/qa/rpc-tests/zapwallettxes.py +++ b/qa/rpc-tests/zapwallettxes.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/zkey_import_export.py b/qa/rpc-tests/zkey_import_export.py index 0fc78fd3b..b4abff512 100755 --- a/qa/rpc-tests/zkey_import_export.py +++ b/qa/rpc-tests/zkey_import_export.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright (c) 2017 The Zcash developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/Makefile.am b/src/Makefile.am index 6a3e3dab8..5fe0118c0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,4 @@ -# Copyright 2016-2021 The Hush developers +# Copyright 2016-2022 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 diff --git a/src/Makefile.gtest.include b/src/Makefile.gtest.include index 5f170384a..8cd1a5aba 100644 --- a/src/Makefile.gtest.include +++ b/src/Makefile.gtest.include @@ -1,4 +1,4 @@ -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Released under the GPLv3 TESTS += hush-gtest bin_PROGRAMS += hush-gtest diff --git a/src/Makefile.test-hush.include b/src/Makefile.test-hush.include index 9d6379ea0..0cc4e43c1 100644 --- a/src/Makefile.test-hush.include +++ b/src/Makefile.test-hush.include @@ -1,4 +1,4 @@ -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 diff --git a/src/addressindex.h b/src/addressindex.h index 369bd1671..778295c27 100644 --- a/src/addressindex.h +++ b/src/addressindex.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/addrman.cpp b/src/addrman.cpp index 36c361f01..d9b8a07cb 100644 --- a/src/addrman.cpp +++ b/src/addrman.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2012 Pieter Wuille -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/addrman.h b/src/addrman.h index 68419ea61..5738913d4 100644 --- a/src/addrman.h +++ b/src/addrman.h @@ -1,5 +1,5 @@ // Copyright (c) 2012 Pieter Wuille -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/alert.cpp b/src/alert.cpp index 00cb4f8e2..9560a0c87 100644 --- a/src/alert.cpp +++ b/src/alert.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/alert.h b/src/alert.h index 16c063451..f461c51c5 100644 --- a/src/alert.h +++ b/src/alert.h @@ -1,6 +1,6 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2013 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/alertkeys.h b/src/alertkeys.h index 8e477e446..0de5d269e 100644 --- a/src/alertkeys.h +++ b/src/alertkeys.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/amount.cpp b/src/amount.cpp index 987bfadae..0e2d7ae33 100644 --- a/src/amount.cpp +++ b/src/amount.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/amount.h b/src/amount.h index 46fcb740d..88ba196f0 100644 --- a/src/amount.h +++ b/src/amount.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/arith_uint256.cpp b/src/arith_uint256.cpp index 6d5b92aad..da2dcd58b 100644 --- a/src/arith_uint256.cpp +++ b/src/arith_uint256.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/arith_uint256.h b/src/arith_uint256.h index c5e3e37db..9b462cb04 100644 --- a/src/arith_uint256.h +++ b/src/arith_uint256.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/assetchains_stop b/src/assetchains_stop index a44e3c403..e5ccc0fcb 100755 --- a/src/assetchains_stop +++ b/src/assetchains_stop @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers set -eo pipefail hush_cli='./hush-cli' diff --git a/src/asyncrpcoperation.cpp b/src/asyncrpcoperation.cpp index d62fdc584..c0c274901 100644 --- a/src/asyncrpcoperation.cpp +++ b/src/asyncrpcoperation.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2016 The Zcash developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/asyncrpcoperation.h b/src/asyncrpcoperation.h index e401ecf36..2bcf75d63 100644 --- a/src/asyncrpcoperation.h +++ b/src/asyncrpcoperation.h @@ -1,5 +1,5 @@ // Copyright (c) 2016 The Zcash developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/asyncrpcqueue.cpp b/src/asyncrpcqueue.cpp index a88f0c18c..c7556a4b9 100644 --- a/src/asyncrpcqueue.cpp +++ b/src/asyncrpcqueue.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2016 The Zcash developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/asyncrpcqueue.h b/src/asyncrpcqueue.h index fbe79f0f0..6369f2134 100644 --- a/src/asyncrpcqueue.h +++ b/src/asyncrpcqueue.h @@ -1,5 +1,5 @@ // Copyright (c) 2016 The Zcash developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/base58.cpp b/src/base58.cpp index 31233ac94..deb64ddcc 100644 --- a/src/base58.cpp +++ b/src/base58.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/bech32.cpp b/src/bech32.cpp index 778761a6d..fa0562d0a 100644 --- a/src/bech32.cpp +++ b/src/bech32.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2017 Pieter Wuille -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/bech32.h b/src/bech32.h index 42b3702bd..a0fec7558 100644 --- a/src/bech32.h +++ b/src/bech32.h @@ -1,5 +1,5 @@ // Copyright (c) 2017 Pieter Wuille -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index 79e7701fc..d6ac78c25 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2013 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index 9e5a2b43a..4de9f9e61 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2013 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/bloom.cpp b/src/bloom.cpp index bf96141c3..81410adda 100644 --- a/src/bloom.cpp +++ b/src/bloom.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2012-2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/cc/CCGateways.h b/src/cc/CCGateways.h index 2a7b43afb..ca4adbee0 100644 --- a/src/cc/CCGateways.h +++ b/src/cc/CCGateways.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/CCHeir.h b/src/cc/CCHeir.h index 106ffd5af..762b37b9c 100644 --- a/src/cc/CCHeir.h +++ b/src/cc/CCHeir.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/CCImportGateway.h b/src/cc/CCImportGateway.h index 0aa537fe8..27aade681 100644 --- a/src/cc/CCImportGateway.h +++ b/src/cc/CCImportGateway.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/CCMarmara.h b/src/cc/CCMarmara.h index 3e6307ac1..67e21cc8c 100644 --- a/src/cc/CCMarmara.h +++ b/src/cc/CCMarmara.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/CCOracles.h b/src/cc/CCOracles.h index ad939bd5b..9f519706f 100644 --- a/src/cc/CCOracles.h +++ b/src/cc/CCOracles.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/CCPayments.h b/src/cc/CCPayments.h index 5fd6a1bfc..f6c556ad3 100644 --- a/src/cc/CCPayments.h +++ b/src/cc/CCPayments.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/CCPegs.h b/src/cc/CCPegs.h index c8b4649f4..309a4646e 100644 --- a/src/cc/CCPegs.h +++ b/src/cc/CCPegs.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/CCPrices.h b/src/cc/CCPrices.h index e715706b9..a1238d134 100644 --- a/src/cc/CCPrices.h +++ b/src/cc/CCPrices.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/CC_made_easy.md b/src/cc/CC_made_easy.md index 79655dcbc..cd5f62577 100644 --- a/src/cc/CC_made_easy.md +++ b/src/cc/CC_made_easy.md @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers /****************************************************************************** * Copyright © 2014-2019 The SuperNET Developers. * * * diff --git a/src/cc/CCassets.h b/src/cc/CCassets.h index 03af560e8..d2fbfb051 100644 --- a/src/cc/CCassets.h +++ b/src/cc/CCassets.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/CCassetsCore.cpp b/src/cc/CCassetsCore.cpp index 41d33b1af..963ff4dd0 100644 --- a/src/cc/CCassetsCore.cpp +++ b/src/cc/CCassetsCore.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/CCassetstx.cpp b/src/cc/CCassetstx.cpp index d9c3eb177..36eb1050d 100644 --- a/src/cc/CCassetstx.cpp +++ b/src/cc/CCassetstx.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/CCauction.h b/src/cc/CCauction.h index 0d459495b..dc7994810 100644 --- a/src/cc/CCauction.h +++ b/src/cc/CCauction.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/CCchannels.h b/src/cc/CCchannels.h index 911cf5f81..39271616e 100644 --- a/src/cc/CCchannels.h +++ b/src/cc/CCchannels.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/CCcustom.cpp b/src/cc/CCcustom.cpp index 3b2ad457e..4df015f5b 100644 --- a/src/cc/CCcustom.cpp +++ b/src/cc/CCcustom.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/CCdice.h b/src/cc/CCdice.h index 967b51907..3082d8495 100644 --- a/src/cc/CCdice.h +++ b/src/cc/CCdice.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/CCfaucet.h b/src/cc/CCfaucet.h index c9096eabf..7e59c1342 100644 --- a/src/cc/CCfaucet.h +++ b/src/cc/CCfaucet.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/CCfsm.h b/src/cc/CCfsm.h index 56e42dabf..f88ccbf0c 100644 --- a/src/cc/CCfsm.h +++ b/src/cc/CCfsm.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/CCinclude.h b/src/cc/CCinclude.h index f2d8e8733..3ab89bd2e 100644 --- a/src/cc/CCinclude.h +++ b/src/cc/CCinclude.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/CClotto.h b/src/cc/CClotto.h index a241c2091..5c05fa42c 100644 --- a/src/cc/CClotto.h +++ b/src/cc/CClotto.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/CCrewards.h b/src/cc/CCrewards.h index 1511b698c..090712ba6 100644 --- a/src/cc/CCrewards.h +++ b/src/cc/CCrewards.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/CCtokens.cpp b/src/cc/CCtokens.cpp index e1a06b768..ed95a528e 100644 --- a/src/cc/CCtokens.cpp +++ b/src/cc/CCtokens.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/CCtokens.h b/src/cc/CCtokens.h index 0fc967ea6..211de2794 100644 --- a/src/cc/CCtokens.h +++ b/src/cc/CCtokens.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/CCtokenutils.cpp b/src/cc/CCtokenutils.cpp index 06f628ebd..201acaeea 100644 --- a/src/cc/CCtokenutils.cpp +++ b/src/cc/CCtokenutils.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/CCtx.cpp b/src/cc/CCtx.cpp index a36f61e16..c4b683933 100644 --- a/src/cc/CCtx.cpp +++ b/src/cc/CCtx.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/CCutilbits.cpp b/src/cc/CCutilbits.cpp index 1f43f884f..c74f26784 100644 --- a/src/cc/CCutilbits.cpp +++ b/src/cc/CCutilbits.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/CCutils.cpp b/src/cc/CCutils.cpp index e40698ac6..0fc5f212b 100644 --- a/src/cc/CCutils.cpp +++ b/src/cc/CCutils.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/assets.cpp b/src/cc/assets.cpp index bbf624d77..b4fdecc92 100644 --- a/src/cc/assets.cpp +++ b/src/cc/assets.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/auction.cpp b/src/cc/auction.cpp index 3f8697c7a..bdfd11f4c 100644 --- a/src/cc/auction.cpp +++ b/src/cc/auction.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/betprotocol.cpp b/src/cc/betprotocol.cpp index c6b76bb2c..d6a3cb5a8 100644 --- a/src/cc/betprotocol.cpp +++ b/src/cc/betprotocol.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/betprotocol.h b/src/cc/betprotocol.h index 5dd920aba..5bfe78ef8 100644 --- a/src/cc/betprotocol.h +++ b/src/cc/betprotocol.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/cclib.cpp b/src/cc/cclib.cpp index 30df42f3a..6046c2235 100644 --- a/src/cc/cclib.cpp +++ b/src/cc/cclib.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/channels.cpp b/src/cc/channels.cpp index 389de64d8..aeb13a311 100644 --- a/src/cc/channels.cpp +++ b/src/cc/channels.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/crypto777/OS_portable.h b/src/cc/crypto777/OS_portable.h index 892a6ad3d..52f92a383 100644 --- a/src/cc/crypto777/OS_portable.h +++ b/src/cc/crypto777/OS_portable.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers /****************************************************************************** * Copyright © 2014-2019 The SuperNET Developers. * * * diff --git a/src/cc/customcc.cpp b/src/cc/customcc.cpp index c1b1c9028..cc4f335f0 100644 --- a/src/cc/customcc.cpp +++ b/src/cc/customcc.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/customcc.h b/src/cc/customcc.h index c88f6333d..9d5b18911 100644 --- a/src/cc/customcc.h +++ b/src/cc/customcc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/dapps/Makefile b/src/cc/dapps/Makefile index 66e10d972..22b543614 100644 --- a/src/cc/dapps/Makefile +++ b/src/cc/dapps/Makefile @@ -1,4 +1,4 @@ -# Copyright (c) 2016-2021 The Hush Developers +# Copyright (c) 2016-2022 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 # Just type make to compile all dat dapp code, fellow cypherpunkz diff --git a/src/cc/dapps/cJSON.c b/src/cc/dapps/cJSON.c index eb38b80cc..2901f4968 100644 --- a/src/cc/dapps/cJSON.c +++ b/src/cc/dapps/cJSON.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/dapps/dappinc.h b/src/cc/dapps/dappinc.h index f81db7dd2..29639ba83 100644 --- a/src/cc/dapps/dappinc.h +++ b/src/cc/dapps/dappinc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/dapps/dappstd.c b/src/cc/dapps/dappstd.c index 67cb6b9cb..73ca6773c 100644 --- a/src/cc/dapps/dappstd.c +++ b/src/cc/dapps/dappstd.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/dapps/hushdex.c b/src/cc/dapps/hushdex.c index 8f4b89f2c..202265de4 100644 --- a/src/cc/dapps/hushdex.c +++ b/src/cc/dapps/hushdex.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/dapps/zmigrate.c b/src/cc/dapps/zmigrate.c index e8b547c6b..115dc02b0 100644 --- a/src/cc/dapps/zmigrate.c +++ b/src/cc/dapps/zmigrate.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/dice.cpp b/src/cc/dice.cpp index 67e5ff1bf..222da953a 100644 --- a/src/cc/dice.cpp +++ b/src/cc/dice.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/dilithium.c b/src/cc/dilithium.c index 4d7b0fd04..733f3716b 100644 --- a/src/cc/dilithium.c +++ b/src/cc/dilithium.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/cc/dilithium.h b/src/cc/dilithium.h index 9282dee9d..5023a6a51 100644 --- a/src/cc/dilithium.h +++ b/src/cc/dilithium.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/cc/disputepayout.cpp b/src/cc/disputepayout.cpp index 24ab02b74..23017a664 100644 --- a/src/cc/disputepayout.cpp +++ b/src/cc/disputepayout.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/eval.cpp b/src/cc/eval.cpp index c99160a3b..d3d62a4ac 100644 --- a/src/cc/eval.cpp +++ b/src/cc/eval.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/eval.h b/src/cc/eval.h index 5c6784086..1c4fb2616 100644 --- a/src/cc/eval.h +++ b/src/cc/eval.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/faucet.cpp b/src/cc/faucet.cpp index c7cf29fc4..d46920a50 100644 --- a/src/cc/faucet.cpp +++ b/src/cc/faucet.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/fsm.cpp b/src/cc/fsm.cpp index 64c71405c..2deeb1a62 100644 --- a/src/cc/fsm.cpp +++ b/src/cc/fsm.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/games/prices.c b/src/cc/games/prices.c index dc046d667..ad264f008 100644 --- a/src/cc/games/prices.c +++ b/src/cc/games/prices.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/cc/games/prices.cpp b/src/cc/games/prices.cpp index 287960830..85d84b730 100644 --- a/src/cc/games/prices.cpp +++ b/src/cc/games/prices.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/games/prices.h b/src/cc/games/prices.h index 258385651..0d4e32e49 100644 --- a/src/cc/games/prices.h +++ b/src/cc/games/prices.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/cc/games/tetris.c b/src/cc/games/tetris.c index 848e9aacc..882e8b4cf 100644 --- a/src/cc/games/tetris.c +++ b/src/cc/games/tetris.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/cc/games/tetris.h b/src/cc/games/tetris.h index 7ef7a9aec..0a9b2e3d2 100644 --- a/src/cc/games/tetris.h +++ b/src/cc/games/tetris.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/cc/gamescc.cpp b/src/cc/gamescc.cpp index 80251819f..02719d985 100644 --- a/src/cc/gamescc.cpp +++ b/src/cc/gamescc.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/gamescc.h b/src/cc/gamescc.h index 1e70b8647..04ac92861 100644 --- a/src/cc/gamescc.h +++ b/src/cc/gamescc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #ifndef H_GAMESCC_H diff --git a/src/cc/gateways.cpp b/src/cc/gateways.cpp index 4a38c9daf..90f0e81b8 100644 --- a/src/cc/gateways.cpp +++ b/src/cc/gateways.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/heir.cpp b/src/cc/heir.cpp index c0ac21b0b..78a767bac 100644 --- a/src/cc/heir.cpp +++ b/src/cc/heir.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/heir_validate.h b/src/cc/heir_validate.h index 9e0afa0cb..b2fbec20a 100644 --- a/src/cc/heir_validate.h +++ b/src/cc/heir_validate.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #ifndef HEIR_VALIDATE_H diff --git a/src/cc/import.cpp b/src/cc/import.cpp index 61e901e84..4b0b86060 100644 --- a/src/cc/import.cpp +++ b/src/cc/import.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/importgateway.cpp b/src/cc/importgateway.cpp index 12ab0f90e..95d2b5acc 100644 --- a/src/cc/importgateway.cpp +++ b/src/cc/importgateway.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/importpayout.cpp b/src/cc/importpayout.cpp index 481e846f0..b4da2d352 100644 --- a/src/cc/importpayout.cpp +++ b/src/cc/importpayout.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/includes/cJSON.h b/src/cc/includes/cJSON.h index 47c24b8e9..4db0fc3cb 100644 --- a/src/cc/includes/cJSON.h +++ b/src/cc/includes/cJSON.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/includes/curve25519.h b/src/cc/includes/curve25519.h index f55f0b785..b8ccac1a1 100644 --- a/src/cc/includes/curve25519.h +++ b/src/cc/includes/curve25519.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/includes/libgfshare.h b/src/cc/includes/libgfshare.h index 113fd77ec..9dd21a35c 100644 --- a/src/cc/includes/libgfshare.h +++ b/src/cc/includes/libgfshare.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/includes/tweetnacl.h b/src/cc/includes/tweetnacl.h index 2539eb8d0..188cdf525 100644 --- a/src/cc/includes/tweetnacl.h +++ b/src/cc/includes/tweetnacl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #ifndef TWEETNACL_H diff --git a/src/cc/includes/uthash.h b/src/cc/includes/uthash.h index accf4edf2..edcfdfcf8 100644 --- a/src/cc/includes/uthash.h +++ b/src/cc/includes/uthash.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/cc/includes/utlist.h b/src/cc/includes/utlist.h index c4d8f900a..c9481f3a2 100644 --- a/src/cc/includes/utlist.h +++ b/src/cc/includes/utlist.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/lotto.cpp b/src/cc/lotto.cpp index 5d1ac148b..187270fa3 100644 --- a/src/cc/lotto.cpp +++ b/src/cc/lotto.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/makecclib b/src/cc/makecclib index c7815ccde..c115cd0c1 100755 --- a/src/cc/makecclib +++ b/src/cc/makecclib @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 diff --git a/src/cc/makerogue b/src/cc/makerogue index 408b35c77..2bbcbb0cb 100755 --- a/src/cc/makerogue +++ b/src/cc/makerogue @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright 2016-2021 The Hush developers +# Copyright 2016-2022 The Hush developers cd rogue; make clean; diff --git a/src/cc/musig.cpp b/src/cc/musig.cpp index 363cca280..ef90df7ba 100644 --- a/src/cc/musig.cpp +++ b/src/cc/musig.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/oracles.cpp b/src/cc/oracles.cpp index fc3a0be41..179ad7414 100644 --- a/src/cc/oracles.cpp +++ b/src/cc/oracles.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/payments.cpp b/src/cc/payments.cpp index 4fd071fd6..886e9a2d9 100644 --- a/src/cc/payments.cpp +++ b/src/cc/payments.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/pegs.cpp b/src/cc/pegs.cpp index 47570fe05..056c9b44a 100644 --- a/src/cc/pegs.cpp +++ b/src/cc/pegs.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/prices.cpp b/src/cc/prices.cpp index a96e1ea8d..4eb1c65f3 100644 --- a/src/cc/prices.cpp +++ b/src/cc/prices.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/rewards.cpp b/src/cc/rewards.cpp index 76ce0b8dd..e48076700 100644 --- a/src/cc/rewards.cpp +++ b/src/cc/rewards.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/rogue/Makefile.in b/src/cc/rogue/Makefile.in index c215fbcb1..fa089d0ce 100644 --- a/src/cc/rogue/Makefile.in +++ b/src/cc/rogue/Makefile.in @@ -1,4 +1,4 @@ -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 ############################################################################### diff --git a/src/cc/rogue/armor.c b/src/cc/rogue/armor.c index 33bc628cc..2c74b3a90 100644 --- a/src/cc/rogue/armor.c +++ b/src/cc/rogue/armor.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/chase.c b/src/cc/rogue/chase.c index f0d6e6841..188e36b39 100644 --- a/src/cc/rogue/chase.c +++ b/src/cc/rogue/chase.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/command.c b/src/cc/rogue/command.c index dd12d2e25..678c13066 100644 --- a/src/cc/rogue/command.c +++ b/src/cc/rogue/command.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/cursesd.c b/src/cc/rogue/cursesd.c index 84ba3387f..40a9c4d5a 100644 --- a/src/cc/rogue/cursesd.c +++ b/src/cc/rogue/cursesd.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/rogue/cursesd.h b/src/cc/rogue/cursesd.h index 748e594ff..589a99361 100644 --- a/src/cc/rogue/cursesd.h +++ b/src/cc/rogue/cursesd.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/rogue/daemon.c b/src/cc/rogue/daemon.c index 20ca53e94..2a4734960 100644 --- a/src/cc/rogue/daemon.c +++ b/src/cc/rogue/daemon.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/daemons.c b/src/cc/rogue/daemons.c index 80a9e8549..11bf96f82 100644 --- a/src/cc/rogue/daemons.c +++ b/src/cc/rogue/daemons.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/extern.c b/src/cc/rogue/extern.c index bf904006b..c12a61295 100644 --- a/src/cc/rogue/extern.c +++ b/src/cc/rogue/extern.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/extern.h b/src/cc/rogue/extern.h index a0ce9dd37..ed749986b 100644 --- a/src/cc/rogue/extern.h +++ b/src/cc/rogue/extern.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/fight.c b/src/cc/rogue/fight.c index 8c8d65c3f..24f477621 100644 --- a/src/cc/rogue/fight.c +++ b/src/cc/rogue/fight.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/init.c b/src/cc/rogue/init.c index 7169ff117..4755c8e60 100644 --- a/src/cc/rogue/init.c +++ b/src/cc/rogue/init.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/io.c b/src/cc/rogue/io.c index bdb449351..0996b3e29 100644 --- a/src/cc/rogue/io.c +++ b/src/cc/rogue/io.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/list.c b/src/cc/rogue/list.c index 6f12a0795..c0e97ca41 100644 --- a/src/cc/rogue/list.c +++ b/src/cc/rogue/list.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/mach_dep.c b/src/cc/rogue/mach_dep.c index 5d12fb0ac..5d9bf07ee 100644 --- a/src/cc/rogue/mach_dep.c +++ b/src/cc/rogue/mach_dep.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/main.c b/src/cc/rogue/main.c index 5ded26d56..01324ec3f 100644 --- a/src/cc/rogue/main.c +++ b/src/cc/rogue/main.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/rogue/mdport.c b/src/cc/rogue/mdport.c index d6c6b019e..caeb57946 100644 --- a/src/cc/rogue/mdport.c +++ b/src/cc/rogue/mdport.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/misc.c b/src/cc/rogue/misc.c index 0cc3b23c7..5da9ce0aa 100644 --- a/src/cc/rogue/misc.c +++ b/src/cc/rogue/misc.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/monsters.c b/src/cc/rogue/monsters.c index 433fa89ea..6485082e4 100644 --- a/src/cc/rogue/monsters.c +++ b/src/cc/rogue/monsters.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/move.c b/src/cc/rogue/move.c index e3e265119..d4107150c 100644 --- a/src/cc/rogue/move.c +++ b/src/cc/rogue/move.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/new_level.c b/src/cc/rogue/new_level.c index 47453ef92..def062547 100644 --- a/src/cc/rogue/new_level.c +++ b/src/cc/rogue/new_level.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/options.c b/src/cc/rogue/options.c index dfecdcb89..5cf0150b5 100644 --- a/src/cc/rogue/options.c +++ b/src/cc/rogue/options.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/pack.c b/src/cc/rogue/pack.c index 72ee6031c..0ad0e7420 100644 --- a/src/cc/rogue/pack.c +++ b/src/cc/rogue/pack.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/passages.c b/src/cc/rogue/passages.c index 099193269..e9aea4611 100644 --- a/src/cc/rogue/passages.c +++ b/src/cc/rogue/passages.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/potions.c b/src/cc/rogue/potions.c index 314f91916..4d952ada6 100644 --- a/src/cc/rogue/potions.c +++ b/src/cc/rogue/potions.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/rings.c b/src/cc/rogue/rings.c index 5812f9421..cb1b9f5b3 100644 --- a/src/cc/rogue/rings.c +++ b/src/cc/rogue/rings.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/rip.c b/src/cc/rogue/rip.c index 29c3e1566..43a2a42ae 100644 --- a/src/cc/rogue/rip.c +++ b/src/cc/rogue/rip.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/rogue.c b/src/cc/rogue/rogue.c index 9f135f894..54ad07f1b 100644 --- a/src/cc/rogue/rogue.c +++ b/src/cc/rogue/rogue.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/rogue.h b/src/cc/rogue/rogue.h index 94a72d636..1b3e4a070 100644 --- a/src/cc/rogue/rogue.h +++ b/src/cc/rogue/rogue.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/rogue_player.h b/src/cc/rogue/rogue_player.h index 8aa7ae755..474198b6c 100644 --- a/src/cc/rogue/rogue_player.h +++ b/src/cc/rogue/rogue_player.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cc/rogue/rooms.c b/src/cc/rogue/rooms.c index 9ad2c8cfe..a5521f516 100644 --- a/src/cc/rogue/rooms.c +++ b/src/cc/rogue/rooms.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/save.c b/src/cc/rogue/save.c index ab01d49c5..3d09bb0c4 100644 --- a/src/cc/rogue/save.c +++ b/src/cc/rogue/save.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/score.h b/src/cc/rogue/score.h index 4905e8a5e..c97b27cf3 100644 --- a/src/cc/rogue/score.h +++ b/src/cc/rogue/score.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/scrolls.c b/src/cc/rogue/scrolls.c index 7fe34a05c..6153aad5d 100644 --- a/src/cc/rogue/scrolls.c +++ b/src/cc/rogue/scrolls.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/state.c b/src/cc/rogue/state.c index cf140dc19..08a6d469f 100644 --- a/src/cc/rogue/state.c +++ b/src/cc/rogue/state.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/sticks.c b/src/cc/rogue/sticks.c index 8dc119b3d..416adc423 100644 --- a/src/cc/rogue/sticks.c +++ b/src/cc/rogue/sticks.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/things.c b/src/cc/rogue/things.c index fc076b112..3ef9e889e 100644 --- a/src/cc/rogue/things.c +++ b/src/cc/rogue/things.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/vers.c b/src/cc/rogue/vers.c index d733e9e81..7973d231b 100644 --- a/src/cc/rogue/vers.c +++ b/src/cc/rogue/vers.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/weapons.c b/src/cc/rogue/weapons.c index 2df9faf65..a2c36a406 100644 --- a/src/cc/rogue/weapons.c +++ b/src/cc/rogue/weapons.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/wizard.c b/src/cc/rogue/wizard.c index d36e8a3b3..ee28bb1d5 100644 --- a/src/cc/rogue/wizard.c +++ b/src/cc/rogue/wizard.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue/xcrypt.c b/src/cc/rogue/xcrypt.c index 9a2b7fd39..c5d9f1bad 100644 --- a/src/cc/rogue/xcrypt.c +++ b/src/cc/rogue/xcrypt.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cc/rogue_rpc.cpp b/src/cc/rogue_rpc.cpp index b1fd8635d..22b154b0d 100644 --- a/src/cc/rogue_rpc.cpp +++ b/src/cc/rogue_rpc.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/cc/sudoku.cpp b/src/cc/sudoku.cpp index 4feda6701..d887cd6c4 100644 --- a/src/cc/sudoku.cpp +++ b/src/cc/sudoku.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 // From https://github.com/attractivechaos/plb/blob/master/sudoku/incoming/sudoku_solver.c diff --git a/src/cc/utils.h b/src/cc/utils.h index 5422b92a3..5d2bc2cba 100644 --- a/src/cc/utils.h +++ b/src/cc/utils.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/chain.cpp b/src/chain.cpp index d2b7382d9..e04bc1736 100644 --- a/src/chain.cpp +++ b/src/chain.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/chain.h b/src/chain.h index 3162f6634..2e49e64c4 100644 --- a/src/chain.h +++ b/src/chain.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/chainparams.cpp b/src/chainparams.cpp index fe1470556..6f44af2da 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 ///////////////////////////////////////////////////////////////////////////////// diff --git a/src/chainparams.h b/src/chainparams.h index 350aeb4de..9e2707b31 100644 --- a/src/chainparams.h +++ b/src/chainparams.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/chainparamsbase.cpp b/src/chainparamsbase.cpp index 1f0eb7740..4244e7f53 100644 --- a/src/chainparamsbase.cpp +++ b/src/chainparamsbase.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp index 9a0b7a67d..c9ac9b783 100644 --- a/src/checkpoints.cpp +++ b/src/checkpoints.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/checkpoints.h b/src/checkpoints.h index 8a6cbb015..75462e1d1 100644 --- a/src/checkpoints.h +++ b/src/checkpoints.h @@ -1,5 +1,5 @@ // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/checkqueue.h b/src/checkqueue.h index 9cbf25cf2..bea5ed1bb 100644 --- a/src/checkqueue.h +++ b/src/checkqueue.h @@ -1,5 +1,5 @@ // Copyright (c) 2012-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/clientversion.cpp b/src/clientversion.cpp index cd6126eb1..49af10dda 100644 --- a/src/clientversion.cpp +++ b/src/clientversion.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2012-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/clientversion.h b/src/clientversion.h index 461c4c197..bc2ab199f 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-2021 The Hush developers +// Copyright (c) 2016-2022 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 developers, who cared about privacy? diff --git a/src/coincontrol.h b/src/coincontrol.h index 3f8d0539d..e7dfbf13d 100644 --- a/src/coincontrol.h +++ b/src/coincontrol.h @@ -1,5 +1,5 @@ // Copyright (c) 2011-2013 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/coins.cpp b/src/coins.cpp index 0c3af3863..57e692444 100644 --- a/src/coins.cpp +++ b/src/coins.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2012-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/coins.h b/src/coins.h index 282fe816c..c9cae350b 100644 --- a/src/coins.h +++ b/src/coins.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/compressor.cpp b/src/compressor.cpp index b55313486..b3f06e47e 100644 --- a/src/compressor.cpp +++ b/src/compressor.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying diff --git a/src/consensus/params.h b/src/consensus/params.h index f3484e6e9..3a6e2cceb 100644 --- a/src/consensus/params.h +++ b/src/consensus/params.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/consensus/upgrades.cpp b/src/consensus/upgrades.cpp index a24e74658..9be24c20b 100644 --- a/src/consensus/upgrades.cpp +++ b/src/consensus/upgrades.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2018 The Zcash developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/core_memusage.h b/src/core_memusage.h index 9e680cbe4..636bbf79f 100644 --- a/src/core_memusage.h +++ b/src/core_memusage.h @@ -1,5 +1,5 @@ // Copyright (c) 2015 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/core_read.cpp b/src/core_read.cpp index d092f6624..3e01a37e3 100644 --- a/src/core_read.cpp +++ b/src/core_read.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2009-2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/core_write.cpp b/src/core_write.cpp index 67953e2fa..8b890db21 100644 --- a/src/core_write.cpp +++ b/src/core_write.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2009-2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/crosschain.cpp b/src/crosschain.cpp index 7968b7292..68c5ce23d 100644 --- a/src/crosschain.cpp +++ b/src/crosschain.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/crosschain.h b/src/crosschain.h index f20a1c6f1..4d085166e 100644 --- a/src/crosschain.h +++ b/src/crosschain.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/crosschain_authority.cpp b/src/crosschain_authority.cpp index 2a63998a1..d3c1ff6e1 100644 --- a/src/crosschain_authority.cpp +++ b/src/crosschain_authority.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include "cc/eval.h" diff --git a/src/crypto/common.h b/src/crypto/common.h index e299f4098..d07ff0730 100644 --- a/src/crypto/common.h +++ b/src/crypto/common.h @@ -1,5 +1,5 @@ // Copyright (c) 2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Released under the GPLv3 // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/crypto/equihash.h b/src/crypto/equihash.h index 968fbdd79..23530cc61 100644 --- a/src/crypto/equihash.h +++ b/src/crypto/equihash.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2016 Jack Grigg // Copyright (c) 2016 The Zcash developers // Distributed under the GPLv3 software license, see the accompanying diff --git a/src/cryptoconditions/AUTHORS b/src/cryptoconditions/AUTHORS index bf0bcc88b..3baf5f36e 100644 --- a/src/cryptoconditions/AUTHORS +++ b/src/cryptoconditions/AUTHORS @@ -4,6 +4,6 @@ Copyright 2017 Scott Sadler # Current Authors -Copyright (c) 2016-2021 The Hush Developers +Copyright (c) 2016-2022 The Hush Developers Relicensed to GPLv3 on Nov 21st 2020. diff --git a/src/cryptoconditions/src/anon.c b/src/cryptoconditions/src/anon.c index 57c5cac45..3ec319cde 100644 --- a/src/cryptoconditions/src/anon.c +++ b/src/cryptoconditions/src/anon.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers /****************************************************************************** * Copyright © 2014-2019 The SuperNET Developers. * * * diff --git a/src/cryptoconditions/src/asn/BIT_STRING.c b/src/cryptoconditions/src/asn/BIT_STRING.c index 6db8df17c..89df2aebf 100644 --- a/src/cryptoconditions/src/asn/BIT_STRING.c +++ b/src/cryptoconditions/src/asn/BIT_STRING.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/BIT_STRING.h b/src/cryptoconditions/src/asn/BIT_STRING.h index 6ce2b9091..415dc9475 100644 --- a/src/cryptoconditions/src/asn/BIT_STRING.h +++ b/src/cryptoconditions/src/asn/BIT_STRING.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/CompoundSha256Condition.c b/src/cryptoconditions/src/asn/CompoundSha256Condition.c index a14b50a5b..a6670a69f 100644 --- a/src/cryptoconditions/src/asn/CompoundSha256Condition.c +++ b/src/cryptoconditions/src/asn/CompoundSha256Condition.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/CompoundSha256Condition.h b/src/cryptoconditions/src/asn/CompoundSha256Condition.h index b8604c113..c80c38e63 100644 --- a/src/cryptoconditions/src/asn/CompoundSha256Condition.h +++ b/src/cryptoconditions/src/asn/CompoundSha256Condition.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/Condition.c b/src/cryptoconditions/src/asn/Condition.c index d48d14433..022d40199 100644 --- a/src/cryptoconditions/src/asn/Condition.c +++ b/src/cryptoconditions/src/asn/Condition.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/Condition.h b/src/cryptoconditions/src/asn/Condition.h index a67d6f617..f89f3691e 100644 --- a/src/cryptoconditions/src/asn/Condition.h +++ b/src/cryptoconditions/src/asn/Condition.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/ConditionTypes.c b/src/cryptoconditions/src/asn/ConditionTypes.c index 28368b87c..8bde4c5ff 100644 --- a/src/cryptoconditions/src/asn/ConditionTypes.c +++ b/src/cryptoconditions/src/asn/ConditionTypes.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/ConditionTypes.h b/src/cryptoconditions/src/asn/ConditionTypes.h index 4ef2a745c..a517a835e 100644 --- a/src/cryptoconditions/src/asn/ConditionTypes.h +++ b/src/cryptoconditions/src/asn/ConditionTypes.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/Ed25519FingerprintContents.c b/src/cryptoconditions/src/asn/Ed25519FingerprintContents.c index 52fc23f72..7f84b2d59 100644 --- a/src/cryptoconditions/src/asn/Ed25519FingerprintContents.c +++ b/src/cryptoconditions/src/asn/Ed25519FingerprintContents.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/Ed25519FingerprintContents.h b/src/cryptoconditions/src/asn/Ed25519FingerprintContents.h index fbebcbd69..7030f86cf 100644 --- a/src/cryptoconditions/src/asn/Ed25519FingerprintContents.h +++ b/src/cryptoconditions/src/asn/Ed25519FingerprintContents.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/Ed25519Sha512Fulfillment.c b/src/cryptoconditions/src/asn/Ed25519Sha512Fulfillment.c index 24c74e786..f95636c4b 100644 --- a/src/cryptoconditions/src/asn/Ed25519Sha512Fulfillment.c +++ b/src/cryptoconditions/src/asn/Ed25519Sha512Fulfillment.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/Ed25519Sha512Fulfillment.h b/src/cryptoconditions/src/asn/Ed25519Sha512Fulfillment.h index cf41cadc0..739467750 100644 --- a/src/cryptoconditions/src/asn/Ed25519Sha512Fulfillment.h +++ b/src/cryptoconditions/src/asn/Ed25519Sha512Fulfillment.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/EvalFulfillment.c b/src/cryptoconditions/src/asn/EvalFulfillment.c index c020697be..06453f83a 100644 --- a/src/cryptoconditions/src/asn/EvalFulfillment.c +++ b/src/cryptoconditions/src/asn/EvalFulfillment.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/EvalFulfillment.h b/src/cryptoconditions/src/asn/EvalFulfillment.h index 3c7e0f7de..b09f0b1cc 100644 --- a/src/cryptoconditions/src/asn/EvalFulfillment.h +++ b/src/cryptoconditions/src/asn/EvalFulfillment.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/Fulfillment.c b/src/cryptoconditions/src/asn/Fulfillment.c index d0fb00481..428372bcf 100644 --- a/src/cryptoconditions/src/asn/Fulfillment.c +++ b/src/cryptoconditions/src/asn/Fulfillment.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/Fulfillment.h b/src/cryptoconditions/src/asn/Fulfillment.h index 7df390cb8..5d409f46d 100644 --- a/src/cryptoconditions/src/asn/Fulfillment.h +++ b/src/cryptoconditions/src/asn/Fulfillment.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/INTEGER.c b/src/cryptoconditions/src/asn/INTEGER.c index 8e4da42ee..b3b1b7434 100644 --- a/src/cryptoconditions/src/asn/INTEGER.c +++ b/src/cryptoconditions/src/asn/INTEGER.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/INTEGER.h b/src/cryptoconditions/src/asn/INTEGER.h index a0affd22c..e8d56f155 100644 --- a/src/cryptoconditions/src/asn/INTEGER.h +++ b/src/cryptoconditions/src/asn/INTEGER.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/NativeEnumerated.c b/src/cryptoconditions/src/asn/NativeEnumerated.c index 9e8402ab0..4f71048d2 100644 --- a/src/cryptoconditions/src/asn/NativeEnumerated.c +++ b/src/cryptoconditions/src/asn/NativeEnumerated.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/NativeEnumerated.h b/src/cryptoconditions/src/asn/NativeEnumerated.h index aa7106a74..036fe1f7a 100644 --- a/src/cryptoconditions/src/asn/NativeEnumerated.h +++ b/src/cryptoconditions/src/asn/NativeEnumerated.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/NativeInteger.c b/src/cryptoconditions/src/asn/NativeInteger.c index c856754ff..16a23aa64 100644 --- a/src/cryptoconditions/src/asn/NativeInteger.c +++ b/src/cryptoconditions/src/asn/NativeInteger.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/NativeInteger.h b/src/cryptoconditions/src/asn/NativeInteger.h index 2eff4adbd..76d9d16b3 100644 --- a/src/cryptoconditions/src/asn/NativeInteger.h +++ b/src/cryptoconditions/src/asn/NativeInteger.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/OCTET_STRING.c b/src/cryptoconditions/src/asn/OCTET_STRING.c index 1ef107d85..c7d818352 100644 --- a/src/cryptoconditions/src/asn/OCTET_STRING.c +++ b/src/cryptoconditions/src/asn/OCTET_STRING.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/OCTET_STRING.h b/src/cryptoconditions/src/asn/OCTET_STRING.h index 41f024dac..d0a080877 100644 --- a/src/cryptoconditions/src/asn/OCTET_STRING.h +++ b/src/cryptoconditions/src/asn/OCTET_STRING.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/PrefixFingerprintContents.c b/src/cryptoconditions/src/asn/PrefixFingerprintContents.c index 43717477f..4c6171fcd 100644 --- a/src/cryptoconditions/src/asn/PrefixFingerprintContents.c +++ b/src/cryptoconditions/src/asn/PrefixFingerprintContents.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/PrefixFingerprintContents.h b/src/cryptoconditions/src/asn/PrefixFingerprintContents.h index 4e2993220..aa9b79a01 100644 --- a/src/cryptoconditions/src/asn/PrefixFingerprintContents.h +++ b/src/cryptoconditions/src/asn/PrefixFingerprintContents.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/PrefixFulfillment.c b/src/cryptoconditions/src/asn/PrefixFulfillment.c index 8e196e0a8..51d8e7a74 100644 --- a/src/cryptoconditions/src/asn/PrefixFulfillment.c +++ b/src/cryptoconditions/src/asn/PrefixFulfillment.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/PrefixFulfillment.h b/src/cryptoconditions/src/asn/PrefixFulfillment.h index 2452db17c..b6c6f410f 100644 --- a/src/cryptoconditions/src/asn/PrefixFulfillment.h +++ b/src/cryptoconditions/src/asn/PrefixFulfillment.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/PreimageFulfillment.c b/src/cryptoconditions/src/asn/PreimageFulfillment.c index b1b18bcd3..c98df0ed1 100644 --- a/src/cryptoconditions/src/asn/PreimageFulfillment.c +++ b/src/cryptoconditions/src/asn/PreimageFulfillment.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/PreimageFulfillment.h b/src/cryptoconditions/src/asn/PreimageFulfillment.h index 8a46bef28..8329b47df 100644 --- a/src/cryptoconditions/src/asn/PreimageFulfillment.h +++ b/src/cryptoconditions/src/asn/PreimageFulfillment.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/RsaFingerprintContents.c b/src/cryptoconditions/src/asn/RsaFingerprintContents.c index 2a7e9a83a..a21b33069 100644 --- a/src/cryptoconditions/src/asn/RsaFingerprintContents.c +++ b/src/cryptoconditions/src/asn/RsaFingerprintContents.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/RsaFingerprintContents.h b/src/cryptoconditions/src/asn/RsaFingerprintContents.h index 456555c30..095ebd4ce 100644 --- a/src/cryptoconditions/src/asn/RsaFingerprintContents.h +++ b/src/cryptoconditions/src/asn/RsaFingerprintContents.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/RsaSha256Fulfillment.c b/src/cryptoconditions/src/asn/RsaSha256Fulfillment.c index d2a88e72c..52d58d1fa 100644 --- a/src/cryptoconditions/src/asn/RsaSha256Fulfillment.c +++ b/src/cryptoconditions/src/asn/RsaSha256Fulfillment.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/RsaSha256Fulfillment.h b/src/cryptoconditions/src/asn/RsaSha256Fulfillment.h index cd1d51be8..64a78cbf2 100644 --- a/src/cryptoconditions/src/asn/RsaSha256Fulfillment.h +++ b/src/cryptoconditions/src/asn/RsaSha256Fulfillment.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/Secp256k1FingerprintContents.c b/src/cryptoconditions/src/asn/Secp256k1FingerprintContents.c index 4d04257b1..b7ea1b971 100644 --- a/src/cryptoconditions/src/asn/Secp256k1FingerprintContents.c +++ b/src/cryptoconditions/src/asn/Secp256k1FingerprintContents.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/Secp256k1FingerprintContents.h b/src/cryptoconditions/src/asn/Secp256k1FingerprintContents.h index 716dbb754..7fbadb386 100644 --- a/src/cryptoconditions/src/asn/Secp256k1FingerprintContents.h +++ b/src/cryptoconditions/src/asn/Secp256k1FingerprintContents.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/Secp256k1Fulfillment.c b/src/cryptoconditions/src/asn/Secp256k1Fulfillment.c index 6980e62b4..53689d049 100644 --- a/src/cryptoconditions/src/asn/Secp256k1Fulfillment.c +++ b/src/cryptoconditions/src/asn/Secp256k1Fulfillment.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/Secp256k1Fulfillment.h b/src/cryptoconditions/src/asn/Secp256k1Fulfillment.h index 398820556..a672a55d6 100644 --- a/src/cryptoconditions/src/asn/Secp256k1Fulfillment.h +++ b/src/cryptoconditions/src/asn/Secp256k1Fulfillment.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/SimpleSha256Condition.c b/src/cryptoconditions/src/asn/SimpleSha256Condition.c index aaaaa5e69..0633348fc 100644 --- a/src/cryptoconditions/src/asn/SimpleSha256Condition.c +++ b/src/cryptoconditions/src/asn/SimpleSha256Condition.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/SimpleSha256Condition.h b/src/cryptoconditions/src/asn/SimpleSha256Condition.h index 8dc40fec8..3e883d5d3 100644 --- a/src/cryptoconditions/src/asn/SimpleSha256Condition.h +++ b/src/cryptoconditions/src/asn/SimpleSha256Condition.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/ThresholdFingerprintContents.c b/src/cryptoconditions/src/asn/ThresholdFingerprintContents.c index e42b6b4d0..38248ccfc 100644 --- a/src/cryptoconditions/src/asn/ThresholdFingerprintContents.c +++ b/src/cryptoconditions/src/asn/ThresholdFingerprintContents.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/ThresholdFingerprintContents.h b/src/cryptoconditions/src/asn/ThresholdFingerprintContents.h index 77fdd272b..fcaf3c032 100644 --- a/src/cryptoconditions/src/asn/ThresholdFingerprintContents.h +++ b/src/cryptoconditions/src/asn/ThresholdFingerprintContents.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/ThresholdFulfillment.c b/src/cryptoconditions/src/asn/ThresholdFulfillment.c index c060fd38a..ef8aa26fa 100644 --- a/src/cryptoconditions/src/asn/ThresholdFulfillment.c +++ b/src/cryptoconditions/src/asn/ThresholdFulfillment.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/ThresholdFulfillment.h b/src/cryptoconditions/src/asn/ThresholdFulfillment.h index 2bc145aef..1c2a38a3c 100644 --- a/src/cryptoconditions/src/asn/ThresholdFulfillment.h +++ b/src/cryptoconditions/src/asn/ThresholdFulfillment.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/asn_SET_OF.c b/src/cryptoconditions/src/asn/asn_SET_OF.c index cc2bd5c1a..8223117e3 100644 --- a/src/cryptoconditions/src/asn/asn_SET_OF.c +++ b/src/cryptoconditions/src/asn/asn_SET_OF.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/asn_SET_OF.h b/src/cryptoconditions/src/asn/asn_SET_OF.h index 1beb19090..7346d4d59 100644 --- a/src/cryptoconditions/src/asn/asn_SET_OF.h +++ b/src/cryptoconditions/src/asn/asn_SET_OF.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/asn_application.h b/src/cryptoconditions/src/asn/asn_application.h index 2e03c0973..1fc5994bd 100644 --- a/src/cryptoconditions/src/asn/asn_application.h +++ b/src/cryptoconditions/src/asn/asn_application.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/asn_codecs.h b/src/cryptoconditions/src/asn/asn_codecs.h index 22fe3a130..2194160de 100644 --- a/src/cryptoconditions/src/asn/asn_codecs.h +++ b/src/cryptoconditions/src/asn/asn_codecs.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/asn_codecs_prim.c b/src/cryptoconditions/src/asn/asn_codecs_prim.c index 0cecf9201..9cbce8a52 100644 --- a/src/cryptoconditions/src/asn/asn_codecs_prim.c +++ b/src/cryptoconditions/src/asn/asn_codecs_prim.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/asn_codecs_prim.h b/src/cryptoconditions/src/asn/asn_codecs_prim.h index 853e9ded6..45c4368af 100644 --- a/src/cryptoconditions/src/asn/asn_codecs_prim.h +++ b/src/cryptoconditions/src/asn/asn_codecs_prim.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/asn_internal.h b/src/cryptoconditions/src/asn/asn_internal.h index f5996bbed..7e864792f 100644 --- a/src/cryptoconditions/src/asn/asn_internal.h +++ b/src/cryptoconditions/src/asn/asn_internal.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/asn_system.h b/src/cryptoconditions/src/asn/asn_system.h index 1190cc94a..0f8e85652 100644 --- a/src/cryptoconditions/src/asn/asn_system.h +++ b/src/cryptoconditions/src/asn/asn_system.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/ber_decoder.c b/src/cryptoconditions/src/asn/ber_decoder.c index 693df71f3..e1aa1cd73 100644 --- a/src/cryptoconditions/src/asn/ber_decoder.c +++ b/src/cryptoconditions/src/asn/ber_decoder.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/ber_decoder.h b/src/cryptoconditions/src/asn/ber_decoder.h index ecffc78bf..94c27b5d5 100644 --- a/src/cryptoconditions/src/asn/ber_decoder.h +++ b/src/cryptoconditions/src/asn/ber_decoder.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/ber_tlv_length.c b/src/cryptoconditions/src/asn/ber_tlv_length.c index 880d4f106..79c723421 100644 --- a/src/cryptoconditions/src/asn/ber_tlv_length.c +++ b/src/cryptoconditions/src/asn/ber_tlv_length.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/ber_tlv_length.h b/src/cryptoconditions/src/asn/ber_tlv_length.h index db678bd0d..1f09d0dde 100644 --- a/src/cryptoconditions/src/asn/ber_tlv_length.h +++ b/src/cryptoconditions/src/asn/ber_tlv_length.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/ber_tlv_tag.c b/src/cryptoconditions/src/asn/ber_tlv_tag.c index e0c5729e9..a0e7f8c08 100644 --- a/src/cryptoconditions/src/asn/ber_tlv_tag.c +++ b/src/cryptoconditions/src/asn/ber_tlv_tag.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/ber_tlv_tag.h b/src/cryptoconditions/src/asn/ber_tlv_tag.h index 649ff07ae..47ffa5772 100644 --- a/src/cryptoconditions/src/asn/ber_tlv_tag.h +++ b/src/cryptoconditions/src/asn/ber_tlv_tag.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/constr_CHOICE.c b/src/cryptoconditions/src/asn/constr_CHOICE.c index 100b50273..73094b0bf 100644 --- a/src/cryptoconditions/src/asn/constr_CHOICE.c +++ b/src/cryptoconditions/src/asn/constr_CHOICE.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/constr_CHOICE.h b/src/cryptoconditions/src/asn/constr_CHOICE.h index a397c82e5..ec2e6a506 100644 --- a/src/cryptoconditions/src/asn/constr_CHOICE.h +++ b/src/cryptoconditions/src/asn/constr_CHOICE.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/constr_SEQUENCE.c b/src/cryptoconditions/src/asn/constr_SEQUENCE.c index dbe4585d6..696dc0220 100644 --- a/src/cryptoconditions/src/asn/constr_SEQUENCE.c +++ b/src/cryptoconditions/src/asn/constr_SEQUENCE.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/constr_SEQUENCE.h b/src/cryptoconditions/src/asn/constr_SEQUENCE.h index 170a2e65c..11a55a4f1 100644 --- a/src/cryptoconditions/src/asn/constr_SEQUENCE.h +++ b/src/cryptoconditions/src/asn/constr_SEQUENCE.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/constr_SET_OF.c b/src/cryptoconditions/src/asn/constr_SET_OF.c index acb570453..84196dc0e 100644 --- a/src/cryptoconditions/src/asn/constr_SET_OF.c +++ b/src/cryptoconditions/src/asn/constr_SET_OF.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/constr_SET_OF.h b/src/cryptoconditions/src/asn/constr_SET_OF.h index e3f5903fb..184ce08fc 100644 --- a/src/cryptoconditions/src/asn/constr_SET_OF.h +++ b/src/cryptoconditions/src/asn/constr_SET_OF.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/constr_TYPE.c b/src/cryptoconditions/src/asn/constr_TYPE.c index 2f20284d7..09c5e22da 100644 --- a/src/cryptoconditions/src/asn/constr_TYPE.c +++ b/src/cryptoconditions/src/asn/constr_TYPE.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/constr_TYPE.h b/src/cryptoconditions/src/asn/constr_TYPE.h index cb170366b..6a4a4c793 100644 --- a/src/cryptoconditions/src/asn/constr_TYPE.h +++ b/src/cryptoconditions/src/asn/constr_TYPE.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/constraints.c b/src/cryptoconditions/src/asn/constraints.c index 423c98de4..9156af35f 100644 --- a/src/cryptoconditions/src/asn/constraints.c +++ b/src/cryptoconditions/src/asn/constraints.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include "asn_internal.h" diff --git a/src/cryptoconditions/src/asn/constraints.h b/src/cryptoconditions/src/asn/constraints.h index 081ad0664..071a33f40 100644 --- a/src/cryptoconditions/src/asn/constraints.h +++ b/src/cryptoconditions/src/asn/constraints.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/der_encoder.c b/src/cryptoconditions/src/asn/der_encoder.c index 88cefa9eb..5b8aff86e 100644 --- a/src/cryptoconditions/src/asn/der_encoder.c +++ b/src/cryptoconditions/src/asn/der_encoder.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/der_encoder.h b/src/cryptoconditions/src/asn/der_encoder.h index e16d2d153..21c0021e0 100644 --- a/src/cryptoconditions/src/asn/der_encoder.h +++ b/src/cryptoconditions/src/asn/der_encoder.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/per_decoder.c b/src/cryptoconditions/src/asn/per_decoder.c index 39615d05b..25d078149 100644 --- a/src/cryptoconditions/src/asn/per_decoder.c +++ b/src/cryptoconditions/src/asn/per_decoder.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include "asn_application.h" diff --git a/src/cryptoconditions/src/asn/per_decoder.h b/src/cryptoconditions/src/asn/per_decoder.h index 3d13859d7..d3a038a4a 100644 --- a/src/cryptoconditions/src/asn/per_decoder.h +++ b/src/cryptoconditions/src/asn/per_decoder.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/per_encoder.c b/src/cryptoconditions/src/asn/per_encoder.c index d0ff9139b..063a0be06 100644 --- a/src/cryptoconditions/src/asn/per_encoder.c +++ b/src/cryptoconditions/src/asn/per_encoder.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include "asn_application.h" diff --git a/src/cryptoconditions/src/asn/per_encoder.h b/src/cryptoconditions/src/asn/per_encoder.h index da255b556..c9b451c70 100644 --- a/src/cryptoconditions/src/asn/per_encoder.h +++ b/src/cryptoconditions/src/asn/per_encoder.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/per_opentype.c b/src/cryptoconditions/src/asn/per_opentype.c index 7f7ee61d9..573667e74 100644 --- a/src/cryptoconditions/src/asn/per_opentype.c +++ b/src/cryptoconditions/src/asn/per_opentype.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/per_opentype.h b/src/cryptoconditions/src/asn/per_opentype.h index 43b16552f..f0b998784 100644 --- a/src/cryptoconditions/src/asn/per_opentype.h +++ b/src/cryptoconditions/src/asn/per_opentype.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/per_support.c b/src/cryptoconditions/src/asn/per_support.c index ad898484d..39fb38b5e 100644 --- a/src/cryptoconditions/src/asn/per_support.c +++ b/src/cryptoconditions/src/asn/per_support.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/per_support.h b/src/cryptoconditions/src/asn/per_support.h index 75a72744f..cdb064a5a 100644 --- a/src/cryptoconditions/src/asn/per_support.h +++ b/src/cryptoconditions/src/asn/per_support.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/xer_decoder.c b/src/cryptoconditions/src/asn/xer_decoder.c index 585ad847c..a09e1b7d1 100644 --- a/src/cryptoconditions/src/asn/xer_decoder.c +++ b/src/cryptoconditions/src/asn/xer_decoder.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/xer_decoder.h b/src/cryptoconditions/src/asn/xer_decoder.h index 2893e323e..6ee5fb61a 100644 --- a/src/cryptoconditions/src/asn/xer_decoder.h +++ b/src/cryptoconditions/src/asn/xer_decoder.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/xer_encoder.c b/src/cryptoconditions/src/asn/xer_encoder.c index c187de5b3..26c9c92da 100644 --- a/src/cryptoconditions/src/asn/xer_encoder.c +++ b/src/cryptoconditions/src/asn/xer_encoder.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/xer_encoder.h b/src/cryptoconditions/src/asn/xer_encoder.h index 470808a1c..fb58a37d6 100644 --- a/src/cryptoconditions/src/asn/xer_encoder.h +++ b/src/cryptoconditions/src/asn/xer_encoder.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/asn/xer_support.c b/src/cryptoconditions/src/asn/xer_support.c index 0826eed81..85c6e320f 100644 --- a/src/cryptoconditions/src/asn/xer_support.c +++ b/src/cryptoconditions/src/asn/xer_support.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/asn/xer_support.h b/src/cryptoconditions/src/asn/xer_support.h index 91657bf43..b041f3310 100644 --- a/src/cryptoconditions/src/asn/xer_support.h +++ b/src/cryptoconditions/src/asn/xer_support.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/cryptoconditions.c b/src/cryptoconditions/src/cryptoconditions.c index e891fca30..a6b2d9156 100644 --- a/src/cryptoconditions/src/cryptoconditions.c +++ b/src/cryptoconditions/src/cryptoconditions.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cryptoconditions/src/ed25519.c b/src/cryptoconditions/src/ed25519.c index 9ec8f591b..604c07c02 100644 --- a/src/cryptoconditions/src/ed25519.c +++ b/src/cryptoconditions/src/ed25519.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cryptoconditions/src/eval.c b/src/cryptoconditions/src/eval.c index d32e380ba..3b33110f7 100644 --- a/src/cryptoconditions/src/eval.c +++ b/src/cryptoconditions/src/eval.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cryptoconditions/src/include/cJSON.c b/src/cryptoconditions/src/include/cJSON.c index 19d4a3607..3a4c6f7d3 100644 --- a/src/cryptoconditions/src/include/cJSON.c +++ b/src/cryptoconditions/src/include/cJSON.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/include/cJSON.h b/src/cryptoconditions/src/include/cJSON.h index 492d61e36..8b643f561 100644 --- a/src/cryptoconditions/src/include/cJSON.h +++ b/src/cryptoconditions/src/include/cJSON.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/cryptoconditions/src/include/libbase58.h b/src/cryptoconditions/src/include/libbase58.h index 91ce97465..87b546e5e 100644 --- a/src/cryptoconditions/src/include/libbase58.h +++ b/src/cryptoconditions/src/include/libbase58.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cryptoconditions/src/include/sha256.c b/src/cryptoconditions/src/include/sha256.c index ce23e0814..743ac3420 100644 --- a/src/cryptoconditions/src/include/sha256.c +++ b/src/cryptoconditions/src/include/sha256.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/include/sha256.h b/src/cryptoconditions/src/include/sha256.h index 7c952b0ea..594127427 100644 --- a/src/cryptoconditions/src/include/sha256.h +++ b/src/cryptoconditions/src/include/sha256.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /*- diff --git a/src/cryptoconditions/src/include/tweetnacl.c b/src/cryptoconditions/src/include/tweetnacl.c index d07f81066..5bc6fb071 100644 --- a/src/cryptoconditions/src/include/tweetnacl.c +++ b/src/cryptoconditions/src/include/tweetnacl.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include "tweetnacl.h" diff --git a/src/cryptoconditions/src/include/tweetnacl.h b/src/cryptoconditions/src/include/tweetnacl.h index 89a7de1d5..80c7d833e 100644 --- a/src/cryptoconditions/src/include/tweetnacl.h +++ b/src/cryptoconditions/src/include/tweetnacl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #ifndef TWEETNACL_H diff --git a/src/cryptoconditions/src/internal.h b/src/cryptoconditions/src/internal.h index e7950c2ea..f84a2ec09 100644 --- a/src/cryptoconditions/src/internal.h +++ b/src/cryptoconditions/src/internal.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers /****************************************************************************** * Copyright © 2014-2019 The SuperNET Developers. * * * diff --git a/src/cryptoconditions/src/json_rpc.c b/src/cryptoconditions/src/json_rpc.c index 1ab57d0cc..42be07b5a 100644 --- a/src/cryptoconditions/src/json_rpc.c +++ b/src/cryptoconditions/src/json_rpc.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cryptoconditions/src/prefix.c b/src/cryptoconditions/src/prefix.c index fc784dca5..e639a6cc9 100644 --- a/src/cryptoconditions/src/prefix.c +++ b/src/cryptoconditions/src/prefix.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cryptoconditions/src/preimage.c b/src/cryptoconditions/src/preimage.c index 765677902..4518f2402 100644 --- a/src/cryptoconditions/src/preimage.c +++ b/src/cryptoconditions/src/preimage.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cryptoconditions/src/secp256k1.c b/src/cryptoconditions/src/secp256k1.c index af46ad5dc..ffcca123c 100644 --- a/src/cryptoconditions/src/secp256k1.c +++ b/src/cryptoconditions/src/secp256k1.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cryptoconditions/src/threshold.c b/src/cryptoconditions/src/threshold.c index 323066e54..28fcaa6ed 100644 --- a/src/cryptoconditions/src/threshold.c +++ b/src/cryptoconditions/src/threshold.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/cryptoconditions/src/utils.c b/src/cryptoconditions/src/utils.c index 39b8d0566..69e5a8b7c 100644 --- a/src/cryptoconditions/src/utils.c +++ b/src/cryptoconditions/src/utils.c @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/dbwrapper.cpp b/src/dbwrapper.cpp index c4ee678e9..1d62f1a01 100644 --- a/src/dbwrapper.cpp +++ b/src/dbwrapper.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2012-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/dbwrapper.h b/src/dbwrapper.h index 113bc0b41..3a1813caf 100644 --- a/src/dbwrapper.h +++ b/src/dbwrapper.h @@ -1,5 +1,5 @@ // Copyright (c) 2012-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/deprecation.cpp b/src/deprecation.cpp index bdbda95cf..3c68fc07e 100644 --- a/src/deprecation.cpp +++ b/src/deprecation.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2017 The Zcash developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/deprecation.h b/src/deprecation.h index b98cf3ec6..c9c765e98 100644 --- a/src/deprecation.h +++ b/src/deprecation.h @@ -1,5 +1,5 @@ // Copyright (c) 2017 The Zcash developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/fs.cpp b/src/fs.cpp index 0c6a60014..baef9c2e2 100644 --- a/src/fs.cpp +++ b/src/fs.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers #include "fs.h" namespace fsbridge { diff --git a/src/fs.h b/src/fs.h index 5152d5071..ba5b16a05 100644 --- a/src/fs.h +++ b/src/fs.h @@ -1,5 +1,5 @@ // Copyright (c) 2017 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/gtest/json_test_vectors.cpp b/src/gtest/json_test_vectors.cpp index 81143df49..73a28c422 100644 --- a/src/gtest/json_test_vectors.cpp +++ b/src/gtest/json_test_vectors.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include "json_test_vectors.h" diff --git a/src/gtest/json_test_vectors.h b/src/gtest/json_test_vectors.h index ca8d7726e..82b7fda66 100644 --- a/src/gtest/json_test_vectors.h +++ b/src/gtest/json_test_vectors.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/gtest/main.cpp b/src/gtest/main.cpp index be474239b..e7340cecf 100644 --- a/src/gtest/main.cpp +++ b/src/gtest/main.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include "gmock/gmock.h" diff --git a/src/gtest/test_block.cpp b/src/gtest/test_block.cpp index 85a04dfea..b19687e96 100644 --- a/src/gtest/test_block.cpp +++ b/src/gtest/test_block.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/gtest/test_checkblock.cpp b/src/gtest/test_checkblock.cpp index a93de7527..306ab6e6a 100644 --- a/src/gtest/test_checkblock.cpp +++ b/src/gtest/test_checkblock.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/gtest/test_checktransaction.cpp b/src/gtest/test_checktransaction.cpp index 581315934..7bdfb10e0 100644 --- a/src/gtest/test_checktransaction.cpp +++ b/src/gtest/test_checktransaction.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/gtest/test_deprecation.cpp b/src/gtest/test_deprecation.cpp index 86359b706..af546b860 100644 --- a/src/gtest/test_deprecation.cpp +++ b/src/gtest/test_deprecation.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // Released under the GPLv3 diff --git a/src/gtest/test_equihash.cpp b/src/gtest/test_equihash.cpp index e3f950ff5..47d6db175 100644 --- a/src/gtest/test_equihash.cpp +++ b/src/gtest/test_equihash.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #if defined(HAVE_CONFIG_H) diff --git a/src/gtest/test_httprpc.cpp b/src/gtest/test_httprpc.cpp index e362a0cc7..0dc27975e 100644 --- a/src/gtest/test_httprpc.cpp +++ b/src/gtest/test_httprpc.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/gtest/test_keys.cpp b/src/gtest/test_keys.cpp index 18e4f2d78..ca18ddf79 100644 --- a/src/gtest/test_keys.cpp +++ b/src/gtest/test_keys.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/gtest/test_keystore.cpp b/src/gtest/test_keystore.cpp index e0d57c64f..80a1200f3 100644 --- a/src/gtest/test_keystore.cpp +++ b/src/gtest/test_keystore.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/gtest/test_libzcash_utils.cpp b/src/gtest/test_libzcash_utils.cpp index 137aa7825..a0dc21e2d 100644 --- a/src/gtest/test_libzcash_utils.cpp +++ b/src/gtest/test_libzcash_utils.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/gtest/test_mempool.cpp b/src/gtest/test_mempool.cpp index a5c5c4b6c..ea6bcf52b 100644 --- a/src/gtest/test_mempool.cpp +++ b/src/gtest/test_mempool.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/gtest/test_merkletree.cpp b/src/gtest/test_merkletree.cpp index 8f8c0bd24..224d69a3e 100644 --- a/src/gtest/test_merkletree.cpp +++ b/src/gtest/test_merkletree.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/gtest/test_metrics.cpp b/src/gtest/test_metrics.cpp index a14e06527..84f027cb9 100644 --- a/src/gtest/test_metrics.cpp +++ b/src/gtest/test_metrics.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/gtest/test_miner.cpp b/src/gtest/test_miner.cpp index d12ffb3d8..9f2362b91 100644 --- a/src/gtest/test_miner.cpp +++ b/src/gtest/test_miner.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/gtest/test_noteencryption.cpp b/src/gtest/test_noteencryption.cpp index dc58903ae..96a0a2d5c 100644 --- a/src/gtest/test_noteencryption.cpp +++ b/src/gtest/test_noteencryption.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/gtest/test_pedersen_hash.cpp b/src/gtest/test_pedersen_hash.cpp index 3a7d80406..d5d43c0ae 100644 --- a/src/gtest/test_pedersen_hash.cpp +++ b/src/gtest/test_pedersen_hash.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/gtest/test_pow.cpp b/src/gtest/test_pow.cpp index bbda2854e..10b0211af 100644 --- a/src/gtest/test_pow.cpp +++ b/src/gtest/test_pow.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/gtest/test_random.cpp b/src/gtest/test_random.cpp index 12dbe020e..6622ae082 100644 --- a/src/gtest/test_random.cpp +++ b/src/gtest/test_random.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/gtest/test_rpc.cpp b/src/gtest/test_rpc.cpp index 1a2caff19..c64b7604c 100644 --- a/src/gtest/test_rpc.cpp +++ b/src/gtest/test_rpc.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/gtest/test_sapling_note.cpp b/src/gtest/test_sapling_note.cpp index ee313dbc5..d157d9f9f 100644 --- a/src/gtest/test_sapling_note.cpp +++ b/src/gtest/test_sapling_note.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/gtest/test_tautology.cpp b/src/gtest/test_tautology.cpp index b7cbc9d73..44daccdc4 100644 --- a/src/gtest/test_tautology.cpp +++ b/src/gtest/test_tautology.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/gtest/test_transaction_builder.cpp b/src/gtest/test_transaction_builder.cpp index a6ec68e5a..9e4fae718 100644 --- a/src/gtest/test_transaction_builder.cpp +++ b/src/gtest/test_transaction_builder.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include "chainparams.h" diff --git a/src/gtest/test_txid.cpp b/src/gtest/test_txid.cpp index 3d553c021..6cf5dbd6c 100644 --- a/src/gtest/test_txid.cpp +++ b/src/gtest/test_txid.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/gtest/test_upgrades.cpp b/src/gtest/test_upgrades.cpp index affc4c47d..d8e26f0dd 100644 --- a/src/gtest/test_upgrades.cpp +++ b/src/gtest/test_upgrades.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/gtest/test_validation.cpp b/src/gtest/test_validation.cpp index 1f80e608e..41e394d4f 100644 --- a/src/gtest/test_validation.cpp +++ b/src/gtest/test_validation.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/gtest/test_zip32.cpp b/src/gtest/test_zip32.cpp index 0c27b01c4..4391c7592 100644 --- a/src/gtest/test_zip32.cpp +++ b/src/gtest/test_zip32.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/gtest/utils.cpp b/src/gtest/utils.cpp index c19a2ad21..ed284ae12 100644 --- a/src/gtest/utils.cpp +++ b/src/gtest/utils.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 int GenZero(int n) diff --git a/src/hash.cpp b/src/hash.cpp index 1a9b34050..529940270 100644 --- a/src/hash.cpp +++ b/src/hash.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2013-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/hash.h b/src/hash.h index f5f6560f2..a37c00a1d 100644 --- a/src/hash.h +++ b/src/hash.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2013 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/httprpc.cpp b/src/httprpc.cpp index fd6849e61..5b70c3215 100644 --- a/src/httprpc.cpp +++ b/src/httprpc.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 58cc9ca45..2f9761a93 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2015 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/httpserver.h b/src/httpserver.h index 348ccda2b..8133c8d94 100644 --- a/src/httpserver.h +++ b/src/httpserver.h @@ -1,5 +1,5 @@ // Copyright (c) 2015 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/hush-tx.cpp b/src/hush-tx.cpp index 2d9814aa2..6d3f2f94c 100644 --- a/src/hush-tx.cpp +++ b/src/hush-tx.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/hush.h b/src/hush.h index 1c2954d9d..9ebcd2948 100644 --- a/src/hush.h +++ b/src/hush.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/hush/tlsenums.h b/src/hush/tlsenums.h index e75e1993a..22427d656 100644 --- a/src/hush/tlsenums.h +++ b/src/hush/tlsenums.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/hush/tlsmanager.cpp b/src/hush/tlsmanager.cpp index 51e2ea064..8cc726917 100644 --- a/src/hush/tlsmanager.cpp +++ b/src/hush/tlsmanager.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/hush/tlsmanager.h b/src/hush/tlsmanager.h index 5dd7f89e2..ca934a278 100644 --- a/src/hush/tlsmanager.h +++ b/src/hush/tlsmanager.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/hush/utiltls.cpp b/src/hush/utiltls.cpp index e06b28ee1..f8fcd4636 100644 --- a/src/hush/utiltls.cpp +++ b/src/hush/utiltls.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2017 The Zen Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/hush/utiltls.h b/src/hush/utiltls.h index 206f6bdf0..c89045f8d 100644 --- a/src/hush/utiltls.h +++ b/src/hush/utiltls.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2017 The Zen Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/hush_bitcoind.h b/src/hush_bitcoind.h index d690cc8a2..b8b5a463d 100644 --- a/src/hush_bitcoind.h +++ b/src/hush_bitcoind.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush Developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/hush_cJSON.h b/src/hush_cJSON.h index d7eb3a4dd..ec4b85a91 100644 --- a/src/hush_cJSON.h +++ b/src/hush_cJSON.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /* diff --git a/src/hush_ccdata.h b/src/hush_ccdata.h index 498419ab1..0d6febbc9 100644 --- a/src/hush_ccdata.h +++ b/src/hush_ccdata.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/hush_curve25519.h b/src/hush_curve25519.h index 688d9cc9b..fb8a86e65 100644 --- a/src/hush_curve25519.h +++ b/src/hush_curve25519.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/hush_events.h b/src/hush_events.h index 00832ae23..e5c804941 100644 --- a/src/hush_events.h +++ b/src/hush_events.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/hush_gateway.h b/src/hush_gateway.h index 2f701cfb6..9c7952045 100644 --- a/src/hush_gateway.h +++ b/src/hush_gateway.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/hush_globals.h b/src/hush_globals.h index 9dc68449f..e2b8d8e33 100644 --- a/src/hush_globals.h +++ b/src/hush_globals.h @@ -1,4 +1,4 @@ -// Copyright 2016-2021 The Hush Developers +// Copyright 2016-2022 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 /****************************************************************************** diff --git a/src/hush_kv.h b/src/hush_kv.h index 9149c9ec4..8d067b25a 100644 --- a/src/hush_kv.h +++ b/src/hush_kv.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/hush_nSPV.h b/src/hush_nSPV.h index f8e1645d1..564f217e1 100644 --- a/src/hush_nSPV.h +++ b/src/hush_nSPV.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/hush_nSPV_fullnode.h b/src/hush_nSPV_fullnode.h index be4fbce15..50e650073 100644 --- a/src/hush_nSPV_fullnode.h +++ b/src/hush_nSPV_fullnode.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/hush_nSPV_wallet.h b/src/hush_nSPV_wallet.h index 05c5d489f..0053fbcde 100644 --- a/src/hush_nSPV_wallet.h +++ b/src/hush_nSPV_wallet.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/hush_notary.h b/src/hush_notary.h index 6090b4f86..319ed0a05 100644 --- a/src/hush_notary.h +++ b/src/hush_notary.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/hush_pax.h b/src/hush_pax.h index fe2f946ad..7cfb08750 100644 --- a/src/hush_pax.h +++ b/src/hush_pax.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/hush_structs.h b/src/hush_structs.h index 121100b55..5f1c22e38 100644 --- a/src/hush_structs.h +++ b/src/hush_structs.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/hush_utils.h b/src/hush_utils.h index 7708b156c..ae19fce95 100644 --- a/src/hush_utils.h +++ b/src/hush_utils.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/importcoin.cpp b/src/importcoin.cpp index f6da631c7..0f14d5654 100644 --- a/src/importcoin.cpp +++ b/src/importcoin.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/importcoin.h b/src/importcoin.h index f903d2e03..01f43bf57 100644 --- a/src/importcoin.h +++ b/src/importcoin.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/init.cpp b/src/init.cpp index 5739c8b3b..9c9f36329 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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??? diff --git a/src/init.h b/src/init.h index d87c862a0..df930fd62 100644 --- a/src/init.h +++ b/src/init.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/key.cpp b/src/key.cpp index 83f831ada..2ca251f2f 100644 --- a/src/key.cpp +++ b/src/key.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2009-2014 The Bitcoin Core developers // Copyright (c) 2017 The Zcash developers // Distributed under the GPLv3 software license, see the accompanying diff --git a/src/key.h b/src/key.h index 80d0a643d..e65e5f29c 100644 --- a/src/key.h +++ b/src/key.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers // Copyright (c) 2017 The Zcash developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/key_io.cpp b/src/key_io.cpp index d575d97df..c3d5471d5 100644 --- a/src/key_io.cpp +++ b/src/key_io.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2014-2016 The Bitcoin Core developers // Copyright (c) 2016-2018 The Zcash developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/key_io.h b/src/key_io.h index f4647ee9f..c70971cbb 100644 --- a/src/key_io.h +++ b/src/key_io.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin Core developers // Copyright (c) 2016-2018 The Zcash developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/keystore.cpp b/src/keystore.cpp index 072b29ef9..9baa44495 100644 --- a/src/keystore.cpp +++ b/src/keystore.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/keystore.h b/src/keystore.h index 27486d583..39a7013e9 100644 --- a/src/keystore.h +++ b/src/keystore.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/main.cpp b/src/main.cpp index 4e466ba45..acef0dd50 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/main.h b/src/main.h index f2e5ad38d..034629dbc 100644 --- a/src/main.h +++ b/src/main.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/merkleblock.cpp b/src/merkleblock.cpp index 86df55cac..7cde7ed36 100644 --- a/src/merkleblock.cpp +++ b/src/merkleblock.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying diff --git a/src/metrics.cpp b/src/metrics.cpp index c6022cb95..0653b519e 100644 --- a/src/metrics.cpp +++ b/src/metrics.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2016 The Zcash developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/metrics.h b/src/metrics.h index 274f3ab95..73d10c890 100644 --- a/src/metrics.h +++ b/src/metrics.h @@ -1,5 +1,5 @@ // Copyright (c) 2016 The Zcash developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/miner.h b/src/miner.h index 2cdd5106b..4a8ca6190 100644 --- a/src/miner.h +++ b/src/miner.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2013 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/net.cpp b/src/net.cpp index 40e5070de..5b1bcf5ac 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/net.h b/src/net.h index d55d500e1..d96c65e01 100644 --- a/src/net.h +++ b/src/net.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/netbase.cpp b/src/netbase.cpp index 034bbe8f2..070734ce8 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/notarizationdb.cpp b/src/notarizationdb.cpp index 9ff61a8ed..79479e7bf 100644 --- a/src/notarizationdb.cpp +++ b/src/notarizationdb.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include "dbwrapper.h" diff --git a/src/notarizationdb.h b/src/notarizationdb.h index b6e3f7684..db72936e3 100644 --- a/src/notarizationdb.h +++ b/src/notarizationdb.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #ifndef HUSH_NOTARISATIONDB_H diff --git a/src/noui.cpp b/src/noui.cpp index e0bd76e4d..2bad045a7 100644 --- a/src/noui.cpp +++ b/src/noui.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying diff --git a/src/pow.cpp b/src/pow.cpp index 757929a19..753378ba9 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/pow.h b/src/pow.h index 0d6fd7f93..bccbf321e 100644 --- a/src/pow.h +++ b/src/pow.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/pow/tromp/equi_miner.h b/src/pow/tromp/equi_miner.h index 74311018e..fa719b1f8 100644 --- a/src/pow/tromp/equi_miner.h +++ b/src/pow/tromp/equi_miner.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 (c) 2016 John Tromp, The Zcash developers diff --git a/src/pow/tromp/osx_barrier.h b/src/pow/tromp/osx_barrier.h index 16a365aeb..821886839 100644 --- a/src/pow/tromp/osx_barrier.h +++ b/src/pow/tromp/osx_barrier.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #ifdef __APPLE__ diff --git a/src/prevector.h b/src/prevector.h index 5d71e298b..47f527d24 100644 --- a/src/prevector.h +++ b/src/prevector.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #ifndef _HUSH_PREVECTOR_H_ diff --git a/src/primitives/block.cpp b/src/primitives/block.cpp index adf62f2d1..4db84e47c 100644 --- a/src/primitives/block.cpp +++ b/src/primitives/block.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/primitives/block.h b/src/primitives/block.h index a3751dc48..7fc351a65 100644 --- a/src/primitives/block.h +++ b/src/primitives/block.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2013 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/primitives/transaction.cpp b/src/primitives/transaction.cpp index 7e2580149..0f72f351a 100644 --- a/src/primitives/transaction.cpp +++ b/src/primitives/transaction.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h index 3c6df21b2..26fd25590 100644 --- a/src/primitives/transaction.h +++ b/src/primitives/transaction.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/protocol.cpp b/src/protocol.cpp index 9da8265c3..402c9213d 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/protocol.h b/src/protocol.h index d21139d35..d201d6f10 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2013 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/pubkey.cpp b/src/pubkey.cpp index 28e2595f3..9df95f232 100644 --- a/src/pubkey.cpp +++ b/src/pubkey.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2014 The Bitcoin Core developers // Copyright (c) 2017 The Zcash developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/pubkey.h b/src/pubkey.h index fd56c62d2..689fe9352 100644 --- a/src/pubkey.h +++ b/src/pubkey.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers // Copyright (c) 2017 The Zcash developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/purge b/src/purge index df6624596..d34b6f72b 100755 --- a/src/purge +++ b/src/purge @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Released under the GPLv3 echo "Purging $1" diff --git a/src/random.cpp b/src/random.cpp index 8259118b3..2c13a4cce 100644 --- a/src/random.cpp +++ b/src/random.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/rest.cpp b/src/rest.cpp index 2a2dd5238..608fb7a30 100644 --- a/src/rest.cpp +++ b/src/rest.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 90b8e7201..e5ac31769 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/rpc/client.cpp b/src/rpc/client.cpp index e427ec3ff..4c89b2bc3 100644 --- a/src/rpc/client.cpp +++ b/src/rpc/client.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/rpc/crosschain.cpp b/src/rpc/crosschain.cpp index d3e54dc68..bfb195019 100644 --- a/src/rpc/crosschain.cpp +++ b/src/rpc/crosschain.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index ab6a75e96..275617dab 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp index 7f49f785b..afd5d470b 100644 --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index 2e82c061a..635d71d7c 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/rpc/register.h b/src/rpc/register.h index 7c545da48..19f5c4645 100644 --- a/src/rpc/register.h +++ b/src/rpc/register.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2009-2016 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp index 74dc863ce..73ed8f383 100644 --- a/src/rpc/server.cpp +++ b/src/rpc/server.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/rpc/server.h b/src/rpc/server.h index 3b3e11c6a..31a2fb0a8 100644 --- a/src/rpc/server.h +++ b/src/rpc/server.h @@ -1,6 +1,6 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush Developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/scheduler.cpp b/src/scheduler.cpp index 9c4ebf334..37882c753 100644 --- a/src/scheduler.cpp +++ b/src/scheduler.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2015 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index fc8b8f6f9..9a54b8b10 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/script/standard.cpp b/src/script/standard.cpp index 6a845499d..a40d7cd92 100644 --- a/src/script/standard.cpp +++ b/src/script/standard.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/script/standard.h b/src/script/standard.h index 697150372..645912873 100644 --- a/src/script/standard.h +++ b/src/script/standard.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/sendalert.cpp b/src/sendalert.cpp index e426cc09f..73116c4b8 100644 --- a/src/sendalert.cpp +++ b/src/sendalert.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2016 The Zcash developers // Original code from: https://gist.github.com/laanwj/0e689cfa37b52bcbbb44 // Distributed under the GPLv3 software license, see the accompanying @@ -56,7 +56,7 @@ the bad alert. */ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include "main.h" diff --git a/src/smartchains b/src/smartchains index 1a210dd01..68a340bb9 100755 --- a/src/smartchains +++ b/src/smartchains @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2018-2021 The Hush developers +# Copyright (c) 2018-2022 The Hush developers set -eo pipefail # You can now add delay line to pubkey.txt file diff --git a/src/support/allocators/secure.h b/src/support/allocators/secure.h index 90b9105ce..ceaf54b80 100644 --- a/src/support/allocators/secure.h +++ b/src/support/allocators/secure.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2013 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/support/allocators/zeroafterfree.h b/src/support/allocators/zeroafterfree.h index e72715f6a..fac487c55 100644 --- a/src/support/allocators/zeroafterfree.h +++ b/src/support/allocators/zeroafterfree.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2013 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/sync.cpp b/src/sync.cpp index 209dd9edb..1f82d6728 100644 --- a/src/sync.cpp +++ b/src/sync.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2011-2012 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html /****************************************************************************** diff --git a/src/test-hush/main.cpp b/src/test-hush/main.cpp index 1a75d4196..d33791446 100644 --- a/src/test-hush/main.cpp +++ b/src/test-hush/main.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include "key.h" diff --git a/src/test-hush/test_addrman.cpp b/src/test-hush/test_addrman.cpp index 29d5fc319..50ffa82f0 100644 --- a/src/test-hush/test_addrman.cpp +++ b/src/test-hush/test_addrman.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/test-hush/test_coinimport.cpp b/src/test-hush/test_coinimport.cpp index f4a4de578..3f44767db 100644 --- a/src/test-hush/test_coinimport.cpp +++ b/src/test-hush/test_coinimport.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/test-hush/test_cryptoconditions.cpp b/src/test-hush/test_cryptoconditions.cpp index 09cf5de1d..30e10de71 100644 --- a/src/test-hush/test_cryptoconditions.cpp +++ b/src/test-hush/test_cryptoconditions.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/test-hush/test_eval_bet.cpp b/src/test-hush/test_eval_bet.cpp index 51c9eda42..86cf33ca7 100644 --- a/src/test-hush/test_eval_bet.cpp +++ b/src/test-hush/test_eval_bet.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/test-hush/test_eval_notarization.cpp b/src/test-hush/test_eval_notarization.cpp index d42327718..e394ab8aa 100644 --- a/src/test-hush/test_eval_notarization.cpp +++ b/src/test-hush/test_eval_notarization.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/test-hush/test_netbase_tests.cpp b/src/test-hush/test_netbase_tests.cpp index fdd8605fb..12e2267c2 100644 --- a/src/test-hush/test_netbase_tests.cpp +++ b/src/test-hush/test_netbase_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/test-hush/test_parse_notarization.cpp b/src/test-hush/test_parse_notarization.cpp index 0ee04a817..9a4f8e89e 100644 --- a/src/test-hush/test_parse_notarization.cpp +++ b/src/test-hush/test_parse_notarization.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/test-hush/testutils.cpp b/src/test-hush/testutils.cpp index e68491f3b..2fa8ccfd5 100644 --- a/src/test-hush/testutils.cpp +++ b/src/test-hush/testutils.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/test-hush/testutils.h b/src/test-hush/testutils.h index 4ac099606..f5626fd74 100644 --- a/src/test-hush/testutils.h +++ b/src/test-hush/testutils.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #ifndef HUSH_TESTUTILS_H diff --git a/src/test/Checkpoints_tests.cpp b/src/test/Checkpoints_tests.cpp index 12c9fdb30..7d48beb6c 100644 --- a/src/test/Checkpoints_tests.cpp +++ b/src/test/Checkpoints_tests.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2011-2013 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/test/DoS_tests.cpp b/src/test/DoS_tests.cpp index dff34f154..c1e1a1a74 100644 --- a/src/test/DoS_tests.cpp +++ b/src/test/DoS_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2011-2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/accounting_tests.cpp b/src/test/accounting_tests.cpp index 3878b0bcd..53f08c573 100644 --- a/src/test/accounting_tests.cpp +++ b/src/test/accounting_tests.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2012-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/test/addrman_tests.cpp b/src/test/addrman_tests.cpp index 713a177ee..858c8704e 100644 --- a/src/test/addrman_tests.cpp +++ b/src/test/addrman_tests.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2012-2013 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include "addrman.h" diff --git a/src/test/allocator_tests.cpp b/src/test/allocator_tests.cpp index 57910903f..6b0b6b1ac 100644 --- a/src/test/allocator_tests.cpp +++ b/src/test/allocator_tests.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2012-2013 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/test/arith_uint256_tests.cpp b/src/test/arith_uint256_tests.cpp index a9dc387a4..05ebb1d46 100644 --- a/src/test/arith_uint256_tests.cpp +++ b/src/test/arith_uint256_tests.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2011-2013 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/test/base32_tests.cpp b/src/test/base32_tests.cpp index 2268aaf67..0886ef1e5 100644 --- a/src/test/base32_tests.cpp +++ b/src/test/base32_tests.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2012-2013 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/test/base58_tests.cpp b/src/test/base58_tests.cpp index 2d7c1fd63..49f6a429f 100644 --- a/src/test/base58_tests.cpp +++ b/src/test/base58_tests.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2011-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/test/base64_tests.cpp b/src/test/base64_tests.cpp index 443350ded..28a47de4b 100644 --- a/src/test/base64_tests.cpp +++ b/src/test/base64_tests.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2011-2013 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/test/bctest.py b/src/test/bctest.py index 77a0d821b..55b830485 100644 --- a/src/test/bctest.py +++ b/src/test/bctest.py @@ -1,5 +1,5 @@ # Copyright 2014 BitPay, Inc. -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 diff --git a/src/test/bech32_tests.cpp b/src/test/bech32_tests.cpp index 0e1168f61..574843371 100644 --- a/src/test/bech32_tests.cpp +++ b/src/test/bech32_tests.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2017 Pieter Wuille -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/test/bip32_tests.cpp b/src/test/bip32_tests.cpp index 4708be5a2..d2f8e47ce 100644 --- a/src/test/bip32_tests.cpp +++ b/src/test/bip32_tests.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2013 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/test/bitcoin-util-test.py b/src/test/bitcoin-util-test.py index a5bbba3bd..2eb05fab5 100755 --- a/src/test/bitcoin-util-test.py +++ b/src/test/bitcoin-util-test.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Copyright 2014 BitPay, Inc. # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/bloom_tests.cpp b/src/test/bloom_tests.cpp index 95a5788a7..ba5d31c01 100644 --- a/src/test/bloom_tests.cpp +++ b/src/test/bloom_tests.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2012-2013 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/test/checkblock_tests.cpp b/src/test/checkblock_tests.cpp index af9476a7c..5828537ef 100644 --- a/src/test/checkblock_tests.cpp +++ b/src/test/checkblock_tests.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2013-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/test/coins_tests.cpp b/src/test/coins_tests.cpp index 28f437715..eddb5e288 100644 --- a/src/test/coins_tests.cpp +++ b/src/test/coins_tests.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/test/compress_tests.cpp b/src/test/compress_tests.cpp index 89ab20e9e..0f998125e 100644 --- a/src/test/compress_tests.cpp +++ b/src/test/compress_tests.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2012-2013 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/test/convertbits_tests.cpp b/src/test/convertbits_tests.cpp index 59da44a7f..65228336a 100644 --- a/src/test/convertbits_tests.cpp +++ b/src/test/convertbits_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2018 The Zcash developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/crypto_tests.cpp b/src/test/crypto_tests.cpp index 72cdd961c..0786de166 100644 --- a/src/test/crypto_tests.cpp +++ b/src/test/crypto_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/dbwrapper_tests.cpp b/src/test/dbwrapper_tests.cpp index 8ccb44bb1..95150bf3f 100644 --- a/src/test/dbwrapper_tests.cpp +++ b/src/test/dbwrapper_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2018 The Zcash developers // Copyright (c) 2012-2017 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying diff --git a/src/test/equihash_tests.cpp b/src/test/equihash_tests.cpp index 781281610..e9c280d3c 100644 --- a/src/test/equihash_tests.cpp +++ b/src/test/equihash_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2016 Jack Grigg // Copyright (c) 2016 The Zcash developers // Distributed under the GPLv3 software license, see the accompanying diff --git a/src/test/getarg_tests.cpp b/src/test/getarg_tests.cpp index 17755b807..6dfb5ba83 100644 --- a/src/test/getarg_tests.cpp +++ b/src/test/getarg_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2012-2013 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/hash_tests.cpp b/src/test/hash_tests.cpp index c074add74..c95d77d2b 100644 --- a/src/test/hash_tests.cpp +++ b/src/test/hash_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2013 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/key_tests.cpp b/src/test/key_tests.cpp index 7f188e0ae..046760579 100644 --- a/src/test/key_tests.cpp +++ b/src/test/key_tests.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2012-2013 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/test/main_tests.cpp b/src/test/main_tests.cpp index 92f952968..16a93ccab 100644 --- a/src/test/main_tests.cpp +++ b/src/test/main_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/mempool_tests.cpp b/src/test/mempool_tests.cpp index 553867c66..99e941ec2 100644 --- a/src/test/mempool_tests.cpp +++ b/src/test/mempool_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2011-2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp index 52f0a0211..b15a84b90 100644 --- a/src/test/miner_tests.cpp +++ b/src/test/miner_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2011-2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/mruset_tests.cpp b/src/test/mruset_tests.cpp index 9eef2896c..161a0b191 100644 --- a/src/test/mruset_tests.cpp +++ b/src/test/mruset_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2012-2013 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/multisig_tests.cpp b/src/test/multisig_tests.cpp index b4a512210..b365bf6d0 100644 --- a/src/test/multisig_tests.cpp +++ b/src/test/multisig_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2011-2013 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/netbase_tests.cpp b/src/test/netbase_tests.cpp index db157164e..fe9160fda 100644 --- a/src/test/netbase_tests.cpp +++ b/src/test/netbase_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2012-2013 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/pmt_tests.cpp b/src/test/pmt_tests.cpp index 61f85defb..34508ffb7 100644 --- a/src/test/pmt_tests.cpp +++ b/src/test/pmt_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2012-2013 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/policyestimator_tests.cpp b/src/test/policyestimator_tests.cpp index a878a55cf..fbcb26881 100644 --- a/src/test/policyestimator_tests.cpp +++ b/src/test/policyestimator_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2011-2015 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/pow_tests.cpp b/src/test/pow_tests.cpp index d12f47468..f18c5e81c 100644 --- a/src/test/pow_tests.cpp +++ b/src/test/pow_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2015 The Bitcoin Core developers // Distributed under the GPLv3/X11 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/prevector_tests.cpp b/src/test/prevector_tests.cpp index a4e688154..f82fc0add 100644 --- a/src/test/prevector_tests.cpp +++ b/src/test/prevector_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2015 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/raii_event_tests.cpp b/src/test/raii_event_tests.cpp index 450d11228..26e6501f3 100644 --- a/src/test/raii_event_tests.cpp +++ b/src/test/raii_event_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2016 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/reverselock_tests.cpp b/src/test/reverselock_tests.cpp index f5701ec38..b49094d38 100644 --- a/src/test/reverselock_tests.cpp +++ b/src/test/reverselock_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2015 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/rpc_tests.cpp b/src/test/rpc_tests.cpp index 74d303785..a5066721a 100644 --- a/src/test/rpc_tests.cpp +++ b/src/test/rpc_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2012-2013 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/rpc_wallet_tests.cpp b/src/test/rpc_wallet_tests.cpp index f2b614a84..d52be3600 100644 --- a/src/test/rpc_wallet_tests.cpp +++ b/src/test/rpc_wallet_tests.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2013-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/test/sanity_tests.cpp b/src/test/sanity_tests.cpp index 6d7df75e8..ce5c2a870 100644 --- a/src/test/sanity_tests.cpp +++ b/src/test/sanity_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2012-2013 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/scheduler_tests.cpp b/src/test/scheduler_tests.cpp index 1c4018ad9..6cfd8854e 100644 --- a/src/test/scheduler_tests.cpp +++ b/src/test/scheduler_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2012-2013 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/script_P2PKH_tests.cpp b/src/test/script_P2PKH_tests.cpp index 70729446e..95d894b6b 100644 --- a/src/test/script_P2PKH_tests.cpp +++ b/src/test/script_P2PKH_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2012-2015 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp index 295e03ef8..c353bb70c 100644 --- a/src/test/script_P2SH_tests.cpp +++ b/src/test/script_P2SH_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2012-2013 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp index f031787a8..fa6f74dce 100644 --- a/src/test/script_tests.cpp +++ b/src/test/script_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2011-2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/scriptnum_tests.cpp b/src/test/scriptnum_tests.cpp index 84538a968..b67a8358a 100644 --- a/src/test/scriptnum_tests.cpp +++ b/src/test/scriptnum_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2012-2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/serialize_tests.cpp b/src/test/serialize_tests.cpp index ec7d69649..e52cddb04 100644 --- a/src/test/serialize_tests.cpp +++ b/src/test/serialize_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2012-2013 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/sha256compress_tests.cpp b/src/test/sha256compress_tests.cpp index fcf6ffabb..9db755e41 100644 --- a/src/test/sha256compress_tests.cpp +++ b/src/test/sha256compress_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include "test/test_bitcoin.h" diff --git a/src/test/sighash_tests.cpp b/src/test/sighash_tests.cpp index dd5159259..92a7bfc6a 100644 --- a/src/test/sighash_tests.cpp +++ b/src/test/sighash_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2013 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/sigopcount_tests.cpp b/src/test/sigopcount_tests.cpp index b40213d60..f551a9a76 100644 --- a/src/test/sigopcount_tests.cpp +++ b/src/test/sigopcount_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2012-2013 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/skiplist_tests.cpp b/src/test/skiplist_tests.cpp index 460ef4f10..5fd52cb34 100644 --- a/src/test/skiplist_tests.cpp +++ b/src/test/skiplist_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp index 6d4d91485..df4462240 100644 --- a/src/test/test_bitcoin.cpp +++ b/src/test/test_bitcoin.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2011-2013 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/test_bitcoin.h b/src/test/test_bitcoin.h index bba2ce335..99a4abc00 100644 --- a/src/test/test_bitcoin.h +++ b/src/test/test_bitcoin.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #ifndef HUSH_TEST_TEST_HUSH_H diff --git a/src/test/timedata_tests.cpp b/src/test/timedata_tests.cpp index 992419adb..0c9037c97 100644 --- a/src/test/timedata_tests.cpp +++ b/src/test/timedata_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2011-2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/torcontrol_tests.cpp b/src/test/torcontrol_tests.cpp index fc4054d35..1e58d13a2 100644 --- a/src/test/torcontrol_tests.cpp +++ b/src/test/torcontrol_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2017 The Zcash developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp index ed452a007..269d7c521 100644 --- a/src/test/transaction_tests.cpp +++ b/src/test/transaction_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2011-2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/uint256_tests.cpp b/src/test/uint256_tests.cpp index db330cc49..66bf4c439 100644 --- a/src/test/uint256_tests.cpp +++ b/src/test/uint256_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2011-2013 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/univalue_tests.cpp b/src/test/univalue_tests.cpp index 020133b57..ddf677491 100644 --- a/src/test/univalue_tests.cpp +++ b/src/test/univalue_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright 2014 BitPay, Inc. // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp index c10d356f3..99249a6a2 100644 --- a/src/test/util_tests.cpp +++ b/src/test/util_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2011-2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/test/wallet-utility.py b/src/test/wallet-utility.py index d5a5ba3db..c39f127dc 100644 --- a/src/test/wallet-utility.py +++ b/src/test/wallet-utility.py @@ -1,6 +1,6 @@ #!/usr/bin/python # Copyright 2014 BitPay, Inc. -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 diff --git a/src/timedata.cpp b/src/timedata.cpp index 2b891e0b6..7e9f081b3 100644 --- a/src/timedata.cpp +++ b/src/timedata.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2020 The Zcash developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/timedata.h b/src/timedata.h index 8bb0e0d3d..a9a0124bb 100644 --- a/src/timedata.h +++ b/src/timedata.h @@ -1,5 +1,5 @@ // Copyright (c) 2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2020 The Zcash developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/torcontrol.cpp b/src/torcontrol.cpp index d0743a298..9d115d122 100644 --- a/src/torcontrol.cpp +++ b/src/torcontrol.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2015-2017 The Bitcoin Core developers // Copyright (c) 2017 The Zcash developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/torcontrol.h b/src/torcontrol.h index f7e281429..ff0a3ea10 100644 --- a/src/torcontrol.h +++ b/src/torcontrol.h @@ -1,5 +1,5 @@ // Copyright (c) 2015 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/transaction_builder.cpp b/src/transaction_builder.cpp index 0dfd5a299..f2ac051dc 100644 --- a/src/transaction_builder.cpp +++ b/src/transaction_builder.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2018 The Zcash developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/transaction_builder.h b/src/transaction_builder.h index 6c4d20302..64a2ccb87 100644 --- a/src/transaction_builder.h +++ b/src/transaction_builder.h @@ -1,5 +1,5 @@ // Copyright (c) 2018 The Zcash developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/tush-cli b/src/tush-cli index fa40e9f81..d2442d3fb 100755 --- a/src/tush-cli +++ b/src/tush-cli @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # set working directory to the location of this script # readlink -f does not always exist diff --git a/src/tushd b/src/tushd index 9089ffe8c..6b9ec3886 100755 --- a/src/tushd +++ b/src/tushd @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 diff --git a/src/txdb.cpp b/src/txdb.cpp index 15f2b99cc..6f2301049 100644 --- a/src/txdb.cpp +++ b/src/txdb.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/txdb.h b/src/txdb.h index 5122957e2..a53c6aece 100644 --- a/src/txdb.h +++ b/src/txdb.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 4c30fdfcb..60a1b59d1 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/txmempool.h b/src/txmempool.h index 3f3abb47e..97c85be48 100644 --- a/src/txmempool.h +++ b/src/txmempool.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/uint256.cpp b/src/uint256.cpp index 97c0cb007..ad8d3ff8b 100644 --- a/src/uint256.cpp +++ b/src/uint256.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying diff --git a/src/util.cpp b/src/util.cpp index ed894a37f..e9d0a63e5 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/util.h b/src/util.h index c7898c179..d562e3b62 100644 --- a/src/util.h +++ b/src/util.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/utilmoneystr.cpp b/src/utilmoneystr.cpp index 78d8a1d00..c03039ea3 100644 --- a/src/utilmoneystr.cpp +++ b/src/utilmoneystr.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include "utilmoneystr.h" diff --git a/src/utilstrencodings.cpp b/src/utilstrencodings.cpp index 4a2815968..b55036766 100644 --- a/src/utilstrencodings.cpp +++ b/src/utilstrencodings.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying diff --git a/src/utiltime.cpp b/src/utiltime.cpp index bc5e3d69c..34933b15f 100644 --- a/src/utiltime.cpp +++ b/src/utiltime.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying diff --git a/src/validationinterface.cpp b/src/validationinterface.cpp index d9b06eb96..dd29ec75a 100644 --- a/src/validationinterface.cpp +++ b/src/validationinterface.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 . diff --git a/src/validationinterface.h b/src/validationinterface.h index 08be11730..deca0dda4 100644 --- a/src/validationinterface.h +++ b/src/validationinterface.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/version.h b/src/version.h index a08199ef3..da95222dd 100644 --- a/src/version.h +++ b/src/version.h @@ -1,5 +1,5 @@ // Copyright (c) 2012-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/wallet-utility.cpp b/src/wallet-utility.cpp index a82dfa3b7..fd4731af2 100644 --- a/src/wallet-utility.cpp +++ b/src/wallet-utility.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/wallet/asyncrpcoperation_mergetoaddress.cpp b/src/wallet/asyncrpcoperation_mergetoaddress.cpp index d1f207571..166bb7fbd 100644 --- a/src/wallet/asyncrpcoperation_mergetoaddress.cpp +++ b/src/wallet/asyncrpcoperation_mergetoaddress.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2017 The Zcash developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 . diff --git a/src/wallet/asyncrpcoperation_mergetoaddress.h b/src/wallet/asyncrpcoperation_mergetoaddress.h index afc029b74..712c193db 100644 --- a/src/wallet/asyncrpcoperation_mergetoaddress.h +++ b/src/wallet/asyncrpcoperation_mergetoaddress.h @@ -1,5 +1,5 @@ // Copyright (c) 2017 The Zcash developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/wallet/asyncrpcoperation_saplingconsolidation.cpp b/src/wallet/asyncrpcoperation_saplingconsolidation.cpp index 41f1fc07e..95f81b225 100644 --- a/src/wallet/asyncrpcoperation_saplingconsolidation.cpp +++ b/src/wallet/asyncrpcoperation_saplingconsolidation.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2019 CryptoForge // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/wallet/asyncrpcoperation_sendmany.cpp b/src/wallet/asyncrpcoperation_sendmany.cpp index 28fad9c60..8dd577b0f 100644 --- a/src/wallet/asyncrpcoperation_sendmany.cpp +++ b/src/wallet/asyncrpcoperation_sendmany.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2016 The Zcash developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/wallet/asyncrpcoperation_sendmany.h b/src/wallet/asyncrpcoperation_sendmany.h index 7000eaf10..21b340e74 100644 --- a/src/wallet/asyncrpcoperation_sendmany.h +++ b/src/wallet/asyncrpcoperation_sendmany.h @@ -1,5 +1,5 @@ // Copyright (c) 2016 The Zcash developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/wallet/asyncrpcoperation_shieldcoinbase.cpp b/src/wallet/asyncrpcoperation_shieldcoinbase.cpp index a4d4857e0..30c111e4f 100644 --- a/src/wallet/asyncrpcoperation_shieldcoinbase.cpp +++ b/src/wallet/asyncrpcoperation_shieldcoinbase.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2017 The Zcash developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/wallet/asyncrpcoperation_shieldcoinbase.h b/src/wallet/asyncrpcoperation_shieldcoinbase.h index 4121cbd2e..286495a9d 100644 --- a/src/wallet/asyncrpcoperation_shieldcoinbase.h +++ b/src/wallet/asyncrpcoperation_shieldcoinbase.h @@ -1,5 +1,5 @@ // Copyright (c) 2017 The Zcash developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/wallet/crypter.cpp b/src/wallet/crypter.cpp index ff0da14d6..f8eb10278 100644 --- a/src/wallet/crypter.cpp +++ b/src/wallet/crypter.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2009-2013 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/wallet/crypter.h b/src/wallet/crypter.h index 8df203a4b..45e106380 100644 --- a/src/wallet/crypter.h +++ b/src/wallet/crypter.h @@ -1,5 +1,5 @@ // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp index ec312a6d0..515704632 100644 --- a/src/wallet/db.cpp +++ b/src/wallet/db.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/wallet/gtest/test_transaction.cpp b/src/wallet/gtest/test_transaction.cpp index 9807c5774..5e4bf8ca1 100644 --- a/src/wallet/gtest/test_transaction.cpp +++ b/src/wallet/gtest/test_transaction.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/wallet/gtest/test_wallet.cpp b/src/wallet/gtest/test_wallet.cpp index 7dd5fd683..1c10f673b 100644 --- a/src/wallet/gtest/test_wallet.cpp +++ b/src/wallet/gtest/test_wallet.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/wallet/gtest/test_wallet_zkeys.cpp b/src/wallet/gtest/test_wallet_zkeys.cpp index 3a2c48845..9f105e057 100644 --- a/src/wallet/gtest/test_wallet_zkeys.cpp +++ b/src/wallet/gtest/test_wallet_zkeys.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index 8b3b932c1..6d30a706c 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/wallet/rpchushwallet.cpp b/src/wallet/rpchushwallet.cpp index c13f22a97..c92cda44b 100644 --- a/src/wallet/rpchushwallet.cpp +++ b/src/wallet/rpchushwallet.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2019 Cryptoforge // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index b2fb8ab14..ee346ddc9 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp index 3831aaed4..bf250fabe 100644 --- a/src/wallet/test/wallet_tests.cpp +++ b/src/wallet/test/wallet_tests.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2012-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 3a84f267e..1981ce21c 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index ec2937a1d..058cc30d7 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index 7b286c2c7..1135c4e7e 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/zcash/Address.cpp b/src/zcash/Address.cpp index 58e0c9edc..0b4f22abc 100644 --- a/src/zcash/Address.cpp +++ b/src/zcash/Address.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/zcash/Address.hpp b/src/zcash/Address.hpp index a1465651c..5e23f11da 100644 --- a/src/zcash/Address.hpp +++ b/src/zcash/Address.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/zcash/IncrementalMerkleTree.cpp b/src/zcash/IncrementalMerkleTree.cpp index 5b3855497..1740675f5 100644 --- a/src/zcash/IncrementalMerkleTree.cpp +++ b/src/zcash/IncrementalMerkleTree.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/zcash/IncrementalMerkleTree.hpp b/src/zcash/IncrementalMerkleTree.hpp index 03fa51fda..323688f9a 100644 --- a/src/zcash/IncrementalMerkleTree.hpp +++ b/src/zcash/IncrementalMerkleTree.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/zcash/JoinSplit.cpp b/src/zcash/JoinSplit.cpp index 823d37d06..b0aba24e8 100644 --- a/src/zcash/JoinSplit.cpp +++ b/src/zcash/JoinSplit.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #include "JoinSplit.hpp" diff --git a/src/zcash/JoinSplit.hpp b/src/zcash/JoinSplit.hpp index 7d6efcdef..4aa367fb5 100644 --- a/src/zcash/JoinSplit.hpp +++ b/src/zcash/JoinSplit.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/zcash/Note.cpp b/src/zcash/Note.cpp index 3c0054937..4213624ac 100644 --- a/src/zcash/Note.cpp +++ b/src/zcash/Note.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/zcash/Note.hpp b/src/zcash/Note.hpp index c170e0722..54b531992 100644 --- a/src/zcash/Note.hpp +++ b/src/zcash/Note.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/zcash/NoteEncryption.cpp b/src/zcash/NoteEncryption.cpp index 9f87e21d9..3a655e742 100644 --- a/src/zcash/NoteEncryption.cpp +++ b/src/zcash/NoteEncryption.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/zcash/NoteEncryption.hpp b/src/zcash/NoteEncryption.hpp index 2bc6c8d8f..fddf56be7 100644 --- a/src/zcash/NoteEncryption.hpp +++ b/src/zcash/NoteEncryption.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/zcash/Proof.cpp b/src/zcash/Proof.cpp index c1ef1bed7..ccad05930 100644 --- a/src/zcash/Proof.cpp +++ b/src/zcash/Proof.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/zcash/Proof.hpp b/src/zcash/Proof.hpp index 7c5dadb9a..d232e99cd 100644 --- a/src/zcash/Proof.hpp +++ b/src/zcash/Proof.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/zcash/Zcash.h b/src/zcash/Zcash.h index 8b7b2240e..3e961d208 100644 --- a/src/zcash/Zcash.h +++ b/src/zcash/Zcash.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #ifndef ZC_ZCASH_H_ diff --git a/src/zcash/prf.cpp b/src/zcash/prf.cpp index e3685eb38..fa3aa5082 100644 --- a/src/zcash/prf.cpp +++ b/src/zcash/prf.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/zcash/prf.h b/src/zcash/prf.h index 882ba6403..5af11d583 100644 --- a/src/zcash/prf.h +++ b/src/zcash/prf.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 // Zcash uses SHA256Compress as a PRF for various components diff --git a/src/zcash/util.cpp b/src/zcash/util.cpp index 1ad7a8b5e..88d73a38c 100644 --- a/src/zcash/util.cpp +++ b/src/zcash/util.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/zcash/util.h b/src/zcash/util.h index 3bd67e6d1..9d5ea22eb 100644 --- a/src/zcash/util.h +++ b/src/zcash/util.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 #ifndef ZC_UTIL_H_ diff --git a/src/zcash/zip32.cpp b/src/zcash/zip32.cpp index c01b57774..eda38bed5 100644 --- a/src/zcash/zip32.cpp +++ b/src/zcash/zip32.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2018 The Zcash developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/zcash/zip32.h b/src/zcash/zip32.h index 47887351a..588282922 100644 --- a/src/zcash/zip32.h +++ b/src/zcash/zip32.h @@ -1,5 +1,5 @@ // Copyright (c) 2018 The Zcash developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2022 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 diff --git a/src/zush b/src/zush index 5aefa7a9e..d464315e5 100755 --- a/src/zush +++ b/src/zush @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # set working directory to the location of this script # readlink -f does not always exist diff --git a/toolchain-info.sh b/toolchain-info.sh index 5dca7ab6e..c475653a4 100755 --- a/toolchain-info.sh +++ b/toolchain-info.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 #TODO: detect other versions of gcc/clang diff --git a/util/afl/afl-build.sh b/util/afl/afl-build.sh index 74d5980ce..38df90ad3 100755 --- a/util/afl/afl-build.sh +++ b/util/afl/afl-build.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 # A wrapper around ./util/build.sh for instrumenting the build with AFL: diff --git a/util/afl/afl-get.sh b/util/afl/afl-get.sh index 0156b5105..0697d036c 100755 --- a/util/afl/afl-get.sh +++ b/util/afl/afl-get.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 # Obtains and builds a copy of AFL from source. diff --git a/util/afl/afl-getbuildrun.sh b/util/afl/afl-getbuildrun.sh index 5bd1986f9..7d6c21cad 100755 --- a/util/afl/afl-getbuildrun.sh +++ b/util/afl/afl-getbuildrun.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 # Builds AFL and an instrumented hushd, then begins fuzzing. diff --git a/util/afl/afl-run.sh b/util/afl/afl-run.sh index 69e8cd9fd..4c8ed2d48 100755 --- a/util/afl/afl-run.sh +++ b/util/afl/afl-run.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 diff --git a/util/build-arm.sh b/util/build-arm.sh index a9b747354..36204427c 100755 --- a/util/build-arm.sh +++ b/util/build-arm.sh @@ -1,6 +1,6 @@ #!/bin/bash # Copyright (c) 2019-2020 radix42 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Original aarch64 port by radix42. Thank you! # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/util/build-debian-package.sh b/util/build-debian-package.sh index 271ccfb2a..ad88ac90f 100755 --- a/util/build-debian-package.sh +++ b/util/build-debian-package.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 ## Usage: ./util/build-debian-package.sh diff --git a/util/build-mac.sh b/util/build-mac.sh index 1418e9d53..cb475cd41 100755 --- a/util/build-mac.sh +++ b/util/build-mac.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 diff --git a/util/build-win.sh b/util/build-win.sh index 2e573281b..a5b865046 100755 --- a/util/build-win.sh +++ b/util/build-win.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 export HOST=x86_64-w64-mingw32 diff --git a/util/checkpoints.pl b/util/checkpoints.pl index 25cf5e3ad..f0c84726b 100755 --- a/util/checkpoints.pl +++ b/util/checkpoints.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 use warnings; diff --git a/util/docker-entrypoint.sh b/util/docker-entrypoint.sh index 38009eae8..38e0bcfb9 100755 --- a/util/docker-entrypoint.sh +++ b/util/docker-entrypoint.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 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 diff --git a/util/gen-manpages.sh b/util/gen-manpages.sh index bb2f48f5d..fadeed274 100755 --- a/util/gen-manpages.sh +++ b/util/gen-manpages.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2022 The Hush developers # Released under the GPLv3 TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)} From d5112907b47168c12f3a8622387d65ce523f51e4 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 19 Sep 2022 15:49:44 -0700 Subject: [PATCH 132/295] Write script to update copyrights --- util/update-copyrights.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 util/update-copyrights.sh diff --git a/util/update-copyrights.sh b/util/update-copyrights.sh new file mode 100755 index 000000000..b243d40e7 --- /dev/null +++ b/util/update-copyrights.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +# Copyright (c) 2016-2022 The Hush developers +# Released under the GPLv3 + +# Usage: update-copyrights.sh 2021 2022 +# TODO: verify $1 and $2 exist +# TODO: verify ack and xargs exist on this system + +ack -l -i "201.-202.*Hush dev" | xargs ./util/replace.pl -$1 -$2 From b7b269448f98daf2da7ad00fd1f25720a6c83185 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 19 Sep 2022 15:54:01 -0700 Subject: [PATCH 133/295] Update copyrights that have an initial year of 2020 or later --- src/stratum.cpp | 6 +++--- src/stratum.h | 4 ++-- util/update-copyrights.sh | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/stratum.cpp b/src/stratum.cpp index cf5ee5ac6..287cd609d 100644 --- a/src/stratum.cpp +++ b/src/stratum.cpp @@ -1,6 +1,6 @@ -// Copyright (c) 2021-2021 The Hush developers -// Copyright (c) 2020-2021 The Freicoin Developers -// Copyright (c) 2021-2021 Decker +// Copyright (c) 2021-2022 The Hush developers +// Copyright (c) 2020-2022 The Freicoin Developers +// Copyright (c) 2021-2022 Decker // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. diff --git a/src/stratum.h b/src/stratum.h index 56dc52056..0abcbbaf7 100644 --- a/src/stratum.h +++ b/src/stratum.h @@ -1,5 +1,5 @@ -// Copyright (c) 2021-2021 The Hush developers -// Copyright (c) 2020-2021 The Freicoin Developers +// Copyright (c) 2021-2022 The Hush developers +// Copyright (c) 2020-2022 The Freicoin Developers // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. diff --git a/util/update-copyrights.sh b/util/update-copyrights.sh index b243d40e7..ba9a9c5e3 100755 --- a/util/update-copyrights.sh +++ b/util/update-copyrights.sh @@ -6,4 +6,4 @@ # TODO: verify $1 and $2 exist # TODO: verify ack and xargs exist on this system -ack -l -i "201.-202.*Hush dev" | xargs ./util/replace.pl -$1 -$2 +ack -l -i "20..-20..*Hush dev" | xargs ./util/replace.pl -$1 -$2 From f02a81fa4c34bc8ac2dafad0fd46261c7b21139b Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 19 Sep 2022 16:02:05 -0700 Subject: [PATCH 134/295] Also update COPYRIGHT_YEAR in clientversion.h and teach update-copyrights.sh how to do it --- src/clientversion.h | 2 +- util/update-copyrights.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/clientversion.h b/src/clientversion.h index bc2ab199f..6b805fdc4 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -40,7 +40,7 @@ * Copyright year (2009-this) * Todo: update this when changing our copyright comments in the source */ -#define COPYRIGHT_YEAR 2021 +#define COPYRIGHT_YEAR 2022 #endif //HAVE_CONFIG_H diff --git a/util/update-copyrights.sh b/util/update-copyrights.sh index ba9a9c5e3..f4b1ce2ae 100755 --- a/util/update-copyrights.sh +++ b/util/update-copyrights.sh @@ -6,4 +6,8 @@ # TODO: verify $1 and $2 exist # TODO: verify ack and xargs exist on this system +# This update comments in soure code ack -l -i "20..-20..*Hush dev" | xargs ./util/replace.pl -$1 -$2 + +# This updates the define which is used by C++ help output +./util/replace.pl "COPYRIGHT_YEAR $1" "COPYRIGHT_YEAR $2" src/clientversion.h From 86a2c1c73ccc5d6d65e36c19e79ad3512d4d20d4 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 19 Sep 2022 16:10:02 -0700 Subject: [PATCH 135/295] Lern 2 spel --- util/update-copyrights.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/update-copyrights.sh b/util/update-copyrights.sh index f4b1ce2ae..5a5c09cb1 100755 --- a/util/update-copyrights.sh +++ b/util/update-copyrights.sh @@ -6,7 +6,7 @@ # TODO: verify $1 and $2 exist # TODO: verify ack and xargs exist on this system -# This update comments in soure code +# This update comments in source code ack -l -i "20..-20..*Hush dev" | xargs ./util/replace.pl -$1 -$2 # This updates the define which is used by C++ help output From 2a8dbbad7b2c888f3860803888699504ea2eefdf Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 19 Sep 2022 16:30:39 -0700 Subject: [PATCH 136/295] Make shell scripts more portable by using /usr/bin/env bash --- contrib/fresh_clone_compile_and_run.sh | 2 +- contrib/gitian-descriptors/gitian-linux.yml | 4 ++-- contrib/gitian-descriptors/gitian-osx-signer.yml | 2 +- contrib/gitian-descriptors/gitian-osx.yml | 4 ++-- contrib/gitian-descriptors/gitian-win.yml | 8 ++++---- contrib/init/hushd.init | 2 +- contrib/snapshot/airdrop_hush3.sh | 2 +- contrib/snapshot/testnet_airdrop_hush3.sh | 2 +- contrib/tidy_datadir.sh | 2 +- contrib/verify-commits/pre-push-hook.sh | 2 +- contrib/verify-commits/verify-commits.sh | 2 +- contrib/verifysfbinaries/verify.sh | 2 +- migratecoin.sh | 2 +- qa/hush/checksec.sh | 2 +- qa/pull-tester/cc-tests.sh | 2 +- qa/pull-tester/rpc-tests.sh | 2 +- qa/pull-tester/run-bitcoin-cli | 2 +- qa/pull-tester/run-bitcoind-for-test.sh.in | 2 +- qa/pull-tester/tests-config.sh.in | 2 +- src/assetchains_stop | 2 +- src/cc/makecclib | 2 +- src/purge | 2 +- src/sc/hush | 2 +- src/sc/koolaid | 2 +- src/sc/kush | 2 +- src/sc/zex | 2 +- src/smartchains | 2 +- src/smartchains.old | 2 +- src/tush-cli | 2 +- src/zush | 2 +- test_randomx | 2 +- toolchain-info.sh | 2 +- util/build-arm.sh | 2 +- util/build-debian-package.sh | 2 +- util/build-mac.sh | 2 +- util/build-win.sh | 2 +- util/docker-entrypoint.sh | 2 +- util/docker-hush-cli.sh | 2 +- util/gen-linux-binary-release.sh | 2 +- 39 files changed, 44 insertions(+), 44 deletions(-) diff --git a/contrib/fresh_clone_compile_and_run.sh b/contrib/fresh_clone_compile_and_run.sh index 9f92a0ca6..4e481822f 100644 --- a/contrib/fresh_clone_compile_and_run.sh +++ b/contrib/fresh_clone_compile_and_run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 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 diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml index 317bd8694..da8be060b 100644 --- a/contrib/gitian-descriptors/gitian-linux.yml +++ b/contrib/gitian-descriptors/gitian-linux.yml @@ -53,7 +53,7 @@ script: | function create_global_faketime_wrappers { for prog in ${FAKETIME_PROGS}; do - echo '#!/bin/bash' > ${WRAP_DIR}/${prog} + echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${prog} echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog} echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog} echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog} @@ -65,7 +65,7 @@ script: | function create_per-host_faketime_wrappers { for i in $HOSTS; do for prog in ${FAKETIME_HOST_PROGS}; do - echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog} + echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}-${prog} echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog} echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog} echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog} diff --git a/contrib/gitian-descriptors/gitian-osx-signer.yml b/contrib/gitian-descriptors/gitian-osx-signer.yml index b00eb2fb9..73a2f12f3 100644 --- a/contrib/gitian-descriptors/gitian-osx-signer.yml +++ b/contrib/gitian-descriptors/gitian-osx-signer.yml @@ -20,7 +20,7 @@ script: | # Create global faketime wrappers for prog in ${FAKETIME_PROGS}; do - echo '#!/bin/bash' > ${WRAP_DIR}/${prog} + echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${prog} echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog} echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog} echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog} diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml index 794a82af8..4d5a8736f 100644 --- a/contrib/gitian-descriptors/gitian-osx.yml +++ b/contrib/gitian-descriptors/gitian-osx.yml @@ -48,7 +48,7 @@ script: | function create_global_faketime_wrappers { for prog in ${FAKETIME_PROGS}; do - echo '#!/bin/bash' > ${WRAP_DIR}/${prog} + echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${prog} echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog} echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog} echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog} @@ -60,7 +60,7 @@ script: | function create_per-host_faketime_wrappers { for i in $HOSTS; do for prog in ${FAKETIME_HOST_PROGS}; do - echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog} + echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}-${prog} echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog} echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog} echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog} diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml index 44fc4e356..cab6187fa 100644 --- a/contrib/gitian-descriptors/gitian-win.yml +++ b/contrib/gitian-descriptors/gitian-win.yml @@ -47,7 +47,7 @@ script: | function create_global_faketime_wrappers { for prog in ${FAKETIME_PROGS}; do - echo '#!/bin/bash' > ${WRAP_DIR}/${prog} + echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${prog} echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog} echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog} echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog} @@ -59,7 +59,7 @@ script: | function create_per-host_faketime_wrappers { for i in $HOSTS; do for prog in ${FAKETIME_HOST_PROGS}; do - echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog} + echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}-${prog} echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog} echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog} echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog} @@ -75,14 +75,14 @@ script: | for i in $HOSTS; do mkdir -p ${WRAP_DIR}/${i} for prog in collect2; do - echo '#!/bin/bash' > ${WRAP_DIR}/${i}/${prog} + echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}/${prog} REAL=$(${i}-gcc -print-prog-name=${prog}) echo "export MALLOC_PERTURB_=255" >> ${WRAP_DIR}/${i}/${prog} echo "${REAL} \$@" >> $WRAP_DIR/${i}/${prog} chmod +x ${WRAP_DIR}/${i}/${prog} done for prog in gcc g++; do - echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog} + echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}-${prog} echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog} echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog} echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog} diff --git a/contrib/init/hushd.init b/contrib/init/hushd.init index 225a5ea2a..370aaf101 100644 --- a/contrib/init/hushd.init +++ b/contrib/init/hushd.init @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # hushd The hush core server. # diff --git a/contrib/snapshot/airdrop_hush3.sh b/contrib/snapshot/airdrop_hush3.sh index 87a68369c..c3ee8b700 100755 --- a/contrib/snapshot/airdrop_hush3.sh +++ b/contrib/snapshot/airdrop_hush3.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This code inspired by and dedicated to Decker echo "Airdropping funds to HUSH3, hold onto your butts..." diff --git a/contrib/snapshot/testnet_airdrop_hush3.sh b/contrib/snapshot/testnet_airdrop_hush3.sh index fd20926d4..33dee5a1a 100755 --- a/contrib/snapshot/testnet_airdrop_hush3.sh +++ b/contrib/snapshot/testnet_airdrop_hush3.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This code inspired by and dedicated to Decker echo "Airdropping funds to HUSH3, hold onto your butts..." diff --git a/contrib/tidy_datadir.sh b/contrib/tidy_datadir.sh index 6e5300394..7cc5b3834 100755 --- a/contrib/tidy_datadir.sh +++ b/contrib/tidy_datadir.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2018-2020 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 diff --git a/contrib/verify-commits/pre-push-hook.sh b/contrib/verify-commits/pre-push-hook.sh index c572517e9..1c98dc9a8 100755 --- a/contrib/verify-commits/pre-push-hook.sh +++ b/contrib/verify-commits/pre-push-hook.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 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 diff --git a/contrib/verify-commits/verify-commits.sh b/contrib/verify-commits/verify-commits.sh index 74216fbd2..275e6cb00 100755 --- a/contrib/verify-commits/verify-commits.sh +++ b/contrib/verify-commits/verify-commits.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 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 diff --git a/contrib/verifysfbinaries/verify.sh b/contrib/verifysfbinaries/verify.sh index 3eb469388..67af138cb 100755 --- a/contrib/verifysfbinaries/verify.sh +++ b/contrib/verifysfbinaries/verify.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ### This script attempts to download the signature file SHA256SUMS.asc from bitcoin.org ### It first checks if the signature passes, and then downloads the files specified in diff --git a/migratecoin.sh b/migratecoin.sh index f34215197..a32d30a5f 100644 --- a/migratecoin.sh +++ b/migratecoin.sh @@ -1,4 +1,4 @@ -#!/usr/bin/bash +#!/usr/usr/bin/env bash # Copyright (c) 2016-2022 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 diff --git a/qa/hush/checksec.sh b/qa/hush/checksec.sh index dd1f72e54..2a4897030 100755 --- a/qa/hush/checksec.sh +++ b/qa/hush/checksec.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # The BSD License (http://www.opensource.org/licenses/bsd-license.php) # specifies the terms and conditions of use for checksec.sh: diff --git a/qa/pull-tester/cc-tests.sh b/qa/pull-tester/cc-tests.sh index d68671e12..bfce8ff74 100755 --- a/qa/pull-tester/cc-tests.sh +++ b/qa/pull-tester/cc-tests.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e -o pipefail CURDIR=$(cd $(dirname "$0"); pwd) diff --git a/qa/pull-tester/rpc-tests.sh b/qa/pull-tester/rpc-tests.sh index 3bafe170c..07e123b6f 100755 --- a/qa/pull-tester/rpc-tests.sh +++ b/qa/pull-tester/rpc-tests.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 The Hush developers # Released under the GPLv3 diff --git a/qa/pull-tester/run-bitcoin-cli b/qa/pull-tester/run-bitcoin-cli index 2e7b326af..c7f09ce8a 100755 --- a/qa/pull-tester/run-bitcoin-cli +++ b/qa/pull-tester/run-bitcoin-cli @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 The Hush developers # Released under the GPLv3 diff --git a/qa/pull-tester/run-bitcoind-for-test.sh.in b/qa/pull-tester/run-bitcoind-for-test.sh.in index 4527dff7b..40b6683ad 100755 --- a/qa/pull-tester/run-bitcoind-for-test.sh.in +++ b/qa/pull-tester/run-bitcoind-for-test.sh.in @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # THIS FILE IS GENERATED FROM run-bitcoind-for-test.sh.in # Copyright (c) 2013-2014 The Bitcoin Core developers # Copyright (c) 2016-2022 The Hush developers diff --git a/qa/pull-tester/tests-config.sh.in b/qa/pull-tester/tests-config.sh.in index 824b9d2a1..6718ffbc1 100755 --- a/qa/pull-tester/tests-config.sh.in +++ b/qa/pull-tester/tests-config.sh.in @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # THIS FILE IS GENERATED FROM tests-config.sh.in # Copyright (c) 2013-2014 The Bitcoin Core developers # Copyright (c) 2016-2022 The Hush developers diff --git a/src/assetchains_stop b/src/assetchains_stop index e5ccc0fcb..e20e4f89a 100755 --- a/src/assetchains_stop +++ b/src/assetchains_stop @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 The Hush developers set -eo pipefail hush_cli='./hush-cli' diff --git a/src/cc/makecclib b/src/cc/makecclib index c115cd0c1..dc389ecaf 100755 --- a/src/cc/makecclib +++ b/src/cc/makecclib @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 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 diff --git a/src/purge b/src/purge index d34b6f72b..6b037f221 100755 --- a/src/purge +++ b/src/purge @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 The Hush developers # Released under the GPLv3 diff --git a/src/sc/hush b/src/sc/hush index 9ac3edcd4..53fd07fe0 100755 --- a/src/sc/hush +++ b/src/sc/hush @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2018-2020 The Hush developers #set working directory to the location of this script DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" diff --git a/src/sc/koolaid b/src/sc/koolaid index 5c3543ecf..3d9835cb7 100755 --- a/src/sc/koolaid +++ b/src/sc/koolaid @@ -1,3 +1,3 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2018-2020 The Hush developers ./hush-smart-chain -ac_name=KOOLAID $@ diff --git a/src/sc/kush b/src/sc/kush index b39a0d5fd..716848019 100755 --- a/src/sc/kush +++ b/src/sc/kush @@ -1,3 +1,3 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2018-2020 The Hush developers ./hush-smart-chain -ac_name=KUSH $@ diff --git a/src/sc/zex b/src/sc/zex index 2c95cf1a9..56b2975af 100755 --- a/src/sc/zex +++ b/src/sc/zex @@ -1,3 +1,3 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2018-2020 The Hush developers ./hush-smart-chain -ac_name=ZEX $@ diff --git a/src/smartchains b/src/smartchains index 68a340bb9..d457637fe 100755 --- a/src/smartchains +++ b/src/smartchains @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2018-2022 The Hush developers set -eo pipefail diff --git a/src/smartchains.old b/src/smartchains.old index 3a369677f..8a5aff049 100755 --- a/src/smartchains.old +++ b/src/smartchains.old @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2018-2020 The Hush developers set -x delay=60 diff --git a/src/tush-cli b/src/tush-cli index d2442d3fb..248094b68 100755 --- a/src/tush-cli +++ b/src/tush-cli @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 The Hush developers # set working directory to the location of this script diff --git a/src/zush b/src/zush index d464315e5..d9bb30f4f 100755 --- a/src/zush +++ b/src/zush @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 The Hush developers # set working directory to the location of this script diff --git a/test_randomx b/test_randomx index df45890d8..bc41bb85c 100755 --- a/test_randomx +++ b/test_randomx @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # any CLI args given to this script will be passed along # example: ./test_randomx -debug=randomx diff --git a/toolchain-info.sh b/toolchain-info.sh index c475653a4..68445ca40 100755 --- a/toolchain-info.sh +++ b/toolchain-info.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 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 diff --git a/util/build-arm.sh b/util/build-arm.sh index 36204427c..f22ed7acf 100755 --- a/util/build-arm.sh +++ b/util/build-arm.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2019-2020 radix42 # Copyright (c) 2016-2022 The Hush developers # Original aarch64 port by radix42. Thank you! diff --git a/util/build-debian-package.sh b/util/build-debian-package.sh index ad88ac90f..745273231 100755 --- a/util/build-debian-package.sh +++ b/util/build-debian-package.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 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 diff --git a/util/build-mac.sh b/util/build-mac.sh index cb475cd41..c86b6cef4 100755 --- a/util/build-mac.sh +++ b/util/build-mac.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 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 diff --git a/util/build-win.sh b/util/build-win.sh index a5b865046..8fdcee6d7 100755 --- a/util/build-win.sh +++ b/util/build-win.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 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 diff --git a/util/docker-entrypoint.sh b/util/docker-entrypoint.sh index 38e0bcfb9..0607b1f25 100755 --- a/util/docker-entrypoint.sh +++ b/util/docker-entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 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 diff --git a/util/docker-hush-cli.sh b/util/docker-hush-cli.sh index 9c2c11cee..edd8f7e7d 100755 --- a/util/docker-hush-cli.sh +++ b/util/docker-hush-cli.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2019-2020 Hush developers /hush/src/hush-cli $@ diff --git a/util/gen-linux-binary-release.sh b/util/gen-linux-binary-release.sh index cd4cec2b7..d3df4b618 100755 --- a/util/gen-linux-binary-release.sh +++ b/util/gen-linux-binary-release.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 The Hush developers # Released under the GPLv3 From b41ff1b0da44d9b5a61aa65599aa9d652bfbe178 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 19 Sep 2022 16:32:46 -0700 Subject: [PATCH 137/295] Make block_time.pl more portable --- contrib/block_time.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/block_time.pl b/contrib/block_time.pl index cb11ed239..9e980ea29 100755 --- a/contrib/block_time.pl +++ b/contrib/block_time.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # Copyright (c) 2016-2022 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 From 44e1836e52d83688930fb56f741347c2abe34330 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 19 Sep 2022 21:49:49 -0400 Subject: [PATCH 138/295] Make this script executable --- contrib/fresh_clone_compile_and_run.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 contrib/fresh_clone_compile_and_run.sh diff --git a/contrib/fresh_clone_compile_and_run.sh b/contrib/fresh_clone_compile_and_run.sh old mode 100644 new mode 100755 From 27736e80aee9849579ef9ee3d7528ec2c1807c3e Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 19 Sep 2022 22:05:18 -0400 Subject: [PATCH 139/295] Make this script take the branch and number of jobs as args --- contrib/fresh_clone_compile_and_run.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/contrib/fresh_clone_compile_and_run.sh b/contrib/fresh_clone_compile_and_run.sh index 4e481822f..71a12c124 100755 --- a/contrib/fresh_clone_compile_and_run.sh +++ b/contrib/fresh_clone_compile_and_run.sh @@ -2,18 +2,24 @@ # Copyright (c) 2016-2022 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 -# OPEN BOUNTY -# Send your CPU and RAM and time it takes to sync a HUSH full node for -# 5 HUSH as thanks for decentralized performance testing + +# Usage: $0 BRANCH JOBS + +BRANCH=$1 + git clone https://git.hush.is/hush/hush3 cd hush3 +git checkout $BRANCH # Build with 2 cores # You need 2GB of RAM per core, don't use too many # (GB of RAM)/2 - 1 is the optimal core count for compiling Hush # `nproc` tells you how many cores you have -JOBS=2 +JOBS=$2 +JOBZ=$(nproc) # if build.sh fails, we can use many more jobs with make # Want to fix this parrallel-only build system bug we inherited ? you are a new hush dev -./build.sh -j$JOBS;make -j$JOBS;make -j$JOBS;make -j$JOBS +# Sometimes the parrallel build fails because of a race condition, so +# we do it a few times to Make Really Sure +./build.sh -j$JOBS;make -j$JOBZ;make -j$JOBZ;make -j$JOBZ ./src/hushd &> hush.log & # You can give the entire or parts of this file to Hush developers for debugging, # but there is a lot of metadata!!! We don't want any more than we need to fix bugz From 4b2135f15697ad66ffc951531b91c3991decd852 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 19 Sep 2022 22:09:37 -0400 Subject: [PATCH 140/295] Add some basic error-checking --- contrib/fresh_clone_compile_and_run.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/fresh_clone_compile_and_run.sh b/contrib/fresh_clone_compile_and_run.sh index 71a12c124..bc0364cf9 100755 --- a/contrib/fresh_clone_compile_and_run.sh +++ b/contrib/fresh_clone_compile_and_run.sh @@ -4,13 +4,15 @@ # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # Usage: $0 BRANCH JOBS +# TODO: default to master branch with 2 jobs + +set -eu -o pipefail BRANCH=$1 git clone https://git.hush.is/hush/hush3 cd hush3 git checkout $BRANCH -# Build with 2 cores # You need 2GB of RAM per core, don't use too many # (GB of RAM)/2 - 1 is the optimal core count for compiling Hush # `nproc` tells you how many cores you have From 669447ba24b7344611225a01b6cbbad5071dec3d Mon Sep 17 00:00:00 2001 From: jahway603 Date: Mon, 19 Sep 2022 22:11:12 -0400 Subject: [PATCH 141/295] added cmake check for build-arm.sh --- util/build-arm.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/util/build-arm.sh b/util/build-arm.sh index f22ed7acf..16b195520 100755 --- a/util/build-arm.sh +++ b/util/build-arm.sh @@ -7,6 +7,12 @@ set -eu -o pipefail +# Check if cmake, a new dependency for randomx support, is installed on system and exits if it is not +if ! [ -x "$(command -v cmake)" ]; then + echo 'Error: cmake is not installed. Install cmake and try again.' >&2 + exit 1 +fi + cat <<'EOF' .~~~~~~~~~~~~~~~~. {{ Building Hush!! }} From 9e719cf3e70429a6049bf663269b4acfcc803647 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 19 Sep 2022 22:22:11 -0400 Subject: [PATCH 142/295] Live dangerously since we don't care about intermittent build.sh failures --- contrib/fresh_clone_compile_and_run.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/fresh_clone_compile_and_run.sh b/contrib/fresh_clone_compile_and_run.sh index bc0364cf9..a895f3cc3 100755 --- a/contrib/fresh_clone_compile_and_run.sh +++ b/contrib/fresh_clone_compile_and_run.sh @@ -6,7 +6,8 @@ # Usage: $0 BRANCH JOBS # TODO: default to master branch with 2 jobs -set -eu -o pipefail +# we don't want this for our build.sh and make commands +#set -eu -o pipefail BRANCH=$1 From e836a3c0c61d1fff910e1391504cc97a1e511ba4 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Tue, 20 Sep 2022 01:21:13 -0400 Subject: [PATCH 143/295] fixed help2man check --- util/gen-manpages.sh | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/util/gen-manpages.sh b/util/gen-manpages.sh index fadeed274..8729932ab 100755 --- a/util/gen-manpages.sh +++ b/util/gen-manpages.sh @@ -11,17 +11,8 @@ HUSHCLI=${HUSHCLI:-$SRCDIR/hush-cli} HUSHTX=${HUSHTX:-$SRCDIR/hush-tx} [ ! -x $HUSHD ] && echo "$HUSHD not found or not executable." && exit 1 - -# TODO: this does not work correctly, when help2man is installed, it still fails -# Check if help2man is installed -# If not then display error to user and exit -#if ! command -v help2man &> /dev/null -#then -# echo "help2man could not be found" -# echo "Please install from your Linux package manager and try again" -# echo "On Debian-based systems you can do: apt-get install help2man" -# exit -#fi +# Check if help2man is installed & if not then display error to user and exit +[ ! -x "$(command -v help2man)" ] && echo "help2man could not be found" && echo "Please install from your Linux package manager and try again" && echo "On Debian-based systems you can do: apt-get install help2man" && exit 1 # use this if hushd is not running #HUSHVER="v3.6.2" From ab83649c1a1271fa777c8abffc884ef65ce3aabe Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Wed, 21 Sep 2022 09:04:32 -0400 Subject: [PATCH 144/295] Add gen-zaddrs.pl and improve docs --- contrib/README.md | 20 ++++++++++++++++++-- contrib/gen-zaddrs.pl | 17 +++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100755 contrib/gen-zaddrs.pl diff --git a/contrib/README.md b/contrib/README.md index ed2c7408b..36c04c969 100644 --- a/contrib/README.md +++ b/contrib/README.md @@ -6,9 +6,25 @@ Do not expect all scripts to work! Please fix bugs and report things you find. -## Hush Tools +# Hush Tools + +## block\_time.pl + +Estimate when a Hush block will happen. + +Example: + + ./contrib/block_time.pl 123456 # Print out datetime of when block height 123456 happens + +## gen-zaddrs.pl + +Generate zaddrs in bulk, by default 50 at a time. Prints out a zaddr one per line. + +Example: + + ./contrib/gen-zaddrs.pl # generate 50 zaddrs + ./contrib/gen-zaddrs.pl 500 # generate 500 zaddrs -block\_time.pl - estimate when a Hush block will happen ## Wallet Tools diff --git a/contrib/gen-zaddrs.pl b/contrib/gen-zaddrs.pl new file mode 100755 index 000000000..ccf8e8e78 --- /dev/null +++ b/contrib/gen-zaddrs.pl @@ -0,0 +1,17 @@ +#!/usr/bin/env perl +# Copyright 2019-2022 The Hush developers +# Released under the GPLv3 +use warnings; +use strict; + +my $hush = "./src/hush-cli"; +my $znew = "$hush z_getnewaddress"; +my $count = 1; +my $howmany = shift || 50; + +while ($count < $howmany) { + my $zaddr = qx{$znew}; + chomp($zaddr); + print qq{$zaddr\n}; + $count++; +} From 005f1e00bcf850ae0e6be2bf1083afa877600ed2 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Wed, 21 Sep 2022 08:38:10 -0700 Subject: [PATCH 145/295] Update copyrights --- src/hush_defs.h | 2 +- src/pow/tromp/equi.h | 2 +- src/sc/hush | 2 +- src/sc/koolaid | 2 +- src/sc/kush | 2 +- src/sc/zex | 2 +- src/sietch.h | 2 +- src/smartchains.old | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/hush_defs.h b/src/hush_defs.h index c4a0b5425..36354b909 100644 --- a/src/hush_defs.h +++ b/src/hush_defs.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2020 The Hush developers +// Copyright (c) 2019-2022 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 /****************************************************************************** diff --git a/src/pow/tromp/equi.h b/src/pow/tromp/equi.h index fd89da587..85b780ea1 100644 --- a/src/pow/tromp/equi.h +++ b/src/pow/tromp/equi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2020 The Hush developers +// Copyright (c) 2019-2022 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 (c) 2016-2016 John Tromp, The Zcash developers diff --git a/src/sc/hush b/src/sc/hush index 53fd07fe0..b730c9342 100755 --- a/src/sc/hush +++ b/src/sc/hush @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (c) 2018-2020 The Hush developers +# Copyright (c) 2018-2022 The Hush developers #set working directory to the location of this script DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd $DIR diff --git a/src/sc/koolaid b/src/sc/koolaid index 3d9835cb7..7d705c55c 100755 --- a/src/sc/koolaid +++ b/src/sc/koolaid @@ -1,3 +1,3 @@ #!/usr/bin/env bash -# Copyright (c) 2018-2020 The Hush developers +# Copyright (c) 2018-2022 The Hush developers ./hush-smart-chain -ac_name=KOOLAID $@ diff --git a/src/sc/kush b/src/sc/kush index 716848019..ed2254506 100755 --- a/src/sc/kush +++ b/src/sc/kush @@ -1,3 +1,3 @@ #!/usr/bin/env bash -# Copyright (c) 2018-2020 The Hush developers +# Copyright (c) 2018-2022 The Hush developers ./hush-smart-chain -ac_name=KUSH $@ diff --git a/src/sc/zex b/src/sc/zex index 56b2975af..ac8947082 100755 --- a/src/sc/zex +++ b/src/sc/zex @@ -1,3 +1,3 @@ #!/usr/bin/env bash -# Copyright (c) 2018-2020 The Hush developers +# Copyright (c) 2018-2022 The Hush developers ./hush-smart-chain -ac_name=ZEX $@ diff --git a/src/sietch.h b/src/sietch.h index 689bb312a..3e6b2c87d 100644 --- a/src/sietch.h +++ b/src/sietch.h @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright © 2016-2020 The Hush developers * + * Copyright © 2016-2022 The Hush developers * * * * See the AUTHORS and LICENSE files at * * the top-level directory of this distribution for the individual copyright * diff --git a/src/smartchains.old b/src/smartchains.old index 8a5aff049..92ad9bcc8 100755 --- a/src/smartchains.old +++ b/src/smartchains.old @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (c) 2018-2020 The Hush developers +# Copyright (c) 2018-2022 The Hush developers set -x delay=60 source pubkey.txt From f791613c706821794bfcda78c6ab7c7545ab11ce Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Wed, 21 Sep 2022 08:44:34 -0700 Subject: [PATCH 146/295] Add copyright to files missing Hush copyright lines --- src/base58.h | 1 + src/bloom.h | 1 + src/cJSON.h | 1 + src/chainparamsbase.h | 1 + src/chainparamsseeds.h | 1 + src/compat.h | 1 + src/compressor.h | 1 + src/core_io.h | 1 + src/httprpc.h | 1 + src/hush_nSPV_defs.h | 1 + src/hush_nSPV_superlite.h | 1 + src/hush_nk.h | 2 ++ src/limitedmap.h | 1 + src/memusage.h | 1 + src/merkleblock.h | 1 + src/mini-gmp.h | 1 + src/mruset.h | 1 + src/netbase.h | 1 + src/noui.h | 1 + src/random.h | 1 + src/reverselock.h | 1 + src/scheduler.h | 1 + src/spentindex.h | 3 ++- src/streams.h | 1 + src/sync.h | 1 + src/threadsafety.h | 1 + src/tinyformat.h | 1 + src/ui_interface.h | 1 + src/uint252.h | 1 + src/uint256.h | 1 + src/undo.h | 1 + src/uthash.h | 2 +- src/utilmoneystr.h | 1 + src/utilstrencodings.h | 1 + src/utiltime.h | 1 + src/utlist.h | 1 + 36 files changed, 38 insertions(+), 2 deletions(-) diff --git a/src/base58.h b/src/base58.h index 1032a4f00..423107c15 100644 --- a/src/base58.h +++ b/src/base58.h @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/bloom.h b/src/bloom.h index 22f3bd396..d2eabaa8f 100644 --- a/src/bloom.h +++ b/src/bloom.h @@ -1,4 +1,5 @@ // Copyright (c) 2012-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/cJSON.h b/src/cJSON.h index 2a6139680..e4a31634b 100644 --- a/src/cJSON.h +++ b/src/cJSON.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers /* Copyright (c) 2009-2017 Dave Gamble and cJSON contributors diff --git a/src/chainparamsbase.h b/src/chainparamsbase.h index 1fbdec8bd..f4fc66e92 100644 --- a/src/chainparamsbase.h +++ b/src/chainparamsbase.h @@ -1,4 +1,5 @@ // Copyright (c) 2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/chainparamsseeds.h b/src/chainparamsseeds.h index 5d539bbb7..663a9bcac 100644 --- a/src/chainparamsseeds.h +++ b/src/chainparamsseeds.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers /****************************************************************************** * Copyright © 2014-2019 The SuperNET Developers. * * * diff --git a/src/compat.h b/src/compat.h index af902e705..045774e27 100644 --- a/src/compat.h +++ b/src/compat.h @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/compressor.h b/src/compressor.h index 5c6bc4381..cf4ba6a35 100644 --- a/src/compressor.h +++ b/src/compressor.h @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/core_io.h b/src/core_io.h index cc4445b9a..3e413e343 100644 --- a/src/core_io.h +++ b/src/core_io.h @@ -1,4 +1,5 @@ // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/httprpc.h b/src/httprpc.h index 2118d2fef..ef3a7243b 100644 --- a/src/httprpc.h +++ b/src/httprpc.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2015 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/hush_nSPV_defs.h b/src/hush_nSPV_defs.h index 71922e5ce..a52e92500 100644 --- a/src/hush_nSPV_defs.h +++ b/src/hush_nSPV_defs.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers /****************************************************************************** * Copyright © 2014-2019 The SuperNET Developers. * diff --git a/src/hush_nSPV_superlite.h b/src/hush_nSPV_superlite.h index 585f905f0..f9e02bcb8 100644 --- a/src/hush_nSPV_superlite.h +++ b/src/hush_nSPV_superlite.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers /****************************************************************************** * Copyright © 2014-2019 The SuperNET Developers. * diff --git a/src/hush_nk.h b/src/hush_nk.h index a0ce3cf07..3eb3ae98f 100644 --- a/src/hush_nk.h +++ b/src/hush_nk.h @@ -1,9 +1,11 @@ +// Copyright (c) 2016-2022 The Hush developers #ifndef HUSH_NK_H #define HUSH_NK_H //#define ASSETCHAINS_N 77 //#define ASSETCHAINS_K 3 +// Equihash (N,K) param defaults when using -ac_nk #define ASSETCHAINS_N 96 #define ASSETCHAINS_K 5 diff --git a/src/limitedmap.h b/src/limitedmap.h index b1b521c86..e41496ffd 100644 --- a/src/limitedmap.h +++ b/src/limitedmap.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2012-2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/memusage.h b/src/memusage.h index 9f97828df..4c06ec22b 100644 --- a/src/memusage.h +++ b/src/memusage.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2015 The Bitcoin developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/merkleblock.h b/src/merkleblock.h index 1fe1683b9..fb9b925f2 100644 --- a/src/merkleblock.h +++ b/src/merkleblock.h @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/mini-gmp.h b/src/mini-gmp.h index 56647ee77..9b1e0c2d5 100644 --- a/src/mini-gmp.h +++ b/src/mini-gmp.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers /* mini-gmp, a minimalistic implementation of a GNU GMP subset. Copyright 2011-2015 Free Software Foundation, Inc. diff --git a/src/mruset.h b/src/mruset.h index e59c4f14c..1433198ad 100644 --- a/src/mruset.h +++ b/src/mruset.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2012-2015 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/netbase.h b/src/netbase.h index 2c7259794..e4f58614a 100644 --- a/src/netbase.h +++ b/src/netbase.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2009-2013 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/noui.h b/src/noui.h index 8086533b4..e3ed152e4 100644 --- a/src/noui.h +++ b/src/noui.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2013 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/random.h b/src/random.h index c51f05b5d..6f8953136 100644 --- a/src/random.h +++ b/src/random.h @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/reverselock.h b/src/reverselock.h index e57dbca59..0fd50d651 100644 --- a/src/reverselock.h +++ b/src/reverselock.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2015 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/scheduler.h b/src/scheduler.h index 173f23211..b6fa2abc5 100644 --- a/src/scheduler.h +++ b/src/scheduler.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2015 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/spentindex.h b/src/spentindex.h index 24f266eae..f96137854 100644 --- a/src/spentindex.h +++ b/src/spentindex.h @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 @@ -95,4 +96,4 @@ struct CSpentIndexKeyCompare } }; -#endif // HUSH_SPENTINDEX_H \ No newline at end of file +#endif // HUSH_SPENTINDEX_H diff --git a/src/streams.h b/src/streams.h index 5c22c9bbc..247bda717 100644 --- a/src/streams.h +++ b/src/streams.h @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2013 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/sync.h b/src/sync.h index bdda6d166..2bbf5f826 100644 --- a/src/sync.h +++ b/src/sync.h @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2013 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/threadsafety.h b/src/threadsafety.h index 58f75ea69..b7c7db594 100644 --- a/src/threadsafety.h +++ b/src/threadsafety.h @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/tinyformat.h b/src/tinyformat.h index 4bb96953d..1dc522cf0 100644 --- a/src/tinyformat.h +++ b/src/tinyformat.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // tinyformat.h // Copyright (C) 2011, Chris Foster [chris42f (at) gmail (d0t) com] // diff --git a/src/ui_interface.h b/src/ui_interface.h index 94ed742fa..c5ace5996 100644 --- a/src/ui_interface.h +++ b/src/ui_interface.h @@ -1,5 +1,6 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2012 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/uint252.h b/src/uint252.h index e7b98ddf0..08b6bd401 100644 --- a/src/uint252.h +++ b/src/uint252.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers #ifndef UINT252_H #define UINT252_H diff --git a/src/uint256.h b/src/uint256.h index 927314962..8ecca59a2 100644 --- a/src/uint256.h +++ b/src/uint256.h @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/undo.h b/src/undo.h index 01cb325ad..f78a168b1 100644 --- a/src/undo.h +++ b/src/undo.h @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2013 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/uthash.h b/src/uthash.h index 7b99c0133..1063daa0b 100644 --- a/src/uthash.h +++ b/src/uthash.h @@ -1,4 +1,4 @@ - +// Copyright (c) 2016-2022 The Hush developers /* Copyright (c) 2003-2014, Troy D. Hanson http://troydhanson.github.com/uthash/ All rights reserved. diff --git a/src/utilmoneystr.h b/src/utilmoneystr.h index bc3bce2b3..79aafaa6a 100644 --- a/src/utilmoneystr.h +++ b/src/utilmoneystr.h @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers + // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/utilstrencodings.h b/src/utilstrencodings.h index fe90b9237..ae3c2c117 100644 --- a/src/utilstrencodings.h +++ b/src/utilstrencodings.h @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/utiltime.h b/src/utiltime.h index 8c6575844..3f4b8061a 100644 --- a/src/utiltime.h +++ b/src/utiltime.h @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/utlist.h b/src/utlist.h index 93c7ceef0..67ac97720 100644 --- a/src/utlist.h +++ b/src/utlist.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers /* Copyright (c) 2007-2014, Troy D. Hanson http://troydhanson.github.com/uthash/ All rights reserved. From 43ef851f8c3981e67c8db27fc68750f6620c86c6 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Wed, 21 Sep 2022 08:46:02 -0700 Subject: [PATCH 147/295] Add copyright to files missing Hush copyright lines --- src/rpc/client.h | 1 + src/rpc/protocol.cpp | 1 + src/rpc/protocol.h | 1 + src/rpc/testtransactions.cpp | 1 + 4 files changed, 4 insertions(+) diff --git a/src/rpc/client.h b/src/rpc/client.h index e0955339c..f2f02661f 100644 --- a/src/rpc/client.h +++ b/src/rpc/client.h @@ -1,5 +1,6 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/rpc/protocol.cpp b/src/rpc/protocol.cpp index a43c67462..3d8553043 100644 --- a/src/rpc/protocol.cpp +++ b/src/rpc/protocol.cpp @@ -1,5 +1,6 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/rpc/protocol.h b/src/rpc/protocol.h index d8f37d9d0..a5602badf 100644 --- a/src/rpc/protocol.h +++ b/src/rpc/protocol.h @@ -1,5 +1,6 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/rpc/testtransactions.cpp b/src/rpc/testtransactions.cpp index 84403f3bc..c8a7e8d96 100644 --- a/src/rpc/testtransactions.cpp +++ b/src/rpc/testtransactions.cpp @@ -1,5 +1,6 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 From 2564f6a66f4ea32fb64870b63295fc76c1593e05 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Wed, 21 Sep 2022 08:47:45 -0700 Subject: [PATCH 148/295] Add copyright to files missing Hush copyright lines --- src/script/cc.cpp | 1 + src/script/cc.h | 1 + src/script/interpreter.h | 1 + src/script/script.cpp | 1 + src/script/script.h | 1 + src/script/script_error.cpp | 1 + src/script/script_error.h | 1 + src/script/serverchecker.cpp | 1 + src/script/serverchecker.h | 1 + src/script/sigcache.cpp | 1 + src/script/sigcache.h | 1 + src/script/sign.cpp | 1 + src/script/sign.h | 1 + src/script/zcashconsensus.cpp | 1 + src/script/zcashconsensus.h | 1 + 15 files changed, 15 insertions(+) diff --git a/src/script/cc.cpp b/src/script/cc.cpp index a0770a9b2..b86497d1b 100644 --- a/src/script/cc.cpp +++ b/src/script/cc.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers /****************************************************************************** * Copyright © 2014-2019 The SuperNET Developers. * * * diff --git a/src/script/cc.h b/src/script/cc.h index b3ee612a5..9bdfbeae5 100644 --- a/src/script/cc.h +++ b/src/script/cc.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers /****************************************************************************** * Copyright © 2014-2019 The SuperNET Developers. * * * diff --git a/src/script/interpreter.h b/src/script/interpreter.h index e7cf38cb0..8baf705b8 100644 --- a/src/script/interpreter.h +++ b/src/script/interpreter.h @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/script/script.cpp b/src/script/script.cpp index 37ca60630..6b2fe2e30 100644 --- a/src/script/script.cpp +++ b/src/script/script.cpp @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/script/script.h b/src/script/script.h index 1b804d4c1..104d45852 100644 --- a/src/script/script.h +++ b/src/script/script.h @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/script/script_error.cpp b/src/script/script_error.cpp index e555e1422..17766c488 100644 --- a/src/script/script_error.cpp +++ b/src/script/script_error.cpp @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/script/script_error.h b/src/script/script_error.h index 2219544b0..b31c0ebe6 100644 --- a/src/script/script_error.h +++ b/src/script/script_error.h @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/script/serverchecker.cpp b/src/script/serverchecker.cpp index 9227344ac..ec6008046 100644 --- a/src/script/serverchecker.cpp +++ b/src/script/serverchecker.cpp @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/script/serverchecker.h b/src/script/serverchecker.h index a541247b2..f6c581d40 100644 --- a/src/script/serverchecker.h +++ b/src/script/serverchecker.h @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/script/sigcache.cpp b/src/script/sigcache.cpp index 56733d94b..265867d99 100644 --- a/src/script/sigcache.cpp +++ b/src/script/sigcache.cpp @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/script/sigcache.h b/src/script/sigcache.h index 92406fabb..701ec78f4 100644 --- a/src/script/sigcache.h +++ b/src/script/sigcache.h @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/script/sign.cpp b/src/script/sign.cpp index 62785f870..56e379599 100644 --- a/src/script/sign.cpp +++ b/src/script/sign.cpp @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/script/sign.h b/src/script/sign.h index 190d23d35..a68fac011 100644 --- a/src/script/sign.h +++ b/src/script/sign.h @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/script/zcashconsensus.cpp b/src/script/zcashconsensus.cpp index 5119b8229..80b6cd55e 100644 --- a/src/script/zcashconsensus.cpp +++ b/src/script/zcashconsensus.cpp @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/script/zcashconsensus.h b/src/script/zcashconsensus.h index 0ccccd047..4ed1f428f 100644 --- a/src/script/zcashconsensus.h +++ b/src/script/zcashconsensus.h @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 From 35df2aa91f2b8517ca1418bc9f1a213d5949ccf8 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Wed, 21 Sep 2022 08:48:42 -0700 Subject: [PATCH 149/295] Add copyright to files missing Hush copyright lines --- src/wallet/db.h | 1 + src/wallet/rpcwallet.h | 1 + src/wallet/wallet_ismine.cpp | 1 + src/wallet/wallet_ismine.h | 1 + 4 files changed, 4 insertions(+) diff --git a/src/wallet/db.h b/src/wallet/db.h index 93a624eef..b9e72c64a 100644 --- a/src/wallet/db.h +++ b/src/wallet/db.h @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/wallet/rpcwallet.h b/src/wallet/rpcwallet.h index a05d3b820..306e19570 100644 --- a/src/wallet/rpcwallet.h +++ b/src/wallet/rpcwallet.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2016 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/wallet/wallet_ismine.cpp b/src/wallet/wallet_ismine.cpp index 40b27a9d2..bad5302e3 100644 --- a/src/wallet/wallet_ismine.cpp +++ b/src/wallet/wallet_ismine.cpp @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/wallet/wallet_ismine.h b/src/wallet/wallet_ismine.h index a6a9cd550..d843aeaa3 100644 --- a/src/wallet/wallet_ismine.h +++ b/src/wallet/wallet_ismine.h @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 From 03e13087837b80a48a9e820d8744dda62b2ea4d1 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Wed, 21 Sep 2022 08:50:10 -0700 Subject: [PATCH 150/295] Add copyright to files missing Hush copyright lines --- src/consensus/consensus.h | 1 + src/policy/fees.cpp | 1 + src/policy/fees.h | 1 + 3 files changed, 3 insertions(+) diff --git a/src/consensus/consensus.h b/src/consensus/consensus.h index 9a998af9d..2e22952ed 100644 --- a/src/consensus/consensus.h +++ b/src/consensus/consensus.h @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 /****************************************************************************** diff --git a/src/policy/fees.cpp b/src/policy/fees.cpp index 160158151..39c3efa36 100644 --- a/src/policy/fees.cpp +++ b/src/policy/fees.cpp @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin developers +// Copyright (c) 2016-2022 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 diff --git a/src/policy/fees.h b/src/policy/fees.h index 92652cab5..a1346bd32 100644 --- a/src/policy/fees.h +++ b/src/policy/fees.h @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin developers +// Copyright (c) 2016-2022 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 From ad3a35fcba1a09c658d2baf5eb8125a65a9d1579 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Wed, 21 Sep 2022 08:54:08 -0700 Subject: [PATCH 151/295] Add copyright to files missing Hush copyright lines --- src/mini-gmp.c | 1 + src/support/cleanse.cpp | 1 + src/support/cleanse.h | 1 + src/support/events.h | 1 + src/support/pagelocker.cpp | 1 + src/support/pagelocker.h | 1 + src/util/asmap.cpp | 1 + src/util/asmap.h | 1 + src/utilmoneystr.h | 2 +- 9 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/mini-gmp.c b/src/mini-gmp.c index f9ee23f15..6bd00d349 100644 --- a/src/mini-gmp.c +++ b/src/mini-gmp.c @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers /* mini-gmp, a minimalistic implementation of a GNU GMP subset. Contributed to the GNU project by Niels Möller diff --git a/src/support/cleanse.cpp b/src/support/cleanse.cpp index 7c58c94fe..9bd282df7 100644 --- a/src/support/cleanse.cpp +++ b/src/support/cleanse.cpp @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/support/cleanse.h b/src/support/cleanse.h index dc60b3cf6..6ec05412a 100644 --- a/src/support/cleanse.h +++ b/src/support/cleanse.h @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/support/events.h b/src/support/events.h index 0027b5665..d00025fc6 100644 --- a/src/support/events.h +++ b/src/support/events.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2016 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/support/pagelocker.cpp b/src/support/pagelocker.cpp index 4eaa9f0ba..f7b0ea6f2 100644 --- a/src/support/pagelocker.cpp +++ b/src/support/pagelocker.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2009-2013 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/support/pagelocker.h b/src/support/pagelocker.h index 851854869..9c3d3aedb 100644 --- a/src/support/pagelocker.h +++ b/src/support/pagelocker.h @@ -1,5 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2013 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 diff --git a/src/util/asmap.cpp b/src/util/asmap.cpp index 42c139a25..e515f6b6d 100644 --- a/src/util/asmap.cpp +++ b/src/util/asmap.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2019-2020 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/util/asmap.h b/src/util/asmap.h index 470cfbebd..9dc796d6f 100644 --- a/src/util/asmap.h +++ b/src/util/asmap.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2019 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/utilmoneystr.h b/src/utilmoneystr.h index 79aafaa6a..381f7357a 100644 --- a/src/utilmoneystr.h +++ b/src/utilmoneystr.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers - +// Copyright (c) 2016-2022 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 From ea93a31c093e9c5abc70084d24579df6bea39e52 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Wed, 21 Sep 2022 08:56:10 -0700 Subject: [PATCH 152/295] Add copyright to files missing Hush copyright lines --- src/hush_cJSON.c | 1 + util/afl/hush-wrapper | 1 + util/test-security-check.py | 1 + 3 files changed, 3 insertions(+) diff --git a/src/hush_cJSON.c b/src/hush_cJSON.c index facf79f2a..1b996e881 100644 --- a/src/hush_cJSON.c +++ b/src/hush_cJSON.c @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers /* Copyright (c) 2009 Dave Gamble diff --git a/util/afl/hush-wrapper b/util/afl/hush-wrapper index d316cae74..210ef1f01 100755 --- a/util/afl/hush-wrapper +++ b/util/afl/hush-wrapper @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# Copyright (c) 2016-2022 The Hush developers set -ex -o pipefail diff --git a/util/test-security-check.py b/util/test-security-check.py index 324b7bcd8..0fee542ca 100755 --- a/util/test-security-check.py +++ b/util/test-security-check.py @@ -1,4 +1,5 @@ #!/usr/bin/env python2 +# Copyright (c) 2016-2022 The Hush developers ''' Test script for security-check.py ''' From 6e6dfabbe2103c537bfa186a141e1c4a912a3cb4 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Wed, 21 Sep 2022 08:57:41 -0700 Subject: [PATCH 153/295] Add copyright to files missing Hush copyright lines --- src/cc/games/tetris.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cc/games/tetris.cpp b/src/cc/games/tetris.cpp index cd609154d..fc1830686 100644 --- a/src/cc/games/tetris.cpp +++ b/src/cc/games/tetris.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers /****************************************************************************** * Copyright © 2014-2019 The SuperNET Developers. * From 1e40d2711db80a6d0a35d7430868bd208f4bd89e Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Wed, 21 Sep 2022 08:59:19 -0700 Subject: [PATCH 154/295] Add copyright to files missing Hush copyright lines --- src/crypto/common.h | 1 + src/crypto/equihash.cpp | 1 + src/crypto/hmac_sha256.cpp | 1 + src/crypto/hmac_sha256.h | 1 + src/crypto/hmac_sha512.cpp | 1 + src/crypto/hmac_sha512.h | 1 + src/crypto/ripemd160.cpp | 1 + src/crypto/ripemd160.h | 1 + src/crypto/sha1.cpp | 1 + src/crypto/sha1.h | 1 + src/crypto/sha256.cpp | 1 + src/crypto/sha256.h | 1 + src/crypto/sha256_sse4.cpp | 1 + src/crypto/sha512.cpp | 1 + src/crypto/sha512.h | 1 + 15 files changed, 15 insertions(+) diff --git a/src/crypto/common.h b/src/crypto/common.h index d07ff0730..2b6be0901 100644 --- a/src/crypto/common.h +++ b/src/crypto/common.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2014 The Bitcoin Core developers // Copyright (c) 2016-2022 The Hush developers // Released under the GPLv3 diff --git a/src/crypto/equihash.cpp b/src/crypto/equihash.cpp index 07f82bcbe..9dc920212 100644 --- a/src/crypto/equihash.cpp +++ b/src/crypto/equihash.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2016 Jack Grigg // Copyright (c) 2016 The Zcash developers // Distributed under the GPLv3 software license, see the accompanying diff --git a/src/crypto/hmac_sha256.cpp b/src/crypto/hmac_sha256.cpp index 9e7863239..61622d9e4 100644 --- a/src/crypto/hmac_sha256.cpp +++ b/src/crypto/hmac_sha256.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/crypto/hmac_sha256.h b/src/crypto/hmac_sha256.h index 63daebb2a..1847e78d1 100644 --- a/src/crypto/hmac_sha256.h +++ b/src/crypto/hmac_sha256.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/crypto/hmac_sha512.cpp b/src/crypto/hmac_sha512.cpp index cc1b33be1..c4409613c 100644 --- a/src/crypto/hmac_sha512.cpp +++ b/src/crypto/hmac_sha512.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/crypto/hmac_sha512.h b/src/crypto/hmac_sha512.h index 661216f29..5deaae851 100644 --- a/src/crypto/hmac_sha512.h +++ b/src/crypto/hmac_sha512.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/crypto/ripemd160.cpp b/src/crypto/ripemd160.cpp index 05d0c8237..f5c88e7df 100644 --- a/src/crypto/ripemd160.cpp +++ b/src/crypto/ripemd160.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/crypto/ripemd160.h b/src/crypto/ripemd160.h index 61fd27def..28d76c6ba 100644 --- a/src/crypto/ripemd160.h +++ b/src/crypto/ripemd160.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/crypto/sha1.cpp b/src/crypto/sha1.cpp index e9570c8f7..f29489ba0 100644 --- a/src/crypto/sha1.cpp +++ b/src/crypto/sha1.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/crypto/sha1.h b/src/crypto/sha1.h index 1831d3ea5..982915dc3 100644 --- a/src/crypto/sha1.h +++ b/src/crypto/sha1.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/crypto/sha256.cpp b/src/crypto/sha256.cpp index 90c682b75..fd39de951 100644 --- a/src/crypto/sha256.cpp +++ b/src/crypto/sha256.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/crypto/sha256.h b/src/crypto/sha256.h index e4f42a62e..e54cd94a5 100644 --- a/src/crypto/sha256.h +++ b/src/crypto/sha256.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2014-2016 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/crypto/sha256_sse4.cpp b/src/crypto/sha256_sse4.cpp index 75f82b525..dda4401f0 100644 --- a/src/crypto/sha256_sse4.cpp +++ b/src/crypto/sha256_sse4.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2017 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/crypto/sha512.cpp b/src/crypto/sha512.cpp index 3ccf1e222..7099fbbbe 100644 --- a/src/crypto/sha512.cpp +++ b/src/crypto/sha512.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/crypto/sha512.h b/src/crypto/sha512.h index 8b10b9c51..9a348f874 100644 --- a/src/crypto/sha512.h +++ b/src/crypto/sha512.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2022 The Hush developers // Copyright (c) 2014 The Bitcoin Core developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html From 7e6220afacb28cf152539adda5ada0c98220b9fe Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Wed, 21 Sep 2022 22:18:19 -0400 Subject: [PATCH 155/295] Add release notes details to release process docs --- doc/release-process.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/release-process.md b/doc/release-process.md index b1176508f..60b693efc 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -88,6 +88,8 @@ Install deps on Linux: - Try to generate checkpoints as close to the release as possible, so you can have a recent block height be protected. - For instance, don't update checkpoints and then do a release a month later. You can always update checkpoint data again or multiple times - Update copyright years (if applicable) with util/replace.pl + - Update doc/relnotes/README.md + - To get the stats of file changes: `git diff --stat master...dev` - Do a fresh clone and fresh sync with new checkpoints - Stop node, wait 20 minutes, and then do a partial sync with new checkpoints - Make Gitea release From 3606703297abb1e563e8999eaf6f19ca8ed53a83 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Wed, 21 Sep 2022 23:22:37 -0400 Subject: [PATCH 156/295] Update relnotes for 3.9.2 'Anecdotal Axolotl' --- doc/relnotes/README.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/doc/relnotes/README.md b/doc/relnotes/README.md index 3993799ae..baf478fd0 100644 --- a/doc/relnotes/README.md +++ b/doc/relnotes/README.md @@ -10,6 +10,41 @@ and no longer on Github, since they banned Duke Leto and also because they censor many people around the world and work with evil organizations. +# Hush 3.9.2 "Anecdotal Axolotl" + +``` + 966 files changed, 26999 insertions(+), 2758 deletions(-) +``` + +This is an OPTIONAL release. It is recommended for exchanges, solo miners and mining pools to update to this release +since it contains various bugfixes and improvements that will benefit busy wallets. + + * This release adds RandomX support in Hush Smart Chains (HSCs) + * When creating a new HSC specify `-ac_algo=randomx` to use RandomX instead of Equihash + * Example: `hush-smart-chain -ac_name=RANDX -ac_algo=randomx ...` + * This allows HSCs to be mined with CPUs instead of ASICs + * Because of RandomX, `cmake` is a new dependency needed to compile Hush from source + * More detailed documentation available at ... + * A new feature called "zsweep" has been added, which defaults to disabled. + * It will sweep funds from all zaddrs into a single specified zaddr + * A new RPC `z_sweepstatus` will show various details about the sweeping + * There are many advanced options to it, see full docs at ... + * Expired transactions will not be relayed and nodes who relay expired transactions are no longer banned + * A node relaying expired transactions is usually misconfigured or confused, not attacking us + * This change means node operators no longer need to deal with unbanning or allowlisting confused nodes + * Fix a rare coredump that could happen when nodes have many unconfirmed or expired transactions + * New RPC: `getblockmerkletree`, which will show the full Merkle Tree for a block height + * New RPC: `z_consolidationstatus` is similar to `z_sweepstatus` and will show config+stats about consolidation + * New RPC: `z_anonsettxdelta` : Returns delta (difference) in the anonset for a given txid. + * A delta > 0 increases the anonset + * A delta < 0 reduces the anonset + * A delta=0 leaves the anonset the same + * New RPC: `z_anonsetblockdelta` : Returns delta (difference) in the anonset for a given block. + * getrawtransaction RPC now returns a "size" key with the size in bytes of a transaction + * sendmany RPC will now reject transactions that send to taddrs immediately, instead of them being rejected in mempool + * Preliminary support for FreeBSD has been added to the Hush build system + * ZeroMQ support has been removed from Hush + # Hush 3.9.1 "Luciferous Locust" This is an OPTIONAL release. It is most important for users with large wallets, as it fixes an important From 2eada0a1bdffdb717b8e662a3905322983399a2b Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Fri, 23 Sep 2022 05:47:50 -0400 Subject: [PATCH 157/295] Add zsweep+consolidation docs originally written by jahway603 --- doc/zsweep-consolidation.md | 76 +++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 doc/zsweep-consolidation.md diff --git a/doc/zsweep-consolidation.md b/doc/zsweep-consolidation.md new file mode 100644 index 000000000..43e62ed2e --- /dev/null +++ b/doc/zsweep-consolidation.md @@ -0,0 +1,76 @@ +# zsweep and consolidation + +This is to document zsweep and consolidation for advanced HUSH users. + +**Warning: If you don't know what Zsweep or Consolidation are, there is a good chance that you will not be using these advanced options. User beware!** + +# Table of Contents +1. [Using Zsweep](#zsweep) +1. [Using Consolidation](#consolidation) +1. [Using Zsweep & Consolidation Together](#zsweep-&-consolidation-together) + +# Pre-Step & Further Details + +A user can use these options at the command line, but it is **recommended to configure these options within the HUSH3.conf file**. + +Consolidation takes many unspent shielded UTXOs (zutxos) into one zutxo, which makes spending them in the future faster and potentially cost less in fees. It also helps prevent certain kinds of metadata leakages and spam attacks. It is not recommended for very large wallets (wallet.dat files with thousands of transactions) for performance reasons. This is why it defaults to OFF for CLI full nodes but ON for GUI wallets that use an embedded hushd. + +Zsweep is when you sweep numerous zutxos into one z-address that you configure. This z-address can be local to that system or it can be configured to sweep to a remote wallet on a different system with the zsweepexternal=1 option, which is explained below in the Zsweep section. + +## Zsweep + +1. We add the following to our conf file as per the Pre-Step. + ``` + zsweep=1 + zsweepaddress=zs1... + ``` + +1. The above zsweepaddress will be the z-address you want to sweep into (zs1... is a placeholder for this documentation) and it must exist within the same local wallet you are configuring this for. If you want to zsweep to an address on another computer, then set zsweepexternal=1 as explained in the options below. + +1. The following are optional zsweep settings with their details: + + | Zsweep Option Name| Details of what it does | + |-------------------|-------------------------| + | zsweepexternal=1 | Will enable the option to zsweep to an "external" z-address which exists in a wallet on a different system. | + | zsweepinterval=5 | By default zsweep runs every 5 blocks, so set and modify this value to change that. | + | zsweepmaxinputs=50 | By default zsweep makes sure to not reduce the anonset in any tx by having a maximum number of inputs of 8. This should be fine for new wallets, but if you have an existing wallet with many zutxos it can be changed with this option. Keep in mind that large values will make sweeping faster at the expense of reducing the AnonSet. | + | zsweepfee=0 | The default zsweep fee is 10000 puposhis or 0.0001 HUSH, the default for all transactions. To use fee=0 for zsweep transactions, set this option. | + | zsweepexclude=zs1... | Exclude a certain address from being swept. Can be used multiple times to exclude multiple addressses | + +1. The following HUSH RPC will let you view your zsweep configuration options and run-time stats at the command line: `hush-cli z_sweepstatus` + +## Consolidation + +1. We add the following to our conf file as per the Pre-Step. + ``` + consolidation=1 + ``` + +1. The following are optional consolidation settings with their details: + + | Consolidation Option Name| Details of what it does | + |--------------------------|-------------------------| + | consolidationtxfee=0 | The default consolidation fee is 10000 puposhis or 0.0001 HUSH, the default for all transactions. To use fee=0 for consolidation transactions, set this option. | + | consolidatesaplingaddress=zs1... | Default of consolidation is set to all, but you can set this option if you have one specific z-address (zs1... is a placeholder for this documentation) that you want to only consolidate to. | + +1. The following HUSH RPC will let you view your consolidation configuration options and run-time stats at the command line: `hush-cli z_sweepstatus` + +## Zsweep & Consolidation Together + +1. We add the following to our conf file as per the Pre-Step. + ``` + zsweep=1 + zsweepaddress=zs1... + consolidation=1 + ``` + +1. Then follow along with the zsweep section above if you want to set specific options for the zsweep behavior. + +### Copyright + +jahway603 and The Hush Developers + +### License + +GPLv3 + From 804852e99c21e38e0f8498130b06c291ba0346a5 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Fri, 23 Sep 2022 06:57:31 -0400 Subject: [PATCH 158/295] Document RandomX --- doc/randomx.md | 104 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 doc/randomx.md diff --git a/doc/randomx.md b/doc/randomx.md new file mode 100644 index 000000000..a690ded2b --- /dev/null +++ b/doc/randomx.md @@ -0,0 +1,104 @@ +# RandomX + +Hush Smart Chains support using RandomX as a Proof-Of-Work algorithm as of release 3.9.2 . +This means you can now launch a privacy coin with Hush tech that can be mined with a CPU +instead of requiring an ASIC or GPU. RandomX is the same algorithm that Monero (XMR) and +various other cryptocoins use. As far as we know, Hush Smart Chains are the first coins +based on Zcash Protocol that can use the RandomX PoW algorithm. Many thanks to all the +people who helped make this possible. + +# Example + +The following command can be used to launch an HSC on a single computer. Each option will be explained. +HSC CLI arguments that start with `-ac_` means they *Affect Consensus*. + +``` +./src/hush-smart-chain -ac_halving=100 -ac_algo=randomx -ac_name=RANDOMX -ac_private=1 -ac_blocktime=15 -ac_reward=500000000 -ac_supply=55555 -gen=1 -genproclimit=1 -testnode=1 +``` + + * `hush-smart-chain` is the script used to launch or connect to HSCs + * It lives in the `./src` directory, next to `hushd` and `hush-cli` + * It is called `hush-smart-chain.bat` on Windows + * `-ac_halving=100` means "the block reward halves every 100 blocks" + * `-ac_algo=randomx` means "use RandomX for Proof-Of-Work + * The default is Equihash (200,9) + * `-ac_name=RANDOMX` sets the name of the HSC to RANDOMX + * `-ac_private=1` means only z2z transactions will be allowed, like HUSH mainnet + * `-ac_blocktime=15` means blocks will be 15 seconds on average + * The default is 60 seconds + * `-ac_reward=500000000` means the block reward will start at 5 RANDOMX coins per block + * This argument is given in satoshis + * `-ac_supply=55555` means an existing supply of 55555 will exist at block 1 + * This argument is given in coins, not satoshis + * This is sometimes called a "pre-mine" and is useful when migrating an existing coin + * Block 0 of HSC's is always the BTC mainnet genesis block. + * So the genesis block of HSC's is actually block 1, not block 0 + * `-gen=1` means this node is a mining node + * `-genproclimit=1` means use 1 CPU thread will be used for mining + * `-testnode=1` means only 1 node can be used to mine a genesis block + * testnode is primarily for testing, when launching a real genesis block, this option should not be used + * By default, at least two nodes are required to mine a genesis block + * One node would use +``` +# first node +./src/hush-smart-chain -ac_halving=100 -ac_algo=randomx -ac_name=RANDOMX -ac_private=1 -ac_blocktime=15 -ac_reward=500000000 -ac_supply=55555 +``` + * And the second node would use: +``` +# mining node. NOTE: This node will mine the genesis block and pre-mine, if any +./src/hush-smart-chain -ac_halving=100 -ac_algo=randomx -ac_name=RANDOMX -ac_private=1 -ac_blocktime=15 -ac_reward=500000000 -ac_supply=55555 -gen=1 -genproclimit=1 +``` + +# Advanced Options + +HUSH RandomX currently has two advanced options that some may want to use: + + * `ac_randomx_interval` controls how often the RandomX key block will change + * The default is 1024 blocks and is good for most use cases. + * This corresponds to ~17 hours for HSCs with the default block time of 60s + * `ac_randomx_lag` sets the number of blocks to wait before updating the key block + * The default is 64 blocks + * This corresponds to 64 mins for HSCs with the default block time of 60s + * `ac_randomx_interval` should always be larger than 2 times `ac_randomx_lag` + * Setting these to arbitrary values could affect the chain security of your coin + * It is not recommended to change these values unless you are really sure why you are doing it + +# RandomX Internals + +This section is not required reading if you just want to use it as a PoW algorithm for an HSC. Here we will explain how the internals of RandomX works inside of the Hush codebase. + +We use the official RandomX implementation from https://github.com/tevador/RandomX with custom configuration options. If some type of hardware is created to mine the XMR RandomX algorithm, it will not be compatible with the Hush RandomX algorithm. This is by design. All Hush Smart Chains use the same RandomX config options, so if a hardware device is created to mine one HSC that uses RandomX, it can be used to mine any HSC using RandomX. Every HSC with unique consensus parameters will start off with it's own unique key block with at least 9 bytes of entropy. + +The source code of RandomX is embedded in the Hush source code at `./src/RandomX` and the configuration options used are at `./src/RandomX/src/configuration.h` . + +The changes from default RandomX configuration options are listed below. + +``` + //Argon2d salt +-#define RANDOMX_ARGON_SALT "RandomX\x03" ++#define RANDOMX_ARGON_SALT "RandomXHUSH\x03" + + //Number of Argon2d iterations for Cache initialization. +-#define RANDOMX_ARGON_ITERATIONS 3 ++#define RANDOMX_ARGON_ITERATIONS 5 + + //Number of parallel lanes for Cache initialization. + #define RANDOMX_ARGON_LANES 1 +@@ -53,13 +53,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #define RANDOMX_DATASET_EXTRA_SIZE 33554368 + + //Number of instructions in a RandomX program. Must be divisible by 8. +-#define RANDOMX_PROGRAM_SIZE 256 ++#define RANDOMX_PROGRAM_SIZE 512 + + //Number of iterations during VM execution. +-#define RANDOMX_PROGRAM_ITERATIONS 2048 ++#define RANDOMX_PROGRAM_ITERATIONS 4096 + + //Number of chained VM executions per hash. +-#define RANDOMX_PROGRAM_COUNT 8 ++#define RANDOMX_PROGRAM_COUNT 16 + +``` +RandomX opcode frequencies were not modfiied, the defaults are used. + From d0c14b38e1f6e63251a3776193b63c2d2414a59c Mon Sep 17 00:00:00 2001 From: onryo Date: Fri, 23 Sep 2022 18:24:42 +0200 Subject: [PATCH 159/295] f yt and adding social links --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 31e5cbb61..23ad9ffeb 100644 --- a/README.md +++ b/README.md @@ -62,9 +62,11 @@ Please feel free to join us on Telegram for official support: * Mining group: https://hush.is/telegram_mining Other socials: -* Toot us @MyHushTeam on Twitter -* Follow Hush on YouTube -* Join Hush on Reddit +* Twitter: @hushisprivacy +* Matrix: @hush_main:meowchat.xyz +* PeerTube videos.hush.is +* Reddit @Myhush +* Mastodon @myhushteam@fosstodon.org ## License From 819f99cc07bde0bcfec62d53031367c2ca002622 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Sun, 25 Sep 2022 06:27:33 -0700 Subject: [PATCH 160/295] Basic HSC docs --- doc/hsc.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 doc/hsc.md diff --git a/doc/hsc.md b/doc/hsc.md new file mode 100644 index 000000000..5d5be9496 --- /dev/null +++ b/doc/hsc.md @@ -0,0 +1,20 @@ +# Hush Smart Chains + +An overview of HSCs can be found here: + +https://git.hush.is/hush/hush-smart-chains + +Hush Smart Chains allow you to create a privacy coin with no custom C++ code, just running one command! +The new coin that is created can use either Equihash PoW (ASIC or GPU) or RandomX PoW (CPU). + +## HSC Creator + +https://git.hush.is/hush/hsc-creator with its site https://hush.is/hsc-creator + +## HSC HOWTO + +https://git.hush.is/onryo/hush-smart-chain-how-to + +## HSC CLI + +https://git.hush.is/jahway603/hsc-cli From bffa3ce042664eed7f59437401c70806d1aa9f98 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Sun, 25 Sep 2022 06:32:03 -0700 Subject: [PATCH 161/295] Update 3.9.2 relnotes --- doc/relnotes/README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/relnotes/README.md b/doc/relnotes/README.md index baf478fd0..6502a6143 100644 --- a/doc/relnotes/README.md +++ b/doc/relnotes/README.md @@ -24,11 +24,12 @@ since it contains various bugfixes and improvements that will benefit busy walle * Example: `hush-smart-chain -ac_name=RANDX -ac_algo=randomx ...` * This allows HSCs to be mined with CPUs instead of ASICs * Because of RandomX, `cmake` is a new dependency needed to compile Hush from source - * More detailed documentation available at ... + * More detailed documentation available at https://git.hush.is/hush/hush3/src/branch/dev/doc/randomx.md + * For general info about HSCs see https://git.hush.is/hush/hush3/src/branch/dev/doc/hsc.md * A new feature called "zsweep" has been added, which defaults to disabled. * It will sweep funds from all zaddrs into a single specified zaddr * A new RPC `z_sweepstatus` will show various details about the sweeping - * There are many advanced options to it, see full docs at ... + * There are many advanced options to it, see full docs at https://git.hush.is/hush/hush3/src/branch/dev/doc/zsweep-consolidation.md * Expired transactions will not be relayed and nodes who relay expired transactions are no longer banned * A node relaying expired transactions is usually misconfigured or confused, not attacking us * This change means node operators no longer need to deal with unbanning or allowlisting confused nodes @@ -43,6 +44,9 @@ since it contains various bugfixes and improvements that will benefit busy walle * getrawtransaction RPC now returns a "size" key with the size in bytes of a transaction * sendmany RPC will now reject transactions that send to taddrs immediately, instead of them being rejected in mempool * Preliminary support for FreeBSD has been added to the Hush build system + * New contrib scripts: + * `contrib/gen-zaddrs.pl` - Generate zaddrs in bulk, defaults to 50 + * `contrib/sdl_checkpoints.pl` - Generate SDL checkpoints using `getblockmerkletree` * ZeroMQ support has been removed from Hush # Hush 3.9.1 "Luciferous Locust" From be7f35569175409507dabfcbb879ceb8ff9d912e Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Sun, 25 Sep 2022 09:02:30 -0700 Subject: [PATCH 162/295] RandomX for HSC docs --- doc/hsc.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/hsc.md b/doc/hsc.md index 5d5be9496..3ff3bc263 100644 --- a/doc/hsc.md +++ b/doc/hsc.md @@ -18,3 +18,7 @@ https://git.hush.is/onryo/hush-smart-chain-how-to ## HSC CLI https://git.hush.is/jahway603/hsc-cli + +## RandomX for HSCs + +Detailed docs on how to use RandomX Proof-of-Work is here: https://git.hush.is/hush/hush3/src/branch/dev/doc/randomx.md From f792488328dd87231542f8bcae8f3bf9c930f3d3 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Tue, 27 Sep 2022 05:01:35 -0700 Subject: [PATCH 163/295] Improve release process docs --- doc/release-process.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/release-process.md b/doc/release-process.md index 60b693efc..d631104a4 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -92,8 +92,9 @@ Install deps on Linux: - To get the stats of file changes: `git diff --stat master...dev` - Do a fresh clone and fresh sync with new checkpoints - Stop node, wait 20 minutes, and then do a partial sync with new checkpoints - - Make Gitea release - - Make Git Tag (Gitea can do this) + - Merge dev into master: `git checkout master; git pull && git merge --no-ff dev` + - The above command will not merge if "git pull" creates a merge conflict + - Make Gitea release with git tag from master branch (make sure to merge dev in first) - Use util/gen-linux-binary-release.sh to make a Linux release binary - Use util/build-debian-package.sh to make an x86 Debian package for the release - Debian packages should be done after you make manpages, because those are included in Debian packages From 9cf440ae2ded902cd157a0f50e626e2045309fa7 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Tue, 27 Sep 2022 05:02:46 -0700 Subject: [PATCH 164/295] Explain git-fu in reldocs --- doc/release-process.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/release-process.md b/doc/release-process.md index d631104a4..94a4a5ba3 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -92,8 +92,9 @@ Install deps on Linux: - To get the stats of file changes: `git diff --stat master...dev` - Do a fresh clone and fresh sync with new checkpoints - Stop node, wait 20 minutes, and then do a partial sync with new checkpoints - - Merge dev into master: `git checkout master; git pull && git merge --no-ff dev` + - Merge dev into master: `git checkout master; git pull && git merge --no-ff dev && git push` - The above command will not merge if "git pull" creates a merge conflict + - The above command will not push if there is a problem with merging dev - Make Gitea release with git tag from master branch (make sure to merge dev in first) - Use util/gen-linux-binary-release.sh to make a Linux release binary - Use util/build-debian-package.sh to make an x86 Debian package for the release From 517e16f1b0c70f87b9dc24b5d6da47201c4df0f0 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Tue, 27 Sep 2022 05:04:31 -0700 Subject: [PATCH 165/295] Ensure local dev branch is up-to-date before merging dev --- doc/release-process.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/release-process.md b/doc/release-process.md index 94a4a5ba3..cdfbeec24 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -92,7 +92,8 @@ Install deps on Linux: - To get the stats of file changes: `git diff --stat master...dev` - Do a fresh clone and fresh sync with new checkpoints - Stop node, wait 20 minutes, and then do a partial sync with new checkpoints - - Merge dev into master: `git checkout master; git pull && git merge --no-ff dev && git push` + - Merge dev into master: `git checkout dev && git pull && git checkout master && git pull && git merge --no-ff dev && git push` + - The above command makes sure that your local dev branch is up to date before doing anything - The above command will not merge if "git pull" creates a merge conflict - The above command will not push if there is a problem with merging dev - Make Gitea release with git tag from master branch (make sure to merge dev in first) From fae0a21257b8921ae63321a669f3e1570e0ab21d Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 27 Sep 2022 08:34:42 -0400 Subject: [PATCH 166/295] Add more details to release process --- doc/release-process.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/release-process.md b/doc/release-process.md index cdfbeec24..cde02b52e 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -97,9 +97,14 @@ Install deps on Linux: - The above command will not merge if "git pull" creates a merge conflict - The above command will not push if there is a problem with merging dev - Make Gitea release with git tag from master branch (make sure to merge dev in first) + - Make sure git tag starts with a `v` such as `v3.9.2` - Use util/gen-linux-binary-release.sh to make a Linux release binary + - Upload Linux binary to Gitea release and add SHA256 sum - Use util/build-debian-package.sh to make an x86 Debian package for the release - Debian packages should be done after you make manpages, because those are included in Debian packages + - `lintian` is an optional dependency, it's not needed to build the .deb + - Upload .deb to Gitea release + - Add SHA256 checksum of .deb to release - Use util/build-debian-package-ARM.sh (does this still work?) to make an ARM Debian package for the release - Upload the debian packages to the Gitea release page, with SHA256 sums From 4d89566f8e4cf1ab6b8088fb489388407706b47b Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Tue, 27 Sep 2022 06:09:58 -0700 Subject: [PATCH 167/295] This needs to be documented better --- doc/release-process.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/release-process.md b/doc/release-process.md index cde02b52e..fcbd31eb5 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -107,4 +107,5 @@ Install deps on Linux: - Add SHA256 checksum of .deb to release - Use util/build-debian-package-ARM.sh (does this still work?) to make an ARM Debian package for the release - Upload the debian packages to the Gitea release page, with SHA256 sums + - Figure out how to update https://faq.hush.is/rpc/ for new release From 8dbfe6eb13f448f6cedece4533ac37540c22d26a Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Tue, 27 Sep 2022 18:23:39 -0700 Subject: [PATCH 168/295] Add copyright --- src/cryptoconditions/Makefile.am | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cryptoconditions/Makefile.am b/src/cryptoconditions/Makefile.am index 615ac5783..8410e7859 100644 --- a/src/cryptoconditions/Makefile.am +++ b/src/cryptoconditions/Makefile.am @@ -1,3 +1,6 @@ +# Copyright 2016-2022 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 lib_LTLIBRARIES=libcryptoconditions.la noinst_LTLIBRARIES=$(CRYPTOCONDITIONS_CORE) SUBDIRS = src/include/secp256k1 From 23d4a2cb735dc44b0d0a58f14a2b8a3002923b1e Mon Sep 17 00:00:00 2001 From: jahway603 Date: Tue, 27 Sep 2022 22:27:54 -0400 Subject: [PATCH 169/295] re-fixing spacing in manpages --- doc/man/hush-cli.1 | 3 +++ doc/man/hush-tx.1 | 3 +++ doc/man/hushd.1 | 3 +++ 3 files changed, 9 insertions(+) diff --git a/doc/man/hush-cli.1 b/doc/man/hush-cli.1 index 93c315060..f9c6e7aaa 100644 --- a/doc/man/hush-cli.1 +++ b/doc/man/hush-cli.1 @@ -76,8 +76,11 @@ In order to ensure you are adequately protecting your privacy when using Hush, please see . Copyright (C) 2016-2022 Duke Leto and The Hush Developers + Copyright (C) 2016-2020 jl777 and SuperNET developers + Copyright (C) 2016-2018 The Zcash developers + Copyright (C) 2009-2014 The Bitcoin Core developers This is experimental Free Software! Fuck Yeah!!!!! diff --git a/doc/man/hush-tx.1 b/doc/man/hush-tx.1 index 4a01ad1e7..8ba9a3d28 100644 --- a/doc/man/hush-tx.1 +++ b/doc/man/hush-tx.1 @@ -89,8 +89,11 @@ In order to ensure you are adequately protecting your privacy when using Hush, please see . Copyright (C) 2016-2022 Duke Leto and The Hush Developers + Copyright (C) 2016-2020 jl777 and SuperNET developers + Copyright (C) 2016-2018 The Zcash developers + Copyright (C) 2009-2014 The Bitcoin Core developers This is experimental Free Software! Fuck Yeah!!!!! diff --git a/doc/man/hushd.1 b/doc/man/hushd.1 index 3cd181f7c..631db3502 100644 --- a/doc/man/hushd.1 +++ b/doc/man/hushd.1 @@ -725,8 +725,11 @@ In order to ensure you are adequately protecting your privacy when using Hush, please see . Copyright (C) 2016-2022 Duke Leto and The Hush Developers + Copyright (C) 2016-2020 jl777 and SuperNET developers + Copyright (C) 2016-2018 The Zcash developers + Copyright (C) 2009-2014 The Bitcoin Core developers This is experimental Free Software! Fuck Yeah!!!!! From 2c99fdb43dca9ad447d1fac34d5098f066c4d0df Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Wed, 28 Sep 2022 05:19:36 -0700 Subject: [PATCH 170/295] Add placeholder in relnotes for next release and add note in release process docs --- doc/release-process.md | 2 ++ doc/relnotes/README.md | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/doc/release-process.md b/doc/release-process.md index fcbd31eb5..1ef2a3ae7 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -4,6 +4,8 @@ Beware of making high-risk changes (such as consensus changes, p2p layer changes and wallet/transaction changes) too close to a new release, because they will not get as much testing as they should. Don't merge large branches which haven't undergone lots of testing just before a release. +It is best to keep doc/relnotes/README.md up to date as changes and bug fixes are made. It's more work to summarize all changes and bugfixes just before the release. + ## Check for changes on master that should be on dev Often there are trivial changes made directly on master, such as documentation changes. In theory, no code changes should happen on master without being on dev first, but it's better to be safe than sorry. We want the dev branch which undergoes testing to be as close as possible to what the master branch will become, so we don't want to merge dev into master and just assume everything works. So it's best to merge the master branch into dev just before merging the dev branch into master. diff --git a/doc/relnotes/README.md b/doc/relnotes/README.md index 6502a6143..52aa0136f 100644 --- a/doc/relnotes/README.md +++ b/doc/relnotes/README.md @@ -10,6 +10,12 @@ and no longer on Github, since they banned Duke Leto and also because they censor many people around the world and work with evil organizations. +# Hush 3.9.3 "XXX" + +``` +... +``` + # Hush 3.9.2 "Anecdotal Axolotl" ``` From 64e8d052144f9ba59a6633803f78997372d1271a Mon Sep 17 00:00:00 2001 From: jahway603 Date: Thu, 29 Sep 2022 00:29:28 -0400 Subject: [PATCH 171/295] fixed an update script --- configure.ac | 2 +- util/update-copyrights.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index e863c6384..c542219cd 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,7 @@ 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))) define(_CLIENT_VERSION_IS_RELEASE, true) -define(_COPYRIGHT_YEAR, 2021) +define(_COPYRIGHT_YEAR, 2022) AC_INIT([Hush],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_SUFFIX(_ZC_BUILD_VAL)],[https://git.hush.is/hush/hush3],[hush]) AC_CONFIG_SRCDIR([src/main.cpp]) AC_CONFIG_HEADERS([src/config/bitcoin-config.h]) diff --git a/util/update-copyrights.sh b/util/update-copyrights.sh index 5a5c09cb1..96e78a5a0 100755 --- a/util/update-copyrights.sh +++ b/util/update-copyrights.sh @@ -11,3 +11,4 @@ ack -l -i "20..-20..*Hush dev" | xargs ./util/replace.pl -$1 -$2 # This updates the define which is used by C++ help output ./util/replace.pl "COPYRIGHT_YEAR $1" "COPYRIGHT_YEAR $2" src/clientversion.h +./util/replace.pl "COPYRIGHT_YEAR, $1" "COPYRIGHT_YEAR, $2" configure.ac From e8e0cb93b90aeb68a594e53a471574f1062c5fef Mon Sep 17 00:00:00 2001 From: jahway603 Date: Thu, 29 Sep 2022 00:34:41 -0400 Subject: [PATCH 172/295] fixed manpage copyright spacing issue --- src/util.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util.cpp b/src/util.cpp index e9d0a63e5..47ca963b4 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1036,8 +1036,11 @@ std::string LicenseInfo() { return "\n" + FormatParagraph(strprintf(_("Copyright (C) 2016-%i Duke Leto and The Hush Developers"), COPYRIGHT_YEAR)) + "\n" + + "\n" + FormatParagraph(strprintf(_("Copyright (C) 2016-2020 jl777 and SuperNET developers"))) + "\n" + + "\n" + FormatParagraph(strprintf(_("Copyright (C) 2016-2018 The Zcash developers"))) + "\n" + + "\n" + FormatParagraph(strprintf(_("Copyright (C) 2009-2014 The Bitcoin Core developers"))) + "\n" + "\n" + FormatParagraph(_("This is experimental Free Software! Fuck Yeah!!!!!")) + "\n" + From 30a1921e26c867fdc5163770e0778d75a9cfdd48 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Tue, 4 Oct 2022 13:39:41 -0400 Subject: [PATCH 173/295] added -ac_randomx_interval and -ac_randomx_lag to hushd --help --- src/init.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/init.cpp b/src/init.cpp index 9c9f36329..9cdd3a034 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -602,6 +602,8 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-ac_private", _("Shielded transactions only (except coinbase + notaries), default is 0")); strUsage += HelpMessageOpt("-ac_pubkey", _("Public key for receiving payments on the network")); strUsage += HelpMessageOpt("-ac_public", _("Transparent transactions only, default 0")); + strUsage += HelpMessageOpt("-ac_randomx_interval", _("Controls how often the RandomX key block will change, default is 1024")); + strUsage += HelpMessageOpt("-ac_randomx_lag", _("Sets the number of RandomX blocks to wait before updating the key block, default is 64")); strUsage += HelpMessageOpt("-ac_reward", _("Block reward in satoshis, default is 0")); strUsage += HelpMessageOpt("-ac_sapling", _("Sapling activation block height")); strUsage += HelpMessageOpt("-ac_script", _("P2SH/multisig address to receive founders rewards")); From 71923e3ffb8a46e47d95eac92a202ae0b255d912 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 17 Oct 2022 07:03:32 -0400 Subject: [PATCH 174/295] Initial implementation of getrescaninfo --- src/wallet/rpcdump.cpp | 38 +++++++++++++++++++++++++++++++++----- src/wallet/rpcwallet.cpp | 2 ++ src/wallet/wallet.cpp | 7 +++++++ src/wallet/wallet.h | 7 +++++++ 4 files changed, 49 insertions(+), 5 deletions(-) diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index 6d30a706c..6ba77f862 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -2,7 +2,6 @@ // Copyright (c) 2016-2022 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. * * * @@ -17,7 +16,6 @@ * Removal or modification of this copyright notice is prohibited. * * * ******************************************************************************/ - #include "chain.h" #include "key_io.h" #include "rpc/server.h" @@ -29,13 +27,10 @@ #include "util.h" #include "utiltime.h" #include "wallet.h" - #include #include - #include #include - #include using namespace std; @@ -149,6 +144,39 @@ UniValue convertpassphrase(const UniValue& params, bool fHelp, const CPubKey& my return ret; } +UniValue getrescaninfo(const UniValue& params, bool fHelp, const CPubKey& mypk) +{ + if (!EnsureWalletIsAvailable(fHelp)) + return NullUniValue; + + if (fHelp || params.size() > 0) + throw runtime_error( + "getrescaninfo\n" + "\nGet rescan info such as starting height and current height.\n" + "\nArguments: none\n" + "\nExamples:\n" + "\nGet rescan info:\n" + + HelpExampleCli("getrescaninfo","") + ); + UniValue ret(UniValue::VOBJ); + auto rescanning = pwalletMain->fRescanning; + ret.push_back(Pair("rescanning", rescanning)); + if(rescanning) { + auto rescanHeight = pwalletMain->rescanHeight; + auto startHeight = pwalletMain->rescanStartHeight; + auto currentHeight = chainActive.Height(); + // if current height is 0, progress=1 since there is nothing to rescan + char progress[8]; + if (currentHeight != 0) { + sprintf(progress, "%.4f", (double) rescanHeight / (double) currentHeight ); + ret.push_back(Pair("rescan_progress", progress)); + } + ret.push_back(Pair("rescan_start_height", startHeight)); + ret.push_back(Pair("rescan_height", rescanHeight)); + } + return ret; +} + UniValue rescan(const UniValue& params, bool fHelp, const CPubKey& mypk) { //LOCK2(cs_main, pwalletMain->cs_wallet); diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index ee346ddc9..f2d86c2ce 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -8503,6 +8503,7 @@ extern UniValue z_importviewingkey(const UniValue& params, bool fHelp, const CPu extern UniValue z_exportwallet(const UniValue& params, bool fHelp, const CPubKey& mypk); extern UniValue z_importwallet(const UniValue& params, bool fHelp, const CPubKey& mypk); extern UniValue rescan(const UniValue& params, bool fHelp, const CPubKey& mypk); +extern UniValue getrescaninfo(const UniValue& params, bool fHelp, const CPubKey& mypk); static const CRPCCommand commands[] = @@ -8544,6 +8545,7 @@ static const CRPCCommand commands[] = { "wallet", "lockunspent", &lockunspent, true }, { "wallet", "move", &movecmd, false }, { "wallet", "rescan", &rescan, false }, + { "wallet", "getrescaninfo", &getrescaninfo, true }, { "wallet", "sendfrom", &sendfrom, false }, { "wallet", "sendmany", &sendmany, false }, { "wallet", "sendtoaddress", &sendtoaddress, false }, diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 1981ce21c..0f8ee8a68 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2760,6 +2760,7 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate) if(fZdebug) LogPrintf("%s: fUpdate=%d now=%li\n",__func__,fUpdate,nNow); + pwalletMain->fRescanning = true; CBlockIndex* pindex = pindexStart; { LOCK2(cs_main, cs_wallet); @@ -2772,8 +2773,11 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate) ShowProgress(_("Rescanning..."), 0); // show rescan progress in GUI as dialog or on splashscreen, if -rescan on startup double dProgressStart = Checkpoints::GuessVerificationProgress(chainParams.Checkpoints(), pindex, false); double dProgressTip = Checkpoints::GuessVerificationProgress(chainParams.Checkpoints(), chainActive.LastTip(), false); + + pwalletMain->rescanStartHeight = pindex->GetHeight(); while (pindex) { + pwalletMain->rescanHeight = pindex->GetHeight(); if (pindex->GetHeight() % 100 == 0 && dProgressTip - dProgressStart > 0.0) ShowProgress(_("Rescanning..."), std::max(1, std::min(99, (int)((Checkpoints::GuessVerificationProgress(chainParams.Checkpoints(), pindex, false) - dProgressStart) / (dProgressTip - dProgressStart) * 100)))); @@ -2825,6 +2829,9 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate) ShowProgress(_("Rescanning..."), 100); // hide progress dialog in GUI } + + // we are no longer rescanning + pwalletMain->fRescanning = false; return ret; } diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 058cc30d7..56bd327c8 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -807,6 +807,13 @@ public: bool fSweepEnabled = false; bool fSweepExternalEnabled = false; bool fSweepRunning = false; + // Are we currently rescanning? + bool fRescanning = false; + // Current height of our rescan + int rescanHeight = 0; + // Starting height of our rescan + int rescanStartHeight = 0; + int nextSweep = 0; int amountSwept = 0; int amountConsolidated = 0; From 29ec7b5fb69a2fbadc8b424d43137e4077af2965 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 17 Oct 2022 07:13:50 -0400 Subject: [PATCH 175/295] Set rescanStartHeight before we lock cs_main + cs_wallet --- src/wallet/wallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 0f8ee8a68..9e8cd1aa4 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2762,6 +2762,7 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate) pwalletMain->fRescanning = true; CBlockIndex* pindex = pindexStart; + pwalletMain->rescanStartHeight = pindex->GetHeight(); { LOCK2(cs_main, cs_wallet); @@ -2774,7 +2775,6 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate) double dProgressStart = Checkpoints::GuessVerificationProgress(chainParams.Checkpoints(), pindex, false); double dProgressTip = Checkpoints::GuessVerificationProgress(chainParams.Checkpoints(), chainActive.LastTip(), false); - pwalletMain->rescanStartHeight = pindex->GetHeight(); while (pindex) { pwalletMain->rescanHeight = pindex->GetHeight(); From 6fda12612dfe6a71722123f095a8e1898e57fe06 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Wed, 19 Oct 2022 05:12:12 -0400 Subject: [PATCH 176/295] Initial implementation of abortrescan --- src/wallet/rpcdump.cpp | 30 ++++++++++++++++++++++++++++++ src/wallet/wallet.cpp | 13 +++++++++++++ src/wallet/wallet.h | 7 +++++++ 3 files changed, 50 insertions(+) diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index 6ba77f862..f25a7edd1 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -144,6 +144,36 @@ UniValue convertpassphrase(const UniValue& params, bool fHelp, const CPubKey& my return ret; } +UniValue abortrescan(const UniValue& params, bool fHelp, const CPubKey& mypk) +{ + if (!EnsureWalletIsAvailable(fHelp)) + return NullUniValue; + + if (fHelp || params.size() > 0) + throw runtime_error( + "abortrescan\n" + "\nAbort a currently running rescan.\n" + "\nUse 'getrescaninfo' to get rescan progress details.\n" + "\nReturns true if aborting rescan, false otherwise.\n" + "\nArguments: none\n" + "\nExamples:\n" + "\nAbort rescan :\n" + + HelpExampleCli("abortrescan","") + + "\nAs a JSON-RPC call\n" + + HelpExampleRpc("abortrescan","") + ); + if(!pwalletMain->fRescanning) { + LogPrintf("%s: no rescan running\n",__func__); + return false; + } + if(pwalletMain->IsAbortingRescan()) { + LogPrintf("%s: already aborting current rescan\n",__func__); + return false; + } + pwalletMain->AbortRescan(); + return true; +} + UniValue getrescaninfo(const UniValue& params, bool fHelp, const CPubKey& mypk) { if (!EnsureWalletIsAvailable(fHelp)) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 9e8cd1aa4..1d32f8dd5 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2778,6 +2778,19 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate) while (pindex) { pwalletMain->rescanHeight = pindex->GetHeight(); + if(pwalletMain->fAbortRescan) { + //TODO: should we update witness caches? + LogPrintf("%s: Rescan aborted at block %d\n", pwalletMain->rescanHeight); + pwalletMain->fRescanning = false; + return ret; + } + if (ShutdownRequested()) { + //TODO: should we update witness caches? + LogPrintf("%s: Rescan interrupted by shutdown request at block %d\n", pwalletMain->rescanHeight); + pwalletMain->fRescanning = false; + return ret; + } + if (pindex->GetHeight() % 100 == 0 && dProgressTip - dProgressStart > 0.0) ShowProgress(_("Rescanning..."), std::max(1, std::min(99, (int)((Checkpoints::GuessVerificationProgress(chainParams.Checkpoints(), pindex, false) - dProgressStart) / (dProgressTip - dProgressStart) * 100)))); diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 56bd327c8..0f8b2283c 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -807,6 +807,13 @@ public: bool fSweepEnabled = false; bool fSweepExternalEnabled = false; bool fSweepRunning = false; + + std::atomic fAbortRescan{false}; + // abort current rescan + void AbortRescan() { fAbortRescan = true; } + // Are we currently aborting a rescan? + bool IsAbortingRescan() const { return fAbortRescan; } + // Are we currently rescanning? bool fRescanning = false; // Current height of our rescan From e3136765623a7c3b817fb9755d7bbefd9cdffee6 Mon Sep 17 00:00:00 2001 From: fekt Date: Thu, 27 Oct 2022 16:49:02 -0400 Subject: [PATCH 177/295] Mac build fixes --- configure.ac | 2 +- depends/hosts/darwin.mk | 2 +- depends/packages/libgmp.mk | 11 +++++------ src/init.cpp | 13 ++++++++++--- src/rpc/rawtransaction.cpp | 4 +++- src/stratum.cpp | 11 +++++++---- src/util.cpp | 7 ++----- 7 files changed, 29 insertions(+), 21 deletions(-) diff --git a/configure.ac b/configure.ac index c542219cd..94f48dd31 100644 --- a/configure.ac +++ b/configure.ac @@ -709,7 +709,7 @@ fi # These packages don't provide pkgconfig config files across all # platforms, so we use older autoconf detection mechanisms: AC_CHECK_HEADER([gmp.h],,AC_MSG_ERROR(libgmp headers missing)) -AC_CHECK_LIB([gmp],[[__gmpn_sub_n]],GMP_LIBS=-lgmp, [AC_MSG_ERROR(libgmp missing)]) +#AC_CHECK_LIB([gmp],[[__gmpn_sub_n]],GMP_LIBS=-lgmp, [AC_MSG_ERROR(libgmp missing)]) AC_CHECK_HEADER([gmpxx.h],,AC_MSG_ERROR(libgmpxx headers missing)) AC_CHECK_LIB([gmpxx],[main],GMPXX_LIBS=-lgmpxx, [AC_MSG_ERROR(libgmpxx missing)]) diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk index 309f4507c..7be744aeb 100644 --- a/depends/hosts/darwin.mk +++ b/depends/hosts/darwin.mk @@ -8,7 +8,7 @@ darwin_CXX=g++-8 -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysro darwin_CFLAGS=-pipe darwin_CXXFLAGS=$(darwin_CFLAGS) -darwin_release_CFLAGS=-O3 +darwin_release_CFLAGS=-O1 darwin_release_CXXFLAGS=$(darwin_release_CFLAGS) darwin_debug_CFLAGS=-O1 diff --git a/depends/packages/libgmp.mk b/depends/packages/libgmp.mk index fece8f822..92cd95fbc 100644 --- a/depends/packages/libgmp.mk +++ b/depends/packages/libgmp.mk @@ -9,12 +9,11 @@ $(package)_git_commit=42ba95387cdfd67399f7aac52fddb8d6e1258ee6 $(package)_dependencies= $(package)_config_opts=--enable-cxx --disable-shared else ifeq ($(build_os),darwin) -$(package)_download_path=https://git.hush.is/duke/$(package)/archive -$(package)_file_name=$(package)-$($(package)_git_commit).tar.gz -$(package)_download_file=$($(package)_git_commit).tar.gz -$(package)_sha256_hash=59b2c2b5d58fdf5943bfde1fa709e9eb53e7e072c9699d28dc1c2cbb3c8cc32c -$(package)_git_commit=aece03c7b6967f91f3efdac8c673f55adff53ab1 -$(package)_dependencies= +$(package)_version=6.1.1 +$(package)_download_path=https://git.hush.is/attachments +$(package)_file_name=d613c855-cd92-4efb-b893-658496852019 +$(package)_download_file=d613c855-cd92-4efb-b893-658496852019 +$(package)_sha256_hash=a8109865f2893f1373b0a8ed5ff7429de8db696fc451b1036bd7bdf95bbeffd6 $(package)_config_opts=--enable-cxx --disable-shared else $(package)_version=6.1.1 diff --git a/src/init.cpp b/src/init.cpp index 9cdd3a034..1dda35e1c 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1137,9 +1137,16 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) 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; + // Mac SD + asmap_path = fs::path("/Applications/SilentDragon.app/Contents/MacOS/") / 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; + } } } } diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index 635d71d7c..d53ddd09f 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -453,8 +453,10 @@ UniValue getrawtransaction(const UniValue& params, bool fHelp, const CPubKey& my return strHex; UniValue result(UniValue::VOBJ); + unsigned int serializeSize = GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION); + result.push_back(Pair("hex", strHex)); - result.push_back(Pair("size", GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION) )); + result.push_back(Pair("size", serializeSize)); TxToJSONExpanded(tx, hashBlock, result, nHeight, nConfirmations, nBlockTime); return result; } diff --git a/src/stratum.cpp b/src/stratum.cpp index 287cd609d..84aba23cd 100644 --- a/src/stratum.cpp +++ b/src/stratum.cpp @@ -1997,10 +1997,13 @@ UniValue rpc_stratum_updatework(const UniValue& params, bool fHelp, const CPubKe // throw JSONRPCError(RPC_INTERNAL_ERROR, "Something went wrong, plz try again!"); // } + uint64_t clientsSize = json_clients.size(); + uint64_t subscriptionsSize = subscriptions.size(); + obj.push_back(Pair("clients", json_clients)); - obj.push_back(Pair("updated", json_clients.size())); + obj.push_back(Pair("updated", clientsSize)); obj.push_back(Pair("skipped", skipped)); - obj.push_back(Pair("total", subscriptions.size())); + obj.push_back(Pair("total", subscriptionsSize)); return obj; } @@ -2126,9 +2129,9 @@ UniValue rpc_stratum_getclientscount (const UniValue& params, bool fHelp, const + HelpExampleCli("stratum_getclientscount", "") + HelpExampleRpc("stratum_getclientscount", "") ); - UniValue obj(UniValue::VOBJ); - obj.push_back(Pair("total", subscriptions.size())); + uint64_t subscriptionsSize = subscriptions.size(); + obj.push_back(Pair("total", subscriptionsSize)); return obj; }; diff --git a/src/util.cpp b/src/util.cpp index 47ca963b4..e0e558672 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -558,12 +558,12 @@ boost::filesystem::path GetDefaultDataDir() tmppath = pathRet; tmppath /= "Komodo"; //TryCreateDirectory(tmppath); - if(fs::is_directory( tmppath / symbol) { + if(fs::is_directory( tmppath / symbol)) { // Found legacy dir, use that return tmppath / symbol; } else { // For new clones, use Hush/HUSH3 - tmppath = pathRet / "Hush" / HUSH3; + tmppath = pathRet / "Hush" / "HUSH3"; } return tmppath; } @@ -1036,11 +1036,8 @@ std::string LicenseInfo() { return "\n" + FormatParagraph(strprintf(_("Copyright (C) 2016-%i Duke Leto and The Hush Developers"), COPYRIGHT_YEAR)) + "\n" + - "\n" + FormatParagraph(strprintf(_("Copyright (C) 2016-2020 jl777 and SuperNET developers"))) + "\n" + - "\n" + FormatParagraph(strprintf(_("Copyright (C) 2016-2018 The Zcash developers"))) + "\n" + - "\n" + FormatParagraph(strprintf(_("Copyright (C) 2009-2014 The Bitcoin Core developers"))) + "\n" + "\n" + FormatParagraph(_("This is experimental Free Software! Fuck Yeah!!!!!")) + "\n" + From 7914b638618cfee55121c1f785f25ba414f9b64f Mon Sep 17 00:00:00 2001 From: fekt Date: Fri, 28 Oct 2022 00:36:19 -0400 Subject: [PATCH 178/295] Upstream change for OSX --- src/RandomX/src/virtual_memory.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/RandomX/src/virtual_memory.cpp b/src/RandomX/src/virtual_memory.cpp index caf02922a..248d3a2c4 100644 --- a/src/RandomX/src/virtual_memory.cpp +++ b/src/RandomX/src/virtual_memory.cpp @@ -38,7 +38,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include # if TARGET_OS_OSX -# define USE_PTHREAD_JIT_WP 1 +# if TARGET_CPU_ARM64 +# define USE_PTHREAD_JIT_WP 1 +# else +# undef USE_PTHREAD_JIT_WP +# endif # include # endif #endif From 24788c7dfed8111a2f17a6f7de541e42aa9c766b Mon Sep 17 00:00:00 2001 From: fekt Date: Fri, 28 Oct 2022 00:37:18 -0400 Subject: [PATCH 179/295] Build RandomX --- util/build-mac.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/util/build-mac.sh b/util/build-mac.sh index c86b6cef4..4c89ef726 100755 --- a/util/build-mac.sh +++ b/util/build-mac.sh @@ -47,13 +47,25 @@ PREFIX="$(pwd)/depends/$TRIPLET" make "$@" -C ./depends/ V=1 NO_QT=1 #BUILD CCLIB - WD=$PWD cd src/cc echo $PWD ./makecustom cd $WD +# Build RandomX +cd src/RandomX +if [ -d "build" ] +then + ls -la build/librandomx* +else + mkdir build && cd build + CC="${CC} -g " CXX="${CXX} -g " cmake .. + make +fi + +cd $WD + ./autogen.sh CPPFLAGS="-I$PREFIX/include -arch x86_64" LDFLAGS="-L$PREFIX/lib -arch x86_64 -Wl,-no_pie" \ CXXFLAGS='-arch x86_64 -I/usr/local/Cellar/gcc\@8/8.3.0/include/c++/8.3.0/ -I$PREFIX/include -fwrapv -fno-strict-aliasing -Wno-builtin-declaration-mismatch -Werror -g -Wl,-undefined -Wl,dynamic_lookup' \ From a5bcfc88b60b7509cf0fde611ff848ed838bc498 Mon Sep 17 00:00:00 2001 From: fekt Date: Fri, 28 Oct 2022 00:56:40 -0400 Subject: [PATCH 180/295] Mac build fix --- src/rpc/rawtransaction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index d53ddd09f..f3bfc2668 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -453,7 +453,7 @@ UniValue getrawtransaction(const UniValue& params, bool fHelp, const CPubKey& my return strHex; UniValue result(UniValue::VOBJ); - unsigned int serializeSize = GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION); + int serializeSize = GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION); result.push_back(Pair("hex", strHex)); result.push_back(Pair("size", serializeSize)); From f4927fa54a48f3fee818835682e61c16fbff1dbd Mon Sep 17 00:00:00 2001 From: fekt Date: Fri, 28 Oct 2022 01:17:22 -0400 Subject: [PATCH 181/295] OSX deployment script and bg --- contrib/macdeploy/SDBackground.png | Bin 0 -> 23924 bytes contrib/macdeploy/sd-macdeploy.command | 136 +++++++++++++++++++++++++ 2 files changed, 136 insertions(+) create mode 100644 contrib/macdeploy/SDBackground.png create mode 100755 contrib/macdeploy/sd-macdeploy.command diff --git a/contrib/macdeploy/SDBackground.png b/contrib/macdeploy/SDBackground.png new file mode 100644 index 0000000000000000000000000000000000000000..e990d50aebadb0e19fff19556330d5c941a4e0e7 GIT binary patch literal 23924 zcmeIabzD{J_CC4<1qB4%ASD8#(jC&Fh)6d`ODwv(!9WyHl$1uKyE{}wq+6sxq`MpL znC^4-Ip-VqchBc@?_c-$`MCCSt-0Pg=lhO#jOTgAGxtkHdC7}7Y~(xd&(#j z1_26nCigrReDanoY6ykG-Stp?=%j4mN^R$0YhrGNrgn0-LsO&O%uP@zx1r^CnvvT4 z`1ejL1NAVZ>~!#@{ARcCJ@&oVQ=A6PH8ciSIz!_;Hm>ra9>4H=ay&cEdlVE^LMoo= zT{5^wZWN84X^gt8pTF&u_AsGyVDamb$YJ|_!PYU4Bhl-PD)ynpcOo6Wcv~WAjpYaZ zVpBD2OSWun8v--y=1Bt{$$NoE)pgi0tB-Hiv!?8#7E5z~%*^TA8VoP)`J7zAI(gz7 zzP?;kf9Ol+p%pFZa9iq+eWK?4b1zP(sax6BqEj7>LO;3svM}_FKfU~hs&T&6vM6~` zhDEeye%Q*}>o7bwgynhXAmhGwkQa`_p~KPS{+oq#+zs@}(RLf!>v1#htitQr(qx71 z-Fi>w5!22k!-)GC!=5Ts+Fo_`<0d$X9%m!J8_wo)-t!#`+eP(b)6;KSkI}V$ zGS`}?^?XfNn4(kUFPrDkLD%Z&@TNLC#O)-ozPDXBjefArA)$n%S^s-zg1M>CWVAJV zF|AGe%TJ+GKTXFcO{ppdjABEZl=TY@b@@FDG@qMxh*rJ|PC3N4@Wwb=KRMc{!6D0` zM6dbDf#LbsPnmRcd%|0+|H#>KR})idWWt7s61J;QrbdXuM=$g@NE76$)=F2i|E z=`myK{+I}f8JeDN?cYRrLbkR>Vk~EzCWMUd(`Iqc|1xQz(M(lc>up7eXG^n`epmOr z=KQ@sB|=@>vX-AAkG1xhp66n1h{z#1XG_M1S0Z2E8MO&Yo@7io%fWSP+ku5t6Q zZ_pC79YhZl46k@DRSujHNssdwnm3Jek2JaBFIr+g@LnbA7N)d%j#jZvLs~9wU*0oq zo7&|a!IhdtneSuf$1BH#nlh_7({w66MyH`X9Xlr+_Z$Q=6S)3}6qhot@x(zn?Zh>{ zm2OVp@6?Qo&dP|EQ16VU?Ia~*j&!JgTwueVBmkBM?f z3f!suuw7ttt!g;=(S5_g{iR#h?HqX8kGRg@4K&V$Op6@(MtW!)GBBEH%9aN_ugUp? ztSCdJf+L}>y6p0_j&}Nk#eE%`i_RF8pC$AgEE)}$Ee8e_u!xMUm$|=>rt7taRmd!J zTr^X?&pH*!Wj%l+C;2t|iTj`k8B@{i3ts%y__!@8?pJ$>r8K23`UM;uDkDK+83h_^P-#XyC+w58=!sN@qBl`u7-qvH)P_pStz?}ZMs`Y!Lh_}`Qmu{ zmmxmGvXZjQr-E*64=n317ndkg6<@>I`_9jrmU;cnhfCBOADXDHkmeT(W6#shV!m$S zt;JD(aoC}9^;?%^xl^T`M!N%M4^H4iRC2AnuIrn#*U$M;Y(*3`mAGZ#o+u49z2`{l zo$!D09qY7j6aW7GgR;@HZ(*4B%vG+$&=~%+)rDxX&q6gnRaZVmY9j43~Drh|HN+Nh5 z8d+$xj^=IftY5 za)EcW_+{*Rt-2A}9#38xX1rPAD+v#Y`8?CYO`LqW2UzOm6yAJUxl08m!_Cu~dt;yK z7&q?r>Ch%g6$IS8nN)&(&$UXgf<&*d?FsI)LZ!gjM~E-EMB`nT88dK(DhlZR@iV#G=f#{l zj2>Ki$yb=&8%(jL(e>~`p0YzY&TFELH#e4SS>^)0mp<9WV%X;k-!ay|MA0+-3!B6= zxhYae*MO`k{w-Ci`Snk(V#$T1{Ap5{JeVa9)R{1(+t$yy;t7rEEyW4EXP3XAhm*nb zBq{HiV|df8+jy9V1AK&g`j0Nq&p6C9uf*+?+ zRn0B2l0bJo&d*!f@Pb-rsO|8+3pUN)uMS-|zI`^{NRz8Nkn~=o)R&)G zALS*VI6Ane_-~k$S-wHt$|)gvc~v3F@-f~+{A(|VC?86kEvxvDZMx_dM@i7t^C5`Z ztK_`%wS_Q@%80v#wL}fC#lj@jhZuh`^p{C>@cZc zDFt)O{hgTXm#we}5`4;kFx*h_sd{_s{3Xkd92<(ulXoy3><8@@F#gnwNLo3Yfkf5?JZ%NsRBNWAZ=hcG;@gGc=&YV^1IB_ zi+sCCpnfSEd&Yj?hxY}KcrCUfjvdaJt3uVpyG#{Ode@Z_^D>A}<$AsuKMB;m#<5dD zA#&z!#`*NH8+uspd-_5og{P$Eijq99VK&O;T{6?HQ9T#It0XMJ&E&5h`l#YFR$sSw zRW+YQ?9a2jFPL?yI6dhve;45_>Z_udYx zD4Vn9cC!@`bivaW&(7-=tVpO`e@0D*-*wSy*=?)It7r0&H68wAfm^}*Iaq}FQa@fi zwNGF7jLH9gQsaB#*|avmOEZ11FX_#*kR)9q;^7!Ucf3{S>YvgW2D zd9HM0O%D6+brHr}tTTV>e9T-hew!f2|I?!@o2I1HM_A6PKc9Eb6WshfW|J{@FZA-A zjKbR*J~|kR+EL$xCeEBwAGydVClpw2;H-leEM2%SH+ilwf2Flq4fD(=RiRu=>pR@R zdf%ay*GFCX1K0V8Q||frq{gp{S0wJ@l+qHj#S;nynjgNB zr#Ujg-RKlM#oO{FKhJ+>?X&Nhiu7BAmzvVGfDibai;F8tiHrZ80s!!j^L{J*ph1kH zQD3`JnGv7(vM9B~AL%QbU7q@6FFH2rIZ}&xw9To~{@PxwpZP|_3*6|Xtgh|AOIY0j)X#63 zEI1~=dp5gQ6%dl|%8@Ybz0%p8`%4yU@9a;_w5!DHSnFG9sg7fGuM3h>E+rC%kU8D? zDVf*GT5r$Fw=^4l`9^#U-Rn!Z{POSI(C`&1g9mR?i;S zs~%Y??|A+Kv*87rv)?k3pK&sOG3$T8@izImBEa|KdeE=XW;Ki(O&E-d*ZF zqZ8xo!amz4Z8nyP-uKJXO;RdeUNsuFi9iGt=C>H!$NNHSKKIAN&w1EB?ur@KcBD!t5R0jj9z$UVd^CGpG$1^7&1!Xd zoU8rB2c>W7kofB!@kQWj9_GNw9?HoI7};908W`IeqFLRn?SQkPP(q?^b_Pb4XeVkz zw5hp`FwJUpJq@+Fu`rDWj~u(4ojBUe{DFr9TE#`XV6JTR=b#-NRvcpJyR%>v8^o11|h z8wV>po3%CDKmWqfNx}sN`P&8kkH2tK1!~KtjCQnjb}&LqxS(yEZv68Q#zuer-p<*< z>i6v!8?m9S(AIFMBb=4vUrs40C8zk;FOVrPHMh3={VSO4e>u|0+~gmV^)J_keDnKu z{`o@S=YNg+FGv6V-hUqqN6EXig)3K7KwfG{-*;C1vC2WME^2MuvjHS4r6Y9PGi2?e_oBTk-&Xh2WtaZPIGGmQ#6~Mjp^@m zAQLWdM^Q?chLe^3AD<{%891514}@vt42-B1RQ~aes<|~<#mNAfPLA8RZ}W4ovvcyX z-{#`r;rYiw>SzZ?2t{O24t7>9&fni4>mmSm12b!Y1S$;h`*XM%0dWVkfs?I+s;#Y+ zFb#4|)W|RY`dSY5ld*x5!94>fGz<#UB*4Kgz{#u1!6(4QCBV(g!p<$g{!ho-8k?KA z|DTRVb`Q1CpKJcW+!4<2{`;dpx0DLn{?C8?`A;kJ-+PIg`uDC7FfjV_790&+(8j;7 z6UO@UDh>yh>ZE~B1+r-3#g`dNOi^Z6e_qH*g zi7_99$iI&6Xlvr+YT$srV+!*Ka|QAFd#)U%oqy?JIg<2jPGwV z#`d>6W<#>Z-)~un?Y~Wm(C-8ODb2v|{`?Hm7i2@WztZ8~CJjkE{~!MO+hY8Gcm^2y zKPUOO=J!9-^`Ghbw`SnqI`}`)^`Ghbw`SnqI`}`)_5a#*;rxS8p=|&LxdL6%F5`Iw zR13>cM)DrQxlpKm@oHcA&jq^&nvT#jBSik5LB+(8!iU&SQgRa5GdNd?ud_P_KYE2i zQKO{p-BE?+*{Hi4k=oeKdUfyo%{On}pf2A%pUr&cjOO&2i-CSuacF25Lj(l4KDP1A z1s^_{zWSrp1|4KC?Cbou`EjhGvJ{0tjZg3FiRcXcV^pY?Ot zoV|pqx8>mAV5Fy4baA4+E9w?7<6ks_3kl+=IgTiqN+m#y^SzE*|ZbvjPCNY*?Cl{9*K z`Um-S2U!Bn3r-Tt+IDsYpFe;8HS0QkG)v9MD4poF@lvbA?0xx|M-U+?wGfJAe6k^6 z`x7=5{q5W8A0$KSlC`L{%58G9VUWNB&)W5`R~JUB%hMDR^MpNj>@bi!=y_Q1=rJ*y zUQU9r=R)a#UN8LhlvvW(Ug%d#m%pZ#t-c)iBk`6@q}fNmGcZ_uB&%-AOWaG8elkt- zP7D4ddR;4{)&0e$3df83r&Tms)JI20swa@{b6f>7A0?bzTs-za@1c#2Gi=A}JeErboEk3j>XaQCm1<3|uI5)cFEZY|`K#z; zSoR(Jo#TV;u-^H;wrH+W^Ilr{hp@1!7iA)uyL(b)(1j0)NJ!EL^nG=C$K0mSm28uf zlUaJTRXOU5=)>Lf7cL-2IS=T%Hd~ZhGzMOY;Y8!mF~US=sV_F9NQIS{c2e#i9%jo# zv62hAt;yT~c$gE#Ca&0V_!vtoCmWJlZW@s|&UHf4SK7wMC z_MW#lBz>x}=VsGyTMy0kYv}ja?v81r%Q$Fg?!t7{LPXVw;GRFPSZdKvL{7f2c}z?k zl-hDpcNCTsiI}SWnb=W<7b)rKmO~}x(h3T*DQ7FJ?0OhRZuC1f0H&*fm_#+uT_m9xygBAvX%1hfo}t z)vb2nu^hC0y=+Vg`{5_atocJ_ z*0KDht4=|^FMOyz9C6h#XCXG{s*gmN~Mj=1^l>>s2? zJv}{bj-A4$N5{uZHD1~M7RX#Yzj)Q;w(Xb|d?~A>^p+tX0wy|5F4lv^b!TaC#r@~h zRILaBE-qK1?}>Zmccq69&3bx!+Yh!E+h1J1A*-sYno2PcK83 zSgO^&Hrdb)In6t7YOedk%u4m@%*clf8O5mGM>}Fyij1587=@tnfQ@*Clyq)g)66VG z&u#J?k6D)(TkTdT+Cu~~u6kq)g=i%iX8lc75A>H(j4A$R5N#Q_c2UHw^VO#OMf+Hj{u51B>E z8%>JmV=VKOvek3L!^2bH_j;?fy9s4Bqgr`JWE2!RritF_AtDDE3;o%%+wQQ@)$?>R zc`U!%{X7$Oo*^)qF*8de-{v+X$)9W+Po7|KIWMTH)cYJO``U}He<7Ti`1CZbprD{n ze-A&P0hu1>#qZHC3F%^xxY%0gZ|%#`?A_bnkEqHWt#;)F$#DgZHZ_epc=jSOF)>pm z{dMJX*>Iath_DH*?7K%UOFs750G0t00Y4U^s18%g9K(MgZy4V7BPc7KqJ zU0PcDBdXl@)Tj5oICckr;Loyi61rsl=?YYd@pPRv@db91cY8}M2mXjcwo)-<<3tj4 zR4d3wj_pv{+MB3+t!!$yzvEcX9`BB?uD{5HC~%x<a*4~7^b0MS-@ZNIa$Olw_I*VH_rJI2MtJqA z_D=_h5d$b&OWgz1u<5)u+j(bFqx1w;CsRmRb>>Q6wMMdR4z9iz>d#QRvDqWT7Tp*` z5*r+hm+!4tXy{+LJLV~K+9z!OCVFIRX_&|* ziqy8z5$Ui-4VGF)?N3piK3pgQXu;?_46~~4IPvjJ{<4&`G$)Lqk(xU@=DEt#o36m- zyw&s=6Z?STsCi&Hq0(_yeeUIzz~u7;M9!M3j~*p;>hIQJd|97rYUk<{a_la%{!w5s z)0e3tBKSz}#hqN~EJ;fDFH2*!)opk3f;na&nWuRl?!;*mNw_6tFjYUtzh(go+{$zN zuDW_8nW#@qrgr(txl!1>qFm-ZDSwn3jn%lLMKbN{5a6)6)vIub$9_vVm&51Ct%D(u zMo6(QLLYV@$GG>dZl#arRU=t>`PchDgV|zy6{je6iM!rGr*AY@#29)Pf*<=`l6+fGYKc?S!lK6E0w|10eGXLO7m zk%@`6E0wd99oK(P&FW@z&;>%;cYr(`@h_b_cW&lGhzRFsm9yaLvfFmQhMbR&PxPV_ zABD;H9L+RHP_w0VfJC{_Ekub=??*J{XcqJN{tlq}@v7sU;Z_R1EbgnkHq4GfFM6^d z=1gEmOzVxqg|xlm9eX&ry}ddU-x9a-M~_@5>IAj9aauH*bCs+HB)OLS(kDesXED8fu&oAvt-AySUOb?7-xf z-r1xaZ5&98oKLX{Sa;2WFtPC1>Ez@1W}T;}r=xw3rl@B7syJ=OYBKY5xOU+F)?nyV!pJ$d>RfrLavDSm#ab7#+fvnT~{|Ddt45$!WR@06vG zD3YaFJmYRH2_?hO$jBM+7bAp=xw&~ubMxDNiwH=c7X4YNu!-jzN%U2%ta6x%W&8&m zkGBU}ryUsh`88pU90cNVaB!4iW}RUo7pFo*)giB4AtTeA+>VQkiOH%zUbYo*`1K%q zQ$1f#_vGYcrT%HViHew*9|k67>vlOxkt4FVod8t>jACJD*j7VUHW*;l-Me>HVGj*j z-PU9#-u3Sxy-_`yH`Nrv#KoloC+h{o?akWT*{MKCC*KFv`q%2JKEv?5lR!jVTn?4b z-W{0gH*g++8hzOsYyjfhXI&}q1LWfcQX%mDpFN}Jm3x_#6JPb81 zAC7=q9U0LXTz0udM`zg{!y_#vHJO6NctMVx$XT7oX5>fkHNo%9+GTABmN7Oqez&w_ z6&4kxVOU(#I?d_s?v5a*rJ>SR014G!3jbKC*_3w#jO}=xh?qEX|F%N)s0~2q8A|c@ zzNaT9>pvT(tEL~756c-C7^IFQto08}P6klzxVHgSGB#;@XYj`#f5=)`WC7P;C=^eF zbHHjLS=iXrG#1(2SD4h_LDh-1%&(1fj7#n)HgiXL6%1Ng3>KvV%t103kM)o$P^)aH zinBJ9Y}xK(lXmo?qWZ9x`hPWtm3r+v?6Mh2!B&j0shGst&7TQE!U7W;U)9U2#&hT* z??@7mxC{iSFIAlG)}Qvjxi0QB*LB^sRUutIp4+U8T6k~bDGn|!lLk}3sEr1|G{CfJ zkh&K>KE@PqS$bDgR8-llhz0vWV16Tw$fVYJb&uJXpTwY52jZoGT<&Wu(e z!HS&QY-0WFJ@@enO+7%8zh-Bn_8*u)i65xz&($8t0Xn49%9f4(kjz4BTe}_U=?S4m zChSo%SZE|!*%bJ#vy)fQWr-bX2``iul38Yn?hTacHAtxa@vdW;u{KpwP!S^9O_(+X z(+}~20W>gaFdQBmn|%(K*bKHomePmkSojnf5JiVp*ZH01-jMU! zEOD?12xukx9AxIzpLis;cDAPcT5lMg!U7c6Zdmm`Kq0jU z3)xjC2a9SS?!V%!Uv#M4+UyjyoNkE#0{qtJcw0kW*)I}1Fe?UGIWB;E#W3v-qCU|u zHwY0oDjsZu6v;TP0g=R;Uw=~7R0fPE>kG#%uTr6Vl9I82%J$;wGcvvj9WE79ZW54l zXMApuKP>V-bh*(y;(K~*a=5cRz2a*Rd497`MFB>B=Mdrvh+zuWM0mKW`S3*c6dElYhdfZws! zZnQAP2smd^x=ox(+&o@uAc$c%cyjpDJr8yo57f*4e0_Z=&I{x9_22V!nbLdR#}4fd zT)qO?*ap;M3Am``+qaC8VT!M$)}vKw2xx#CAR;9E0L#NDEL?lH)sc@PM%1@%%xhCF zF>%~;wH5@0Kv<5(3phGAwJ!@v7)_kL5Nu1OY|sCwoh( zW|>uVQ<8FM8$eGh$jsB5=0UJmJabRSPfuK5+O{0c#M;VgX~i_Rv~WUUG6C7bWO=Am zWcGBUl}!%rc3`6^glg6C1c9|i%Gv5HoBOkg8fJc(fX!o|Ztn?wh0>Xbph){l9RzZx znRX_`r4uZCIEASsr0g-eU=TZfi**r$>%x6O)8ZkJl9ZKeumw z3cSMPw6`|7ITqlty^!g;Iu`iig(6f=8X6izc7dd&-onw+**P#$=_s5AYiYjtJ(rQ0 zS!foWt6BVY)@R)3aG4w+qZZKIpvL5{udXt&vc3)@s`z-G;3K~Wpx@dwSV?*&rqzsXfpZx``agDJi|`1c=76$8qh$YwCP{J=761S@#B9s4#{s#zlQpZsmOzH9Gvs#*WS4t?b+u-*6mxpa^=cA za5*&_-(U`i2F277oJz$>gU`<{-170+TQfL5+U(TpmGQv9LWD5{ksx_2MCk^QG^9Ew z?(TMmL+FEAqL$fJ043pglEAkM)Q=R%o{EC5D>KaGi=sUkf^vn zua}pVRfW_5#c;Hj{I*pF|=-D>Cpt=y{VNNwqOQ()eJ%GTcz|M5riux))jAqj|`QSyMIAOLI9 z@_{$#jIZ`(h8-QVjaNVWN}8C9B00#7SI<@}A9c}=-drB59X6sk50RIYl+=3g4iP>% zNyy0Ni>D`GK$d}BYhR-5p8$V`l2 z3D*&O$;{2vv^0;BC-9MfK)@lM5UPX9+Cz;0?74I9r4%=B-Etqb+?`(aJ*`gu@PTbr zpUlU{W2;;83T!f9mXI2yfj}uec<}9<{;ryaZtBVLAp*B4-x{_}x74AaG~_fLUcsOD;www{na3kb+|ob9OE8L~u|YO!g}O8ffy zjymSH_C z^?qTbax-E(sA2pxSu~=%!rn+26tG)9D~q<5DJZ;@wC=;!@cW~oVQ{sCeo^Y_;cC4; z2&3DiZ;P@rEJBPUB|%HtUdYam+}j`Y4FOQ)esSSkQmD^8yYqg5`c^Wymtg(^UQ-HZ z{rY8`-@T1U3?I$V8l`DW-wP8mvva$j& z)CQp(va2PW2F(h3zWdf=6e9m}XZL5p#nkt?19VIg@jfv7_U1aEz-fu)5k&0=WV86? zC85VcW;*M9A>8gzxosjqln-QFCT6{9a&cnFjy;NB%nc|yxci_7Qd=o(SQh;{9YR`J zMI9X-|ME`5!ab{V49h$BAY>^$mpG z27r=fn&5sPaKXeqOxCDVT8Hy~Ef+AaAY%)|t%}&%h97G9)z>$LVWm4mRp?vo&(Tx~ z5#D)svJq7uzOS_cFf7A!ccp4J!4sC1*Bpd4NYSGC-fZ;rUASyDiVUA7?}oTs03AJU zlkE`K{gZ&tQ3ax1O|Ay``I0w3Q0q+48MHI!s zs(QXc#Uv)?*VG8f>%o-ikb~H!7f-tgConhS=C&Qv8PIWTUtOtq{_NS@Zz*b;8$^vo zVmW(z`{;%MOr$}BD6s?n2>I&4x=zmT@Jr$va|`LzI?kd@qeZEDODw--f7bLiWe`9j z8*OM*P4turA)LuH=+piJXfq&tDVYyzB`CfL4NXQ6A%xDrE#W-kAPJbDf$@`_@=Yyy z;C(^|L8M0Ek&$VT7#ugC3QqKV>*)9n38OY`cfNPFCh{s7Stc|GvS9Db*1m#biO8Lx z&1FuvMlAxtxz(Yqqmu(-<3clCVoo0&B_oZHkdF7kmJ;M+rkdcZwl&?0%~3TqHJjvu zn6L}@*j%c0=jZ1g_$VlQjf{*sEi2;%UDZP}GjwnXavf~CM2+);0EmA6G}O8Vsl#sm7A>vEaZCsRk1$#} z#*!Ln-XTb@Y9TAT!*dvj(iXra4_Qwj;-%=;Nagxjhe~eqo}0Ch;bw)ke(h%f9|7E* z1|5jRP1jYBUh>OLXQrpkflbDh{BB4=Ox3a$Kv_}+xf{;GVe~ZvN^S(F`m@&QjY0l` zoHe^4$Ob%~J4-S{p9+A79Sqc;ICqq@c?oZaLU@2aDX)cuhZfMpZSq2PP#u5~0uTZ@ z$+rgxAft8Mi_kb3_UPNzF`e@7NrL(<)Bu@n15QosJwdp#WkF_2%FWdDbjP0G>(X(I0dFO#2h+M({&o-1qR}^M;omcBNZIj#b+UuzRR%Hra(!o zZF2|lXo*J}4Wc#F#IKLfo+l9NFL0Vy&Tl$}{iKl>832?=E{;zLW+=DB)lerBvUVzD zo4mG@o7V)K5P;ZJ0#V6yUE8)_+qO0pw#Q+dDWo!wsaL!s@i(}*xUNu9br$sf z9tzaDQlln(G9#yrUs6akdF)R|dFvHG0^;`EvAPHxuxIS45}DWN?Mxs>5kvRq%keXh z4|kz+8|Jk`XwOICv6x%FwKo-l6cz!y2|wVgU!`z#=6rei&wi{#T0}nk(CPV$c5bOBC6>JGF2p@i1dPnGtzqkv6N-h^jdAj4I2x~0_u=Mr4E9c2c}Z? z_xBHeg(;Ny9D6{BJbd}`Wn9YdTYwY|0D;Q3NU*Q|-3ve~ANO$jX@fbWD-gp-Zt{iC_D@_fe>?}N4Zh2Oe$xv= z{G{nK6<#pka!5Ht*gKEaj{;@Zukb74pvJ`uFUWZ;bcmZ$fRE}K89wv(kKes|kA*l0 zU^5Sh%@X(TFF-Fg1j-Trg)=}wTc0)>DmA^nwhgzq2rW=GNMO@;d>~wnszHi_4KcX9 zqf9j`qzwlF3Z)A%ClKCx1A2<$bchUu@%`5n^W6tMfNG$wv@hOLPc7AnbI0oxN(1W zRjYM}(1hl;8R3JjAX2D-&A2K2^29|(^>rt(@jDiOW1-xsZ z%b1CDFE3uhN4n?ytWh%hUhDoMpm-FWqBnOn9zJ|`S6o~zSBnQhtZ=hx(7c9t$%drK z#K-qzG{?4h5TSfPZof_1eKRSJIMnbo59SyuFn9{x0if2Rh};UWrh2tb1yLz#KPCpv z&6&aN{#M@w7317nKhHb0Oxl@&lqvn-K^LT#aOl241B(e{4(JvF`(AUqtSJTZ)RK!J z-A%*~K`>oe5ud=u!qP76v;n~5y8TnnZKwm(JbqP*t`dqgi}i97bs9 zaWF72q}>D>#g3p7IS_W_pzyar3&#{vRLzW|K>SP)Tiu$LkCRgg^j76wwvJairq2VT zu7nca25RXexV)=Vc6`!t^#ui8VEOn2sOl(gw-omIOmU|O7c^^V`S}MaM14lULJ$Lr z^Cl=((V$7#*D3X-vfyJ#sF{qq3|r59dwWBVq!$k0a^Elp8l?VyS}Rwb3zT@rjbF`w zu>F91N(-@sI1$o&=N%IQpF=~xxwVxG2m>t>Q}&l>Xip&`9=CZYw1Q{&SJT@~xNK|I zpEtL+Z)@2=Jw|$n{GEUH?9@T3-vm`AwyjMzKSX+#)DHAl?pe}5d!0FeX?}Nrb##`TFN3%%l#jYhPHqA6hHzqQ zUEk!VNxOH0#ip^qVjaiwA(wEuEImy81l#Rh`M6K4W6a4#!7FZOC#j<~>=0o^{9u^q zj0{!~+5d7+Lc(7DcWX57sA?w0vJC)$H`a^3KGjX=$*a2!f?OOWB`25L<$nUobsDS) zCG`1=QeTFI^ycXbcF_IV{Yr;q`v{VlDO}1x zV_{O#$F_LE0niMK?zZ|s>y@eRKoJ}YW4@=}P%p0%Ub|)uP7$Lt`FO2`UP81ccmeor zeL>@COHcH%fDrZ`)7uAyQVyUnU&x<*v3dk6wgHs)){9d(t*QfYp~Jlr&^gj(zp|3J z29k0tK*wlsL=2i%FyzBxa+!4{IS%cBz&8Lko0>1y+QlZX=6@94m?ikVX1m()0?wR3 z)7HqS5uOSr0j?B$pAUOwv-W=7FEDYiY1}q}A)^OFAzRVvjpaDbaQI3aDHn!}aq-|+px(l9AQX ziMw#&0)w+VEJn6sQ*%oJVA4OzvjKF{va)vMJS_YSml^dVpN4~@`)E7gm*;lutIelK zcuGX51Bc)Mzt1iFyI6?>a>e+e$#$v?PN&-r`T$ z^jC+-f%f%6sW8%ptUo!h%v7*Tfvzml0fOZ1K>6obj=50C-+>x14tV3!Y%F`{5&?(7 z=d+39qJmx!v?_{$#lJ#XmQB~C#!F-z& zPYKlL8a0U|bPqNN{bX3_=p>QGhX9Cm{EjoAnTP|v)7u1++W7UWhg|vaGK6$kQwazh z!rOf+IQaPAkvxhuK<^wEI$CR>TtwRRLINg~{0?6%wLx`j``H*&Yol~DD|*TS zsYlRPKd=g;C2{GjsxWB1xuC0O!&&BmIjWZ1j1pbGJb9w#dmA`lNeOp|xoNqM7cjoS z;NZT+{QA7LwKe5|M36Tjw^^=?R3_AO2d|seegn;KPymdY*Wq_SWf(wI1n$=Z5F3z9 zI~7R<29OFyMv!^HNYxFsurF7e_Z0=dGUNv6;coMvMjLzrbsL(vS-RC_AXCpIoB%$} z2Dc$1i%9G40+QGU{}rgm73m1D2HW7q=3#wxJV2#&GGlN`eE^vXX^iv(mDo1|LWUw4 z24f<0QfLw60h%1+fGd25KqC6<*FPB@ApNYdTF*nPPj7q{W7nWD>2VfYYN01J2-bJ1 zJL;1L72G)<2p;mV1sNF`e}-TKX3${-JxvR7PM%Kh><%DJfNMf-ijX0k6hr||fLI}o zM*znlG-F_^iPBRRb}MDC^nza{2-YW$K3)k#J7{M5Jta88*W5al48*Y8FB-Ip;V^nm>9aTa z$1F4-KzY&tY%xHJXUg@J9$+5)e0Pr8y$p6NJuU5XQIuFKreCWZ2xN%Fu^Bls!Zz3uRmQi}>g+mnwMJ}Qa9~Au0pYKAXGv2r%?owUb z)`c51_`0&^(8Ym7$EgUgq>l#teMoGv>>gAeaxL^}Xp@Q;P2SmsrxwROA!)i_4Tz32qG zevWH^8U4nKfd?ZUemJ8Bgq2r^%EN~lP|7t`(qt!z&w&cE<_V%k_?tILYioASOFxuO zP7)L>hnHQv;oKgR{v@i3iXYElP7sDzVAOMg7_(Zl`5I}C=DVr@wiJhP-j3SLik$&1 zU{4fcj~viJQE~BTFF?DkLDR(b^R#}P>m}#b1aJGEc#VRmFf>Kq_gD>XcQy${Psl>> zarFn(G=wfo^#H~CI;S)>@AQ(wbfCsz4MpXh{GN_Y* zfBO`!4Dkd5Ns*kDLeXEmM*CQLqrCoD4mMOjl$R2aq*`Z1F^Ge1x(kZlVjLjr66!JN`c@}2w?e^RN(8^NCAlm3;Td{L5^u#fx}sV<(93Tl{S2Vo8IJE2&0Hv|=hgLHsH211Ob|CV&)NA8dy# z_1qYMA5M^97ZDnac*fcjMfCw907n`CCWkn&K}U+JI?B$gk_MFnX}SUzO@S5{BFjQD zoHYj>wz_lzXas;M6_8@V)*TKu55RG)^G?#Cu$NZ*ZQlcaL>w@HGy%AIR*l+3wN8gZ zNr7YnLIhH6z+)l};vzz9V2D28(7OkOgoIZpDf7UtYX-?`W&6H_MCCvjj1IaN^hKC% z-n{pf^cukY4_qcd7XWRhfBYy05hRT$&2DZLaDT>y51p2Na6m_|VwM0rU~n8*2N+`8 zXHMjyZS0wlltkV5<;yo{+dzQ;aoD0O=`nHy6cebhFnU}VdD8UbWL7J=c!7RC3Vfqr z4rq6zL2*cfW**Y+2k&JUf;n=v%gLo?GSd?{AtpFsE2g<$wB~Z+yt^Ct%%4N zLQ4?$F4F6V4HHYE@6`?No6ZNE*RNkkMx$k5XhzJm!BnDSAiA;50K}OAl8+2F15JIW z&T8jH^|1K(Wg8`E&GCZBGZUsD!VxM9QnjZxV(~yscwa-PY{5o4f6_*31li0K^mD}5 z+y=c%S!Lx=e%OfaAPKc+sb$MbO9z5A@8w%#NW=z+B^_}^BR1dn;sI>{YE2`VH4On+ zv>~=I;Hb-EUqw&WLrj2oQf}6to*W_#XXLsmpzsTUBlW9cA*mEHMZXCdV#h)V6EGR* zT}4X-5l4gQ*1van2r>T{o01*02ws>jg!!@C)*qK4u0=51awGf^u?$p#lEIhHkhKx` zR7|PPq9vSRWeveki0E^p89AW|@HOP`43w06eM@hy(b5?F>AXE@Cfcu%>B)$u@ z6d=#*x5l862z?fVe-0c0OE-ZA>-|u`j=Pm@fQH?lVFxrAB!J&J#QPWk4dSl4=CeEoVbxv@ivErfkyUoI4vK*!5FVA?7URy{Iao47-b9cWs$v6PP(Ld(t; zS>ZC<@s$Md5?9_2J&dY{#fLC=v>iY?)_UX63TcB!BVfTIm^7+pPeIdt)oCKxTW9;aFw|Su8`+=WXa$= zi|gHhH6NW40kv5iEL{UYK}#Ne!r0As0LLz{h@L4=(Enfw9Zol)Q!r9r0uli@39DBf zA3l6oS-$LK`QoN)>sNDtK8RLSV9>AyQdTysIzpsxN&$k=0ycd30}`4ZbVSz8-p==D zM|svSyHrEqPM#crh1H=xZm|TE3Pi#R1x2(GE#6v@04_&}=l;ixH zn_Q>9Q2S~keP{Om_(}>gFz4=c8##DTNfMh^HXyo<+<+hzj8i zo|PC7hk`i{AewnVX4)0HbLWo8>T1+Y@ELl)2l=KCbcOyRw9NKgw>a{k5rB_CtJ+#7}`#jpmX->$V@#yG-qz&3N7DH7CI4 z$Ohgu1^=rbxZWlUSrDdmn23pi!EN~E{H`d$HG#el{Zm^z2{z3cn#E}Vq$f|7plUhn z4#J~kUB0J>`WP61vlV$B=Bn%Z9&f|xLsJw)k5xsF)}A8f&RrqILIPSY79OeMPQBI1 z3DR}g3J^WIgNVUkS>pkZn>RS$7lzC8;r@T(UqLvnhKi5-k7XA!Bcv)rM}!fKko89! zK~Uj;73zbZKO7`<#Q6iIyc$zcPcLDnBR(4z8=h1v`?Adp;0kJqI+**6OSOKZ1_lNx zKs-n{7^1lLa|@ueB*B#mao`2WsUeTD0O$u{IX|hyW7`6JXBu#Y5s+#?tK9-t*)r{r z31ZI5+8S(7P$%SofZ@_HBU*AT*g9o+N1ehvc2`(Hl!t1c2_no&CoK6k@I%j|&pZ7X zb~C4tDpZiNmEgI;4-XQE1EO5pi_imD4y6w9H~}_dTL12s@B9E!c)(0ghp7A9+^V4d z*%8Egr}dW8%R5%;z#=3251L(l$^+MrU9L{TMIkQrQA`m4DZqg411JWBrdQ4eN#Fw_ zw}Vd-=+??HD=VuyG~ud4o^EOD`$Nl-0gi?THV{`5JP5T|SPR&q7cx<+kO*S?kT44F z2DLOBh+7uey?*!bMFAAlf$mWY4|BoZ^5z6B0=g*xcUI8Q_-=vc8%d{ph#a5*gN#rG z&y4hyS!;tb0j)7GtRmnSn72bdq*x7D0g%!u%gJG6uzNBA7X&{;)!`)&_r#%Sbc3HQ z2Oc@pg6skWZN-|uI{$I&bPv=)gmD2o`269<2WV+P6oA4Hwq%X^r=U}UM|%OdvO3~Z zhll@ia+neC9@Lh%d9^!Q;4R)=4(Jp;)qy-v1<1r19v758Siao>rinhJvO%-`#(6KW z%7^+?d-tWvkhm`1gRTi8#Xu8M0XCpL_8X9dArobQzGxKQ0hAG(wVo8XsM&yW3k>uv zD_>t^TL3$Ea_x|jmUh^ki%J2PJv?xDzsL3(K0I1NKVN=5PvMm21cXna14@tq?gIx< z2Hxs%CfNGaK@S3hdm1P;h&>ym6|jQNgV#$5Ho`3_IQ0gp=m(%#;FkGt z*!&iz1&nH1fRb0-L5WR*k$|x)0JA|r#7Ls^T-P0-7-2Voc+Y`AHk*PFWmasY`~u2h zf_sHl{{rG41;ZlZ!W7>4b^~z$L(1QVF11^UA1dRCXcj!0%laHJ2gs^-z(TGHbq-uF zGSDAo0)N`50T=B1SYF$iM`zUH)OwgGuuvpgPyvx^f?NXqCI)14S$=mKCk9;E4Ubxs zxUC!F6Du~t1CJji5G^MY`p1BMBdfX092|;(z|D4RoPk~`Y6LWZTo63IfnEk%Z3ys4 z>g#ui{{@B0y7W993xzxxjJSe+zlniBs#q5wz{(6P8zQF09@{Wc~%_x/dev/null; then + echo "Compressing (UPX) ${APP_EXE}..." + upx -9 "${APP_EXE}" +fi + +# ... perform any other stripping/compressing of libs and executables + +popd + +# figure out how big our DMG needs to be +# assumes our contents are at least 1M! +SIZE=`du -sh "${STAGING_DIR}" | sed 's/\([0-9\.]*\)M\(.*\)/\1/'` +SIZE=`echo "${SIZE} + 1.0" | bc | awk '{print int($1+0.5)}'` + +if [ $? -ne 0 ]; then + echo "Error: Cannot compute size of staging dir" + exit +fi + +# create the temp DMG file +hdiutil create -srcfolder "${STAGING_DIR}" -volname "${VOL_NAME}" -fs HFS+ \ + -fsargs "-c c=64,a=16,e=16" -format UDRW -size ${SIZE}M "${DMG_TMP}" + +echo "Created DMG: ${DMG_TMP}" + +# mount it and save the device +DEVICE=$(hdiutil attach -readwrite -noverify "${DMG_TMP}" | \ + egrep '^/dev/' | sed 1q | awk '{print $1}') + +sleep 2 + +# add a link to the Applications dir +echo "Add link to /Applications" +pushd /Volumes/"${VOL_NAME}" +ln -s /Applications +popd + +# add a background image +mkdir /Volumes/"${VOL_NAME}"/.background +cp "${DMG_BACKGROUND_IMG}" /Volumes/"${VOL_NAME}"/.background/ + +# tell the Finder to resize the window, set the background, +# change the icon size, place the icons in the right position, etc. +echo ' + tell application "Finder" + tell disk "'${VOL_NAME}'" + open + set current view of container window to icon view + set toolbar visible of container window to false + set statusbar visible of container window to false + set the bounds of container window to {400, 100, 920, 440} + set viewOptions to the icon view options of container window + set arrangement of viewOptions to not arranged + set icon size of viewOptions to 72 + set background picture of viewOptions to file ".background:'${DMG_BACKGROUND_IMG}'" + set position of item "'${APP_NAME}'.app" of container window to {160, 205} + set position of item "Applications" of container window to {360, 205} + close + open + update without registering applications + delay 2 + end tell + end tell +' | osascript + +sync + +# unmount it +hdiutil detach "${DEVICE}" + +# now make the final image a compressed disk image +echo "Creating compressed image" +hdiutil convert "${DMG_TMP}" -format UDZO -imagekey zlib-level=9 -o "${DMG_FINAL}" + +# clean up +rm -rf "${DMG_TMP}" +rm -rf "${STAGING_DIR}" + +echo 'Done.' + +exit \ No newline at end of file From d94883ad6432ec7153b652b142aa5b2704fbc83e Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Fri, 28 Oct 2022 13:26:33 +0000 Subject: [PATCH 182/295] Update 'doc/release-process.md' --- doc/release-process.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/release-process.md b/doc/release-process.md index cdfbeec24..9797b2e1d 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -103,3 +103,6 @@ Install deps on Linux: - Use util/build-debian-package-ARM.sh (does this still work?) to make an ARM Debian package for the release - Upload the debian packages to the Gitea release page, with SHA256 sums +## Platform-specific notes + +Use `./util/build-mac.sh` to compile on Apple/Mac systems, use `./util/build-win.sh` to build on Windows and `./util/build-arm.sh` to build on ARMv8 systems. \ No newline at end of file From c36464ee1b7de6e1873bbd63810005ea3f032c8a Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Fri, 28 Oct 2022 17:06:58 -0400 Subject: [PATCH 183/295] Fix bug in getrescaninfo There was a small bug in getrescaninfo where when a rescan first starts, it shows rescanning=true but progress=100% because rescanHeight was not initialized correctly. Also update our rescanHeight while we are fast-forwarding thru blocks which are before the current wallet birthday. --- src/wallet/wallet.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 9e8cd1aa4..bc2d75752 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2763,13 +2763,16 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate) pwalletMain->fRescanning = true; CBlockIndex* pindex = pindexStart; pwalletMain->rescanStartHeight = pindex->GetHeight(); + pwalletMain->rescanHeight = pwalletMain->rescanStartHeight; { LOCK2(cs_main, cs_wallet); // no need to read and scan block, if block was created before // our wallet birthday (as adjusted for block time variability) - while (pindex && nTimeFirstKey && (pindex->GetBlockTime() < (nTimeFirstKey - 7200))) + while (pindex && nTimeFirstKey && (pindex->GetBlockTime() < (nTimeFirstKey - 7200))) { pindex = chainActive.Next(pindex); + pwalletMain->rescanHeight = pindex->GetHeight(); + } ShowProgress(_("Rescanning..."), 0); // show rescan progress in GUI as dialog or on splashscreen, if -rescan on startup double dProgressStart = Checkpoints::GuessVerificationProgress(chainParams.Checkpoints(), pindex, false); @@ -2777,7 +2780,6 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate) while (pindex) { - pwalletMain->rescanHeight = pindex->GetHeight(); if (pindex->GetHeight() % 100 == 0 && dProgressTip - dProgressStart > 0.0) ShowProgress(_("Rescanning..."), std::max(1, std::min(99, (int)((Checkpoints::GuessVerificationProgress(chainParams.Checkpoints(), pindex, false) - dProgressStart) / (dProgressTip - dProgressStart) * 100)))); @@ -2821,6 +2823,8 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate) nNow = GetTime(); LogPrintf("Still rescanning. At block %d. Progress=%f\n", pindex->GetHeight(), Checkpoints::GuessVerificationProgress(chainParams.Checkpoints(), pindex)); } + // update rescan height before we scan the next block + pwalletMain->rescanHeight = pindex->GetHeight(); pindex = chainActive.Next(pindex); } From 66411537dd47d35f6ff85af947713781b90e3b8a Mon Sep 17 00:00:00 2001 From: fekt Date: Fri, 28 Oct 2022 19:03:44 -0400 Subject: [PATCH 184/295] Mac fix for HSCs --- src/util.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/util.cpp b/src/util.cpp index e0e558672..d90092333 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -527,7 +527,7 @@ boost::filesystem::path GetDefaultDataDir() // existing legacy directory, use that for backward compat return pathRet; } else { - // For new clones, use Hush/HUSH3 + // For new clones, use Hush/ACNAME pathRet = GetSpecialFolderPath(CSIDL_APPDATA) / "Hush" / symbol; return pathRet; } @@ -562,8 +562,8 @@ boost::filesystem::path GetDefaultDataDir() // Found legacy dir, use that return tmppath / symbol; } else { - // For new clones, use Hush/HUSH3 - tmppath = pathRet / "Hush" / "HUSH3"; + // For new clones, use Hush/ACNAME + tmppath = pathRet / "Hush" / symbol; } return tmppath; } @@ -581,7 +581,7 @@ boost::filesystem::path GetDefaultDataDir() // existing legacy directory, use that for backward compat return tmppath; } else { - // For new clones, use .hush/HUSH3 + // For new clones, use .hush/ACNAME tmppath = pathRet / ".hush" / symbol; } return tmppath; @@ -1036,8 +1036,11 @@ std::string LicenseInfo() { return "\n" + FormatParagraph(strprintf(_("Copyright (C) 2016-%i Duke Leto and The Hush Developers"), COPYRIGHT_YEAR)) + "\n" + + "\n" + FormatParagraph(strprintf(_("Copyright (C) 2016-2020 jl777 and SuperNET developers"))) + "\n" + + "\n" + FormatParagraph(strprintf(_("Copyright (C) 2016-2018 The Zcash developers"))) + "\n" + + "\n" + FormatParagraph(strprintf(_("Copyright (C) 2009-2014 The Bitcoin Core developers"))) + "\n" + "\n" + FormatParagraph(_("This is experimental Free Software! Fuck Yeah!!!!!")) + "\n" + From 0786c0755ad59e266a387ef07ac5a2505bac30b8 Mon Sep 17 00:00:00 2001 From: dan_s Date: Sun, 30 Oct 2022 21:14:20 -0500 Subject: [PATCH 185/295] removed "python" from apt command --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index ad81f40b9..c13109788 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -24,7 +24,7 @@ sudo swapon /swapfile ```sh # install build dependencies sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib \ - autoconf libtool ncurses-dev unzip git python zlib1g-dev wget \ + autoconf libtool ncurses-dev unzip git zlib1g-dev wget \ bsdmainutils automake curl unzip nano libsodium-dev cmake # clone git repo git clone https://git.hush.is/hush/hush3 From 491e263af992339b71a5793bda32d1b3de356ef5 Mon Sep 17 00:00:00 2001 From: triplefive Date: Mon, 31 Oct 2022 15:19:35 -0400 Subject: [PATCH 186/295] added smartz to build.sh --- build.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 1a2d1c8a0..9806d770d 100755 --- a/build.sh +++ b/build.sh @@ -4,4 +4,16 @@ # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html set -eu -o pipefail -./util/build.sh --disable-tests $@ + +# run correct build script for detected OS +if [[ "$OSTYPE" == "linux-gnu"* ]]; then + ./util/build.sh --disable-tests $@ +elif [[ "$OSTYPE" == "darwin"* ]]; then + ./util/build-mac.sh --disable-tests $@ +elif [[ "$OSTYPE" == "msys"* ]]; then + ./util/build-win.sh --disable-tests $@ +#elif [[ "$OSTYPE" == "freebsd"* ]]; then + # placeholder +else + echo "Unable to detect your OS. What are you using?" +fi From 70908b1009b3db7cb925ce4b6f821adad546f595 Mon Sep 17 00:00:00 2001 From: triplefive Date: Mon, 31 Oct 2022 16:13:21 -0400 Subject: [PATCH 187/295] document -maxdebugfilesize --- src/init.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/init.cpp b/src/init.cpp index 1dda35e1c..f5ea421c7 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -377,6 +377,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-exportdir=", _("Specify directory to be used when exporting data")); strUsage += HelpMessageOpt("-dbcache=", strprintf(_("Set database cache size in megabytes (%d to %d, default: %d)"), nMinDbCache, nMaxDbCache, nDefaultDbCache)); strUsage += HelpMessageOpt("-loadblock=", _("Imports blocks from external blk000??.dat file") + " " + _("on startup")); + strUsage += HelpMessageOpt("-maxdebugfilesize=", strprintf(_("Set the max size of the debug.log file (default: %u)"), 15)); strUsage += HelpMessageOpt("-maxorphantx=", strprintf(_("Keep at most unconnectable transactions in memory (default: %u)"), DEFAULT_MAX_ORPHAN_TRANSACTIONS)); strUsage += HelpMessageOpt("-mempooltxinputlimit=", _("[DEPRECATED/IGNORED] Set the maximum number of transparent inputs in a transaction that the mempool will accept (default: 0 = no limit applied)")); strUsage += HelpMessageOpt("-par=", strprintf(_("Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)"), From bfb51e1c34a6469a7d29184484257a420f442282 Mon Sep 17 00:00:00 2001 From: hydra Date: Tue, 1 Nov 2022 14:16:18 +0000 Subject: [PATCH 188/295] dragonx-cli --- src/dragonx-cli/dragonx-cli | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/dragonx-cli/dragonx-cli diff --git a/src/dragonx-cli/dragonx-cli b/src/dragonx-cli/dragonx-cli new file mode 100644 index 000000000..e9a05aa4b --- /dev/null +++ b/src/dragonx-cli/dragonx-cli @@ -0,0 +1,13 @@ +#!/bin/bash +# Copyright 2016-2022 The Hush Developers +# Copyright 2022 The DragonX Developers +# Released under the GPLv3 + +# set working directory to the location of this script +# readlink -f does not always exist +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +cd $DIR +DIR="$( cd "$( dirname "$( readlink "${BASH_SOURCE[0]}" )" )" && pwd )" +cd $DIR + +./hush-cli -ac_name=DRAGONX $@ From 4a534ceb3f0bef681ac41940366a43bd48bf5f79 Mon Sep 17 00:00:00 2001 From: Hydra Date: Tue, 1 Nov 2022 10:28:37 -0400 Subject: [PATCH 189/295] delete --- src/dragonx-cli/dragonx-cli | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 src/dragonx-cli/dragonx-cli diff --git a/src/dragonx-cli/dragonx-cli b/src/dragonx-cli/dragonx-cli deleted file mode 100644 index e9a05aa4b..000000000 --- a/src/dragonx-cli/dragonx-cli +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -# Copyright 2016-2022 The Hush Developers -# Copyright 2022 The DragonX Developers -# Released under the GPLv3 - -# set working directory to the location of this script -# readlink -f does not always exist -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd $DIR -DIR="$( cd "$( dirname "$( readlink "${BASH_SOURCE[0]}" )" )" && pwd )" -cd $DIR - -./hush-cli -ac_name=DRAGONX $@ From 0e2f0f8ffe157170601f989fcab782021a6201a2 Mon Sep 17 00:00:00 2001 From: Hydra Date: Tue, 1 Nov 2022 10:29:35 -0400 Subject: [PATCH 190/295] dragonx-cli --- src/dragonx-cli | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/dragonx-cli diff --git a/src/dragonx-cli b/src/dragonx-cli new file mode 100644 index 000000000..e9a05aa4b --- /dev/null +++ b/src/dragonx-cli @@ -0,0 +1,13 @@ +#!/bin/bash +# Copyright 2016-2022 The Hush Developers +# Copyright 2022 The DragonX Developers +# Released under the GPLv3 + +# set working directory to the location of this script +# readlink -f does not always exist +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +cd $DIR +DIR="$( cd "$( dirname "$( readlink "${BASH_SOURCE[0]}" )" )" && pwd )" +cd $DIR + +./hush-cli -ac_name=DRAGONX $@ From 7f37974e28ccea3a598fd13e24b2de8ddf9a7905 Mon Sep 17 00:00:00 2001 From: Hydra Date: Tue, 1 Nov 2022 11:32:35 -0400 Subject: [PATCH 191/295] dragonxd --- src/dragonx-cli | 0 src/dragonxd | 17 +++++++++++++++++ 2 files changed, 17 insertions(+) mode change 100644 => 100755 src/dragonx-cli create mode 100755 src/dragonxd diff --git a/src/dragonx-cli b/src/dragonx-cli old mode 100644 new mode 100755 diff --git a/src/dragonxd b/src/dragonxd new file mode 100755 index 000000000..cad81c40d --- /dev/null +++ b/src/dragonxd @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2016-2022 The Hush Developers +# Copyright 2022 The DragonX Developers +# Released under the GPLv3 + +# set working directory to the location of this script +# readlink -f does not always exist +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +cd $DIR +DIR="$( cd "$( dirname "$( readlink "${BASH_SOURCE[0]}" )" )" && pwd )" +cd $DIR + +# will be updated with real IP on mainnet launch +SEEDNODE=1.2.3.4 + +# Remember Remember the 5th November for freedom of speech is not free!! +./hush-smart-chain -ac_name=DRAGONX -ac_algo=randomx -ac_halving=3500000 -ac_reward=300000000 -ac_blocktime=36 -ac_private=1 -addnode=$SEEDNODE $@ From 202e67f9acfa5748483ea5fb61e77ec6dd856603 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Tue, 1 Nov 2022 14:25:12 -0400 Subject: [PATCH 192/295] document -maxreorg argument --- src/init.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/init.cpp b/src/init.cpp index f5ea421c7..ec2d3bdb1 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -379,6 +379,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-loadblock=", _("Imports blocks from external blk000??.dat file") + " " + _("on startup")); strUsage += HelpMessageOpt("-maxdebugfilesize=", strprintf(_("Set the max size of the debug.log file (default: %u)"), 15)); strUsage += HelpMessageOpt("-maxorphantx=", strprintf(_("Keep at most unconnectable transactions in memory (default: %u)"), DEFAULT_MAX_ORPHAN_TRANSACTIONS)); + strUsage += HelpMessageOpt("-maxreorg=", _("Specify the maximum length of a blockchain re-organization")); strUsage += HelpMessageOpt("-mempooltxinputlimit=", _("[DEPRECATED/IGNORED] Set the maximum number of transparent inputs in a transaction that the mempool will accept (default: 0 = no limit applied)")); strUsage += HelpMessageOpt("-par=", strprintf(_("Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)"), -(int)boost::thread::hardware_concurrency(), MAX_SCRIPTCHECK_THREADS, DEFAULT_SCRIPTCHECK_THREADS)); From 7bbc291370e8cd97a904c9eec10049ced6fbabfc Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Thu, 3 Nov 2022 11:11:51 +0000 Subject: [PATCH 193/295] Add 'issue_template.md' --- issue_template.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 issue_template.md diff --git a/issue_template.md b/issue_template.md new file mode 100644 index 000000000..81eb70fa3 --- /dev/null +++ b/issue_template.md @@ -0,0 +1,29 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +Please tell us the version of hushd being used, and if you compiled yourself or used binaries or Debian package. + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Do this '....' +3. Then this '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Desktop (please complete the following information):** + - OS: [e.g. Linux/Windows/Mac with version number] + +**Additional context** +Add any other context about the problem here. \ No newline at end of file From 65b9e74333b5a1770ea30d9067c937a46ea92486 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Thu, 3 Nov 2022 11:13:38 +0000 Subject: [PATCH 194/295] Delete 'issue_template.md' --- issue_template.md | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 issue_template.md diff --git a/issue_template.md b/issue_template.md deleted file mode 100644 index 81eb70fa3..000000000 --- a/issue_template.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - -Please tell us the version of hushd being used, and if you compiled yourself or used binaries or Debian package. - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Do this '....' -3. Then this '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Desktop (please complete the following information):** - - OS: [e.g. Linux/Windows/Mac with version number] - -**Additional context** -Add any other context about the problem here. \ No newline at end of file From ac2a68aa862c77e884b6e96d580699a7df68b8d5 Mon Sep 17 00:00:00 2001 From: hydra Date: Sun, 6 Nov 2022 11:59:20 +0000 Subject: [PATCH 195/295] update seednode ip --- src/dragonxd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dragonxd b/src/dragonxd index cad81c40d..78a291b1e 100755 --- a/src/dragonxd +++ b/src/dragonxd @@ -11,7 +11,7 @@ DIR="$( cd "$( dirname "$( readlink "${BASH_SOURCE[0]}" )" )" && pwd )" cd $DIR # will be updated with real IP on mainnet launch -SEEDNODE=1.2.3.4 +SEEDNODE=176.126.87.241 # Remember Remember the 5th November for freedom of speech is not free!! ./hush-smart-chain -ac_name=DRAGONX -ac_algo=randomx -ac_halving=3500000 -ac_reward=300000000 -ac_blocktime=36 -ac_private=1 -addnode=$SEEDNODE $@ From 3499aad7cd27791a4aa735d38f5173dcf26eda72 Mon Sep 17 00:00:00 2001 From: hydra Date: Sun, 6 Nov 2022 11:59:39 +0000 Subject: [PATCH 196/295] Update 'src/dragonxd' --- src/dragonxd | 1 - 1 file changed, 1 deletion(-) diff --git a/src/dragonxd b/src/dragonxd index 78a291b1e..bfca8810d 100755 --- a/src/dragonxd +++ b/src/dragonxd @@ -10,7 +10,6 @@ cd $DIR DIR="$( cd "$( dirname "$( readlink "${BASH_SOURCE[0]}" )" )" && pwd )" cd $DIR -# will be updated with real IP on mainnet launch SEEDNODE=176.126.87.241 # Remember Remember the 5th November for freedom of speech is not free!! From cba21e8f2add47894ce2a36631de9a8029be5b29 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Sun, 6 Nov 2022 15:14:46 -0500 Subject: [PATCH 197/295] removed hardcoded bash location for better platform support --- src/dragonx-cli | 2 +- src/dragonxd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dragonx-cli b/src/dragonx-cli index e9a05aa4b..e4e58d15e 100755 --- a/src/dragonx-cli +++ b/src/dragonx-cli @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2016-2022 The Hush Developers # Copyright 2022 The DragonX Developers # Released under the GPLv3 diff --git a/src/dragonxd b/src/dragonxd index bfca8810d..883e20f3a 100755 --- a/src/dragonxd +++ b/src/dragonxd @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2016-2022 The Hush Developers # Copyright 2022 The DragonX Developers # Released under the GPLv3 From d5871b20909116fc07b85704577c0a06b57c727d Mon Sep 17 00:00:00 2001 From: jahway603 Date: Sun, 6 Nov 2022 21:02:33 -0500 Subject: [PATCH 198/295] correct ac_supply documented default --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index ec2d3bdb1..ec66079b7 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -609,7 +609,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-ac_reward", _("Block reward in satoshis, default is 0")); strUsage += HelpMessageOpt("-ac_sapling", _("Sapling activation block height")); strUsage += HelpMessageOpt("-ac_script", _("P2SH/multisig address to receive founders rewards")); - strUsage += HelpMessageOpt("-ac_supply", _("Starting supply, default is 0")); + strUsage += HelpMessageOpt("-ac_supply", _("Starting supply, default is 10")); strUsage += HelpMessageOpt("-ac_txpow", _("Enforce transaction-rate limit, default 0")); return strUsage; From 6eccab3e983186ef252744c2bf37d7a0dc3756bf Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 8 Nov 2022 09:07:49 -0500 Subject: [PATCH 199/295] Add missing newline in rxdebug and add debugging about solutionTargetChecks --- src/miner.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index 72d6d04df..e8732612a 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -1209,7 +1209,7 @@ void static RandomXMiner() // std::cerr << "RandomXMiner: randomxInput=" << HexStr(randomxInput) << "\n"; // fprintf(stderr,"RandomXMiner: created randomxKey=%s , randomxInput.size=%lu\n", randomxKey, randomxInput.size() ); //randomxInput); - rxdebug("%s: randomxKey=%s randomxInput=%s", randomxKey, HexStr(randomxInput).c_str()); + rxdebug("%s: randomxKey=%s randomxInput=%s\n", randomxKey, HexStr(randomxInput).c_str()); randomx_flags flags = randomx_get_flags(); randomx_cache *randomxCache = randomx_alloc_cache(flags); @@ -1277,6 +1277,7 @@ void static RandomXMiner() rxdebug("%s: Checking solution against target\n"); pblock->nSolution = soln; solutionTargetChecks.increment(); + rxdebug("%s: solutionTargetChecks=%d\n", solutionTargetChecks.get()); B = *pblock; h = UintToArith256(B.GetHash()); From 5aea7523371799d6b57e6d92c80d1f6696076f18 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 8 Nov 2022 09:16:27 -0500 Subject: [PATCH 200/295] Fix compiler warnings --- src/miner.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index e8732612a..92acea2d9 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -1277,7 +1277,7 @@ void static RandomXMiner() rxdebug("%s: Checking solution against target\n"); pblock->nSolution = soln; solutionTargetChecks.increment(); - rxdebug("%s: solutionTargetChecks=%d\n", solutionTargetChecks.get()); + fprintf(stderr,"%s: solutionTargetChecks=%lu\n", __func__, solutionTargetChecks.get()); B = *pblock; h = UintToArith256(B.GetHash()); @@ -1646,6 +1646,7 @@ void static BitcoinMiner() LogPrint("pow", "- Checking solution against target\n"); pblock->nSolution = soln; solutionTargetChecks.increment(); + rxdebug("%s: solutionTargetChecks=%lu\n", solutionTargetChecks.get()); B = *pblock; h = UintToArith256(B.GetHash()); /*for (z=31; z>=16; z--) From 24dc8252a386a9528711c1c2d68988aa60ef6f1b Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 8 Nov 2022 09:29:05 -0500 Subject: [PATCH 201/295] Add scripts to research randomx difficulty problems --- src/testdragonx-cli | 13 +++++++++++++ src/testdragonxd | 17 +++++++++++++++++ src/testequihash-cli | 13 +++++++++++++ src/testequihashd | 18 ++++++++++++++++++ 4 files changed, 61 insertions(+) create mode 100755 src/testdragonx-cli create mode 100755 src/testdragonxd create mode 100755 src/testequihash-cli create mode 100755 src/testequihashd diff --git a/src/testdragonx-cli b/src/testdragonx-cli new file mode 100755 index 000000000..e1f94b2c7 --- /dev/null +++ b/src/testdragonx-cli @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +# Copyright 2016-2022 The Hush Developers +# Copyright 2022 The DragonX Developers +# Released under the GPLv3 + +# set working directory to the location of this script +# readlink -f does not always exist +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +cd $DIR +DIR="$( cd "$( dirname "$( readlink "${BASH_SOURCE[0]}" )" )" && pwd )" +cd $DIR + +./hush-cli -ac_name=TESTDRAGONX $@ diff --git a/src/testdragonxd b/src/testdragonxd new file mode 100755 index 000000000..d769509d5 --- /dev/null +++ b/src/testdragonxd @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# Copyright 2016-2022 The Hush Developers +# Copyright 2022 The DragonX Developers +# Released under the GPLv3 + +# set working directory to the location of this script +# readlink -f does not always exist +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +cd $DIR +DIR="$( cd "$( dirname "$( readlink "${BASH_SOURCE[0]}" )" )" && pwd )" +cd $DIR + +BLOCKTIME=18 +SUPPLY=0 + +# Remember Remember the 5th November for freedom of speech is not free!! +./hush-smart-chain -ac_name=TESTDRAGONX -ac_algo=randomx -ac_halving=3500000 -ac_reward=300000000 -ac_blocktime=$BLOCKTIME -ac_private=1 -ac_supply=$SUPPLY -gen=1 -genproclimit=1 -debug=randomx $@ diff --git a/src/testequihash-cli b/src/testequihash-cli new file mode 100755 index 000000000..abe243979 --- /dev/null +++ b/src/testequihash-cli @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +# Copyright 2016-2022 The Hush Developers +# Copyright 2022 The DragonX Developers +# Released under the GPLv3 + +# set working directory to the location of this script +# readlink -f does not always exist +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +cd $DIR +DIR="$( cd "$( dirname "$( readlink "${BASH_SOURCE[0]}" )" )" && pwd )" +cd $DIR + +./hush-cli -ac_name=TESTEQUIHASH $@ diff --git a/src/testequihashd b/src/testequihashd new file mode 100755 index 000000000..4e7a0c64c --- /dev/null +++ b/src/testequihashd @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# Copyright 2016-2022 The Hush Developers +# Copyright 2022 The DragonX Developers +# Released under the GPLv3 + +# set working directory to the location of this script +# readlink -f does not always exist +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +cd $DIR +DIR="$( cd "$( dirname "$( readlink "${BASH_SOURCE[0]}" )" )" && pwd )" +cd $DIR + +BLOCKTIME=18 +SUPPLY=0 + +# same as TESTDRAGONX except equihash and different ac_name +# and debug=pow which is the equivalent of debug=randomx for equihash mining +./hush-smart-chain -ac_name=TESTEQUIHASH -ac_halving=3500000 -ac_reward=300000000 -ac_blocktime=$BLOCKTIME -ac_private=1 -ac_supply=$SUPPLY -gen=1 -genproclimit=1 -testnode=1 -debug=pow $@ From c81b49c96c780455125be726098384858048dbfa Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 8 Nov 2022 09:55:46 -0500 Subject: [PATCH 202/295] fix params for testcoins --- src/testdragonxd | 2 +- src/testequihashd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/testdragonxd b/src/testdragonxd index d769509d5..6a1c9e86f 100755 --- a/src/testdragonxd +++ b/src/testdragonxd @@ -14,4 +14,4 @@ BLOCKTIME=18 SUPPLY=0 # Remember Remember the 5th November for freedom of speech is not free!! -./hush-smart-chain -ac_name=TESTDRAGONX -ac_algo=randomx -ac_halving=3500000 -ac_reward=300000000 -ac_blocktime=$BLOCKTIME -ac_private=1 -ac_supply=$SUPPLY -gen=1 -genproclimit=1 -debug=randomx $@ +./hush-smart-chain -ac_name=TESTDRAGONX -ac_algo=randomx -ac_halving=3500000 -ac_reward=300000000 -ac_blocktime=$BLOCKTIME -ac_private=1 -ac_supply=$SUPPLY -debug=randomx $@ diff --git a/src/testequihashd b/src/testequihashd index 4e7a0c64c..9571566a2 100755 --- a/src/testequihashd +++ b/src/testequihashd @@ -15,4 +15,4 @@ SUPPLY=0 # same as TESTDRAGONX except equihash and different ac_name # and debug=pow which is the equivalent of debug=randomx for equihash mining -./hush-smart-chain -ac_name=TESTEQUIHASH -ac_halving=3500000 -ac_reward=300000000 -ac_blocktime=$BLOCKTIME -ac_private=1 -ac_supply=$SUPPLY -gen=1 -genproclimit=1 -testnode=1 -debug=pow $@ +./hush-smart-chain -ac_name=TESTEQUIHASH -ac_halving=3500000 -ac_reward=300000000 -ac_blocktime=$BLOCKTIME -ac_private=1 -ac_supply=$SUPPLY -debug=pow $@ From b94ec8030729011ad408d4846bb6f73df2eefcce Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Thu, 10 Nov 2022 22:38:04 -0500 Subject: [PATCH 203/295] Use RANDOMX_FLAG_FULL_MEM --- src/miner.cpp | 71 +++++++++++++++++++++++++++++++------------ src/wallet/wallet.cpp | 2 +- 2 files changed, 52 insertions(+), 21 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index 92acea2d9..f39b94979 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -1065,6 +1065,23 @@ void static RandomXMiner() cancelSolver = true; } ); + randomx_flags flags = randomx_get_flags(); + // flags |= RANDOMX_FLAG_LARGE_PAGES; + flags |= RANDOMX_FLAG_FULL_MEM; + //flags |= RANDOMX_FLAG_JIT; + randomx_cache *randomxCache = randomx_alloc_cache(flags); + if (randomxCache == NULL) { + LogPrintf("RandomX cache is null, something is wrong, cannot mine!\n"); + return; + } + rxdebug("%s: created randomx flags + cache\n"); + + randomx_dataset *randomxDataset = randomx_alloc_dataset(flags); + rxdebug("%s: created dataset\n"); + if( randomxDataset == nullptr) { + LogPrintf("%s: allocating randomx dataset failed!\n", __func__); + return; + } miningTimer.start(); try { @@ -1181,8 +1198,8 @@ void static RandomXMiner() HASHTarget = arith_uint256().SetCompact(savebits); roundrobin_delay = ROUNDROBIN_DELAY; Mining_start = 0; - gotinvalid = 0; + while (true) { if ( gotinvalid != 0 ) { @@ -1199,7 +1216,7 @@ void static RandomXMiner() char randomxHash[RANDOMX_HASH_SIZE]; //fprintf(stderr,"RandomXMiner: created randomxHash of size %d\n", RANDOMX_HASH_SIZE); char randomxKey[82]; // randomx spec says keysize of >60 bytes is implementation-specific - // initial randomx key is unique to every Hush Smart Chain, and has at least 9 bytes (2^128 bits) of entropy + // initial randomx key is unique to every Hush Smart Chain, and has at least 9 bytes (2^9=128 bits) of entropy // since magic is 4 bytes, rpc port is 4 bytes and smart chain symbol must be at least 1 character long snprintf(randomxKey, 81, "%08x%s%08x", ASSETCHAINS_MAGIC, SMART_CHAIN_SYMBOL, ASSETCHAINS_RPCPORT); @@ -1211,14 +1228,6 @@ void static RandomXMiner() // fprintf(stderr,"RandomXMiner: created randomxKey=%s , randomxInput.size=%lu\n", randomxKey, randomxInput.size() ); //randomxInput); rxdebug("%s: randomxKey=%s randomxInput=%s\n", randomxKey, HexStr(randomxInput).c_str()); - randomx_flags flags = randomx_get_flags(); - randomx_cache *randomxCache = randomx_alloc_cache(flags); - if (randomxCache == NULL) { - LogPrintf("RandomX cache is null, something is wrong, cannot mine!\n"); - return; - } - // fprintf(stderr,"RandomXMiner: created randomx flags + cache\n"); - // With the defaults of 1024 and 64 // the key block will change every ~21.3 hours with a 75s block time // and every ~17 hours with the default 60s block time for HSCs @@ -1240,20 +1249,31 @@ void static RandomXMiner() randomx_init_cache(randomxCache, &randomxBlockKey, sizeof randomxBlockKey); rxdebug("%s: initialized cache with keyHeight=%d, randomxBlockKey=%s\n", keyHeight, randomxBlockKey.ToString().c_str()); + } - randomx_vm *myVM = randomx_create_vm(flags, randomxCache, NULL); - if(myVM == NULL) { - LogPrintf("RandomXMiner: Cannot create RandomX VM, aborting!\n"); - return; - } + //TODO: this is hardcoded to use 2 threads instead of the number of mining threads + //std::thread t1(&randomx_init_dataset, randomxDataset, randomxCache, 0, datasetItemCount / 2); + //std::thread t2(&randomx_init_dataset, randomxDataset, randomxCache, datasetItemCount / 2, datasetItemCount - datasetItemCount / 2); + //t1.join(); + //t2.join(); + auto datasetItemCount = randomx_dataset_item_count(); + rxdebug("%s: dataset items=%lu\n", datasetItemCount); + + randomx_init_dataset(randomxDataset, randomxCache, 0, datasetItemCount); + rxdebug("%s: dataset initialized\n"); + // randomx_release_cache(randomxCache); + // rxdebug("%s: cache released\n"); + + randomx_vm *myVM = randomx_create_vm(flags, nullptr, randomxDataset); + if(myVM == NULL) { + LogPrintf("RandomXMiner: Cannot create RandomX VM, aborting!\n"); + return; + } + randomx_calculate_hash(myVM, &randomxInput, sizeof randomxInput, randomxHash); - // rxdebug("calculated randomx hash\n"); - - randomx_destroy_vm(myVM); - // fprintf(stderr,"RandomXMiner: destroyed VM\n"); - randomx_release_cache(randomxCache); + rxdebug("%s: calculated randomx hash\n"); rxdebug("%s: randomxHash="); if (fRandomXDebug) { @@ -1263,6 +1283,9 @@ void static RandomXMiner() printf("\n"); } + randomx_destroy_vm(myVM); + rxdebug("%s: destroyed VM\n"); + // Use randomx hash to build a valid block std::function)> validBlock = @@ -1372,6 +1395,8 @@ void static RandomXMiner() pblock->nBits = savebits; } } + + } catch (const boost::thread_interrupted&) { miningTimer.stop(); c.disconnect(); @@ -1383,6 +1408,11 @@ void static RandomXMiner() fprintf(stderr,"RandomXMiner: runtime error: %s\n", e.what()); return; } + + randomx_release_dataset(randomxDataset); + rxdebug("%s: released dataset\n"); + randomx_release_cache(randomxCache); + rxdebug("%s: released cache\n"); miningTimer.stop(); c.disconnect(); } @@ -1859,6 +1889,7 @@ void static BitcoinMiner() LogPrintf("HushMiner runtime error: %s\n", e.what()); return; } + miningTimer.stop(); c.disconnect(); } diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index bc2d75752..001c42718 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2771,7 +2771,7 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate) // our wallet birthday (as adjusted for block time variability) while (pindex && nTimeFirstKey && (pindex->GetBlockTime() < (nTimeFirstKey - 7200))) { pindex = chainActive.Next(pindex); - pwalletMain->rescanHeight = pindex->GetHeight(); + pwalletMain->rescanHeight = pindex ? pindex->GetHeight() : 0; } ShowProgress(_("Rescanning..."), 0); // show rescan progress in GUI as dialog or on splashscreen, if -rescan on startup From c108db8f3c37cea6b0ec6a458863e5cf70d7f6d8 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Fri, 11 Nov 2022 06:42:51 -0500 Subject: [PATCH 204/295] Speed up randomx hashing by ~60X per core These code changes move various randomx setup code out of the inner mining loop, which significantly increases hashrate. Currently seeing ~60 hashes/second/core on a Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz. This code may have memory leaks, it does not destroy the randomx VM since it was causing coredumps. It also seems to use more memory, I am only able to mine on 2 cores with 16GB of RAM. Using more cores runs out of memory. --- src/miner.cpp | 108 +++++++++++++++++++++++++------------------------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index f39b94979..1ff987e9b 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -1131,6 +1131,55 @@ void static RandomXMiner() { Mining_height = pindexPrev->GetHeight()+1; Mining_start = (uint32_t)time(NULL); + } + char randomxHash[RANDOMX_HASH_SIZE]; + rxdebug("%s: created randomxHash of size %d\n", RANDOMX_HASH_SIZE); + char randomxKey[82]; // randomx spec says keysize of >60 bytes is implementation-specific + // initial randomx key is unique to every Hush Smart Chain, and has at least 9 bytes (2^9=128 bits) of entropy + // since magic is 4 bytes, rpc port is 4 bytes and smart chain symbol must be at least 1 character long + snprintf(randomxKey, 81, "%08x%s%08x", ASSETCHAINS_MAGIC, SMART_CHAIN_SYMBOL, ASSETCHAINS_RPCPORT); + + // With the defaults of 1024 and 64 + // the key block will change every ~21.3 hours with a 75s block time + // and every ~17 hours with the default 60s block time for HSCs + int randomxInterval = GetArg("-ac_randomx_interval",1024); + // This lag is 80 mins for 75s blocktime and 64 mins for 60s (default) blocktime for HSCs + int randomxBlockLag = GetArg("-ac_randomx_lag", 64); + + // fprintf(stderr,"RandomXMiner: using initial key with interval=%d and lag=%d\n", randomxInterval, randomxBlockLag); + rxdebug("%s: using initial key, interval=%d, lag=%d, Mining_height=%u\n", randomxInterval, randomxBlockLag, Mining_height); + // Use the initial key at the start of the chain, until the first key block + if( (Mining_height) < randomxInterval + randomxBlockLag) { + randomx_init_cache(randomxCache, &randomxKey, sizeof randomxKey); + rxdebug("%s: initialized cache with initial key\n"); + } else { + rxdebug("%s: calculating keyHeight with randomxInterval=%d\n", randomxInterval); + // At heights between intervals, we use the same block key and wait randomxBlockLag blocks until changing + int keyHeight = ((Mining_height - randomxBlockLag) / randomxInterval) * randomxInterval; + uint256 randomxBlockKey = chainActive[keyHeight]->GetBlockHash(); + + randomx_init_cache(randomxCache, &randomxBlockKey, sizeof randomxBlockKey); + rxdebug("%s: initialized cache with keyHeight=%d, randomxBlockKey=%s\n", keyHeight, randomxBlockKey.ToString().c_str()); + + } + + auto datasetItemCount = randomx_dataset_item_count(); + rxdebug("%s: dataset items=%lu\n", datasetItemCount); + //TODO: this is hardcoded to use 2 threads instead of the number of mining threads + //std::thread t1(&randomx_init_dataset, randomxDataset, randomxCache, 0, datasetItemCount / 2); + //std::thread t2(&randomx_init_dataset, randomxDataset, randomxCache, datasetItemCount / 2, datasetItemCount - datasetItemCount / 2); + //t1.join(); + //t2.join(); + + randomx_init_dataset(randomxDataset, randomxCache, 0, datasetItemCount); + rxdebug("%s: dataset initialized\n"); + // randomx_release_cache(randomxCache); + // rxdebug("%s: cache released\n"); + + randomx_vm *myVM = randomx_create_vm(flags, nullptr, randomxDataset); + if(myVM == NULL) { + LogPrintf("RandomXMiner: Cannot create RandomX VM, aborting!\n"); + return; } //fprintf(stderr,"RandomXMiner: Mining_start=%u\n", Mining_start); #ifdef ENABLE_WALLET @@ -1185,6 +1234,7 @@ void static RandomXMiner() } else fprintf(stderr,"%s vouts.%d mining.%d vs %d\n",SMART_CHAIN_SYMBOL,(int32_t)pblock->vtx[0].vout.size(),Mining_height,ASSETCHAINS_MINHEIGHT); } } + rxdebug("%s: incrementing extra nonce\n"); IncrementExtraNonce(pblock, pindexPrev, nExtraNonce); // fprintf(stderr,"RandomXMiner: %u transactions in block\n",(int32_t)pblock->vtx.size()); LogPrintf("Running HushRandomXMiner with %u transactions in block (%u bytes)\n",pblock->vtx.size(),::GetSerializeSize(*pblock,SER_NETWORK,PROTOCOL_VERSION)); @@ -1213,13 +1263,6 @@ void static RandomXMiner() arith_uint256 hashTarget; hashTarget = HASHTarget; - char randomxHash[RANDOMX_HASH_SIZE]; - //fprintf(stderr,"RandomXMiner: created randomxHash of size %d\n", RANDOMX_HASH_SIZE); - char randomxKey[82]; // randomx spec says keysize of >60 bytes is implementation-specific - // initial randomx key is unique to every Hush Smart Chain, and has at least 9 bytes (2^9=128 bits) of entropy - // since magic is 4 bytes, rpc port is 4 bytes and smart chain symbol must be at least 1 character long - snprintf(randomxKey, 81, "%08x%s%08x", ASSETCHAINS_MAGIC, SMART_CHAIN_SYMBOL, ASSETCHAINS_RPCPORT); - CDataStream randomxInput(SER_NETWORK, PROTOCOL_VERSION); // Use the current block as randomx input randomxInput << pblocktemplate->block; @@ -1228,50 +1271,7 @@ void static RandomXMiner() // fprintf(stderr,"RandomXMiner: created randomxKey=%s , randomxInput.size=%lu\n", randomxKey, randomxInput.size() ); //randomxInput); rxdebug("%s: randomxKey=%s randomxInput=%s\n", randomxKey, HexStr(randomxInput).c_str()); - // With the defaults of 1024 and 64 - // the key block will change every ~21.3 hours with a 75s block time - // and every ~17 hours with the default 60s block time for HSCs - int randomxInterval = GetArg("-ac_randomx_interval",1024); - // This lag is 80 mins for 75s blocktime and 64 mins for 60s (default) blocktime for HSCs - int randomxBlockLag = GetArg("-ac_randomx_lag", 64); - - // fprintf(stderr,"RandomXMiner: using initial key with interval=%d and lag=%d\n", randomxInterval, randomxBlockLag); - rxdebug("%s: using initial key, interval=%d, lag=%d, Mining_height=%u\n", randomxInterval, randomxBlockLag, Mining_height); - // Use the initial key at the start of the chain, until the first key block - if( (Mining_height) < randomxInterval + randomxBlockLag) { - randomx_init_cache(randomxCache, &randomxKey, sizeof randomxKey); - rxdebug("%s: initialized cache with initial key\n"); - } else { - rxdebug("%s: calculating keyHeight with randomxInterval=%d\n", randomxInterval); - // At heights between intervals, we use the same block key and wait randomxBlockLag blocks until changing - int keyHeight = ((Mining_height - randomxBlockLag) / randomxInterval) * randomxInterval; - uint256 randomxBlockKey = chainActive[keyHeight]->GetBlockHash(); - - randomx_init_cache(randomxCache, &randomxBlockKey, sizeof randomxBlockKey); - rxdebug("%s: initialized cache with keyHeight=%d, randomxBlockKey=%s\n", keyHeight, randomxBlockKey.ToString().c_str()); - - } - - //TODO: this is hardcoded to use 2 threads instead of the number of mining threads - //std::thread t1(&randomx_init_dataset, randomxDataset, randomxCache, 0, datasetItemCount / 2); - //std::thread t2(&randomx_init_dataset, randomxDataset, randomxCache, datasetItemCount / 2, datasetItemCount - datasetItemCount / 2); - //t1.join(); - //t2.join(); - auto datasetItemCount = randomx_dataset_item_count(); - rxdebug("%s: dataset items=%lu\n", datasetItemCount); - - randomx_init_dataset(randomxDataset, randomxCache, 0, datasetItemCount); - rxdebug("%s: dataset initialized\n"); - // randomx_release_cache(randomxCache); - // rxdebug("%s: cache released\n"); - - randomx_vm *myVM = randomx_create_vm(flags, nullptr, randomxDataset); - if(myVM == NULL) { - LogPrintf("RandomXMiner: Cannot create RandomX VM, aborting!\n"); - return; - } - - + rxdebug("%s: calculating randomx hash\n"); randomx_calculate_hash(myVM, &randomxInput, sizeof randomxInput, randomxHash); rxdebug("%s: calculated randomx hash\n"); @@ -1283,11 +1283,11 @@ void static RandomXMiner() printf("\n"); } - randomx_destroy_vm(myVM); - rxdebug("%s: destroyed VM\n"); + + //randomx_destroy_vm(myVM); + //rxdebug("%s: destroyed VM\n"); // Use randomx hash to build a valid block - std::function)> validBlock = #ifdef ENABLE_WALLET [&pblock, &hashTarget, &pwallet, &reservekey, &m_cs, &cancelSolver, &chainparams] From ca52c6beb87ecbe35b7571b5cf4f701f9060bc0f Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Fri, 11 Nov 2022 04:26:18 -0800 Subject: [PATCH 205/295] Avoid potential coredump if pindex is NULL --- src/wallet/wallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index bc2d75752..001c42718 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2771,7 +2771,7 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate) // our wallet birthday (as adjusted for block time variability) while (pindex && nTimeFirstKey && (pindex->GetBlockTime() < (nTimeFirstKey - 7200))) { pindex = chainActive.Next(pindex); - pwalletMain->rescanHeight = pindex->GetHeight(); + pwalletMain->rescanHeight = pindex ? pindex->GetHeight() : 0; } ShowProgress(_("Rescanning..."), 0); // show rescan progress in GUI as dialog or on splashscreen, if -rescan on startup From fcfe09d196a945a42b82496c2497fcc45e30b305 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Sat, 12 Nov 2022 04:17:35 -0800 Subject: [PATCH 206/295] chainActive.Tip() can be NULL if have never synced to a chain tip before, so use chainActive.Height() instead --- src/init.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index ec2d3bdb1..b4cc62797 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -2042,7 +2042,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) } pwalletMain->consolidationInterval = consolidationInterval; - pwalletMain->nextConsolidation = pwalletMain->consolidationInterval + chainActive.Tip()->GetHeight(); + pwalletMain->nextConsolidation = pwalletMain->consolidationInterval + chainActive.Height(); LogPrintf("%s: set nextConsolidation=%d\n", __func__, pwalletMain->nextConsolidation ); //Validate Sapling Addresses @@ -2066,7 +2066,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) sweepInterval = 10; } pwalletMain->sweepInterval = sweepInterval; - pwalletMain->nextSweep = pwalletMain->sweepInterval + chainActive.Tip()->GetHeight(); + pwalletMain->nextSweep = pwalletMain->sweepInterval + chainActive.Height(); LogPrintf("%s: set nextSweep=%d with sweepInterval=%d\n", __func__, pwalletMain->nextSweep, pwalletMain->sweepInterval ); fSweepTxFee = GetArg("-zsweepfee", DEFAULT_SWEEP_FEE); fSweepMapUsed = !mapMultiArgs["-zsweepaddress"].empty(); From 81f0c7755e6d0958e9c68a1579e499c49cbf24c0 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sat, 12 Nov 2022 09:22:10 -0500 Subject: [PATCH 207/295] Code to test exact cause of the 'up only' diff bug --- src/pow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pow.cpp b/src/pow.cpp index 753378ba9..31c9eafcf 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -526,7 +526,11 @@ unsigned int CalculateNextWorkRequired(arith_uint256 bnAvg, // Limit adjustment step and use medians to prevent time-warp attacks int64_t nActualTimespan = nLastBlockTime - nFirstBlockTime; LogPrint("pow", " nActualTimespan = %d before dampening\n", nActualTimespan); - int64_t AWT = AveragingWindowTimespan(height) ; + + //NOTE: this will break HUSH+DRAGONX mainnet! For testing only. + int64_t AWT = params.AveragingWindowTimespan(); + //int64_t AWT = AveragingWindowTimespan(height) ; + nActualTimespan = AWT + (nActualTimespan - AWT)/4; LogPrint("pow", " nActualTimespan = %d before bounds\n", nActualTimespan); From 3dbe8d3c6bd730982f1e1aaece856ae00f1adfd9 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 15 Nov 2022 13:43:10 -0500 Subject: [PATCH 208/295] indentation --- src/miner.cpp | 53 ++++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index 1ff987e9b..97f093f1e 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -1132,36 +1132,37 @@ void static RandomXMiner() Mining_height = pindexPrev->GetHeight()+1; Mining_start = (uint32_t)time(NULL); } - char randomxHash[RANDOMX_HASH_SIZE]; - rxdebug("%s: created randomxHash of size %d\n", RANDOMX_HASH_SIZE); - char randomxKey[82]; // randomx spec says keysize of >60 bytes is implementation-specific - // initial randomx key is unique to every Hush Smart Chain, and has at least 9 bytes (2^9=128 bits) of entropy - // since magic is 4 bytes, rpc port is 4 bytes and smart chain symbol must be at least 1 character long - snprintf(randomxKey, 81, "%08x%s%08x", ASSETCHAINS_MAGIC, SMART_CHAIN_SYMBOL, ASSETCHAINS_RPCPORT); - // With the defaults of 1024 and 64 - // the key block will change every ~21.3 hours with a 75s block time - // and every ~17 hours with the default 60s block time for HSCs - int randomxInterval = GetArg("-ac_randomx_interval",1024); - // This lag is 80 mins for 75s blocktime and 64 mins for 60s (default) blocktime for HSCs - int randomxBlockLag = GetArg("-ac_randomx_lag", 64); + char randomxHash[RANDOMX_HASH_SIZE]; + rxdebug("%s: created randomxHash of size %d\n", RANDOMX_HASH_SIZE); + char randomxKey[82]; // randomx spec says keysize of >60 bytes is implementation-specific + // initial randomx key is unique to every Hush Smart Chain, and has at least 9 bytes (2^9=128 bits) of entropy + // since magic is 4 bytes, rpc port is 4 bytes and smart chain symbol must be at least 1 character long + snprintf(randomxKey, 81, "%08x%s%08x", ASSETCHAINS_MAGIC, SMART_CHAIN_SYMBOL, ASSETCHAINS_RPCPORT); - // fprintf(stderr,"RandomXMiner: using initial key with interval=%d and lag=%d\n", randomxInterval, randomxBlockLag); - rxdebug("%s: using initial key, interval=%d, lag=%d, Mining_height=%u\n", randomxInterval, randomxBlockLag, Mining_height); - // Use the initial key at the start of the chain, until the first key block - if( (Mining_height) < randomxInterval + randomxBlockLag) { - randomx_init_cache(randomxCache, &randomxKey, sizeof randomxKey); - rxdebug("%s: initialized cache with initial key\n"); - } else { - rxdebug("%s: calculating keyHeight with randomxInterval=%d\n", randomxInterval); - // At heights between intervals, we use the same block key and wait randomxBlockLag blocks until changing - int keyHeight = ((Mining_height - randomxBlockLag) / randomxInterval) * randomxInterval; - uint256 randomxBlockKey = chainActive[keyHeight]->GetBlockHash(); + // With the defaults of 1024 and 64 + // the key block will change every ~21.3 hours with a 75s block time + // and every ~17 hours with the default 60s block time for HSCs + int randomxInterval = GetArg("-ac_randomx_interval",1024); + // This lag is 80 mins for 75s blocktime and 64 mins for 60s (default) blocktime for HSCs + int randomxBlockLag = GetArg("-ac_randomx_lag", 64); - randomx_init_cache(randomxCache, &randomxBlockKey, sizeof randomxBlockKey); - rxdebug("%s: initialized cache with keyHeight=%d, randomxBlockKey=%s\n", keyHeight, randomxBlockKey.ToString().c_str()); + // fprintf(stderr,"RandomXMiner: using initial key with interval=%d and lag=%d\n", randomxInterval, randomxBlockLag); + rxdebug("%s: using initial key, interval=%d, lag=%d, Mining_height=%u\n", randomxInterval, randomxBlockLag, Mining_height); + // Use the initial key at the start of the chain, until the first key block + if( (Mining_height) < randomxInterval + randomxBlockLag) { + randomx_init_cache(randomxCache, &randomxKey, sizeof randomxKey); + rxdebug("%s: initialized cache with initial key\n"); + } else { + rxdebug("%s: calculating keyHeight with randomxInterval=%d\n", randomxInterval); + // At heights between intervals, we use the same block key and wait randomxBlockLag blocks until changing + int keyHeight = ((Mining_height - randomxBlockLag) / randomxInterval) * randomxInterval; + uint256 randomxBlockKey = chainActive[keyHeight]->GetBlockHash(); - } + randomx_init_cache(randomxCache, &randomxBlockKey, sizeof randomxBlockKey); + rxdebug("%s: initialized cache with keyHeight=%d, randomxBlockKey=%s\n", keyHeight, randomxBlockKey.ToString().c_str()); + + } auto datasetItemCount = randomx_dataset_item_count(); rxdebug("%s: dataset items=%lu\n", datasetItemCount); From d3b948005c8f68ca7efa7a89b26d1c5b877e0471 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 15 Nov 2022 13:44:47 -0500 Subject: [PATCH 209/295] indentation --- src/miner.cpp | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index 97f093f1e..1b030ea18 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -1065,23 +1065,24 @@ void static RandomXMiner() cancelSolver = true; } ); - randomx_flags flags = randomx_get_flags(); - // flags |= RANDOMX_FLAG_LARGE_PAGES; - flags |= RANDOMX_FLAG_FULL_MEM; - //flags |= RANDOMX_FLAG_JIT; - randomx_cache *randomxCache = randomx_alloc_cache(flags); - if (randomxCache == NULL) { - LogPrintf("RandomX cache is null, something is wrong, cannot mine!\n"); - return; - } - rxdebug("%s: created randomx flags + cache\n"); + randomx_flags flags = randomx_get_flags(); + // flags |= RANDOMX_FLAG_LARGE_PAGES; + flags |= RANDOMX_FLAG_FULL_MEM; + //flags |= RANDOMX_FLAG_JIT; + randomx_cache *randomxCache = randomx_alloc_cache(flags); + if (randomxCache == NULL) { + LogPrintf("RandomX cache is null, something is wrong, cannot mine!\n"); + return; + } + rxdebug("%s: created randomx flags + cache\n"); + randomx_dataset *randomxDataset = randomx_alloc_dataset(flags); + rxdebug("%s: created dataset\n"); + + if( randomxDataset == nullptr) { + LogPrintf("%s: allocating randomx dataset failed!\n", __func__); + return; + } - randomx_dataset *randomxDataset = randomx_alloc_dataset(flags); - rxdebug("%s: created dataset\n"); - if( randomxDataset == nullptr) { - LogPrintf("%s: allocating randomx dataset failed!\n", __func__); - return; - } miningTimer.start(); try { From c55d1cbc5f484e95f5e0f573e43aa4ce93dd795f Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 15 Nov 2022 14:02:02 -0500 Subject: [PATCH 210/295] Destroy randomx VM when we are done with it --- src/miner.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index 1b030ea18..c1f6f73b6 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -1066,6 +1066,7 @@ void static RandomXMiner() } ); randomx_flags flags = randomx_get_flags(); + // TODO: attempt to use large pages and fall back to no large pages // flags |= RANDOMX_FLAG_LARGE_PAGES; flags |= RANDOMX_FLAG_FULL_MEM; //flags |= RANDOMX_FLAG_JIT; @@ -1175,8 +1176,6 @@ void static RandomXMiner() randomx_init_dataset(randomxDataset, randomxCache, 0, datasetItemCount); rxdebug("%s: dataset initialized\n"); - // randomx_release_cache(randomxCache); - // rxdebug("%s: cache released\n"); randomx_vm *myVM = randomx_create_vm(flags, nullptr, randomxDataset); if(myVM == NULL) { @@ -1286,9 +1285,6 @@ void static RandomXMiner() printf("\n"); } - //randomx_destroy_vm(myVM); - //rxdebug("%s: destroyed VM\n"); - // Use randomx hash to build a valid block std::function)> validBlock = #ifdef ENABLE_WALLET @@ -1396,6 +1392,11 @@ void static RandomXMiner() pblock->nNonce = ArithToUint256(UintToArith256(pblock->nNonce) + 1); pblock->nBits = savebits; } + + rxdebug("%s: going to destroy rx VM\n"); + randomx_destroy_vm(myVM); + rxdebug("%s: destroyed VM\n"); + } From 1a4e8d4acfba44d4485dc68475a453e1b1ef6eea Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 15 Nov 2022 14:11:55 -0500 Subject: [PATCH 211/295] Initialize randomx dataset with 2 threads --- src/miner.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index c1f6f73b6..a222e4f16 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -1168,13 +1168,15 @@ void static RandomXMiner() auto datasetItemCount = randomx_dataset_item_count(); rxdebug("%s: dataset items=%lu\n", datasetItemCount); - //TODO: this is hardcoded to use 2 threads instead of the number of mining threads - //std::thread t1(&randomx_init_dataset, randomxDataset, randomxCache, 0, datasetItemCount / 2); - //std::thread t2(&randomx_init_dataset, randomxDataset, randomxCache, datasetItemCount / 2, datasetItemCount - datasetItemCount / 2); - //t1.join(); - //t2.join(); - randomx_init_dataset(randomxDataset, randomxCache, 0, datasetItemCount); + //TODO: this is hardcoded to use 2 threads instead of the number of mining threads + rxdebug("%s: initializing dataset with 2 threads\n"); + std::thread t1(&randomx_init_dataset, randomxDataset, randomxCache, 0, datasetItemCount / 2); + std::thread t2(&randomx_init_dataset, randomxDataset, randomxCache, datasetItemCount / 2, datasetItemCount - datasetItemCount / 2); + t1.join(); + t2.join(); + + // randomx_init_dataset(randomxDataset, randomxCache, 0, datasetItemCount); rxdebug("%s: dataset initialized\n"); randomx_vm *myVM = randomx_create_vm(flags, nullptr, randomxDataset); From c8b2163c1c9df4aa69815847d708d7445e405ad4 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 15 Nov 2022 14:21:45 -0500 Subject: [PATCH 212/295] Optimize inner mining loop --- src/miner.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index a222e4f16..8288ebfc4 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -1079,6 +1079,9 @@ void static RandomXMiner() randomx_dataset *randomxDataset = randomx_alloc_dataset(flags); rxdebug("%s: created dataset\n"); + auto datasetItemCount = randomx_dataset_item_count(); + rxdebug("%s: dataset items=%lu\n", datasetItemCount); + if( randomxDataset == nullptr) { LogPrintf("%s: allocating randomx dataset failed!\n", __func__); return; @@ -1166,9 +1169,6 @@ void static RandomXMiner() } - auto datasetItemCount = randomx_dataset_item_count(); - rxdebug("%s: dataset items=%lu\n", datasetItemCount); - //TODO: this is hardcoded to use 2 threads instead of the number of mining threads rxdebug("%s: initializing dataset with 2 threads\n"); std::thread t1(&randomx_init_dataset, randomxDataset, randomxCache, 0, datasetItemCount / 2); From 665f89513417c0ab2277b205c25f560bbcde0a5a Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 15 Nov 2022 14:40:10 -0500 Subject: [PATCH 213/295] Optimize inner mining loop --- src/miner.cpp | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index 8288ebfc4..bdf10ec56 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -1065,6 +1065,8 @@ void static RandomXMiner() cancelSolver = true; } ); + miningTimer.start(); + randomx_flags flags = randomx_get_flags(); // TODO: attempt to use large pages and fall back to no large pages // flags |= RANDOMX_FLAG_LARGE_PAGES; @@ -1087,7 +1089,20 @@ void static RandomXMiner() return; } - miningTimer.start(); + + char randomxHash[RANDOMX_HASH_SIZE]; + rxdebug("%s: created randomxHash of size %d\n", RANDOMX_HASH_SIZE); + char randomxKey[82]; // randomx spec says keysize of >60 bytes is implementation-specific + // initial randomx key is unique to every Hush Smart Chain, and has at least 9 bytes (2^9=128 bits) of entropy + // since magic is 4 bytes, rpc port is 4 bytes and smart chain symbol must be at least 1 character long + snprintf(randomxKey, 81, "%08x%s%08x", ASSETCHAINS_MAGIC, SMART_CHAIN_SYMBOL, ASSETCHAINS_RPCPORT); + + // With the defaults of 1024 and 64 + // the key block will change every ~21.3 hours with a 75s block time + // and every ~17 hours with the default 60s block time for HSCs + int randomxInterval = GetArg("-ac_randomx_interval",1024); + // This lag is 80 mins for 75s blocktime and 64 mins for 60s (default) blocktime for HSCs + int randomxBlockLag = GetArg("-ac_randomx_lag", 64); try { // fprintf(stderr,"RandomXMiner: mining %s with randomx\n",SMART_CHAIN_SYMBOL); @@ -1138,19 +1153,6 @@ void static RandomXMiner() Mining_start = (uint32_t)time(NULL); } - char randomxHash[RANDOMX_HASH_SIZE]; - rxdebug("%s: created randomxHash of size %d\n", RANDOMX_HASH_SIZE); - char randomxKey[82]; // randomx spec says keysize of >60 bytes is implementation-specific - // initial randomx key is unique to every Hush Smart Chain, and has at least 9 bytes (2^9=128 bits) of entropy - // since magic is 4 bytes, rpc port is 4 bytes and smart chain symbol must be at least 1 character long - snprintf(randomxKey, 81, "%08x%s%08x", ASSETCHAINS_MAGIC, SMART_CHAIN_SYMBOL, ASSETCHAINS_RPCPORT); - - // With the defaults of 1024 and 64 - // the key block will change every ~21.3 hours with a 75s block time - // and every ~17 hours with the default 60s block time for HSCs - int randomxInterval = GetArg("-ac_randomx_interval",1024); - // This lag is 80 mins for 75s blocktime and 64 mins for 60s (default) blocktime for HSCs - int randomxBlockLag = GetArg("-ac_randomx_lag", 64); // fprintf(stderr,"RandomXMiner: using initial key with interval=%d and lag=%d\n", randomxInterval, randomxBlockLag); rxdebug("%s: using initial key, interval=%d, lag=%d, Mining_height=%u\n", randomxInterval, randomxBlockLag, Mining_height); From b7adb511a63a65d7691b938bbdd167366c3be63a Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 15 Nov 2022 19:13:31 -0500 Subject: [PATCH 214/295] cleanup --- src/miner.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index bdf10ec56..2fbe958e7 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -1089,7 +1089,6 @@ void static RandomXMiner() return; } - char randomxHash[RANDOMX_HASH_SIZE]; rxdebug("%s: created randomxHash of size %d\n", RANDOMX_HASH_SIZE); char randomxKey[82]; // randomx spec says keysize of >60 bytes is implementation-specific @@ -1153,7 +1152,6 @@ void static RandomXMiner() Mining_start = (uint32_t)time(NULL); } - // fprintf(stderr,"RandomXMiner: using initial key with interval=%d and lag=%d\n", randomxInterval, randomxBlockLag); rxdebug("%s: using initial key, interval=%d, lag=%d, Mining_height=%u\n", randomxInterval, randomxBlockLag, Mining_height); // Use the initial key at the start of the chain, until the first key block @@ -1168,7 +1166,6 @@ void static RandomXMiner() randomx_init_cache(randomxCache, &randomxBlockKey, sizeof randomxBlockKey); rxdebug("%s: initialized cache with keyHeight=%d, randomxBlockKey=%s\n", keyHeight, randomxBlockKey.ToString().c_str()); - } //TODO: this is hardcoded to use 2 threads instead of the number of mining threads @@ -1302,7 +1299,7 @@ void static RandomXMiner() rxdebug("%s: Checking solution against target\n"); pblock->nSolution = soln; solutionTargetChecks.increment(); - fprintf(stderr,"%s: solutionTargetChecks=%lu\n", __func__, solutionTargetChecks.get()); + // fprintf(stderr,"%s: solutionTargetChecks=%lu\n", __func__, solutionTargetChecks.get()); B = *pblock; h = UintToArith256(B.GetHash()); @@ -1683,7 +1680,7 @@ void static BitcoinMiner() LogPrint("pow", "- Checking solution against target\n"); pblock->nSolution = soln; solutionTargetChecks.increment(); - rxdebug("%s: solutionTargetChecks=%lu\n", solutionTargetChecks.get()); + // fprintf(stderr, "%s: solutionTargetChecks=%lu\n", __func__, solutionTargetChecks.get()); B = *pblock; h = UintToArith256(B.GetHash()); /*for (z=31; z>=16; z--) From 1b7f200d29ddc3bee77191139b12beaff11f7621 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Thu, 1 Dec 2022 14:55:53 -0500 Subject: [PATCH 215/295] Fix typo in getsnapshot docs --- src/rpc/misc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index cd8ee74b2..81ad0984e 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -1334,7 +1334,7 @@ UniValue getsnapshot(const UniValue& params, bool fHelp, const CPubKey& mypk) " \"utxos\": 14, (number) Total number of UTXOs in snapshot\n" " \"total_addresses\": 2, (number) Total number of addresses in snapshot,\n" " \"start_height\": 91, (number) Block height snapshot began\n" - " \"ending_height\": 91 (number) Block height snapsho finished,\n" + " \"ending_height\": 91 (number) Block height snapshot finished,\n" " \"start_time\": 1531982752, (number) Unix epoch time snapshot started\n" " \"end_time\": 1531982752 (number) Unix epoch time snapshot finished\n" "}\n" From f2f60196202f388508a187c3fcbd5055d59e174d Mon Sep 17 00:00:00 2001 From: onryo Date: Sun, 4 Dec 2022 13:57:07 +0000 Subject: [PATCH 216/295] rm hashFinalSproutRoot related to https://git.hush.is/hush/hush3/issues/248 --- src/main.cpp | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index acef0dd50..6f39e16ee 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5960,20 +5960,6 @@ bool static LoadBlockIndexDB() pblocktree->ReadFlag("spentindex", fSpentIndex); LogPrintf("%s: spent index %s\n", __func__, fSpentIndex ? "enabled" : "disabled"); - // Fill in-memory data - BOOST_FOREACH(const PAIRTYPE(uint256, CBlockIndex*)& item, mapBlockIndex) - { - CBlockIndex* pindex = item.second; - // - This relationship will always be true even if pprev has multiple - // children, because hashSproutAnchor is technically a property of pprev, - // not its children. - // - This will miss chain tips; we handle the best tip below, and other - // tips will be handled by ConnectTip during a re-org. - if (pindex->pprev) { - pindex->pprev->hashFinalSproutRoot = pindex->hashSproutAnchor; - } - } - // Load pointer to end of best chain BlockMap::iterator it = mapBlockIndex.find(pcoinsTip->GetBestBlock()); if (it == mapBlockIndex.end()) From 01ff5c81f61746b7c5ceabb19b10215b8f617da2 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 6 Dec 2022 14:23:53 -0500 Subject: [PATCH 217/295] Improve some comments and ensure backcompat on HUSH mainnet Some comments turned out to be wrong and some could be more helpful. It turns out that when AveragingWindowTimespan was changed to fix a HUSH mainnet bug long ago, that introduced a bug for HSC's that do not use a 75s block time. Since the default is 60s that likely means all HSC's that will be created. There were no production HSC's in use at the time of that bugfix, so the bug went unnoticed until DRAGONX was launched. The bug then manifested as the DRAGONX difficulty bug, which cause the difficulty to never correct down, only up and lead to extremely long block times on DRAGONX mainnet. This code change ensures that HUSH mainnet uses the same hardcoded AWT as it did previously and all other HSC's will use params.AveragingWindowTimespan() , including DRAGONX mainnet. This seems less dangerous than changing AveragingWindowTimespan() on HUSH mainnet. --- src/pow.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/pow.cpp b/src/pow.cpp index 31c9eafcf..a63ac8d21 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -509,8 +509,9 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead } // Changing this requires changing many other things and -// changes consensus. Have fun -- Duke -int64_t AveragingWindowTimespan(int32_t height) { +// might change consensus. Have fun -- Duke +// NOTE: Ony HUSH3 mainnet should use this function, all HSC's should use params.AveragigWindowTimespan() +int64_t AveragingWindowTimespan() { // used in const methods, beware! // This is the correct AWT for 75s blocktime, before block 340k // the correct value was 2550 when the blocktime was 150s @@ -527,9 +528,9 @@ unsigned int CalculateNextWorkRequired(arith_uint256 bnAvg, int64_t nActualTimespan = nLastBlockTime - nFirstBlockTime; LogPrint("pow", " nActualTimespan = %d before dampening\n", nActualTimespan); - //NOTE: this will break HUSH+DRAGONX mainnet! For testing only. - int64_t AWT = params.AveragingWindowTimespan(); - //int64_t AWT = AveragingWindowTimespan(height) ; + bool ishush3 = strncmp(SMART_CHAIN_SYMBOL, "HUSH3",5) == 0 ? true : false; + // If this is HUSH3, use AWT function defined above, else use the one in params + int64_t AWT = ishush3 ? AveragingWindowTimespan() : params.AveragingWindowTimespan(); nActualTimespan = AWT + (nActualTimespan - AWT)/4; LogPrint("pow", " nActualTimespan = %d before bounds\n", nActualTimespan); From ae64eb239234fa743f5b0b2e89da836a8b6bc3a1 Mon Sep 17 00:00:00 2001 From: Duke Date: Sun, 18 Dec 2022 08:24:49 -0800 Subject: [PATCH 218/295] Remove alerts --- contrib/init/hushd.conf | 6 - contrib/init/hushd.openrc | 5 - qa/rpc-tests/test_framework/mininode.py | 19 --- src/Makefile.am | 4 - src/alert.cpp | 163 ------------------------ src/alert.h | 127 ------------------ src/alertkeys.h | 28 ---- src/chainparams.cpp | 2 - src/chainparams.h | 3 - src/deprecation.cpp | 4 - src/init.cpp | 9 +- src/main.cpp | 53 ++------ src/main.h | 5 - src/sendalert.cpp | 83 ------------ 14 files changed, 9 insertions(+), 502 deletions(-) delete mode 100644 src/alert.cpp delete mode 100644 src/alert.h delete mode 100644 src/alertkeys.h delete mode 100644 src/sendalert.cpp diff --git a/contrib/init/hushd.conf b/contrib/init/hushd.conf index 649df7796..eb26f3fdb 100644 --- a/contrib/init/hushd.conf +++ b/contrib/init/hushd.conf @@ -35,12 +35,6 @@ pre-start script echo echo "bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'" echo - echo "It is also recommended that you also set alertnotify so you are " - echo "notified of problems:" - echo - echo "ie: alertnotify=echo %%s | mail -s \"Hush Alert\"" \ - "admin@foo.com" - echo exit 1 fi diff --git a/contrib/init/hushd.openrc b/contrib/init/hushd.openrc index 08e04a00f..4443b1223 100644 --- a/contrib/init/hushd.openrc +++ b/contrib/init/hushd.openrc @@ -81,11 +81,6 @@ checkconfig() eerror "" eerror "bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'" eerror "" - eerror "It is also recommended that you also set alertnotify so you are " - eerror "notified of problems:" - eerror "" - eerror "ie: alertnotify=echo %%s | mail -s \"Hush Alert\"" \ - "admin@foo.com" eerror "" return 1 fi diff --git a/qa/rpc-tests/test_framework/mininode.py b/qa/rpc-tests/test_framework/mininode.py index 421691bcb..69d3c75ac 100755 --- a/qa/rpc-tests/test_framework/mininode.py +++ b/qa/rpc-tests/test_framework/mininode.py @@ -984,24 +984,6 @@ class msg_addr(object): return "msg_addr(addrs=%s)" % (repr(self.addrs)) -class msg_alert(object): - command = "alert" - - def __init__(self): - self.alert = CAlert() - - def deserialize(self, f): - self.alert = CAlert() - self.alert.deserialize(f) - - def serialize(self): - r = "" - r += self.alert.serialize() - return r - - def __repr__(self): - return "msg_alert(alert=%s)" % (repr(self.alert), ) - class msg_inv(object): command = "inv" @@ -1370,7 +1352,6 @@ class NodeConn(asyncore.dispatcher): "version": msg_version, "verack": msg_verack, "addr": msg_addr, - "alert": msg_alert, "inv": msg_inv, "getdata": msg_getdata, "getblocks": msg_getblocks, diff --git a/src/Makefile.am b/src/Makefile.am index 5fe0118c0..684e1a611 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -122,7 +122,6 @@ BITCOIN_CORE_H = \ addressindex.h \ spentindex.h \ addrman.h \ - alert.h \ amount.h \ amqp/amqpabstractnotifier.h \ amqp/amqpconfig.h \ @@ -249,10 +248,7 @@ libbitcoin_util_a-clientversion.$(OBJEXT): obj/build.h libbitcoin_server_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS) $(EVENT_PTHREADS_CFLAGS) libbitcoin_server_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) libbitcoin_server_a_SOURCES = \ - sendalert.cpp \ addrman.cpp \ - alert.cpp \ - alertkeys.h \ asyncrpcoperation.cpp \ asyncrpcqueue.cpp \ bloom.cpp \ diff --git a/src/alert.cpp b/src/alert.cpp deleted file mode 100644 index 9560a0c87..000000000 --- a/src/alert.cpp +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (c) 2010 Satoshi Nakamoto -// Copyright (c) 2009-2014 The Bitcoin Core developers -// Copyright (c) 2016-2022 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. * - * * - * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * - * the top-level directory of this distribution for the individual copyright * - * holder information and the developer policies on copyright and licensing. * - * * - * Unless otherwise agreed in a custom licensing agreement, no part of the * - * SuperNET software, including this file may be copied, modified, propagated * - * or distributed except according to the terms contained in the LICENSE file * - * * - * Removal or modification of this copyright notice is prohibited. * - * * - ******************************************************************************/ -#include "alert.h" -#include "clientversion.h" -#include "net.h" -#include "pubkey.h" -#include "timedata.h" -#include "ui_interface.h" -#include "util.h" -#include -#include -#include -#include -#include -#include -#include - -using namespace std; - -map mapAlerts; -CCriticalSection cs_mapAlerts; - -void CUnsignedAlert::SetNull() -{ - nVersion = 1; - nRelayUntil = 0; - nExpiration = 0; - nID = 0; - nCancel = 0; - setCancel.clear(); - nMinVer = 0; - nMaxVer = 0; - setSubVer.clear(); - nPriority = 0; - - strComment.clear(); - strStatusBar.clear(); - strRPCError.clear(); -} - -std::string CUnsignedAlert::ToString() const -{ - std::string strSetCancel; - BOOST_FOREACH(int n, setCancel) - strSetCancel += strprintf("%d ", n); - std::string strSetSubVer; - BOOST_FOREACH(const std::string& str, setSubVer) - strSetSubVer += "\"" + str + "\" "; - return strprintf( - "CAlert(\n" - " nVersion = %d\n" - " nRelayUntil = %d\n" - " nExpiration = %d\n" - " nID = %d\n" - " nCancel = %d\n" - " setCancel = %s\n" - " nMinVer = %d\n" - " nMaxVer = %d\n" - " setSubVer = %s\n" - " nPriority = %d\n" - " strComment = \"%s\"\n" - " strStatusBar = \"%s\"\n" - " strRPCError = \"%s\"\n" - ")\n", - nVersion, - nRelayUntil, - nExpiration, - nID, - nCancel, - strSetCancel, - nMinVer, - nMaxVer, - strSetSubVer, - nPriority, - strComment, - strStatusBar, - strRPCError); -} - -void CAlert::SetNull() -{ - CUnsignedAlert::SetNull(); - vchMsg.clear(); - vchSig.clear(); -} - -bool CAlert::IsNull() const -{ - return (nExpiration == 0); -} - -uint256 CAlert::GetHash() const -{ - return Hash(this->vchMsg.begin(), this->vchMsg.end()); -} - -bool CAlert::IsInEffect() const -{ - return false; -} - -bool CAlert::Cancels(const CAlert& alert) const -{ - if (!IsInEffect()) - return false; // this was a no-op before 31403 - return (alert.nID <= nCancel || setCancel.count(alert.nID)); -} - -bool CAlert::AppliesTo(int nVersion, const std::string& strSubVerIn) const -{ - // TODO: rework for client-version-embedded-in-strSubVer ? - return (IsInEffect() && - nMinVer <= nVersion && nVersion <= nMaxVer && - (setSubVer.empty() || setSubVer.count(strSubVerIn))); -} - -bool CAlert::AppliesToMe() const -{ - return false; -} - -bool CAlert::RelayTo(CNode* pnode) const -{ - return false; -} - -bool CAlert::CheckSignature(const std::vector& alertKey) const -{ - return false; -} - -CAlert CAlert::getAlertByHash(const uint256 &hash) -{ - CAlert retval; - return retval; -} - -bool CAlert::ProcessAlert(const std::vector& alertKey, bool fThread) -{ - return true; -} - -void CAlert::Notify(const std::string& strMessage, bool fThread) -{ - return; -} diff --git a/src/alert.h b/src/alert.h deleted file mode 100644 index f461c51c5..000000000 --- a/src/alert.h +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) 2010 Satoshi Nakamoto -// Copyright (c) 2009-2013 The Bitcoin Core developers -// Copyright (c) 2016-2022 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. * - * * - * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * - * the top-level directory of this distribution for the individual copyright * - * holder information and the developer policies on copyright and licensing. * - * * - * Unless otherwise agreed in a custom licensing agreement, no part of the * - * SuperNET software, including this file may be copied, modified, propagated * - * or distributed except according to the terms contained in the LICENSE file * - * * - * Removal or modification of this copyright notice is prohibited. * - * * - ******************************************************************************/ - -#ifndef HUSH_ALERT_H -#define HUSH_ALERT_H - -#include "serialize.h" -#include "sync.h" -#include -#include -#include -#include - -class CAlert; -class CNode; -class uint256; - -extern std::map mapAlerts; -extern CCriticalSection cs_mapAlerts; - -/** Alerts are for notifying old versions if they become too obsolete and - * need to upgrade. The message is displayed in the status bar. - * Alert messages are broadcast as a vector of signed data. Unserializing may - * not read the entire buffer if the alert is for a newer version, but older - * versions can still relay the original data. - */ -class CUnsignedAlert -{ -public: - int nVersion; - int64_t nRelayUntil; // when newer nodes stop relaying to newer nodes - int64_t nExpiration; - int nID; - int nCancel; - std::set setCancel; - int nMinVer; // lowest version inclusive - int nMaxVer; // highest version inclusive - std::set setSubVer; // empty matches all - int nPriority; - - // Actions - std::string strComment; - std::string strStatusBar; - std::string strRPCError; - - ADD_SERIALIZE_METHODS; - - template - inline void SerializationOp(Stream& s, Operation ser_action) { - READWRITE(this->nVersion); - READWRITE(nRelayUntil); - READWRITE(nExpiration); - READWRITE(nID); - READWRITE(nCancel); - READWRITE(setCancel); - READWRITE(nMinVer); - READWRITE(nMaxVer); - READWRITE(setSubVer); - READWRITE(nPriority); - - READWRITE(LIMITED_STRING(strComment, 65536)); - READWRITE(LIMITED_STRING(strStatusBar, 256)); - READWRITE(LIMITED_STRING(strRPCError, 256)); - } - - void SetNull(); - - std::string ToString() const; -}; - -/** An alert is a combination of a serialized CUnsignedAlert and a signature. */ -class CAlert : public CUnsignedAlert -{ -public: - std::vector vchMsg; - std::vector vchSig; - - CAlert() - { - SetNull(); - } - - ADD_SERIALIZE_METHODS; - - template - inline void SerializationOp(Stream& s, Operation ser_action) { - READWRITE(vchMsg); - READWRITE(vchSig); - } - - void SetNull(); - bool IsNull() const; - uint256 GetHash() const; - bool IsInEffect() const; - bool Cancels(const CAlert& alert) const; - bool AppliesTo(int nVersion, const std::string& strSubVerIn) const; - bool AppliesToMe() const; - bool RelayTo(CNode* pnode) const; - bool CheckSignature(const std::vector& alertKey) const; - bool ProcessAlert(const std::vector& alertKey, bool fThread = true); // fThread means run -alertnotify in a free-running thread - static void Notify(const std::string& strMessage, bool fThread); - - /* - * Get copy of (active) alert object by hash. Returns a null alert if it is not found. - */ - static CAlert getAlertByHash(const uint256 &hash); -}; - -#endif // HUSH_ALERT_H diff --git a/src/alertkeys.h b/src/alertkeys.h deleted file mode 100644 index 0de5d269e..000000000 --- a/src/alertkeys.h +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2016-2022 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. * - * * - * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * - * the top-level directory of this distribution for the individual copyright * - * holder information and the developer policies on copyright and licensing. * - * * - * Unless otherwise agreed in a custom licensing agreement, no part of the * - * SuperNET software, including this file may be copied, modified, propagated * - * or distributed except according to the terms contained in the LICENSE file * - * * - * Removal or modification of this copyright notice is prohibited. * - * * - ******************************************************************************/ - -#ifndef HUSH_ALERTKEYS_H -#define HUSH_ALERTKEYS_H - -// REMINDER: DO NOT COMMIT YOUR PRIVATE KEYS TO THE GIT REPOSITORY, lulz - -const char* pszPrivKey = "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"; -const char* pszTestNetPrivKey = "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"; - -#endif - diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 6f44af2da..6a7ca1ed1 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -142,7 +142,6 @@ public: pchMessageStart[1] = 0xee; pchMessageStart[2] = 0xe4; pchMessageStart[3] = 0x8d; - vAlertPubKey = ParseHex("038a1bd41a08f38edda51042988022933c5775dfce81f7bae0b32a9179650352ac"); nDefaultPort = 5420; nMinerThreads = 0; nMaxTipAge = 24 * 60 * 60; @@ -280,7 +279,6 @@ public: pchMessageStart[1] = 0x1F; pchMessageStart[2] = 0x7E; pchMessageStart[3] = 0x62; - vAlertPubKey = ParseHex("038a1bd41a08f38edda51042988022933c5775dfce81f7bae0b32a9179650352ac"); nMaxTipAge = 24 * 60 * 60; nPruneAfterHeight = 1000; diff --git a/src/chainparams.h b/src/chainparams.h index 9e2707b31..e32a965ba 100644 --- a/src/chainparams.h +++ b/src/chainparams.h @@ -85,7 +85,6 @@ public: const Consensus::Params& GetConsensus() const { return consensus; } const CMessageHeader::MessageStartChars& MessageStart() const { return pchMessageStart; } - const std::vector& AlertKey() const { return vAlertPubKey; } int GetDefaultPort() const { return nDefaultPort; } const CBlock& GenesisBlock() const { return genesis; } @@ -134,8 +133,6 @@ public: protected: CChainParams() {} - //! Raw pub key bytes for the broadcast alert signing key. - std::vector vAlertPubKey; int nMinerThreads = 0; long nMaxTipAge = 0; int nDefaultPort = 0; diff --git a/src/deprecation.cpp b/src/deprecation.cpp index 3c68fc07e..572502460 100644 --- a/src/deprecation.cpp +++ b/src/deprecation.cpp @@ -19,8 +19,6 @@ ******************************************************************************/ #include "deprecation.h" - -#include "alert.h" #include "clientversion.h" #include "init.h" #include "ui_interface.h" @@ -51,7 +49,6 @@ void EnforceNodeDeprecation(int nHeight, bool forceLogging, bool fThread) { DEPRECATION_HEIGHT) + " " + _("You should upgrade to the latest version of Hush."); LogPrintf("*** %s\n", msg); - CAlert::Notify(msg, fThread); uiInterface.ThreadSafeMessageBox(msg, "", CClientUIInterface::MSG_ERROR); } StartShutdown(); @@ -60,7 +57,6 @@ void EnforceNodeDeprecation(int nHeight, bool forceLogging, bool fThread) { DEPRECATION_HEIGHT) + " " + _("You should upgrade to the latest version of Hush."); LogPrintf("*** %s\n", msg); - CAlert::Notify(msg, fThread); uiInterface.ThreadSafeMessageBox(msg, "", CClientUIInterface::MSG_WARNING); } } diff --git a/src/init.cpp b/src/init.cpp index b4cc62797..6fe9c9299 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -87,7 +87,6 @@ using namespace std; #include "hush_defs.h" static const bool DEFAULT_STRATUM_ENABLE = false; -extern void ThreadSendAlert(); extern bool hush_dailysnapshot(int32_t height); extern int32_t HUSH_LOADINGBLOCKS; extern char SMART_CHAIN_SYMBOL[]; @@ -361,7 +360,6 @@ std::string HelpMessage(HelpMessageMode mode) string strUsage = HelpMessageGroup(_("Options:")); strUsage += HelpMessageOpt("-?", _("This help message")); - strUsage += HelpMessageOpt("-alertnotify=", _("Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)")); strUsage += HelpMessageOpt("-blocknotify=", _("Execute command when the best block changes (%s in cmd is replaced by block hash)")); strUsage += HelpMessageOpt("-checkblocks=", strprintf(_("How many blocks to check at startup (default: %u, 0 = all)"), 288)); strUsage += HelpMessageOpt("-checklevel=", strprintf(_("How thorough the block verification of -checkblocks is (0-4, default: %u)"), 3)); @@ -501,7 +499,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-stopafterblockimport", strprintf("Stop running after importing blocks from disk (default: %u)", 0)); strUsage += HelpMessageOpt("-nuparams=hexBranchId:activationHeight", "Use given activation height for specified network upgrade (regtest-only)"); } - string debugCategories = "addrman, alert, bench, coindb, db, deletetx, estimatefee, http, libevent, lock, mempool, net, tls, partitioncheck, pow, proxy, prune, rand, randomx, reindex, rpc, selectcoins, stratum, tor, zrpc, zrpcunsafe (implies zrpc)"; // Don't translate these + string debugCategories = "addrman, bench, coindb, db, deletetx, estimatefee, http, libevent, lock, mempool, net, tls, partitioncheck, pow, proxy, prune, rand, randomx, reindex, rpc, selectcoins, stratum, tor, zrpc, zrpcunsafe (implies zrpc)"; // Don't translate these strUsage += HelpMessageOpt("-debug=", strprintf(_("Output debugging information (default: %u, supplying is optional)"), 0) + ". " + _("If is not supplied or if = 1, output all debugging information.") + " " + _(" can be:") + " " + debugCategories + "."); strUsage += HelpMessageOpt("-experimentalfeatures", _("Enable use of experimental features")); @@ -1380,8 +1378,6 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) fIsBareMultisigStd = GetBoolArg("-permitbaremultisig", true); nMaxDatacarrierBytes = GetArg("-datacarriersize", nMaxDatacarrierBytes); - fAlerts = GetBoolArg("-alerts", DEFAULT_ALERTS); - // Option to startup with mocktime set (used for regression testing): SetMockTime(GetArg("-mocktime", 0)); // SetMockTime(0) is a no-op @@ -2398,9 +2394,6 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) } #endif - // SENDALERT - threadGroup.create_thread(boost::bind(ThreadSendAlert)); - if(fDebug) fprintf(stderr,"%s end fRequestShutdown=%d\n", __FUNCTION__, !!fRequestShutdown); return !fRequestShutdown; diff --git a/src/main.cpp b/src/main.cpp index 6f39e16ee..c10184702 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -20,7 +20,6 @@ #include "main.h" #include "sodium.h" #include "addrman.h" -#include "alert.h" #include "arith_uint256.h" #include "importcoin.h" #include "chainparams.h" @@ -106,7 +105,6 @@ bool fCheckpointsEnabled = true; bool fCoinbaseEnforcedProtectionEnabled = true; size_t nCoinCacheUsage = 5000 * 300; uint64_t nPruneTarget = 0; -bool fAlerts = DEFAULT_ALERTS; // If the tip is older than this (in seconds), the node is considered to be in initial block download. int64_t nMaxTipAge = DEFAULT_MAX_TIP_AGE; bool ishush3 = strncmp(SMART_CHAIN_SYMBOL, "HUSH3",5) == 0 ? true : false; @@ -2470,9 +2468,9 @@ void CheckForkWarningConditions() { if (!fLargeWorkForkFound && pindexBestForkBase) { - std::string warning = std::string("'Warning: Large-work fork detected, forking after block ") + - pindexBestForkBase->phashBlock->ToString() + std::string("'"); - CAlert::Notify(warning, true); + std::string warning = std::string("'Warning: Large-work fork detected, forking after block ") + pindexBestForkBase->phashBlock->ToString() + std::string("'"); + LogPrintf(warning); + LogPrintf("%s: %s\n", __func__, warning.c_str()); } if (pindexBestForkTip && pindexBestForkBase) { @@ -2480,12 +2478,9 @@ void CheckForkWarningConditions() pindexBestForkBase->GetHeight(), pindexBestForkBase->phashBlock->ToString(), pindexBestForkTip->GetHeight(), pindexBestForkTip->phashBlock->ToString()); fLargeWorkForkFound = true; - } - else - { + } else { std::string warning = std::string("Warning: Found invalid chain at least ~6 blocks longer than our best chain.\nChain state database corruption likely."); - LogPrintf("%s: %s\n", warning.c_str(), __func__); - CAlert::Notify(warning, true); + LogPrintf("%s: %s\n", __func__, warning.c_str()); fLargeWorkInvalidChainFound = true; } } else { @@ -6651,11 +6646,7 @@ void static CheckBlockIndex() assert(nNodes == forward.size()); } -////////////////////////////////////////////////////////////////////////////// -// // CAlert -// - std::string GetWarnings(const std::string& strFor) { int nPriority = 0; @@ -6686,23 +6677,6 @@ std::string GetWarnings(const std::string& strFor) strStatusBar = strRPC = _("Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade."); } - // Alerts - { - LOCK(cs_mapAlerts); - BOOST_FOREACH(PAIRTYPE(const uint256, CAlert)& item, mapAlerts) - { - const CAlert& alert = item.second; - if (alert.AppliesToMe() && alert.nPriority > nPriority) - { - nPriority = alert.nPriority; - strStatusBar = alert.strStatusBar; - if (alert.nPriority >= ALERT_PRIORITY_SAFE_MODE) { - strRPC = alert.strRPCError; - } - } - } - } - if (strFor == "statusbar") return strStatusBar; else if (strFor == "rpc") @@ -6711,18 +6685,7 @@ std::string GetWarnings(const std::string& strFor) return "error"; } - - - - - - - -////////////////////////////////////////////////////////////////////////////// -// // Messages -// - bool static AlreadyHave(const CInv& inv) EXCLUSIVE_LOCKS_REQUIRED(cs_main) { @@ -7702,9 +7665,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, } if (vInv.size() > 0) pfrom->PushMessage("inv", vInv); - } else if (fAlerts && strCommand == "alert") { - // Do not process alert p2p messages and give DoS penalty - Misbehaving(pfrom->GetId(), 10); + } else if (strCommand == "alert") { + // Do not process alert p2p messages + // Misbehaving(pfrom->GetId(), 10); } else if (!(nLocalServices & NODE_BLOOM) && (strCommand == "filterload" || strCommand == "filteradd")) { diff --git a/src/main.h b/src/main.h index 034629dbc..a76ce4333 100644 --- a/src/main.h +++ b/src/main.h @@ -71,10 +71,6 @@ static const unsigned int DEFAULT_BLOCK_MAX_SIZE = 2000000;//MAX_BLOCK_SIZE; static const unsigned int DEFAULT_BLOCK_MIN_SIZE = 0; /** Default for -blockprioritysize, maximum space for zero/low-fee transactions **/ static const unsigned int DEFAULT_BLOCK_PRIORITY_SIZE = DEFAULT_BLOCK_MAX_SIZE / 2; -/** Default for accepting alerts from the P2P network. */ -static const bool DEFAULT_ALERTS = true; -/** Minimum alert priority for enabling safe mode. */ -static const int ALERT_PRIORITY_SAFE_MODE = 4000; /** Maximum reorg length we will accept before we shut down and alert the user. */ static unsigned int MAX_REORG_LENGTH = _COINBASE_MATURITY - 1; /** Maximum number of signature check operations in an IsStandard() P2SH script */ @@ -165,7 +161,6 @@ extern bool fCheckpointsEnabled; extern bool fCoinbaseEnforcedProtectionEnabled; extern size_t nCoinCacheUsage; extern CFeeRate minRelayTxFee; -extern bool fAlerts; extern int64_t nMaxTipAge; /** Best header we've seen so far (used for getheaders queries' starting points). */ diff --git a/src/sendalert.cpp b/src/sendalert.cpp deleted file mode 100644 index 73116c4b8..000000000 --- a/src/sendalert.cpp +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) 2016-2022 The Hush developers -// Copyright (c) 2016 The Zcash developers -// Original code from: https://gist.github.com/laanwj/0e689cfa37b52bcbbb44 -// 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. * - * * - * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * - * the top-level directory of this distribution for the individual copyright * - * holder information and the developer policies on copyright and licensing. * - * * - * Unless otherwise agreed in a custom licensing agreement, no part of the * - * SuperNET software, including this file may be copied, modified, propagated * - * or distributed except according to the terms contained in the LICENSE file * - * * - * Removal or modification of this copyright notice is prohibited. * - * * - ******************************************************************************/ - -/* - -To set up a new alert system ----------------------------- - -Create a new alert key pair: -openssl ecparam -name secp256k1 -genkey -param_enc explicit -outform PEM -out data.pem - -Get the private key in hex: -openssl ec -in data.pem -outform DER | tail -c 279 | xxd -p -c 279 - -Get the public key in hex: -openssl ec -in data.pem -pubout -outform DER | tail -c 65 | xxd -p -c 65 - -Update the public keys found in chainparams.cpp. - - -To send an alert message ------------------------- - -Copy the private keys into alertkeys.h. - -Modify the alert parameters, id and message found in this file. - -Build and run with -sendalert or -printalert. - -./hushd -printtoconsole -sendalert - -One minute after starting up, the alert will be broadcast. It is then -flooded through the network until the nRelayUntil time, and will be -active until nExpiration OR the alert is cancelled. - -If you make a mistake, send another alert with nCancel set to cancel -the bad alert. - -*/ - -// Copyright (c) 2016-2022 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 -#include "main.h" -#include "net.h" -#include "alert.h" -#include "init.h" -#include "util.h" -#include "utiltime.h" -#include "key.h" -#include "clientversion.h" -#include "chainparams.h" -#include "alertkeys.h" - -static const int64_t DAYS = 24 * 60 * 60; - -void ThreadSendAlert() -{ - if (!mapArgs.count("-sendalert") && !mapArgs.count("-printalert")) - return; - - fprintf(stderr,"Sending alerts not supported!\n"); - return; - -} From da5ae526e75430b57867cc5b92a07e2b21cc3b05 Mon Sep 17 00:00:00 2001 From: Duke Date: Sun, 18 Dec 2022 13:51:50 -0800 Subject: [PATCH 219/295] Fix compile issue --- src/main.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index c10184702..58dc7b25e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2469,7 +2469,6 @@ void CheckForkWarningConditions() if (!fLargeWorkForkFound && pindexBestForkBase) { std::string warning = std::string("'Warning: Large-work fork detected, forking after block ") + pindexBestForkBase->phashBlock->ToString() + std::string("'"); - LogPrintf(warning); LogPrintf("%s: %s\n", __func__, warning.c_str()); } if (pindexBestForkTip && pindexBestForkBase) From 512da314a5d3accd506813b5330e3d1c376d5628 Mon Sep 17 00:00:00 2001 From: zanzibar <> Date: Fri, 6 Jan 2023 15:21:08 +0000 Subject: [PATCH 220/295] BIP155 (addrv2) Tor v3 + i2p --- configure.ac | 34 + contrib/seeds/generate-seeds.py | 161 ++-- contrib/seeds/nodes_main.txt | 17 +- contrib/seeds/nodes_test.txt | 10 +- doc/i2p.md | 161 ++++ doc/tor.md | 297 +++++--- qa/rpc-tests/httpbasics.py | 4 +- qa/rpc-tests/p2p-acceptblock.py | 4 +- qa/rpc-tests/proxy_test.py | 22 +- src/Makefile.am | 39 +- src/addrdb.cpp | 122 +++ src/addrdb.h | 90 +++ src/addrman.cpp | 323 +++++--- src/addrman.h | 220 ++++-- src/arith_uint256.cpp | 2 +- src/attributes.h | 20 + src/bitcoin-cli.cpp | 2 +- src/cc/Makefile | 25 +- src/chainparams.cpp | 6 +- src/chainparams.h | 9 +- src/chainparamsseeds.h | 43 +- src/coins.cpp | 3 + src/compat.h | 12 +- src/core_read.cpp | 2 +- src/core_write.cpp | 2 +- src/crypto/common.h | 7 + src/crypto/equihash.h | 2 +- src/crypto/sha3.cpp | 162 ++++ src/crypto/sha3.h | 42 ++ src/gtest/json_test_vectors.h | 2 +- src/gtest/test_deprecation.cpp | 2 +- src/gtest/test_merkletree.cpp | 2 +- src/gtest/test_rpc.cpp | 2 +- src/gtest/test_txid.cpp | 2 +- src/hash.h | 67 +- src/httprpc.cpp | 2 +- src/httpserver.cpp | 57 +- src/hush-tx.cpp | 2 +- src/i2p.cpp | 441 +++++++++++ src/i2p.h | 256 +++++++ src/init.cpp | 77 +- src/key_io.cpp | 2 +- src/main.cpp | 189 +++-- src/main.h | 3 + src/merkleblock.cpp | 2 +- src/metrics.cpp | 2 +- src/net.cpp | 679 +++++++++++++---- src/net.h | 140 +++- src/netaddress.cpp | 1222 +++++++++++++++++++++++++++++++ src/netaddress.h | 534 ++++++++++++++ src/netbase.cpp | 1212 ++++++------------------------ src/netbase.h | 245 ++----- src/netmessagemaker.h | 37 + src/prevector.h | 245 ++++--- src/primitives/block.cpp | 2 +- src/primitives/transaction.cpp | 2 +- src/protocol.cpp | 93 ++- src/protocol.h | 313 +++++++- src/random.cpp | 2 +- src/rest.cpp | 2 +- src/rpc/net.cpp | 65 +- src/rpc/protocol.cpp | 2 +- src/rpc/server.cpp | 2 +- src/script/script.cpp | 2 +- src/script/standard.cpp | 2 +- src/serialize.h | 320 +++++++- src/span.h | 252 +++++++ src/stratum.cpp | 15 +- src/streams.h | 96 ++- src/sync.cpp | 2 +- src/test-hush/test_addrman.cpp | 2 +- src/test-hush/testutils.cpp | 2 +- src/test/base32_tests.cpp | 2 +- src/test/base58_tests.cpp | 2 +- src/test/base64_tests.cpp | 2 +- src/test/bip32_tests.cpp | 2 +- src/test/bloom_tests.cpp | 2 +- src/test/coins_tests.cpp | 2 +- src/test/convertbits_tests.cpp | 2 +- src/test/crypto_tests.cpp | 2 +- src/test/hash_tests.cpp | 2 +- src/test/key_tests.cpp | 2 +- src/test/netbase_tests.cpp | 11 - src/test/rpc_tests.cpp | 2 +- src/test/serialize_tests.cpp | 2 +- src/test/util_tests.cpp | 2 +- src/timedata.cpp | 2 +- src/torcontrol.cpp | 80 +- src/torcontrol.h | 5 +- src/uint256.cpp | 2 +- src/util.cpp | 2 +- src/util/readwritefile.cpp | 47 ++ src/util/readwritefile.h | 29 + src/util/sock.cpp | 328 +++++++++ src/util/sock.h | 184 +++++ src/util/spanparsing.cpp | 68 ++ src/util/spanparsing.h | 50 ++ src/util/strencodings.cpp | 655 +++++++++++++++++ src/util/strencodings.h | 302 ++++++++ src/util/string.cpp | 6 + src/util/string.h | 99 +++ src/utilmoneystr.cpp | 2 +- src/utilstrencodings.cpp | 2 +- src/utiltime.cpp | 28 + src/utiltime.h | 11 + src/wallet/db.cpp | 2 +- src/wallet/wallet.h | 2 +- src/zcash/Note.cpp | 1 + 108 files changed, 8214 insertions(+), 2173 deletions(-) create mode 100644 doc/i2p.md create mode 100644 src/addrdb.cpp create mode 100644 src/addrdb.h create mode 100644 src/attributes.h create mode 100644 src/crypto/sha3.cpp create mode 100644 src/crypto/sha3.h create mode 100644 src/i2p.cpp create mode 100644 src/i2p.h create mode 100644 src/netaddress.cpp create mode 100644 src/netaddress.h create mode 100644 src/netmessagemaker.h create mode 100644 src/span.h create mode 100644 src/util/readwritefile.cpp create mode 100644 src/util/readwritefile.h create mode 100644 src/util/sock.cpp create mode 100644 src/util/sock.h create mode 100644 src/util/spanparsing.cpp create mode 100644 src/util/spanparsing.h create mode 100644 src/util/strencodings.cpp create mode 100644 src/util/strencodings.h create mode 100644 src/util/string.cpp create mode 100644 src/util/string.h diff --git a/configure.ac b/configure.ac index 94f48dd31..b46abbbce 100644 --- a/configure.ac +++ b/configure.ac @@ -221,6 +221,29 @@ if test "x$CXXFLAGS_overridden" = "xno"; then AX_CHECK_COMPILE_FLAG([-Wunused-local-typedef],[CXXFLAGS="$CXXFLAGS -Wno-unused-local-typedef"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wdeprecated-register],[CXXFLAGS="$CXXFLAGS -Wno-deprecated-register"],,[[$CXXFLAG_WERROR]]) fi + +TEMP_CXXFLAGS="$CXXFLAGS" +CXXFLAGS="$CXXFLAGS $SSE42_CXXFLAGS" +AC_MSG_CHECKING(for assembler crc32 support) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include + #if defined(_MSC_VER) + #include + #elif defined(__GNUC__) && defined(__SSE4_2__) + #include + #endif + ]],[[ + uint64_t l = 0; + l = _mm_crc32_u8(l, 0); + l = _mm_crc32_u32(l, 0); + l = _mm_crc32_u64(l, 0); + return l; + ]])], + [ AC_MSG_RESULT(yes); enable_hwcrc32=yes], + [ AC_MSG_RESULT(no)] +) +CXXFLAGS="$TEMP_CXXFLAGS" + CPPFLAGS="$CPPFLAGS -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS" AC_ARG_WITH([utils], @@ -241,6 +264,16 @@ AC_ARG_WITH([daemon], [build_bitcoind=$withval], [build_bitcoind=yes]) +GCC_TARGET=`$CC -dumpmachine 2>&1` +case $GCC_TARGET in + arm*-*-*) + have_arm=true + ;; + aarch64*-*-*) + have_arm=true + ;; +esac + use_pkgconfig=yes case $host in *mingw*) @@ -815,6 +848,7 @@ AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows]) AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet = xyes]) AM_CONDITIONAL([ENABLE_MINING],[test x$enable_mining = xyes]) AM_CONDITIONAL([ENABLE_TESTS],[test x$BUILD_TEST = xyes]) +AM_CONDITIONAL([ARCH_ARM], [test x$have_arm = xtrue]) AM_CONDITIONAL([USE_LCOV],[test x$use_lcov = xyes]) AM_CONDITIONAL([GLIBC_BACK_COMPAT],[test x$use_glibc_compat = xyes]) AM_CONDITIONAL([HARDEN],[test x$use_hardening = xyes]) diff --git a/contrib/seeds/generate-seeds.py b/contrib/seeds/generate-seeds.py index ab9b4c68c..f50114d01 100755 --- a/contrib/seeds/generate-seeds.py +++ b/contrib/seeds/generate-seeds.py @@ -1,5 +1,6 @@ -#!/usr/bin/env python -# Copyright (c) 2014 Wladimir J. van der Laan +#!/usr/bin/env python3 +# Copyright (c) 2016-2022 The Hush developers +# Copyright (c) 2014-2021 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html ''' @@ -11,45 +12,63 @@ argument: nodes_main.txt nodes_test.txt -These files must consist of lines in the format +These files must consist of lines in the format - : - [] + []: + [] + .onion: .onion - 0xDDBBCCAA (IPv4 little-endian old pnSeeds format) + .b32.i2p: + .b32.i2p The output will be two data structures with the peers in binary format: - static SeedSpec6 pnSeed6_main[]={ - ... - } - static SeedSpec6 pnSeed6_test[]={ + static const uint8_t chainparams_seed_{main,test}[]={ ... } -These should be pasted into `src/chainparamsseeds.h`. +To update the generated code : + +./contrib/seeds/generate-seeds.py contrib/seeds > src/chainparamsseeds.h + ''' -from __future__ import print_function, division + from base64 import b32decode -from binascii import a2b_hex -import sys, os +from enum import Enum +import struct +import sys +import os import re -# ipv4 in ipv6 prefix -pchIPv4 = bytearray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff]) -# tor-specific ipv6 prefix -pchOnionCat = bytearray([0xFD,0x87,0xD8,0x7E,0xEB,0x43]) +class BIP155Network(Enum): + IPV4 = 1 + IPV6 = 2 + TORV2 = 3 # no longer supported + TORV3 = 4 + I2P = 5 + CJDNS = 6 -def name_to_ipv6(addr): - if len(addr)>6 and addr.endswith('.onion'): +def name_to_bip155(addr): + '''Convert address string to BIP155 (networkID, addr) tuple.''' + if addr.endswith('.onion'): vchAddr = b32decode(addr[0:-6], True) - if len(vchAddr) != 16-len(pchOnionCat): - raise ValueError('Invalid onion %s' % s) - return pchOnionCat + vchAddr + if len(vchAddr) == 35: + assert vchAddr[34] == 3 + return (BIP155Network.TORV3, vchAddr[:32]) + elif len(vchAddr) == 10: + return (BIP155Network.TORV2, vchAddr) + else: + raise ValueError('Invalid onion %s' % vchAddr) + elif addr.endswith('.b32.i2p'): + vchAddr = b32decode(addr[0:-8] + '====', True) + if len(vchAddr) == 32: + return (BIP155Network.I2P, vchAddr) + else: + raise ValueError(f'Invalid I2P {vchAddr}') elif '.' in addr: # IPv4 - return pchIPv4 + bytearray((int(x) for x in addr.split('.'))) + return (BIP155Network.IPV4, bytes((int(x) for x in addr.split('.')))) elif ':' in addr: # IPv6 sub = [[], []] # prefix, suffix x = 0 @@ -66,14 +85,13 @@ def name_to_ipv6(addr): sub[x].append(val & 0xff) nullbytes = 16 - len(sub[0]) - len(sub[1]) assert((x == 0 and nullbytes == 0) or (x == 1 and nullbytes > 0)) - return bytearray(sub[0] + ([0] * nullbytes) + sub[1]) - elif addr.startswith('0x'): # IPv4-in-little-endian - return pchIPv4 + bytearray(reversed(a2b_hex(addr[2:]))) + return (BIP155Network.IPV6, bytes(sub[0] + ([0] * nullbytes) + sub[1])) else: raise ValueError('Could not parse address %s' % addr) -def parse_spec(s, defaultport): - match = re.match('\[([0-9a-fA-F:]+)\](?::([0-9]+))?$', s) +def parse_spec(s): + '''Convert endpoint string to BIP155 (networkID, addr, port) tuple.''' + match = re.match(r'\[([0-9a-fA-F:]+)\](?::([0-9]+))?$', s) if match: # ipv6 host = match.group(1) port = match.group(2) @@ -84,17 +102,42 @@ def parse_spec(s, defaultport): (host,_,port) = s.partition(':') if not port: - port = defaultport + port = 0 else: port = int(port) - host = name_to_ipv6(host) + host = name_to_bip155(host) - return (host,port) + if host[0] == BIP155Network.TORV2: + return None # TORV2 is no longer supported, so we ignore it + else: + return host + (port, ) -def process_nodes(g, f, structname, defaultport): - g.write('static SeedSpec6 %s[] = {\n' % structname) - first = True +def ser_compact_size(l): + r = b"" + if l < 253: + r = struct.pack("B", l) + elif l < 0x10000: + r = struct.pack("H', spec[2]) + return r + +def process_nodes(g, f, structname): + g.write('static const uint8_t %s[] = {\n' % structname) for line in f: comment = line.find('#') if comment != -1: @@ -102,37 +145,37 @@ def process_nodes(g, f, structname, defaultport): line = line.strip() if not line: continue - if not first: - g.write(',\n') - first = False - (host,port) = parse_spec(line, defaultport) - hoststr = ','.join(('0x%02x' % b) for b in host) - g.write(' {{%s}, %i}' % (hoststr, port)) - g.write('\n};\n') + spec = parse_spec(line) + if spec is None: # ignore this entry (e.g. no longer supported addresses like TORV2) + continue + blob = bip155_serialize(spec) + hoststr = ','.join(('0x%02x' % b) for b in blob) + g.write(f' {hoststr}, // {line}\n') + g.write('};\n') def main(): if len(sys.argv)<2: print(('Usage: %s ' % sys.argv[0]), file=sys.stderr) - exit(1) + sys.exit(1) g = sys.stdout indir = sys.argv[1] - g.write('#ifndef BITCOIN_CHAINPARAMSSEEDS_H\n') - g.write('#define BITCOIN_CHAINPARAMSSEEDS_H\n') - g.write('/**\n') - g.write(' * List of fixed seed nodes for the bitcoin network\n') - g.write(' * AUTOGENERATED by contrib/seeds/generate-seeds.py\n') - g.write(' *\n') - g.write(' * Each line contains a 16-byte IPv6 address and a port.\n') - g.write(' * IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly.\n') - g.write(' */\n') - with open(os.path.join(indir,'nodes_main.txt'),'r') as f: - process_nodes(g, f, 'pnSeed6_main', 8233) + g.write('// Copyright (c) 2016-2022 The Hush developers\n') + g.write('// Distributed under the GPLv3 software license, see the accompanying\n') + g.write('// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html\n') + g.write('// THIS FILE IS AUTOGENERATED, DO NOT MODIFY DIRECTLY\n') + g.write('// Instead, run: ./contrib/seeds/generate-seeds.py contrib/seeds\n') + g.write('#ifndef HUSH_CHAINPARAMSSEEDS_H\n') + g.write('#define HUSH_CHAINPARAMSSEEDS_H\n') + g.write('// List of fixed seed nodes for the Hush network\n') + g.write('// Each line contains a BIP155 serialized address.\n') + g.write('//\n') + with open(os.path.join(indir,'nodes_main.txt'), 'r', encoding="utf8") as f: + process_nodes(g, f, 'chainparams_seed_main') g.write('\n') - with open(os.path.join(indir,'nodes_test.txt'),'r') as f: - process_nodes(g, f, 'pnSeed6_test', 18233) - g.write('#endif // BITCOIN_CHAINPARAMSSEEDS_H\n') - + with open(os.path.join(indir,'nodes_test.txt'), 'r', encoding="utf8") as f: + process_nodes(g, f, 'chainparams_seed_test') + g.write('#endif // HUSH_CHAINPARAMSSEEDS_H\n') + if __name__ == '__main__': main() - diff --git a/contrib/seeds/nodes_main.txt b/contrib/seeds/nodes_main.txt index a6e8be207..e9e68c259 100644 --- a/contrib/seeds/nodes_main.txt +++ b/contrib/seeds/nodes_main.txt @@ -1,6 +1,11 @@ -185.25.48.236:27485 -185.25.48.236:27487 -185.64.105.111:27485 -185.64.105.111:27487 -185.25.48.72:27485 -185.25.48.72:27487 +# node1.hush.land +185.241.61.43 + +# node2.hush.is +137.74.4.198 + +# lite.hushpool.is +149.28.102.219 + +# todo: torv3 +# todo: i2p diff --git a/contrib/seeds/nodes_test.txt b/contrib/seeds/nodes_test.txt index 98365ee50..be9218b99 100644 --- a/contrib/seeds/nodes_test.txt +++ b/contrib/seeds/nodes_test.txt @@ -1,11 +1,5 @@ # List of fixed seed nodes for testnet +# note: File must be non-empty to compile +1.2.3.4 # Onion nodes -thfsmmn2jbitcoin.onion -it2pj4f7657g3rhi.onion -nkf5e6b7pl4jfd4a.onion -4zhkir2ofl7orfom.onion -t6xj6wilh4ytvcs7.onion -i6y6ivorwakd7nw3.onion -ubqj4rsu3nqtxmtp.onion - diff --git a/doc/i2p.md b/doc/i2p.md new file mode 100644 index 000000000..e01573f9d --- /dev/null +++ b/doc/i2p.md @@ -0,0 +1,161 @@ +# I2P support in Hush + +It is possible to run a Hush or HSC full node as an +[I2P (Invisible Internet Project)](https://en.wikipedia.org/wiki/I2P) +service and connect to such services. + +This [glossary](https://geti2p.net/en/about/glossary) may be useful to get +started with I2P terminology. + +## Run with an I2P router (proxy) + +A running I2P router (proxy) with [SAM](https://geti2p.net/en/docs/api/samv3) +enabled is required. Options include: + +- [i2prouter (I2P Router)](https://geti2p.net), the official implementation in + Java +- [i2pd (I2P Daemon)](https://github.com/PurpleI2P/i2pd) + ([documentation](https://i2pd.readthedocs.io/en/latest)), a lighter + alternative in C++ (successfully tested with version 2.23 and up; version 2.36 + or later recommended) +- [i2p-zero](https://github.com/i2p-zero/i2p-zero) +- [other alternatives](https://en.wikipedia.org/wiki/I2P#Routers) + +Note the IP address and port the SAM proxy is listening to; usually, it is +`127.0.0.1:7656`. + +Once an I2P router with SAM enabled is up and running, use the following +configuration options: + +``` +-i2psam= + I2P SAM proxy to reach I2P peers and accept I2P connections (default: + none) + +-i2pacceptincoming + If set and -i2psam is also set then incoming I2P connections are + accepted via the SAM proxy. If this is not set but -i2psam is set + then only outgoing connections will be made to the I2P network. + Ignored if -i2psam is not set. Listening for incoming I2P + connections is done through the SAM proxy, not by binding to a + local address and port (default: 1) +``` + +In a typical situation, this suffices: + +``` +hushd -i2psam=127.0.0.1:7656 +``` + +The first time hushd connects to the I2P router, if +`-i2pacceptincoming=1`, then it will automatically generate a persistent I2P +address and its corresponding private key. The private key will be saved in a +file named `i2p_private_key` in the Hush data directory. The persistent +I2P address is used for accepting incoming connections and for making outgoing +connections if `-i2pacceptincoming=1`. If `-i2pacceptincoming=0` then only +outbound I2P connections are made and a different transient I2P address is used +for each connection to improve privacy. + +## Persistent vs transient I2P addresses + +In I2P connections, the connection receiver sees the I2P address of the +connection initiator. This is unlike the Tor network where the recipient does +not know who is connecting to them and can't tell if two connections are from +the same peer or not. + +If an I2P node is not accepting incoming connections, then Hush uses +random, one-time, transient I2P addresses for itself for outbound connections +to make it harder to discriminate, fingerprint or analyze it based on its I2P +address. + +## Additional configuration options related to I2P + +``` +-debug=i2p +``` + +Set the `debug=i2p` config logging option to see additional information in the +debug log about your I2P configuration and connections. Run `hush-cli help +logging` for more information. + +``` +-onlynet=i2p +``` + +Make automatic outbound connections only to I2P addresses. Inbound and manual +connections are not affected by this option. It can be specified multiple times +to allow multiple networks, e.g. onlynet=onion, onlynet=i2p. + +I2P support was added to Hush in version 3.9.3 and there may be fewer I2P +peers than Tor or IP ones. Therefore, using I2P alone without other networks may +make a node more susceptible to [Sybil +attacks](https://en.bitcoin.it/wiki/Weaknesses#Sybil_attack). You can use +`hush-cli -addrinfo` to see the number of I2P addresses known to your node. + +Another consideration with `onlynet=i2p` is that the initial blocks download +phase when syncing up a new node can be very slow. This phase can be sped up by +using other networks, for instance `onlynet=onion`, at the same time. + +In general, a node can be run with both onion and I2P hidden services (or +any/all of IPv4/IPv6/onion/I2P/CJDNS), which can provide a potential fallback if +one of the networks has issues. + +## I2P-related information + +There are several ways to see your I2P address if accepting +incoming I2P connections (`-i2pacceptincoming`): +- in the "Local addresses" output of CLI `-netinfo` +- in the "localaddresses" output of RPC `getnetworkinfo` +- in the debug log (grep for `AddLocal`; the I2P address ends in `.b32.i2p`) + +To see which I2P peers your node is connected to, use `hush-cli -netinfo 4` +or the `getpeerinfo` RPC (e.g. `hush-cli getpeerinfo`). + +To see which I2P addresses your node knows, use the `getnodeaddresses 0 i2p` +RPC. + +## Compatibility + +Hush uses the [SAM v3.1](https://geti2p.net/en/docs/api/samv3) protocol +to connect to the I2P network. Any I2P router that supports it can be used. + +## Ports in I2P and Hush + +Hush uses the [SAM v3.1](https://geti2p.net/en/docs/api/samv3) +protocol. One particularity of SAM v3.1 is that it does not support ports, +unlike newer versions of SAM (v3.2 and up) that do support them and default the +port numbers to 0. From the point of view of peers that use newer versions of +SAM or other protocols that support ports, a SAM v3.1 peer is connecting to them +on port 0, from source port 0. + +To allow future upgrades to newer versions of SAM, Hush sets its +listening port to 0 when listening for incoming I2P connections and advertises +its own I2P address with port 0. Furthermore, it will not attempt to connect to +I2P addresses with a non-zero port number because with SAM v3.1 the destination +port (`TO_PORT`) is always set to 0 and is not in the control of Hush. + +## Bandwidth + +I2P routers may route a large amount of general network traffic with their +default settings. Check your router's configuration to limit the amount of this +traffic relayed, if desired. + +With `i2pd`, the amount of bandwidth being shared with the wider network can be +adjusted with the `bandwidth`, `share` and `transittunnels` options in your +`i2pd.conf` file. For example, to limit total I2P traffic to 256KB/s and share +50% of this limit for a maximum of 20 transit tunnels: + +``` +bandwidth = 256 +share = 50 + +[limits] +transittunnels = 20 +``` + +If you prefer not to relay any public I2P traffic and only permit I2P traffic +from programs which are connecting via the SAM proxy, e.g. Hush, you +can set the `notransit` option to `true`. + +Similar bandwidth configuration options for the Java I2P router can be found in +`http://127.0.0.1:7657/config` under the "Bandwidth" tab. diff --git a/doc/tor.md b/doc/tor.md index c00db2fbd..fe0608888 100644 --- a/doc/tor.md +++ b/doc/tor.md @@ -1,154 +1,225 @@ -# Warning +# Tor - Do not assume Tor support works perfectly in Hush; better Tor support is currently being worked on. - -# Hush + Tor - -It is possible to run Hush as a Tor hidden service, and connect to such services. +It is possible to run Hush as a Tor onion service, and connect to such services. The following directions assume you have a Tor proxy running on port 9050. Many distributions default to having a SOCKS proxy listening on port 9050, but others may not. In particular, the Tor Browser Bundle defaults to listening on port 9150. See [Tor Project FAQ:TBBSocksPort](https://www.torproject.org/docs/faq.html.en#TBBSocksPort) for how to properly configure Tor. +## Compatibility -1. Run Hush behind a Tor proxy -------------------------------- +- Starting with version 3.9.3, Hush only supports Tor version 3 hidden + services (Tor v3). Tor v2 addresses are ignored by Hush and neither + relayed nor stored. -The first step is running Hush behind a Tor proxy. This will already make all -outgoing connections be anonymized, but more is possible. +- Tor removed v2 support beginning with version 0.4.6. - -proxy=ip:port Set the proxy server. If SOCKS5 is selected (default), this proxy - server will be used to try to reach .onion addresses as well. +## How to see information about your Tor configuration via Hush - -onion=ip:port Set the proxy server to use for Tor hidden services. You do not - need to set this if it's the same as -proxy. You can use -noonion - to explicitly disable access to hidden service. +There are several ways to see your local onion address in Hush: +- in the "Local addresses" output of CLI `-netinfo` +- in the "localaddresses" output of RPC `getnetworkinfo` +- in the debug log (grep for "AddLocal"; the Tor address ends in `.onion`) - -listen When using -proxy, listening is disabled by default. If you want - to run a hidden service (see next section), you'll need to enable - it explicitly. +You may set the `-debug=tor` config logging option to have additional +information in the debug log about your Tor configuration. - -connect=X When behind a Tor proxy, you can specify .onion addresses instead - -addnode=X of IP addresses or hostnames in these parameters. It requires - -seednode=X SOCKS5. In Tor mode, such addresses can also be exchanged with - other P2P nodes. +CLI `-addrinfo` returns the number of addresses known to your node per +network. This can be useful to see how many onion peers your node knows, +e.g. for `-onlynet=onion`. + +To fetch a number of onion addresses that your node knows, for example seven +addresses, use the `getnodeaddresses 7 onion` RPC. + +## 1. Run Hush behind a Tor proxy + +The first step is running Hush behind a Tor proxy. This will already anonymize all +outgoing connections, but more is possible. + + -proxy=ip:port Set the proxy server. If SOCKS5 is selected (default), this proxy + server will be used to try to reach .onion addresses as well. + You need to use -noonion or -onion=0 to explicitly disable + outbound access to onion services. + + -onion=ip:port Set the proxy server to use for Tor onion services. You do not + need to set this if it's the same as -proxy. You can use -onion=0 + to explicitly disable access to onion services. + ------------------------------------------------------------------ + Note: Only the -proxy option sets the proxy for DNS requests; + with -onion they will not route over Tor, so use -proxy if you + have privacy concerns. + ------------------------------------------------------------------ + + -listen When using -proxy, listening is disabled by default. If you want + to manually configure an onion service (see section 3), you'll + need to enable it explicitly. + + -connect=X When behind a Tor proxy, you can specify .onion addresses instead + -addnode=X of IP addresses or hostnames in these parameters. It requires + -seednode=X SOCKS5. In Tor mode, such addresses can also be exchanged with + other P2P nodes. + + -onlynet=onion Make automatic outbound connections only to .onion addresses. + Inbound and manual connections are not affected by this option. + It can be specified multiple times to allow multiple networks, + e.g. onlynet=onion, onlynet=i2p, onlynet=cjdns. In a typical situation, this suffices to run behind a Tor proxy: - ./hushd -proxy=127.0.0.1:9050 + ./hushd -proxy=127.0.0.1:9050 -If using the Tor Browser Bundle: +## 2. Automatically create a Hush onion service - ./hushd -proxy=127.0.0.1:9150 +Hush makes use of Tor's control socket API to create and destroy +ephemeral onion services programmatically. This means that if Tor is running and +proper authentication has been configured, Hush automatically creates an +onion service to listen on. The goal is to increase the number of available +onion nodes. + +This feature is enabled by default if Hush is listening (`-listen`) and +it requires a Tor connection to work. It can be explicitly disabled with +`-listenonion=0`. If it is not disabled, it can be configured using the +`-torcontrol` and `-torpassword` settings. + +To see verbose Tor information in the hushd debug log, pass `-debug=tor`. + +### Control Port + +You may need to set up the Tor Control Port. On Linux distributions there may be +some or all of the following settings in `/etc/tor/torrc`, generally commented +out by default (if not, add them): + +``` +ControlPort 9051 +CookieAuthentication 1 +CookieAuthFileGroupReadable 1 +``` + +Add or uncomment those, save, and restart Tor (usually `systemctl restart tor` +or `sudo systemctl restart tor` on most systemd-based systems, including recent +Debian and Ubuntu, or just restart the computer). + +On some systems (such as Arch Linux), you may also need to add the following +line: + +``` +DataDirectoryGroupReadable 1 +``` + +### Authentication + +Connecting to Tor's control socket API requires one of two authentication +methods to be configured: cookie authentication or hushd's `-torpassword` +configuration option. + +#### Cookie authentication + +For cookie authentication, the user running hushd must have read access to +the `CookieAuthFile` specified in the Tor configuration. In some cases this is +preconfigured and the creation of an onion service is automatic. Don't forget to +use the `-debug=tor` hushd configuration option to enable Tor debug logging. + +If a permissions problem is seen in the debug log, e.g. `tor: Authentication +cookie /run/tor/control.authcookie could not be opened (check permissions)`, it +can be resolved by adding both the user running Tor and the user running +hushd to the same Tor group and setting permissions appropriately. + +On Debian-derived systems, the Tor group will likely be `debian-tor` and one way +to verify could be to list the groups and grep for a "tor" group name: + +``` +getent group | cut -d: -f1 | grep -i tor +``` + +You can also check the group of the cookie file. On most Linux systems, the Tor +auth cookie will usually be `/run/tor/control.authcookie`: + +``` +TORGROUP=$(stat -c '%G' /run/tor/control.authcookie) +``` + +Once you have determined the `${TORGROUP}` and selected the `${USER}` that will +run hushd, run this as root: + +``` +usermod -a -G ${TORGROUP} ${USER} +``` + +Then restart the computer (or log out) and log in as the `${USER}` that will run +hushd. + +#### `torpassword` authentication + +For the `-torpassword=password` option, the password is the clear text form that +was used when generating the hashed password for the `HashedControlPassword` +option in the Tor configuration file. + +The hashed password can be obtained with the command `tor --hash-password +password` (refer to the [Tor Dev +Manual](https://2019.www.torproject.org/docs/tor-manual.html.en) for more +details). +## 3. Manually create a Hush onion service -2. Run a Hush hidden server ----------------------------- +You can also manually configure your node to be reachable from the Tor network. +Add these lines to your `/etc/tor/torrc` (or equivalent config file): -If you configure your Tor system accordingly, it is possible to make your node also -reachable from the Tor network. Add these lines to your /etc/tor/torrc (or equivalent -config file): + HiddenServiceDir /var/lib/tor/hush-service/ + HiddenServicePort 18030 127.0.0.1:18032 - HiddenServiceDir /var/lib/tor/hush-service/ - HiddenServicePort 18030 127.0.0.1:18030 +The directory can be different of course, but virtual port numbers should be equal to +your hushd's P2P listen port (18030 by default), and target addresses and ports +should be equal to binding address and port for inbound Tor connections (127.0.0.1:18032 by default). -The directory can be different of course, but (both) port numbers should be equal to -your hushd's P2P listen port (18030 by default). + -externalip=X You can tell hush about its publicly reachable addresses using + this option, and this can be an onion address. Given the above + configuration, you can find your onion address in + /var/lib/tor/hush-service/hostname. For connections + coming from unroutable addresses (such as 127.0.0.1, where the + Tor proxy typically runs), onion addresses are given + preference for your node to advertise itself with. - -externalip=X You can tell Hush about its publicly reachable address using - this option, and this can be a .onion address. Given the above - configuration, you can find your onion address in - /var/lib/tor/hush-service/hostname. Onion addresses are given - preference for your node to advertize itself with, for connections - coming from unroutable addresses (such as 127.0.0.1, where the - Tor proxy typically runs). + You can set multiple local addresses with -externalip. The + one that will be rumoured to a particular peer is the most + compatible one and also using heuristics, e.g. the address + with the most incoming connections, etc. - -listen You'll need to enable listening for incoming connections, as this - is off by default behind a proxy. + -listen You'll need to enable listening for incoming connections, as this + is off by default behind a proxy. - -discover When -externalip is specified, no attempt is made to discover local - IPv4 or IPv6 addresses. If you want to run a dual stack, reachable - from both Tor and IPv4 (or IPv6), you'll need to either pass your - other addresses using -externalip, or explicitly enable -discover. - Note that both addresses of a dual-stack system may be easily - linkable using traffic analysis. + -discover When -externalip is specified, no attempt is made to discover local + IPv4 or IPv6 addresses. If you want to run a dual stack, reachable + from both Tor and IPv4 (or IPv6), you'll need to either pass your + other addresses using -externalip, or explicitly enable -discover. + Note that both addresses of a dual-stack system may be easily + linkable using traffic analysis. In a typical situation, where you're only reachable via Tor, this should suffice: - ./hushd -proxy=127.0.0.1:9050 -externalip=hushc0de123.onion -listen + ./hushd -proxy=127.0.0.1:9050 -externalip=7zvj7a2imdgkdbg4f2dryd5rgtrn7upivr5eeij4cicjh65pooxeshid.onion -listen -(obviously, replace the Onion address with your own). Currently only v2 HS's are supported. -It should be noted that you still listen on all devices and another node could establish a clearnet connection, when knowing +(obviously, replace the .onion address with your own). It should be noted that you still +listen on all devices and another node could establish a clearnet connection, when knowing your address. To mitigate this, additionally bind the address of your Tor proxy: - ./hushd ... -bind=127.0.0.1 + ./hushd ... -bind=127.0.0.1 If you don't care too much about hiding your node, and want to be reachable on IPv4 as well, use `discover` instead: - ./hushd ... -discover + ./hushd ... -discover -and open port 18030 on your firewall. +and open port 18030 on your firewall (or use port mapping, i.e., `-upnp` or `-natpmp`). -If you only want to use Tor to reach onion addresses, but not use it as a proxy +If you only want to use Tor to reach .onion addresses, but not use it as a proxy for normal IPv4/IPv6 communication, use: - ./hushd -onion=127.0.0.1:9050 -externalip=hushc0de123.onion -discover + ./hushd -onion=127.0.0.1:9050 -externalip=7zvj7a2imdgkdbg4f2dryd5rgtrn7upivr5eeij4cicjh65pooxeshid.onion -discover +## 4. Privacy recommendations -3. Automatically listen on Tor --------------------------------- - -Starting with Tor version 0.2.7.1 it is possible, through Tor's control socket -API, to create and destroy 'ephemeral' hidden services programmatically. -Hush has been updated to make use of this. - -This means that if Tor is running (and proper authentication has been configured), -Hush automatically creates a hidden service to listen on. Hush will also use Tor -automatically to connect to other .onion nodes if the control socket can be -successfully opened. This will positively affect the number of available .onion -nodes and their usage. - -This new feature is enabled by default if Hush is listening (`-listen`), and -requires a Tor connection to work. It can be explicitly disabled with `-listenonion=0` -and, if not disabled, configured using the `-torcontrol` and `-torpassword` settings. -To show verbose debugging information, pass `-debug=tor`. - -Connecting to Tor's control socket API requires one of two authentication methods to be -configured. For cookie authentication the user running hushd must have write access -to the `CookieAuthFile` specified in Tor configuration. In some cases this is -preconfigured and the creation of a hidden service is automatic. If permission problems -are seen with `-debug=tor` they can be resolved by adding both the user running tor and -the user running hushd to the same group and setting permissions appropriately. On -Debian-based systems the user running hushd can be added to the debian-tor group, -which has the appropriate permissions. An alternative authentication method is the use -of the `-torpassword` flag and a `hash-password` which can be enabled and specified in -Tor configuration. - - -4. Connect to a Hush hidden server ------------------------------------ - -To test your set-up, you might want to try connecting via Tor on a different computer to just a -a single Hush hidden server. Launch hushd as follows: - - ./hushd -onion=127.0.0.1:9050 -connect=fuckzookoie6wxgio.onion - -Now use hush-cli to verify there is only a single peer connection. - - hush-cli getpeerinfo - - [ - { - "id" : 1, - "addr" : "zcashhoneypot.onion:18030", - ... - "version" : 1987420, - "subver" : "/GoldenSandtrout:3.6.0/", - ... - } - ] - -To connect to multiple Tor nodes, use: - - ./hushd -onion=127.0.0.1:9050 -addnode=hushbeef123.onion -dnsseed=0 -onlynet=onion +- Do not add anything but Hush ports to the onion service created in section 3. + If you run a web service too, create a new onion service for that. + Otherwise it is trivial to link them, which may reduce privacy. Onion + services created automatically (as in section 2) always have only one port + open. diff --git a/qa/rpc-tests/httpbasics.py b/qa/rpc-tests/httpbasics.py index ff5544a2c..ec5393fe1 100755 --- a/qa/rpc-tests/httpbasics.py +++ b/qa/rpc-tests/httpbasics.py @@ -4,9 +4,7 @@ # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html -# # Test rpc http basics -# from test_framework.test_framework import BitcoinTestFramework from test_framework.util import assert_equal, start_nodes @@ -97,7 +95,7 @@ class HTTPBasicsTest (BitcoinTestFramework): conn.request('POST', '/', '{"method": "getbestblockhash"}', headers) out1 = conn.getresponse().read() assert_equal('"error":null' in out1, True) - assert_equal(conn.sock!=None, True) # connection must be closed because bitcoind should use keep-alive by default + assert_equal(conn.sock!=None, True) # connection must be closed because hushd should use keep-alive by default if __name__ == '__main__': HTTPBasicsTest().main() diff --git a/qa/rpc-tests/p2p-acceptblock.py b/qa/rpc-tests/p2p-acceptblock.py index 4dccdfae5..af28eecfc 100755 --- a/qa/rpc-tests/p2p-acceptblock.py +++ b/qa/rpc-tests/p2p-acceptblock.py @@ -116,8 +116,8 @@ class TestNode(NodeConnCB): class AcceptBlockTest(BitcoinTestFramework): def add_options(self, parser): parser.add_option("--testbinary", dest="testbinary", - default=os.getenv("BITCOIND", "bitcoind"), - help="bitcoind binary to test") + default=os.getenv("BITCOIND", "hushd"), + help="hushd binary to test") def setup_chain(self): initialize_chain_clean(self.options.tmpdir, 2) diff --git a/qa/rpc-tests/proxy_test.py b/qa/rpc-tests/proxy_test.py index 1a200db56..eb69e6bae 100755 --- a/qa/rpc-tests/proxy_test.py +++ b/qa/rpc-tests/proxy_test.py @@ -13,10 +13,10 @@ import os ''' Test plan: -- Start bitcoind's with different proxy configurations +- Start hushd's with different proxy configurations - Use addnode to initiate connections - Verify that proxies are connected to, and the right connection command is given -- Proxy configurations to test on bitcoind side: +- Proxy configurations to test on hushd side: - `-proxy` (proxy everything) - `-onion` (proxy just onions) - `-proxyrandomize` Circuit randomization @@ -26,8 +26,8 @@ Test plan: - proxy on IPv6 - Create various proxies (as threads) -- Create bitcoinds that connect to them -- Manipulate the bitcoinds using addnode (onetry) an observe effects +- Create hushds that connect to them +- Manipulate the hushds using addnode (onetry) an observe effects addnode connect to IPv4 addnode connect to IPv6 @@ -78,7 +78,7 @@ class ProxyTest(BitcoinTestFramework): node.addnode("15.61.23.23:1234", "onetry") cmd = proxies[0].queue.get() assert(isinstance(cmd, Socks5Command)) - # Note: bitcoind's SOCKS5 implementation only sends atyp DOMAINNAME, even if connecting directly to IPv4/IPv6 + # Note: hushd's SOCKS5 implementation only sends atyp DOMAINNAME, even if connecting directly to IPv4/IPv6 assert_equal(cmd.atyp, AddressType.DOMAINNAME) assert_equal(cmd.addr, "15.61.23.23") assert_equal(cmd.port, 1234) @@ -91,7 +91,7 @@ class ProxyTest(BitcoinTestFramework): node.addnode("[1233:3432:2434:2343:3234:2345:6546:4534]:5443", "onetry") cmd = proxies[1].queue.get() assert(isinstance(cmd, Socks5Command)) - # Note: bitcoind's SOCKS5 implementation only sends atyp DOMAINNAME, even if connecting directly to IPv4/IPv6 + # Note: hushd's SOCKS5 implementation only sends atyp DOMAINNAME, even if connecting directly to IPv4/IPv6 assert_equal(cmd.atyp, AddressType.DOMAINNAME) assert_equal(cmd.addr, "1233:3432:2434:2343:3234:2345:6546:4534") assert_equal(cmd.port, 5443) @@ -102,24 +102,24 @@ class ProxyTest(BitcoinTestFramework): if test_onion: # Test: outgoing onion connection through node - node.addnode("bitcoinostk4e4re.onion:8333", "onetry") + node.addnode("hushostk4e4re.onion:18030", "onetry") cmd = proxies[2].queue.get() assert(isinstance(cmd, Socks5Command)) assert_equal(cmd.atyp, AddressType.DOMAINNAME) - assert_equal(cmd.addr, "bitcoinostk4e4re.onion") - assert_equal(cmd.port, 8333) + assert_equal(cmd.addr, "hushostk4e4re.onion") + assert_equal(cmd.port, 18030) if not auth: assert_equal(cmd.username, None) assert_equal(cmd.password, None) rv.append(cmd) # Test: outgoing DNS name connection through node - node.addnode("node.noumenon:8333", "onetry") + node.addnode("node.noumenon:18030", "onetry") cmd = proxies[3].queue.get() assert(isinstance(cmd, Socks5Command)) assert_equal(cmd.atyp, AddressType.DOMAINNAME) assert_equal(cmd.addr, "node.noumenon") - assert_equal(cmd.port, 8333) + assert_equal(cmd.port, 18030) if not auth: assert_equal(cmd.username, None) assert_equal(cmd.password, None) diff --git a/src/Makefile.am b/src/Makefile.am index 684e1a611..70f148385 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -9,6 +9,12 @@ AM_CXXFLAGS = $(SAN_CXXFLAGS) $(HARDENED_CXXFLAGS) $(ERROR_CXXFLAGS) AM_CPPFLAGS = $(HARDENED_CPPFLAGS) EXTRA_LIBRARIES = +if ARCH_ARM +PLATFORM_VARIANT = armv8.1-a+crypto +else +PLATFORM_VARIANT = x86-64 +endif + if EMBEDDED_LEVELDB LEVELDB_CPPFLAGS += -I$(srcdir)/leveldb/include LEVELDB_CPPFLAGS += -I$(srcdir)/leveldb/helpers/memenv @@ -28,6 +34,7 @@ BITCOIN_CONFIG_INCLUDES=-I$(builddir)/config BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BDB_CPPFLAGS) $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) $(CRYPTO_CFLAGS) $(SSL_CFLAGS) BITCOIN_INCLUDES += -I$(srcdir)/secp256k1/include +BITCOIN_INCLUDES += -I$(srcdir)/cc/includes BITCOIN_INCLUDES += -I$(srcdir)/cryptoconditions/include BITCOIN_INCLUDES += -I$(srcdir)/cryptoconditions/src BITCOIN_INCLUDES += -I$(srcdir)/cryptoconditions/src/asn @@ -63,13 +70,13 @@ LIBBITCOIN_WALLET=libbitcoin_wallet.a endif $(LIBSECP256K1): $(wildcard secp256k1/src/*) $(wildcard secp256k1/include/*) - $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F) OPTFLAGS="-O2 -g " + $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F) OPTFLAGS="-O2 -march=$(PLATFORM_VARIANT) -g " $(LIBUNIVALUE): $(wildcard univalue/lib/*) - $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F) OPTFLAGS="-O2 -g " + $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F) OPTFLAGS="-O2 -march=$(PLATFORM_VARIANT) -g " $(LIBCRYPTOCONDITIONS): $(wildcard cryptoconditions/src/*) $(wildcard cryptoconditions/include/*) - $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F) OPTFLAGS="-O2 -g " + $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F) OPTFLAGS="-O2 -march=$(PLATFORM_VARIANT) -g " # Make is not made aware of per-object dependencies to avoid limiting building parallelization # But to build the less dependent modules first, we manually select their order here: @@ -122,6 +129,8 @@ BITCOIN_CORE_H = \ addressindex.h \ spentindex.h \ addrman.h \ + attributes.h \ + addrdb.h \ amount.h \ amqp/amqpabstractnotifier.h \ amqp/amqpconfig.h \ @@ -160,6 +169,7 @@ BITCOIN_CORE_H = \ hash.h \ httprpc.h \ httpserver.h \ + i2p.h \ init.h \ key.h \ key_io.h \ @@ -174,10 +184,13 @@ BITCOIN_CORE_H = \ mruset.h \ net.h \ netbase.h \ + netaddress.h \ + netmessagemaker.h \ noui.h \ policy/fees.h \ pow.h \ prevector.h \ + span.h \ primitives/block.h \ primitives/transaction.h \ protocol.h \ @@ -217,8 +230,13 @@ BITCOIN_CORE_H = \ uint252.h \ undo.h \ util.h \ + util/readwritefile.h \ + util/sock.h \ + util/string.h \ + util/spanparsing.h \ + util/strencodings.h \ utilmoneystr.h \ - utilstrencodings.h \ + # utilstrencodings.h \ utiltime.h \ validationinterface.h \ version.h \ @@ -249,6 +267,7 @@ libbitcoin_server_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS libbitcoin_server_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) libbitcoin_server_a_SOURCES = \ addrman.cpp \ + addrdb.cpp \ asyncrpcoperation.cpp \ asyncrpcqueue.cpp \ bloom.cpp \ @@ -283,6 +302,7 @@ libbitcoin_server_a_SOURCES = \ deprecation.cpp \ httprpc.cpp \ httpserver.cpp \ + i2p.cpp \ init.cpp \ dbwrapper.cpp \ main.cpp \ @@ -357,6 +377,8 @@ crypto_libbitcoin_crypto_a_SOURCES = \ crypto/ripemd160.h \ crypto/sha1.cpp \ crypto/sha1.h \ + crypto/sha3.cpp \ + crypto/sha3.h \ crypto/sha256.cpp \ crypto/sha256.h \ crypto/sha512.cpp \ @@ -397,6 +419,7 @@ libbitcoin_common_a_SOURCES = \ key.cpp \ key_io.cpp \ keystore.cpp \ + netaddress.cpp \ netbase.cpp \ metrics.cpp \ primitives/block.cpp \ @@ -435,9 +458,13 @@ libbitcoin_util_a_SOURCES = \ uint256.cpp \ util.cpp \ utilmoneystr.cpp \ - utilstrencodings.cpp \ utiltime.cpp \ + util/strencodings.cpp \ util/asmap.cpp \ + util/sock.cpp \ + util/spanparsing.cpp \ + util/string.cpp \ + util/readwritefile.cpp \ $(BITCOIN_CORE_H) \ $(LIBZCASH_H) @@ -667,6 +694,8 @@ clean-local: -$(MAKE) -C univalue clean rm -f leveldb/*/*.gcno leveldb/helpers/memenv/*.gcno -rm -f config.h + -rm -f *.a + -rm -f *.so .rc.o: @test -f $(WINDRES) diff --git a/src/addrdb.cpp b/src/addrdb.cpp new file mode 100644 index 000000000..e07e5cca1 --- /dev/null +++ b/src/addrdb.cpp @@ -0,0 +1,122 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2009-2016 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 + +#include "addrdb.h" +#include "addrman.h" +#include "chainparams.h" +#include "clientversion.h" +#include "fs.h" +#include "hash.h" +#include "random.h" +#include "streams.h" +#include "tinyformat.h" +#include "util.h" + +namespace { + +template +bool SerializeDB(Stream& stream, const Data& data) +{ + // Write and commit header, data + try { + CHashWriter hasher(stream.GetType(), stream.GetVersion()); + stream << FLATDATA(Params().MessageStart()) << data; + hasher << FLATDATA(Params().MessageStart()) << data; + stream << hasher.GetHash(); + } catch (const std::exception& e) { + return error("%s: Serialize or I/O error - %s", __func__, e.what()); + } + + return true; +} + +template +bool SerializeFileDB(const std::string& prefix, const fs::path& path, const Data& data) +{ + // Generate random temporary filename + unsigned short randv = 0; + GetRandBytes((unsigned char*)&randv, sizeof(randv)); + std::string tmpfn = strprintf("%s.%04x", prefix, randv); + + // open temp output file, and associate with CAutoFile + fs::path pathTmp = GetDataDir() / tmpfn; + FILE *file = fsbridge::fopen(pathTmp, "wb"); + CAutoFile fileout(file, SER_DISK, CLIENT_VERSION); + if (fileout.IsNull()) + return error("%s: Failed to open file %s", __func__, pathTmp.string()); + + // Serialize + if (!SerializeDB(fileout, data)) return false; + FileCommit(fileout.Get()); + fileout.fclose(); + + // replace existing file, if any, with new file + if (!RenameOver(pathTmp, path)) + return error("%s: Rename-into-place failed", __func__); + + return true; +} + +template +bool DeserializeDB(Stream& stream, Data& data, bool fCheckSum = true) +{ + try { + CHashVerifier verifier(&stream); + // de-serialize file header (network specific magic number) and .. + unsigned char pchMsgTmp[4]; + verifier >> FLATDATA(pchMsgTmp); + // ... verify the network matches ours + if (memcmp(pchMsgTmp, Params().MessageStart(), sizeof(pchMsgTmp))) + return error("%s: Invalid network magic number", __func__); + + // de-serialize data + verifier >> data; + + // verify checksum + if (fCheckSum) { + uint256 hashTmp; + stream >> hashTmp; + if (hashTmp != verifier.GetHash()) { + return error("%s: Checksum mismatch, data corrupted", __func__); + } + } + } + catch (const std::exception& e) { + return error("%s: Deserialize or I/O error - %s", __func__, e.what()); + } + + return true; +} + +template +bool DeserializeFileDB(const fs::path& path, Data& data) +{ + // open input file, and associate with CAutoFile + FILE *file = fsbridge::fopen(path, "rb"); + CAutoFile filein(file, SER_DISK, CLIENT_VERSION); + if (filein.IsNull()) + return error("%s: Failed to open file %s", __func__, path.string()); + + return DeserializeDB(filein, data); +} + +} + +CBanDB::CBanDB() +{ + pathBanlist = GetDataDir() / "banlist.dat"; +} + +bool CBanDB::Write(const banmap_t& banSet) +{ + return SerializeFileDB("banlist", pathBanlist, banSet); +} + +bool CBanDB::Read(banmap_t& banSet) +{ + return DeserializeFileDB(pathBanlist, banSet); +} + diff --git a/src/addrdb.h b/src/addrdb.h new file mode 100644 index 000000000..a5cf7dc97 --- /dev/null +++ b/src/addrdb.h @@ -0,0 +1,90 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2009-2016 The Bitcoin Core developers +// Distributed under the GPLv3 software license, see the accompanying +// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html + +#ifndef HUSH_ADDRDB_H +#define HUSH_ADDRDB_H + +#include "fs.h" +#include "serialize.h" + +#include +#include + +class CSubNet; +class CAddrMan; +class CDataStream; + +typedef enum BanReason +{ + BanReasonUnknown = 0, + BanReasonNodeMisbehaving = 1, + BanReasonManuallyAdded = 2 +} BanReason; + +class CBanEntry +{ +public: + static const int CURRENT_VERSION=1; + int nVersion; + int64_t nCreateTime; + int64_t nBanUntil; + uint8_t banReason; + + CBanEntry() + { + SetNull(); + } + + explicit CBanEntry(int64_t nCreateTimeIn) + { + SetNull(); + nCreateTime = nCreateTimeIn; + } + + ADD_SERIALIZE_METHODS; + + template + inline void SerializationOp(Stream& s, Operation ser_action) { + READWRITE(this->nVersion); + READWRITE(nCreateTime); + READWRITE(nBanUntil); + READWRITE(banReason); + } + + void SetNull() + { + nVersion = CBanEntry::CURRENT_VERSION; + nCreateTime = 0; + nBanUntil = 0; + banReason = BanReasonUnknown; + } + + std::string banReasonToString() const + { + switch (banReason) { + case BanReasonNodeMisbehaving: + return "node misbehaving"; + case BanReasonManuallyAdded: + return "manually added"; + default: + return "unknown"; + } + } +}; + +typedef std::map banmap_t; + +/** Access to the banlist database (banlist.dat) */ +class CBanDB +{ +private: + fs::path pathBanlist; +public: + CBanDB(); + bool Write(const banmap_t& banSet); + bool Read(banmap_t& banSet); +}; + +#endif // HUSH_ADDRDB_H diff --git a/src/addrman.cpp b/src/addrman.cpp index d9b8a07cb..1148d5d7a 100644 --- a/src/addrman.cpp +++ b/src/addrman.cpp @@ -23,6 +23,7 @@ #include "hash.h" #include "serialize.h" #include "streams.h" +#include "init.h" int CAddrInfo::GetTriedBucket(const uint256& nKey, const std::vector &asmap) const { @@ -53,6 +54,9 @@ int CAddrInfo::GetBucketPosition(const uint256 &nKey, bool fNew, int nBucket) co bool CAddrInfo::IsTerrible(int64_t nNow) const { + if (fLocal) //never remove local addresses + return false; + if (nLastTry && nLastTry >= nNow - 60) // never remove things tried in the last minute return false; @@ -71,6 +75,14 @@ bool CAddrInfo::IsTerrible(int64_t nNow) const return false; } +bool CAddrInfo::IsJustTried(int64_t nNow) const +{ + if (nLastTry && nLastTry >= nNow - 60) + return true; + + return false; +} + double CAddrInfo::GetChance(int64_t nNow) const { double fChance = 1.0; @@ -95,24 +107,30 @@ double CAddrInfo::GetChance(int64_t nNow) const CAddrInfo* CAddrMan::Find(const CNetAddr& addr, int* pnId) { - std::map::iterator it = mapAddr.find(addr); + AssertLockHeld(cs); + + const auto it = mapAddr.find(addr); if (it == mapAddr.end()) - return NULL; + return nullptr; if (pnId) *pnId = (*it).second; - std::map::iterator it2 = mapInfo.find((*it).second); + const auto it2 = mapInfo.find((*it).second); if (it2 != mapInfo.end()) return &(*it2).second; - return NULL; + return nullptr; } CAddrInfo* CAddrMan::Create(const CAddress& addr, const CNetAddr& addrSource, int* pnId) { - int nId = nIdCount++; + AssertLockHeld(cs); + + int nId = nIdCount; mapInfo[nId] = CAddrInfo(addr, addrSource); mapAddr[addr] = nId; mapInfo[nId].nRandomPos = vRandom.size(); vRandom.push_back(nId); + nNew++; + nIdCount++; if (pnId) *pnId = nId; return &mapInfo[nId]; @@ -120,6 +138,8 @@ CAddrInfo* CAddrMan::Create(const CAddress& addr, const CNetAddr& addrSource, in void CAddrMan::SwapRandom(unsigned int nRndPos1, unsigned int nRndPos2) { + AssertLockHeld(cs); + if (nRndPos1 == nRndPos2) return; @@ -128,11 +148,13 @@ void CAddrMan::SwapRandom(unsigned int nRndPos1, unsigned int nRndPos2) int nId1 = vRandom[nRndPos1]; int nId2 = vRandom[nRndPos2]; - assert(mapInfo.count(nId1) == 1); - assert(mapInfo.count(nId2) == 1); + const auto it_1{mapInfo.find(nId1)}; + const auto it_2{mapInfo.find(nId2)}; + assert(it_1 != mapInfo.end()); + assert(it_2 != mapInfo.end()); - mapInfo[nId1].nRandomPos = nRndPos2; - mapInfo[nId2].nRandomPos = nRndPos1; + it_1->second.nRandomPos = nRndPos2; + it_2->second.nRandomPos = nRndPos1; vRandom[nRndPos1] = nId2; vRandom[nRndPos2] = nId1; @@ -140,41 +162,57 @@ void CAddrMan::SwapRandom(unsigned int nRndPos1, unsigned int nRndPos2) void CAddrMan::Delete(int nId) { - assert(mapInfo.count(nId) != 0); - CAddrInfo& info = mapInfo[nId]; - assert(!info.fInTried); - assert(info.nRefCount == 0); + AssertLockHeld(cs); + + const auto it{mapInfo.find(nId)}; + if (it != mapInfo.end()) { + CAddrInfo& info = (*it).second; + assert(!info.fInTried); + assert(info.nRefCount == 0); + + SwapRandom(info.nRandomPos, vRandom.size() - 1); + vRandom.pop_back(); + mapAddr.erase(info); + mapInfo.erase(nId); + nNew--; + } - SwapRandom(info.nRandomPos, vRandom.size() - 1); - vRandom.pop_back(); - mapAddr.erase(info); - mapInfo.erase(nId); - nNew--; } void CAddrMan::ClearNew(int nUBucket, int nUBucketPos) { + AssertLockHeld(cs); + // if there is an entry in the specified bucket, delete it. if (vvNew[nUBucket][nUBucketPos] != -1) { int nIdDelete = vvNew[nUBucket][nUBucketPos]; - CAddrInfo& infoDelete = mapInfo[nIdDelete]; - assert(infoDelete.nRefCount > 0); - infoDelete.nRefCount--; - vvNew[nUBucket][nUBucketPos] = -1; - if (infoDelete.nRefCount == 0) { - Delete(nIdDelete); + const auto it{mapInfo.find(nIdDelete)}; + if (it != mapInfo.end()) { + CAddrInfo& infoDelete = (*it).second; + assert(infoDelete.nRefCount > 0); + infoDelete.nRefCount--; + vvNew[nUBucket][nUBucketPos] = -1; + if (infoDelete.nRefCount == 0) { + Delete(nIdDelete); + } } } + } void CAddrMan::MakeTried(CAddrInfo& info, int nId) { + AssertLockHeld(cs); + // remove the entry from all new buckets - for (int bucket = 0; bucket < ADDRMAN_NEW_BUCKET_COUNT; bucket++) { - int pos = info.GetBucketPosition(nKey, true, bucket); + const int start_bucket{info.GetNewBucket(nKey, m_asmap)}; + for (int n = 0; n < ADDRMAN_NEW_BUCKET_COUNT; ++n) { + const int bucket{(start_bucket + n) % ADDRMAN_NEW_BUCKET_COUNT}; + const int pos{info.GetBucketPosition(nKey, true, bucket)}; if (vvNew[bucket][pos] == nId) { vvNew[bucket][pos] = -1; info.nRefCount--; + if (info.nRefCount == 0) break; } } nNew--; @@ -215,67 +253,6 @@ void CAddrMan::MakeTried(CAddrInfo& info, int nId) info.fInTried = true; } -void CAddrMan::Good_(const CService& addr, bool test_before_evict, int64_t nTime) { - int nId; - CAddrInfo* pinfo = Find(addr, &nId); - - // if not found, bail out - if (!pinfo) - return; - - CAddrInfo& info = *pinfo; - - // check whether we are talking about the exact same CService (including same port) - if (info != addr) - return; - - // update info - info.nLastSuccess = nTime; - info.nLastTry = nTime; - info.nAttempts = 0; - // nTime is not updated here, to avoid leaking information about - // currently-connected peers. - - // if it is already in the tried set, don't do anything else - if (info.fInTried) - return; - - // find a bucket it is in now - int nRnd = RandomInt(ADDRMAN_NEW_BUCKET_COUNT); - int nUBucket = -1; - for (unsigned int n = 0; n < ADDRMAN_NEW_BUCKET_COUNT; n++) { - int nB = (n + nRnd) % ADDRMAN_NEW_BUCKET_COUNT; - int nBpos = info.GetBucketPosition(nKey, true, nB); - if (vvNew[nB][nBpos] == nId) { - nUBucket = nB; - break; - } - } - - // if no bucket is found, something bad happened; - // TODO: maybe re-add the node, but for now, just bail out - if (nUBucket == -1) - return; - - // which tried bucket to move the entry to - int tried_bucket = info.GetTriedBucket(nKey,m_asmap); - int tried_bucket_pos = info.GetBucketPosition(nKey, false, tried_bucket); - - // Will moving this address into tried evict another entry? - if (test_before_evict && (vvTried[tried_bucket][tried_bucket_pos] != -1)) { - LogPrint("addrman", "Collision inserting element into tried table, moving %s to m_tried_collisions=%d\n", addr.ToString(), m_tried_collisions.size()); - if (m_tried_collisions.size() < ADDRMAN_SET_TRIED_COLLISION_SIZE) { - m_tried_collisions.insert(nId); - } - } else { - LogPrint("addrman", "Moving %s to tried\n", addr.ToString()); - printf("%s: Moving %s to tried\n", __func__, addr.ToString().c_str() ); - - // move nId to the tried tables - MakeTried(info, nId); - } -} - void CAddrMan::ResolveCollisions_() { for (std::set::iterator it = m_tried_collisions.begin(); it != m_tried_collisions.end();) { int id_new = *it; @@ -351,13 +328,59 @@ CAddrInfo CAddrMan::SelectTriedCollision_() { return mapInfo[id_old]; } +void CAddrMan::Good_(const CService& addr, bool test_before_evict, int64_t nTime) { + int nId; + CAddrInfo* pinfo = Find(addr, &nId); + + // if not found, bail out + if (!pinfo) + return; + + CAddrInfo& info = *pinfo; + + // check whether we are talking about the exact same CService (including same port) + if (info != addr) + return; + + // update info + info.nLastSuccess = nTime; + info.nLastTry = nTime; + info.nAttempts = 0; + // nTime is not updated here, to avoid leaking information about + // currently-connected peers. + + // if it is already in the tried set, don't do anything else + if (info.fInTried) + return; + + // find a bucket it is in now + int nRnd = RandomInt(ADDRMAN_NEW_BUCKET_COUNT); + int nUBucket = -1; + for (unsigned int n = 0; n < ADDRMAN_NEW_BUCKET_COUNT; n++) { + int nB = (n + nRnd) % ADDRMAN_NEW_BUCKET_COUNT; + int nBpos = info.GetBucketPosition(nKey, true, nB); + if (vvNew[nB][nBpos] == nId) { + nUBucket = nB; + break; + } + } + + // if no bucket is found, something bad happened; + // TODO: maybe re-add the node, but for now, just bail out + if (nUBucket == -1) + return; + + LogPrint("addrman", "Moving %s to tried\n", addr.ToString()); + + // move nId to the tried tables + MakeTried(info, nId); +} bool CAddrMan::Add_(const CAddress& addr, const CNetAddr& source, int64_t nTimePenalty) { if (!addr.IsRoutable()) return false; - bool fNew = false; int nId; CAddrInfo* pinfo = Find(addr, &nId); @@ -392,19 +415,20 @@ bool CAddrMan::Add_(const CAddress& addr, const CNetAddr& source, int64_t nTimeP } else { pinfo = Create(addr, source, &nId); pinfo->nTime = std::max((int64_t)0, (int64_t)pinfo->nTime - nTimePenalty); - nNew++; - fNew = true; } int nUBucket = pinfo->GetNewBucket(nKey, source, m_asmap); int nUBucketPos = pinfo->GetBucketPosition(nKey, true, nUBucket); + bool fInsert = vvNew[nUBucket][nUBucketPos] == -1; if (vvNew[nUBucket][nUBucketPos] != nId) { - bool fInsert = vvNew[nUBucket][nUBucketPos] == -1; if (!fInsert) { - CAddrInfo& infoExisting = mapInfo[vvNew[nUBucket][nUBucketPos]]; - if (infoExisting.IsTerrible() || (infoExisting.nRefCount > 1 && pinfo->nRefCount == 0)) { - // Overwrite the existing new table entry. - fInsert = true; + const auto it{mapInfo.find(vvNew[nUBucket][nUBucketPos])}; + if (it != mapInfo.end()) { + CAddrInfo& infoExisting = (*it).second; + if (infoExisting.IsTerrible() || (infoExisting.nRefCount > 1 && pinfo->nRefCount == 0)) { + // Overwrite the existing new table entry. + fInsert = true; + } } } if (fInsert) { @@ -417,7 +441,7 @@ bool CAddrMan::Add_(const CAddress& addr, const CNetAddr& source, int64_t nTimeP } } } - return fNew; + return fInsert; } void CAddrMan::Attempt_(const CService& addr, int64_t nTime) @@ -454,10 +478,15 @@ CAddrInfo CAddrMan::Select_(bool newOnly) // Use a 50% chance for choosing between tried and new table entries. if (!newOnly && - (nTried > 0 && (nNew == 0 || RandomInt(2) == 0))) { + (nTried > 0 && (nNew == 0 || RandomInt(2) == 0))) { // use a tried node double fChanceFactor = 1.0; + double fReachableFactor = 1.0; + double fJustTried = 1.0; while (1) { + if (ShutdownRequested()) //break loop on shutdown request + return CAddrInfo(); + int i = 0; int nKBucket = RandomInt(ADDRMAN_TRIED_BUCKET_COUNT); int nKBucketPos = RandomInt(ADDRMAN_BUCKET_SIZE); @@ -472,14 +501,27 @@ CAddrInfo CAddrMan::Select_(bool newOnly) int nId = vvTried[nKBucket][nKBucketPos]; assert(mapInfo.count(nId) == 1); CAddrInfo& info = mapInfo[nId]; - if (RandomInt(1 << 30) < fChanceFactor * info.GetChance() * (1 << 30)) + if (info.IsReachableNetwork()) { + //deprioritize unreachable networks + fReachableFactor = 0.25; + } + if (info.IsJustTried()) { + //deprioritize entries just tried + fJustTried = 0.10; + } + if (RandomInt(1 << 30) < fChanceFactor * fReachableFactor * fJustTried * info.GetChance() * (1 << 30)) return info; fChanceFactor *= 1.2; } } else { // use a new node double fChanceFactor = 1.0; + double fReachableFactor = 1.0; + double fJustTried = 1.0; while (1) { + if (ShutdownRequested()) //break loop on shutdown request + return CAddrInfo(); + int i = 0; int nUBucket = RandomInt(ADDRMAN_NEW_BUCKET_COUNT); int nUBucketPos = RandomInt(ADDRMAN_BUCKET_SIZE); @@ -494,12 +536,20 @@ CAddrInfo CAddrMan::Select_(bool newOnly) int nId = vvNew[nUBucket][nUBucketPos]; assert(mapInfo.count(nId) == 1); CAddrInfo& info = mapInfo[nId]; - if (RandomInt(1 << 30) < fChanceFactor * info.GetChance() * (1 << 30)) + if (info.IsReachableNetwork()) { + //deprioritize unreachable networks + fReachableFactor = 0.25; + } + if (info.IsJustTried()) { + //deprioritize entries just tried + fJustTried = 0.10; + } + if (RandomInt(1 << 30) < fChanceFactor * fReachableFactor * fJustTried * info.GetChance() * (1 << 30)) return info; fChanceFactor *= 1.2; } } - + return CAddrInfo(); } @@ -581,24 +631,59 @@ int CAddrMan::Check_() } #endif -void CAddrMan::GetAddr_(std::vector& vAddr) +void CAddrMan::GetAddr_(std::vector& vAddr, bool wants_addrv2) { unsigned int nNodes = ADDRMAN_GETADDR_MAX_PCT * vRandom.size() / 100; if (nNodes > ADDRMAN_GETADDR_MAX) nNodes = ADDRMAN_GETADDR_MAX; + int addrv2Nodes = nNodes/5; + int ipv4Nodes = 0; + int ipv6Nodes = 0; + int torNodes = 0; + int i2pNodes = 0; + int cjdnsNodes = 0; + + // Randomize Nodes + for (unsigned int n = 0; n < vRandom.size(); n++) { + int nRndPos = RandomInt(vRandom.size() - n) + n; + SwapRandom(n, nRndPos); + } + // gather a list of random nodes, skipping those of low quality for (unsigned int n = 0; n < vRandom.size(); n++) { if (vAddr.size() >= nNodes) break; - int nRndPos = RandomInt(vRandom.size() - n) + n; - SwapRandom(n, nRndPos); assert(mapInfo.count(vRandom[n]) == 1); - const CAddrInfo& ai = mapInfo[vRandom[n]]; - if (!ai.IsTerrible()) - vAddr.push_back(ai); + + if (!ai.IsTerrible()) { + if (!wants_addrv2) { + vAddr.push_back(ai); + } else { + if (ai.IsIPv4() && ipv4Nodes <= addrv2Nodes) { + vAddr.push_back(ai); + ipv4Nodes++; + } + if (ai.IsIPv6() && ipv6Nodes <= addrv2Nodes) { + vAddr.push_back(ai); + ipv6Nodes++; + } + if (ai.IsCJDNS() && cjdnsNodes <= addrv2Nodes) { + vAddr.push_back(ai); + cjdnsNodes++; + } + if (ai.IsTor() && torNodes <= addrv2Nodes) { + vAddr.push_back(ai); + torNodes++; + } + if (ai.IsI2P() && i2pNodes <= addrv2Nodes) { + vAddr.push_back(ai); + i2pNodes++; + } + } + } } } @@ -622,10 +707,36 @@ void CAddrMan::Connected_(const CService& addr, int64_t nTime) info.nTime = nTime; } +void CAddrMan::SetLocal_(const CService& addr) +{ + CAddrInfo* pinfo = Find(addr); + + // if not found, bail out + if (!pinfo) + return; + + CAddrInfo& info = *pinfo; + + // check whether we are talking about the exact same CService (including same port) + if (info != addr) + return; + + // update info + info.fLocal = true; +} + int CAddrMan::RandomInt(int nMax){ return GetRandInt(nMax); } +void CAddrMan::GetAllPeers(std::map &info) { + + for(std::map::iterator it = mapInfo.begin(); it != mapInfo.end(); it++) { + info[(*it).second.ToStringIPPort()] = (*it).second.GetLastSuccess(); + } + return; +} + std::vector CAddrMan::DecodeAsmap(fs::path path) { std::vector bits; diff --git a/src/addrman.h b/src/addrman.h index 5738913d4..ab425d40e 100644 --- a/src/addrman.h +++ b/src/addrman.h @@ -24,6 +24,7 @@ #include "protocol.h" #include "random.h" #include "sync.h" +#include "streams.h" #include "timedata.h" #include "util.h" #include "fs.h" @@ -64,18 +65,17 @@ private: //! position in vRandom int nRandomPos; + //! Address is local + bool fLocal; + friend class CAddrMan; public: - ADD_SERIALIZE_METHODS; - - template - inline void SerializationOp(Stream& s, Operation ser_action) { - READWRITE(*(CAddress*)this); - READWRITE(source); - READWRITE(nLastSuccess); - READWRITE(nAttempts); + SERIALIZE_METHODS(CAddrInfo, obj) + { + READWRITEAS(CAddress, obj); + READ_WRITE(obj.source, obj.nLastSuccess, obj.nAttempts); } void Init() @@ -86,6 +86,7 @@ public: nRefCount = 0; fInTried = false; nRandomPos = -1; + fLocal = false; } CAddrInfo(const CAddress &addrIn, const CNetAddr &addrSource) : CAddress(addrIn), source(addrSource) @@ -116,9 +117,15 @@ public: //! Determine whether the statistics about this entry are bad enough so that it can just be deleted bool IsTerrible(int64_t nNow = GetTime()) const; + //Determine if this entry was just tried + bool IsJustTried(int64_t nNow = GetTime()) const; + //! Calculate the relative chance this entry should be given when selecting nodes to connect to double GetChance(int64_t nNow = GetTime()) const; + //Returns the last successful connection + int64_t GetLastSuccess() {return nTime;} + }; /** Stochastic address manager @@ -199,8 +206,30 @@ private: //! critical section to protect the inner data structures mutable CCriticalSection cs; + //! Serialization versions. + enum Format : uint8_t { + V0_HISTORICAL = 0, //!< historic format, before commit e6b343d88 + V1_DETERMINISTIC = 1, //!< for pre-asmap files + V2_ASMAP = 2, //!< for files including asmap version + V3_BIP155 = 3, //!< same as V2_ASMAP plus addresses are in BIP155 format + }; + + //! The maximum format this software knows it can unserialize. Also, we always serialize + //! in this format. + //! The format (first byte in the serialized stream) can be higher than this and + //! still this software may be able to unserialize the file - if the second byte + //! (see `lowest_compatible` in `Unserialize()`) is less or equal to this. + static constexpr Format FILE_FORMAT = Format::V3_BIP155; + + //! The initial value of a field that is incremented every time an incompatible format + //! change is made (such that old software versions would not be able to parse and + //! understand the new file format). This is 32 because we overtook the "key size" + //! field which was 32 historically. + //! @note Don't increment this. Increment `lowest_compatible` in `Serialize()` instead. + static constexpr uint8_t INCOMPATIBILITY_BASE = 32; + //! last used nId - int nIdCount; + int nIdCount GUARDED_BY(cs){0}; //! table with information about all nIds std::map mapInfo; @@ -280,12 +309,16 @@ protected: #endif //! Select several addresses at once. - void GetAddr_(std::vector &vAddr); + void GetAddr_(std::vector &vAddr, bool wants_addrv2); //! Mark an entry as currently-connected-to. void Connected_(const CService &addr, int64_t nTime); + //! Mark an entry as local + void SetLocal_(const CService &addr); + public: + void GetAllPeers(std::map &info); // Compressed IP->ASN mapping, loaded from a file when a node starts. // Should be always empty if no file was provided. // This mapping is then used for bucketing nodes in Addrman. @@ -336,13 +369,22 @@ public: * very little in common. */ template - void Serialize(Stream &s) const + void Serialize(Stream &s_) const + EXCLUSIVE_LOCKS_REQUIRED(!cs) { LOCK(cs); - unsigned char nVersion = 2; - s << nVersion; - s << ((unsigned char)32); + // Always serialize in the latest version (FILE_FORMAT). + + OverrideStream s(&s_, s_.GetType(), s_.GetVersion() | ADDRV2_FORMAT); + + s << static_cast(FILE_FORMAT); + + // Increment `lowest_compatible` iff a newly introduced format is incompatible with + // the previous one. + static constexpr uint8_t lowest_compatible = Format::V3_BIP155; + s << static_cast(INCOMPATIBILITY_BASE + lowest_compatible); + s << nKey; s << nNew; s << nTried; @@ -393,22 +435,40 @@ public: } template - void Unserialize(Stream& s) + void Unserialize(Stream& s_) { LOCK(cs); - Clear(); - unsigned char nVersion; - s >> nVersion; - unsigned char nKeySize; - s >> nKeySize; - if (nKeySize != 32) throw std::ios_base::failure("Incorrect keysize in addrman deserialization"); + assert(vRandom.empty()); + + Format format; + s_ >> Using>(format); + + int stream_version = s_.GetVersion(); + if (format >= Format::V3_BIP155) { + // Add ADDRV2_FORMAT to the version so that the CNetAddr and CAddress + // unserialize methods know that an address in addrv2 format is coming. + stream_version |= ADDRV2_FORMAT; + } + + OverrideStream s(&s_, s_.GetType(), stream_version); + + uint8_t compat; + s >> compat; + const uint8_t lowest_compatible = compat - INCOMPATIBILITY_BASE; + if (lowest_compatible > FILE_FORMAT) { + throw std::ios_base::failure(strprintf( + "Unsupported format of addrman database: %u. It is compatible with formats >=%u, " + "but the maximum supported by this version of %s is %u.", + format, lowest_compatible, PACKAGE_NAME, static_cast(FILE_FORMAT))); + } + s >> nKey; s >> nNew; s >> nTried; int nUBuckets = 0; s >> nUBuckets; - if (nVersion != 0) { + if (format >= Format::V1_DETERMINISTIC) { nUBuckets ^= (1 << 30); } @@ -422,7 +482,7 @@ public: // Deserialize entries from the new table. for (int n = 0; n < nNew; n++) { - CAddrInfo &info = mapInfo[n]; + CAddrInfo& info = mapInfo[n]; s >> info; mapAddr[info] = n; info.nRandomPos = vRandom.size(); @@ -437,7 +497,7 @@ public: s >> info; int nKBucket = info.GetTriedBucket(nKey, m_asmap); int nKBucketPos = info.GetBucketPosition(nKey, false, nKBucket); - if (vvTried[nKBucket][nKBucketPos] == -1) { + if (info.IsValid() && vvTried[nKBucket][nKBucketPos] == -1) { info.nRandomPos = vRandom.size(); info.fInTried = true; vRandom.push_back(nIdCount); @@ -452,60 +512,84 @@ public: nTried -= nLost; // Store positions in the new table buckets to apply later (if possible). - std::map entryToBucket; // Represents which entry belonged to which bucket when serializing + // An entry may appear in up to ADDRMAN_NEW_BUCKETS_PER_ADDRESS buckets, + // so we store all bucket-entry_index pairs to iterate through later. + std::vector> bucket_entries; - for (int bucket = 0; bucket < nUBuckets; bucket++) { - int nSize = 0; - s >> nSize; - for (int n = 0; n < nSize; n++) { - int nIndex = 0; - s >> nIndex; - if (nIndex >= 0 && nIndex < nNew) { - entryToBucket[nIndex] = bucket; + for (int bucket = 0; bucket < nUBuckets; ++bucket) { + int num_entries{0}; + s >> num_entries; + for (int n = 0; n < num_entries; ++n) { + int entry_index{0}; + s >> entry_index; + if (entry_index >= 0 && entry_index < nNew) { + bucket_entries.emplace_back(bucket, entry_index); } } } - uint256 supplied_asmap_version; + // If the bucket count and asmap checksum haven't changed, then attempt + // to restore the entries to the buckets/positions they were in before + // serialization. + uint256 supplied_asmap_checksum; if (m_asmap.size() != 0) { - supplied_asmap_version = SerializeHash(m_asmap); + supplied_asmap_checksum = SerializeHash(m_asmap); } - uint256 serialized_asmap_version; - if (nVersion > 1) { - s >> serialized_asmap_version; + uint256 serialized_asmap_checksum; + if (format >= Format::V2_ASMAP) { + s >> serialized_asmap_checksum; + } + const bool restore_bucketing{nUBuckets == ADDRMAN_NEW_BUCKET_COUNT && + serialized_asmap_checksum == supplied_asmap_checksum}; + + if (!restore_bucketing) { + LogPrint("addrman", "Bucketing method was updated, re-bucketing addrman entries from disk\n"); } - for (int n = 0; n < nNew; n++) { - CAddrInfo &info = mapInfo[n]; - int bucket = entryToBucket[n]; - int nUBucketPos = info.GetBucketPosition(nKey, true, bucket); - if (nVersion == 2 && nUBuckets == ADDRMAN_NEW_BUCKET_COUNT && vvNew[bucket][nUBucketPos] == -1 && - info.nRefCount < ADDRMAN_NEW_BUCKETS_PER_ADDRESS && serialized_asmap_version == supplied_asmap_version) { - // Bucketing has not changed, using existing bucket positions for the new table - vvNew[bucket][nUBucketPos] = n; - info.nRefCount++; - } else { - // In case the new table data cannot be used (nVersion unknown, bucket count wrong or new asmap), - // try to give them a reference based on their primary source address. - LogPrint("addrman", "Bucketing method was updated, re-bucketing addrman entries from disk\n"); - bucket = info.GetNewBucket(nKey, m_asmap); - nUBucketPos = info.GetBucketPosition(nKey, true, bucket); - if (vvNew[bucket][nUBucketPos] == -1) { - vvNew[bucket][nUBucketPos] = n; - info.nRefCount++; + for (auto bucket_entry : bucket_entries) { + int bucket{bucket_entry.first}; + const int entry_index{bucket_entry.second}; + // CAddrInfo& info = mapInfo[entry_index]; + + const auto it{mapInfo.find(entry_index)}; + if (it != mapInfo.end()) { + CAddrInfo& info = (*it).second; + + // Don't store the entry in the new bucket if it's not a valid address for our addrman + if (!info.IsValid()) continue; + + // The entry shouldn't appear in more than + // ADDRMAN_NEW_BUCKETS_PER_ADDRESS. If it has already, just skip + // this bucket_entry. + if (info.nRefCount >= ADDRMAN_NEW_BUCKETS_PER_ADDRESS) continue; + + int bucket_position = info.GetBucketPosition(nKey, true, bucket); + if (restore_bucketing && vvNew[bucket][bucket_position] == -1) { + // Bucketing has not changed, using existing bucket positions for the new table + vvNew[bucket][bucket_position] = entry_index; + ++info.nRefCount; + } else { + // In case the new table data cannot be used (bucket count wrong or new asmap), + // try to give them a reference based on their primary source address. + bucket = info.GetNewBucket(nKey, m_asmap); + bucket_position = info.GetBucketPosition(nKey, true, bucket); + if (vvNew[bucket][bucket_position] == -1) { + vvNew[bucket][bucket_position] = entry_index; + ++info.nRefCount; + } } } } // Prune new entries with refcount 0 (as a result of collisions). int nLostUnk = 0; - for (std::map::const_iterator it = mapInfo.begin(); it != mapInfo.end(); ) { + for (auto it = mapInfo.cbegin(); it != mapInfo.cend(); ) { if (it->second.fInTried == false && it->second.nRefCount == 0) { - std::map::const_iterator itCopy = it++; + const auto itCopy = it++; Delete(itCopy->first); - nLostUnk++; + ++nLostUnk; } else { - it++; + ++it; } } if (nLost + nLostUnk > 0) { @@ -531,7 +615,6 @@ public: } } - nIdCount = 0; nTried = 0; nNew = 0; mapInfo.clear(); @@ -657,13 +740,13 @@ public: } //! Return a bunch of addresses, selected at random. - std::vector GetAddr() + std::vector GetAddr(bool wants_addrv2 = false) { Check(); std::vector vAddr; { LOCK(cs); - GetAddr_(vAddr); + GetAddr_(vAddr, wants_addrv2); } Check(); return vAddr; @@ -680,6 +763,17 @@ public: } } + //! Mark an entry as currently-connected-to. + void SetLocal(const CService &addr) + { + { + LOCK(cs); + Check(); + SetLocal_(addr); + Check(); + } + } + }; #endif // HUSH_ADDRMAN_H diff --git a/src/arith_uint256.cpp b/src/arith_uint256.cpp index da2dcd58b..af49e0033 100644 --- a/src/arith_uint256.cpp +++ b/src/arith_uint256.cpp @@ -19,7 +19,7 @@ ******************************************************************************/ #include "arith_uint256.h" #include "uint256.h" -#include "utilstrencodings.h" +#include "util/strencodings.h" #include "crypto/common.h" #include #include diff --git a/src/attributes.h b/src/attributes.h new file mode 100644 index 000000000..a0afeb2f6 --- /dev/null +++ b/src/attributes.h @@ -0,0 +1,20 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2009-2020 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 + +#ifndef HUSH_ATTRIBUTES_H +#define HUSH_ATTRIBUTES_H + +#if defined(__clang__) +# if __has_attribute(lifetimebound) +# define LIFETIMEBOUND [[clang::lifetimebound]] +# else +# define LIFETIMEBOUND +# endif +#else +# define LIFETIMEBOUND +#endif + +#endif // HUSH_ATTRIBUTES_H diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index d6ac78c25..669a095ea 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -22,7 +22,7 @@ #include "rpc/client.h" #include "rpc/protocol.h" #include "util.h" -#include "utilstrencodings.h" +#include "util/strencodings.h" #include #include #include diff --git a/src/cc/Makefile b/src/cc/Makefile index 3e988f279..24b94226a 100644 --- a/src/cc/Makefile +++ b/src/cc/Makefile @@ -2,9 +2,10 @@ SHELL = /bin/sh CC = gcc CC_DARWIN = g++-6 CC_WIN = x86_64-w64-mingw32-gcc-posix -CFLAGS_DARWIN = -std=c++11 -arch x86_64 -I/usr/local/Cellar/gcc\@6/6.4.0_2/include/c++/6.4.0/ -I../../depends/$(shell echo `../..//depends/config.guess`/include) -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -c -Wl,-undefined -Wl,dynamic_lookup -dynamiclib -CFLAGS = -std=c++11 -I../../depends/$(shell echo `../..//depends/config.guess`/include) -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -shared -c -CFLAGS_WIN = -std=c++11 -I../../depends/$(shell echo `../..//depends/config.guess`/include) -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -shared -c +CFLAGS = -arch x86_64 +CXXFLAGS_DARWIN = -std=c++11 -arch x86_64 -I/usr/local/Cellar/gcc\@6/6.4.0_2/include/c++/6.4.0/ -I../../depends/$(shell echo `../..//depends/config.guess`/include) -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -c -Wl,-undefined -Wl,dynamic_lookup -dynamiclib +CXXFLAGS = -std=c++11 -I../../depends/$(shell echo `../..//depends/config.guess`/include) -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -shared -c +CXXFLAGS_WIN = -std=c++11 -I../../depends/$(shell echo `../..//depends/config.guess`/include) -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -shared -c DEBUGFLAGS = -O0 -D _DEBUG RELEASEFLAGS = -O2 -D NDEBUG -combine -fwhole-program $(info $(OS)) @@ -13,21 +14,27 @@ $(info $(OS)) TARGET = ../libcc.so TARGET_DARWIN = ../libcc.dylib TARGET_WIN = ../libcc.dll -SOURCES = cclib.cpp -#HEADERS = $(shell echo ../cryptoconditions/include/*.h) +SOURCES = cclib.cpp ../cJSON.c +OBJS = cclib.o ../cJSON.o all: $(TARGET) -$(TARGET): $(SOURCES) +%.o: %.c + $(CC) -o $@ $< $(CFLAGS) $(DEBUGFLAGS) + +%.o: %.cpp + $(CC) -o $@ $< $(CXXFLAGS) $(DEBUGFLAGS) + +$(TARGET): $(OBJS) $(info Building cclib to src/) ifeq ($(OS),Darwin) - $(CC_DARWIN) $(CFLAGS_DARWIN) $(DEBUGFLAGS) -o $(TARGET_DARWIN) $(SOURCES) + $(CC_DARWIN) $(CXXFLAGS_DARWIN) $(DEBUGFLAGS) -o $(TARGET_DARWIN) $(OBJS) else ifeq ($(OS),Linux) - $(CC) $(CFLAGS) $(DEBUGFLAGS) -o $(TARGET) $(SOURCES) + $(CC) $(CXXFLAGS) $(DEBUGFLAGS) -o $(TARGET) $(OBJS) #else ifeq ($(WIN_HOST),True) - todo: pass ENV var from build.sh if WIN host else $(info WINDOWS) - $(CC_WIN) $(CFLAGS_WIN) $(DEBUGFLAGS) -o $(TARGET_WIN) $(SOURCES) + $(CC_WIN) $(CXXFLAGS_WIN) $(DEBUGFLAGS) -o $(TARGET_WIN) $(OBJS) endif clean: diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 6a7ca1ed1..b5a805607 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -24,7 +24,7 @@ #include "main.h" #include "crypto/equihash.h" #include "util.h" -#include "utilstrencodings.h" +#include "util/strencodings.h" #include #include #include "chainparamsseeds.h" @@ -205,7 +205,7 @@ public: bech32HRPs[SAPLING_INCOMING_VIEWING_KEY] = "zivks"; bech32HRPs[SAPLING_EXTENDED_SPEND_KEY] = "secret-extended-key-main"; - vFixedSeeds = std::vector(pnSeed6_main, pnSeed6_main + ARRAYLEN(pnSeed6_main)); + vFixedSeeds = std::vector(std::begin(chainparams_seed_main), std::end(chainparams_seed_main)); fMiningRequiresPeers = true; fDefaultConsistencyChecks = false; @@ -313,7 +313,7 @@ public: bech32HRPs[SAPLING_INCOMING_VIEWING_KEY] = "zivktestsapling"; bech32HRPs[SAPLING_EXTENDED_SPEND_KEY] = "secret-extended-key-test"; - vFixedSeeds = std::vector(pnSeed6_test, pnSeed6_test + ARRAYLEN(pnSeed6_test)); + vFixedSeeds = std::vector(std::begin(chainparams_seed_test), std::end(chainparams_seed_test)); //fRequireRPCPassword = true; fMiningRequiresPeers = false;//true; diff --git a/src/chainparams.h b/src/chainparams.h index e32a965ba..3813ed983 100644 --- a/src/chainparams.h +++ b/src/chainparams.h @@ -36,11 +36,6 @@ struct CDNSSeedData { CDNSSeedData(const std::string &strName, const std::string &strHost) : name(strName), host(strHost) {} }; -struct SeedSpec6 { - uint8_t addr[16]; - uint16_t port; -}; - typedef std::map MapCheckpoints; @@ -108,7 +103,7 @@ public: const std::vector& DNSSeeds() const { return vSeeds; } const std::vector& Base58Prefix(Base58Type type) const { return base58Prefixes[type]; } const std::string& Bech32HRP(Bech32Type type) const { return bech32HRPs[type]; } - const std::vector& FixedSeeds() const { return vFixedSeeds; } + const std::vector& FixedSeeds() const { return vFixedSeeds; } const CCheckpointData& Checkpoints() const { return checkpointData; } /** Return the founder's reward address and script for a given block height */ std::string GetFoundersRewardAddressAtHeight(int height) const; @@ -146,7 +141,7 @@ protected: std::string strCurrencyUnits; uint32_t bip44CoinType; CBlock genesis; - std::vector vFixedSeeds; + std::vector vFixedSeeds; bool fMiningRequiresPeers = false; bool fDefaultConsistencyChecks = false; bool fRequireStandard = false; diff --git a/src/chainparamsseeds.h b/src/chainparamsseeds.h index 663a9bcac..887b3d602 100644 --- a/src/chainparamsseeds.h +++ b/src/chainparamsseeds.h @@ -1,37 +1,20 @@ // Copyright (c) 2016-2022 The Hush developers -/****************************************************************************** - * Copyright © 2014-2019 The SuperNET Developers. * - * * - * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * - * the top-level directory of this distribution for the individual copyright * - * holder information and the developer policies on copyright and licensing. * - * * - * Unless otherwise agreed in a custom licensing agreement, no part of the * - * SuperNET software, including this file may be copied, modified, propagated * - * or distributed except according to the terms contained in the LICENSE file * - * * - * Removal or modification of this copyright notice is prohibited. * - * * - ******************************************************************************/ - +// Distributed under the GPLv3 software license, see the accompanying +// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html +// THIS FILE IS AUTOGENERATED, DO NOT MODIFY DIRECTLY +// Instead, run: ./contrib/seeds/generate-seeds.py contrib/seeds #ifndef HUSH_CHAINPARAMSSEEDS_H #define HUSH_CHAINPARAMSSEEDS_H -/** - * List of fixed seed nodes for the bitcoin network - * AUTOGENERATED by contrib/seeds/generate-seeds.py - * - * Each line contains a 16-byte IPv6 address and a port. - * IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly. - */ -static SeedSpec6 pnSeed6_main[] = { - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x19,0x30,0xec}, 27485}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x19,0x30,0xec}, 27487}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x40,0x69,0x6f}, 27485}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x40,0x69,0x6f}, 27487}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x19,0x30,0x48}, 27485}, - {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x19,0x30,0x48}, 27487} +// List of fixed seed nodes for the Hush network +// Each line contains a BIP155 serialized address. +// +static const uint8_t chainparams_seed_main[] = { + 0x01,0x04,0xb9,0xf1,0x3d,0x2b,0x00,0x00, // 185.241.61.43 + 0x01,0x04,0x89,0x4a,0x04,0xc6,0x00,0x00, // 137.74.4.198 + 0x01,0x04,0x95,0x1c,0x66,0xdb,0x00,0x00, // 149.28.102.219 }; -static SeedSpec6 pnSeed6_test[] = { +static const uint8_t chainparams_seed_test[] = { + 0x01,0x04,0x01,0x02,0x03,0x04,0x00,0x00, // 1.2.3.4 }; #endif // HUSH_CHAINPARAMSSEEDS_H diff --git a/src/coins.cpp b/src/coins.cpp index 57e692444..5117bbd66 100644 --- a/src/coins.cpp +++ b/src/coins.cpp @@ -24,6 +24,9 @@ #include "hush_defs.h" #include "importcoin.h" #include +#include "util.h" +extern bool fZdebug; + /** * calculate number of bytes for the bitmask, and its number of non-zero bytes * each bit in the bitmask represents the availability of one output, but the diff --git a/src/compat.h b/src/compat.h index 045774e27..49eaaebae 100644 --- a/src/compat.h +++ b/src/compat.h @@ -78,6 +78,8 @@ typedef u_int SOCKET; #define SOCKET_ERROR -1 #endif +#define WSAEAGAIN EAGAIN + #ifdef _WIN32 #ifndef S_IRUSR #define S_IRUSR 0400 @@ -109,8 +111,14 @@ typedef u_int SOCKET; size_t strnlen( const char *start, size_t max_len); #endif // HAVE_DECL_STRNLEN -bool static inline IsSelectableSocket(SOCKET s) { -#ifdef _WIN32 +#ifndef WIN32 +typedef void* sockopt_arg_type; +#else +typedef char* sockopt_arg_type; +#endif + +bool static inline IsSelectableSocket(const SOCKET& s) { +#ifdef WIN32 return true; #else return (s < FD_SETSIZE); diff --git a/src/core_read.cpp b/src/core_read.cpp index 3e01a37e3..bd3be6dd0 100644 --- a/src/core_read.cpp +++ b/src/core_read.cpp @@ -27,7 +27,7 @@ #include "streams.h" #include #include "util.h" -#include "utilstrencodings.h" +#include "util/strencodings.h" #include "version.h" #include diff --git a/src/core_write.cpp b/src/core_write.cpp index 8b890db21..c2932da01 100644 --- a/src/core_write.cpp +++ b/src/core_write.cpp @@ -29,7 +29,7 @@ #include #include "util.h" #include "utilmoneystr.h" -#include "utilstrencodings.h" +#include "util/strencodings.h" #include #include diff --git a/src/crypto/common.h b/src/crypto/common.h index 2b6be0901..0ce6ebb40 100644 --- a/src/crypto/common.h +++ b/src/crypto/common.h @@ -62,6 +62,13 @@ void static inline WriteLE64(unsigned char* ptr, uint64_t x) memcpy(ptr, (char*)&v, 8); } +uint16_t static inline ReadBE16(const unsigned char* ptr) +{ + uint16_t x; + memcpy((char*)&x, ptr, 2); + return be16toh(x); +} + uint32_t static inline ReadBE32(const unsigned char* ptr) { uint32_t x; diff --git a/src/crypto/equihash.h b/src/crypto/equihash.h index 23530cc61..38a4946e1 100644 --- a/src/crypto/equihash.h +++ b/src/crypto/equihash.h @@ -8,7 +8,7 @@ #define HUSH_EQUIHASH_H #include "crypto/sha256.h" -#include "utilstrencodings.h" +#include "util/strencodings.h" #include "sodium.h" #include "hush_nk.h" #include diff --git a/src/crypto/sha3.cpp b/src/crypto/sha3.cpp new file mode 100644 index 000000000..ad3b74f34 --- /dev/null +++ b/src/crypto/sha3.cpp @@ -0,0 +1,162 @@ +// Copyright (c) 2020 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 + +// Based on https://github.com/mjosaarinen/tiny_sha3/blob/master/sha3.c +// by Markku-Juhani O. Saarinen + +#include "crypto/sha3.h" +#include "crypto/common.h" +#include "span.h" + +#include +#include // For std::begin and std::end. + +#include + +// Internal implementation code. +namespace +{ +uint64_t Rotl(uint64_t x, int n) { return (x << n) | (x >> (64 - n)); } +} // namespace + +void KeccakF(uint64_t (&st)[25]) +{ + static constexpr uint64_t RNDC[24] = { + 0x0000000000000001, 0x0000000000008082, 0x800000000000808a, 0x8000000080008000, + 0x000000000000808b, 0x0000000080000001, 0x8000000080008081, 0x8000000000008009, + 0x000000000000008a, 0x0000000000000088, 0x0000000080008009, 0x000000008000000a, + 0x000000008000808b, 0x800000000000008b, 0x8000000000008089, 0x8000000000008003, + 0x8000000000008002, 0x8000000000000080, 0x000000000000800a, 0x800000008000000a, + 0x8000000080008081, 0x8000000000008080, 0x0000000080000001, 0x8000000080008008 + }; + static constexpr int ROUNDS = 24; + + for (int round = 0; round < ROUNDS; ++round) { + uint64_t bc0, bc1, bc2, bc3, bc4, t; + + // Theta + bc0 = st[0] ^ st[5] ^ st[10] ^ st[15] ^ st[20]; + bc1 = st[1] ^ st[6] ^ st[11] ^ st[16] ^ st[21]; + bc2 = st[2] ^ st[7] ^ st[12] ^ st[17] ^ st[22]; + bc3 = st[3] ^ st[8] ^ st[13] ^ st[18] ^ st[23]; + bc4 = st[4] ^ st[9] ^ st[14] ^ st[19] ^ st[24]; + t = bc4 ^ Rotl(bc1, 1); st[0] ^= t; st[5] ^= t; st[10] ^= t; st[15] ^= t; st[20] ^= t; + t = bc0 ^ Rotl(bc2, 1); st[1] ^= t; st[6] ^= t; st[11] ^= t; st[16] ^= t; st[21] ^= t; + t = bc1 ^ Rotl(bc3, 1); st[2] ^= t; st[7] ^= t; st[12] ^= t; st[17] ^= t; st[22] ^= t; + t = bc2 ^ Rotl(bc4, 1); st[3] ^= t; st[8] ^= t; st[13] ^= t; st[18] ^= t; st[23] ^= t; + t = bc3 ^ Rotl(bc0, 1); st[4] ^= t; st[9] ^= t; st[14] ^= t; st[19] ^= t; st[24] ^= t; + + // Rho Pi + t = st[1]; + bc0 = st[10]; st[10] = Rotl(t, 1); t = bc0; + bc0 = st[7]; st[7] = Rotl(t, 3); t = bc0; + bc0 = st[11]; st[11] = Rotl(t, 6); t = bc0; + bc0 = st[17]; st[17] = Rotl(t, 10); t = bc0; + bc0 = st[18]; st[18] = Rotl(t, 15); t = bc0; + bc0 = st[3]; st[3] = Rotl(t, 21); t = bc0; + bc0 = st[5]; st[5] = Rotl(t, 28); t = bc0; + bc0 = st[16]; st[16] = Rotl(t, 36); t = bc0; + bc0 = st[8]; st[8] = Rotl(t, 45); t = bc0; + bc0 = st[21]; st[21] = Rotl(t, 55); t = bc0; + bc0 = st[24]; st[24] = Rotl(t, 2); t = bc0; + bc0 = st[4]; st[4] = Rotl(t, 14); t = bc0; + bc0 = st[15]; st[15] = Rotl(t, 27); t = bc0; + bc0 = st[23]; st[23] = Rotl(t, 41); t = bc0; + bc0 = st[19]; st[19] = Rotl(t, 56); t = bc0; + bc0 = st[13]; st[13] = Rotl(t, 8); t = bc0; + bc0 = st[12]; st[12] = Rotl(t, 25); t = bc0; + bc0 = st[2]; st[2] = Rotl(t, 43); t = bc0; + bc0 = st[20]; st[20] = Rotl(t, 62); t = bc0; + bc0 = st[14]; st[14] = Rotl(t, 18); t = bc0; + bc0 = st[22]; st[22] = Rotl(t, 39); t = bc0; + bc0 = st[9]; st[9] = Rotl(t, 61); t = bc0; + bc0 = st[6]; st[6] = Rotl(t, 20); t = bc0; + st[1] = Rotl(t, 44); + + // Chi Iota + bc0 = st[0]; bc1 = st[1]; bc2 = st[2]; bc3 = st[3]; bc4 = st[4]; + st[0] = bc0 ^ (~bc1 & bc2) ^ RNDC[round]; + st[1] = bc1 ^ (~bc2 & bc3); + st[2] = bc2 ^ (~bc3 & bc4); + st[3] = bc3 ^ (~bc4 & bc0); + st[4] = bc4 ^ (~bc0 & bc1); + bc0 = st[5]; bc1 = st[6]; bc2 = st[7]; bc3 = st[8]; bc4 = st[9]; + st[5] = bc0 ^ (~bc1 & bc2); + st[6] = bc1 ^ (~bc2 & bc3); + st[7] = bc2 ^ (~bc3 & bc4); + st[8] = bc3 ^ (~bc4 & bc0); + st[9] = bc4 ^ (~bc0 & bc1); + bc0 = st[10]; bc1 = st[11]; bc2 = st[12]; bc3 = st[13]; bc4 = st[14]; + st[10] = bc0 ^ (~bc1 & bc2); + st[11] = bc1 ^ (~bc2 & bc3); + st[12] = bc2 ^ (~bc3 & bc4); + st[13] = bc3 ^ (~bc4 & bc0); + st[14] = bc4 ^ (~bc0 & bc1); + bc0 = st[15]; bc1 = st[16]; bc2 = st[17]; bc3 = st[18]; bc4 = st[19]; + st[15] = bc0 ^ (~bc1 & bc2); + st[16] = bc1 ^ (~bc2 & bc3); + st[17] = bc2 ^ (~bc3 & bc4); + st[18] = bc3 ^ (~bc4 & bc0); + st[19] = bc4 ^ (~bc0 & bc1); + bc0 = st[20]; bc1 = st[21]; bc2 = st[22]; bc3 = st[23]; bc4 = st[24]; + st[20] = bc0 ^ (~bc1 & bc2); + st[21] = bc1 ^ (~bc2 & bc3); + st[22] = bc2 ^ (~bc3 & bc4); + st[23] = bc3 ^ (~bc4 & bc0); + st[24] = bc4 ^ (~bc0 & bc1); + } +} + +SHA3_256_& SHA3_256_::Write(Span data) +{ + if (m_bufsize && m_bufsize + data.size() >= sizeof(m_buffer)) { + // Fill the buffer and process it. + std::copy(data.begin(), data.begin() + sizeof(m_buffer) - m_bufsize, m_buffer + m_bufsize); + data = data.subspan(sizeof(m_buffer) - m_bufsize); + m_state[m_pos++] ^= ReadLE64(m_buffer); + m_bufsize = 0; + if (m_pos == RATE_BUFFERS) { + KeccakF(m_state); + m_pos = 0; + } + } + while (data.size() >= sizeof(m_buffer)) { + // Process chunks directly from the buffer. + m_state[m_pos++] ^= ReadLE64(data.data()); + data = data.subspan(8); + if (m_pos == RATE_BUFFERS) { + KeccakF(m_state); + m_pos = 0; + } + } + if (data.size()) { + // Keep the remainder in the buffer. + std::copy(data.begin(), data.end(), m_buffer + m_bufsize); + m_bufsize += data.size(); + } + return *this; +} + +SHA3_256_& SHA3_256_::Finalize(Span output) +{ + assert(output.size() == OUTPUT_SIZE); + std::fill(m_buffer + m_bufsize, m_buffer + sizeof(m_buffer), 0); + m_buffer[m_bufsize] ^= 0x06; + m_state[m_pos] ^= ReadLE64(m_buffer); + m_state[RATE_BUFFERS - 1] ^= 0x8000000000000000; + KeccakF(m_state); + for (unsigned i = 0; i < 4; ++i) { + WriteLE64(output.data() + 8 * i, m_state[i]); + } + return *this; +} + +SHA3_256_& SHA3_256_::Reset() +{ + m_bufsize = 0; + m_pos = 0; + std::fill(std::begin(m_state), std::end(m_state), 0); + return *this; +} diff --git a/src/crypto/sha3.h b/src/crypto/sha3.h new file mode 100644 index 000000000..2cbd67e93 --- /dev/null +++ b/src/crypto/sha3.h @@ -0,0 +1,42 @@ +// Copyright (c) 2020 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 + +#ifndef HUSH_CRYPTO_SHA3_H +#define HUSH_CRYPTO_SHA3_H + +#include "span.h" + +#include +#include + +//! The Keccak-f[1600] transform. +void KeccakF(uint64_t (&st)[25]); + +class SHA3_256_ +{ +private: + uint64_t m_state[25] = {0}; + unsigned char m_buffer[8]; + unsigned m_bufsize = 0; + unsigned m_pos = 0; + + //! Sponge rate in bits. + static constexpr unsigned RATE_BITS = 1088; + + //! Sponge rate expressed as a multiple of the buffer size. + static constexpr unsigned RATE_BUFFERS = RATE_BITS / (8 * sizeof(m_buffer)); + + static_assert(RATE_BITS % (8 * sizeof(m_buffer)) == 0, "Rate must be a multiple of 8 bytes"); + +public: + static constexpr size_t OUTPUT_SIZE = 32; + + SHA3_256_() {} + SHA3_256_& Write(Span data); + SHA3_256_& Finalize(Span output); + SHA3_256_& Reset(); +}; + +#endif // HUSH_CRYPTO_SHA3_H diff --git a/src/gtest/json_test_vectors.h b/src/gtest/json_test_vectors.h index 82b7fda66..29049e50c 100644 --- a/src/gtest/json_test_vectors.h +++ b/src/gtest/json_test_vectors.h @@ -3,7 +3,7 @@ // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html #include -#include "utilstrencodings.h" +#include "util/strencodings.h" #include "version.h" #include "serialize.h" #include "streams.h" diff --git a/src/gtest/test_deprecation.cpp b/src/gtest/test_deprecation.cpp index af546b860..46ccc2595 100644 --- a/src/gtest/test_deprecation.cpp +++ b/src/gtest/test_deprecation.cpp @@ -11,7 +11,7 @@ #include "init.h" #include "ui_interface.h" #include "util.h" -#include "utilstrencodings.h" +#include "util/strencodings.h" #include #include diff --git a/src/gtest/test_merkletree.cpp b/src/gtest/test_merkletree.cpp index 224d69a3e..2cebf223e 100644 --- a/src/gtest/test_merkletree.cpp +++ b/src/gtest/test_merkletree.cpp @@ -19,7 +19,7 @@ #include -#include "utilstrencodings.h" +#include "util/strencodings.h" #include "version.h" #include "serialize.h" #include "streams.h" diff --git a/src/gtest/test_rpc.cpp b/src/gtest/test_rpc.cpp index c64b7604c..f6ac48d82 100644 --- a/src/gtest/test_rpc.cpp +++ b/src/gtest/test_rpc.cpp @@ -10,7 +10,7 @@ #include "primitives/block.h" #include "rpc/server.h" #include "streams.h" -#include "utilstrencodings.h" +#include "util/strencodings.h" extern UniValue blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool txDetails = false); diff --git a/src/gtest/test_txid.cpp b/src/gtest/test_txid.cpp index 6cf5dbd6c..dafc660b2 100644 --- a/src/gtest/test_txid.cpp +++ b/src/gtest/test_txid.cpp @@ -8,7 +8,7 @@ #include "streams.h" #include "uint256.h" #include "util.h" -#include "utilstrencodings.h" +#include "util/strencodings.h" /* Test that removing #1144 succeeded by verifying the hash of a transaction is over the entire serialized form. diff --git a/src/hash.h b/src/hash.h index a37c00a1d..e71fc4888 100644 --- a/src/hash.h +++ b/src/hash.h @@ -28,9 +28,7 @@ #include "serialize.h" #include "uint256.h" #include "version.h" - #include "sodium.h" - #include typedef uint256 ChainCode; @@ -48,6 +46,18 @@ public: sha.Reset().Write(buf, sha.OUTPUT_SIZE).Finalize(hash); } + CHash256& Write(Span input) { + sha.Write(input.data(), input.size()); + return *this; + } + + void Finalize(Span output) { + assert(output.size() == OUTPUT_SIZE); + unsigned char buf[CSHA256::OUTPUT_SIZE]; + sha.Finalize(buf); + sha.Reset().Write(buf, CSHA256::OUTPUT_SIZE).Finalize(output.data()); + } + CHash256& Write(const unsigned char *data, size_t len) { sha.Write(data, len); return *this; @@ -120,6 +130,23 @@ inline uint256 Hash(const T1 p1begin, const T1 p1end, return result; } +/** Compute the 256-bit hash of an object. */ +template +inline uint256 Hash(const T& in1) +{ + uint256 result; + CHash256().Write(MakeUCharSpan(in1)).Finalize(result); + return result; +} + +/** Compute the 256-bit hash of the concatenation of two objects. */ +template +inline uint256 Hash(const T1& in1, const T2& in2) { + uint256 result; + CHash256().Write(MakeUCharSpan(in1)).Write(MakeUCharSpan(in2)).Finalize(result); + return result; +} + /** Compute the 160-bit hash an object. */ template inline uint160 Hash160(const T1 pbegin, const T1 pend) @@ -178,6 +205,40 @@ public: } }; +/** Reads data from an underlying stream, while hashing the read data. */ +template +class CHashVerifier : public CHashWriter +{ +private: + Source* source; + +public: + explicit CHashVerifier(Source* source_) : CHashWriter(source_->GetType(), source_->GetVersion()), source(source_) {} + + void read(char* pch, size_t nSize) + { + source->read(pch, nSize); + this->write(pch, nSize); + } + + void ignore(size_t nSize) + { + char data[1024]; + while (nSize > 0) { + size_t now = std::min(nSize, 1024); + read(data, now); + nSize -= now; + } + } + + template + CHashVerifier& operator>>(T&& obj) + { + // Unserialize from this stream + ::Unserialize(*this, obj); + return (*this); + } +}; /** A writer stream (for serialization) that computes a 256-bit BLAKE2b hash. */ class CBLAKE2bWriter @@ -221,6 +282,7 @@ public: } }; + /** Compute the 256-bit hash of an object's serialization. */ template uint256 SerializeHash(const T& obj, int nType=SER_GETHASH, int nVersion=PROTOCOL_VERSION) @@ -230,6 +292,7 @@ uint256 SerializeHash(const T& obj, int nType=SER_GETHASH, int nVersion=PROTOCOL return ss.GetHash(); } + unsigned int MurmurHash3(unsigned int nHashSeed, const std::vector& vDataToHash); void BIP32Hash(const ChainCode &chainCode, unsigned int nChild, unsigned char header, const unsigned char data[32], unsigned char output[64]); diff --git a/src/httprpc.cpp b/src/httprpc.cpp index 5b70c3215..d9dc2ca5a 100644 --- a/src/httprpc.cpp +++ b/src/httprpc.cpp @@ -24,7 +24,7 @@ #include "random.h" #include "sync.h" #include "util.h" -#include "utilstrencodings.h" +#include "util/strencodings.h" #include "ui_interface.h" #include // boost::trim diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 2f9761a93..adcb3778d 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -7,11 +7,13 @@ #include "chainparamsbase.h" #include "compat.h" #include "util.h" +#include "util/strencodings.h" #include "netbase.h" #include "rpc/protocol.h" // For HTTP status codes #include "sync.h" #include "ui_interface.h" -#include "utilstrencodings.h" +#include "util/strencodings.h" + #include #include #include @@ -22,6 +24,7 @@ #include #include #include +#include #include #include @@ -157,6 +160,7 @@ public: boost::unique_lock lock(cs); return queue.size(); } + size_t MaxDepth() { boost::unique_lock lock(cs); @@ -167,6 +171,7 @@ public: boost::unique_lock lock(cs); return numThreads; } + }; struct HTTPPathHandler @@ -196,7 +201,6 @@ std::vector pathHandlers; //! Bound listening sockets std::vector boundSockets; - int getWorkQueueDepth() { return workQueue->Depth(); @@ -227,12 +231,17 @@ static bool ClientAllowed(const CNetAddr& netaddr) static bool InitHTTPAllowList() { rpc_allow_subnets.clear(); - rpc_allow_subnets.push_back(CSubNet("127.0.0.0/8")); // always allow IPv4 local subnet - rpc_allow_subnets.push_back(CSubNet("::1")); // always allow IPv6 localhost + CNetAddr localv4; + CNetAddr localv6; + LookupHost("127.0.0.1", localv4, false); + LookupHost("::1", localv6, false); + rpc_allow_subnets.push_back(CSubNet(localv4, 8)); // always allow IPv4 local subnet + rpc_allow_subnets.push_back(CSubNet(localv6)); // always allow IPv6 localhost if (mapMultiArgs.count("-rpcallowip")) { const std::vector& vAllow = mapMultiArgs["-rpcallowip"]; BOOST_FOREACH (std::string strAllow, vAllow) { - CSubNet subnet(strAllow); + CSubNet subnet; + LookupSubNet(strAllow.c_str(), subnet); if (!subnet.IsValid()) { uiInterface.ThreadSafeMessageBox( strprintf("Invalid -rpcallowip subnet specification: %s. Valid are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24).", strAllow), @@ -273,6 +282,16 @@ static std::string RequestMethodString(HTTPRequest::RequestMethod m) /** HTTP request callback */ static void http_request_cb(struct evhttp_request* req, void* arg) { + // Disable reading to work around a libevent bug, fixed in 2.2.0. + if (event_get_version_number() >= 0x02010600 && event_get_version_number() < 0x02020001) { + evhttp_connection* conn = evhttp_request_get_connection(req); + if (conn) { + bufferevent* bev = evhttp_connection_get_bufferevent(conn); + if (bev) { + bufferevent_disable(bev, EV_READ); + } + } + } std::unique_ptr hreq(new HTTPRequest(req)); // Early address-based allow check @@ -315,11 +334,10 @@ static void http_request_cb(struct evhttp_request* req, void* arg) if (i != iend) { std::unique_ptr item(new HTTPWorkItem(hreq.release(), path, i->handler)); assert(workQueue); - if (workQueue->Enqueue(item.get())) { + if (workQueue->Enqueue(item.get())) item.release(); /* if true, queue took ownership */ - } else { - item->req->WriteReply(HTTP_INTERNAL, strprintf("Work queue depth %d exceeded", workQueue->Depth() )); - } + else + item->req->WriteReply(HTTP_INTERNAL, "Work queue depth exceeded"); } else { hreq->WriteReply(HTTP_NOTFOUND); } @@ -541,7 +559,7 @@ struct event_base* EventBase() static void httpevent_callback_fn(evutil_socket_t, short, void* data) { // Static handler: simply call inner handler - HTTPEvent *self = ((HTTPEvent*)data); + HTTPEvent *self = static_cast(data); self->handler(); if (self->deleteWhenTriggered) delete self; @@ -628,8 +646,21 @@ void HTTPRequest::WriteReply(int nStatus, const std::string& strReply) struct evbuffer* evb = evhttp_request_get_output_buffer(req); assert(evb); evbuffer_add(evb, strReply.data(), strReply.size()); - HTTPEvent* ev = new HTTPEvent(eventBase, true, - boost::bind(evhttp_send_reply, req, nStatus, (const char*)NULL, (struct evbuffer *)NULL)); + auto req_copy = req; + HTTPEvent* ev = new HTTPEvent(eventBase, true, [req_copy, nStatus]{ + evhttp_send_reply(req_copy, nStatus, (const char*)NULL, (struct evbuffer *)NULL); + // Re-enable reading from the socket. This is the second part of the libevent + // workaround above. + if (event_get_version_number() >= 0x02010600 && event_get_version_number() < 0x02020001) { + evhttp_connection* conn = evhttp_request_get_connection(req_copy); + if (conn) { + bufferevent* bev = evhttp_connection_get_bufferevent(conn); + if (bev) { + bufferevent_enable(bev, EV_READ | EV_WRITE); + } + } + } + }); ev->trigger(0); replySent = true; req = 0; // transferred back to main thread @@ -644,7 +675,7 @@ CService HTTPRequest::GetPeer() const char* address = ""; uint16_t port = 0; evhttp_connection_get_peer(con, (char**)&address, &port); - peer = CService(address, port); + peer = LookupNumeric(address, port); } return peer; } diff --git a/src/hush-tx.cpp b/src/hush-tx.cpp index 6d3f2f94c..bb0d3dab7 100644 --- a/src/hush-tx.cpp +++ b/src/hush-tx.cpp @@ -29,7 +29,7 @@ #include #include "util.h" #include "utilmoneystr.h" -#include "utilstrencodings.h" +#include "util/strencodings.h" #include #include #include diff --git a/src/i2p.cpp b/src/i2p.cpp new file mode 100644 index 000000000..e8de66a81 --- /dev/null +++ b/src/i2p.cpp @@ -0,0 +1,441 @@ +// Copyright (c) 2020-2020 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +namespace i2p { + +/** + * Swap Standard Base64 <-> I2P Base64. + * Standard Base64 uses `+` and `/` as last two characters of its alphabet. + * I2P Base64 uses `-` and `~` respectively. + * So it is easy to detect in which one is the input and convert to the other. + * @param[in] from Input to convert. + * @return converted `from` + */ +static std::string SwapBase64(const std::string& from) +{ + std::string to; + to.resize(from.size()); + for (size_t i = 0; i < from.size(); ++i) { + switch (from[i]) { + case '-': + to[i] = '+'; + break; + case '~': + to[i] = '/'; + break; + case '+': + to[i] = '-'; + break; + case '/': + to[i] = '~'; + break; + default: + to[i] = from[i]; + break; + } + } + return to; +} + +/** + * Decode an I2P-style Base64 string. + * @param[in] i2p_b64 I2P-style Base64 string. + * @return decoded `i2p_b64` + * @throw std::runtime_error if decoding fails + */ +static Binary DecodeI2PBase64(const std::string& i2p_b64) +{ + const std::string& std_b64 = SwapBase64(i2p_b64); + bool invalid; + Binary decoded = DecodeBase64(std_b64.c_str(), &invalid); + if (invalid) { + throw std::runtime_error(strprintf("Cannot decode Base64: \"%s\"", i2p_b64)); + } + return decoded; +} + +/** + * Derive the .b32.i2p address of an I2P destination (binary). + * @param[in] dest I2P destination. + * @return the address that corresponds to `dest` + * @throw std::runtime_error if conversion fails + */ +static CNetAddr DestBinToAddr(const Binary& dest) +{ + CSHA256 hasher; + hasher.Write(dest.data(), dest.size()); + unsigned char hash[CSHA256::OUTPUT_SIZE]; + hasher.Finalize(hash); + + CNetAddr addr; + const std::string addr_str = EncodeBase32(hash, false) + ".b32.i2p"; + if (!addr.SetSpecial(addr_str)) { + throw std::runtime_error(strprintf("Cannot parse I2P address: \"%s\"", addr_str)); + } + + return addr; +} + +/** + * Derive the .b32.i2p address of an I2P destination (I2P-style Base64). + * @param[in] dest I2P destination. + * @return the address that corresponds to `dest` + * @throw std::runtime_error if conversion fails + */ +static CNetAddr DestB64ToAddr(const std::string& dest) +{ + const Binary& decoded = DecodeI2PBase64(dest); + return DestBinToAddr(decoded); +} + +namespace sam { + +Session::Session(const fs::path& private_key_file, + const CService& control_host) + : m_private_key_file(private_key_file), m_control_host(control_host), + m_control_sock(std::unique_ptr(new Sock(INVALID_SOCKET))) +{ +} + +Session::~Session() +{ +} + +bool Session::Check() +{ + try { + LOCK(cs_i2p); + CreateIfNotCreatedAlready(); + return true; + } catch (const std::runtime_error& e) { + LogPrint("i2p","I2P: Error Checking Session: %s\n", e.what()); + CheckControlSock(); + } + return false; +} + +bool Session::Listen(Connection& conn) +{ + try { + LOCK(cs_i2p); + CreateIfNotCreatedAlready(); + conn.me = m_my_addr; + conn.sock = StreamAccept(); + return true; + } catch (const std::runtime_error& e) { + LogPrint("i2p","I2P: Error listening: %s\n", e.what()); + CheckControlSock(); + } + return false; +} + +bool Session::Accept(Connection& conn) +{ + try { + while (true) { + + // boost::this_thread::interruption_point(); + if (ShutdownRequested()) { + Disconnect(); + return false; + } + + + Sock::Event occurred; + if (!conn.sock->Wait(std::chrono::milliseconds{MAX_WAIT_FOR_IO}, Sock::RECV, &occurred)) { + throw std::runtime_error("wait on socket failed"); + } + + if ((occurred & Sock::RECV) == 0) { + // Timeout, no incoming connections within MAX_WAIT_FOR_IO. + continue; + } + + const std::string& peer_dest = + conn.sock->RecvUntilTerminator('\n', std::chrono::milliseconds{MAX_WAIT_FOR_IO}, MAX_MSG_SIZE); + + if (ShutdownRequested()) { + Disconnect(); + return false; + } + + conn.peer = CService(DestB64ToAddr(peer_dest), Params().GetDefaultPort()); + return true; + } + } catch (const std::runtime_error& e) { + LogPrint("i2p","I2P: Error accepting: %s\n", e.what()); + CheckControlSock(); + } + return false; +} + +bool Session::Connect(const CService& to, Connection& conn, bool& proxy_error) +{ + proxy_error = true; + + std::string session_id; + std::unique_ptr sock; + conn.peer = to; + + try { + { + LOCK(cs_i2p); + CreateIfNotCreatedAlready(); + session_id = m_session_id; + conn.me = m_my_addr; + sock = Hello(); + } + + const Reply& lookup_reply = + SendRequestAndGetReply(*sock, strprintf("NAMING LOOKUP NAME=%s", to.ToStringIP())); + + const std::string& dest = lookup_reply.Get("VALUE"); + + const Reply& connect_reply = SendRequestAndGetReply( + *sock, strprintf("STREAM CONNECT ID=%s DESTINATION=%s SILENT=false", session_id, dest), + false); + + const std::string& result = connect_reply.Get("RESULT"); + + if (result == "OK") { + conn.sock = std::move(sock); + return true; + } + + if (result == "INVALID_ID") { + LOCK(cs_i2p); + Disconnect(); + throw std::runtime_error("Invalid session id"); + } + + if (result == "CANT_REACH_PEER" || result == "TIMEOUT" || "KEY_NOT_FOUND") { + proxy_error = false; + } + + throw std::runtime_error(strprintf("\"%s\"", connect_reply.full)); + } catch (const std::runtime_error& e) { + LogPrint("i2p","I2P: Error connecting to %s: %s\n", to.ToString(), e.what()); + CheckControlSock(); + return false; + } +} + +// Private methods + +std::string Session::Reply::Get(const std::string& key) const +{ + const auto& pos = keys.find(key); + if (pos == keys.end() || !pos->second.has_value()) { + throw std::runtime_error( + strprintf("Missing %s= in the reply to \"%s\": \"%s\"", key, request, full)); + } + return pos->second.value(); +} + +Session::Reply Session::SendRequestAndGetReply(const Sock& sock, + const std::string& request, + bool check_result_ok) const +{ + sock.SendComplete(request + "\n", std::chrono::milliseconds{MAX_WAIT_FOR_IO}); + + Reply reply; + + // Don't log the full "SESSION CREATE ..." because it contains our private key. + reply.request = request.substr(0, 14) == "SESSION CREATE" ? "SESSION CREATE ..." : request; + + // It could take a few minutes for the I2P router to reply as it is querying the I2P network + // (when doing name lookup, for example). + + reply.full = sock.RecvUntilTerminator('\n', std::chrono::minutes{3}, MAX_MSG_SIZE); + + for (const auto& kv : spanparsing::Split(reply.full, ' ')) { + const auto& pos = std::find(kv.begin(), kv.end(), '='); + if (pos != kv.end()) { + reply.keys.emplace(std::string{kv.begin(), pos}, std::string{pos + 1, kv.end()}); + } else { + reply.keys.emplace(std::string{kv.begin(), kv.end()}, boost::none); + } + } + + LogPrint("i2p","I2P: Handshake reply %s\n", reply.full); + + if (check_result_ok && reply.Get("RESULT") != "OK") { + if (!ShutdownRequested()) { + throw std::runtime_error(strprintf("Unexpected reply to \"%s\": \"%s\"", request, reply.full)); + } + } + + return reply; +} + +std::unique_ptr Session::Hello() const +{ + auto sock = CreateSock(m_control_host); + + if (!sock) { + throw std::runtime_error("Cannot create socket"); + } + + if (!ConnectSocketDirectly(m_control_host, *sock, nConnectTimeout)) { + throw std::runtime_error(strprintf("Cannot connect to %s", m_control_host.ToString())); + } + + SendRequestAndGetReply(*sock, "HELLO VERSION MIN=3.1 MAX=3.1"); + + return sock; +} + +void Session::CheckControlSock() +{ + LOCK(cs_i2p); + + std::string errmsg; + if (!m_control_sock->IsConnected(errmsg)) { + LogPrint("i2p","I2P: Control socket error: %s\n", errmsg); + Disconnect(); + } +} + +void Session::DestGenerate(const Sock& sock) +{ + // https://geti2p.net/spec/common-structures#key-certificates + // "7" or "EdDSA_SHA512_Ed25519" - "Recent Router Identities and Destinations". + // Use "7" because i2pd <2.24.0 does not recognize the textual form. + const Reply& reply = SendRequestAndGetReply(sock, "DEST GENERATE SIGNATURE_TYPE=7", false); + + m_private_key = DecodeI2PBase64(reply.Get("PRIV")); +} + +void Session::GenerateAndSavePrivateKey(const Sock& sock) +{ + DestGenerate(sock); + + // umask is set to 077 in init.cpp, which is ok (unless -sysperms is given) + if (!WriteBinaryFile(m_private_key_file, + std::string(m_private_key.begin(), m_private_key.end()))) { + throw std::runtime_error( + strprintf("Cannot save I2P private key to %s", m_private_key_file)); + } +} + +Binary Session::MyDestination() const +{ + // From https://geti2p.net/spec/common-structures#destination: + // "They are 387 bytes plus the certificate length specified at bytes 385-386, which may be + // non-zero" + static constexpr size_t DEST_LEN_BASE = 387; + static constexpr size_t CERT_LEN_POS = 385; + + uint16_t cert_len; + memcpy(&cert_len, &m_private_key.at(CERT_LEN_POS), sizeof(cert_len)); + cert_len = be16toh(cert_len); + + const size_t dest_len = DEST_LEN_BASE + cert_len; + + return Binary{m_private_key.begin(), m_private_key.begin() + dest_len}; +} + +void Session::CreateIfNotCreatedAlready() +{ + LOCK(cs_i2p); + + std::string errmsg; + if (m_control_sock->IsConnected(errmsg)) { + return; + } + + LogPrint("i2p","I2P: Creating SAM session with %s\n", m_control_host.ToString()); + + auto sock = Hello(); + + const std::pair i2pRead = ReadBinaryFile(m_private_key_file); + if (i2pRead.first) { + m_private_key.assign(i2pRead.second.begin(), i2pRead.second.end()); + } else { + GenerateAndSavePrivateKey(*sock); + } + + const std::string& session_id = GetRandHash().GetHex().substr(0, 10); // full is an overkill, too verbose in the logs + const std::string& private_key_b64 = SwapBase64(EncodeBase64(m_private_key)); + + SendRequestAndGetReply(*sock, strprintf("SESSION CREATE STYLE=STREAM ID=%s DESTINATION=%s", + session_id, private_key_b64)); + + m_my_addr = CService(DestBinToAddr(MyDestination()), Params().GetDefaultPort()); + m_session_id = session_id; + m_control_sock = std::move(sock); + + LogPrint("i2p","I2P: SAM session created: session id=%s, my address=%s\n", m_session_id, + m_my_addr.ToString()); +} + +std::unique_ptr Session::StreamAccept() +{ + auto sock = Hello(); + + const Reply& reply = SendRequestAndGetReply( + *sock, strprintf("STREAM ACCEPT ID=%s SILENT=false", m_session_id), false); + + const std::string& result = reply.Get("RESULT"); + + if (result == "OK") { + return sock; + } + + if (result == "INVALID_ID") { + // If our session id is invalid, then force session re-creation on next usage. + Disconnect(); + } + + throw std::runtime_error(strprintf("\"%s\"", reply.full)); +} + +void Session::Disconnect() +{ + LOCK(cs_i2p); + try + { + if (m_control_sock->Get() != INVALID_SOCKET) { + if (m_session_id.empty()) { + LogPrint("i2p","I2P: Destroying incomplete session\n"); + } else { + LogPrint("i2p","I2P: Destroying session %s\n", m_session_id); + } + } + m_control_sock->Reset(); + m_session_id.clear(); + } + catch(std::bad_alloc&) + { + // when the node is shutting down, the call above might use invalid memory resulting in a + // std::bad_alloc exception when instantiating internal objs for handling log category + LogPrintf("(node is probably shutting down) Destroying session=%d\n", m_session_id); + } + + +} +} // namespace sam +} // namespace i2p diff --git a/src/i2p.h b/src/i2p.h new file mode 100644 index 000000000..8c1e0539c --- /dev/null +++ b/src/i2p.h @@ -0,0 +1,256 @@ +// Copyright (c) 2020-2020 The Bitcoin Core developers +// Copyright (c) 2016-2022 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 + +#ifndef HUSH_I2P_H +#define HUSH_I2P_H + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +namespace i2p { + +/** + * Binary data. + */ +using Binary = std::vector; + +/** + * An established connection with another peer. + */ +struct Connection { + /** Connected socket. */ + std::unique_ptr sock; + + /** Our I2P address. */ + CService me; + + /** The peer's I2P address. */ + CService peer; +}; + +namespace sam { + +/** + * The maximum size of an incoming message from the I2P SAM proxy (in bytes). + * Used to avoid a runaway proxy from sending us an "unlimited" amount of data without a terminator. + * The longest known message is ~1400 bytes, so this is high enough not to be triggered during + * normal operation, yet low enough to avoid a malicious proxy from filling our memory. + */ +static constexpr size_t MAX_MSG_SIZE{65536}; + +/** + * I2P SAM session. + */ +class Session +{ +public: + /** + * Construct a session. This will not initiate any IO, the session will be lazily created + * later when first used. + * @param[in] private_key_file Path to a private key file. If the file does not exist then the + * private key will be generated and saved into the file. + * @param[in] control_host Location of the SAM proxy. + */ + Session(const fs::path& private_key_file, + const CService& control_host); + + /** + * Destroy the session, closing the internally used sockets. The sockets that have been + * returned by `Accept()` or `Connect()` will not be closed, but they will be closed by + * the SAM proxy because the session is destroyed. So they will return an error next time + * we try to read or write to them. + */ + ~Session(); + + /** + * Check the control sock and restart if needed + */ + bool Check(); + + /** + * Start listening for an incoming connection. + * @param[out] conn Upon successful completion the `sock` and `me` members will be set + * to the listening socket and address. + * @return true on success + */ + bool Listen(Connection& conn); + + /** + * Wait for and accept a new incoming connection. + * @param[in,out] conn The `sock` member is used for waiting and accepting. Upon successful + * completion the `peer` member will be set to the address of the incoming peer. + * @return true on success + */ + bool Accept(Connection& conn); + + /** + * Connect to an I2P peer. + * @param[in] to Peer to connect to. + * @param[out] conn Established connection. Only set if `true` is returned. + * @param[out] proxy_error If an error occurs due to proxy or general network failure, then + * this is set to `true`. If an error occurs due to unreachable peer (likely peer is down), then + * it is set to `false`. Only set if `false` is returned. + * @return true on success + */ + bool Connect(const CService& to, Connection& conn, bool& proxy_error); + +protected: + + CCriticalSection cs_i2p; + +private: + /** + * A reply from the SAM proxy. + */ + struct Reply { + /** + * Full, unparsed reply. + */ + std::string full; + + /** + * Request, used for detailed error reporting. + */ + std::string request; + + /** + * A map of keywords from the parsed reply. + * For example, if the reply is "A=X B C=YZ", then the map will be + * keys["A"] == "X" + * keys["B"] == (empty std::optional) + * keys["C"] == "YZ" + */ + std::unordered_map> keys; + + /** + * Get the value of a given key. + * For example if the reply is "A=X B" then: + * Value("A") -> "X" + * Value("B") -> throws + * Value("C") -> throws + * @param[in] key Key whose value to retrieve + * @returns the key's value + * @throws std::runtime_error if the key is not present or if it has no value + */ + std::string Get(const std::string& key) const; + }; + + /** + * Send request and get a reply from the SAM proxy. + * @param[in] sock A socket that is connected to the SAM proxy. + * @param[in] request Raw request to send, a newline terminator is appended to it. + * @param[in] check_result_ok If true then after receiving the reply a check is made + * whether it contains "RESULT=OK" and an exception is thrown if it does not. + * @throws std::runtime_error if an error occurs + */ + Reply SendRequestAndGetReply(const Sock& sock, + const std::string& request, + bool check_result_ok = true) const; + + /** + * Open a new connection to the SAM proxy. + * @return a connected socket + * @throws std::runtime_error if an error occurs + */ + std::unique_ptr Hello() const EXCLUSIVE_LOCKS_REQUIRED(cs_i2p); + + /** + * Check the control socket for errors and possibly disconnect. + */ + void CheckControlSock(); + + /** + * Generate a new destination with the SAM proxy and set `m_private_key` to it. + * @param[in] sock Socket to use for talking to the SAM proxy. + * @throws std::runtime_error if an error occurs + */ + void DestGenerate(const Sock& sock) EXCLUSIVE_LOCKS_REQUIRED(cs_i2p); + + /** + * Generate a new destination with the SAM proxy, set `m_private_key` to it and save + * it on disk to `m_private_key_file`. + * @param[in] sock Socket to use for talking to the SAM proxy. + * @throws std::runtime_error if an error occurs + */ + void GenerateAndSavePrivateKey(const Sock& sock) EXCLUSIVE_LOCKS_REQUIRED(cs_i2p); + + /** + * Derive own destination from `m_private_key`. + * @see https://geti2p.net/spec/common-structures#destination + * @return an I2P destination + */ + Binary MyDestination() const EXCLUSIVE_LOCKS_REQUIRED(cs_i2p); + + /** + * Create the session if not already created. Reads the private key file and connects to the + * SAM proxy. + * @throws std::runtime_error if an error occurs + */ + void CreateIfNotCreatedAlready() EXCLUSIVE_LOCKS_REQUIRED(cs_i2p); + + /** + * Open a new connection to the SAM proxy and issue "STREAM ACCEPT" request using the existing + * session id. + * @return the idle socket that is waiting for a peer to connect to us + * @throws std::runtime_error if an error occurs + */ + std::unique_ptr StreamAccept() EXCLUSIVE_LOCKS_REQUIRED(cs_i2p); + + /** + * Destroy the session, closing the internally used sockets. + */ + void Disconnect() EXCLUSIVE_LOCKS_REQUIRED(cs_i2p); + + /** + * The name of the file where this peer's private key is stored (in binary). + */ + const fs::path m_private_key_file; + + /** + * The host and port of the SAM control service. + */ + const CService m_control_host; + + /** + * The private key of this peer. + * @see The reply to the "DEST GENERATE" command in https://geti2p.net/en/docs/api/samv3 + */ + Binary m_private_key GUARDED_BY(cs_i2p); + + /** + * SAM control socket. + * Used to connect to the I2P SAM service and create a session + * ("SESSION CREATE"). With the established session id we later open + * other connections to the SAM service to accept incoming I2P + * connections and make outgoing ones. + * See https://geti2p.net/en/docs/api/samv3 + */ + std::unique_ptr m_control_sock GUARDED_BY(cs_i2p); + + /** + * Our .b32.i2p address. + * Derived from `m_private_key`. + */ + CService m_my_addr GUARDED_BY(cs_i2p); + + /** + * SAM session id. + */ + std::string m_session_id GUARDED_BY(cs_i2p); +}; + +} // namespace sam +} // namespace i2p + +#endif /* HUSH_I2P_H */ diff --git a/src/init.cpp b/src/init.cpp index 6fe9c9299..ed9359f2c 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -246,14 +246,22 @@ void Shutdown() if (pcoinsTip != NULL) { FlushStateToDisk(); } - delete pcoinsTip; - pcoinsTip = NULL; - delete pcoinscatcher; - pcoinscatcher = NULL; - delete pcoinsdbview; - pcoinsdbview = NULL; - delete pblocktree; - pblocktree = NULL; + if (pcoinsTip != NULL) { + delete pcoinsTip; + pcoinsTip = NULL; + } + if (pcoinscatcher != NULL) { + delete pcoinscatcher; + pcoinscatcher = NULL; + } + if (pcoinsdbview != NULL) { + delete pcoinsdbview; + pcoinsdbview = NULL; + } + if (pblocktree != NULL) { + delete pblocktree; + pblocktree = NULL; + } } #ifdef ENABLE_WALLET if (pwalletMain) @@ -274,7 +282,7 @@ void Shutdown() #endif globalVerifyHandle.reset(); ECC_Stop(); - CNode::NetCleanup(); + // CNode::NetCleanup(); LogPrintf("%s: done\n", __func__); } @@ -325,7 +333,7 @@ bool static InitWarning(const std::string &str) } bool static Bind(const CService &addr, unsigned int flags) { - if (!(flags & BF_EXPLICIT) && IsLimited(addr)) + if (!(flags & BF_EXPLICIT) && !IsReachable(addr)) return false; std::string strError; if (!BindListenPort(addr, strError, (flags & BF_ALLOWLIST) != 0)) { @@ -416,7 +424,14 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-maxreceivebuffer=", strprintf(_("Maximum per-connection receive buffer, *1000 bytes (default: %u)"), 5000)); strUsage += HelpMessageOpt("-maxsendbuffer=", strprintf(_("Maximum per-connection send buffer, *1000 bytes (default: %u)"), 1000)); strUsage += HelpMessageOpt("-onion=", strprintf(_("Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)"), "-proxy")); - strUsage += HelpMessageOpt("-onlynet=", _("Only connect to nodes in network (ipv4, ipv6 or onion)")); + strUsage += HelpMessageOpt("-nspv_msg", strprintf(_("Enable NSPV messages processing (default: true when -ac_private=1, otherwise false)"))); + + strUsage += HelpMessageOpt("-i2psam=", strprintf(_("I2P SAM proxy to reach I2P peers and accept I2P connections (default: none)"))); + strUsage += HelpMessageOpt("-i2pacceptincoming", strprintf(_("If set and -i2psam is also set then incoming I2P connections are accepted via the SAM proxy. If this is not set but -i2psam is set then only outgoing connections will be made to the I2P network. Ignored if -i2psam is not set. Listening for incoming I2P connections is done through the SAM proxy, not by binding to a local address and port (default: 1)"))); + strUsage += HelpMessageOpt("-onlynet=", _("Only connect to nodes in network (ipv4, ipv6, onion or i2p)")); + strUsage += HelpMessageOpt("-disableipv4", _("Disable Ipv4 network connections") + " " + _("(default: 0)")); + strUsage += HelpMessageOpt("-disableipv6", _("Disable Ipv6 network connections") + " " + _("(default: 0)")); + strUsage += HelpMessageOpt("-permitbaremultisig", strprintf(_("Relay non-P2SH multisig (default: %u)"), 1)); strUsage += HelpMessageOpt("-peerbloomfilters", strprintf(_("Support filtering of blocks and transaction with Bloom filters (default: %u)"), 1)); if (showDebug) @@ -1609,14 +1624,15 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) for (int n = 0; n < NET_MAX; n++) { enum Network net = (enum Network)n; if (!nets.count(net)) - SetLimited(net); + SetReachable(net, false); } } //fprintf(stderr,"%s tik19\n", __FUNCTION__); if (mapArgs.count("-allowlist")) { BOOST_FOREACH(const std::string& net, mapMultiArgs["-allowlist"]) { - CSubNet subnet(net); + CSubNet subnet; + LookupSubNet(net.c_str(), subnet); if (!subnet.IsValid()) return InitError(strprintf(_("Invalid netmask specified in -allowlist: '%s'"), net)); CNode::AddAllowlistedRange(subnet); @@ -1627,9 +1643,10 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) // -proxy sets a proxy for all outgoing network traffic // -noproxy (or -proxy=0) as well as the empty string can be used to not set a proxy, this is the default std::string proxyArg = GetArg("-proxy", ""); - SetLimited(NET_ONION); + SetReachable(NET_ONION,false); if (proxyArg != "" && proxyArg != "0") { - proxyType addrProxy = proxyType(CService(proxyArg, 9050), proxyRandomize); + CService resolved(LookupNumeric(proxyArg.c_str(), 9050)); + proxyType addrProxy = proxyType(resolved, proxyRandomize); if (!addrProxy.IsValid()) return InitError(strprintf(_("Invalid -proxy address: '%s'"), proxyArg)); @@ -1637,9 +1654,20 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) SetProxy(NET_IPV6, addrProxy); SetProxy(NET_ONION, addrProxy); SetNameProxy(addrProxy); - SetLimited(NET_ONION, false); // by default, -proxy sets onion as reachable, unless -noonion later + SetReachable(NET_ONION, true); // by default, -proxy sets onion as reachable, unless -noonion later + } + + const std::string& i2psam_arg = GetArg("-i2psam", ""); + if (!i2psam_arg.empty()) { + CService addr; + if (!Lookup(i2psam_arg.c_str(), addr, 7656, fNameLookup) || !addr.IsValid()) { + return InitError(strprintf(_("Invalid -i2psam address or hostname: '%s'"), i2psam_arg)); + } + SetReachable(NET_I2P, true); + SetProxy(NET_I2P, proxyType{addr}); + } else { + SetReachable(NET_I2P, false); } - //fprintf(stderr,"%s tik20\n", __FUNCTION__); // -onion can be used to set only a proxy for .onion, or override normal proxy for .onion addresses // -noonion (or -onion=0) disables connecting to .onion entirely @@ -1647,13 +1675,14 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) std::string onionArg = GetArg("-onion", ""); if (onionArg != "") { if (onionArg == "0") { // Handle -noonion/-onion=0 - SetLimited(NET_ONION); // set onions as unreachable + SetReachable(NET_ONION,false); // set onions as unreachable } else { - proxyType addrOnion = proxyType(CService(onionArg, 9050), proxyRandomize); + CService resolved(LookupNumeric(onionArg.c_str(), 9050)); + proxyType addrOnion = proxyType(resolved, proxyRandomize); if (!addrOnion.IsValid()) return InitError(strprintf(_("Invalid -onion address: '%s'"), onionArg)); SetProxy(NET_ONION, addrOnion); - SetLimited(NET_ONION, false); + SetReachable(NET_ONION, true); } } @@ -1692,10 +1721,12 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) if (mapArgs.count("-externalip")) { BOOST_FOREACH(const std::string& strAddr, mapMultiArgs["-externalip"]) { - CService addrLocal(strAddr, GetListenPort(), fNameLookup); - if (!addrLocal.IsValid()) + CService addrLocal; + if (Lookup(strAddr.c_str(), addrLocal, GetListenPort(), fNameLookup) && addrLocal.IsValid()) { + AddLocal(addrLocal, LOCAL_MANUAL); + } else { return InitError(strprintf(_("Cannot resolve -externalip address: '%s'"), strAddr)); - AddLocal(CService(strAddr, GetListenPort(), fNameLookup), LOCAL_MANUAL); + } } } diff --git a/src/key_io.cpp b/src/key_io.cpp index c3d5471d5..88477a834 100644 --- a/src/key_io.cpp +++ b/src/key_io.cpp @@ -9,7 +9,7 @@ #include #include #include