Merge branch 'dev'
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -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/
|
||||
|
||||
1
AUTHORS
1
AUTHORS
@@ -2,6 +2,7 @@
|
||||
|
||||
Duke Leto https://git.hush.is/duke https://github.com/leto
|
||||
Miodrag https://github.com/miodragpop
|
||||
jahway603 https://git.hush.is/jahway603 https://github.com/jahway603
|
||||
|
||||
# The SuperNET Developers
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The 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"]
|
||||
|
||||
28
INSTALL.md
28
INSTALL.md
@@ -25,12 +25,13 @@ sudo swapon /swapfile
|
||||
# install build dependencies
|
||||
sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib \
|
||||
autoconf libtool ncurses-dev unzip git python zlib1g-dev wget \
|
||||
bsdmainutils automake curl unzip nano libsodium-dev
|
||||
# pull
|
||||
bsdmainutils automake curl unzip nano libsodium-dev cmake
|
||||
# clone git repo
|
||||
git clone https://git.hush.is/hush/hush3
|
||||
cd hush3
|
||||
# Build
|
||||
./build.sh -j$(nproc)
|
||||
# This uses 3 build processes, you need 2GB of RAM for each.
|
||||
./build.sh -j3
|
||||
```
|
||||
|
||||
### Building On Ubuntu 16.04 and older systems
|
||||
@@ -45,6 +46,23 @@ apt-get install -y gcc-7 g++-7 && \
|
||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60
|
||||
```
|
||||
|
||||
### Build on mac
|
||||
|
||||
These instructions are a work in progress. Please report issues to https://hush.is/tg_support
|
||||
|
||||
```
|
||||
sudo port update
|
||||
sudo port upgrade outdated
|
||||
sudo port install qt5
|
||||
|
||||
# clone git repo
|
||||
git clone https://git.hush.is/hush/hush3
|
||||
cd hush3
|
||||
# Build
|
||||
# This uses 3 build processes, you need 2GB of RAM for each.
|
||||
./build.sh -j3
|
||||
```
|
||||
|
||||
## Run a HUSH Node
|
||||
|
||||
After you have compiled Hush, then you can run it with the following command:
|
||||
@@ -80,5 +98,5 @@ Currently, any ARMv7 machine will not be able to build this repo, because the
|
||||
underlying tech (zcash and the zksnark library) do not support that instruction
|
||||
set.
|
||||
|
||||
This also means that RaspberryPi devices will not work, unless they have a
|
||||
newer ARMv8-based Raspberry Pi.
|
||||
This also means that old RaspberryPi devices will not work, unless they have a
|
||||
newer ARMv8-based Raspberry Pi. Raspberry Pi 4 and newer are known to work.
|
||||
|
||||
12
Makefile.am
12
Makefile.am
@@ -1,4 +1,4 @@
|
||||
# Copyright 2016-2021 The Hush developers
|
||||
# Copyright 2016-2022 The Hush developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -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,8 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-man
|
||||
clean-local:
|
||||
rm -rf test_bitcoin.coverage/ total.coverage/
|
||||
|
||||
manpages:
|
||||
./util/gen-manpages.sh
|
||||
@echo "Please review the man pages changes to see if they look correct, then commit and push"
|
||||
|
||||
# I also heard about a bug in the UNIVAC but it's too big for this comment. -- Duke
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
set -e
|
||||
|
||||
6
build.sh
6
build.sh
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
set -eu -o pipefail
|
||||
./zcutil/build.sh --disable-tests $@
|
||||
./util/build.sh --disable-tests $@
|
||||
|
||||
42
configure.ac
42
configure.ac
@@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
|
||||
AC_PREREQ([2.60])
|
||||
define(_CLIENT_VERSION_MAJOR, 3)
|
||||
define(_CLIENT_VERSION_MINOR, 9)
|
||||
define(_CLIENT_VERSION_REVISION, 1)
|
||||
define(_CLIENT_VERSION_REVISION, 2)
|
||||
define(_CLIENT_VERSION_BUILD, 50)
|
||||
define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50)))
|
||||
define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1)))
|
||||
@@ -151,12 +151,6 @@ AC_ARG_ENABLE([glibc-back-compat],
|
||||
[use_glibc_compat=$enableval],
|
||||
[use_glibc_compat=no])
|
||||
|
||||
AC_ARG_ENABLE([zmq],
|
||||
[AS_HELP_STRING([--disable-zmq],
|
||||
[disable ZMQ notifications])],
|
||||
[use_zmq=$enableval],
|
||||
[use_zmq=yes])
|
||||
|
||||
AC_ARG_ENABLE([experimental-asm],
|
||||
[AS_HELP_STRING([--enable-experimental-asm],
|
||||
[Enable experimental assembly routines (default is no)])],
|
||||
@@ -673,15 +667,6 @@ if test x$use_pkgconfig = xyes; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$use_zmq" = "xyes"; then
|
||||
PKG_CHECK_MODULES([ZMQ],[libzmq >= 4],
|
||||
[AC_DEFINE([ENABLE_ZMQ],[1],[Define to 1 to enable ZMQ functions])],
|
||||
[AC_DEFINE([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])
|
||||
AC_MSG_WARN([libzmq version 4.x or greater not found, disabling])
|
||||
use_zmq=no])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])
|
||||
fi
|
||||
]
|
||||
)
|
||||
else
|
||||
@@ -718,28 +703,7 @@ fi
|
||||
#AC_CHECK_HEADER([gmpxx.h],,AC_MSG_ERROR(libgmpxx headers missing))
|
||||
#AC_CHECK_LIB([gmpxx],[main],GMPXX_LIBS=-lgmpxx, [AC_MSG_ERROR(libgmpxx missing)])
|
||||
|
||||
if test "x$use_zmq" = "xyes"; then
|
||||
AC_CHECK_HEADER([zmq.h],
|
||||
[AC_DEFINE([ENABLE_ZMQ],[1],[Define to 1 to enable ZMQ functions])],
|
||||
[AC_MSG_WARN([zmq.h not found, disabling zmq support])
|
||||
use_zmq=no
|
||||
AC_DEFINE([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])])
|
||||
AC_CHECK_LIB([zmq],[zmq_ctx_shutdown],ZMQ_LIBS=-lzmq,
|
||||
[AC_MSG_WARN([libzmq >= 4.0 not found, disabling zmq support])
|
||||
use_zmq=no
|
||||
AC_DEFINE([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])
|
||||
fi
|
||||
|
||||
if test "x$use_zmq" = "xyes"; then
|
||||
dnl Assume libzmq was built for static linking
|
||||
case $host in
|
||||
*mingw*)
|
||||
ZMQ_CFLAGS="$ZMQ_CFLAGS -DZMQ_STATIC"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
# These packages don't provide pkgconfig config files across all
|
||||
@@ -824,8 +788,6 @@ else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([ENABLE_ZMQ], [test "x$use_zmq" = "xyes"])
|
||||
|
||||
AC_MSG_CHECKING([whether to build test_bitcoin])
|
||||
if test x$use_tests = xyes; then
|
||||
AC_MSG_RESULT([yes])
|
||||
@@ -894,7 +856,6 @@ AC_SUBST(CRYPTO_LIBS)
|
||||
AC_SUBST(SSL_LIBS)
|
||||
AC_SUBST(EVENT_LIBS)
|
||||
AC_SUBST(EVENT_PTHREADS_LIBS)
|
||||
AC_SUBST(ZMQ_LIBS)
|
||||
AC_SUBST(GMP_LIBS)
|
||||
AC_SUBST(GMPXX_LIBS)
|
||||
AC_SUBST(LIBZCASH_LIBS)
|
||||
@@ -944,7 +905,6 @@ esac
|
||||
echo
|
||||
echo "Options used to compile and link:"
|
||||
echo " with wallet = $enable_wallet"
|
||||
echo " with zmq = $use_zmq"
|
||||
echo " with test = $use_tests"
|
||||
echo " debug enabled = $enable_debug"
|
||||
echo " werror = $enable_werror"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
#!/usr/bin/env perl
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
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;
|
||||
|
||||
@@ -11,6 +11,6 @@ Vcs-Git: https://git.hush.is/hush/hush3.git
|
||||
Vcs-Browser: https://git.hush.is/hush/hush3
|
||||
|
||||
Package: hush
|
||||
Architecture: amd64
|
||||
Architecture: amd64 arm64
|
||||
Depends: ${shlibs:Depends}
|
||||
Description: Hush cryptocoin full node. Speak And Transact Freely. Hush inherits from Bitcoin Protocol and Zcash Protocol and is focused on private communications.
|
||||
|
||||
@@ -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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
||||
|
||||
@@ -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/
|
||||
@@ -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"
|
||||
25
contrib/fresh_clone_compile_and_run.sh
Normal file → Executable file
25
contrib/fresh_clone_compile_and_run.sh
Normal file → Executable file
@@ -1,19 +1,28 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
# 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
|
||||
|
||||
17
contrib/gen-zaddrs.pl
Executable file
17
contrib/gen-zaddrs.pl
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env perl
|
||||
# Copyright 2019-2022 The Hush developers
|
||||
# Released under the GPLv3
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
my $hush = "./src/hush-cli";
|
||||
my $znew = "$hush z_getnewaddress";
|
||||
my $count = 1;
|
||||
my $howmany = shift || 50;
|
||||
|
||||
while ($count < $howmany) {
|
||||
my $zaddr = qx{$znew};
|
||||
chomp($zaddr);
|
||||
print qq{$zaddr\n};
|
||||
$count++;
|
||||
}
|
||||
@@ -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}
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env perl
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Released under the GPLv3
|
||||
|
||||
use strict;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env perl
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
use strict;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env perl
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Released under the GPLv3
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# hushd The hush core server.
|
||||
#
|
||||
|
||||
44
contrib/sdl_checkpoints.pl
Executable file
44
contrib/sdl_checkpoints.pl
Executable file
@@ -0,0 +1,44 @@
|
||||
#!/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 data used by the silentdragonlite-cli checkpoints.rs file
|
||||
# https://git.hush.is/hush/silentdragonlite-cli/src/branch/master/lib/src/lightclient/checkpoints.rs#L24
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
my $hush = "./src/hush-cli";
|
||||
my $gethash = "$hush getblockhash";
|
||||
my $gettree = "$hush getblockmerkletree";
|
||||
my $start = shift || 300000;
|
||||
my $end = shift || 840000;
|
||||
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 $merkle = qx{$gettree $block};
|
||||
chomp $merkle;
|
||||
chomp $blockhash;
|
||||
print qq{($block,"$blockhash",\n\t"$merkle"\n),\n};
|
||||
|
||||
$block += $stride;
|
||||
}
|
||||
@@ -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..."
|
||||
|
||||
@@ -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..."
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
INPUT=$(</dev/stdin)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
if ! [[ "$2" =~ [git@]?[www.]?hush.is[:|/]bitcoin/bitcoin[.git]? ]]; then
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
### This script attempts to download the signature file SHA256SUMS.asc from bitcoin.org
|
||||
### It first checks if the signature passes, and then downloads the files specified in
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2014-2016 The Bitcoin Core developers
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
import array
|
||||
import binascii
|
||||
import zmq
|
||||
import struct
|
||||
|
||||
port = 28332
|
||||
|
||||
zmqContext = zmq.Context()
|
||||
zmqSubSocket = zmqContext.socket(zmq.SUB)
|
||||
zmqSubSocket.setsockopt(zmq.SUBSCRIBE, "hashblock")
|
||||
zmqSubSocket.setsockopt(zmq.SUBSCRIBE, "hashtx")
|
||||
zmqSubSocket.setsockopt(zmq.SUBSCRIBE, "rawblock")
|
||||
zmqSubSocket.setsockopt(zmq.SUBSCRIBE, "rawtx")
|
||||
zmqSubSocket.connect("tcp://127.0.0.1:%i" % port)
|
||||
|
||||
try:
|
||||
while True:
|
||||
msg = zmqSubSocket.recv_multipart()
|
||||
topic = str(msg[0])
|
||||
body = msg[1]
|
||||
sequence = "Unknown";
|
||||
if len(msg[-1]) == 4:
|
||||
msgSequence = struct.unpack('<I', msg[-1])[-1]
|
||||
sequence = str(msgSequence)
|
||||
if topic == "hashblock":
|
||||
print '- HASH BLOCK ('+sequence+') -'
|
||||
print binascii.hexlify(body)
|
||||
elif topic == "hashtx":
|
||||
print '- HASH TX ('+sequence+') -'
|
||||
print binascii.hexlify(body)
|
||||
elif topic == "rawblock":
|
||||
print '- RAW BLOCK HEADER ('+sequence+') -'
|
||||
print binascii.hexlify(body[:80])
|
||||
elif topic == "rawtx":
|
||||
print '- RAW TX ('+sequence+') -'
|
||||
print binascii.hexlify(body)
|
||||
|
||||
except KeyboardInterrupt:
|
||||
zmqContext.destroy()
|
||||
@@ -39,6 +39,7 @@ build_vendor=$(word 2,$(subst -, ,$(build)))
|
||||
full_build_os:=$(subst $(build_arch)-$(build_vendor)-,,$(build))
|
||||
build_os:=$(findstring linux,$(full_build_os))
|
||||
build_os+=$(findstring darwin,$(full_build_os))
|
||||
build_os+=$(findstring freebsd,$(full_build_os))
|
||||
build_os:=$(strip $(build_os))
|
||||
ifeq ($(build_os),)
|
||||
build_os=$(full_build_os)
|
||||
@@ -49,6 +50,7 @@ host_vendor=$(word 2,$(subst -, ,$(canonical_host)))
|
||||
full_host_os:=$(subst $(host_arch)-$(host_vendor)-,,$(canonical_host))
|
||||
host_os:=$(findstring linux,$(full_host_os))
|
||||
host_os+=$(findstring darwin,$(full_host_os))
|
||||
host_os+=$(findstring freebsd,$(full_host_os))
|
||||
host_os+=$(findstring mingw32,$(full_host_os))
|
||||
host_os:=$(strip $(host_os))
|
||||
ifeq ($(host_os),)
|
||||
|
||||
4
depends/builders/freebsd.mk
Normal file
4
depends/builders/freebsd.mk
Normal file
@@ -0,0 +1,4 @@
|
||||
build_freebsd_CC = clang
|
||||
build_freebsd_CXX = clang++
|
||||
build_freebsd_SHA256SUM = shasum -a 256
|
||||
build_freebsd_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
define int_vars
|
||||
|
||||
31
depends/hosts/freebsd.mk
Normal file
31
depends/hosts/freebsd.mk
Normal file
@@ -0,0 +1,31 @@
|
||||
freebsd_CFLAGS=-pipe
|
||||
freebsd_CXXFLAGS=$(freebsd_CFLAGS)
|
||||
|
||||
freebsd_release_CFLAGS=-O1
|
||||
freebsd_release_CXXFLAGS=$(freebsd_release_CFLAGS)
|
||||
|
||||
freebsd_debug_CFLAGS=-O1
|
||||
freebsd_debug_CXXFLAGS=$(freebsd_debug_CFLAGS)
|
||||
|
||||
freebsd_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
|
||||
|
||||
ifeq (86,$(findstring 86,$(build_arch)))
|
||||
i686_freebsd_CC=gcc -m32
|
||||
i686_freebsd_CXX=g++ -m32
|
||||
i686_freebsd_AR=ar
|
||||
i686_freebsd_RANLIB=ranlib
|
||||
i686_freebsd_NM=nm
|
||||
i686_freebsd_STRIP=strip
|
||||
|
||||
x86_64_freebsd_CC=gcc -m64
|
||||
x86_64_freebsd_CXX=g++ -m64
|
||||
x86_64_freebsd_AR=ar
|
||||
x86_64_freebsd_RANLIB=ranlib
|
||||
x86_64_freebsd_NM=nm
|
||||
x86_64_freebsd_STRIP=strip
|
||||
else
|
||||
i686_freebsd_CC=$(default_host_CC) -m32
|
||||
i686_freebsd_CXX=$(default_host_CXX) -m32
|
||||
x86_64_freebsd_CC=$(default_host_CC) -m64
|
||||
x86_64_freebsd_CXX=$(default_host_CXX) -m64
|
||||
endif
|
||||
@@ -1,7 +1,7 @@
|
||||
package=boost
|
||||
|
||||
$(package)_version=1_72_0
|
||||
$(package)_download_path=https://github.com/MyHush/boost/releases/download/v1.72.0/
|
||||
$(package)_download_path=https://boostorg.jfrog.io/artifactory/main/release/$(subst _,.,$($(package)_version))/source/
|
||||
$(package)_sha256_hash=59c9b274bc451cf91a9ba1dd2c7fdcaf5d60b1b3aa83f2c9fa143417cc660722
|
||||
$(package)_file_name=$(package)_$($(package)_version).tar.bz2
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ $(package)_dependencies=
|
||||
$(package)_config_opts=--enable-cxx --disable-shared
|
||||
else
|
||||
$(package)_version=6.1.1
|
||||
$(package)_download_path=https://github.com/MyHush/libgmp/releases/download/v6.1.1
|
||||
$(package)_download_path=https://ftp.gnu.org/gnu/gmp
|
||||
$(package)_file_name=gmp-$($(package)_version).tar.bz2
|
||||
$(package)_sha256_hash=a8109865f2893f1373b0a8ed5ff7429de8db696fc451b1036bd7bdf95bbeffd6
|
||||
$(package)_dependencies=
|
||||
|
||||
@@ -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=
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -3,10 +3,5 @@ rpcpassword=dontuseweakpasswordoryougetrobbed
|
||||
txindex=1
|
||||
server=1
|
||||
rpcworkqueue=64
|
||||
addnode=5.9.102.210
|
||||
addnode=78.47.196.146
|
||||
addnode=178.63.69.164
|
||||
addnode=88.198.65.74
|
||||
addnode=5.9.122.241
|
||||
addnode=144.76.94.38
|
||||
addnode=89.248.166.91
|
||||
addnode=1.2.3.4
|
||||
addnode=5.6.7.8
|
||||
|
||||
59
doc/config.md
Normal file
59
doc/config.md
Normal file
@@ -0,0 +1,59 @@
|
||||
# HUSH3.conf config options
|
||||
|
||||
This document explains all options that can be used in HUSH3.conf
|
||||
|
||||
# Basics
|
||||
|
||||
Options can either be put in HUSH3.conf or given on the `hushd` commandline when starting. If you think you will want to continually use a feature, it's better to put it in HUSH3.conf. If you don't, and start `hushd` without an option on accident, it can cause downtime from a long rescan, that you didn't want to do anyway.
|
||||
|
||||
|
||||
## Common Options
|
||||
|
||||
## addnode=1.2.3.4
|
||||
|
||||
Tells your node to connect to another node, by IP address or hostname.
|
||||
|
||||
## consolidation=1
|
||||
|
||||
Defaults to 0 in CLI hushd, defaults to 1 in SilentDragon. This option consolidates 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.
|
||||
|
||||
## rescan=1
|
||||
|
||||
Defaults to 0. Performs a full rescan of all of chain history. Can take a very long time. Speed this up with `rescanheight=123` to only rescan from a certain block height. Also speed this up with `keepnotewitnesscache=1` to not rebuild the zaddr witness cache.
|
||||
|
||||
## rpcuser=hushpuppy
|
||||
|
||||
No default. This option sets the RPC username and should only be used in HUSH3.conf, because setting it from the command-line makes it show up in `ps` output.
|
||||
|
||||
## rpcpassword=TOOMANYSECRETS
|
||||
|
||||
No default. This option sets the RPC password and should only be used in HUSH3.conf, because setting it from the command-line makes it show up in `ps` output.
|
||||
|
||||
## txindex=1
|
||||
|
||||
Defaults to 1. This is a default option that should not be changed or things will not work correctly.
|
||||
|
||||
## zindex=1
|
||||
|
||||
Defaults to 0. This option enables the "shielded index" which also calculates the "anonset" (anonymity set) also known as the "shielded pool". This data is avaailable in the getchaintxstats RPC, if zindex is enabled. Enabling this feature requires a full rescan or full sync from scratch, which is not done by default. If you don't do one of those things, your zindex stats will be incorrect.
|
||||
|
||||
# Mining options
|
||||
|
||||
These options are only of interest to solo miners and mining pool operators....
|
||||
|
||||
# Other options
|
||||
|
||||
These options are not commonly used and likely on for advanced users and/or developers...
|
||||
|
||||
## addressindex=1
|
||||
|
||||
Defaults to 0 in hushd, defaults to 1 in some GUI wallets. Maintain a full address index, used to query for the balance, txids and unspent outputs for addresses
|
||||
|
||||
## timestampindex=1
|
||||
|
||||
Defaults to 0 in hushd, defaults to 1 in some GUI wallets. Maintain a timestamp index for block hashes, used to query blocks hashes by a range of timestamps
|
||||
|
||||
## spentindex=1
|
||||
|
||||
Defaults to 0 in hushd, defaults to 1 in some GUI wallets. Maintain a full spent index, used to query the spending txid and input index for an outpoint
|
||||
@@ -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
|
||||
|
||||
@@ -12,5 +12,6 @@
|
||||
* fee_estimates.dat: stores statistics used to estimate minimum transaction fees and priorities required for confirmation
|
||||
* peers.dat: peer IP address database (custom format)
|
||||
* wallet.dat: personal wallet (BDB) with keys and transactions
|
||||
* zindex.dat: Optional file that stores anonset (shielded pool) stats. Only created if `zindex=1` in HUSH3.conf or `hushd -zindex` is used
|
||||
* .cookie: session RPC authentication cookie (written at start when cookie authentication is used, deleted on shutdown): since 0.12.0
|
||||
* onion_private_key: cached Tor hidden service private key for `-listenonion`: since 0.12.0
|
||||
|
||||
24
doc/hsc.md
Normal file
24
doc/hsc.md
Normal file
@@ -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
|
||||
@@ -1,9 +1,9 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
|
||||
.TH HUSH-CLI "1" "January 2022" "hush-cli v3.9.1" "User Commands"
|
||||
.TH HUSH-CLI "1" "September 2022" "hush-cli v3.9.2" "User Commands"
|
||||
.SH NAME
|
||||
hush-cli \- manual page for hush-cli v3.9.1
|
||||
hush-cli \- manual page for hush-cli v3.9.2
|
||||
.SH DESCRIPTION
|
||||
Hush RPC client version v3.9.1\-804a4abbe\-dirty
|
||||
Hush RPC client version v3.9.2\-54cfe1099
|
||||
.PP
|
||||
In order to ensure you are adequately protecting your privacy when using Hush,
|
||||
please see <https://hush.is/security/>.
|
||||
@@ -29,7 +29,7 @@ Specify configuration file (default: HUSH3.conf)
|
||||
.HP
|
||||
\fB\-datadir=\fR<dir>
|
||||
.IP
|
||||
Specify data directory
|
||||
Specify data directory (this path cannot use '~')
|
||||
.HP
|
||||
\fB\-testnet\fR
|
||||
.IP
|
||||
@@ -75,7 +75,7 @@ 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 <https://hush.is/security/>.
|
||||
|
||||
Copyright (C) 2016-2021 Duke Leto and The Hush Developers
|
||||
Copyright (C) 2016-2022 Duke Leto and The Hush Developers
|
||||
Copyright (C) 2016-2020 jl777 and SuperNET developers
|
||||
Copyright (C) 2016-2018 The Zcash developers
|
||||
Copyright (C) 2009-2014 The Bitcoin Core developers
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
|
||||
.TH HUSH-TX "1" "January 2022" "hush-tx v3.9.1" "User Commands"
|
||||
.TH HUSH-TX "1" "September 2022" "hush-tx v3.9.2" "User Commands"
|
||||
.SH NAME
|
||||
hush-tx \- manual page for hush-tx v3.9.1
|
||||
hush-tx \- manual page for hush-tx v3.9.2
|
||||
.SH DESCRIPTION
|
||||
hush\-tx utility version v3.9.1\-804a4abbe\-dirty
|
||||
hush\-tx utility version v3.9.2\-54cfe1099
|
||||
.SS "Usage:"
|
||||
.TP
|
||||
hush\-tx [options] <hex\-tx> [commands]
|
||||
@@ -88,7 +88,7 @@ Set register NAME to given JSON\-STRING
|
||||
In order to ensure you are adequately protecting your privacy when using Hush,
|
||||
please see <https://hush.is/security/>.
|
||||
|
||||
Copyright (C) 2016-2021 Duke Leto and The Hush Developers
|
||||
Copyright (C) 2016-2022 Duke Leto and The Hush Developers
|
||||
Copyright (C) 2016-2020 jl777 and SuperNET developers
|
||||
Copyright (C) 2016-2018 The Zcash developers
|
||||
Copyright (C) 2009-2014 The Bitcoin Core developers
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
|
||||
.TH HUSHD "1" "January 2022" "hushd v3.9.1" "User Commands"
|
||||
.TH HUSHD "1" "September 2022" "hushd v3.9.2" "User Commands"
|
||||
.SH NAME
|
||||
hushd \- manual page for hushd v3.9.1
|
||||
hushd \- manual page for hushd v3.9.2
|
||||
.SH DESCRIPTION
|
||||
Hush Daemon version v3.9.1\-804a4abbe\-dirty
|
||||
Hush Daemon version v3.9.2\-54cfe1099
|
||||
.PP
|
||||
In order to ensure you are adequately protecting your privacy when using Hush,
|
||||
please see <https://hush.is/security/>.
|
||||
@@ -49,7 +49,7 @@ Run in the background as a daemon and accept commands
|
||||
.HP
|
||||
\fB\-datadir=\fR<dir>
|
||||
.IP
|
||||
Specify data directory
|
||||
Specify data directory (this path cannot use '~')
|
||||
.HP
|
||||
\fB\-exportdir=\fR<dir>
|
||||
.IP
|
||||
@@ -314,6 +314,35 @@ Specify Sapling Address to Consolidate. (default: all)
|
||||
Fee amount in Puposhis used send consolidation transactions. (default
|
||||
10000)
|
||||
.HP
|
||||
\fB\-zsweep\fR
|
||||
.IP
|
||||
Enable zaddr sweeping, automatically move all shielded funds to a one
|
||||
address once per X blocks
|
||||
.HP
|
||||
\fB\-zsweepaddress=\fR<zaddr>
|
||||
.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
|
||||
@@ -414,24 +443,6 @@ Delete all wallet transactions and only recover those parts of the
|
||||
blockchain through \fB\-rescan\fR on startup (1 = keep tx meta data e.g.
|
||||
account owner and payment request information, 2 = drop tx meta data)
|
||||
.PP
|
||||
ZeroMQ notification options:
|
||||
.HP
|
||||
\fB\-zmqpubhashblock=\fR<address>
|
||||
.IP
|
||||
Enable publish hash block in <address>
|
||||
.HP
|
||||
\fB\-zmqpubhashtx=\fR<address>
|
||||
.IP
|
||||
Enable publish hash transaction in <address>
|
||||
.HP
|
||||
\fB\-zmqpubrawblock=\fR<address>
|
||||
.IP
|
||||
Enable publish raw block in <address>
|
||||
.HP
|
||||
\fB\-zmqpubrawtx=\fR<address>
|
||||
.IP
|
||||
Enable publish raw transaction in <address>
|
||||
.PP
|
||||
Debugging/Testing options:
|
||||
.HP
|
||||
\fB\-debug=\fR<category>
|
||||
@@ -440,8 +451,8 @@ Output debugging information (default: 0, supplying <category> is
|
||||
optional). If <category> is not supplied or if <category> = 1, output
|
||||
all debugging information. <category> can be: addrman, alert, bench,
|
||||
coindb, db, deletetx, estimatefee, http, libevent, lock, mempool, net,
|
||||
tls, partitioncheck, pow, proxy, prune, rand, reindex, rpc, selectcoins,
|
||||
stratum, tor, zmq, zrpc, zrpcunsafe (implies zrpc).
|
||||
tls, partitioncheck, pow, proxy, prune, rand, randomx, reindex, rpc,
|
||||
selectcoins, stratum, tor, zrpc, zrpcunsafe (implies zrpc).
|
||||
.HP
|
||||
\fB\-experimentalfeatures\fR
|
||||
.IP
|
||||
@@ -614,7 +625,8 @@ Hush Smart Chain options:
|
||||
.HP
|
||||
\fB\-ac_algo\fR
|
||||
.IP
|
||||
Choose PoW mining algorithm, default is Equihash (200,9)
|
||||
Choose PoW mining algorithm, either 'equihash' or 'randomx'. default is
|
||||
Equihash (200,9)
|
||||
.HP
|
||||
\fB\-ac_blocktime\fR
|
||||
.IP
|
||||
@@ -712,7 +724,7 @@ Enforce transaction\-rate limit, default 0
|
||||
In order to ensure you are adequately protecting your privacy when using Hush,
|
||||
please see <https://hush.is/security/>.
|
||||
|
||||
Copyright (C) 2016-2021 Duke Leto and The Hush Developers
|
||||
Copyright (C) 2016-2022 Duke Leto and The Hush Developers
|
||||
Copyright (C) 2016-2020 jl777 and SuperNET developers
|
||||
Copyright (C) 2016-2018 The Zcash developers
|
||||
Copyright (C) 2009-2014 The Bitcoin Core developers
|
||||
|
||||
104
doc/randomx.md
Normal file
104
doc/randomx.md
Normal file
@@ -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.
|
||||
|
||||
@@ -1,17 +1,51 @@
|
||||
# Hush Release Process
|
||||
|
||||
## Pre-release
|
||||
## High-Level Philosophy
|
||||
|
||||
Beware of making high-risk changes (such as consensus changes, p2p layer changes and wallet/transaction changes) too close to a new release, because they will not get as much testing as they should. Don't merge large branches which haven't undergone lots of testing just before a release.
|
||||
|
||||
## Check for changes on master that should be on dev
|
||||
|
||||
Often there are trivial changes made directly on master, such as documentation changes. In theory, no code changes should happen on master without being on dev first, but it's better to be safe than sorry. We want the dev branch which undergoes testing to be as close as possible to what the master branch will become, so we don't want to merge dev into master and just assume everything works. So it's best to merge the master branch into dev just before merging the dev branch into master.
|
||||
|
||||
To check if the master branch has any changes that the dev branch does not:
|
||||
|
||||
```
|
||||
# this assumes you are working with https://git.hush.is/hush/hush3 as your remote
|
||||
git checkout dev
|
||||
git pull # make sure dev is up to date
|
||||
git checkout master
|
||||
git pull # make sure master is up to date
|
||||
git diff dev...master # look at the set of changes which exist in master but not dev
|
||||
```
|
||||
|
||||
If the last command has no output, congrats, there is nothing to do. If the last command has output, then you should merge master into dev:
|
||||
|
||||
```
|
||||
git checkout dev
|
||||
git merge --no-ff master # using the default commit message is fine
|
||||
git push
|
||||
```
|
||||
|
||||
The `--no-ff` flag above makes sure to make a merge commit, no matter what, even if a "fast forward" could be done. For those in the future looking back, it's much better to see evidence of when branches were merged.
|
||||
|
||||
|
||||
### Git Issues
|
||||
|
||||
Look for Git issues that should be fixed in the next release.
|
||||
Look for Git issues that should be fixed in the next release. Especially low-risk and simple things, like documentation changes, improvements to error messages and RPC help output.
|
||||
|
||||
### Pre-release checklist:
|
||||
* Is this release changing consensus rules?
|
||||
* 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
|
||||
* 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
|
||||
|
||||
@@ -21,4 +55,51 @@ Install deps on Linux:
|
||||
|
||||
## Release process
|
||||
|
||||
...
|
||||
- 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 data, let's call it HEIGHT
|
||||
- Run `./util/checkpoints.pl 1000 HEIGHT &> checkpoints.txt` to generate the latest checkpoint data
|
||||
- To copy the new data from checkpoints.txt into the file, one way in Vim is to type ":r checkpoints.txt" which will read in a file and paste it as the current cursor
|
||||
- You will see 3 lines of "stats" at the end of the output, you just pasted in the newest stats. Delete the old stats that should be the 3 lines under the current stats
|
||||
- The script generates a comment "Generated at ...", that should be moved to the very beginning of the checkpoint data
|
||||
- Make sure the new code compiles, commit and push
|
||||
- Run `./util/checkpoints.pl help` to see some basic help
|
||||
- By default it will generate checkpoints for every 1000 blocks, the "stride"
|
||||
- You can get a different "stride" by passing it in as the first arg to the script
|
||||
- To get checkpoint data for every 5000 blocks: `./util/checkpoints.pl 5000 &> checkpoints.txt`
|
||||
- Currently checkpoints from before block 340k are given for every 5k blocks to keep the data smaller
|
||||
- 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) with util/replace.pl
|
||||
- Update doc/relnotes/README.md
|
||||
- To get the stats of file changes: `git diff --stat master...dev`
|
||||
- Do a fresh clone and fresh sync with new checkpoints
|
||||
- Stop node, wait 20 minutes, and then do a partial sync with new checkpoints
|
||||
- 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)
|
||||
- Use util/gen-linux-binary-release.sh to make a Linux release binary
|
||||
- Use util/build-debian-package.sh to make an x86 Debian package for the release
|
||||
- Debian packages should be done after you make manpages, because those are included in Debian packages
|
||||
- Use util/build-debian-package-ARM.sh (does this still work?) to make an ARM Debian package for the release
|
||||
- Upload the debian packages to the Gitea release page, with SHA256 sums
|
||||
|
||||
|
||||
@@ -10,6 +10,45 @@ and no longer on Github, since they banned Duke Leto and
|
||||
also because they censor many people around the world and work with
|
||||
evil organizations.
|
||||
|
||||
# Hush 3.9.2 "Anecdotal Axolotl"
|
||||
|
||||
```
|
||||
966 files changed, 26999 insertions(+), 2758 deletions(-)
|
||||
```
|
||||
|
||||
This is an OPTIONAL release. It is recommended for exchanges, solo miners and mining pools to update to this release
|
||||
since it contains various bugfixes and improvements that will benefit busy wallets.
|
||||
|
||||
* This release adds RandomX support in Hush Smart Chains (HSCs)
|
||||
* When creating a new HSC specify `-ac_algo=randomx` to use RandomX instead of Equihash
|
||||
* Example: `hush-smart-chain -ac_name=RANDX -ac_algo=randomx ...`
|
||||
* This allows HSCs to be mined with CPUs instead of ASICs
|
||||
* Because of RandomX, `cmake` is a new dependency needed to compile Hush from source
|
||||
* More detailed documentation available at 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
|
||||
|
||||
107
doc/zmq.md
107
doc/zmq.md
@@ -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.
|
||||
76
doc/zsweep-consolidation.md
Normal file
76
doc/zsweep-consolidation.md
Normal file
@@ -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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/bash
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
#!/usr/usr/bin/env bash
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
# This script makes the neccesary transactions to migrate
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Copyright (c) 2017 The Zcash developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Execute all of the automated tests related to Hush
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
# Execute all of the automated tests related to Hush
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
set -e -o pipefail
|
||||
|
||||
CURDIR=$(cd $(dirname "$0"); pwd)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2016-2022 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}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Released under the GPLv3
|
||||
|
||||
# This is a thin wrapper around bitcoin-cli that strips the Windows-style EOLs
|
||||
|
||||
@@ -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-2022 The Hush developers
|
||||
# Released under the GPLv3
|
||||
#
|
||||
HUSH_LOAD_TIMEOUT=500
|
||||
|
||||
@@ -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-2022 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}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Copyright (c) 2018 SuperNET developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2014-2015 The Bitcoin Core developers
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
# Test addressindex generation and fetching
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Distributed under the GPLv3/X11 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Copyright (c) 2014 The Bitcoin Core developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Copyright (c) 2018 SuperNET developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Copyright (c) 2018 SuperNET developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Copyright (c) 2018 SuperNET developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Copyright (c) 2018 SuperNET developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Copyright (c) 2018 SuperNET developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Copyright (c) 2018 SuperNET developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Copyright (c) 2018 SuperNET developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Copyright (c) 2018 SuperNET developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Copyright (c) 2018 SuperNET developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Copyright (c) 2015 The Bitcoin Core developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Copyright (c) 2014 The Bitcoin Core developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Copyright (c) 2019 Duke Leto who wrote "The SuperNET developers" while never agreeing to the developer agreement nor being listed in AUTHORS
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2017 The Bitcoin Core developers
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
"""Test wallet file location."""
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Copyright (c) 2018 The Zcash developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Copyright (c) 2014 The Bitcoin Core developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Copyright (c) 2014 The Bitcoin Core developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Copyright (c) 2016 The Zcash developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Copyright (c) 2014 The Bitcoin Core developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Copyright (c) 2014 The Bitcoin Core developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Copyright (c) 2014 The Bitcoin Core developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
|
||||
#
|
||||
# Test hard fork detection
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Copyright (c) 2014 The Bitcoin Core developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Copyright (c) 2014 The Bitcoin Core developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
#
|
||||
# Distributed under the GPLv3/X11 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Copyright (c) 2019 Bartlomiej Lisiecki
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Copyright (c) 2017 The Zcash developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user