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/ 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/DEVELOPING.md b/DEVELOPING.md index 0aae790f5..1de87fcc6 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -78,13 +78,13 @@ 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 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/Dockerfile b/Dockerfile index e1323ec2f..a0334a6f6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2023 The 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 @@ -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/INSTALL.md b/INSTALL.md index 114ef1775..c13109788 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -24,8 +24,8 @@ 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 \ - bsdmainutils automake curl unzip nano libsodium-dev + 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 cd hush3 diff --git a/Makefile.am b/Makefile.am index bc04a0cdd..01c95f8b7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -# Copyright 2016-2021 The Hush developers +# Copyright 2016-2023 The Hush developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html @@ -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 @@ -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) @@ -247,4 +247,11 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-man clean-local: rm -rf test_bitcoin.coverage/ total.coverage/ +seeds: + ./contrib/seeds/generate-seeds.py contrib/seeds > src/chainparamsseeds.h + +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/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, diff --git a/README.md b/README.md index 31e5cbb61..2a2bd9431 100644 --- a/README.md +++ b/README.md @@ -42,9 +42,11 @@ Please refer to the instructions which apply to you below: If you have an older wallet, then refer to [OLD_WALLETS.md](OLD_WALLETS.md). -### Official Explorer +### Official Explorers -The link for the Official Hush explorer is: [explorer.hush.is](https://explorer.hush.is) +The links for the Official Hush explorers: + * [explorer.hush.is](https://explorer.hush.is) + * [explorer.hush.land](https://explorer.hush.land) We are looking for alternate explorers to be run on Tor, i2P and other TLDs, if you are interested please join Telegram and ask questions. @@ -62,9 +64,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 diff --git a/autogen.sh b/autogen.sh index 6932fae53..3bb329a96 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2023 The 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/build.sh b/build.sh index 864a20548..7bdf5f93d 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,19 @@ -#!/bin/bash -# Copyright (c) 2016-2021 The Hush developers +#!/usr/bin/env bash +# Copyright (c) 2016-2023 The 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 -eu -o pipefail -./zcutil/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 diff --git a/configure.ac b/configure.ac index 794c486c0..aa424d534 100644 --- a/configure.ac +++ b/configure.ac @@ -1,13 +1,14 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 3) +dnl Must be kept in sync with src/clientversion.h , ugh! define(_CLIENT_VERSION_MINOR, 9) -define(_CLIENT_VERSION_REVISION, 1) +define(_CLIENT_VERSION_REVISION, 3) define(_CLIENT_VERSION_BUILD, 50) define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50))) define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1))) define(_CLIENT_VERSION_IS_RELEASE, true) -define(_COPYRIGHT_YEAR, 2021) +define(_COPYRIGHT_YEAR, 2023) 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]) @@ -151,12 +152,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)])], @@ -227,6 +222,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], @@ -247,6 +265,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*) @@ -673,15 +701,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,34 +737,13 @@ 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 # 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)]) @@ -824,8 +822,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]) @@ -853,6 +849,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]) @@ -894,7 +891,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 +940,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/README.md b/contrib/README.md index 916e4d094..36c04c969 100644 --- a/contrib/README.md +++ b/contrib/README.md @@ -6,10 +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 -checkpoints.pl - generate checkpoint data for main.cpp -block\_time.pl - estimate when a Hush block will happen ## Wallet Tools diff --git a/contrib/block_time.pl b/contrib/block_time.pl index 1b8c13351..1b7c6a914 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 +#!/usr/bin/env perl +# Copyright (c) 2016-2023 The 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; @@ -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)) { @@ -19,7 +22,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; diff --git a/contrib/checkpoints.pl b/contrib/checkpoints.pl deleted file mode 100755 index ec0dd919d..000000000 --- a/contrib/checkpoints.pl +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/perl -# 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 -use warnings; -use strict; - -# Generate checkpoint data for use in src/chainparams.cpp -my $perday = 1152; -my $hush = "./src/hush-cli"; -my $gethash = "$hush getblockhash"; -my $stride = shift || 1000; -my $count = 0; -my $blocks = qx{$hush getblockcount}; -if($?) { - print "ERROR, exiting...\n"; - exit 1; -} -my $prev = $blocks - $perday; -my $last = 0; -my $now = time(); -chomp($blocks); - -print "// Generated at $now via hush3 contrib/checkpoints.pl by Duke Leto\n"; - -while (1) { - $count++; - my $block = $stride*$count; - if ($block > $blocks) { - $last = $stride*($count-1); - #print "last checkpointed block=$last\n"; - last; - } - my $blockhash = qx{$gethash $block}; - chomp $blockhash; - print qq{($block, uint256S("0x$blockhash"))\n}; -} -my $time = qx{$hush getblock $last |grep time|cut -d: -f2| sed 's/,//g'}; -chomp($time); -# TODO: This is Linux-only and assumes new (not legacy) dir -my $line1 = qx{grep --text height=$prev ~/.hush/HUSH3/debug.log}; -my $line2 = qx{grep --text height=$blocks ~/.hush/HUSH3/debug.log}; -my $txs_per_day = 2 * $perday; # default estimate is 2 txs per block, on average -my $total_txs = 0; -#print "line1: $line1\n"; -#print "line2: $line2\n"; - -# This will calculate the number of txs in the previous day to the last checkpointed block -if ($line1 =~ m/tx=(\d+)/) { - my $tx1 = $1; # number of txs in the block 1 day ago - #print "prevblock has $tx1 txs\n"; - if ($line2 =~ m/tx=(\d+)/) { - $total_txs = $1; - # TODO: average of last N days might be better - $txs_per_day = $total_txs - $tx1; - } -} -print ",(int64_t) $time, // time of last checkpointed block\n"; -print "(int64_t) $total_txs, // total txs\n"; -print "(double) $txs_per_day // txs in the last day before block $blocks\n"; diff --git a/contrib/debian/copyright b/contrib/debian/copyright index f2d71c287..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 @@ -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/devtools/README.md b/contrib/devtools/README.md deleted file mode 100644 index fa03b6cff..000000000 --- a/contrib/devtools/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# Contrib Devtools - -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 contrib/devtools/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 - -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. - -## 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/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" diff --git a/contrib/fresh_clone_compile_and_run.sh b/contrib/fresh_clone_compile_and_run.sh old mode 100644 new mode 100755 index 54fc69ed6..5566e4474 --- a/contrib/fresh_clone_compile_and_run.sh +++ b/contrib/fresh_clone_compile_and_run.sh @@ -1,19 +1,28 @@ -#!/bin/bash -# Copyright (c) 2016-2021 The Hush developers +#!/usr/bin/env bash +# Copyright (c) 2016-2023 The 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 +# TODO: default to master branch with 2 jobs + +# we don't want this for our build.sh and make commands +#set -eu -o pipefail + +BRANCH=$1 + git clone https://git.hush.is/hush/hush3 cd hush3 -# Build with 2 cores +git checkout $BRANCH # 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 diff --git a/contrib/gen-zaddrs.pl b/contrib/gen-zaddrs.pl new file mode 100755 index 000000000..801cc680a --- /dev/null +++ b/contrib/gen-zaddrs.pl @@ -0,0 +1,17 @@ +#!/usr/bin/env perl +# Copyright 2019-2023 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++; +} 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/hush_halvings b/contrib/hush_halvings index 80bb24b04..4d93cfce4 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-2023 The Hush developers # Released under the GPLv3 use strict; diff --git a/contrib/hush_scanner b/contrib/hush_scanner index 6ec4300b9..5f92586f5 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-2023 The 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..8f3705d81 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-2023 The Hush developers # Released under the GPLv3 use warnings; use strict; 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.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/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/contrib/macdeploy/SDBackground.png b/contrib/macdeploy/SDBackground.png new file mode 100644 index 000000000..e990d50ae Binary files /dev/null and b/contrib/macdeploy/SDBackground.png differ diff --git a/contrib/macdeploy/sd-macdeploy.command b/contrib/macdeploy/sd-macdeploy.command new file mode 100755 index 000000000..eec6b8fa5 --- /dev/null +++ b/contrib/macdeploy/sd-macdeploy.command @@ -0,0 +1,136 @@ +#!/bin/bash + +# by Andy Maloney +# http://asmaloney.com/2013/07/howto/packaging-a-mac-os-x-application-using-a-dmg/ + +# make sure we are in the correct dir when we double-click a .command file +dir=${0%/*} +if [ -d "$dir" ]; then + cd "$dir" +fi + +# set up your app name, version number, and background image file name +APP_NAME="SilentDragon" +VERSION="1.3.0" +DMG_BACKGROUND_IMG="SDBackground.png" + +# you should not need to change these +APP_EXE="${APP_NAME}.app/Contents/MacOS/${APP_NAME}" + +VOL_NAME="${APP_NAME} ${VERSION}" # volume name will be "SilentDragon 1.3.0" +DMG_TMP="${VOL_NAME}-temp.dmg" +DMG_FINAL="${VOL_NAME}.dmg" # final DMG name will be "SilentDragon 1.3.0.dmg" +STAGING_DIR="./Install" # we copy all our stuff into this dir + +# Check the background image DPI and convert it if it isn't 72x72 +_BACKGROUND_IMAGE_DPI_H=`sips -g dpiHeight ${DMG_BACKGROUND_IMG} | grep -Eo '[0-9]+\.[0-9]+'` +_BACKGROUND_IMAGE_DPI_W=`sips -g dpiWidth ${DMG_BACKGROUND_IMG} | grep -Eo '[0-9]+\.[0-9]+'` + +if [ $(echo " $_BACKGROUND_IMAGE_DPI_H != 72.0 " | bc) -eq 1 -o $(echo " $_BACKGROUND_IMAGE_DPI_W != 72.0 " | bc) -eq 1 ]; then + echo "WARNING: The background image's DPI is not 72. This will result in distorted backgrounds on Mac OS X 10.7+." + echo " I will convert it to 72 DPI for you." + + _DMG_BACKGROUND_TMP="${DMG_BACKGROUND_IMG%.*}"_dpifix."${DMG_BACKGROUND_IMG##*.}" + + sips -s dpiWidth 72 -s dpiHeight 72 ${DMG_BACKGROUND_IMG} --out ${_DMG_BACKGROUND_TMP} + + DMG_BACKGROUND_IMG="${_DMG_BACKGROUND_TMP}" +fi + +# clear out any old data +rm -rf "${STAGING_DIR}" "${DMG_TMP}" "${DMG_FINAL}" + +# copy over the stuff we want in the final disk image to our staging dir +mkdir -p "${STAGING_DIR}" +cp -rpf "${APP_NAME}.app" "${STAGING_DIR}" +# ... cp anything else you want in the DMG - documentation, etc. + +pushd "${STAGING_DIR}" + +# strip the executable +echo "Stripping ${APP_EXE}..." +strip -u -r "${APP_EXE}" + +# compress the executable if we have upx in PATH +# UPX: http://upx.sourceforge.net/ +if hash upx 2>/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 diff --git a/contrib/sda_checkpoints.pl b/contrib/sda_checkpoints.pl new file mode 100644 index 000000000..ab468af86 --- /dev/null +++ b/contrib/sda_checkpoints.pl @@ -0,0 +1,48 @@ +#!/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 + +# This script is used to generate the checkpoint data used by the SilentDragon Android SDK +# https://git.hush.is/fekt/hush-android-wallet-sdk/src/branch/main/sdk-lib/src/main/assets/co.electriccoin.zcash/checkpoint/mainnet + +use warnings; +use strict; +my $hush = "./src/hush-cli"; +my $getblock= "$hush getblock"; +my $gethash = "$hush getblockhash"; +my $gettree = "$hush getblockmerkletree"; +my $start = shift || 1190000; +my $end = shift || 1260000; +my $stride = shift || 10000; + +my $blocks = qx{$hush getblockcount}; +if($?) { + print "ERROR, is hushd running? exiting...\n"; + exit 1; +} + +if ($end > $blocks) { + print "The block $end is beyond how many blocks this node knows about, exiting...\n"; + exit 1; +} + +if ($start < 1) { + print "Invalid start block $start, exiting...\n"; + exit 1; +} + +my $block = $start; +while (1) { + last if $block > $end; + my $blockhash = qx{$gethash $block}; + my $blocktime = qx{$getblock $block | grep time}; + my $merkle = qx{$gettree $block}; + chomp $merkle; + chomp $blockhash; + chomp $blocktime; + $blocktime =~ s/^\s+|\s+$//g ; + print qq{{\n\t"network": "main",\n\t"height": "$block",\n\t"hash": "$blockhash",\n\t$blocktime\n\t"saplingTree": "$merkle"\n},\n}; + + $block += $stride; +} diff --git a/contrib/sdl_checkpoints.pl b/contrib/sdl_checkpoints.pl index e140fb0ec..ef4aa3dbe 100755 --- a/contrib/sdl_checkpoints.pl +++ b/contrib/sdl_checkpoints.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -# Copyright (c) 2016-2022 The Hush developers +# Copyright (c) 2016-2023 The Hush developers # Distributed 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/seeds/README.md b/contrib/seeds/README.md index 63647fa11..06035bb72 100644 --- a/contrib/seeds/README.md +++ b/contrib/seeds/README.md @@ -1,8 +1,10 @@ -### Seeds ### +# Seeds Utility to generate the seeds.txt list that is compiled into the client -(see [src/chainparamsseeds.h](/src/chainparamsseeds.h) and other utilities in [contrib/seeds](/contrib/seeds)). +(see [src/chainparamsseeds.h](hush/hush3/src/branch/master/src/chainparamsseeds.h) and other utilities in [contrib/seeds](hush/hush3/src/branch/master/contrib/seeds/)). + +## Updating seeds + +Update [contrib/seeds/nodes_main.txt](hush/hush3/src/branch/master/contrib/seeds/nodes_main.txt) and run `make seeds` in the root directory of this repo to update [src/chainparamsseeds.h](hush/hush3/src/branch/master/src/chainparamsseeds.h) then commit the result. -The 512 seeds compiled into the 0.10 release were created from sipa's DNS seed data, like this: - curl -s http://bitcoin.sipa.be/seeds.txt | makeseeds.py diff --git a/contrib/seeds/generate-seeds.py b/contrib/seeds/generate-seeds.py index ab9b4c68c..8b31529f9 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-2023 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,39 @@ 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-2023 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, update contrib/seeds/nodes_main.txt then run\n') + g.write('// ./contrib/seeds/generate-seeds.py contrib/seeds > src/chainparamsseeds.h\n') + g.write('// OR run: make 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..9cd90fe9e 100644 --- a/contrib/seeds/nodes_main.txt +++ b/contrib/seeds/nodes_main.txt @@ -1,6 +1,32 @@ -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.land +87.251.76.166 + +# node3.hush.land +45.82.68.233 + +# node4.hush.land +87.251.76.33 + +# node2.hush.is +137.74.4.198 + +# lite.hushpool.is +149.28.102.219 + +# wtfistheinternet.hush.is +107.174.70.251 + +# torv3 +56wqzfj6mhxgsv3h3nh3pdocguogxfxud55libqjhjsdh5alfsko2iqd.onion +hushv3h6mbxd2pptj42reko3jcexcgnz5zvp3mqcu6myto3jhhn4yzyd.onion +hushv3xvheqh42ms3ld2nh555muscietkib7gycb7s4psbrjsysfywqd.onion + +# ipv6 +2a0c:b641:6f1:34::2 +2a0c:b641:6f1:c::2 + +# i2p +iljqq7nnmw2ij2ezl334cerwwmgzmmbmoc3n4saditd2xhi3xohq.b32.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/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/gpg.sh b/contrib/verify-commits/gpg.sh index dc6eb9c61..f81b2719a 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-2023 The 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=$(\"$($(package)_cxxflags) $($(package)_cppflags)\" \"$($(package)_ldflags)\" \"$(boost_archiver_$(host_os))\" \"$(host_STRIP)\" \"$(host_RANLIB)\" \"$(host_WINDRES)\" : ;" > user-config.jam + echo "using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : \"$($(package)_cxxflags) $($(package)_cppflags)\" \"$($(package)_ldflags)\" \"$(boost_archiver_$(host_os))\" \"$(host_STRIP)\" \"$(host_RANLIB)\" \"$(host_WINDRES)\" : ;" > user-config.jam&& \ + patch -p1 < $($(package)_patch_dir)/fix-Solaris.patch endef define $(package)_config_cmds @@ -36,16 +38,16 @@ endef ifeq ($(host_os),linux) define $(package)_build_cmds - ./b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) cxxflags=-std=c++11 stage + ./b2 -d2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) cxxflags=-std=c++11 stage endef define $(package)_stage_cmds - ./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) cxxflags=-std=c++11 install + ./b2 -d0 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) cxxflags=-std=c++11 install endef else define $(package)_build_cmds - ./b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) stage + ./b2 -d2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) stage endef define $(package)_stage_cmds - ./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) install + ./b2 -d0 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) install endef endif diff --git a/depends/packages/libcurl.mk b/depends/packages/libcurl.mk index ae2b07bd3..1ece9ce64 100644 --- a/depends/packages/libcurl.mk +++ b/depends/packages/libcurl.mk @@ -1,9 +1,9 @@ package=libcurl -$(package)_version=7.67.0 +$(package)_version=7.77.0 $(package)_dependencies=wolfssl $(package)_download_path=https://curl.haxx.se/download $(package)_file_name=curl-$($(package)_version).tar.gz -$(package)_sha256_hash=52af3361cf806330b88b4fe6f483b6844209d47ae196ac46da4de59bb361ab02 +$(package)_sha256_hash=b0a3428acb60fa59044c4d0baae4e4fc09ae9af1d8a3aa84b2e3fbcd99841f77 $(package)_config_opts_linux=--disable-shared --enable-static --with-wolfssl --without-ssl --prefix=$(host_prefix) --host=$(host) $(package)_config_opts_mingw32=--enable-mingw --disable-shared --enable-static --with-wolfssl --without-ssl --prefix=$(host_prefix) --host=x86_64-w64-mingw32 $(package)_config_opts_darwin=--disable-shared --enable-static --with-wolfssl --without-ssl --prefix=$(host_prefix) diff --git a/depends/packages/libevent.mk b/depends/packages/libevent.mk index ffe6f7e79..b3881738a 100644 --- a/depends/packages/libevent.mk +++ b/depends/packages/libevent.mk @@ -4,8 +4,11 @@ $(package)_download_path=https://github.com/libevent/libevent/archive $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_download_file=release-$($(package)_version)-stable.tar.gz $(package)_sha256_hash=316ddb401745ac5d222d7c529ef1eada12f58f6376a66c1118eee803cb70f83d +$(package)_patches=detect-arch4random_addrandom.patch detect-arch4random_addrandom-fix.patch define $(package)_preprocess_cmds + patch -p1 <$($(package)_patch_dir)/detect-arch4random_addrandom.patch && \ + patch -p1 <$($(package)_patch_dir)/detect-arch4random_addrandom-fix.patch && \ ./autogen.sh endef 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/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= diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk index ef5a31f6e..8c8cfadc8 100644 --- a/depends/packages/packages.mk +++ b/depends/packages/packages.mk @@ -39,7 +39,7 @@ native_packages := native_ccache wallet_packages=bdb ifeq ($(host_os),linux) - packages := boost wolfssl libevent zeromq $(zcash_packages) googletest libcurl #googlemock + packages := boost wolfssl libevent $(zcash_packages) googletest libcurl #googlemock else packages := boost wolfssl libevent $(zcash_packages) libcurl googletest #googlemock endif diff --git a/depends/packages/rust.mk b/depends/packages/rust.mk index 6fbdda037..6bae892a2 100644 --- a/depends/packages/rust.mk +++ b/depends/packages/rust.mk @@ -46,12 +46,12 @@ define $(package)_extract_cmds endef define $(package)_stage_cmds - bash ./install.sh --destdir=$($(package)_staging_dir) --prefix=$(host_prefix)/native --disable-ldconfig && \ - ../$(canonical_host)/install.sh --destdir=$($(package)_staging_dir) --prefix=$(host_prefix)/native --disable-ldconfig + bash ./install.sh --destdir=$($(package)_staging_dir) --prefix=$(host_prefix)/native --disable-ldconfig --without=rust-docs && \ + ../$(canonical_host)/install.sh --destdir=$($(package)_staging_dir) --prefix=$(host_prefix)/native --disable-ldconfig --without=rust-docs endef else define $(package)_stage_cmds - bash ./install.sh --destdir=$($(package)_staging_dir) --prefix=$(host_prefix)/native --disable-ldconfig + bash ./install.sh --destdir=$($(package)_staging_dir) --prefix=$(host_prefix)/native --disable-ldconfig --without=rust-docs endef endif diff --git a/depends/packages/utfcpp.mk b/depends/packages/utfcpp.mk index fb7ca044e..f031b46a5 100644 --- a/depends/packages/utfcpp.mk +++ b/depends/packages/utfcpp.mk @@ -1,7 +1,7 @@ $(package)_version=3.1 -$(package)_download_path=https://github.com/MyHush/$(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 diff --git a/depends/packages/zeromq.mk b/depends/packages/zeromq.mk deleted file mode 100644 index 364c36f82..000000000 --- a/depends/packages/zeromq.mk +++ /dev/null @@ -1,53 +0,0 @@ -# Unsupported until further notice -ifeq ($(host_os),mingw32) -$(package)_version=4.3.1 -$(package)_download_path=https://git.hush.is/duke/libzmq/archive -$(package)_download_file=v$($(package)_version).tar.gz -$(package)_file_name=libzmq-$($(package)_version).tar.gz -$(package)_sha256_hash=cb8ebe5b60dadeb526745610d6237f05a98aba287114d8991dad1fa14f4be354 - -define $(package)_set_vars - $(package)_build_env+= - $(package)_config_opts=--enable-shared=false --enable-static --host=x86_64-w64-mingw32 - $(package)_config_opts_mingw32=--enable-shared=false --enable-static --prefix=$(host_prefix) --host=x86_64-w64-mingw32 -disable-curve - $(package)_cflags=-Wno-error -Wall -Wno-pedantic-ms-format -DLIBCZMQ_EXPORTS -DZMQ_DEFINED_STDINT -lws2_32 -liphlpapi -lrpcrt4 - $(package)_conf_tool=./configure -endef -else -package=zeromq -$(package)_version=4.3.1 -$(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($(package)_version) -$(package)_file_name=$(package)-$($(package)_version).tar.gz -$(package)_sha256_hash=bcbabe1e2c7d0eec4ed612e10b94b112dd5f06fcefa994a0c79a45d835cd21eb - -define $(package)_set_vars - $(package)_config_opts=--without-documentation --disable-shared --disable-curve - $(package)_config_opts_linux=--with-pic - $(package)_cxxflags=-std=c++11 -endef -endif - -ifeq ($(host_os),mingw32) -define $(package)_preprocess_cmds - cd $($(package)_build_subdir); ./autogen.sh -endef -define $(package)_config_cmds - $($(package)_conf_tool) $($(package)_config_opts) CFLAGS="-Wno-error -Wall -Wno-pedantic-ms-format -DLIBCZMQ_EXPORTS -DZMQ_DEFINED_STDINT -lws2_32 -liphlpapi -lrpcrt4" -endef -else -define $(package)_config_cmds - $($(package)_autoconf) -endef -endif - -define $(package)_build_cmds - $(MAKE) src/libzmq.la -endef - -define $(package)_stage_cmds - $(MAKE) DESTDIR=$($(package)_staging_dir) install-libLTLIBRARIES install-includeHEADERS install-pkgconfigDATA -endef - -define $(package)_postprocess_cmds - rm -rf bin share -endef diff --git a/depends/patches/boost/fix-Solaris.patch b/depends/patches/boost/fix-Solaris.patch new file mode 100644 index 000000000..cb8006092 --- /dev/null +++ b/depends/patches/boost/fix-Solaris.patch @@ -0,0 +1,23 @@ +From 74fb0a26099bc51d717f5f154b37231ce7df3e98 Mon Sep 17 00:00:00 2001 +From: Rob Boehne +Date: Wed, 20 Nov 2019 11:25:20 -0600 +Subject: [PATCH] Revert change to elide a warning that caused Solaris builds to fail. + +--- + boost/thread/pthread/thread_data.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/boost/thread/pthread/thread_data.hpp b/boost/thread/pthread/thread_data.hpp +index aefbeb43c..bc9b1367a 100644 +--- a/boost/thread/pthread/thread_data.hpp ++++ b/boost/thread/pthread/thread_data.hpp +@@ -57,7 +57,7 @@ namespace boost + #else + std::size_t page_size = ::sysconf( _SC_PAGESIZE); + #endif +-#if PTHREAD_STACK_MIN > 0 +- if (size(PTHREAD_STACK_MIN)) size=PTHREAD_STACK_MIN; + #endif + size = ((size+page_size-1)/page_size)*page_size; diff --git a/depends/patches/libevent/detect-arch4random_addrandom-fix.patch b/depends/patches/libevent/detect-arch4random_addrandom-fix.patch new file mode 100644 index 000000000..69e55bf11 --- /dev/null +++ b/depends/patches/libevent/detect-arch4random_addrandom-fix.patch @@ -0,0 +1,43 @@ +From 266f43af7798befa3d27bfabaa9ae699259c3924 Mon Sep 17 00:00:00 2001 +From: Azat Khuzhin +Date: Mon, 27 Mar 2017 15:50:23 +0300 +Subject: [PATCH] Fix arc4random_addrandom() detecting and fallback + (regression) + +But this is kind of hot-fix, we definitelly need more sane arc4random +compat layer. + +Fixes: #488 +Introduced-in: 6541168 ("Detect arch4random_addrandom() existence") +--- + event-config.h.cmake | 3 +++ + include/event2/util.h | 2 +- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/event-config.h.cmake b/event-config.h.cmake +index b7f0be57c..5c233a3d9 100644 +--- a/event-config.h.cmake ++++ b/event-config.h.cmake +@@ -53,6 +53,9 @@ + /* Define to 1 if you have the `arc4random_buf' function. */ + #cmakedefine EVENT__HAVE_ARC4RANDOM_BUF 1 + ++/* Define to 1 if you have the `arc4random_addrandom' function. */ ++#cmakedefine EVENT__HAVE_ARC4RANDOM_ADDRANDOM 1 ++ + /* Define if clock_gettime is available in libc */ + #cmakedefine EVENT__DNS_USE_CPU_CLOCK_FOR_ID 1 + +diff --git a/include/event2/util.h b/include/event2/util.h +index c4af2bd60..ca4048944 100644 +--- a/include/event2/util.h ++++ b/include/event2/util.h +@@ -842,7 +842,7 @@ int evutil_secure_rng_init(void); + EVENT2_EXPORT_SYMBOL + int evutil_secure_rng_set_urandom_device_file(char *fname); + +-#ifdef EVENT__HAVE_ARC4RANDOM_ADDRANDOM ++#if !defined(EVENT__HAVE_ARC4RANDOM) || defined(EVENT__HAVE_ARC4RANDOM_ADDRANDOM) + /** Seed the random number generator with extra random bytes. + + You should almost never need to call this function; it should be diff --git a/depends/patches/libevent/detect-arch4random_addrandom.patch b/depends/patches/libevent/detect-arch4random_addrandom.patch new file mode 100644 index 000000000..f8f2b947d --- /dev/null +++ b/depends/patches/libevent/detect-arch4random_addrandom.patch @@ -0,0 +1,77 @@ +From 6541168d7037457b8e5c51cc354f11bd94e618b6 Mon Sep 17 00:00:00 2001 +From: Marek Sebera +Date: Mon, 6 Mar 2017 00:55:16 +0300 +Subject: [PATCH] Detect arch4random_addrandom() existence + +Refs: #370 +Refs: #475 +--- + CMakeLists.txt | 1 + + configure.ac | 1 + + evutil_rand.c | 2 ++ + include/event2/util.h | 2 ++ + 4 files changed, 6 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a861e7d96..f609d02d0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -338,6 +338,7 @@ CHECK_FUNCTION_EXISTS_EX(sysctl EVENT__HAVE_SYSCTL) + CHECK_FUNCTION_EXISTS_EX(accept4 EVENT__HAVE_ACCEPT4) + CHECK_FUNCTION_EXISTS_EX(arc4random EVENT__HAVE_ARC4RANDOM) + CHECK_FUNCTION_EXISTS_EX(arc4random_buf EVENT__HAVE_ARC4RANDOM_BUF) ++CHECK_FUNCTION_EXISTS_EX(arc4random_addrandom EVENT__HAVE_ARC4RANDOM_ADDRANDOM) + CHECK_FUNCTION_EXISTS_EX(epoll_create1 EVENT__HAVE_EPOLL_CREATE1) + CHECK_FUNCTION_EXISTS_EX(getegid EVENT__HAVE_GETEGID) + CHECK_FUNCTION_EXISTS_EX(geteuid EVENT__HAVE_GETEUID) +diff --git a/configure.ac b/configure.ac +index a127bbc91..e73c29b14 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -342,6 +342,7 @@ AC_CHECK_FUNCS([ \ + accept4 \ + arc4random \ + arc4random_buf \ ++ arc4random_addrandom \ + eventfd \ + epoll_create1 \ + fcntl \ +diff --git a/evutil_rand.c b/evutil_rand.c +index 046a14b07..4be0b1c5e 100644 +--- a/evutil_rand.c ++++ b/evutil_rand.c +@@ -192,12 +192,14 @@ evutil_secure_rng_get_bytes(void *buf, size_t n) + ev_arc4random_buf(buf, n); + } + ++#if !defined(EVENT__HAVE_ARC4RANDOM) || defined(EVENT__HAVE_ARC4RANDOM_ADDRANDOM) + void + evutil_secure_rng_add_bytes(const char *buf, size_t n) + { + arc4random_addrandom((unsigned char*)buf, + n>(size_t)INT_MAX ? INT_MAX : (int)n); + } ++#endif + + void + evutil_free_secure_rng_globals_(void) +diff --git a/include/event2/util.h b/include/event2/util.h +index dd4bbb69d..c4af2bd60 100644 +--- a/include/event2/util.h ++++ b/include/event2/util.h +@@ -842,6 +842,7 @@ int evutil_secure_rng_init(void); + EVENT2_EXPORT_SYMBOL + int evutil_secure_rng_set_urandom_device_file(char *fname); + ++#ifdef EVENT__HAVE_ARC4RANDOM_ADDRANDOM + /** Seed the random number generator with extra random bytes. + + You should almost never need to call this function; it should be +@@ -858,6 +859,7 @@ int evutil_secure_rng_set_urandom_device_file(char *fname); + */ + EVENT2_EXPORT_SYMBOL + void evutil_secure_rng_add_bytes(const char *dat, size_t datlen); ++#endif + + #ifdef __cplusplus + } 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/hsc.md b/doc/hsc.md new file mode 100644 index 000000000..3ff3bc263 --- /dev/null +++ b/doc/hsc.md @@ -0,0 +1,24 @@ +# 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 + +## 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 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/man/hush-cli.1 b/doc/man/hush-cli.1 index 6179f7d95..235409cac 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" "February 2023" "hush-cli v3.9.3" "User Commands" .SH NAME -hush-cli \- manual page for hush-cli v3.9.1 +hush-cli \- manual page for hush-cli v3.9.3 .SH DESCRIPTION -Hush RPC client version v3.9.1\-804a4abbe\-dirty +Hush RPC client version v3.9.3\-1313d39a7 .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 @@ -38,8 +38,8 @@ Use the test network \fB\-regtest\fR .IP Enter regression test mode, which uses a special chain in which blocks -can be solved instantly. This is intended for regression testing tools -and app development. +can be solved instantly. This is intended for regression testing +tools and app development. .HP \fB\-rpcconnect=\fR .IP @@ -75,9 +75,12 @@ Read extra arguments from standard input, one per line until EOF/Ctrl\-D 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-2023 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..0d930a9a4 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" "February 2023" "hush-tx v3.9.3" "User Commands" .SH NAME -hush-tx \- manual page for hush-tx v3.9.1 +hush-tx \- manual page for hush-tx v3.9.3 .SH DESCRIPTION -hush\-tx utility version v3.9.1\-804a4abbe\-dirty +hush\-tx utility version v3.9.3\-1313d39a7 .SS "Usage:" .TP hush\-tx [options] [commands] @@ -72,7 +72,8 @@ sign=HEIGHT:SIGHASH\-FLAGS .IP Add zero or more signatures to transaction. This command requires JSON registers:prevtxs=JSON object, privatekeys=JSON object. See -signrawtransaction docs for format of sighash flags, JSON objects. +signrawtransaction docs for format of sighash flags, JSON +objects. .PP Register Commands: .IP @@ -88,9 +89,12 @@ 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-2023 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..aad7da4d9 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" "February 2023" "hushd v3.9.3" "User Commands" .SH NAME -hushd \- manual page for hushd v3.9.1 +hushd \- manual page for hushd v3.9.3 .SH DESCRIPTION -Hush Daemon version v3.9.1\-804a4abbe\-dirty +Hush Daemon version v3.9.3\-1313d39a7 .PP In order to ensure you are adequately protecting your privacy when using Hush, please see . @@ -17,11 +17,6 @@ Start a Hush Daemon .IP This help message .HP -\fB\-alertnotify=\fR -.IP -Execute command when a relevant alert is received or we see a really -long fork (%s in cmd is replaced by message) -.HP \fB\-blocknotify=\fR .IP Execute command when the best block changes (%s in cmd is replaced by @@ -49,7 +44,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 @@ -63,14 +58,23 @@ Set database cache size in megabytes (4 to 16384, default: 512) .IP Imports blocks from external blk000??.dat file on startup .HP +\fB\-maxdebugfilesize=\fR +.IP +Set the max size of the debug.log file (default: 15) +.HP \fB\-maxorphantx=\fR .IP Keep at most unconnectable transactions in memory (default: 100) .HP +\fB\-maxreorg=\fR +.IP +Specify the maximum length of a blockchain re\-organization +.HP \fB\-mempooltxinputlimit=\fR .IP [DEPRECATED/IGNORED] Set the maximum number of transparent inputs in a -transaction that the mempool will accept (default: 0 = no limit applied) +transaction that the mempool will accept (default: 0 = no limit +applied) .HP \fB\-par=\fR .IP @@ -89,10 +93,10 @@ transaction id) \fB\-prune=\fR .IP Reduce storage requirements by pruning (deleting) old blocks. This mode -disables wallet support and is incompatible with \fB\-txindex\fR. Warning: -Reverting this setting requires re\-downloading the entire blockchain. -(default: 0 = disable pruning blocks, >550 = target size in MiB to use -for block files) +disables wallet support and is incompatible with \fB\-txindex\fR. +Warning: Reverting this setting requires re\-downloading the +entire blockchain. (default: 0 = disable pruning blocks, >550 = +target size in MiB to use for block files) .HP \fB\-reindex\fR .IP @@ -142,8 +146,8 @@ Add a node to connect to and attempt to keep the connection open \fB\-asmap=\fR .IP Specify ASN mapping used for bucketing of the peers (default: -asmap.dat). Relative paths will be prefixed by the net\-specific datadir -location. +asmap.dat). Relative paths will be prefixed by the net\-specific +datadir location. .HP \fB\-banscore=\fR .IP @@ -191,7 +195,7 @@ Accept connections from outside (default: 1 if no \fB\-proxy\fR or \fB\-connect\ .HP \fB\-listenonion\fR .IP -Automatically create Tor hidden service (default: 0) +Automatically create Tor hidden service (default: 1) .HP \fB\-maxconnections=\fR .IP @@ -210,9 +214,36 @@ Maximum per\-connection send buffer, *1000 bytes (default: 1000) Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: \fB\-proxy\fR) .HP +\fB\-nspv_msg\fR +.IP +Enable NSPV messages processing (default: true when \fB\-ac_private\fR=\fI\,1\/\fR, +otherwise false) +.HP +\fB\-i2psam=\fR +.IP +I2P SAM proxy to reach I2P peers and accept I2P connections (default: +none) +.HP +\fB\-i2pacceptincoming\fR +.IP +If set and \fB\-i2psam\fR is also set then incoming I2P connections are +accepted via the SAM proxy. If this is not set but \fB\-i2psam\fR is set +then only outgoing connections will be made to the I2P network. +Ignored if \fB\-i2psam\fR 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) +.HP \fB\-onlynet=\fR .IP -Only connect to nodes in network (ipv4, ipv6 or onion) +Only connect to nodes in network (ipv4, ipv6, onion or i2p) +.HP +\fB\-disableipv4\fR +.IP +Disable Ipv4 network connections (default: 0) +.HP +\fB\-disableipv6\fR +.IP +Disable Ipv6 network connections (default: 0) .HP \fB\-permitbaremultisig\fR .IP @@ -242,7 +273,7 @@ Connect to a node to retrieve peer addresses, and disconnect .HP \fB\-timeout=\fR .IP -Specify connection timeout in milliseconds (minimum: 1, default: 5000) +Specify connection timeout in milliseconds (minimum: 1, default: 60000) .HP \fB\-torcontrol=\fR: .IP @@ -287,9 +318,9 @@ Bind to given address and allowlist peers connecting to it. Use \fB\-allowlist=\fR .IP Allowlist peers connecting from the given netmask or IP address. Can be -specified multiple times. Allowlisted peers cannot be DoS banned and -their transactions are always relayed, even if they are already in the -mempool, useful e.g. for a gateway +specified multiple times. Allowlisted peers cannot be DoS banned +and their transactions are always relayed, even if they are +already in the mempool, useful e.g. for a gateway .PP Wallet options: .HP @@ -314,6 +345,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 @@ -401,47 +461,32 @@ by TxID) \fB\-allowlistaddress=\fR .IP Enable the wallet filter for notary nodes and add one Raddress to the -allowlist of the wallet filter. If \fB\-allowlistaddress=\fR is used, then the -wallet filter is automatically activated. Several Raddresses can be -defined using several \fB\-allowlistaddress=\fR (similar to \fB\-addnode\fR). The -wallet filter will filter the utxo to only ones coming from my own -Raddress (derived from pubkey) and each Raddress defined using -\fB\-allowlistaddress=\fR this option is mostly for Notary Nodes). +allowlist of the wallet filter. If \fB\-allowlistaddress=\fR is used, +then the wallet filter is automatically activated. Several +Raddresses can be defined using several \fB\-allowlistaddress=\fR +(similar to \fB\-addnode\fR). The wallet filter will filter the utxo to +only ones coming from my own Raddress (derived from pubkey) and +each Raddress defined using \fB\-allowlistaddress=\fR this option is +mostly for Notary Nodes). .HP \fB\-zapwallettxes=\fR .IP 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
+account owner and payment request information, 2 = drop tx meta +data) .PP Debugging/Testing options: .HP \fB\-debug=\fR .IP 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). +optional). If is not supplied or if = 1, +output all debugging information. can be: 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). .HP \fB\-experimentalfeatures\fR .IP @@ -539,8 +584,8 @@ Accept public REST requests (default: 0) \fB\-rpcbind=\fR .IP Bind to given address to listen for JSON\-RPC connections. Use -[host]:port notation for IPv6. This option can be specified multiple -times (default: bind to all interfaces) +[host]:port notation for IPv6. This option can be specified +multiple times (default: bind to all interfaces) .HP \fB\-rpcuser=\fR .IP @@ -557,9 +602,9 @@ Listen for JSON\-RPC connections on (default: 0 or testnet: 10000) \fB\-rpcallowip=\fR .IP Allow JSON\-RPC connections from specified source. Valid for 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). This option can be specified -multiple times +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). This +option can be specified multiple times .HP \fB\-rpcthreads=\fR .IP @@ -595,8 +640,8 @@ Mining address to use when special address of 'x' is sent by miner \fB\-stratumbind=\fR .IP Bind to given address to listen for Stratum work requests. Use -[host]:port notation for IPv6. This option can be specified multiple -times (default: bind to all interfaces) +[host]:port notation for IPv6. This option can be specified +multiple times (default: bind to all interfaces) .HP \fB\-stratumport=\fR .IP @@ -606,15 +651,16 @@ Listen for Stratum work requests on (default: 19031 or testnet: \fB\-stratumallowip=\fR .IP Allow Stratum work requests from specified source. Valid for 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). This option can be specified -multiple times +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). This +option can be specified multiple times .PP 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 @@ -688,6 +734,15 @@ Public key for receiving payments on the network .IP Transparent transactions only, default 0 .HP +\fB\-ac_randomx_interval\fR +.IP +Controls how often the RandomX key block will change, default is 1024 +.HP +\fB\-ac_randomx_lag\fR +.IP +Sets the number of RandomX blocks to wait before updating the key block, +default is 64 +.HP \fB\-ac_reward\fR .IP Block reward in satoshis, default is 0 @@ -702,7 +757,7 @@ P2SH/multisig address to receive founders rewards .HP \fB\-ac_supply\fR .IP -Starting supply, default is 0 +Starting supply, default is 10 .HP \fB\-ac_txpow\fR .IP @@ -712,9 +767,12 @@ 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-2023 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/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. + diff --git a/doc/release-process.md b/doc/release-process.md index b5dee897d..bd0d70633 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -1,17 +1,57 @@ # 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. + +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. + +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 master +git merge --no-ff dev # using the default commit message is fine +git push origin master +git checkout dev +git merge master +git push origin dev +``` + +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? + * Is this release changing consensus rules? Definitely update protocol version. ### Protocol Safety Checks: - * Does MIN_PROTO_VERSION need to change? + * Does `PROTOCOL_VERSION` in src/version.h need to be increased? + * All releases with a consensus change should increase the value by 1 + * All releases with a large change to the networking (P2P) layer 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 @@ -20,5 +60,63 @@ Install deps on Linux: apt-get install help2man debchange ## Release process + - If new seeds are being added or seeds are changing: + - Edit contrib/seeds/nodes_main.txt + - Run "make seeds" + - Commit the result + - 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 + - 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 + - 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 checkpoint 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 + - 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 + - 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 + - Checkpoints also provide a bit of security against some attacks that would create malicious chainforks + - 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. Example: `./util/update-copyrights.h 2022 2023` + - 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 + - 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) + - 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 + - Figure out how to update https://faq.hush.is/rpc/ for new release -... +## 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. diff --git a/doc/relnotes/README.md b/doc/relnotes/README.md index 3993799ae..39c56e213 100644 --- a/doc/relnotes/README.md +++ b/doc/relnotes/README.md @@ -10,6 +10,68 @@ 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 "Lateral Larvacean" + +``` +1012 files changed, 36253 insertions(+), 5507 deletions(-) +``` + +This is an OPTIONAL release. It is recommended for exchanges, solo miners and mining pools to update to this release. + + * Many RandomX mining fixes and improvements + * Difficulty bug affecting DRAGONX has been fixed + * RandomX mining hashrate increase of about 60X + * Optimized memory usage of RandomX mining + * This release adds Tor v3 and i2p support (BIP155 also known as addrv2) + * Basic usage is `hushd -proxy=127.0.0.1:9050` for using a local Tor proxy. + * Use port 9150 if you are using Tor Browser. See docs/tor.md for details + * New CLI args: `-i2psam=` and `-i2pacceptincoming` . See docs/i2p.md for more info + * Tor and i2p seeds have been added + * The format of peers.dat has changed. On first startup with this code there will be a short delay of a few minutes while new nodes are found and peers.dat is populated in it's new format. + * New RPCs: + * getrescaninfo - Says if the node is rescanning with additional info about progress + * abortrescan - stop rescanning if a node is currently rescanning + + +# 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 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 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 + * 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 + * 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" This is an OPTIONAL release. It is most important for users with large wallets, as it fixes an important 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/doc/zmq.md b/doc/zmq.md deleted file mode 100644 index c5ce11ff6..000000000 --- a/doc/zmq.md +++ /dev/null @@ -1,107 +0,0 @@ -# Block and Transaction Broadcasting With ZeroMQ - -[ZeroMQ](http://zeromq.org/) is a lightweight wrapper around TCP -connections, inter-process communication, and shared-memory, -providing various message-oriented semantics such as publish/subscribe, -request/reply, and push/pull. - -The Hush daemon can be configured to act as a trusted "border -router", implementing the Hush wire protocol and relay, making -consensus decisions, maintaining the local blockchain database, -broadcasting locally generated transactions into the network, and -providing a queryable RPC interface to interact on a polled basis for -requesting blockchain related data. However, there exists only a -limited service to notify external software of events like the arrival -of new blocks or transactions. - -The ZeroMQ facility implements a notification interface through a set -of specific notifiers. Currently there are notifiers that publish -blocks and transactions. This read-only facility requires only the -connection of a corresponding ZeroMQ subscriber port in receiving -software; it is not authenticated nor is there any two-way protocol -involvement. Therefore, subscribers should validate the received data -since it may be out of date, incomplete or even invalid. - -ZeroMQ sockets are self-connecting and self-healing; that is, -connections made between two endpoints will be automatically restored -after an outage, and either end may be freely started or stopped in -any order. - -Because ZeroMQ is message oriented, subscribers receive transactions -and blocks all-at-once and do not need to implement any sort of -buffering or reassembly. - -## Prerequisites - -The ZeroMQ feature in Hush requires ZeroMQ API version 4.x or -newer, which you will need to install if you are not using the depends -system. Typically, it is packaged by distributions as something like -*libzmq5-dev*. The C++ wrapper for ZeroMQ is *not* needed. - -In order to run the example Python client scripts in contrib/ one must -also install *python-zmq*, though this is not necessary for daemon -operation. - -## Enabling - -By default, the ZeroMQ feature is automatically compiled in if the -necessary prerequisites are found. To disable, use --disable-zmq -during the *configure* step of building hushd: - - $ ./configure --disable-zmq (other options) - -To actually enable operation, one must set the appropriate options on -the commandline or in the configuration file. - -## Usage - -Currently, the following notifications are supported: - - -zmqpubhashtx=address - -zmqpubhashblock=address - -zmqpubrawblock=address - -zmqpubrawtx=address - -The socket type is PUB and the address must be a valid ZeroMQ socket -address. The same address can be used in more than one notification. - -For instance: - - $ hushd -zmqpubhashtx=tcp://127.0.0.1:28332 \ - -zmqpubrawtx=ipc:///tmp/hushd.tx.raw - -Each PUB notification has a topic and body, where the header -corresponds to the notification type. For instance, for the -notification `-zmqpubhashtx` the topic is `hashtx` (no null -terminator) and the body is the hexadecimal transaction hash (32 -bytes). - -These options can also be provided in zcash.conf. - -ZeroMQ endpoint specifiers for TCP (and others) are documented in the -[ZeroMQ API](http://api.zeromq.org/4-0:_start). - -Client side, then, the ZeroMQ subscriber socket must have the -ZMQ_SUBSCRIBE option set to one or either of these prefixes (for -instance, just `hash`); without doing so will result in no messages -arriving. Please see `contrib/zmq/zmq_sub.py` for a working example. - -## Remarks - -From the perspective of hushd, the ZeroMQ socket is write-only; PUB -sockets don't even have a read function. Thus, there is no state -introduced into hushd directly. Furthermore, no information is -broadcast that wasn't already received from the public P2P network. - -No authentication or authorization is done on connecting clients; it -is assumed that the ZeroMQ port is exposed only to trusted entities, -using other means such as firewalling. - -Note that when the block chain tip changes, a reorganisation may occur -and just the tip will be notified. It is up to the subscriber to -retrieve the chain from the last known block to the new tip. - -There are several possibilities that ZMQ notification can get lost -during transmission depending on the communication type you are -using. Hushd appends an up-counting sequence number to each -notification which allows listeners to detect lost notifications. 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 + diff --git a/migratecoin.sh b/migratecoin.sh index 95aea910c..bd18bd27c 100644 --- a/migratecoin.sh +++ b/migratecoin.sh @@ -1,5 +1,5 @@ -#!/usr/bin/bash -# Copyright (c) 2016-2021 The Hush developers +#!/usr/usr/bin/env bash +# Copyright (c) 2016-2023 The 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/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/hush/create_benchmark_archive.py b/qa/hush/create_benchmark_archive.py index 68938297e..eff50239f 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-2023 The 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..742f9bf61 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-2023 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..5113c4d8c 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-2023 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..183db1640 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-2023 The 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/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 8b8169a2f..b1cbabec9 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 +#!/usr/bin/env bash +# Copyright (c) 2016-2023 The Hush developers # Released under the GPLv3 set -e -o pipefail @@ -92,10 +92,6 @@ testScriptsExt=( 'p2p-acceptblock.py' ); -if [ "x$ENABLE_ZMQ" = "x1" ]; then - testScripts+=('zmq_test.py') -fi - extArg="-extended" passOn=${@#$extArg} diff --git a/qa/pull-tester/run-bitcoin-cli b/qa/pull-tester/run-bitcoin-cli index 74f9b19e8..dac53df69 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 +#!/usr/bin/env bash +# Copyright (c) 2016-2023 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..07491f0a7 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 +#!/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-2021 The Hush developers +# Copyright (c) 2016-2023 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 a011831b1..5122ba085 100755 --- a/qa/pull-tester/tests-config.sh.in +++ b/qa/pull-tester/tests-config.sh.in @@ -1,7 +1,7 @@ -#!/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-2021 The Hush developers +# Copyright (c) 2016-2023 The Hush developers # Released under the GPLv3 BUILDDIR="@abs_top_builddir@" @@ -11,7 +11,6 @@ EXEEXT="@EXEEXT@" @ENABLE_WALLET_TRUE@ENABLE_WALLET=1 @BUILD_BITCOIN_UTILS_TRUE@ENABLE_UTILS=1 @BUILD_BITCOIND_TRUE@ENABLE_BITCOIND=1 -@ENABLE_ZMQ_TRUE@ENABLE_ZMQ=1 @ENABLE_PROTON_TRUE@ENABLE_PROTON=1 REAL_BITCOIND="$BUILDDIR/src/hushd${EXEEXT}" diff --git a/qa/rpc-tests/ac_private.py b/qa/rpc-tests/ac_private.py index 7c066529a..323ca36cb 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-2023 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..942c26abb 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-2023 The 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..729801e07 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-2023 The Hush developers # Distributed 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..5466ed813 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-2023 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..8718559f3 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-2023 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..0a13cb605 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-2023 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..2f6487f84 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-2023 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..4a3a202a4 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-2023 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..ba7648c4d 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-2023 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..d31e89d9f 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-2023 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..be248bb53 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-2023 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..d07389542 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-2023 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..2144ba673 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-2023 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..3c00279e8 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-2023 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..2a971be35 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-2023 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..c405b4ffa 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-2023 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..1cc75dace 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-2023 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..769445cc5 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-2023 The 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..fb3b3ec9a 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-2023 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..e1636b98c 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-2023 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..f0e3bfbe2 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-2023 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..8c4343b32 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-2023 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..911e22efd 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-2023 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..d718774b0 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-2023 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..89062f232 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-2023 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..2ba4584ce 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-2023 The Hush developers # # Test hard fork detection diff --git a/qa/rpc-tests/httpbasics.py b/qa/rpc-tests/httpbasics.py index 034ff2a4d..525d48b2a 100755 --- a/qa/rpc-tests/httpbasics.py +++ b/qa/rpc-tests/httpbasics.py @@ -1,12 +1,10 @@ #!/usr/bin/env python2 -# Copyright (c) 2016-2021 The Hush developers +# Copyright (c) 2016-2023 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 -# # 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/invalidateblock.py b/qa/rpc-tests/invalidateblock.py index 4edad27df..a63ccc15d 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-2023 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..001ef8a23 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-2023 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..8fb943cbb 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-2023 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..469a0589a 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-2023 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..d2461f699 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-2023 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..c5b91ea1d 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-2023 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..e2a301708 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-2023 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..581f9ba76 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-2023 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..9d7f36341 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-2023 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..94f1d4af7 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-2023 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..edd484af7 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-2023 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..795ec9666 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-2023 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..2c4b50572 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-2023 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..151c3cb71 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-2023 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..67b0ec313 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-2023 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..989059058 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-2023 The 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..cd17190d0 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-2023 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 @@ -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/p2p_node_bloom.py b/qa/rpc-tests/p2p_node_bloom.py index 78d4021f3..ed17c2323 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-2023 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..251195ca5 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-2023 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..bfdfa8ae5 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-2023 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..8fb1a4fa0 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-2023 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 @@ -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("hushv3h6mbxd2pptj42reko3jcexcgnz5zvp3mqcu6myto3jhhn4yzyd.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, "hushv3h6mbxd2pptj42reko3jcexcgnz5zvp3mqcu6myto3jhhn4yzyd.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/qa/rpc-tests/pruning.py b/qa/rpc-tests/pruning.py index 16714e0f2..f4edea46c 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-2023 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..e5a66f2e6 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-2023 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..73cc6b9ac 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-2023 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..e47bcebac 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-2023 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..a6ffda7f4 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-2023 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..3368f7b2f 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-2023 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..d08ef4f50 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-2023 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..78e13879f 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-2023 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..b64df0654 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-2023 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..1abf5d93d 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-2023 The Hush developers # Distributed 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..f44903368 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-2023 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..690eb2c52 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-2023 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..a9456343f 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-2023 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..99eec966a 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-2023 The Hush developers # Distributed 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..3ac80f28b 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-2023 The 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..a72e299c2 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-2023 The 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..c3dbe1e91 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-2023 The 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..6cc86b7ee 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-2023 The Hush developers # Distributed 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..0687e146c 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-2023 The 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..cf6e27573 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-2023 The 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 @@ -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/qa/rpc-tests/test_framework/netutil.py b/qa/rpc-tests/test_framework/netutil.py index 07e7460ce..58ca50f4b 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-2023 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..fac036afe 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-2023 The 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..3ea71119c 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-2023 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..2fdfe028e 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-2023 The 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..770f54554 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-2023 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..6d2c45c5a 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-2023 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..5c6a28357 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-2023 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..c50c028a3 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-2023 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..039008b22 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-2023 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..7c3a1f6b2 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-2023 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..59be606f0 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-2023 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..4ce3126ef 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-2023 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..502cc3936 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-2023 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..6172cc45a 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-2023 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..2856c642d 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-2023 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..8a2e2cf8f 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-2023 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..6322ef4d8 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-2023 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..c6d764eb6 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-2023 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..b40782879 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-2023 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..98ca1fe11 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-2023 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..c9e796b72 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-2023 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..889b6ad36 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-2023 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..0c0aafe93 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-2023 The 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..20f3d4569 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-2023 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..66d67c7d2 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-2023 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..824c05c65 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-2023 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..6c7baa35d 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-2023 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/zmq_test.py b/qa/rpc-tests/zmq_test.py deleted file mode 100755 index 7ca50efb4..000000000 --- a/qa/rpc-tests/zmq_test.py +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/env python2 -# 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 -# Test ZMQ interface - -from test_framework.test_framework import BitcoinTestFramework -from test_framework.util import assert_equal, bytes_to_hex_str, start_nodes - -import zmq -import struct - -class ZMQTest(BitcoinTestFramework): - - port = 28332 - - def setup_nodes(self): - self.zmqContext = zmq.Context() - self.zmqSubSocket = self.zmqContext.socket(zmq.SUB) - self.zmqSubSocket.setsockopt(zmq.SUBSCRIBE, b"hashblock") - self.zmqSubSocket.setsockopt(zmq.SUBSCRIBE, b"hashtx") - self.zmqSubSocket.connect("tcp://127.0.0.1:%i" % self.port) - return start_nodes(4, self.options.tmpdir, extra_args=[ - ['-zmqpubhashtx=tcp://127.0.0.1:'+str(self.port), '-zmqpubhashblock=tcp://127.0.0.1:'+str(self.port)], - [], - [], - [] - ]) - - def run_test(self): - self.sync_all() - - genhashes = self.nodes[0].generate(1) - self.sync_all() - - print "listen..." - msg = self.zmqSubSocket.recv_multipart() - topic = msg[0] - body = msg[1] - msgSequence = struct.unpack('/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 +32,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 +45,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 diff --git a/src/Makefile.am b/src/Makefile.am index 5d73c049f..e5e2ca248 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,4 @@ -# Copyright 2016-2021 The Hush developers +# Copyright 2016-2023 The Hush developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html @@ -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 @@ -55,9 +62,6 @@ LIBZCASH=libzcash.a LIBHUSH=libhush.a LIBRANDOMX=RandomX/build/librandomx.a -if ENABLE_ZMQ -LIBBITCOIN_ZMQ=libbitcoin_zmq.a -endif if BUILD_BITCOIN_LIBS LIBZCASH_CONSENSUS=libzcashconsensus.la endif @@ -66,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: @@ -88,9 +92,6 @@ if ENABLE_WALLET BITCOIN_INCLUDES += $(BDB_CPPFLAGS) EXTRA_LIBRARIES += $(LIBBITCOIN_WALLET) endif -if ENABLE_ZMQ -EXTRA_LIBRARIES += $(LIBBITCOIN_ZMQ) -endif lib_LTLIBRARIES = $(LIBZCASH_CONSENSUS) @@ -128,7 +129,8 @@ BITCOIN_CORE_H = \ addressindex.h \ spentindex.h \ addrman.h \ - alert.h \ + attributes.h \ + addrdb.h \ amount.h \ amqp/amqpabstractnotifier.h \ amqp/amqpconfig.h \ @@ -167,6 +169,7 @@ BITCOIN_CORE_H = \ hash.h \ httprpc.h \ httpserver.h \ + i2p.h \ init.h \ key.h \ key_io.h \ @@ -181,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 \ @@ -224,13 +230,19 @@ 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 \ wallet/asyncrpcoperation_mergetoaddress.h \ wallet/asyncrpcoperation_saplingconsolidation.h \ + wallet/asyncrpcoperation_sweep.h \ wallet/asyncrpcoperation_sendmany.h \ wallet/asyncrpcoperation_shieldcoinbase.h \ wallet/crypter.h \ @@ -239,11 +251,7 @@ BITCOIN_CORE_H = \ wallet/rpchushwallet.h \ wallet/wallet.h \ wallet/wallet_ismine.h \ - wallet/walletdb.h \ - zmq/zmqabstractnotifier.h \ - zmq/zmqconfig.h\ - zmq/zmqnotificationinterface.h \ - zmq/zmqpublishnotifier.h + wallet/walletdb.h LIBHUSH_H = \ hush/utiltls.h @@ -258,10 +266,8 @@ 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 \ + addrdb.cpp \ asyncrpcoperation.cpp \ asyncrpcqueue.cpp \ bloom.cpp \ @@ -296,6 +302,7 @@ libbitcoin_server_a_SOURCES = \ deprecation.cpp \ httprpc.cpp \ httpserver.cpp \ + i2p.cpp \ init.cpp \ dbwrapper.cpp \ main.cpp \ @@ -327,23 +334,13 @@ libbitcoin_server_a_SOURCES = \ $(LIBZCASH_H) \ $(LIBHUSH_H) -if ENABLE_ZMQ -libbitcoin_zmq_a_CPPFLAGS = $(BITCOIN_INCLUDES) $(ZMQ_CFLAGS) -libbitcoin_zmq_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) -libbitcoin_zmq_a_SOURCES = \ - zmq/zmqabstractnotifier.cpp \ - zmq/zmqnotificationinterface.cpp \ - zmq/zmqpublishnotifier.cpp -endif - # wallet: hushd, but only linked when wallet enabled 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_sweep.cpp \ wallet/asyncrpcoperation_sendmany.cpp \ wallet/asyncrpcoperation_shieldcoinbase.cpp \ wallet/crypter.cpp \ @@ -380,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 \ @@ -420,6 +419,7 @@ libbitcoin_common_a_SOURCES = \ key.cpp \ key_io.cpp \ keystore.cpp \ + netaddress.cpp \ netbase.cpp \ metrics.cpp \ primitives/block.cpp \ @@ -458,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) @@ -499,7 +503,6 @@ hushd_LDADD = \ $(LIBBITCOIN_COMMON) \ $(LIBUNIVALUE) \ $(LIBBITCOIN_UTIL) \ - $(LIBBITCOIN_ZMQ) \ $(LIBBITCOIN_CRYPTO) \ $(LIBZCASH) \ $(LIBHUSH) \ @@ -520,7 +523,6 @@ hushd_LDADD += \ $(CRYPTO_LIBS) \ $(EVENT_PTHREADS_LIBS) \ $(EVENT_LIBS) \ - $(ZMQ_LIBS) \ $(LIBBITCOIN_CRYPTO) \ $(LIBZCASH_LIBS) @@ -692,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) @@ -704,13 +708,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/src/Makefile.gtest.include b/src/Makefile.gtest.include index 368666e58..77749db15 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-2023 The Hush developers # Released under the GPLv3 TESTS += hush-gtest bin_PROGRAMS += hush-gtest @@ -54,9 +54,6 @@ hush_gtest_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) hush_gtest_LDADD = -lgtest -lgmock $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \ $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) $(LIBSECP256K1) -if ENABLE_ZMQ -zcash_gtest_LDADD += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS) -endif if ENABLE_WALLET hush_gtest_LDADD += $(LIBBITCOIN_WALLET) endif diff --git a/src/Makefile.test-hush.include b/src/Makefile.test-hush.include index 9d6379ea0..393c42117 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-2023 The Hush developers # Distributed under 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.test.include b/src/Makefile.test.include index 63d47cd33..775cda32a 100644 --- a/src/Makefile.test.include +++ b/src/Makefile.test.include @@ -125,10 +125,6 @@ test_test_bitcoin_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) test_test_bitcoin_LDADD += $(LIBZCASH_CONSENSUS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(LIBZCASH) $(LIBZCASH_LIBS) test_test_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) -static -if ENABLE_ZMQ -test_test_bitcoin_LDADD += $(ZMQ_LIBS) -endif - nodist_test_test_bitcoin_SOURCES = $(GENERATED_TEST_FILES) $(BITCOIN_TESTS): $(GENERATED_TEST_FILES) 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 diff --git a/src/addrdb.cpp b/src/addrdb.cpp new file mode 100644 index 000000000..f477ab7bc --- /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-2023 The 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/addressindex.h b/src/addressindex.h index 369bd1671..1a0c279f4 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-2023 The Hush developers // Distributed under 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..a832ffc4c 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-2023 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html @@ -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,19 +138,25 @@ 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; - assert(nRndPos1 < vRandom.size() && nRndPos2 < vRandom.size()); + // assert(nRndPos1 < vRandom.size() && nRndPos2 < vRandom.size()); 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)}; - mapInfo[nId1].nRandomPos = nRndPos2; - mapInfo[nId2].nRandomPos = nRndPos1; + if( (it_1 == mapInfo.end()) || (it_2 == mapInfo.end())) { + return; + } + + it_1->second.nRandomPos = nRndPos2; + it_2->second.nRandomPos = nRndPos1; vRandom[nRndPos1] = nId2; vRandom[nRndPos2] = nId1; @@ -140,46 +164,65 @@ 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); + if (infoDelete.nRefCount == 0) { + return; + } + 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--; - assert(info.nRefCount == 0); + //assert(info.nRefCount == 0); // which tried bucket to move the entry to int nKBucket = info.GetTriedBucket(nKey, m_asmap); @@ -189,7 +232,7 @@ void CAddrMan::MakeTried(CAddrInfo& info, int nId) if (vvTried[nKBucket][nKBucketPos] != -1) { // find an item to evict int nIdEvict = vvTried[nKBucket][nKBucketPos]; - assert(mapInfo.count(nIdEvict) == 1); + //assert(mapInfo.count(nIdEvict) == 1); CAddrInfo& infoOld = mapInfo[nIdEvict]; // Remove the to-be-evicted item from the tried set. @@ -201,81 +244,20 @@ void CAddrMan::MakeTried(CAddrInfo& info, int nId) int nUBucket = infoOld.GetNewBucket(nKey, m_asmap); int nUBucketPos = infoOld.GetBucketPosition(nKey, true, nUBucket); ClearNew(nUBucket, nUBucketPos); - assert(vvNew[nUBucket][nUBucketPos] == -1); + //assert(vvNew[nUBucket][nUBucketPos] == -1); // Enter it into the new set again. infoOld.nRefCount = 1; vvNew[nUBucket][nUBucketPos] = nIdEvict; nNew++; } - assert(vvTried[nKBucket][nKBucketPos] == -1); + //assert(vvTried[nKBucket][nKBucketPos] == -1); vvTried[nKBucket][nKBucketPos] = nId; nTried++; 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 +333,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 +420,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 +446,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 +483,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); @@ -470,16 +504,34 @@ CAddrInfo CAddrMan::Select_(bool newOnly) MilliSleep(kRetrySleepInterval); } int nId = vvTried[nKBucket][nKBucketPos]; - assert(mapInfo.count(nId) == 1); + // assert(mapInfo.count(nId) == 1); + if(mapInfo.count(nId) != 1) { + fprintf(stderr,"%s: Could not find tried node with nId=%d=vvTried[%d][%d], mapInfo.count(%d)=%lu\n", __func__, nId, nKBucket, nKBucketPos, nId, mapInfo.count(nId) ); + continue; + } + 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); @@ -492,14 +544,27 @@ CAddrInfo CAddrMan::Select_(bool newOnly) MilliSleep(kRetrySleepInterval); } int nId = vvNew[nUBucket][nUBucketPos]; - assert(mapInfo.count(nId) == 1); + + if(mapInfo.count(nId) != 1) { + fprintf(stderr,"%s: Could not find new node with nId=%d=vvNew[%d][%d], mapInfo.count(%d)=%lu\n", __func__, nId, nUBucket, nUBucketPos, nId, mapInfo.count(nId) ); + continue; + } + // 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 +646,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); - + // 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 +722,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 68419ea61..ea95f7319 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-2023 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html /****************************************************************************** @@ -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_) EXCLUSIVE_LOCKS_REQUIRED(!cs) { 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"); + std::vector().swap(vRandom); + + 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/alert.cpp b/src/alert.cpp deleted file mode 100644 index 00cb4f8e2..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-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. * - * * - * 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 16c063451..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-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. * - * * - * 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 8e477e446..000000000 --- a/src/alertkeys.h +++ /dev/null @@ -1,28 +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 -/****************************************************************************** - * 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/amount.cpp b/src/amount.cpp index 987bfadae..4f183465d 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-2023 The Hush developers // Distributed under 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..62be095e7 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-2023 The Hush developers // Distributed under 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..02489a3e8 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-2023 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html /****************************************************************************** @@ -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/arith_uint256.h b/src/arith_uint256.h index c5e3e37db..2335aae0e 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-2023 The Hush developers // Distributed under 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..f2df4a303 100755 --- a/src/assetchains_stop +++ b/src/assetchains_stop @@ -1,5 +1,5 @@ -#!/bin/bash -# Copyright (c) 2016-2021 The Hush developers +#!/usr/bin/env bash +# Copyright (c) 2016-2023 The Hush developers set -eo pipefail hush_cli='./hush-cli' diff --git a/src/asyncrpcoperation.cpp b/src/asyncrpcoperation.cpp index d62fdc584..61079234f 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-2023 The Hush developers // Distributed under 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..1feea67df 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-2023 The Hush developers // Distributed under 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..49205cbec 100644 --- a/src/asyncrpcqueue.cpp +++ b/src/asyncrpcqueue.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2023 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..a6a7dc033 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-2023 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/attributes.h b/src/attributes.h new file mode 100644 index 000000000..c5472bc81 --- /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-2023 The 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/base58.cpp b/src/base58.cpp index d46894ea0..bb6c75c22 100644 --- a/src/base58.cpp +++ b/src/base58.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2023 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 @@ -323,14 +324,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..9cc3db69a 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-2023 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html @@ -146,7 +147,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 +171,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; }; diff --git a/src/bech32.cpp b/src/bech32.cpp index 778761a6d..0930d0c87 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-2023 The Hush developers // Distributed under 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..b9470b12e 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-2023 The Hush developers // Distributed under 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..fd66b36c9 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-2023 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html /****************************************************************************** @@ -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/bitcoind.cpp b/src/bitcoind.cpp index 9e5a2b43a..c791d4ef7 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-2023 The Hush developers // Distributed under 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..44c6f7f51 100644 --- a/src/bloom.cpp +++ b/src/bloom.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2023 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/bloom.h b/src/bloom.h index 22f3bd396..0abbe8e86 100644 --- a/src/bloom.h +++ b/src/bloom.h @@ -1,4 +1,5 @@ // Copyright (c) 2012-2014 The Bitcoin Core developers +// Copyright (c) 2016-2023 The Hush developers // Distributed under 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..0fc0bb206 100644 --- a/src/cJSON.h +++ b/src/cJSON.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2023 The Hush developers /* Copyright (c) 2009-2017 Dave Gamble and cJSON contributors diff --git a/src/cc/CCGateways.h b/src/cc/CCGateways.h index 2a7b43afb..63d46ce8b 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-2023 The Hush developers // Distributed under 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..2701251b3 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-2023 The Hush developers // Distributed under 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..ec75faec1 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-2023 The Hush developers // Distributed under 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..58b8072b6 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-2023 The Hush developers // Distributed under 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..9ab6082a4 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-2023 The Hush developers // Distributed under 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..246a980d1 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-2023 The Hush developers // Distributed under 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..197af430f 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-2023 The Hush developers // Distributed under 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..592a63136 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-2023 The Hush developers // Distributed under 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..146b7389c 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-2023 The Hush developers /****************************************************************************** * Copyright © 2014-2019 The SuperNET Developers. * * * diff --git a/src/cc/CCassets.h b/src/cc/CCassets.h index 03af560e8..c0b64f131 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-2023 The Hush developers // Distributed under 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..ea716b2b3 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-2023 The Hush developers // Distributed under 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..a0c893937 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-2023 The Hush developers // Distributed under 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..becbb86ff 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-2023 The Hush developers // Distributed under 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..e1fca87e8 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-2023 The Hush developers // Distributed under 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..b463df52b 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-2023 The Hush developers // Distributed under 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..b1401ad2a 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-2023 The Hush developers // Distributed under 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..4e3c40c1d 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-2023 The Hush developers // Distributed under 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..8c6f487f2 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-2023 The Hush developers // Distributed under 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..3af9e0711 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-2023 The Hush developers // Distributed under 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..ad9c7131a 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-2023 The Hush developers // Distributed under 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..e78e20cdd 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-2023 The Hush developers // Distributed under 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..236b4c3ed 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-2023 The Hush developers // Distributed under 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..6111165c6 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-2023 The Hush developers // Distributed under 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..03a1d29a3 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-2023 The Hush developers // Distributed under 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..bc358dcbe 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-2023 The Hush developers // Distributed under 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..e1db0a1f9 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-2023 The Hush developers // Distributed under 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..d4a8aa6d8 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-2023 The Hush developers // Distributed under 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/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/cc/assets.cpp b/src/cc/assets.cpp index bbf624d77..d2ec4f21b 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-2023 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html /****************************************************************************** @@ -150,20 +150,6 @@ bool AssetsValidate(struct CCcontract_info *cpAssets,Eval* eval,const CTransacti outputsDummy = inputs = 0; preventCCvins = preventCCvouts = -1; - // add specific chains exceptions for old token support: - if (strcmp(SMART_CHAIN_SYMBOL, "SEC") == 0 && chainActive.Height() <= 144073) - return true; - - if (strcmp(SMART_CHAIN_SYMBOL, "MGNX") == 0 && chainActive.Height() <= 210190) - return true; - - // add specific chains exceptions for old token support: - if (strcmp(SMART_CHAIN_SYMBOL, "SEC") == 0 && chainActive.Height() <= 144073) - return true; - - if (strcmp(SMART_CHAIN_SYMBOL, "MGNX") == 0 && chainActive.Height() <= 210190) - return true; - if (numvouts == 0) return eval->Invalid("AssetValidate: no vouts"); diff --git a/src/cc/auction.cpp b/src/cc/auction.cpp index 3f8697c7a..ad4ac8f56 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-2023 The Hush developers // Distributed under 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..fc6b98dc3 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-2023 The Hush developers // Distributed under 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..b8c4cf49e 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-2023 The Hush developers // Distributed under 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..9f902a140 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-2023 The Hush developers // Distributed under 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..498047196 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-2023 The Hush developers // Distributed under 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..c4a7ecb0b 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-2023 The Hush developers /****************************************************************************** * Copyright © 2014-2019 The SuperNET Developers. * * * diff --git a/src/cc/customcc.cpp b/src/cc/customcc.cpp index c1b1c9028..ee27bc5be 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-2023 The Hush developers // Distributed under 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..5741dd4a1 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-2023 The Hush developers // Distributed under 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..fa8b11b19 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-2023 The 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..3101e440d 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-2023 The Hush developers // Distributed under 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..50ad1ec98 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-2023 The Hush developers // Distributed under 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..52ea11f33 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-2023 The Hush developers // Distributed under 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..890ec52c4 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-2023 The Hush developers // Distributed under 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..d8bbe675e 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-2023 The Hush developers // Distributed under 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..6b0d06075 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-2023 The Hush developers // Distributed under 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..7b531002d 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-2023 The Hush developers // Distributed under 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..91d0a0753 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-2023 The 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..d6bc92c8a 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-2023 The Hush developers // Distributed under 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..e490781b2 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-2023 The Hush developers // Distributed under 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..c403967d3 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-2023 The Hush developers // Distributed under 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..8142fc472 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-2023 The Hush developers // Distributed under 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..d2998a388 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-2023 The Hush developers // Distributed under 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..69e3fae95 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-2023 The Hush developers // Distributed under 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..a7eac9659 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-2023 The Hush developers // Distributed under 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..1debb9445 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-2023 The Hush developers // Distributed under 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..d7de6f278 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-2023 The Hush developers // Distributed under 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.cpp b/src/cc/games/tetris.cpp index cd609154d..b0ffaff56 100644 --- a/src/cc/games/tetris.cpp +++ b/src/cc/games/tetris.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2023 The Hush developers /****************************************************************************** * Copyright © 2014-2019 The SuperNET Developers. * diff --git a/src/cc/games/tetris.h b/src/cc/games/tetris.h index 7ef7a9aec..be899ed34 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-2023 The Hush developers // Distributed under 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..ad1364c11 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-2023 The Hush developers // Distributed under 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..4ac8885cc 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-2023 The 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..5d51c3767 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-2023 The Hush developers // Distributed under 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..8f94e6bcb 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-2023 The Hush developers // Distributed under 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..b5c5e0c62 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-2023 The 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..98cd3f30c 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-2023 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html /****************************************************************************** @@ -672,9 +672,6 @@ bool Eval::ImportCoin(const std::vector params, const CTransaction &imp LOGSTREAM("importcoin", CCLOG_DEBUG1, stream << "Validating import tx..., txid=" << importTx.GetHash().GetHex() << std::endl); - if (strcmp(SMART_CHAIN_SYMBOL, "CFEKDIMXY6") == 0 && chainActive.Height() <= 44693) - return true; - if (importTx.vout.size() < 2) return Invalid("too-few-vouts"); // params diff --git a/src/cc/importgateway.cpp b/src/cc/importgateway.cpp index 12ab0f90e..ea4ea4318 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-2023 The Hush developers // Distributed under 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..6bc8fc97c 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-2023 The Hush developers // Distributed under 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..ee0f0591a 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-2023 The Hush developers // Distributed under 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..d54ad652d 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-2023 The Hush developers // Distributed under 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..9bd5d2a0a 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-2023 The Hush developers // Distributed under 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..d9ce00d1d 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-2023 The 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..7fd889033 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-2023 The Hush developers // Distributed under 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..a300e9a6e 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-2023 The Hush developers // Distributed under 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..c7621178a 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-2023 The Hush developers // Distributed under 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..8bd2427fb 100755 --- a/src/cc/makecclib +++ b/src/cc/makecclib @@ -1,5 +1,5 @@ -#!/bin/bash -# Copyright (c) 2016-2021 The Hush developers +#!/usr/bin/env bash +# Copyright (c) 2016-2023 The Hush developers # Distributed under 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..99b4f889f 100755 --- a/src/cc/makerogue +++ b/src/cc/makerogue @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright 2016-2021 The Hush developers +# Copyright 2016-2023 The Hush developers cd rogue; make clean; diff --git a/src/cc/musig.cpp b/src/cc/musig.cpp index 363cca280..1c050c112 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-2023 The Hush developers // Distributed under 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..e1307810b 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-2023 The Hush developers // Distributed under 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..d212cc387 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-2023 The Hush developers // Distributed under 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..a9aa9e9ab 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-2023 The Hush developers // Distributed under 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..3c9bb2556 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-2023 The Hush developers // Distributed under 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..3dd6f07ec 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-2023 The Hush developers // Distributed under 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..d8aa7f5e6 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-2023 The Hush developers # Distributed under 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..9a90aebde 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-2023 The Hush developers // Distributed under 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..d5964936b 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-2023 The Hush developers // Distributed under 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..e5c5adce9 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-2023 The Hush developers // Distributed under 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..b744e4015 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-2023 The Hush developers // Distributed under 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..47615b752 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-2023 The Hush developers // Distributed under 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..fbed7c2c0 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-2023 The Hush developers // Distributed under 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..c5fa67397 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-2023 The Hush developers // Distributed under 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..506768506 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-2023 The Hush developers // Distributed under 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..8148e5543 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-2023 The Hush developers // Distributed under 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..304c48288 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-2023 The Hush developers // Distributed under 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..18d5c3f7f 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-2023 The Hush developers // Distributed under 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..1f6d737b6 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-2023 The Hush developers // Distributed under 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..4fa1f9da8 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-2023 The Hush developers // Distributed under 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..36daf97ab 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-2023 The Hush developers // Distributed under 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..4186812f3 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-2023 The Hush developers // Distributed under 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..ffb46e714 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-2023 The Hush developers // Distributed under 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..b2aaffc9a 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-2023 The Hush developers // Distributed under 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..ee309c291 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-2023 The Hush developers // Distributed under 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..4e20e54b4 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-2023 The Hush developers // Distributed under 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..3acc57622 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-2023 The Hush developers // Distributed under 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..a90edc149 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-2023 The Hush developers // Distributed under 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..63c135f7a 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-2023 The Hush developers // Distributed under 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..4bba3f2d7 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-2023 The Hush developers // Distributed under 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..ac78594c1 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-2023 The Hush developers // Distributed under 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..7398fd776 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-2023 The Hush developers // Distributed under 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..730a0c61f 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-2023 The Hush developers // Distributed under 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..858a2deb9 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-2023 The Hush developers // Distributed under 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..522da8421 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-2023 The Hush developers // Distributed under 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..82003237c 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-2023 The Hush developers // Distributed under 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..b5109f466 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-2023 The Hush developers // Distributed under 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..cd11d9d54 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-2023 The Hush developers // Distributed under 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..8b3aa9cd1 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-2023 The Hush developers // Distributed under 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..a06d4bb1e 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-2023 The Hush developers // Distributed under 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..c2753145f 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-2023 The Hush developers // Distributed under 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..254f0c404 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-2023 The Hush developers // Distributed under 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..166eb32d2 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-2023 The Hush developers // Distributed under 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..bcaf9bb8a 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-2023 The Hush developers // Distributed under 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..530a4302f 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-2023 The Hush developers // Distributed under 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..a1721ec73 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-2023 The Hush developers // Distributed under 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..6effe3b57 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-2023 The Hush developers // Distributed under 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..88d18b620 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-2023 The Hush developers // Distributed under 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..5d410eb1d 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-2023 The 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..52acd17e3 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-2023 The Hush developers // Distributed under 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..1e87b22e1 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-2023 The Hush developers // Distributed under 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..eb94559bd 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-2023 The Hush developers // Distributed under 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 23d7df788..ef9213bb4 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-2023 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html ///////////////////////////////////////////////////////////////////////////////// @@ -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" @@ -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; @@ -206,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; @@ -280,7 +279,6 @@ public: pchMessageStart[1] = 0x1F; pchMessageStart[2] = 0x7E; pchMessageStart[3] = 0x62; - vAlertPubKey = ParseHex("038a1bd41a08f38edda51042988022933c5775dfce81f7bae0b32a9179650352ac"); nMaxTipAge = 24 * 60 * 60; nPruneAfterHeight = 1000; @@ -315,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; @@ -557,14 +555,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 + // HUSH mainnet checkpoint data checkpointData = //(Checkpoints::CCheckpointData) { boost::assign::map_list_of (0, pCurrentParams->consensus.hashGenesisBlock) - // Last updated at 1613482505 via hush3 contrib/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,12 +1107,975 @@ 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")) + + // Generated at 1675984534 via hush3 util/checkpoints.pl by Duke Leto + (1088000, uint256S("0x00000002c42e2c0fc2dd7110304fb3d67daafaf0ebeab611a55b7d4dd18d8650")) + (1089000, uint256S("0x000000018e43dece08da3175dc77095b766a26915d12cf74f1af9442740449e0")) + (1090000, uint256S("0x000000020838fa90a1cda91c014d907d39c39c66e411d170ca4828efb3af4c79")) + (1091000, uint256S("0x00000004bffbb9be4d9f1a61c0021775f854ab1f590ca306c404787c035a4807")) + (1092000, uint256S("0x000000006383674d4e847e03a294ac6a63fef8cffe97029f07c92d26b8ec56fe")) + (1093000, uint256S("0x000000010e765f2f7664ca856435cd14ccc07535665ad1bf717df2bcd5f6f2ad")) + (1094000, uint256S("0x0000000407986aa26a0d1e7e955000e1fd55df0d8d80334b1fbb2d69669b6836")) + (1095000, uint256S("0x000000020d09d8e345132fd62d01adc063cadef4722c3273a1825e1b8bf0d9ab")) + (1096000, uint256S("0x000000000b3c0853a862f6ab950e90b9c8d4e31c6e64dbaf35566208ab75a9df")) + (1097000, uint256S("0x000000006fd4db1bb4dc48ed382f388bba054025e94b4b677cb88c9604ccd0a7")) + (1098000, uint256S("0x00000000eaacf730729706231ecaab40268d7cc5899b38a88577fcb1529f165e")) + (1099000, uint256S("0x00000000cbc9a34bd3006fc58f532afe06879c37baf1203a97399d647d08df49")) + (1100000, uint256S("0x000000055746ed129f6e080e1ad7cf1c3b7991f61d9deb88009070eb466046b7")) + (1101000, uint256S("0x0000000292feaaf9d63cde979314cba3d3da073a2ba0787987bb2d1c152fc046")) + (1102000, uint256S("0x000000058252f88934fc156c1a5e640cfa3527c59b4b5642a912b616fcf1895c")) + (1103000, uint256S("0x000000001052f5e5504227a2ecca6fe8bd537aeacd7e37f42763a0e45fe2441f")) + (1104000, uint256S("0x000000011040c25528d28cf58af8cb64cebcd655187f03740bb252a3f8122492")) + (1105000, uint256S("0x00000005717505e51912bfded85c605ecbb5d7993dc62ed8d8b4f642a37785ae")) + (1106000, uint256S("0x00000004af60a5433510940f3f513e280cc735f9c6634f6c21f09af06e47e79b")) + (1107000, uint256S("0x00000008accf0c9ae0e366dddf9a20b243cafdf63168b73347e85eaaad34c70a")) + (1108000, uint256S("0x00000002590edf9273758c843fc2ebca3a4c25c926d9756186478b67c2636f3d")) + (1109000, uint256S("0x00000006fac3ea21aca8de55fff64cdb44654fb1bbaaa7122d15bed0ba369064")) + (1110000, uint256S("0x00000000fdab3549e08f9ca12857c83f42c4f010b2fda2dba66ede48a5dc7e57")) + (1111000, uint256S("0x0000000495bb04fb535d76dd6e76986f3d8dced4d1e7f09ba06e6ab7aa740d03")) + (1112000, uint256S("0x000000055e62518723147d9b2113b00e77d4ba9773864b44bd2ed960b97416a9")) + (1113000, uint256S("0x000000071bec6afe075e0ca4c2d02a0b699f71387babb0271d7dc62fc642970d")) + (1114000, uint256S("0x000000056148323bc501945ed0433c286a523f84432159322b45ba344d6cb38f")) + (1115000, uint256S("0x0000000638c218c77a322ae0c8a259299ef0b0a6eefcf4a7501afdb40689383e")) + (1116000, uint256S("0x00000002dfd21b8fc5f15597a29639cc94a76444a1fbb3b09ca6bcc81f01f513")) + (1117000, uint256S("0x0000000482187d47d169b46b796f50e3c33742f47a33edbd4afb08f13cb849ba")) + (1118000, uint256S("0x0000000163118a8e695b808e67c34f4a5d30f25b3492a443d5e62d85913ca04c")) + (1119000, uint256S("0x0000000543b33b3e83f2b96e8dda83dc2a2606fd74ae803dacb65f66baa0d595")) + (1120000, uint256S("0x00000006b40bb5d87feefa917c203eaa024285f894a7784e7c28822f10dfad14")) + (1121000, uint256S("0x000000039fba003a7e63c9fe0588fb80dbc23ca34d0032fc9e38ccab15a699d0")) + (1122000, uint256S("0x000000007b8cc5ed0c44c78f3d19b5a8a5de2e8c2fbb6538d56637e414a1a424")) + (1123000, uint256S("0x000000076281d748a0242e05f7d33125ef686d031d52f94634e015224cdd60c5")) + (1124000, uint256S("0x00000007917a10e30dc6ade1e98cf7a6bed78ec6de429ac4913f7c02acff1f41")) + (1125000, uint256S("0x000000026d94bab5f164519547f7c1d25664fd26a23ec96a18e50de6cb02f39b")) + (1126000, uint256S("0x00000002a44f24af5feed7d1fb4cede90fd05ef404428b7ce7f3bd7b3202a1ce")) + (1127000, uint256S("0x000000008c43bb7a1fb542d890f2e4892a5e5ef6e1365dbe8806d2a55ae8d387")) + (1128000, uint256S("0x00000006c072b5f08c55a280ef7d5d21c5f9230a8f68f613225cf74db010a444")) + (1129000, uint256S("0x00000001c9c85f1c02439e82f724137db939c9e8c77af8e70173d0e40a0b3af3")) + (1130000, uint256S("0x000000076f4faeb53342aac9204affdbacb1709885a4a245e64740343d665326")) + (1131000, uint256S("0x00000004397ee6c65cd0eedf8807fe40f826506a18bda1d75bc3232ea6d18c99")) + (1132000, uint256S("0x00000001e451ea9ba1baed5944beb0533f30b019d530309dcc64910b1b1b8452")) + (1133000, uint256S("0x00000005fcd34538acfa636f031fd3f508c20e07e9052b664597c8185af0d3e0")) + (1134000, uint256S("0x00000001f2ffa9616240a9674f5fec0ac0564daf1483424d674b3b5c8524edf1")) + (1135000, uint256S("0x00000006aecdd129c22bb8f2d86b6dd23db163d9452850d875cab607d0d1988b")) + (1136000, uint256S("0x000000043cb8bdc396e2769e7a88860d9d20d7a59f271789a44d3056b59bc024")) + (1137000, uint256S("0x000000052666465ba541e16a2ccb766901dac6b45af67820865f550e3c4117d0")) + (1138000, uint256S("0x000000053cd2a374a3aa42b238fcd5f47f5c0b50e119c29669ddfb27cfa747e2")) + (1139000, uint256S("0x00000005e6bab6dcd63c7bf8cb2d27e103d860e2dba5e82b22352fd09fbcbe9a")) + (1140000, uint256S("0x00000008265a1b52f46556220ef184bd924a47ca13dea30a2e01ae91c614d521")) + (1141000, uint256S("0x00000002b799b12a272ffecd74b19d9ce4d4fe184e414f133c9db5c086a20ad5")) + (1142000, uint256S("0x00000004fbe0bf705da37792af72bdcd65c982e78ca15bb16fede76b2c3094d7")) + (1143000, uint256S("0x00000003be8cce9f701ace74151817f71e3731125892832465238d3c972d290c")) + (1144000, uint256S("0x000000068a415ca795b3b717590b21c25ac680ba308c3b2b08b81c299b56e31d")) + (1145000, uint256S("0x0000000317e5a350e0dae1027c20645e4d3c36c339c5c780ef2c0186856efc5d")) + (1146000, uint256S("0x00000006edf1d01d525d34475d4f11442eb8a2c59ddc4c10a7d5a1c972b1e7dc")) + (1147000, uint256S("0x000000020f16fac207427d6ec232f2ef554778a090c32155f43f90420381845d")) + (1148000, uint256S("0x00000003fe28c78fdd1231b327a40da2b32fa41ac5c5e343309034ee5785ba1d")) + (1149000, uint256S("0x000000007abcb62c8e83df22359876a8cff94674ecb3947b0922d3eef751ec02")) + (1150000, uint256S("0x0000000650e627bd7da6868f14070aff8fdbd31ef7125fe77851976ed3adfc54")) + (1151000, uint256S("0x00000002854a57a378bfbd335ba3e9f3f220c48d1604b70b233667466e6de130")) + (1152000, uint256S("0x000000013d9f22b3557a3eae21cb9739451a168fde0714649d98a8ff1ed36937")) + (1153000, uint256S("0x00000005fea3b98885ef8284dbc2ccae53330fbd940d0011acdf6588a49feb59")) + (1154000, uint256S("0x00000003429e13ad0a0cd0cea72c4422b9d9c87b0ebefb0d9f74648b60569edd")) + (1155000, uint256S("0x00000006dfe8d708ceefa5c6f28c4eef8e2cececf81211b305ee8d9d1e4b2a30")) + (1156000, uint256S("0x0000000960bf07a13ea2b0808c8c8f9631ffbf870769660a3517e342bae23d2f")) + (1157000, uint256S("0x00000003baa90aad3b9a28ba28d95b2d93c3a1fd5ee59649f9343f0b800df45a")) + (1158000, uint256S("0x000000038e4dc332187256627973277ad744870d265ca2f96fb81a13898a69c0")) + (1159000, uint256S("0x00000004e5ae2a139e17de72bac6b012c738f975f7d37feccf62232b2541c4c9")) + (1160000, uint256S("0x000000006904fea1620eb53ad7f912197881e3d47a8a6683d943efc0ff43c94e")) + (1161000, uint256S("0x00000004589195775511a5ea92411eb37c4cf8bc7b6d4d2388c666200e6770b7")) + (1162000, uint256S("0x0000000231fe740494f062669c13accc1c3cba62214b2ed7c93ed74259573675")) + (1163000, uint256S("0x000000054519199a161a43a9e690576059b823e481c0e0fc2baeafb6ab2ec642")) + (1164000, uint256S("0x000000027897fe94751d463964461257f89835b968009a5498719ae2141c71f6")) + (1165000, uint256S("0x00000001fde2686f240e6670fa722e0a346caa3dc510c9c832314af7648a2ee2")) + (1166000, uint256S("0x000000059b344a03db6dfa9dd6bb8f006155d943c3ed2e21009a175337a7aefa")) + (1167000, uint256S("0x0000000400e9418a5e5877ccd79f236a6139a5277a8104c027d85db8ec088105")) + (1168000, uint256S("0x00000002e8b3dacca4dc0833e4a9e2cbbf78dab53e9f0ae143f4d315fddc88ce")) + (1169000, uint256S("0x0000000330f37afdf21d9085991ee921e8ae3fafe4494d9e054b408fb56f1bc5")) + (1170000, uint256S("0x00000002adc92872d2031c7f142d7c3cb85ffa90b3a656d2b2061e997e7b8770")) + (1171000, uint256S("0x00000006e837c8a29d752739000167ab1b1ffec2cb5822c129b2c28acce00b5e")) + (1172000, uint256S("0x00000002baeedc6492367e25459f1facb2e478adab3369264bad86bd36eefcec")) + (1173000, uint256S("0x00000000aaf69980bc72f37fa87cb8b6e67083df5ee00e767fbcda90e958a05d")) + (1174000, uint256S("0x000000073883ae59028049bd849d1d588f16c9d750337d7a2d0e593f42087b89")) + (1175000, uint256S("0x00000000c5f7849a2a38329061d4a802e5682bf20ea21d4cff4c0eb2c77b27a1")) + (1176000, uint256S("0x00000007a67a59afe4f0132f2daa79246ee2a8574a8b216c41912836dd0bdc43")) + (1177000, uint256S("0x00000003caf28467a541bdeef8d87e5cd1006fbfdb35a2480715601c207d6a96")) + (1178000, uint256S("0x000000021b2de9ab84878ac507ae626bbf5f41981ae8b5dd53809e62bb927093")) + (1179000, uint256S("0x00000009677998fba7c3a952475730666da5392a79defa896bc9ede5a44131c8")) + (1180000, uint256S("0x00000007747404722bfbab50f0a42b8c950c636d332263f2dc189f72b8832df4")) + (1181000, uint256S("0x0000000617bb091494d3158fc2ef014ce11ec3920f16a0ea291f288980e453e0")) + (1182000, uint256S("0x000000085cdf357b7eac144b765a63e9a76b9b26501c45ad1ba76e96061d23d2")) + (1183000, uint256S("0x00000005179a1b05631ba9d46ce57da700397797d808d489600345f1f8be1e94")) + (1184000, uint256S("0x0000000895ad9c2d9b2903e1ce8d7dc83b5f68ea7c70c34bc309d2b381f7eb79")) + (1185000, uint256S("0x000000070d264220351e1d1bd5a9d8c7d1a4585c04856f749262b55ef40abffa")) + (1186000, uint256S("0x0000000497315ad1286045d458e8b5208feb0b4ef78c8d895739f551a2024245")) + (1187000, uint256S("0x00000003676ae259e1b343c7df5dedf3e76ba96c9fcff7c29d002382a66cb2ed")) + (1188000, uint256S("0x000000041b554feb0d831fc2818ab68d259d18940db3dab317d8b76281d04f76")) + (1189000, uint256S("0x00000001c08e6d57ae32dcd130495bbf477aa2e0ba239ae3794c2e667dfeaf25")) + (1190000, uint256S("0x000000012c06d63527fc546d26d426fc0a1ca861d7261b87b899b52603bd6476")) + (1191000, uint256S("0x00000000237e77b25ca87430b0956d3071dceefa4087b15434e8aaf995446af9")) + (1192000, uint256S("0x00000004622f8f297bf642428f6c856e669096b2e5f670e0fb98bcf7ff760699")) + (1193000, uint256S("0x000000031331f9962f234f8542aad5e2f8e8f6f4d5d1a7d7f7111fe6b8ff3388")) + (1194000, uint256S("0x0000000315942d3677f377108cb90ab78a4def34ee3638c0293a3694c08247ed")) + (1195000, uint256S("0x00000005588624111c5659969c4603dae7a321093e117d1b86e1ce36dfa59043")) + (1196000, uint256S("0x0000000171b3dffc7a999a53522e6d705cad236340fe4c8a70e4f06cf408a0a5")) + (1197000, uint256S("0x0000000107dd22f5c96d4e4c347766d9fcf9b7a03ab65177bb185a84a7f23e4b")) + (1198000, uint256S("0x000000031ebcfb2ab9672ef855251fbca96fa274dfde94e64a4f909f8cd3d43c")) + (1199000, uint256S("0x000000038b953b235acd6f5a6140649993f380042339c59633158f09a673a061")) + (1200000, uint256S("0x00000008b51ed341723143be685bfa5dc7d0623a7892958fab0e91f1a0b067bd")) + (1201000, uint256S("0x00000005448c7a0aeda8d975ab2cad101185aa0021ca56f348cc814d76e494de")) + (1202000, uint256S("0x000000034d9fd12360fc9b61c2b7d3d258e433903980831eff5a139fcb5e7969")) + (1203000, uint256S("0x0000000801ec6bd4a84ce37e6bf35133f26899014f9044fd5eca5eccac5188d1")) + (1204000, uint256S("0x00000005e48ca83c0b50881d31bbc07708b03119b2f176aa5cb447140637fee3")) + (1205000, uint256S("0x00000001392769fbe9d1b549347188e7c6900db2bd704f045e6ca489beae018e")) + (1206000, uint256S("0x000000051c5c0c5a0066567571e032870629ae69e363249edb89e4d56eb311c0")) + (1207000, uint256S("0x00000004203c479698293d96ed36c0716ae6493391ae6adc2e5236100f83ae40")) + (1208000, uint256S("0x00000001972ec2ee647e9b6b8dc3b713bedff826cba12765e579fcdeb8be501b")) + (1209000, uint256S("0x00000001f35be87e27e07382c71695681ba8dad01182f42cefc8b6fdefdfcce6")) + (1210000, uint256S("0x000000001466676d37c27e82694b03318fda2e81a363d16ff8d7fbe8a76d8693")) + (1211000, uint256S("0x0000000637f96880dc302378cded2019cf008974fb9f46f974d2dd2d13f672a9")) + (1212000, uint256S("0x000000074528eab351d79f82b0e44a89ba2a2c0a4561e75c8cb2f63c4610bbcf")) + (1213000, uint256S("0x0000000471a897a0576d34aeb4c3e740bb2bbe3d16f2af04e6191ef5cc9c5747")) + (1214000, uint256S("0x000000029c375c216d74848a75a19b459921f8e2a5c86f953737634a878fec0e")) + (1215000, uint256S("0x000000074cae91dfcb9c7d888d2c03465aad5f3321fb769f68cb0806ce1c025c")) + (1216000, uint256S("0x00000008372aa1d849f8959c259943f5eb1d2f07331e62a0ae5a15e0a8243580")) + (1217000, uint256S("0x00000001b2f59097c6e15affbdc4c013088c5145cdbd86b09a6a64893d68624e")) + (1218000, uint256S("0x000000039bcbbf21170cdb2688439de3ca39f9cfe781408932917950b25ad649")) + (1219000, uint256S("0x00000004159e554fa29498c2abdf9c23fc2a7b703a905f252cda2a53b377c5ec")) + (1220000, uint256S("0x00000006e1c2ff124328e47c93b36f491d02ea6b3f73a5035d448123977afa3a")) + (1221000, uint256S("0x00000002e29d71fd9032a14be6e05538d091ca8be41bf9bbe7c648e562991f2b")) + (1222000, uint256S("0x00000002277603d2d735ef89e33497fe5ee60413f15cf45cf0c185c7f1c5d240")) + (1223000, uint256S("0x000000055c22a01b0f4fe99aaa72221d5e41f0f1bf9d4c8544fe616a3d138e1f")) + (1224000, uint256S("0x000000028afd93c37d53830dab4b1dcbf656ea99ea1bc5332e8941a2b9aed2b5")) + (1225000, uint256S("0x00000006477c2ff2b13af2d4fe8b386e184442daa5c8d9cb31293099ff9bdb31")) + (1226000, uint256S("0x000000021717f01436a9677af5ad8836e8eec203f657d82d0a368df92de315aa")) + (1227000, uint256S("0x000000069e3ad932d5e29a21b64fea1e54c0bcec291bab7c7f3d4d22f01553ad")) + (1228000, uint256S("0x00000005119c8d2e0886d513477364a93bea863344b8bf87415445426cb6778d")) + (1229000, uint256S("0x00000004427be49483384a8c7ffb5c06fac61dfdc0a75b0a03e3ca0ea41e513a")) + (1230000, uint256S("0x00000004ce24d10589f23cc53ac76df507dff75495431c279fb8ebb771791073")) + (1231000, uint256S("0x00000001efd76d368ee107b1647e3700afb5c173d0d637b4d749e904d06fdb35")) + (1232000, uint256S("0x0000000129a4b6e0ead541c57159a6ac051dc8aa7459b9eac592edeb851ad7b6")) + (1233000, uint256S("0x00000006b821eaf79d718e817d59186ff0d7d2dcfa0898891e93e275b3d63cb0")) + (1234000, uint256S("0x00000002efdd622c85230eb4d3978bd4396e58af45304ab1ac28ef5089cd19d4")) + (1235000, uint256S("0x000000060e07823a1529a26fd2a731247ee8985dd77bba511ed23e1d9d075001")) + (1236000, uint256S("0x00000001c86c1d13488565710495fcdd02f3d5f6b1b3fa75b8633e1a8d83a70e")) + (1237000, uint256S("0x000000049093e5f965deb09ecc0778be58181d79c1c25f309a2a7939b1e636c3")) + (1238000, uint256S("0x0000000326a511be9b410c430f9c1770c025c27dddceadf47ddedaf844d3ccb9")) + (1239000, uint256S("0x000000017e9a177c1a3a3f79dd703badebc790dd99a35fb2287a7f2b3b71547c")) + (1240000, uint256S("0x000000042929e3117f22829289d73ed8c33032ecd813e65da9d25ee48139c5de")) + (1241000, uint256S("0x00000001289c575a3697606ebfe35d0cfaaa1ed0c6e0f6c75a75b77889c08b0e")) + (1242000, uint256S("0x000000040c7bf04faf5873d8107962db45e56d33d37ce6dcd319826834111016")) + (1243000, uint256S("0x000000009fd238b0ce665f9d96204c2a3e5b1e36744385a88c58781ad8298726")) + (1244000, uint256S("0x00000001096334e88f76b6f5b073d8c72543745ba0a52612f525fb6c7f181fe3")) + (1245000, uint256S("0x00000000467dfb301c6db05c5d0725aa0133a473456160de8e132779bfad25e0")) + (1246000, uint256S("0x0000000222addd93922d679f8b9c60f0dc87db0172662c770ab9d68ee2774c93")) + (1247000, uint256S("0x0000000347b1078686786223140a6e4a3d1d13769ae095bb369469905b30d7ea")) + (1248000, uint256S("0x000000031d981183243697659fe453d2fc529845b64e72e55fc9f2b358a6e0a7")) + (1249000, uint256S("0x00000001170d6ae54d494bd2dbf29c5ab7f560f51874987d7dbe129d549c097f")) + (1250000, uint256S("0x000000033226eef40d094c8aa88d03bbc9146856c52248760e28c45426787352")) + (1251000, uint256S("0x0000000281c7f7ef75ac6539791e26b9744cccd59414b04ddc4697bcd3595209")) + ,(int64_t) 1675926362, // time of last checkpointed block + (int64_t) 2022392, // total txs + (double) 1371 // txs in the last day before block 1251770 + }; + // END HUSH mainnet checkpoint data + } else if (strcmp(SMART_CHAIN_SYMBOL,"DRAGONX") == 0) { + checkpointData = //(Checkpoints::CCheckpointData) + { + boost::assign::map_list_of + // Generated at 1686858269 via hush3 util/checkpoints.pl by Duke Leto + (1000, uint256S("0x000bffdae30339fad4ed82a2d2bfc0846f12fb9aeef5e33bb563f4cdd376dc08")) + (2000, uint256S("0x0003578c68350c7afacdc940c87ea9255681a135a0a9b2c13a075485d96155ed")) + (3000, uint256S("0x0001fef5443794fe61e0d397897f0a45a66c5473a70819608504f1395aed1d8c")) + (4000, uint256S("0x000197510698c8fc50133971744d1dd49aae371366d3986c412a189e9c617974")) + (5000, uint256S("0x00000094754d610b08b801545dbdbf57433e7c4d2a48818ff499f8fab05b0927")) + (6000, uint256S("0x0002116377d2d0c04344f0ed7eec63814b54bae740562ccede0c3d9404900cdb")) + (7000, uint256S("0x0001c74d83479bf05a3d9181555ff4ed373a642b1b4cb9cc633c090a522c10e0")) + (8000, uint256S("0x00011c3cd9aeadb039ba28547f232391ded0329ab6b7ec454aeb671246c94b58")) + (9000, uint256S("0x00005b1b0187ba523b6670e65262d1b028a140582301c7ea65065cd47a679c6d")) + (10000, uint256S("0x0000f32ac2bd4581ef4b651f72b27d92dfca04d4dc721c505214f113e209b10e")) + (11000, uint256S("0x000086e271117d75ac85fd00fbec94bbc53a5b990ccb362a8a2f064a97cdf7b2")) + (12000, uint256S("0x000098431effc021e44f867cffa2e309d7bbcc34201ea8d3bc7b08faeca556e3")) + (13000, uint256S("0x000194c6d37ebd00f7746536a7f3a891866954c1020f61be5573b055ea991fa1")) + (14000, uint256S("0x0001102d2b0c1efe8c07768b3bd540e8b2ef8c03e2f8271a58def634a51c576f")) + (15000, uint256S("0x0000c616068d8730adbd87b2bc9d4d5322610e52da6806b9cb2f1894af37d933")) + (16000, uint256S("0x0000049f6a5818a48aafb52781f91f8eca4d05c29c537a85c34b6fa342996a27")) + (17000, uint256S("0x000079bf17272dc67ca18df9f7c5b817c37bd2d103ee76d3b2271511c5aa0b82")) + (18000, uint256S("0x00005f4d742dc1b0e12200c4da8080d75973b18b6d2bdf748f149be72a313627")) + (19000, uint256S("0x0000368eaee2a6f22d64c66c0e3cfc7fe2709f7ced31a589ac8b4c461eca2fff")) + (20000, uint256S("0x0001b4057aebdc835c63dfb581235d5917af697fff962ecfe47e8a26c0b3ac55")) + (21000, uint256S("0x00010a339a0830471d384741ff24161252fdfab8ecfb493b6e8d1f1e7ce342b7")) + (22000, uint256S("0x000013c834a72926969cf8ed88b79175aa3ea952e67b7054c4fa06cc4e5209c4")) + (23000, uint256S("0x0000386a639d79d35972576b55787a80986a27c7415949dc645dc50522f6487a")) + (24000, uint256S("0x000075055db90559920ac02c2de8e1622533b7532b84fe702baf05082161e011")) + (25000, uint256S("0x0001b866113317839d2f6fa608f98f798db1570b4f84e36789126edda9b75d35")) + (26000, uint256S("0x00012ce8394b99c4fff5c052a0abb142c8c1eaa58b830699222a8eacb95298af")) + (27000, uint256S("0x000058bbe34298518632e0522d3ba10e050a5a31e2c4fd862a576f300e9f5c1d")) + (28000, uint256S("0x000163c608d28f1c3a10f8425b5469099b7fff50e25424659887e011d2c0281e")) + (29000, uint256S("0x0000c3baca291f20849d96de3436dad0efc24aa5b44bbdd466ea841b28d70a2e")) + (30000, uint256S("0x000075d2e08eafd62f4633cc1cabf281de17e7e0bba7965db75f3cf268b9a980")) + (31000, uint256S("0x00010cc563eef842749ea14412e922bad6e3515c049f639612a07b221aff4de2")) + (32000, uint256S("0x000150dee2380f76bb144f8c5433bd27e049c54feaaeadeb8bfc3948293453a9")) + (33000, uint256S("0x0000ec245f9808c6792915ae2a467593a1675efce42a2d0ee486e091913159d8")) + (34000, uint256S("0x000166dbcd4f262032e7a981207ac709f7be88a037650ca454db43018286c8f8")) + (35000, uint256S("0x0001a5c13dd9333a4ec60bc6af488ef7e3738aaf2170c70b716a30597b8e2d70")) + (36000, uint256S("0x00018e4fe65c96f0e187c265fa3faa49156ad07991284920beaef3b3b499dcbe")) + (37000, uint256S("0x00017e952f47ea070893b41a76468fee7db3073184eab10c960e2aead6fddf7e")) + (38000, uint256S("0x00010e3c64c0127fb995ab10d45bb281e5c78239c0303c825d81bb4cf994c7c0")) + (39000, uint256S("0x0001db8de504639d87029c9be04acdfef038601af58ea38ba307a7cc0ce8fdf7")) + (40000, uint256S("0x00015fc2f6953e67578c6484c3a5342d883fd3ef051456edc55064e544f04df2")) + (41000, uint256S("0x000200e23bc81ee9e9a9b29eb9c478c035d52de845c118a1645a3876d0f0f7ec")) + (42000, uint256S("0x00018b8b952e0268ee7007ca2bfe3499f1c78911e5d308d877aa3829a8ddfa95")) + (43000, uint256S("0x00005cc6dc81cdd3ad3c1bc5675064b8d6d01ac85348c116f4db28c61df5cb52")) + (44000, uint256S("0x0002a71c4a45353eeed81519d1f4b78e4be13702907bc872fd605c094eb5c8fe")) + (45000, uint256S("0x00005c3e9bdb78fa205f39a6f4fff5c547775ee90e79fedebecb17336c03e868")) + (46000, uint256S("0x00024017e7985c841e8b607624f74f3efe46f915d272f9f8c07a93353858d92b")) + (47000, uint256S("0x0000d29c58bb338aa55bb017d8fbbe3b7c3bed83f212094a18ef7fde7f8eb675")) + (48000, uint256S("0x00024b1c2d6131f7ec9748c763c3168d2d761c7617e10d09fb93aff2b4a29ca3")) + (49000, uint256S("0x000120f81110878ca7ec75d155badf2348bda20a9034b24b8317ba0f16568788")) + (50000, uint256S("0x000207bddb3ebb7cb8000f84e63ae7be40e74dde52c8bfa4f0cc913b048e5767")) + (51000, uint256S("0x0001c8554ac45a19684c7328056420d7b27c1c5c9f03059c095ca4a2749b29f4")) + (52000, uint256S("0x000104d93b769e9e7190b031f6250445b05750a36231f8ea7f2dce8c8a0487be")) + (53000, uint256S("0x00002ab5a1e72ef163242f4be6a26063f26cef6f1eccb4cfe44a099ba710fdc4")) + (54000, uint256S("0x000117645f0ee76f12601abe5554729ca9241c65e49cbefae77e67d18204795f")) + (55000, uint256S("0x0000ab7cf81435f26f56b9687b8f6feaaed95ed8090a1dac8a690a39b9a89c8b")) + (56000, uint256S("0x000134d8809fb2222a3ed76958f998589ac69d6d08d534309ecf569b6d448cb3")) + (57000, uint256S("0x00003daaec8c3d9c31b32163cef47c4883ad9b12b85a641eefbd02b06c4b6083")) + (58000, uint256S("0x000096456c3f1af39489df84dbf0a0975c9cc29fa1f524e72cf4421fd6465b82")) + (59000, uint256S("0x00016202a3cdcb3b0c27e75f84cebcf576bc7869abf0fab13c68abd3b111fb9e")) + (60000, uint256S("0x000071cd818c3fa9f155ec8ac65333f43e0d86b4f6ea98fc702ae0fe1ec3126f")) + (61000, uint256S("0x0000d1654355ba77105cc07e7cf024e0200f39646ea3cbf816737e621857ff36")) + (62000, uint256S("0x0000f1e6a09effa09329175ee4d8b42fdae3c365f1232fd440d0d41b6c090dc9")) + (63000, uint256S("0x0000ffbceee7b86cb04a37fefeb0452de8305aef4c37b6bfa84cffe4dba168be")) + (64000, uint256S("0x00002db24701b3d6c0d7547c1636b0aae754c050915ba607da1022e859bf0a07")) + (65000, uint256S("0x000102bfa6361b71cc51e231b87c653dfd21a865284fe013d65bac8fb2d96878")) + (66000, uint256S("0x000061e9bf36f9b2d110d7d545d9fa1deaaf39ce91d2d5e3f51b5e8eec37d820")) + (67000, uint256S("0x00000128e4528bae30aae739e7d1d1528e366739878878bdec5e5d5f5639de21")) + (68000, uint256S("0x0000c45a027fe81eb60c60573bffa4558b3d187f7144131eff0b97fc52d8fbcf")) + (69000, uint256S("0x00005fc22d9c90e1c88c5724ea8b45d2b198bd03d77931c4d328e88313d9080e")) + (70000, uint256S("0x0000bbfd71d248074239456adf756eff007bcbe004b8c02eed8dd1b1656d9270")) + (71000, uint256S("0x00003f2d633d303c935554a414ec99443e01f5e626522159d97b7774f939158f")) + (72000, uint256S("0x0001514d0a98b94dbc81f70c59d29ae437a4690beb464d1b92abe7bd1e055a35")) + (73000, uint256S("0x0000807fe075a08da2bb07b8f4bb9a02b7e450fe6e5be062c21b15beed210dfa")) + (74000, uint256S("0x00006bf606a3c548c55c079343183caaebaa2c23d8580abb9eedf2a7e9b2a453")) + (75000, uint256S("0x00016da1e267ef35372482c84a37012e74c136fea0015b48ac7e039a5025b71e")) + (76000, uint256S("0x000029e02c641075abe8adabdb3b59e3696611f37c3da3f3bfcad72a705e7a3c")) + (77000, uint256S("0x000105f3af93470b7076fdfb9a0e9714f596ca4366deb3c35333648257464d67")) + (78000, uint256S("0x000144235c2eb2e871e11eca2ef9c051432bce4e9a1bb346b0b895e8e559286b")) + (79000, uint256S("0x0000b73f9f1a91cacb3c93638fe7ef6fa91072fd76d91cb51f34e794941f7325")) + (80000, uint256S("0x00001d995acdf7ac796829dcc869dae073258e5c608a8daa709b4c512c3a3343")) + (81000, uint256S("0x0000b163da6072538fc53a789dc47228a691b734a74e551e0e2e9e0d26fdbcff")) + (82000, uint256S("0x00012e9491a6d4d2b32f1869eb44672e1833ab718e580bf5609d7f9c58bc0af3")) + (83000, uint256S("0x00017280176966d19319f3c4d67440759e072e0c8b66b93d1f87921743b99fd1")) + (84000, uint256S("0x0000f62cd78630155998d1a64104c2f66328a586988b18874e99364eb60fc0d9")) + (85000, uint256S("0x00000d6fe7b9dec442628066442bd0558ceaa1a8d664d82f122790b2c917f950")) + (86000, uint256S("0x000029a1d545e5b7fdd28617de6195347d719524d5626f12d19924921e7f2359")) + (87000, uint256S("0x000138aea3caee3827eacfea9efd4d41f74958992c3b17a19599c28932aec442")) + (88000, uint256S("0x0000ace521b7b212027faf886832a3858b6b1391face5d9bfa21a58d08577f17")) + (89000, uint256S("0x000054190734e754a5aa58f1cb70753fcba0a88f512185578b8d772918dbf549")) + (90000, uint256S("0x0000d841407e0ac42c190ca65319bf2c4ec056724c75774bbfaaaf28fc022fec")) + (91000, uint256S("0x0000d95e5a72eb25762fd65ed7901ee7c5365d1b7ada72080743f95fe9bfd308")) + (92000, uint256S("0x0000c77b274f557cca7a381b64ccba1412a4f927ae850cc5e0ea3b3fe6a85947")) + (93000, uint256S("0x000006ce04d80995709a8a93da2eaa6c00a7b0c15e7f409a1cbfa64f92ec4aee")) + (94000, uint256S("0x0000e610317357e75beadac9a249f9b1847e26d98dfde191f9e421df0ac009ec")) + (95000, uint256S("0x000039e0566bdb30c72857c5e05afeefefcb4fea69ee24e86fb3506c93c4169a")) + (96000, uint256S("0x00007707c899da1d86457bc55fc614cef6dfc73216d04f26b500728c57b8b7c6")) + (97000, uint256S("0x000133c725bdbbf3c4c3669e32f459f3d0cb6c473b5a9dcfac06c486e1ece294")) + (98000, uint256S("0x00001d75a7c92f3586045b534f5a80c474b9b1ba463acd1462b9494bc9dbc12d")) + (99000, uint256S("0x000070946880c634b930804e55cc2f380fbd897d4d1713e6ab0a86ec66299f44")) + (100000, uint256S("0x00005af032270f04bc9be8072ee0b70820b88303dc25770a8dfb5c6f00341ae8")) + (101000, uint256S("0x00015739048f9cd91a5f5da04d9b1f0b220d719c13a6b03577d60027ba0cf130")) + (102000, uint256S("0x0000ae124051763e3ccdc1beff5d4ba304715e06f6a54124ee4ce4a4424e2925")) + (103000, uint256S("0x0000b46bd79314799b28964e5bc9cfbfd4481fd4148c4775337cc7a3458f411f")) + (104000, uint256S("0x0000546d926811aeaa19b14fb06c919174d73ceb41800f21e8856b940ea0d51e")) + (105000, uint256S("0x00006f831295c6d417a10268beda28ef058a646d68dcf53f6c5197c7c0071144")) + (106000, uint256S("0x0000aa4f504584b2e604186eb4edc1d60caa757ef25db86a35aca9b9e03bab02")) + (107000, uint256S("0x0000e945fef42d3eb4cc606aa888cb9908a9778592470e6630035821b83bf32a")) + (108000, uint256S("0x000042b833a40904ba608c715efca50f3b351924cddc50793af26be698b791b4")) + (109000, uint256S("0x00008b8778ff887a3ae0dc04a9cc546408c8b7cc4f23668b2e38ade6fbe31487")) + (110000, uint256S("0x00007558a72be2b93ff9c32a3c8c8896f4fd7b8d59430a1917755412307bbcde")) + (111000, uint256S("0x00005fcd2934faee4f6cf128a272a03c7001be0f59abe873c4ef5dbd469fee67")) + (112000, uint256S("0x0000ea01486382afa2787d723f80d1073bd8924181f9e0aba2e4a253e4fb571d")) + (113000, uint256S("0x00002e5f65baec8b526c5096351a30bc33cee3692ed4e3b4144229cf9ca6dc83")) + (114000, uint256S("0x0000177996f4e8f436672b0405b1de6bb7335bdc32cea1635d6122c4d6af7563")) + (115000, uint256S("0x00011891d2d508824de7657981c754372a2c2985b2d483fc48003de27f9b5716")) + (116000, uint256S("0x000088d8381d4a1c3b468bedbf6320e7dba41285ae99bcaf0b4750ca9cada4bb")) + (117000, uint256S("0x0000b0dacbd93ed6feb0c83af3f8b57598ca9b59b87c4a0f6f8b7738b37ba280")) + (118000, uint256S("0x000141aa854c151264db40b7fb065d5d6402c03786d1201a428bdb2f3cf4be0d")) + (119000, uint256S("0x00001dcec0e976c13fa307ee80f37a7d188e80b7e18c6aa744948139090ee4c6")) + (120000, uint256S("0x000159aac0c2854248eeaa7717b5f9defed70ec7eb56225f74650e2e4dd14ab0")) + (121000, uint256S("0x0000ffaabd57940430c76493f65b2ea9588ea5d218bf4ab8cd7986a4f36d85ed")) + (122000, uint256S("0x00004997285f83bdf2b84e906a5427d1246d2a9576fe70ba98db0fb1906e2a81")) + (123000, uint256S("0x00011189d192349030a4d667504557de1c6f321c2d2b433f279d83aefd49a88d")) + (124000, uint256S("0x000021e928fa16624a41e6d5d3275ecbf15d4f2e7ac529f411c071090b01a501")) + (125000, uint256S("0x0001678ffaaf26a44aacadf79d4312a1a3269e110df6a25b00371575574c5fd5")) + (126000, uint256S("0x00014435157bc5cf46047a2080a3fac7680635b4bd269404297581b884f26aff")) + (127000, uint256S("0x00005b0ee65fba4d6eb0902766eadf515fb252b86140e9093d249d8f9a54a128")) + (128000, uint256S("0x000021b7d3534640ec2854c0fcc08b1342162770a4e1c37870e9cf0030582d85")) + (129000, uint256S("0x00009fb144dfe588c1ae56ba6e17a6d6b1565c1b27464c5cba79c918b56a1760")) + (130000, uint256S("0x0000674dcced99276e684e9ac19eb2412e55c968a2bb524069384647cb45eefc")) + (131000, uint256S("0x0000ad841440e59715c68856f4011e854031cad19788438bdceaa4ca161f06a1")) + (132000, uint256S("0x00002789aed78f0b29396c9d654c1599b35cae19704d1b15e4f266af109c1f8c")) + (133000, uint256S("0x00002a422e40e72b7a35d4818a59297bfdcc5efcaeaa30d54d1d290e85a6f1de")) + (134000, uint256S("0x00003628a789756f15bb46fd8de99f9baab50f19a935716785dcae0275bf4a05")) + (135000, uint256S("0x000075517e8be4c0ed800d66ad00dd67346ea2b34348e594b769fa9bac3fecb5")) + (136000, uint256S("0x00002b4196ca58d9e2b7c75f1e8de291cf22b7bbc4be8dc2cfb29f54c256d3ba")) + (137000, uint256S("0x0000180d66e02d24330e9ef3d49813136eac06802e2989fa379d7a88e4067e01")) + (138000, uint256S("0x0000ad0a51cac855e0b162fbf069b560cd8d21fb5275f9d06304a740129bc809")) + (139000, uint256S("0x0000219d48ec853516f9262b41d84c5fbc5417b604e3b9001769bd5ac3f59b28")) + (140000, uint256S("0x00012475b06db9b0c4befe66ed3de054b993bc787092488df2383c566155921e")) + (141000, uint256S("0x000061896c62d282efc098341741a1a67c4d9c87fec6f1948a2225bc56c44c78")) + (142000, uint256S("0x0000444880b2e2b46b874fbb0acd44675ce257d2bac4eade4b9b9929a7b39b08")) + (143000, uint256S("0x0000509c13924e0733c5d6fc3bc7a270d2dd3b4c82db7fdfcaf02a410103ca78")) + (144000, uint256S("0x0000dd507d1b7059fb9c41c103ff43190425d567a661a59d704563c9dce1a1c9")) + (145000, uint256S("0x000097e5ebd34461ebcb5fdd3beb6e973fa752817f2ebe9fd3d57a56537e1ec0")) + (146000, uint256S("0x0000afb0eab0639d2623a15d8454cc7464c83f677fa7461259a445304fc3d3a8")) + (147000, uint256S("0x000123ce32adbc6c65e490bcc21554b0afda1476b2a6da11a28e264f1964cda6")) + (148000, uint256S("0x00016278bed29b081e4986de9c6422a89d8aa719dd1ab422c1ea7fa10284094b")) + (149000, uint256S("0x0001484305013531de1e5abda094fb453d5c5fb0d35812327ea01517c9149cdc")) + (150000, uint256S("0x0000da3a58875dc171e5bb9747cff5dfa2880d39e244d3f10acccf5232aac81b")) + (151000, uint256S("0x000006f333c55d2b6ab5f334a6d05f96fe74e301d4110ac92807239873f25671")) + (152000, uint256S("0x00008844695c54bee8e1711ec7e80f474c7a3bf1b78aa272553ca233746c912f")) + (153000, uint256S("0x00011c8bc4ffe00ea899ae19daa572e61e4cb951a594229d67e2af19d6388d21")) + (154000, uint256S("0x000111aaabb95e1cb1a225e5e8b2a6727c11da97c7391800618c7ba11c6ad669")) + (155000, uint256S("0x0001011a4d88acf916da949572a7f1c208bd7d31e0598d4337980c48ed88b18f")) + (156000, uint256S("0x0000651ee0d6bdaeec5bf585fa628e4336e7238974ca90461d38506c34d6f00b")) + (157000, uint256S("0x0000d2ecfe64aa069aeba21fb1bd8995cfad455c296670e3dec13fde989aa1c5")) + (158000, uint256S("0x000113b2ab0d24a2bac410a0155ca9d2fa6b2923c0042c228dd86fe37ad04469")) + (159000, uint256S("0x0000b1741e1d0b841bf0c0d5b3a0b9a906cde8e630e10b71ebfdf18ae5197d9f")) + (160000, uint256S("0x0000419b54cbe8a842b92201996bd74382b63db7ab0b1989b932ecb19bdd6f4a")) + (161000, uint256S("0x000076eac68434f40b6921b251fc2ec5de4748044d849887a70116f344f1477c")) + (162000, uint256S("0x0000fb948303f30cde6c2ed932915e0f6aaa932dc3dec324851b256e82f4f2a0")) + (163000, uint256S("0x000025244341c537faf365bb46626f0283a2fc0cd668c93cb9771da7f7c6be56")) + (164000, uint256S("0x000046fc2919f8ae4b88c1faecea97f6301a27a9a16184934d70b0b305891a14")) + (165000, uint256S("0x000116cc086ac32a24092d39089d2bcf5977bbc08ad916a8fac2aaefb48f2220")) + (166000, uint256S("0x0000dc6455e6eaae079ba6592fe0d5688c696955f00d33dbfc0cf76aac48e10a")) + (167000, uint256S("0x00012685e23a0997797098d047631fe7da1849e763dda0c7a00f47c7dfd13366")) + (168000, uint256S("0x0000b28813965516fe96909418dc72a4ce126401cd7a03919b9888d0da3b37d3")) + (169000, uint256S("0x00014522bcc0fa9995c6b1b6e6ba3ddd4298b0dd59854d25e713c43778d93d77")) + (170000, uint256S("0x0000f8e02172873f12b2b1adf8709b5d1990ef64b674fb0e5ed1ea08db9b6a48")) + (171000, uint256S("0x0000b0d9d1cced1c0396bab1f1003c9a009dc47da63c8220fc23bb3948a82ed2")) + (172000, uint256S("0x000099c8db9b14c2d5f7c685ee8569755bc50306397f749c7e0e31e709bfc4f3")) + (173000, uint256S("0x00007c422bc9f8295deeb35ea5225bc4f8021fee412c9a5127b6067582b356fa")) + (174000, uint256S("0x0001127a0d14aec0b5ba96dfb606cb9a562d5dafe79646076b9c0a7f7bbc8ffa")) + (175000, uint256S("0x000091c16ae7ffb036f716ac975bf6a9572fd9d439abef21036d18c3be0f90c7")) + (176000, uint256S("0x0000f4e7f4a42a9bf0dfe831764ccf9a8116f98e8158d072b8034d6b7a1e0400")) + (177000, uint256S("0x00006a9efe8a6d93dc8d16757a425c2cb8b910195f08fa210bb0bb3daec47080")) + (178000, uint256S("0x000065fdff26f07f13a0e9db44f6847161b360a6dea1cb7ef810c93a62043025")) + (179000, uint256S("0x0001a0a5300ed334e0ada6eb53d762ebcb1bf7ad0b6312905257f7698477ed51")) + (180000, uint256S("0x000131b050c745484f85e2c8422bf4624f23c69969d1c7d2f6760ef62a864746")) + (181000, uint256S("0x0000cf46ed02cc030fa3209a7fdca35a99249a17b241d30849ea094cdc827a49")) + (182000, uint256S("0x0000b16cd4ef9db7e929372be056e12d8422575891d032298cc17853d043a6e8")) + (183000, uint256S("0x0000d5d53dbb045bedbd997855eb931d7e671740e2aa37a84e184b43b90cf1a5")) + (184000, uint256S("0x00010f06fdae2de13519604475ff9412eb67731f9d4d0420c00b1f2530a5fd91")) + (185000, uint256S("0x000145be18021effbc081d0ca8fd549317766b57d828bc946436e84325b17c7c")) + (186000, uint256S("0x00006e592793a9bb5795a4f76b5ed47af4ce51b0d2e6730888c2c38dca5864b2")) + (187000, uint256S("0x0000438bdd8a024ccc008726a1690873039153df76ed254d2d773e55def68742")) + (188000, uint256S("0x00010108fe7c2543e5b258ee511ded17e12f3ed1688164ef78526684c1ea193e")) + (189000, uint256S("0x00005cc59b9b2116afa0e6ecc12769ee5f91efa91d245fc64bfda90479f8c9a7")) + (190000, uint256S("0x0000572751fda233f466c6ad237184ff6a7a15f8d84e5471e3dc5288ad74f592")) + (191000, uint256S("0x0000b5bb7236376176640e75308466cec3c3fa7bde6f24b1d12c96e94df2bb58")) + (192000, uint256S("0x0000620eaa310878ce85d6cd90d2b4724b36236575ff26c2ed6e34c93f6a8625")) + (193000, uint256S("0x00003a8b7d4cc3a92bb3b5301f9d7ca91941150e5bbc10f1204ec0175053bae2")) + (194000, uint256S("0x00007144b1bd53defd4cc1e78832a2bec8d66e094a0f03c22276e846cf8b598e")) + (195000, uint256S("0x00010530fcae36dc749c679366101df5d344243238e0e6dff2cbf57f9e25d5ce")) + (196000, uint256S("0x00002d2b003cc4851f4950cdfe7996f55b26c7564e60feb6e19597db49dd998b")) + (197000, uint256S("0x00011545798a62155ff5aa047a1cb59c0860b187a59bce8976b57f9c3bb35184")) + (198000, uint256S("0x000061433820de56f44eb774c2f54181b0e6d1e6b27e4a8eefef90039bbecd07")) + (199000, uint256S("0x0000403ced11ef43d8324070ddc30fc69a0c2d8186e4551c140a9378f0312d34")) + (200000, uint256S("0x00009ca9950079d5cd882b615fc068df25beed137642b751b224d6a939a87c69")) + (201000, uint256S("0x000015eb67778c671b0fd29016482d42758cc2edd8361f30788ab95c8328efa5")) + (202000, uint256S("0x0000c6e1a58b63e282fdedf31c1da7cc6d8b0a6dad82fc425672ac0eaf737c84")) + (203000, uint256S("0x000078e0e23fa6f7ccf5e8bb8d6703e0d70b7a86fc0c7493f61ef57e945a8250")) + (204000, uint256S("0x0000451704df4c8a94edd50b78540e8852bb55eef42bf2da3e19a173b8c246d5")) + (205000, uint256S("0x0000309772c01eeda1979e18f93a8721bfdd08c1796ea3a5861011c3de0f9fc1")) + (206000, uint256S("0x00001ba8aa17a23a2c6af771063cbe0afba5bed5b9a7b6c12d3cf0240277fa39")) + (207000, uint256S("0x0000bc3893889caddd09c6117bbd6dd044ebff10b28e008f19f7c43a496592fc")) + (208000, uint256S("0x0000684467ca15f917315fbab3fc3f2907c5f30153c5b884d0298a0d1e77815a")) + (209000, uint256S("0x0000a4f86f394beec9c9241e6dcb05b49393653bc5eaf35820403e54a23bcab6")) + (210000, uint256S("0x000097146b9280bac0344dc886cc4c77141b7467e2ef68e657525d789a9cdcc1")) + (211000, uint256S("0x0000298926d49fc5da4f866133c5c1d1e48d10a17b384eac616022057a7a46c9")) + (212000, uint256S("0x0000eca72307d64a15d234ee372e18862a46d6fc7fd2d0ef3d35c0e5ac836cfa")) + (213000, uint256S("0x0000d89ced1ffc0a9fbc0763d6d090bb19e2657f93c43144b359c16804778a89")) + (214000, uint256S("0x00010f939491f8393ddf82118d72bf420c3ebe01788d3cc69163865bcd848738")) + (215000, uint256S("0x00006ad713ab44526e84e11d0400e5619c2415773cf5068f4946d52bf9633f10")) + (216000, uint256S("0x00008410e6c8ecde65179424ec6443ec1b2215d2403d8b6f779da51136ec02a1")) + (217000, uint256S("0x000020ee6b9a6228bbb57a3dbfab949740801149096f7d0633066026e6792ee5")) + (218000, uint256S("0x0000d38defba9427c17c1cb43398593528af10ae6fbec1d445ce2533c4a0228d")) + (219000, uint256S("0x00001066c0c557ad46f0228c6b8ca18f17979032c55ae24ddab15394080987da")) + (220000, uint256S("0x00010f0dfb2aa26bcd90f8769709a91e0948c03b56ca24740a94f59d5822a815")) + (221000, uint256S("0x000058f2dc34a3060aa22edeb91d3a389f0732e479dc2c0d33696fe61ef1c9f0")) + (222000, uint256S("0x0000533b7f73d91cbe609c8626083dc44e8ce65ddc723729a16e9469030ba263")) + (223000, uint256S("0x0000f81efaff06d9a57c42026bc5aabe52a0ff81a37220e16c4c84904e7cab64")) + (224000, uint256S("0x000130f784b48728fa8f619617996b7e99dfb430176f9ba894a68630a851cd4f")) + (225000, uint256S("0x00003c810725d91c1c489ec513ae71f29562fbc4292719babfcc78dcb293a9e2")) + (226000, uint256S("0x0000dd323efe5d0e9adc1389e4c9eb1c4070fb38d932683032910aba746b3c2e")) + (227000, uint256S("0x000132092774885d1ce3ec989f1b199bdc178b7d406ad9b0d23d3e4e6720d3ca")) + (228000, uint256S("0x0000cf429d0c05ce9e009e501d724d8929fc40027a2f78f7e67ec7d86e91cd57")) + (229000, uint256S("0x000061b40ec34dab4fa83698ace103b6caf9271cbca2b8c7ead55fd299f23f1d")) + (230000, uint256S("0x0000ca632b73f5b1ca9d60ede2010290712fc2f2d28d08ecb31b0affc5b8284f")) + (231000, uint256S("0x000025ffb1c37889da722af7ecfe87e3897c813e4b948d30e1647d44f1a2439a")) + (232000, uint256S("0x0000147749add04281819da29a8c6d7d7e30fa9e8307738519d33605bb26772d")) + (233000, uint256S("0x0000b9ef9879f18d47d7248a8404b2f2b38490f1ea2272e2ab5d10e57e687698")) + (234000, uint256S("0x000006a82f41ac94661d4e0a3dd8d5ef790b5c7c3f68b3bbf9b2c0749ff3171d")) + (235000, uint256S("0x000088d9f88a14a5fefcba4bb61c05e43518806bbb489ea4ea3c53e48ed8262b")) + (236000, uint256S("0x000036c1032ea9f7091faa0ba289ef025926e4f012e19a65476ad061d61343dc")) + (237000, uint256S("0x000016076e6dfd0f0de47d77f975823d286c9458f0e9ce851b8a585e442d1503")) + (238000, uint256S("0x0000b228ebfb020faedd5db874ff7c20bf50f33e0ed824ce30da871ef8859a30")) + (239000, uint256S("0x000098f1ed04960ba6dada245c1d954dda785a250f1365b1d46934514b513e6e")) + (240000, uint256S("0x00004827b75431d480812d39ca8e0925e44889c18b08778b2171c78aacc800f9")) + (241000, uint256S("0x000047f75806dff17a4fbdf87a2361ebf325eb3043d3e7cee86cacabc81394d4")) + (242000, uint256S("0x000027fb57cd69593cc13f6e4ba8cc32bf5982f301c2a9e04474abac8313ced6")) + (243000, uint256S("0x0000d6fb59a655b9402dddd35f09e25085ba1a472e3c344b392d5b3ee293db81")) + (244000, uint256S("0x0000913dc99d2bc33a75deae45a155e2b8dd7953dcd87be10be4943d1b20a82f")) + (245000, uint256S("0x000041e52aed642e547ec8895d84d25203b296f871b50a1f0250ca00c5cf01ea")) + (246000, uint256S("0x00000dbbaad4e01e63b8e068a25d0210ad2c5f656f6d77da241b980fbf77932b")) + (247000, uint256S("0x00010edbb33cf3df1dc924eac96ced741f3a735394bc9fed3b8c1ad3692b3ec5")) + (248000, uint256S("0x00008e0bfb7b326a4bfc6a2995a14f357a27f5725d930a62d2d3ba80f59b2ee0")) + (249000, uint256S("0x00000cf51bb1334a730b924430908700a6f6a995bd9dd252d77b7f94a014c8a8")) + (250000, uint256S("0x000090c5798405d73f400657dcc5685172c6b2608809a9ec2e82297716e5f5cd")) + (251000, uint256S("0x000082d84ca93a2211bb870b3dc2865092fba3b772acbe934cb0a6ff99338762")) + (252000, uint256S("0x000090f2de1badb88177db6c3682f0f223196f51a3e054fe6b06caa5d5e914e3")) + (253000, uint256S("0x0000e0f97c745975bbe5050af8fe92637a7d0cd458cd1706221d34af719f995c")) + (254000, uint256S("0x0000b8eb6c3ec95367882780cba0369222a9acbdbd626bbdc2efa5e9806309ee")) + (255000, uint256S("0x00003f05f5e1dbdc2038158fe47ec02994e8cc643a710a513f8f489dd58f61e8")) + (256000, uint256S("0x0000d31f04b719ad5681f7e1b517daccd9694fbc9409ccd286f558455982d261")) + (257000, uint256S("0x0000ed07ac5882e040bb9de0f4ad4d4527ca5c73c4f1a88eb53dc0651ecbd1b4")) + (258000, uint256S("0x000097e6df4db5049fcff2e691c02570d82c7dbd168189c06f31dd94949ba8b1")) + (259000, uint256S("0x0000e2e8b741d28d9a097229d6e5a2ba1732a82fa2ddcfb41f20eebd94c76c32")) + (260000, uint256S("0x0000263c2baec9d5575580a30787d4893c1517b64ff7294e41f2efb16d21ef85")) + (261000, uint256S("0x00008b142681d8cfc53df1ea806f828f9bdf64789eddd8ee3d031bb8ef8acba8")) + (262000, uint256S("0x0000d2482da09b9d9f76fea70205c1de1029074f2b352ce4b44e86188139daef")) + (263000, uint256S("0x00007ab5c28f261713ec133b8543393d556c1a259ca05968bd3075792aab3ca8")) + (264000, uint256S("0x0000a75e0af3d8f54950cdbe04a0d083eab58c4aa5c83151883f1e4ed3b81364")) + (265000, uint256S("0x0000189eb94df3a9cbc293fb896cdd2c0a11a96c6312ebc48dabcc87c1ce77d5")) + (266000, uint256S("0x00006843e067df56f2eda15d3d2f2b0a3ce1f9ccca76267b43b355939538d94f")) + (267000, uint256S("0x000061e5f1d6bec772831bfcdf02331a6cb8824a2cca249ffa49737d19782447")) + (268000, uint256S("0x00007f909a3f437fbef9702678e510ab70af79371ea7810af0ae12fc5e9e014b")) + (269000, uint256S("0x00007de818cb26675fd9edef889f228985951c8654354ff50671f672bc868815")) + (270000, uint256S("0x000027590b1638a77fbcf91aa46bb6fe044bf24a63a79ad6cc74b46d2318368c")) + (271000, uint256S("0x000066e889f46e219dcf0b4406ad481e8fc400bc65bc4de757f8a2cc946ce9cd")) + (272000, uint256S("0x0000380a032fc737f0d643ad61ba707f4c6fe939a2b430b10fa581f5a0679100")) + (273000, uint256S("0x0000126824caa6aae226452aab57a114ffb6afbf8cf261963a3961318a28b419")) + (274000, uint256S("0x00005c4c0b084a1d192dfe12783aa91c778f1e709457e73cf76f5889cc26bb78")) + (275000, uint256S("0x00007dc532c6b377c64462a8b8c16b3eff0096fbd9c6b4006c752ce7d653989e")) + (276000, uint256S("0x000010f0388da6d99966cf52ea61c27d687ebe07e8235725df251ad15ead0dee")) + (277000, uint256S("0x00003e8d6d6063171e835af9113f880af2a5907712d3c0e96350d3851961856c")) + (278000, uint256S("0x000037ba4dbfc93957ec601b00835a98c16ad2ed58c26c61ce4b9c2a3d333ec2")) + (279000, uint256S("0x00006717a9b460b220defcd60216be89ee2c433a2d888bfcab850ad5f209d94c")) + (280000, uint256S("0x000041384c4c769143b1501c7c6f892a4ae5e295ca471499e08c8299f5162099")) + (281000, uint256S("0x00000b03c4c5ebafada3fa92aee6703ddaefaab554f48bb204e358ac0aa97add")) + (282000, uint256S("0x00006be32af84c330c5d7d2d97684f1e3fac9e1f298784cb15b35df6bc606f8a")) + (283000, uint256S("0x00000dc131bd64e0911950eccc6ce708ac27bd7388da64e19d4cf23ef888b5c7")) + (284000, uint256S("0x000075deef6c427d641f480805c5ddcf260481983924be5f6a22af7a934ddaf0")) + (285000, uint256S("0x00007a019cb2e868b90a7c30debd7de1bfb5440e06c5bd8187f921358c7ae781")) + (286000, uint256S("0x00001095ccb8ef1028bf4ef8df40467441167280b6a7a15384ba60708ca4ed29")) + (287000, uint256S("0x000085d7c734a13bebb8057beff8deec794a930bd6300af1becd7de50d425fa4")) + (288000, uint256S("0x00001d8395c53c0fc68e536df49fe942caa67f6d8a3f91cdcc018d15b3fe0593")) + (289000, uint256S("0x000050cee8c1581b2d8214d43f9a8c888bdb390b91352fd5347b48df92828b8b")) + (290000, uint256S("0x00004240e011ef34f0b6015698b4baa2728b2885a69284afab0424fc6b09877d")) + (291000, uint256S("0x00007c90a0da5bd891f8de0a7a09d1b8af3831143926d02e90d29d9d1934b5e6")) + (292000, uint256S("0x000015965fa7e60705a11e595a18875ed065d8b11d8030880e59a5d474e458f0")) + (293000, uint256S("0x00008981da5387cdfb537ec9d4eb8e8bc81bf5f18938eaf04889acf011c96749")) + (294000, uint256S("0x00003810c0f915b3fc12207edc99f7b9226f5572f491e7349e79b228c8e7469a")) + (295000, uint256S("0x000087f128604abe37b8fefd2f098b0e0984e6e7a65e2151889a302a68c06eca")) + (296000, uint256S("0x000062a42664d4c4e88bbdbd991e7fee35f779c126dd27386e5225d2237dc2d7")) + (297000, uint256S("0x00001c42f5f24b38f202527e3c2cfec3f5621ad87e75253b5d431452d786d4c4")) + (298000, uint256S("0x0000198517575016a98ee8b54deb7232c2312f017d60959280060ea3cf92e4f2")) + (299000, uint256S("0x00003a9031fb5b7e9a318c08588f63e52a6c91845b444e515bfde4c9b88bffe0")) + (300000, uint256S("0x00000c72234e026b3ac4be4a972889fe48810cb27d551058b77d4c5e9b32575c")) + (301000, uint256S("0x000099dff2afc7600c8b724dfc3202d0d29d38ebef21ffc02f4e2f2a66ccea99")) + (302000, uint256S("0x000085a79dd00da9a21cff9b4266a8fe5c2e90b5ea53ec1c7792295192a2e37e")) + (303000, uint256S("0x00005798b40b3eb295eeb9be6af8ca5007784beda82d04a4a8b9c3a2ac0b1096")) + (304000, uint256S("0x00004eedbf20eec4f279484eb5c13c266d463475ad2fdbb7447bf0a8acb7ac6c")) + (305000, uint256S("0x000029cab3bf30d2b12ef99eb43ed67bf6f81399938cde4f061dcf1d3a3b8282")) + (306000, uint256S("0x000030648c81f681bc962e698a27f587da62182e555579910c456f723109b42f")) + (307000, uint256S("0x0000085e26e0618a933a35267273dbeec35ef76f83d7543443cd55a2ca0e233c")) + (308000, uint256S("0x0000239ea91faaf5425f65fc585e7fac6dc518869a1a7091450f90ee8bdb2fd1")) + (309000, uint256S("0x00001b62fdf4af7be68cd70b1f982d29260dd1e667ef349314a4bddd73d55496")) + (310000, uint256S("0x0000765eb51eaa30265211672e8311dd40e265ad4142f4a03efd2f4089d9e186")) + (311000, uint256S("0x0000140c77cdf8f9d4b289aebc0310305693f970ec409f2b828c3ed513f3e58e")) + (312000, uint256S("0x00003f6e2f0e82c242e5b0a7e126ad210e53fb0dfbe794ff2d7e1cdd3873e818")) + (313000, uint256S("0x00002e678cd8a3a18a1cdc5c957b6c0c880acc21b801c68cc4d7b37110a83f22")) + (314000, uint256S("0x0000198bbbeec4927abfc60f2becfb96a5b0846962d65b32de3f9243bdf39af8")) + (315000, uint256S("0x00006c90b93d54587dfd63105e063f6ddf43cff500aa9968622df5c93a5b0798")) + (316000, uint256S("0x00004c21c397bf276a5cd62d960e308fcb098ec45bd60a4f1bf023b6edf2e6ad")) + (317000, uint256S("0x000036b7f6b9e2dea52a6067a94f2e2704bc1824c8e11bd300a841c46e7dd2c2")) + (318000, uint256S("0x000025029ef96a105a50a7030fb0d61edeceea25e4effb02b3ce8eb4c6205782")) + (319000, uint256S("0x00003537409e025a8075526fa097882f919ee169606a9368d8c3db2d33119e14")) + (320000, uint256S("0x000023b752e4c077f231d05026220244ca10a603324035b885e1b0dd6443c148")) + (321000, uint256S("0x000003411062d7ec945c786237575766c5ce2e48c4f94ca04f28b1404ba86097")) + (322000, uint256S("0x000022447ebbb48e06508a70746f87b2e55f026b8ae3052a168f29848d3e2aa7")) + (323000, uint256S("0x000057eac2e6c611398b43e8a72b83f5863b104fa66120e707df6e3e6fa1ba8e")) + (324000, uint256S("0x00006fa40d2be13a2ba910156769754eab5d55059729597a02194e5e0f84b336")) + (325000, uint256S("0x000007fcd4dab7c2cfcfea47ce88932d3ced21fa9264c1c8ed9cbf3fee08635e")) + (326000, uint256S("0x000017fdd022300e952d9274c63cffd8c791dcaa4d82e5d1c9615464df19ae13")) + (327000, uint256S("0x00006739a0fc2ad8788ef615aa26d6a9c7c6d6adf9a9e84f7ae68379eca2a0b3")) + (328000, uint256S("0x0000777de98944635470c99ec1652aa2c15ce3ff4b19de17eed5373d2474a6ab")) + (329000, uint256S("0x000042206ddb76bd7efdb14b694543b685771c6c341089f5bd1dbfa04d6eace2")) + (330000, uint256S("0x000069d6c21607c368128d4586255f315c55380759a766f961acc35a2e9cb166")) + (331000, uint256S("0x00005b19671f21015db7011c9702a420bab766d8bb7cf25b8525429eeff36b45")) + (332000, uint256S("0x00002d62d1f4d13ec708f65c04937b86cf86a36f68caec269f598e8835ca362f")) + (333000, uint256S("0x000013ef2283eae4c9631b4bbbe80b4fb06b663e25a569336326d7897d80a9f8")) + (334000, uint256S("0x000018b4c8d94267953a1df06439a1393c903255a58c9152593eb2d369d87399")) + (335000, uint256S("0x000022628e5db36faec4fe5f107deab56c47c61bb29a51177ecd6f86939d83c1")) + (336000, uint256S("0x00000f22f49242eb151276aa5fc84debb67bc632197c448dd23a501923f6cdc9")) + (337000, uint256S("0x00004aea6cad4849f27af16c298a990e242b77e249eff52fc9c955c121d5ea62")) + (338000, uint256S("0x000064b79a8fd98e2c57184d6ac67daad8278419aee044bec13c7d8de0baebba")) + (339000, uint256S("0x00007ed65e7fe77d691f91d1ed0fbc40413f277770c8a5aa389505b2a179f428")) + (340000, uint256S("0x00002d001410cef77057d66b49c1949ca1367e11297a595b13f17ff1676e55e9")) + (341000, uint256S("0x0000544668ada85a8429537011fa53be0a2c2801c6c022289b8b056ee54e96ef")) + (342000, uint256S("0x0000311ec160ae645fdbffa2eccbdd4212d6c7a5de7e78786d37e9341d531f75")) + (343000, uint256S("0x000010a8f4eefa8040add659396d269e245441439e33154a3b7324ba8884a6fa")) + (344000, uint256S("0x0000500a9df05634fe8987d437cd3ccb502fc36c00fdc73195bbce7d63d1a7a9")) + (345000, uint256S("0x000002a979e67ec52d92b87c4637f166c694378a9a57e3f8103c7d8a084f551a")) + (346000, uint256S("0x000026662841a071a8c0cc28bd560b42af3b739db3d494dc9bf2754bba021da5")) + (347000, uint256S("0x000031d4a32cf5e1c4f1b7d7e3556a2ce8de88ad3f5307f5b20cd7e40a2d1401")) + (348000, uint256S("0x00000f91efbd01c0cd21b1ab0e0daf2d014a7e6bab3fda7ef480ab35c80a2421")) + (349000, uint256S("0x0000460718b2aee973f80306a37506f9cbf40123fd1205c26c33b0d9749d524b")) + (350000, uint256S("0x00005953abe841392b72e8fab12e3cbceb18c128f73e1aa4406defd18543fe4c")) + (351000, uint256S("0x000018647cfc45a1524168193e67e6af22e8677ba3428dde5f6a2f76c199532d")) + (352000, uint256S("0x00004d0d3fc72f9d7f9a6712c098eb6cef0a7756886011f036736de200fbe5c9")) + (353000, uint256S("0x00007948b8f6bb2433088cffb4bb18ca1d03aad3068a7ea923475f1aa108fd20")) + (354000, uint256S("0x00000a0072325a23f9afcaff49a8c3bcb04f1fcb01612de33bcb9f0f20ebb356")) + (355000, uint256S("0x00003e0133ccefae6723c9f14bfd290a7aaf60c2bc962c293fb58b5957ed1a2e")) + (356000, uint256S("0x000005b41a41a8ec5c60cad85a03d9fa5025b5d9a088a6bbc2ebd1d8e858189e")) + (357000, uint256S("0x000021655f02625c28257183e5c4639841b11661cf40f00fc5ac4bcfcf1eb072")) + (358000, uint256S("0x00007c3fe61dca2d5c52bd5e9090c91812bab9c6a7407e32ed0a930b421f5b80")) + (359000, uint256S("0x000063f8390cad7ad17cbd18983b923e18a1469d5730dec7a62e12914c66df9c")) + (360000, uint256S("0x00000f11a3a78c71d8a7c722cfb52f51006b3656b707cf94c0b08a80c4fd4dc9")) + (361000, uint256S("0x000008e76b1c141b783936c946af3f121d5b96fb8766d83c58ea7f7602c78386")) + (362000, uint256S("0x00000c92d4b3163c33c0efa3feaf6f4c170f9d6288d2435a09435eac87d04e09")) + (363000, uint256S("0x0000567379ab1430696266da7ee6dd1e7ba0eb91bba09c85f558c181e01625e5")) + (364000, uint256S("0x00000712954e172eef571e8297ea1843aba0a762b31b5b2b40ca2027e7c0b1ec")) + (365000, uint256S("0x0000627358770bbc0bf614acb3d02d996f220562f083d08c75e71aa2e83a7870")) + (366000, uint256S("0x0000404c17107474c2a0704c9920ee16e502c8119581f4707e0959af3004746a")) + (367000, uint256S("0x00006c5d54ad2b5279842e8ee726359064c72a034c5c3d5f261413c2cc6a4e6f")) + (368000, uint256S("0x00000df9f5d119afd39c0654010f1ff492f8e04dc1dbe1cc0d3ad5767601c91b")) + (369000, uint256S("0x00004e47d205ac774a1f6d7d8bcc29d6eba6f11005b75aee6dedca1e46a1c1db")) + (370000, uint256S("0x0000810057e4efa124db97d9433372af35b93ae61ea4b620f7ac3ac26658a5aa")) + (371000, uint256S("0x00007e49d0ae73df2647b33550aad63d79c05e40b08fc1c25cb9450ad2b5e8f3")) + (372000, uint256S("0x0000076bfad90f3f5befd763f0abdfd05077821099e0c33bc3947ed853d0b928")) + (373000, uint256S("0x00000d03d70c31a5ae2d32b66a3528981c88d361cc165512a3d9278ebace0589")) + (374000, uint256S("0x00003e477b6dd1ffc2218862bc18b5a651c82122cdcec0c455613d1891e9a727")) + (375000, uint256S("0x000012ad562f8b65a93cb2eb5f708d55e4c3ac689d2020843c55b34099755233")) + (376000, uint256S("0x0000556b17a0197dbaba33c7f58fee2cc9219b6918d925a4146fa7fd5de0e94b")) + (377000, uint256S("0x00005f1ac71e07fcc4f44fdfef693983a872be58f5b1bc04d13873408a54f2e2")) + (378000, uint256S("0x000014e65f4e30b3097d2ebb33c11ada6abaf81e8ac3ffc2e0b6d4756b59822a")) + (379000, uint256S("0x000021418aa5de171ac72097abad42b7f1af1a2f7e19b4c98c7174d5164fa5bc")) + (380000, uint256S("0x000046b214d061a9c237e42bf42493f9792cf80b95f89ef10f432cacee23eba6")) + (381000, uint256S("0x000068f06f5bf5b288e78d694775cb76cf1ed473f95da29790e4b60133d6bb87")) + (382000, uint256S("0x000008c5632f8e3f8e61aebd686b624c7ad644227639d320c3ad286f71d4e14d")) + (383000, uint256S("0x00003b7fffa7e988b90e05d94d24153b0a22e01d9ee0c56e04e9263c88c558ee")) + (384000, uint256S("0x0000083022ca686c81f5f403743dba37334a0e96f96d3c8bed7353a1bd11e58b")) + (385000, uint256S("0x0000485dc4369a16c2c8bde7577ce99ffd0a15a1d21cdf61c01f0bee17b36b2a")) + (386000, uint256S("0x00006da0099b6f9edb40dab855231677bf4f97b0e7643fccad05cd97a8b76397")) + (387000, uint256S("0x000063ff38ec555dc089900fe0ff5648488421918db713941d6c24cfebad37fe")) + (388000, uint256S("0x000069ca27290d71648678a0c5ebd379a17ffc895fea7b23837093a337563060")) + (389000, uint256S("0x00004a1e13ef7557c9dfe0c7daf3e7483e7d1420afff64a5325af7d5bfe49994")) + (390000, uint256S("0x00001dce3a9cdd42f97d3268d29bdad179375f61f7d4e729919450996917c583")) + (391000, uint256S("0x0000071173926b7f9492e35cf48185c2cb57ffcaff2149dcef5c40148a55255d")) + (392000, uint256S("0x00007c3336097b98f2fbc46dcd4f981e73ddb93c8096015282eba490b773cda4")) + (393000, uint256S("0x00000738869c9b8cf66aaa075ebefc5209c90a0f225b405e1850b0b00343bc2e")) + (394000, uint256S("0x0000537c3d2b6794fc5c2636a3311e1cdb34c019ae2dc09778d0c500e1593f2f")) + (395000, uint256S("0x00000dad4673f1db54a434d106a69af55f494ac29a428ff37f4e4aa3b734a37d")) + (396000, uint256S("0x0000514b509a25edc24df6d94e24e2aac5727c18d361fdd7e64356f2233016b2")) + (397000, uint256S("0x00000eaaf35e4358bee2a8c5981683b15214d7ecc03701438f94f5306d10c6c3")) + (398000, uint256S("0x00007cb707f7132454c53ba8410dbb588c3b23e7d731f824d58da21f4ac62330")) + (399000, uint256S("0x00000cc6edba6cf9dd44204502309c781a1f769e019e42306c785dfd2d3614eb")) + (400000, uint256S("0x000023fc6e679339fa72280568217dee1ea0c26790c13f80d0092f9b12ed5f38")) + (401000, uint256S("0x00004ee2b9c7df597e26a4ee85b56c0842380adf5d15b9f6667a132f7cb0b07c")) + (402000, uint256S("0x000073b711054a260c45b4ad63796949d2a00a0baca00e1a68ed16fc98f45d70")) + (403000, uint256S("0x000070b43d9d52a1f896a13bfdfb445fcc3b1374b7ef123b0cce1488f551a954")) + (404000, uint256S("0x00007864734f9e3f3596d9d92df853d3a9b1172ff747fe5983e09028114404c3")) + (405000, uint256S("0x000075ff54f6af74e69cb36dfd7634dace0c68e00d309da017f81ea5dcc9480d")) + (406000, uint256S("0x00008b908deffb33856ccd1ef6afa73cf8bd01e8c3b5be502829dd64157e3f7e")) + (407000, uint256S("0x000023d28f6b13c134285247c6d8191f16a94463ccd84a506c99ba52706b67e6")) + (408000, uint256S("0x0000723a9c35577d2e56749861ad4e9d3c61b1c650e0c7c832cb1d60346fb46c")) + (409000, uint256S("0x000021a04d41834edb1ebf0c3c09488fb1e3da4c30acfda07ef154de955dbfc0")) + (410000, uint256S("0x00007b63162192a0b9c1015a227df9fe264591b5842aab61a637c06768a5e3d7")) + (411000, uint256S("0x0000064165fbcae2b8c44549630ec47c9504c77ddd0aaea91e846539ce023c6d")) + (412000, uint256S("0x000048d4879eb955e516485f822f2f52fa078f02396fcdbd1e0fc0698a90d577")) + (413000, uint256S("0x00006df51ae354366835450d019ea8a7a59a34060dec74de630bdf8004bbbd18")) + (414000, uint256S("0x0000113f9fa68a6a1acc32aeab61e8ca15e1f53e9f43b9e77bca85fecc7871d8")) + (415000, uint256S("0x000003ec7bf286218a52ceea9a5b8ec460a5a77211679c2b8d1d1e4ff96c03fe")) + (416000, uint256S("0x00000c4a34784e10158b231baa9c35b6aca1cb1d967f65bdeed7480f55df869d")) + (417000, uint256S("0x00004462829936ef1967f6604d00c0e034588642dacc1ec827ec3b4468202ab0")) + (418000, uint256S("0x00005debf20584e6e0adb8c05a73bf4b30484451964d39536f50bb02b426b0b1")) + (419000, uint256S("0x00006357b1afbb6aebcfc778c06ed1fc51fbb51a7fc9b882c4c9bb4a35e0b4ed")) + (420000, uint256S("0x000040207b5dc0f5e2509b1216b549672c58d68bac8224f67492aa803b2f2570")) + (421000, uint256S("0x000042124fbfa2ba3db57f39bfd4f5986969c5c4faf8b1c06cf470a5ea001788")) + (422000, uint256S("0x00003c97f3bdafac16b245ea1f3b941c52388be5bec9c087186ac17088d5cbf5")) + (423000, uint256S("0x00005068310436b42ace3d987e8a10eb858b4a23321dfeeefaef22e9446fa2b0")) + (424000, uint256S("0x00005ef6829528a3504565070d82e425614426ab25b45bca04aa4af3d7e0e29c")) + (425000, uint256S("0x000024123c6a896dfb002e50b4574037d07bb94e0a0e9544e67f8a2e090b6b89")) + (426000, uint256S("0x00004f641099594d32e1880080931343420e8597be3939a4f6628969d4c94a4d")) + (427000, uint256S("0x000078d2859474d6b72acaa6060ced2386028e457743bad4cd9b0ced3f8ab154")) + (428000, uint256S("0x000087e3b407861303f6b32015910f4a3dd0f1f78a4e53f178ca442e9275c317")) + (429000, uint256S("0x000060b5c76252c68f358202b6f6c421d5ca9c705dd28240882258df8a809174")) + (430000, uint256S("0x0000305e76e05f96396d96187e6d35e900a4d735aeee6f105168eb45846d7055")) + (431000, uint256S("0x00002181db7f434ad47bfc295f8ebf8caa382f13829ff70b06263648e0e033ad")) + (432000, uint256S("0x00003e3f8d3848689893840e239619e875db02745d68709a533e30fef16fe9b1")) + (433000, uint256S("0x00007ec0e6150fdeee913a18f5c8f3d7099bc744a218dc6a01c63580aa9c8eb1")) + (434000, uint256S("0x0000415b347418526dbbce15098f2d8d1b5a1dd0446151efcfdd3318d5861351")) + (435000, uint256S("0x0000663b475c89a1ead8cc41c1ed10c8fcdbf417d007a6f0b95580a1165eaa1a")) + (436000, uint256S("0x00001783f2a7362a81e0b49cfdeb7dbb032e6e9ab4f66b3cefb4e52f1c5dfb34")) + (437000, uint256S("0x00008486eaa2a91c1ef5c530065431dbbb0c4240dea7a2101ab0582484003280")) + (438000, uint256S("0x00004fd678f5f493ea4e9ec5b54dd66749350fcd325c5ec677c154bcbca88799")) + (439000, uint256S("0x00009244e5e34e05cfcf1bbf619c8a8b43ceb538fabfa7843be9796a295e49e8")) + (440000, uint256S("0x000036b5b2b13908454ede21c5826af6331b728a66da7fc67bfedca910ff9b80")) + (441000, uint256S("0x000034367b426ed559bb7d0b1046eec735a850c53fce26f8b0716198ff90051e")) + (442000, uint256S("0x000059583a267d919d5bc4c65abf8c304150e45a336b9f34bb35ddaf0bcb1787")) + (443000, uint256S("0x00004f414772200bfaf67651fbc4cc103367a5108a35fe026850a4bfd92d38ff")) + (444000, uint256S("0x00001b9bc79d27709c34a96a5dbd6a259fa1495afdf8fd05c23a2d659602620c")) + (445000, uint256S("0x000061e49c4d2d995a43a2d2b491a023444b70aba5150ee4d2789cfca6018710")) + (446000, uint256S("0x000051f2bc3eb24aa77017476494528e0096a0a1cb1e29b4318ce9b3410c6751")) + (447000, uint256S("0x00002979121255c18f58c5ec1a4267104585577b91e2e61682b44d65930400f5")) + (448000, uint256S("0x00001122c7a9f21b96941e6e074122ce55cb412d659ffbfad8a0bebcbd487533")) + (449000, uint256S("0x00005ed4ab8507e94702e24ce16b257e8eac754be1eb3e743b430bdbe3e2eb14")) + (450000, uint256S("0x00001579df12ce8d38b8f4416f221964af6aa54bd065201c578bee6e03596463")) + (451000, uint256S("0x000057eae48d40b8b59a16f65fa4b5902b27dbe0bb5470cd27214f4045172d87")) + (452000, uint256S("0x00006e7bbad31584a17b7bae4b7555a4807ce276cd5046a309d79f0a402cdbd9")) + (453000, uint256S("0x0000011e661360329ac1ba58e11f2358731abd884d1c590525d074195bfc8ddd")) + (454000, uint256S("0x000065acdfbb8d1e0d66b358f81acd99711adedb85f37fd522b8b515184a073c")) + (455000, uint256S("0x000026888730aacaf408c7b6cdd5a4ebce04f4c2aea22061f5ee832a65c52b24")) + (456000, uint256S("0x0000602cca1d31d8a750c84cda243b6d454d4d93bcc2241cf0ae6982a4716755")) + (457000, uint256S("0x00002d7fd2ac55de783d6f69270fd9e499789185e98eca4561bcfb13be663cee")) + (458000, uint256S("0x000015971c8c8c0d2b2ba9b9c0dd5c97091b77e3bd747cd8f5a1396d7cbc39d0")) + (459000, uint256S("0x00008473ea08a574ab72f3246462ca97fed87478c6e5fb39bb9b340f6c8b0f44")) + (460000, uint256S("0x00006487396edc5cb9bf6f5cd62491d1d5a47e89257ac0286cbcc8f428239fb7")) + (461000, uint256S("0x00004579751a959bf33a7418c872ee533c11dd0db764bdbf800317fcca50db74")) + (462000, uint256S("0x00005e57d635a75aae751e87aa9081218babed5522861be57ca55ea5d91e5cc3")) + (463000, uint256S("0x00000fb2816e0c45b5414b72aa67a918c1ffc6a5e114d4f4aa2c1863f9d7ea7a")) + (464000, uint256S("0x00003c2985800d71f2875169d86d911bbf3ede85eaec083869bcb817d5930407")) + (465000, uint256S("0x000037d41b8dcc82d16da8907512e4c0dd4d98e5f8e1985f6c418d62fe38bf20")) + (466000, uint256S("0x000034e51cc154129c394b6130d3711bf930c47a0943c0e08598353565781e8e")) + (467000, uint256S("0x00004c2bd9c0a4414e9c689b21a8266dcd0ea9f0363559940c77f53dac76a746")) + (468000, uint256S("0x0000097d658883238e26170d0244759a6a0fb53204e392bd5607bff329e52580")) + (469000, uint256S("0x000068c832e7335fa8b095693ede2161463e250a6857171efb34e8b2c858f0cc")) + (470000, uint256S("0x000016f55342090f2f7dd1013c1780daea3e18331b9e481e44cc969e42267c9a")) + (471000, uint256S("0x00002544263ac1d071b15575a1be34f3e220e97b631bbd0a37ca2211da3be579")) + (472000, uint256S("0x000082479a6d345f52f2f6a3a7f8b3e1bde3e31bdf6971ae7e17a4e9ceb9f3d8")) + (473000, uint256S("0x00006af93834d09ba9e22c0e9bcf041df511fa73adc7c3b90b20930c14dc3afc")) + (474000, uint256S("0x000009f5395a0e10bd3467d49468f22a17b96cc56f133742b4b94f81d055a1ed")) + (475000, uint256S("0x00000732dfcbe6c20963da08712f407c0137c686c2c5b8199be7ab93533ca75e")) + (476000, uint256S("0x0000212ee23e893f853ef49641d748435b3a783c12eccfaa9d113ed1039a59aa")) + (477000, uint256S("0x00002eb7f121312d1702a95d23e6058d305bc2fcec6b665918d1f61ccdce3d8a")) + (478000, uint256S("0x00007c3f92685d1ab3a31d4462286825e1edf247b74f0f2acf203cfda160b4b6")) + (479000, uint256S("0x0000387969e04687fa879ecc4b7ef42e94d7702b2adc5c895b91036f2b2b32a5")) + (480000, uint256S("0x00004fcf6a8c13044beef7a176c1b872bbec53cc00aee74a4cbc9f7cb332ad29")) + (481000, uint256S("0x000071ff0caf576084563d6bc15fe7887b261a22cd7f2540a047486dc97cd961")) + (482000, uint256S("0x00000d18b5deb42f4a383a510d5ce92e4ffe84cf12556adb09cfc381eae9343a")) + (483000, uint256S("0x00003045108fd460198ab5db9154df288f796e4714d78bfc030bf32a0d72ece4")) + (484000, uint256S("0x000077ab6ef56dc32d8d78340e0f69e9666914ce0299c16d80c9ed44b95cc74c")) + (485000, uint256S("0x00005641dd3b8af4af4328e7240b2f614d4f9bc02d941f1cb753fd9b9e648ac3")) + (486000, uint256S("0x000045d840594db850fdf19c03b29b2587b225f7c17009b6bc92c3a95d913714")) + (487000, uint256S("0x0000428e6bef96b2cfa2a512d10ff22f459e1c81dfd833935bd2bec9a9401c70")) + (488000, uint256S("0x00004b7a10c67d0bd09058183babec02861c0722b09b75038d3779a586bcee48")) + (489000, uint256S("0x000023557e9510f58a398eeaf0c36753b93ade77ce885f8736011f5eba399340")) + (490000, uint256S("0x000021e70faa40c6b1cd9ed3f91b8ad43e2570a00e34c54c5ed74218ac33bf72")) + (491000, uint256S("0x00002edd58e2126702485fddda9eb55d1d39880c44de8d8c0efdcdecdae2722c")) + (492000, uint256S("0x00004f00c0831ebd6675da2aa83a3352e79affee2786a26dab96cda9336b7ccc")) + (493000, uint256S("0x000064438694b83dc959b20b82cd5da3f4622186404753b97340450be0a15755")) + (494000, uint256S("0x00003607262aef0da4f84721222cfb5cbb915db323ec95e1b4e70bf3ce860c6b")) + (495000, uint256S("0x000024c603dbf750c01c2975ab60624bfe5ed2e44532649917d9645ae6209ebf")) + (496000, uint256S("0x0000191661868f098c37178cebe1c4eea37f311eaeb82e5148f1452b26d1fbca")) + (497000, uint256S("0x000029b3502c67a39247b646f286d925af7d0501f994c4367d8769dadaa9ab1b")) + (498000, uint256S("0x00003e7be1463cf709a8a1fc6b431c442de0f5e972b8b2444fcb2d275287d36c")) + (499000, uint256S("0x00000d00e2075b9de577c9f2b21927ea21f4bc6719734888073e039a43e3f30c")) + (500000, uint256S("0x000038889c413584ecab16aaf0ae8f050fec136484416084187a2fa27ed1efc4")) + (501000, uint256S("0x00003e0981fdee677dbfdffbf5910ab8ccab4d91e2e3f10594668cad35e0fe1b")) + (502000, uint256S("0x00000e08e2495364b7cdd48cd2999e568e92f4ca9b27343af4240f9adc194f9d")) + (503000, uint256S("0x000014996d031f6c0b0d3e0268d22c75ee9bed7e9f845f81b8df5dd38b195995")) + (504000, uint256S("0x0000041a7d55d6e9344faff6af6a60608a4572f3c12adb79a326606e5b168cd2")) + (505000, uint256S("0x00002df16f23a38f3bf6e3e42f5f14ff44bb357a975c8eb43d4985f16e4a7628")) + (506000, uint256S("0x000042c9adeb835a1105e772a9fc637d156cc8eff5d71a78243dbf3fe0ab096f")) + (507000, uint256S("0x000001c27a7bf812eb8ba21e6ce59591b2eaaf50121e5c98fd740629d00a4e2b")) + (508000, uint256S("0x00000716bb09e7513f50d5ea46d15324d892c305a11267306c009c720f51d3bb")) + (509000, uint256S("0x00007358b4d32fac5362839bf3bebdd938905766ef3e853d00ebf8557a724239")) + (510000, uint256S("0x000045c957443966535795a08bc5feffee0f0c59b55d7ba727593dbc459a1c34")) + (511000, uint256S("0x00001d9b8898a1a26bec928ded3b3650b6e0b6cf6589f95072fbff5586057716")) + (512000, uint256S("0x00006c49e4544ce19a6b3e4a4e82e05fbc3ef1ce9d3dee203cf09f047ec92d30")) + ,(int64_t) 1686842247, // time of last checkpointed block + (int64_t) 523914, // total txs + (double) 1454 // txs in the last day before block 512445 + }; } else { + // all other HSC's with no checkpoints checkpointData = //(Checkpoints::CCheckpointData) { boost::assign::map_list_of diff --git a/src/chainparams.h b/src/chainparams.h index 350aeb4de..f2b2e589a 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-2023 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html @@ -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; @@ -85,7 +80,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; } @@ -109,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; @@ -134,8 +128,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; @@ -149,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/chainparamsbase.cpp b/src/chainparamsbase.cpp index 1f0eb7740..f892589ed 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-2023 The Hush developers // Distributed under 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.h b/src/chainparamsbase.h index 1fbdec8bd..18f10e36c 100644 --- a/src/chainparamsbase.h +++ b/src/chainparamsbase.h @@ -1,4 +1,5 @@ // Copyright (c) 2014 The Bitcoin Core developers +// Copyright (c) 2016-2023 The Hush developers // Distributed under 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..1fd92af93 100644 --- a/src/chainparamsseeds.h +++ b/src/chainparamsseeds.h @@ -1,36 +1,32 @@ -/****************************************************************************** - * 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. * - * * - ******************************************************************************/ - +// Copyright (c) 2016-2023 The 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 AUTOGENERATED, DO NOT MODIFY DIRECTLY +// Instead, update contrib/seeds/nodes_main.txt then run +// ./contrib/seeds/generate-seeds.py contrib/seeds > src/chainparamsseeds.h +// OR run: make 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,0x57,0xfb,0x4c,0xa6,0x00,0x00, // 87.251.76.166 + 0x01,0x04,0x2d,0x52,0x44,0xe9,0x00,0x00, // 45.82.68.233 + 0x01,0x04,0x57,0xfb,0x4c,0x21,0x00,0x00, // 87.251.76.33 + 0x01,0x04,0x89,0x4a,0x04,0xc6,0x00,0x00, // 137.74.4.198 + 0x01,0x04,0x95,0x1c,0x66,0xdb,0x00,0x00, // 149.28.102.219 + 0x01,0x04,0x6b,0xae,0x46,0xfb,0x00,0x00, // 107.174.70.251 + 0x04,0x20,0xef,0xad,0x0c,0x95,0x3e,0x61,0xee,0x69,0x57,0x67,0xdb,0x4f,0xb7,0x8d,0xc2,0x35,0x1c,0x6b,0x96,0xf4,0x1f,0x7a,0xb4,0x06,0x09,0x3a,0x64,0x33,0xf4,0x0b,0x2c,0x94,0x00,0x00, // 56wqzfj6mhxgsv3h3nh3pdocguogxfxud55libqjhjsdh5alfsko2iqd.onion + 0x04,0x20,0x3d,0x24,0x7a,0xec,0xfe,0x60,0x6e,0x3d,0x3d,0xf3,0x4f,0x35,0x12,0x29,0xdb,0x48,0x89,0x71,0x19,0xb9,0xee,0x6a,0xfd,0xb2,0x02,0xa7,0x99,0x89,0xbb,0x69,0x39,0xdb,0x00,0x00, // hushv3h6mbxd2pptj42reko3jcexcgnz5zvp3mqcu6myto3jhhn4yzyd.onion + 0x04,0x20,0x3d,0x24,0x7a,0xee,0xf5,0x39,0x20,0x7e,0x69,0x92,0xda,0xc7,0xa6,0x9f,0xbd,0xeb,0x29,0x21,0x20,0x93,0x52,0x03,0xf3,0x60,0x41,0xfc,0xb8,0xf9,0x06,0x29,0x96,0x24,0x00,0x00, // hushv3xvheqh42ms3ld2nh555muscietkib7gycb7s4psbrjsysfywqd.onion + 0x02,0x10,0x2a,0x0c,0xb6,0x41,0x06,0xf1,0x00,0x34,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00, // 2a0c:b641:6f1:34::2 + 0x02,0x10,0x2a,0x0c,0xb6,0x41,0x06,0xf1,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00, // 2a0c:b641:6f1:c::2 + 0x05,0x20,0x42,0xd3,0x08,0x7d,0xad,0x65,0xb4,0x84,0xe8,0x99,0x5e,0xf7,0xc1,0x12,0x36,0xb3,0x0d,0x96,0x30,0x2c,0x70,0xb6,0xde,0x48,0x03,0x44,0xc7,0xab,0x9d,0x1b,0xbb,0x8f,0x00,0x00, // iljqq7nnmw2ij2ezl334cerwwmgzmmbmoc3n4saditd2xhi3xohq.b32.i2p }; -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/checkpoints.cpp b/src/checkpoints.cpp index 9a0b7a67d..898c7adca 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-2023 The Hush developers // Distributed under 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..441e8ceca 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-2023 The Hush developers // Distributed under 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..cf26ded24 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-2023 The Hush developers // Distributed under 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 5702fbb95..b377fb1b0 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-2023 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html /****************************************************************************** @@ -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..86489bafb 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-2023 The 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? @@ -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 3 #define CLIENT_VERSION_BUILD 50 //! Set to true for release, false for prerelease or test build @@ -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 2023 #endif //HAVE_CONFIG_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/coincontrol.h b/src/coincontrol.h index 3f8d0539d..accc5279d 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-2023 The Hush developers // Distributed under 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..63d50e5d5 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-2023 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html /****************************************************************************** @@ -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/coins.h b/src/coins.h index 282fe816c..18b77b342 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-2023 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html /****************************************************************************** diff --git a/src/compat.h b/src/compat.h index af902e705..e6ffa269f 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-2023 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html /****************************************************************************** @@ -77,6 +78,8 @@ typedef u_int SOCKET; #define SOCKET_ERROR -1 #endif +#define WSAEAGAIN EAGAIN + #ifdef _WIN32 #ifndef S_IRUSR #define S_IRUSR 0400 @@ -108,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/compressor.cpp b/src/compressor.cpp index ae7fe02ba..290fa9e5a 100644 --- a/src/compressor.cpp +++ b/src/compressor.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2023 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/compressor.h b/src/compressor.h index 5c6bc4381..35d989b38 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-2023 The Hush developers // Distributed under 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/consensus.h b/src/consensus/consensus.h index 9a998af9d..28996f8b6 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-2023 The Hush developers // Distributed under 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/params.h b/src/consensus/params.h index f3484e6e9..82d50a12d 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-2023 The Hush developers // Distributed under 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..1144c8e6b 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-2023 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/consensus/upgrades.h b/src/consensus/upgrades.h index 7a72e798b..56951087c 100644 --- a/src/consensus/upgrades.h +++ b/src/consensus/upgrades.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2023 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..8ae53c89a 100644 --- a/src/consensus/validation.h +++ b/src/consensus/validation.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2023 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_io.h b/src/core_io.h index cc4445b9a..d67e8e362 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-2023 The Hush developers // Distributed under 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..770ccee31 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-2023 The Hush developers // Distributed under 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 679d221f4..0a2a906b4 100644 --- a/src/core_read.cpp +++ b/src/core_read.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2023 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 @@ -26,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 bb996c700..530721d8f 100644 --- a/src/core_write.cpp +++ b/src/core_write.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2023 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 @@ -28,7 +29,7 @@ #include #include "util.h" #include "utilmoneystr.h" -#include "utilstrencodings.h" +#include "util/strencodings.h" #include #include diff --git a/src/crosschain.cpp b/src/crosschain.cpp index 7968b7292..92f4f816c 100644 --- a/src/crosschain.cpp +++ b/src/crosschain.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2023 The Hush developers // Distributed under 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..bbde384bc 100644 --- a/src/crosschain.h +++ b/src/crosschain.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2023 The Hush developers // Distributed under 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..15de1c68b 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-2023 The 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..45f0f6942 100644 --- a/src/crypto/common.h +++ b/src/crypto/common.h @@ -1,5 +1,6 @@ +// Copyright (c) 2016-2023 The Hush developers // Copyright (c) 2014 The Bitcoin Core developers -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2023 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 @@ -61,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.cpp b/src/crypto/equihash.cpp index 07f82bcbe..e3ef37c81 100644 --- a/src/crypto/equihash.cpp +++ b/src/crypto/equihash.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2023 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/equihash.h b/src/crypto/equihash.h index 968fbdd79..71cb8a01c 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-2023 The Hush developers // Copyright (c) 2016 Jack Grigg // Copyright (c) 2016 The Zcash developers // Distributed under the GPLv3 software license, see the accompanying @@ -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/hmac_sha256.cpp b/src/crypto/hmac_sha256.cpp index 9e7863239..793e371bd 100644 --- a/src/crypto/hmac_sha256.cpp +++ b/src/crypto/hmac_sha256.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2023 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..548808cc8 100644 --- a/src/crypto/hmac_sha256.h +++ b/src/crypto/hmac_sha256.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2023 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..fe7177613 100644 --- a/src/crypto/hmac_sha512.cpp +++ b/src/crypto/hmac_sha512.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2023 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..d6fd9209c 100644 --- a/src/crypto/hmac_sha512.h +++ b/src/crypto/hmac_sha512.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2023 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..03d2fd8fb 100644 --- a/src/crypto/ripemd160.cpp +++ b/src/crypto/ripemd160.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2023 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..bfdd1781d 100644 --- a/src/crypto/ripemd160.h +++ b/src/crypto/ripemd160.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2023 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..e064df774 100644 --- a/src/crypto/sha1.cpp +++ b/src/crypto/sha1.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2023 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..c7763e1e5 100644 --- a/src/crypto/sha1.h +++ b/src/crypto/sha1.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2023 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..c68e79d3c 100644 --- a/src/crypto/sha256.cpp +++ b/src/crypto/sha256.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2023 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..0098623e1 100644 --- a/src/crypto/sha256.h +++ b/src/crypto/sha256.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2023 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..c1148d712 100644 --- a/src/crypto/sha256_sse4.cpp +++ b/src/crypto/sha256_sse4.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2023 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/sha3.cpp b/src/crypto/sha3.cpp new file mode 100644 index 000000000..77d67d290 --- /dev/null +++ b/src/crypto/sha3.cpp @@ -0,0 +1,162 @@ +// Copyright (c) 2020 The Bitcoin Core developers +// Copyright (c) 2016-2023 The 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..62e06c476 --- /dev/null +++ b/src/crypto/sha3.h @@ -0,0 +1,42 @@ +// Copyright (c) 2020 The Bitcoin Core developers +// Copyright (c) 2016-2023 The 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/crypto/sha512.cpp b/src/crypto/sha512.cpp index 3ccf1e222..d68d0efec 100644 --- a/src/crypto/sha512.cpp +++ b/src/crypto/sha512.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2023 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..48ceea484 100644 --- a/src/crypto/sha512.h +++ b/src/crypto/sha512.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2023 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/cryptoconditions/AUTHORS b/src/cryptoconditions/AUTHORS index bf0bcc88b..ddfc3f623 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-2023 The Hush Developers Relicensed to GPLv3 on Nov 21st 2020. diff --git a/src/cryptoconditions/Makefile.am b/src/cryptoconditions/Makefile.am index 615ac5783..01d5a98bc 100644 --- a/src/cryptoconditions/Makefile.am +++ b/src/cryptoconditions/Makefile.am @@ -1,3 +1,6 @@ +# Copyright 2016-2023 The 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 diff --git a/src/cryptoconditions/src/anon.c b/src/cryptoconditions/src/anon.c index 57c5cac45..28257f5f2 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-2023 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..ad1e77f69 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-2023 The Hush developers // Distributed under 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..4301d2469 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-2023 The Hush developers // Distributed under 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..1146d850f 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-2023 The Hush developers // Distributed under 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..5188619f3 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-2023 The Hush developers // Distributed under 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..08a39ad96 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-2023 The Hush developers // Distributed under 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..c2aaebcad 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-2023 The Hush developers // Distributed under 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..bd6050c91 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-2023 The Hush developers // Distributed under 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..441c1b163 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-2023 The Hush developers // Distributed under 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..f3bccd3b4 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-2023 The Hush developers // Distributed under 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..66e78e74e 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-2023 The Hush developers // Distributed under 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..b2e37f835 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-2023 The Hush developers // Distributed under 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..75547ffd6 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-2023 The Hush developers // Distributed under 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..c08eece96 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-2023 The Hush developers // Distributed under 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..b99acf0be 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-2023 The Hush developers // Distributed under 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..daef2754c 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-2023 The Hush developers // Distributed under 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..9f7a06990 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-2023 The Hush developers // Distributed under 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..c1273d279 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-2023 The Hush developers // Distributed under 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..2270ed5d4 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-2023 The Hush developers // Distributed under 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..b5d4a03e6 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-2023 The Hush developers // Distributed under 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..5f2b666e0 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-2023 The Hush developers // Distributed under 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..20c5f2a06 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-2023 The Hush developers // Distributed under 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..543ed6481 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-2023 The Hush developers // Distributed under 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..63963d6df 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-2023 The Hush developers // Distributed under 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..015285dec 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-2023 The Hush developers // Distributed under 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..fa1112870 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-2023 The Hush developers // Distributed under 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..60242f5b7 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-2023 The Hush developers // Distributed under 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..979455327 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-2023 The Hush developers // Distributed under 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..4f93883c4 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-2023 The Hush developers // Distributed under 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..6275229be 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-2023 The Hush developers // Distributed under 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..723f1b710 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-2023 The Hush developers // Distributed under 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..349701a22 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-2023 The Hush developers // Distributed under 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..8ea66fd28 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-2023 The Hush developers // Distributed under 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..0f6d59913 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-2023 The Hush developers // Distributed under 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..8cb612ee6 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-2023 The Hush developers // Distributed under 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..5203a5eba 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-2023 The Hush developers // Distributed under 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..4d0f9d3e0 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-2023 The Hush developers // Distributed under 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..6ecc313e4 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-2023 The Hush developers // Distributed under 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..8f4e59ef5 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-2023 The Hush developers // Distributed under 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..4478ea6d3 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-2023 The Hush developers // Distributed under 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..d277238b5 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-2023 The Hush developers // Distributed under 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..d233afc17 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-2023 The Hush developers // Distributed under 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..47847e530 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-2023 The Hush developers // Distributed under 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..c5047a302 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-2023 The Hush developers // Distributed under 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..2e17457ef 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-2023 The Hush developers // Distributed under 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..04348a6f1 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-2023 The Hush developers // Distributed under 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..88c8a8536 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-2023 The Hush developers // Distributed under 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..8e9e7de84 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-2023 The Hush developers // Distributed under 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..f374e59b1 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-2023 The Hush developers // Distributed under 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..17a698f3a 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-2023 The Hush developers // Distributed under 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..4c0ec7de0 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-2023 The Hush developers // Distributed under 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..057b1c41a 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-2023 The Hush developers // Distributed under 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..1309aed3e 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-2023 The Hush developers // Distributed under 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..bf14491a9 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-2023 The Hush developers // Distributed under 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..99ad97507 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-2023 The Hush developers // Distributed under 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..7014a016f 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-2023 The Hush developers // Distributed under 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..5881bc71b 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-2023 The Hush developers // Distributed under 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..657de5857 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-2023 The Hush developers // Distributed under 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..82908ae26 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-2023 The Hush developers // Distributed under 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..163f940b6 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-2023 The Hush developers // Distributed under 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..d5eff9d0c 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-2023 The Hush developers // Distributed under 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..d1735875e 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-2023 The Hush developers // Distributed under 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..a2092e461 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-2023 The Hush developers // Distributed under 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..aeb39d1a2 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-2023 The Hush developers // Distributed under 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..d3731b07d 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-2023 The Hush developers // Distributed under 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..bf7584ee5 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-2023 The Hush developers // Distributed under 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..920a7fbe0 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-2023 The Hush developers // Distributed under 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..ae8d31a6a 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-2023 The 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..ab540e7f6 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-2023 The Hush developers // Distributed under 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..b734f3825 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-2023 The Hush developers // Distributed under 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..369bf28f0 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-2023 The Hush developers // Distributed under 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..d55138543 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-2023 The 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..d3d1e98ae 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-2023 The Hush developers // Distributed under 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..f462a02d7 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-2023 The 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..951614e89 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-2023 The Hush developers // Distributed under 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..d96fa39f8 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-2023 The Hush developers // Distributed under 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..6eea6ee43 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-2023 The Hush developers // Distributed under 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..88c5e479a 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-2023 The Hush developers // Distributed under 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..3b60f5158 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-2023 The Hush developers // Distributed under 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..5ed9c06dd 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-2023 The Hush developers // Distributed under 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..ff4d8c852 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-2023 The Hush developers // Distributed under 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..c76e95471 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-2023 The Hush developers // Distributed under 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..aeff71aec 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-2023 The Hush developers // Distributed under 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..d590743af 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-2023 The Hush developers // Distributed under 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..76329442b 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-2023 The Hush developers // Distributed under 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..3f34bfdf2 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-2023 The Hush developers // Distributed under 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..9bc31209a 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-2023 The Hush developers // Distributed under 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..b312a2f5c 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-2023 The Hush developers // Distributed under 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..3e0b711b0 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-2023 The Hush developers // Distributed under 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..d0f2d1d11 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-2023 The Hush developers // Distributed under 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..d0831c18d 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-2023 The Hush developers // Distributed under 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..e372e0be6 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-2023 The Hush developers // Distributed under 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..417b6cea3 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-2023 The Hush developers // Distributed under 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..020717184 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-2023 The 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..e22b15736 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-2023 The 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..1f6bfa563 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-2023 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..e259323a5 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-2023 The Hush developers // Distributed under 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..ae7e2d44f 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-2023 The Hush developers // Distributed under 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..5cedf5f48 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-2023 The Hush developers // Distributed under 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..9131bc268 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-2023 The Hush developers // Distributed under 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..7b1d99e5e 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-2023 The Hush developers // Distributed under 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..0c9b24416 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-2023 The Hush developers // Distributed under 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..18777f835 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-2023 The Hush developers // Distributed under 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..13c6a0e96 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-2023 The Hush developers // Distributed under 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..8d20b87b5 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-2023 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html @@ -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/deprecation.h b/src/deprecation.h index b98cf3ec6..8cd724229 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-2023 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/dragonx-cli b/src/dragonx-cli new file mode 100755 index 000000000..5b9eaa511 --- /dev/null +++ b/src/dragonx-cli @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +# Copyright 2016-2023 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 $@ diff --git a/src/dragonx-cli.bat b/src/dragonx-cli.bat new file mode 100644 index 000000000..5edecfd8e --- /dev/null +++ b/src/dragonx-cli.bat @@ -0,0 +1,10 @@ +@call :GET_CURRENT_DIR +@cd %THIS_DIR% +hush-cli.exe -ac_name=DRAGONX %* +@goto :EOF + +:GET_CURRENT_DIR +@pushd %~dp0 +@set THIS_DIR=%CD% +@popd +@goto :EOF diff --git a/src/dragonxd b/src/dragonxd new file mode 100755 index 000000000..86707c137 --- /dev/null +++ b/src/dragonxd @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# Copyright 2016-2023 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 + +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 $@ diff --git a/src/dragonxd.bat b/src/dragonxd.bat new file mode 100644 index 000000000..0dc4fd2c9 --- /dev/null +++ b/src/dragonxd.bat @@ -0,0 +1,10 @@ +@call :GET_CURRENT_DIR +@cd %THIS_DIR% +hushd.exe -ac_name=DRAGONX -ac_algo=randomx -ac_halving=3500000 -ac_reward=300000000 -ac_blocktime=36 -ac_private=1 -addnode=176.126.87.241 %* +@goto :EOF + +:GET_CURRENT_DIR +@pushd %~dp0 +@set THIS_DIR=%CD% +@popd +@goto :EOF diff --git a/src/fs.cpp b/src/fs.cpp index a5e12f1cf..17cccdf44 100644 --- a/src/fs.cpp +++ b/src/fs.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2023 The Hush developers #include "fs.h" namespace fsbridge { diff --git a/src/fs.h b/src/fs.h index 5152d5071..c7c205292 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-2023 The Hush developers // Distributed under 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..5999597a2 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-2023 The 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..74f9faddf 100644 --- a/src/gtest/json_test_vectors.h +++ b/src/gtest/json_test_vectors.h @@ -1,9 +1,9 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2023 The 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 "utilstrencodings.h" +#include "util/strencodings.h" #include "version.h" #include "serialize.h" #include "streams.h" diff --git a/src/gtest/main.cpp b/src/gtest/main.cpp index be474239b..c7d67b111 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-2023 The 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..e50b85949 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-2023 The 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..9d1c21f7e 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-2023 The 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..164b4868f 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-2023 The 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..454afe40c 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-2023 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // Released under the GPLv3 @@ -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_equihash.cpp b/src/gtest/test_equihash.cpp index e3f950ff5..d4c5b4486 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-2023 The 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..e84375311 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-2023 The 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..6ac2960a7 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-2023 The 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..8fe0e28f9 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-2023 The 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..12ff81571 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-2023 The 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..171536542 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-2023 The 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..bedbfa9b0 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-2023 The 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 @@ -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_metrics.cpp b/src/gtest/test_metrics.cpp index a14e06527..0a4bd9303 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-2023 The 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..3578d2de3 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-2023 The 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..3ae4d4c05 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-2023 The 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..21d9c4008 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-2023 The 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..37d152fd0 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-2023 The 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..446e943bc 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-2023 The 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..245509da0 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-2023 The 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 @@ -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_sapling_note.cpp b/src/gtest/test_sapling_note.cpp index ee313dbc5..44a95d985 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-2023 The 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..b2be7bc03 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-2023 The 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..6644f9bfc 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-2023 The 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..20caedb54 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-2023 The 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 @@ -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/gtest/test_upgrades.cpp b/src/gtest/test_upgrades.cpp index affc4c47d..6a5a940dd 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-2023 The 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..54832e5a1 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-2023 The 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..fa3e5d551 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-2023 The 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..24c97893e 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-2023 The 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..336975827 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-2023 The Hush developers // Distributed under 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..be26686e3 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-2023 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html @@ -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 fd6849e61..1ef126784 100644 --- a/src/httprpc.cpp +++ b/src/httprpc.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2023 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html /****************************************************************************** @@ -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/httprpc.h b/src/httprpc.h index 2118d2fef..5ea70cb61 100644 --- a/src/httprpc.h +++ b/src/httprpc.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2023 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/httpserver.cpp b/src/httpserver.cpp index 58cc9ca45..700027419 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-2023 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html @@ -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 @@ -34,6 +37,7 @@ #include // for to_lower() #include +#include #include /** HTTP request work item */ @@ -157,6 +161,7 @@ public: boost::unique_lock lock(cs); return queue.size(); } + size_t MaxDepth() { boost::unique_lock lock(cs); @@ -167,6 +172,7 @@ public: boost::unique_lock lock(cs); return numThreads; } + }; struct HTTPPathHandler @@ -196,7 +202,6 @@ std::vector pathHandlers; //! Bound listening sockets std::vector boundSockets; - int getWorkQueueDepth() { return workQueue->Depth(); @@ -227,12 +232,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 +283,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 +335,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 +560,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 +647,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 +676,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/httpserver.h b/src/httpserver.h index 348ccda2b..9bc0c05d6 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-2023 The Hush developers // Distributed under 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-smart-chain b/src/hush-smart-chain index c5543b221..e6300c203 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-2023 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 )" @@ -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 "$@" diff --git a/src/hush-smart-chain.bat b/src/hush-smart-chain.bat new file mode 100644 index 000000000..cd20f1a48 --- /dev/null +++ b/src/hush-smart-chain.bat @@ -0,0 +1,10 @@ +:: Copyright (c) 2016-2023 The 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 %* +@goto :EOF + +:GET_CURRENT_DIR +@pushd %~dp0 diff --git a/src/hush-tx.cpp b/src/hush-tx.cpp index 2d9814aa2..431821f15 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-2023 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html /****************************************************************************** @@ -29,7 +29,7 @@ #include #include "util.h" #include "utilmoneystr.h" -#include "utilstrencodings.h" +#include "util/strencodings.h" #include #include #include diff --git a/src/hush.h b/src/hush.h index 1c2954d9d..a9dbb5ec2 100644 --- a/src/hush.h +++ b/src/hush.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2023 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html /****************************************************************************** @@ -504,7 +504,7 @@ void hush_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotarie int32_t hush_validate_chain(uint256 srchash,int32_t notarized_height) { - fprintf(stderr,"%s\n", __func__); + //fprintf(stderr,"%s\n", __func__); static int32_t last_rewind; int32_t rewindtarget; CBlockIndex *pindex; struct hush_state *sp; char symbol[HUSH_SMART_CHAIN_MAXLEN],dest[HUSH_SMART_CHAIN_MAXLEN]; if ( (sp= hush_stateptr(symbol,dest)) == 0 ) return(0); diff --git a/src/hush/tlsenums.h b/src/hush/tlsenums.h index e75e1993a..67f8026ce 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-2023 The Hush developers // Distributed under 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..e062540e7 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-2023 The 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..5cd06b13c 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-2023 The 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..0a76040b4 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-2023 The Hush developers // Distributed under 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..42d1fdb8c 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-2023 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..b09c756ad 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-2023 The Hush Developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html /****************************************************************************** @@ -505,7 +505,7 @@ int32_t hush_verifynotarization(char *symbol,char *dest,int32_t height,int32_t N { if ( (json= cJSON_Parse(jsonstr)) != 0 ) { - if ( (txjson= jobj(json,(char *)"result")) != 0 && (vouts= jarray(&n,txjson,(char *)"vout")) > 0 ) + if ( (txjson= jobj(json,(char *)"result")) != 0 && (vouts= jarray(&n,txjson,(char *)"vout")) != 0 ) { vout = jitem(vouts,n-1); if ( 0 && SMART_CHAIN_SYMBOL[0] != 0 ) diff --git a/src/hush_cJSON.c b/src/hush_cJSON.c index facf79f2a..225fb143d 100644 --- a/src/hush_cJSON.c +++ b/src/hush_cJSON.c @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2023 The Hush developers /* Copyright (c) 2009 Dave Gamble diff --git a/src/hush_cJSON.h b/src/hush_cJSON.h index d7eb3a4dd..d0c012361 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-2023 The Hush developers // Distributed under 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..7861ab478 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-2023 The Hush developers // Distributed under 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..a50c8ff28 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-2023 The Hush developers // Distributed under 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_defs.h b/src/hush_defs.h index c4a0b5425..8ae77797e 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-2023 The Hush developers // Distributed under 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..8be81c45a 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-2023 The Hush developers // Distributed under 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..b040d3d48 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-2023 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html /****************************************************************************** @@ -624,38 +624,6 @@ int32_t hush_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t toko return(0); } -const char *banned_txids[] = -{ - "78cb4e21245c26b015b888b14c4f5096e18137d2741a6de9734d62b07014dfca", // vout1 only 233559 - "00697be658e05561febdee1aafe368b821ca33fbb89b7027365e3d77b5dfede5", //234172 - "e909465788b32047c472d73e882d79a92b0d550f90be008f76e1edaee6d742ea", //234187 - "f56c6873748a327d0b92b8108f8ec8505a2843a541b1926022883678fb24f9dc", //234188 - "abf08be07d8f5b3a433ddcca7ef539e79a3571632efd6d0294ec0492442a0204", //234213 - "3b854b996cc982fba8c06e76cf507ae7eed52ab92663f4c0d7d10b3ed879c3b0", //234367 - "fa9e474c2cda3cb4127881a40eb3f682feaba3f3328307d518589024a6032cc4", //234635 - "ca746fa13e0113c4c0969937ea2c66de036d20274efad4ce114f6b699f1bc0f3", //234662 - "43ce88438de4973f21b1388ffe66e68fda592da38c6ef939be10bb1b86387041", //234697 - "0aeb748de82f209cd5ff7d3a06f65543904c4c17387c9d87c65fd44b14ad8f8c", //234899 - "bbd3a3d9b14730991e1066bd7c626ca270acac4127131afe25f877a5a886eb25", //235252 - "fa9943525f2e6c32cbc243294b08187e314d83a2870830180380c3c12a9fd33c", //235253 - "a01671c8775328a41304e31a6693bbd35e9acbab28ab117f729eaba9cb769461", //235265 - "2ef49d2d27946ad7c5d5e4ab5c089696762ff04e855f8ab48e83bdf0cc68726d", //235295 - "c85dcffb16d5a45bd239021ad33443414d60224760f11d535ae2063e5709efee", //235296 - // all vouts banned - "c4ea1462c207547cd6fb6a4155ca6d042b22170d29801a465db5c09fec55b19d", //246748 - "305dc96d8bc23a69d3db955e03a6a87c1832673470c32fe25473a46cc473c7d1", //247204 - //"43416a0c4da6b1a5c1d375bdbe8f7dc8d44d8f60df593d3376aa8221ec66357e", // vout0 only - //"1eb295ed54c47f35cbccd7e7e40d03041f1853581da6d41102a9d8813782b6cb", - //"db121e4012222adfc841824984a2a90b7e5b018dd71307822537d58160195e43", - //"28f95b8148ac4ae6e09c7380e34422fab41d568a411e53dc94823e36a3d6f386", - //"01d8c839463bda2f2f6400ede4611357913684927a767422a8560ead1b22557c", - //"6e4980a9e1bd669f4df04732dc6f11b7773b6de88d1abcf89a6b9007d72ef9ac", - //"6cc1d0495170bc0e11fd3925297623562e529ea1336b66ea61f8a1159041aed2", - //"250875424cece9bcd98cb226b09da7671625633d6958589e3a462bad89ad87cc", // missed - //"ea8659011de52f4dac42cda12326064b7b5013b8492f88e33159884ca299aa05", // missed - //"ce567928b5490a17244167af161b1d8dd6ff753fef222fe6855d95b2278a35b3", // missed -}; - int32_t hush_checkvout(int32_t vout,int32_t k,int32_t indallvouts) { if ( k < indallvouts ) @@ -665,169 +633,8 @@ int32_t hush_checkvout(int32_t vout,int32_t k,int32_t indallvouts) else return(vout == 0); } -int32_t hush_bannedset(int32_t *indallvoutsp,uint256 *array,int32_t max) -{ - int32_t i; - if ( sizeof(banned_txids)/sizeof(*banned_txids) > max ) - { - fprintf(stderr,"hush_bannedset: buffer too small %d vs %d\n",(int32_t)(sizeof(banned_txids)/sizeof(*banned_txids)),max); - StartShutdown(); - } - for (i=0; i 1 && block.vtx[txn_count-1].vout.size() > 0 && block.vtx[txn_count-1].vout[0].nValue == 5000 ) - { - /* - if ( block.vtx[txn_count-1].vin.size() == 1 && GetTransaction(block.vtx[txn_count-1].vin[0].prevout.hash,tx,hash,false) && block.vtx[0].vout[0].scriptPubKey == tx.vout[block.vtx[txn_count-1].vin[0].prevout.n].scriptPubKey ) - notmatched = 1; - */ - if ( block.vtx[txn_count-1].vin.size() == 1 ) { - uint256 hashNotaryProofVin = block.vtx[txn_count-1].vin[0].prevout.hash; - int fNotaryProofVinTxFound = GetTransaction(hashNotaryProofVin,tx,hash,false); - if (!fNotaryProofVinTxFound) { - // try to search in the same block - BOOST_FOREACH(const CTransaction &txInThisBlock, block.vtx) { - if (txInThisBlock.GetHash() == hashNotaryProofVin) { - fNotaryProofVinTxFound = 1; - tx = txInThisBlock; - hash = block.GetHash(); - break; - } - } - } - if ( fNotaryProofVinTxFound && block.vtx[0].vout[0].scriptPubKey == tx.vout[block.vtx[txn_count-1].vin[0].prevout.n].scriptPubKey ) - { - notmatched = 1; - } - } - } - n = block.vtx[i].vin.size(); - for (j=0; j= indallvouts) ) - { - printf("banned tx.%d being used at ht.%d txi.%d vini.%d\n",k,height,i,j); - return(-1); - } - } - } - } - } - if ( SMART_CHAIN_SYMBOL[0] == 0 || - ((ASSETCHAINS_COMMISSION != 0 || ASSETCHAINS_FOUNDERS_REWARD) && height > 1) || - NetworkUpgradeActive(height, Params().GetConsensus(), Consensus::UPGRADE_SAPLING) ) - { - n = block.vtx[0].vout.size(); - int64_t val,prevtotal = 0; int32_t strangeout=0,overflow = 0; - total = 0; - for (i=1; i= MAX_MONEY ) - { - overflow = 1; - break; - } - if ( i > 1 && script[0] != 0x6a && val < 5000 ) - strangeout++; - total += val; - if ( total < prevtotal || (val != 0 && total == prevtotal) ) - { - overflow = 1; - break; - } - prevtotal = total; - } - if ( SMART_CHAIN_SYMBOL[0] == 0 ) - { - if ( overflow != 0 || total > COIN/10 ) - { - if ( height >= activation ) - { - if ( height > 800000 ) - fprintf(stderr,">>>>>>>> <<<<<<<<<< ht.%d illegal nonz output %.8f n.%d\n",height,dstr(block.vtx[0].vout[1].nValue),n); - return(-1); - } - } - else if ( block.nBits == HUSH_MINDIFF_NBITS && total > 0 ) // to deal with fee stealing - { - fprintf(stderr,"notary mined ht.%d with extra %.8f\n",height,dstr(total)); - if ( height > HUSH_NOTARIES_HEIGHT1 ) - return(-1); - } - if ( strangeout != 0 || notmatched != 0 ) - { - if ( 0 && strcmp(NOTARY_PUBKEY.c_str(),"03b7621b44118017a16043f19b30cc8a4cfe068ac4e42417bae16ba460c80f3828") == 0 ) - fprintf(stderr,">>>>>>>>>>>>> DUST ht.%d strangout.%d notmatched.%d <<<<<<<<<\n",height,strangeout,notmatched); - if ( height > 1000000 && strangeout != 0 ) - return(-1); - } - else if ( height > 814000 ) - { - script = (uint8_t *)&block.vtx[0].vout[0].scriptPubKey[0]; - //int32_t notary = hush_electednotary(&num,script+1,height,0); - //if ( (-1 * (hush_electednotary(&num,script+1,height,0) >= 0) * (height > 1000000)) < 0 ) - // fprintf(stderr, ">>>>>>> FAILED BLOCK.%d notary.%d insync.%d\n",height,notary,HUSH_INSYNC); - //else - // fprintf(stderr, "<<<<<<< VALID BLOCK.%d notary.%d insync.%d\n",height,notary,HUSH_INSYNC); - return(-1 * (hush_electednotary(&num,script+1,height,0) >= 0) * (height > 1000000)); - } - } - else - { - checktoshis = 0; - if ( (ASSETCHAINS_COMMISSION != 0 || ASSETCHAINS_FOUNDERS_REWARD) && height > 1 ) - { - if ( (checktoshis= hush_checkcommission((CBlock *)&block,height)) < 0 ) - { - fprintf(stderr,"ht.%d checktoshis %.8f overflow.%d total %.8f strangeout.%d\n",height,dstr(checktoshis),overflow,dstr(total),strangeout); - return(-1); - } - } - if ( height > 1 && checktoshis == 0 ) - { - checktoshis = ((uint64_t)GetBlockSubsidy(height, Params().GetConsensus()) - block.vtx[0].vout[0].nValue); - // some pools will need to change their pool fee to be (poolfee % - txfees) - //checktoshis += txn_count * 0.001; // rely on higher level validations to prevent emitting more coins than actual txfees - } - if ( height >= 2 && (overflow != 0 || total > checktoshis || strangeout != 0) ) - { - fprintf(stderr,"checkdeposit: ht.%d checktoshis %.8f overflow.%d total %.8f strangeout.%d\n",height,dstr(checktoshis),overflow,dstr(total),strangeout); - if ( strangeout != 0 ) - fprintf(stderr,">>>>>>>>>>>>> %s DUST ht.%d strangeout.%d notmatched.%d <<<<<<<<<\n",SMART_CHAIN_SYMBOL,height,strangeout,notmatched); - return(-1); - } - } - } - return(0); -} - const char *hush_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int32_t opretlen,uint256 txid,uint16_t vout,char *source) { uint8_t rmd160[20],rmd160s[64*20],addrtype,shortflag,pubkey33[33]; int32_t didstats,i,j,n,kvheight,len,tokomodo,hushheight,otherheights[64],hushheights[64]; int8_t baseids[64]; char base[4],coinaddr[64],destaddr[64]; uint256 txids[64]; uint16_t vouts[64]; uint64_t convtoshis,seed; int64_t fee,fiatoshis,puposhis,checktoshis,values[64],srcvalues[64]; struct pax_transaction *pax,*pax2; struct hush_state *basesp; double diff; diff --git a/src/hush_globals.h b/src/hush_globals.h index 9dc68449f..4ac3060b6 100644 --- a/src/hush_globals.h +++ b/src/hush_globals.h @@ -1,4 +1,4 @@ -// Copyright 2016-2021 The Hush Developers +// Copyright 2016-2023 The Hush Developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html /****************************************************************************** @@ -30,7 +30,6 @@ int32_t hush_isrealtime(int32_t *hushheightp); uint64_t hush_paxtotal(); int32_t hush_longestchain(); uint64_t hush_maxallowed(int32_t baseid); -int32_t hush_bannedset(int32_t *indallvoutsp,uint256 *array,int32_t max); int32_t hush_checkvout(int32_t vout,int32_t k,int32_t indallvouts); pthread_mutex_t hush_mutex; diff --git a/src/hush_kv.h b/src/hush_kv.h index 9149c9ec4..e5f86cba4 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-2023 The Hush developers // Distributed under 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..6d4af2455 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-2023 The Hush developers // Distributed under 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..fb64aa789 100644 --- a/src/hush_nSPV_defs.h +++ b/src/hush_nSPV_defs.h @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2023 The Hush developers /****************************************************************************** * Copyright © 2014-2019 The SuperNET Developers. * diff --git a/src/hush_nSPV_fullnode.h b/src/hush_nSPV_fullnode.h index be4fbce15..48ae589d8 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-2023 The Hush developers // Distributed under 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_superlite.h b/src/hush_nSPV_superlite.h index 585f905f0..418957e57 100644 --- a/src/hush_nSPV_superlite.h +++ b/src/hush_nSPV_superlite.h @@ -1,4 +1,4 @@ - +// Copyright (c) 2016-2023 The Hush developers /****************************************************************************** * Copyright © 2014-2019 The SuperNET Developers. * * * @@ -391,8 +391,6 @@ UniValue NSPV_utxoresp_json(struct NSPV_utxoresp *utxos,int32_t numutxos) item.push_back(Pair("txid",utxos[i].txid.GetHex())); item.push_back(Pair("vout",(int64_t)utxos[i].vout)); item.push_back(Pair("value",(double)utxos[i].satoshis/COIN)); - if ( SMART_CHAIN_SYMBOL[0] == 0 ) - item.push_back(Pair("interest",(double)utxos[i].extradata/COIN)); array.push_back(item); } return(array); @@ -408,8 +406,6 @@ UniValue NSPV_utxosresp_json(struct NSPV_utxosresp *ptr) result.push_back(Pair("height",(int64_t)ptr->nodeheight)); result.push_back(Pair("numutxos",(int64_t)ptr->numutxos)); result.push_back(Pair("balance",(double)ptr->total/COIN)); - if ( SMART_CHAIN_SYMBOL[0] == 0 ) - result.push_back(Pair("interest",(double)ptr->interest/COIN)); result.push_back(Pair("filter",(int64_t)ptr->filter)); result.push_back(Pair("lastpeer",NSPV_lastpeer)); return(result); diff --git a/src/hush_nSPV_wallet.h b/src/hush_nSPV_wallet.h index 05c5d489f..af098407d 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-2023 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html /****************************************************************************** @@ -383,12 +383,7 @@ UniValue NSPV_spend(char *srcaddr,char *destaddr,int64_t satoshis) // what its a mtx.nExpiryHeight = 0; mtx.nVersionGroupId = SAPLING_VERSION_GROUP_ID; mtx.nVersion = SAPLING_TX_VERSION; - if ( SMART_CHAIN_SYMBOL[0] == 0 ) { - if ( !hush_hardfork_active((uint32_t)chainActive.LastTip()->nTime) ) - mtx.nLockTime = (uint32_t)time(NULL) - 777; - else - mtx.nLockTime = (uint32_t)chainActive.Tip()->GetMedianTimePast(); - } + mtx.nLockTime = (uint32_t)chainActive.Tip()->GetMedianTimePast(); memset(used,0,sizeof(used)); @@ -402,14 +397,6 @@ UniValue NSPV_spend(char *srcaddr,char *destaddr,int64_t satoshis) // what its a return(result); } hex = NSPV_signtx(rewardsum,interestsum,retcodes,mtx,txfee,opret,used); - if ( SMART_CHAIN_SYMBOL[0] == 0 ) - { - char numstr[64]; - sprintf(numstr,"%.8f",(double)interestsum/COIN); - result.push_back(Pair("rewards",numstr)); - sprintf(numstr,"%.8f",(double)rewardsum/COIN); - result.push_back(Pair("validated",numstr)); - } if ( hex.size() > 0 ) { if ( DecodeHexTx(tx,hex) != 0 ) diff --git a/src/hush_nk.h b/src/hush_nk.h index a0ce3cf07..6cc1cbfe6 100644 --- a/src/hush_nk.h +++ b/src/hush_nk.h @@ -1,9 +1,11 @@ +// Copyright (c) 2016-2023 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/hush_notary.h b/src/hush_notary.h index 6090b4f86..8228a475b 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-2023 The Hush developers // Distributed under 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..9289ce15d 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-2023 The Hush developers // Distributed under 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..c63b78e19 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-2023 The Hush developers // Distributed under 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..94eb61374 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-2023 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html /****************************************************************************** @@ -2460,8 +2460,6 @@ void hush_args(char *argv0) } } else BITCOIND_RPCPORT = GetArg("-rpcport", BaseParams().RPCPort()); HUSH_DPOWCONFS = GetArg("-dpowconfs",dpowconfs); - if ( strcmp(SMART_CHAIN_SYMBOL,"CA333LIES") == 0 ) - HUSH_EXTRASATOSHI = 1; } void hush_nameset(char *symbol,char *dest,char *source) @@ -2478,11 +2476,13 @@ void hush_nameset(char *symbol,char *dest,char *source) struct hush_state *hush_stateptrget(char *base) { int32_t baseid; - if ( base == 0 || base[0] == 0 || strcmp(base,(char *)"KYCSELLOUTS") == 0 ) + if ( base == 0 || base[0] == 0 ) { return(&HUSH_STATES[33]); - else if ( (baseid= hush_baseid(base)) >= 0 ) + } else if ( (baseid= hush_baseid(base)) >= 0 ) { return(&HUSH_STATES[baseid+1]); - else return(&HUSH_STATES[0]); + } else { + return(&HUSH_STATES[0]); + } } struct hush_state *hush_stateptr(char *symbol,char *dest) diff --git a/src/i2p.cpp b/src/i2p.cpp new file mode 100644 index 000000000..2a4b29d93 --- /dev/null +++ b/src/i2p.cpp @@ -0,0 +1,441 @@ +// Copyright (c) 2020-2020 The Bitcoin Core developers +// Copyright (c) 2016-2023 The 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..c67971f21 --- /dev/null +++ b/src/i2p.h @@ -0,0 +1,256 @@ +// Copyright (c) 2020-2020 The Bitcoin Core developers +// Copyright (c) 2016-2023 The 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/importcoin.cpp b/src/importcoin.cpp index 16a8d3c64..88e711e92 100644 --- a/src/importcoin.cpp +++ b/src/importcoin.cpp @@ -1,3 +1,6 @@ +// Copyright (c) 2016-2023 The 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/importcoin.h b/src/importcoin.h index f903d2e03..121ddd3cd 100644 --- a/src/importcoin.h +++ b/src/importcoin.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2021 The Hush developers +// Copyright (c) 2016-2023 The Hush developers // Distributed under 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 e057282be..f49e146dd 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-2023 The 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??? @@ -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 @@ -80,18 +81,12 @@ #include #include #include - -#if ENABLE_ZMQ -#include "zmq/zmqnotificationinterface.h" -#endif - #include "librustzcash.h" 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[]; @@ -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 @@ -255,28 +246,28 @@ 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) pwalletMain->Flush(true); #endif -#if ENABLE_ZMQ - if (pzmqNotificationInterface) { - UnregisterValidationInterface(pzmqNotificationInterface); - delete pzmqNotificationInterface; - pzmqNotificationInterface = NULL; - } -#endif - #ifndef WIN32 try { boost::filesystem::remove(GetPidFile()); @@ -291,7 +282,7 @@ void Shutdown() #endif globalVerifyHandle.reset(); ECC_Stop(); - CNode::NetCleanup(); + // CNode::NetCleanup(); LogPrintf("%s: done\n", __func__); } @@ -342,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)) { @@ -377,7 +368,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)); @@ -393,7 +383,9 @@ 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("-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)); @@ -432,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) @@ -461,6 +460,17 @@ 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("-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)); strUsage += HelpMessageOpt("-keeptxnum", strprintf(_("Keep the last transactions (default: %i)"), DEFAULT_TX_RETENTION_LASTTX)); @@ -491,14 +501,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 +514,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, 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")); @@ -615,10 +617,12 @@ 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")); - 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; @@ -805,9 +809,7 @@ bool files_exist(boost::filesystem::path file1, boost::filesystem::path file2) { return boost::filesystem::exists(file1) && boost::filesystem::exists(file2); } -static void ZC_LoadParams( - const CChainParams& chainparams -) +static void ZC_LoadParams(const CChainParams& chainparams) { namespace fs = boost::filesystem; struct timeval tv_start, tv_end; @@ -837,18 +839,18 @@ static void ZC_LoadParams( if (files_exist(sapling_spend, sapling_output)) { LogPrintf("Found sapling params in /usr/share/hush\n"); found=true; - } - } + } + } - if (!found) { + if (!found) { // Try .. sapling_spend = boost::filesystem::path("..") / "sapling-spend.params"; sapling_output = boost::filesystem::path("..") / "sapling-output.params"; if (files_exist(sapling_spend, sapling_output)) { LogPrintf("Found sapling params in ..\n"); found = true; - } } + } if (!found) { // This will catch the case of any external software (i.e. GUI wallets) needing params and installed in same dir as hush3.git @@ -857,7 +859,7 @@ static void ZC_LoadParams( if (files_exist(sapling_spend, sapling_output)) { LogPrintf("Found sapling params in ../hush3\n"); found = true; - } + } } if (!found) { @@ -867,17 +869,37 @@ static void ZC_LoadParams( if (files_exist(sapling_spend, sapling_output)) { LogPrintf("Found sapling params in /Applications/Contents/MacOS\n"); found = true; + } } + + if (!found) { + // This will only work when SDX is installed into /Applications, which is the only supported method + sapling_spend = boost::filesystem::path("/Applications/silentdragonx.app/Contents/MacOS") / "sapling-spend.params"; + sapling_output = boost::filesystem::path("/Applications/silentdragonx.app/Contents/MacOS") / "sapling-output.params"; + if (files_exist(sapling_spend, sapling_output)) { + LogPrintf("Found sapling params in /Applications/Contents/MacOS\n"); + found = true; + } } if (!found) { - // DMG Support: Apple just has to do things differently... + // SD DMG Support: Apple just has to do things differently... sapling_spend = boost::filesystem::path("./silentdragon.app/Contents/MacOS") / "sapling-spend.params"; sapling_output = boost::filesystem::path("./silentdragon.app/Contents/MacOS") / "sapling-output.params"; if (files_exist(sapling_spend, sapling_output)) { LogPrintf("Found sapling params in /Applications/Contents/MacOS\n"); found = true; -} + } + } + + if (!found) { + // SDX DMG Support: Apple just has to do things differently... + sapling_spend = boost::filesystem::path("./silentdragonx.app/Contents/MacOS") / "sapling-spend.params"; + sapling_output = boost::filesystem::path("./silentdragonx.app/Contents/MacOS") / "sapling-output.params"; + if (files_exist(sapling_spend, sapling_output)) { + LogPrintf("Found sapling params in /Applications/Contents/MacOS\n"); + found = true; + } } if (!found) { @@ -889,7 +911,7 @@ static void ZC_LoadParams( LogPrintf("Found sapling params in ~/.zcash\n"); found = true; } -} + } if (!found) { // No Sapling params, at least we tried @@ -1063,7 +1085,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 @@ -1148,9 +1170,24 @@ 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 { + // Mac SDX + asmap_path = fs::path("/Applications/SilentDragonX.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; + } + } } } } @@ -1382,8 +1419,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 @@ -1501,7 +1536,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(); @@ -1615,14 +1650,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); @@ -1633,9 +1669,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)); @@ -1643,9 +1680,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 @@ -1653,13 +1701,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); } } @@ -1698,10 +1747,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); + } } } @@ -1728,14 +1779,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; @@ -2041,16 +2084,101 @@ 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.Height(); + 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"); + } + } + } + + //Set Sweep + 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.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(); + + //Validate Sapling Addresses + vector& vSweep = mapMultiArgs["-zsweepaddress"]; + vector& vSweepExclude = mapMultiArgs["-zsweepexclude"]; + 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); + pwalletMain->sweepAddress = vSweep[i]; + + 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"); + } + } + } + + 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 zsweepexclude address"); + } + auto hasSpendingKey = boost::apply_visitor(HaveSpendingKeyForPaymentAddress(pwalletMain), zSweepExcluded); + + 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) { + //Validate 1 Consolidation address only that matches the sweep address + vector& vaddresses = mapMultiArgs["-consolidatesaplingaddress"]; + 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."); + } + } + } } } @@ -2323,9 +2451,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/init.h b/src/init.h index d87c862a0..7c5b08595 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-2023 The Hush developers // Distributed under 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 70ade77fb..964448354 100644 --- a/src/key.cpp +++ b/src/key.cpp @@ -1,3 +1,4 @@ +// Copyright (c) 2016-2023 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..fe80cfc4f 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-2023 The Hush developers // Distributed under 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..78d362ab5 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-2023 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html @@ -9,7 +9,7 @@ #include #include #include