Merge branch 'dev' into wolfssl
This commit is contained in:
16
.gitignore
vendored
16
.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/
|
||||
@@ -109,14 +108,15 @@ contrib/debian/files
|
||||
contrib/debian/substvars
|
||||
|
||||
src/rpcmisc~.cpp
|
||||
src/komodo-cli
|
||||
src/komodod
|
||||
src/komodo-tx
|
||||
src/komodo-test
|
||||
src/wallet-utility
|
||||
src/komodo-cli.exe
|
||||
src/komodod.exe
|
||||
src/komodo-tx.exe
|
||||
|
||||
src/hush-cli
|
||||
src/hushd
|
||||
src/hush-tx
|
||||
src/hush-test
|
||||
src/hush-cli.exe
|
||||
src/hushd.exe
|
||||
src/hush-tx.exe
|
||||
|
||||
#output during builds, symbol tables?
|
||||
*.dSYM
|
||||
|
||||
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://codeberg.org/jahway603 https://github.com/jahway603
|
||||
|
||||
# The SuperNET Developers
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ There are many ways you can directly contribute to Hush:
|
||||
* Extend our software
|
||||
* Perform a secure code review of Hush Full Node and other Hush-related software
|
||||
|
||||
We have a curated list of projects with details about difficulty level and languages involved: https://git.hush.is/hush/projects
|
||||
|
||||
Interested in making a contribution? Read on!
|
||||
|
||||
## Ground rules & expectations
|
||||
@@ -35,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.
|
||||
@@ -47,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.
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ Divide how many GBs of RAM you have by 2, subtract one. Use that many jobs.
|
||||
|
||||
## Dealing with dependency changes
|
||||
|
||||
Let's say you change a dependency and want the compile the notice. If your
|
||||
Let's say you change a dependency and want the compile to notice. If your
|
||||
change is outside of the main Hush source code, in ./src, simply running
|
||||
`make` will not notice, and sometimes not even `build.sh`. You can always
|
||||
do a fresh clone or `make clean`, but that will take a lot of time. Those
|
||||
@@ -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-2020 The Hush developers
|
||||
# Copyright (c) 2016-2023 The 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
|
||||
@@ -22,12 +22,11 @@ RUN cd /hush && \
|
||||
./configure --with-incompatible-bdb --with-gui || true && \
|
||||
./build.sh -j$(nproc)
|
||||
|
||||
RUN ln -sf /hush/src/komodod /usr/bin/komodod && \
|
||||
ln -sf /hush/src/hushd /usr/bin/hushd && \
|
||||
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"]
|
||||
|
||||
11
INSTALL-BIN.md
Normal file
11
INSTALL-BIN.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Installing Hush binaries
|
||||
|
||||
1. First [download the release](https://git.hush.is/hush/hush3/releases) you want to install. It will have a .deb file extension.
|
||||
|
||||
1. Next install the Debian package (change the version to what you downloaded above):
|
||||
|
||||
`dpkg -i hush-3.8.0-amd64.deb`
|
||||
|
||||
1. If you want to remove it, then run this to uninstall:
|
||||
|
||||
`apt-get remove hush`
|
||||
53
INSTALL.md
53
INSTALL.md
@@ -1,14 +1,6 @@
|
||||
# Installing Hush
|
||||
|
||||
## Installing Binaries
|
||||
|
||||
To install a Debian package:
|
||||
|
||||
dpkg -i hush-3.6.2-amd4.deb
|
||||
|
||||
To uninstall:
|
||||
|
||||
apt-get remove hush
|
||||
Instructions to compile Hush yourself.
|
||||
|
||||
## Build HUSH dependencies
|
||||
|
||||
@@ -29,20 +21,20 @@ sudo swapon /swapfile
|
||||
|
||||
## Build on Linux:
|
||||
|
||||
|
||||
```sh
|
||||
# install build depedencies
|
||||
# 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
|
||||
autoconf libtool ncurses-dev unzip git zlib1g-dev wget \
|
||||
bsdmainutils automake curl unzip nano libsodium-dev cmake
|
||||
# clone git repo
|
||||
git clone https://git.hush.is/hush/hush3
|
||||
cd hush3
|
||||
# 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
|
||||
### Building On Ubuntu 16.04 and older systems
|
||||
|
||||
Some older compilers may not be able to compile modern code, such as gcc 5.4 which comes with Ubuntu 16.04 by default. Here is how to install gcc 7 on Ubuntu 16.04. Run these commands as root:
|
||||
|
||||
@@ -54,8 +46,27 @@ 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:
|
||||
|
||||
```sh
|
||||
./src/hushd
|
||||
```
|
||||
@@ -81,15 +92,11 @@ cd hush
|
||||
./src/hushd
|
||||
```
|
||||
|
||||
Currently Linux, Windows and Mac OS X are our supported platforms. If you
|
||||
are interested in porting Hush to a new operating system, we are interested
|
||||
to talk with you. Experimental FreeBSD support is in progress, thanks to radix42.
|
||||
|
||||
We aim to support all platforms, but there is only so much time in the day.
|
||||
## ARM Architecture
|
||||
|
||||
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.
|
||||
|
||||
@@ -38,7 +38,7 @@ Run `hushd --version` to find out
|
||||
|
||||
### Any extra information that might be useful in the debugging process.
|
||||
|
||||
This includes the relevant contents of `~/.komodo/HUSH3/debug.log`. You can paste raw text, attach the file directly in the issue or link to the text via a pastebin type site.
|
||||
This includes the relevant contents of `~/.hush/HUSH3/debug.log` or `~/.komodo/HUSH3/debug.log` if you have a legacy install. You can paste raw text, attach the file directly in the issue or link to the text via a pastebin type site.
|
||||
Please also include any non-standard things you did during compilation (extra flags, dependency version changes etc.) if applicable.
|
||||
|
||||
Beware that usernames and IP addresses and other metadata is definitely in this log file!
|
||||
|
||||
21
Makefile.am
21
Makefile.am
@@ -1,3 +1,7 @@
|
||||
# Copyright 2016-2023 The Hush developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
ACLOCAL_AMFLAGS = -I build-aux/m4
|
||||
SUBDIRS = src
|
||||
if ENABLE_MAN
|
||||
@@ -13,15 +17,15 @@ pkgconfig_DATA = libzcashconsensus.pc
|
||||
endif
|
||||
|
||||
|
||||
BITCOIND_BIN=$(top_builddir)/src/komodod$(EXEEXT)
|
||||
BITCOIN_CLI_BIN=$(top_builddir)/src/komodo-cli$(EXEEXT)
|
||||
BITCOIND_BIN=$(top_builddir)/src/hushd$(EXEEXT)
|
||||
BITCOIN_CLI_BIN=$(top_builddir)/src/hush-cli$(EXEEXT)
|
||||
#WALLET_UTILITY_BIN=$(top_builddir)/src/wallet-utility$(EXEEXT)
|
||||
BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT)
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
||||
@@ -229,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)
|
||||
|
||||
@@ -243,4 +247,11 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-man
|
||||
clean-local:
|
||||
rm -rf test_bitcoin.coverage/ total.coverage/
|
||||
|
||||
seeds:
|
||||
./contrib/seeds/generate-seeds.py contrib/seeds > src/chainparamsseeds.h
|
||||
|
||||
manpages:
|
||||
./util/gen-manpages.sh
|
||||
@echo "Please review the man pages changes to see if they look correct, then commit and push"
|
||||
|
||||
# I also heard about a bug in the UNIVAC but it's too big for this comment. -- Duke
|
||||
|
||||
@@ -24,11 +24,14 @@ or this command line tool: https://git.hush.is/hush/hush3/src/master/contrib/con
|
||||
|
||||
### Using an old wallet.dat
|
||||
|
||||
Backup your old HUSH wallet.dat, and backup any current wallet.dat that is in your
|
||||
Backup your old HUSH wallet.dat, and backup any current wallet.dat that is in
|
||||
|
||||
~/.komodo/HUSH3/
|
||||
|
||||
directory. There is no way to lose funds, as long as you have backups!!! Make sure
|
||||
OR
|
||||
~/.hush/HUSH3/
|
||||
|
||||
There is no way to lose funds, as long as you have backups!!! Make sure
|
||||
to make backups. Do not skip this step.
|
||||
|
||||
Make sure any/all GUI wallets are stopped! Also make sure your old Hush node
|
||||
@@ -42,12 +45,12 @@ corrupt your wallet!
|
||||
|
||||
Now copy your old Hush wallet.dat to
|
||||
|
||||
~/.komodo/HUSH3/
|
||||
~/.hush/HUSH3/
|
||||
|
||||
with a command like
|
||||
|
||||
# DO NOT RUN THIS WITHOUT MAKING BACKUPS!
|
||||
cp ~/.hush/wallet.dat ~/.komodo/HUSH3/
|
||||
cp ~/.hush/wallet.dat ~/.hush/HUSH3/
|
||||
|
||||
The reason this works is that both old HUSH and new HUSH are still Bitcoin Protocol
|
||||
coins, which both use secp256k1 public keys. Now start your HUSH3 node again,
|
||||
@@ -66,6 +69,3 @@ NOTE: Do not use this wallet except to send funds to a new wallet!
|
||||
### Private Keys
|
||||
|
||||
You can also transport funds one address at a time via private keys.
|
||||
|
||||
Agama Desktop Wallet WIF-to-WIF Tool can convert between old HUSH and new HUSH3
|
||||
private keys.
|
||||
27
README.md
27
README.md
@@ -22,7 +22,7 @@ coin takes over 24 hours to sync their full nodes because of Sprout Transactions
|
||||
In working on this release, Duke Leto was suspended from Github, which gave Hush developers
|
||||
the impetus to completely leave that racist and censorship-loving platform.
|
||||
|
||||
Hush now has it's own <a href="https://git.hush.is/hush">git.hush.is</a> Gitea instance,
|
||||
Hush now has it's own [git.hush.is](https://git.hush.is/hush) Gitea instance,
|
||||
because we will not be silenced by Microsoft.
|
||||
|
||||
All Hush software will be released from git.hush.is and hush.is, downloads from any other
|
||||
@@ -32,19 +32,30 @@ domains should be assumed to be backdoored.
|
||||
|
||||
## Installing
|
||||
|
||||
See [INSTALL.md](https://git.hush.is/hush/hush3/src/branch/master/INSTALL.md)
|
||||
You can either compile it yourself or you can install a binary which was compiled by us.
|
||||
Please refer to the instructions which apply to you below:
|
||||
|
||||
* See [INSTALL.md](INSTALL.md) to compile from source on Linux and to cross-compile for Windows
|
||||
* See [INSTALL-BIN.md](INSTALL-BIN.md) to install pre-compiled binary on Linux
|
||||
|
||||
### Claiming Funds From Old Hush Wallets
|
||||
|
||||
If you have an older wallet, then refer to [OLD_WALLETS.md](OLD_WALLETS.md).
|
||||
|
||||
### Official Explorer
|
||||
### Official Explorers
|
||||
|
||||
The link for the Official Hush explorer is: <a href="https://explorer.hush.is">explorer.hush.is</a>
|
||||
The links for the Official Hush explorers:
|
||||
* [explorer.hush.is](https://explorer.hush.is)
|
||||
* [explorer.hush.land](https://explorer.hush.land)
|
||||
|
||||
We are looking for alternate explorers to be run on Tor, i2P and other TLDs, if you are interested
|
||||
please join Telegram and ask questions.
|
||||
|
||||
### For system admins
|
||||
|
||||
There is a new systemd user service script so you can easily start/stop/restart your hushd service on your server.
|
||||
[Try it out today](doc/hushd-systemd.md) and the systemd script is located in the doc directory of the source tree.
|
||||
|
||||
## Support and Socials
|
||||
|
||||
Please feel free to join us on Telegram for official support:
|
||||
@@ -53,9 +64,11 @@ Please feel free to join us on Telegram for official support:
|
||||
* Mining group: https://hush.is/telegram_mining
|
||||
|
||||
Other socials:
|
||||
* Toot us <a href="https://hush.is/twitter">@MyHushTeam</a> on Twitter
|
||||
* Follow <a href="https://hush.is/yt">Hush</a> on YouTube
|
||||
* Join <a href="https://hush.is/reddit">Hush</a> on Reddit
|
||||
* Twitter: <a href="https://hush.is/twitter">@hushisprivacy</a>
|
||||
* Matrix: <a href="https://hush.is/matrix">@hush_main:meowchat.xyz</a>
|
||||
* PeerTube <a href="https://hush.is/peertube">videos.hush.is</a>
|
||||
* Reddit <a href="https://hush.is/reddit">@Myhush</a>
|
||||
* Mastodon <a href="https://hush.is/mastodon">@myhushteam@fosstodon.org</a>
|
||||
|
||||
## License
|
||||
|
||||
|
||||
4
antispam
Executable file
4
antispam
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "./src/hush-cli -ac_name=ANTISPAM $@"
|
||||
./src/hush-cli -ac_name=ANTISPAM "$@"
|
||||
@@ -1,4 +1,7 @@
|
||||
#!/bin/sh
|
||||
# Copyright (c) 2016-2023 The 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
|
||||
srcdir="$(dirname $0)"
|
||||
cd "$srcdir"
|
||||
|
||||
18
build.sh
18
build.sh
@@ -1,7 +1,19 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2016-2020 The Hush developers
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2016-2023 The Hush developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
set -eu -o pipefail
|
||||
./zcutil/build.sh --disable-tests $@
|
||||
|
||||
# run correct build script for detected OS
|
||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
./util/build.sh --disable-tests $@
|
||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
./util/build-mac.sh --disable-tests $@
|
||||
elif [[ "$OSTYPE" == "msys"* ]]; then
|
||||
./util/build-win.sh --disable-tests $@
|
||||
#elif [[ "$OSTYPE" == "freebsd"* ]]; then
|
||||
# placeholder
|
||||
else
|
||||
echo "Unable to detect your OS. What are you using?"
|
||||
fi
|
||||
|
||||
95
configure.ac
95
configure.ac
@@ -1,22 +1,23 @@
|
||||
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
|
||||
AC_PREREQ([2.60])
|
||||
define(_CLIENT_VERSION_MAJOR, 3)
|
||||
define(_CLIENT_VERSION_MINOR, 7)
|
||||
define(_CLIENT_VERSION_REVISION, 0)
|
||||
dnl Must be kept in sync with src/clientversion.h , ugh!
|
||||
define(_CLIENT_VERSION_MINOR, 10)
|
||||
define(_CLIENT_VERSION_REVISION, 1)
|
||||
define(_CLIENT_VERSION_BUILD, 50)
|
||||
define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50)))
|
||||
define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1)))
|
||||
define(_CLIENT_VERSION_IS_RELEASE, true)
|
||||
define(_COPYRIGHT_YEAR, 2021)
|
||||
define(_COPYRIGHT_YEAR, 2024)
|
||||
AC_INIT([Hush],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_SUFFIX(_ZC_BUILD_VAL)],[https://git.hush.is/hush/hush3],[hush])
|
||||
AC_CONFIG_SRCDIR([src/main.cpp])
|
||||
AC_CONFIG_HEADERS([src/config/bitcoin-config.h])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_MACRO_DIR([build-aux/m4])
|
||||
|
||||
BITCOIN_DAEMON_NAME=komodod
|
||||
BITCOIN_CLI_NAME=komodo-cli
|
||||
BITCOIN_TX_NAME=komodo-tx
|
||||
BITCOIN_DAEMON_NAME=hushd
|
||||
BITCOIN_CLI_NAME=hush-cli
|
||||
BITCOIN_TX_NAME=hush-tx
|
||||
|
||||
dnl Unless the user specified ARFLAGS, force it to be cr
|
||||
AC_ARG_VAR(ARFLAGS, [Flags for the archiver, defaults to <cr> if not set])
|
||||
@@ -151,12 +152,6 @@ AC_ARG_ENABLE([glibc-back-compat],
|
||||
[use_glibc_compat=$enableval],
|
||||
[use_glibc_compat=no])
|
||||
|
||||
AC_ARG_ENABLE([zmq],
|
||||
[AS_HELP_STRING([--disable-zmq],
|
||||
[disable ZMQ notifications])],
|
||||
[use_zmq=$enableval],
|
||||
[use_zmq=yes])
|
||||
|
||||
AC_ARG_ENABLE([experimental-asm],
|
||||
[AS_HELP_STRING([--enable-experimental-asm],
|
||||
[Enable experimental assembly routines (default is no)])],
|
||||
@@ -227,11 +222,34 @@ if test "x$CXXFLAGS_overridden" = "xno"; then
|
||||
AX_CHECK_COMPILE_FLAG([-Wunused-local-typedef],[CXXFLAGS="$CXXFLAGS -Wno-unused-local-typedef"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Wdeprecated-register],[CXXFLAGS="$CXXFLAGS -Wno-deprecated-register"],,[[$CXXFLAG_WERROR]])
|
||||
fi
|
||||
|
||||
TEMP_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $SSE42_CXXFLAGS"
|
||||
AC_MSG_CHECKING(for assembler crc32 support)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <stdint.h>
|
||||
#if defined(_MSC_VER)
|
||||
#include <intrin.h>
|
||||
#elif defined(__GNUC__) && defined(__SSE4_2__)
|
||||
#include <nmmintrin.h>
|
||||
#endif
|
||||
]],[[
|
||||
uint64_t l = 0;
|
||||
l = _mm_crc32_u8(l, 0);
|
||||
l = _mm_crc32_u32(l, 0);
|
||||
l = _mm_crc32_u64(l, 0);
|
||||
return l;
|
||||
]])],
|
||||
[ AC_MSG_RESULT(yes); enable_hwcrc32=yes],
|
||||
[ AC_MSG_RESULT(no)]
|
||||
)
|
||||
CXXFLAGS="$TEMP_CXXFLAGS"
|
||||
|
||||
CPPFLAGS="$CPPFLAGS -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS"
|
||||
|
||||
AC_ARG_WITH([utils],
|
||||
[AS_HELP_STRING([--with-utils],
|
||||
[build komodo-cli komodo-tx wallet-utility (default=yes)])],
|
||||
[build hush-cli hush-tx wallet-utility (default=yes)])],
|
||||
[build_bitcoin_utils=$withval],
|
||||
[build_bitcoin_utils=yes])
|
||||
|
||||
@@ -247,6 +265,16 @@ AC_ARG_WITH([daemon],
|
||||
[build_bitcoind=$withval],
|
||||
[build_bitcoind=yes])
|
||||
|
||||
GCC_TARGET=`$CC -dumpmachine 2>&1`
|
||||
case $GCC_TARGET in
|
||||
arm*-*-*)
|
||||
have_arm=true
|
||||
;;
|
||||
aarch64*-*-*)
|
||||
have_arm=true
|
||||
;;
|
||||
esac
|
||||
|
||||
use_pkgconfig=yes
|
||||
case $host in
|
||||
*mingw*)
|
||||
@@ -673,15 +701,6 @@ if test x$use_pkgconfig = xyes; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$use_zmq" = "xyes"; then
|
||||
PKG_CHECK_MODULES([ZMQ],[libzmq >= 4],
|
||||
[AC_DEFINE([ENABLE_ZMQ],[1],[Define to 1 to enable ZMQ functions])],
|
||||
[AC_DEFINE([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])
|
||||
AC_MSG_WARN([libzmq version 4.x or greater not found, disabling])
|
||||
use_zmq=no])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])
|
||||
fi
|
||||
]
|
||||
)
|
||||
else
|
||||
@@ -718,34 +737,13 @@ fi
|
||||
#AC_CHECK_HEADER([gmpxx.h],,AC_MSG_ERROR(libgmpxx headers missing))
|
||||
#AC_CHECK_LIB([gmpxx],[main],GMPXX_LIBS=-lgmpxx, [AC_MSG_ERROR(libgmpxx missing)])
|
||||
|
||||
if test "x$use_zmq" = "xyes"; then
|
||||
AC_CHECK_HEADER([zmq.h],
|
||||
[AC_DEFINE([ENABLE_ZMQ],[1],[Define to 1 to enable ZMQ functions])],
|
||||
[AC_MSG_WARN([zmq.h not found, disabling zmq support])
|
||||
use_zmq=no
|
||||
AC_DEFINE([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])])
|
||||
AC_CHECK_LIB([zmq],[zmq_ctx_shutdown],ZMQ_LIBS=-lzmq,
|
||||
[AC_MSG_WARN([libzmq >= 4.0 not found, disabling zmq support])
|
||||
use_zmq=no
|
||||
AC_DEFINE([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])
|
||||
fi
|
||||
|
||||
if test "x$use_zmq" = "xyes"; then
|
||||
dnl Assume libzmq was built for static linking
|
||||
case $host in
|
||||
*mingw*)
|
||||
ZMQ_CFLAGS="$ZMQ_CFLAGS -DZMQ_STATIC"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
# These packages don't provide pkgconfig config files across all
|
||||
# platforms, so we use older autoconf detection mechanisms:
|
||||
AC_CHECK_HEADER([gmp.h],,AC_MSG_ERROR(libgmp headers missing))
|
||||
AC_CHECK_LIB([gmp],[[__gmpn_sub_n]],GMP_LIBS=-lgmp, [AC_MSG_ERROR(libgmp missing)])
|
||||
#AC_CHECK_LIB([gmp],[[__gmpn_sub_n]],GMP_LIBS=-lgmp, [AC_MSG_ERROR(libgmp missing)])
|
||||
|
||||
AC_CHECK_HEADER([gmpxx.h],,AC_MSG_ERROR(libgmpxx headers missing))
|
||||
AC_CHECK_LIB([gmpxx],[main],GMPXX_LIBS=-lgmpxx, [AC_MSG_ERROR(libgmpxx missing)])
|
||||
@@ -766,11 +764,11 @@ AX_CHECK_COMPILE_FLAG([-Wno-builtin-declaration-mismatch],[CXXFLAGS="$CXXFLAGS -
|
||||
|
||||
LIBZCASH_LIBS="-lgmp -lgmpxx $BOOST_SYSTEM_LIB -lwolfssl -lsodium $RUST_LIBS"
|
||||
|
||||
AC_MSG_CHECKING([whether to build komodod])
|
||||
AC_MSG_CHECKING([whether to build hushd])
|
||||
AM_CONDITIONAL([BUILD_BITCOIND], [test x$build_bitcoind = xyes])
|
||||
AC_MSG_RESULT($build_bitcoind)
|
||||
|
||||
AC_MSG_CHECKING([whether to build utils (komodo-cli komodo-tx wallet-utility)])
|
||||
AC_MSG_CHECKING([whether to build utils (hush-cli hush-tx wallet-utility)])
|
||||
AM_CONDITIONAL([BUILD_BITCOIN_UTILS], [test x$build_bitcoin_utils = xyes])
|
||||
AC_MSG_RESULT($build_bitcoin_utils)
|
||||
|
||||
@@ -824,8 +822,6 @@ else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([ENABLE_ZMQ], [test "x$use_zmq" = "xyes"])
|
||||
|
||||
AC_MSG_CHECKING([whether to build test_bitcoin])
|
||||
if test x$use_tests = xyes; then
|
||||
AC_MSG_RESULT([yes])
|
||||
@@ -853,6 +849,7 @@ AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows])
|
||||
AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet = xyes])
|
||||
AM_CONDITIONAL([ENABLE_MINING],[test x$enable_mining = xyes])
|
||||
AM_CONDITIONAL([ENABLE_TESTS],[test x$BUILD_TEST = xyes])
|
||||
AM_CONDITIONAL([ARCH_ARM], [test x$have_arm = xtrue])
|
||||
AM_CONDITIONAL([USE_LCOV],[test x$use_lcov = xyes])
|
||||
AM_CONDITIONAL([GLIBC_BACK_COMPAT],[test x$use_glibc_compat = xyes])
|
||||
AM_CONDITIONAL([HARDEN],[test x$use_hardening = xyes])
|
||||
@@ -894,7 +891,6 @@ AC_SUBST(CRYPTO_LIBS)
|
||||
AC_SUBST(SSL_LIBS)
|
||||
AC_SUBST(EVENT_LIBS)
|
||||
AC_SUBST(EVENT_PTHREADS_LIBS)
|
||||
AC_SUBST(ZMQ_LIBS)
|
||||
AC_SUBST(GMP_LIBS)
|
||||
AC_SUBST(GMPXX_LIBS)
|
||||
AC_SUBST(LIBZCASH_LIBS)
|
||||
@@ -944,7 +940,6 @@ esac
|
||||
echo
|
||||
echo "Options used to compile and link:"
|
||||
echo " with wallet = $enable_wallet"
|
||||
echo " with zmq = $use_zmq"
|
||||
echo " with test = $use_tests"
|
||||
echo " debug enabled = $enable_debug"
|
||||
echo " werror = $enable_werror"
|
||||
|
||||
@@ -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-2020 The Hush developers
|
||||
#!/usr/bin/env perl
|
||||
# Copyright (c) 2016-2023 The Hush developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
use warnings;
|
||||
@@ -7,11 +7,18 @@ use strict;
|
||||
|
||||
# Given a block time, estimate when it will happen
|
||||
my $block = shift || die "Usage: $0 123";
|
||||
my $coin = shift || '';
|
||||
my $hush = "./src/hush-cli";
|
||||
unless (-e $hush) {
|
||||
die "$hush does not exist, aborting";
|
||||
}
|
||||
if ($coin) {
|
||||
$hush .= " -ac_name=$coin";
|
||||
}
|
||||
my $blockcount = qx{$hush getblockcount};
|
||||
|
||||
unless ($blockcount = int($blockcount)) {
|
||||
print "Invalid response from hush-cli\n";
|
||||
print "Invalid response from $hush\n";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
@@ -19,13 +26,24 @@ if ($block <= $blockcount) {
|
||||
die "That block has already happened!";
|
||||
} else {
|
||||
my $diff = $block - $blockcount;
|
||||
my $minutes = $diff*2.5;
|
||||
my $minpb = 1.25; # 75s in minutes for HUSH3
|
||||
if ($coin eq 'DRAGONX') {
|
||||
$minpb = 0.6; # minutes per block
|
||||
} elsif ($coin) {
|
||||
# TODO: support custom bloctimes
|
||||
$minpb = 1; # assumes default blocktime of 60s
|
||||
}
|
||||
my $minutes = $diff*$minpb;
|
||||
my $seconds = $minutes*60;
|
||||
my $now = time;
|
||||
my $then = $now + $seconds;
|
||||
my $ldate = localtime($then);
|
||||
my $gmdate = gmtime($then);
|
||||
print "Hush Block $block will happen at roughly:\n";
|
||||
if ($coin) {
|
||||
print "$coin Block $block will happen at roughly:\n";
|
||||
} else {
|
||||
print "Hush Block $block will happen at roughly:\n";
|
||||
}
|
||||
print "$ldate Eastern # $then\n";
|
||||
print "$gmdate GMT # $then\n";
|
||||
}
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
# Copyright 2016-2020 The Hush developers
|
||||
# Copyright (c) 2016-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
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
# Generate checkpoint data for use in src/chainparams.cpp
|
||||
my $perday = 1152;
|
||||
my $hush = "./src/hush-cli";
|
||||
my $gethash = "$hush getblockhash";
|
||||
my $stride = shift || 1000;
|
||||
my $count = 0;
|
||||
my $blocks = qx{$hush getblockcount};
|
||||
if($?) {
|
||||
print "ERROR, exiting...\n";
|
||||
exit 1;
|
||||
}
|
||||
my $prev = $blocks - $perday;
|
||||
my $last = 0;
|
||||
my $now = time();
|
||||
chomp($blocks);
|
||||
|
||||
print "// Generated at $now via hush3 contrib/checkpoints.pl by Duke Leto\n";
|
||||
|
||||
while (1) {
|
||||
$count++;
|
||||
my $block = $stride*$count;
|
||||
if ($block > $blocks) {
|
||||
$last = $stride*($count-1);
|
||||
#print "last checkpointed block=$last\n";
|
||||
last;
|
||||
}
|
||||
my $blockhash = qx{$gethash $block};
|
||||
chomp $blockhash;
|
||||
print qq{($block, uint256S("0x$blockhash"))\n};
|
||||
}
|
||||
my $time = qx{$hush getblock $last |grep time|cut -d: -f2| sed 's/,//g'};
|
||||
chomp($time);
|
||||
# TODO: This is Linux-only
|
||||
my $line1 = qx{grep --text height=$prev ~/.komodo/HUSH3/debug.log};
|
||||
my $line2 = qx{grep --text height=$blocks ~/.komodo/HUSH3/debug.log};
|
||||
my $txs_per_day = 2 * $perday; # default estimate is 2 txs per block, on average
|
||||
my $total_txs = 0;
|
||||
#print "line1: $line1\n";
|
||||
#print "line2: $line2\n";
|
||||
|
||||
# This will calculate the number of txs in the previous day to the last checkpointed block
|
||||
if ($line1 =~ m/tx=(\d+)/) {
|
||||
my $tx1 = $1; # number of txs in the block 1 day ago
|
||||
#print "prevblock has $tx1 txs\n";
|
||||
if ($line2 =~ m/tx=(\d+)/) {
|
||||
$total_txs = $1;
|
||||
# TODO: average of last N days might be better
|
||||
$txs_per_day = $total_txs - $tx1;
|
||||
}
|
||||
}
|
||||
print "(int64_t) $time, // time of last checkpointed block\n";
|
||||
print "(int64_t) $total_txs, // total txs\n";
|
||||
print "(double) $txs_per_day // txs in the last day before block $blocks\n";
|
||||
@@ -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,2 +1,3 @@
|
||||
usr/bin/komodod
|
||||
usr/bin/komodo-cli
|
||||
usr/bin/hushd
|
||||
usr/bin/hush-cli
|
||||
usr/bin/hush-tx
|
||||
|
||||
@@ -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,25 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Released under the GPLv3
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
#hardcode and uncomment if hushd is not running on this machine
|
||||
#VERSION=3.6.3
|
||||
VERSION=$(./src/hushd --version|grep version|cut -d' ' -f4|cut -d- -f1|sed 's/v//g')
|
||||
FILE="hush-$VERSION-linux-amd64.tar"
|
||||
TIME=$(perl -e 'print time')
|
||||
|
||||
mv build build.$TIME
|
||||
mkdir build
|
||||
cp contrib/asmap/asmap.dat build/
|
||||
cp sapling*.params build/
|
||||
cd src
|
||||
cp komodod komodo-cli komodo-tx hushd hush-cli hush-tx hush-smart-chain ../build
|
||||
cd ../build
|
||||
strip komodo*
|
||||
tar -f $FILE -c *
|
||||
gzip -9 $FILE
|
||||
sha256sum *.gz
|
||||
du -sh *.gz
|
||||
@@ -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-2020 The Hush developers
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2016-2023 The Hush developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
# OPEN BOUNTY
|
||||
# Send your CPU and RAM and time it takes to sync a HUSH full node for
|
||||
# 5 HUSH as thanks for decentralized performance testing
|
||||
|
||||
# Usage: $0 BRANCH JOBS
|
||||
# TODO: default to master branch with 2 jobs
|
||||
|
||||
# we don't want this for our build.sh and make commands
|
||||
#set -eu -o pipefail
|
||||
|
||||
BRANCH=$1
|
||||
|
||||
git clone https://git.hush.is/hush/hush3
|
||||
cd hush3
|
||||
# Build with 2 cores
|
||||
git checkout $BRANCH
|
||||
# You need 2GB of RAM per core, don't use too many
|
||||
# (GB of RAM)/2 - 1 is the optimal core count for compiling Hush
|
||||
# `nproc` tells you how many cores you have
|
||||
JOBS=2
|
||||
JOBS=$2
|
||||
JOBZ=$(nproc) # if build.sh fails, we can use many more jobs with make
|
||||
# Want to fix this parrallel-only build system bug we inherited ? you are a new hush dev
|
||||
./build.sh -j$JOBS;make -j$JOBS;make -j$JOBS;make -j$JOBS
|
||||
# Sometimes the parrallel build fails because of a race condition, so
|
||||
# we do it a few times to Make Really Sure
|
||||
./build.sh -j$JOBS;make -j$JOBZ;make -j$JOBZ;make -j$JOBZ
|
||||
./src/hushd &> hush.log &
|
||||
# You can give the entire or parts of this file to Hush developers for debugging,
|
||||
# but there is a lot of metadata!!! We don't want any more than we need to fix bugz
|
||||
|
||||
17
contrib/gen-zaddrs.pl
Executable file
17
contrib/gen-zaddrs.pl
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env perl
|
||||
# Copyright 2019-2023 The Hush developers
|
||||
# Released under the GPLv3
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
my $hush = "./src/hush-cli";
|
||||
my $znew = "$hush z_getnewaddress";
|
||||
my $count = 1;
|
||||
my $howmany = shift || 50;
|
||||
|
||||
while ($count < $howmany) {
|
||||
my $zaddr = qx{$znew};
|
||||
chomp($zaddr);
|
||||
print qq{$zaddr\n};
|
||||
$count++;
|
||||
}
|
||||
@@ -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 2016-2020 The Hush developers
|
||||
# Copyright (c) 2016-2023 The Hush developers
|
||||
# Released under the GPLv3
|
||||
|
||||
use strict;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env perl
|
||||
# Copyright (c) 2016-2020 The Hush developers
|
||||
# Copyright (c) 2016-2023 The 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 2016-2020 The Hush developers
|
||||
# Copyright (c) 2016-2023 The Hush developers
|
||||
# Released under the GPLv3
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
@@ -35,12 +35,6 @@ pre-start script
|
||||
echo
|
||||
echo "bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'"
|
||||
echo
|
||||
echo "It is also recommended that you also set alertnotify so you are "
|
||||
echo "notified of problems:"
|
||||
echo
|
||||
echo "ie: alertnotify=echo %%s | mail -s \"Hush Alert\"" \
|
||||
"admin@foo.com"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# hushd The hush core server.
|
||||
#
|
||||
|
||||
@@ -81,11 +81,6 @@ checkconfig()
|
||||
eerror ""
|
||||
eerror "bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'"
|
||||
eerror ""
|
||||
eerror "It is also recommended that you also set alertnotify so you are "
|
||||
eerror "notified of problems:"
|
||||
eerror ""
|
||||
eerror "ie: alertnotify=echo %%s | mail -s \"Hush Alert\"" \
|
||||
"admin@foo.com"
|
||||
eerror ""
|
||||
return 1
|
||||
fi
|
||||
|
||||
BIN
contrib/macdeploy/SDBackground.png
Normal file
BIN
contrib/macdeploy/SDBackground.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
136
contrib/macdeploy/sd-macdeploy.command
Executable file
136
contrib/macdeploy/sd-macdeploy.command
Executable file
@@ -0,0 +1,136 @@
|
||||
#!/bin/bash
|
||||
|
||||
# by Andy Maloney
|
||||
# http://asmaloney.com/2013/07/howto/packaging-a-mac-os-x-application-using-a-dmg/
|
||||
|
||||
# make sure we are in the correct dir when we double-click a .command file
|
||||
dir=${0%/*}
|
||||
if [ -d "$dir" ]; then
|
||||
cd "$dir"
|
||||
fi
|
||||
|
||||
# set up your app name, version number, and background image file name
|
||||
APP_NAME="SilentDragon"
|
||||
VERSION="1.3.0"
|
||||
DMG_BACKGROUND_IMG="SDBackground.png"
|
||||
|
||||
# you should not need to change these
|
||||
APP_EXE="${APP_NAME}.app/Contents/MacOS/${APP_NAME}"
|
||||
|
||||
VOL_NAME="${APP_NAME} ${VERSION}" # volume name will be "SilentDragon 1.3.0"
|
||||
DMG_TMP="${VOL_NAME}-temp.dmg"
|
||||
DMG_FINAL="${VOL_NAME}.dmg" # final DMG name will be "SilentDragon 1.3.0.dmg"
|
||||
STAGING_DIR="./Install" # we copy all our stuff into this dir
|
||||
|
||||
# Check the background image DPI and convert it if it isn't 72x72
|
||||
_BACKGROUND_IMAGE_DPI_H=`sips -g dpiHeight ${DMG_BACKGROUND_IMG} | grep -Eo '[0-9]+\.[0-9]+'`
|
||||
_BACKGROUND_IMAGE_DPI_W=`sips -g dpiWidth ${DMG_BACKGROUND_IMG} | grep -Eo '[0-9]+\.[0-9]+'`
|
||||
|
||||
if [ $(echo " $_BACKGROUND_IMAGE_DPI_H != 72.0 " | bc) -eq 1 -o $(echo " $_BACKGROUND_IMAGE_DPI_W != 72.0 " | bc) -eq 1 ]; then
|
||||
echo "WARNING: The background image's DPI is not 72. This will result in distorted backgrounds on Mac OS X 10.7+."
|
||||
echo " I will convert it to 72 DPI for you."
|
||||
|
||||
_DMG_BACKGROUND_TMP="${DMG_BACKGROUND_IMG%.*}"_dpifix."${DMG_BACKGROUND_IMG##*.}"
|
||||
|
||||
sips -s dpiWidth 72 -s dpiHeight 72 ${DMG_BACKGROUND_IMG} --out ${_DMG_BACKGROUND_TMP}
|
||||
|
||||
DMG_BACKGROUND_IMG="${_DMG_BACKGROUND_TMP}"
|
||||
fi
|
||||
|
||||
# clear out any old data
|
||||
rm -rf "${STAGING_DIR}" "${DMG_TMP}" "${DMG_FINAL}"
|
||||
|
||||
# copy over the stuff we want in the final disk image to our staging dir
|
||||
mkdir -p "${STAGING_DIR}"
|
||||
cp -rpf "${APP_NAME}.app" "${STAGING_DIR}"
|
||||
# ... cp anything else you want in the DMG - documentation, etc.
|
||||
|
||||
pushd "${STAGING_DIR}"
|
||||
|
||||
# strip the executable
|
||||
echo "Stripping ${APP_EXE}..."
|
||||
strip -u -r "${APP_EXE}"
|
||||
|
||||
# compress the executable if we have upx in PATH
|
||||
# UPX: http://upx.sourceforge.net/
|
||||
if hash upx 2>/dev/null; then
|
||||
echo "Compressing (UPX) ${APP_EXE}..."
|
||||
upx -9 "${APP_EXE}"
|
||||
fi
|
||||
|
||||
# ... perform any other stripping/compressing of libs and executables
|
||||
|
||||
popd
|
||||
|
||||
# figure out how big our DMG needs to be
|
||||
# assumes our contents are at least 1M!
|
||||
SIZE=`du -sh "${STAGING_DIR}" | sed 's/\([0-9\.]*\)M\(.*\)/\1/'`
|
||||
SIZE=`echo "${SIZE} + 1.0" | bc | awk '{print int($1+0.5)}'`
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: Cannot compute size of staging dir"
|
||||
exit
|
||||
fi
|
||||
|
||||
# create the temp DMG file
|
||||
hdiutil create -srcfolder "${STAGING_DIR}" -volname "${VOL_NAME}" -fs HFS+ \
|
||||
-fsargs "-c c=64,a=16,e=16" -format UDRW -size ${SIZE}M "${DMG_TMP}"
|
||||
|
||||
echo "Created DMG: ${DMG_TMP}"
|
||||
|
||||
# mount it and save the device
|
||||
DEVICE=$(hdiutil attach -readwrite -noverify "${DMG_TMP}" | \
|
||||
egrep '^/dev/' | sed 1q | awk '{print $1}')
|
||||
|
||||
sleep 2
|
||||
|
||||
# add a link to the Applications dir
|
||||
echo "Add link to /Applications"
|
||||
pushd /Volumes/"${VOL_NAME}"
|
||||
ln -s /Applications
|
||||
popd
|
||||
|
||||
# add a background image
|
||||
mkdir /Volumes/"${VOL_NAME}"/.background
|
||||
cp "${DMG_BACKGROUND_IMG}" /Volumes/"${VOL_NAME}"/.background/
|
||||
|
||||
# tell the Finder to resize the window, set the background,
|
||||
# change the icon size, place the icons in the right position, etc.
|
||||
echo '
|
||||
tell application "Finder"
|
||||
tell disk "'${VOL_NAME}'"
|
||||
open
|
||||
set current view of container window to icon view
|
||||
set toolbar visible of container window to false
|
||||
set statusbar visible of container window to false
|
||||
set the bounds of container window to {400, 100, 920, 440}
|
||||
set viewOptions to the icon view options of container window
|
||||
set arrangement of viewOptions to not arranged
|
||||
set icon size of viewOptions to 72
|
||||
set background picture of viewOptions to file ".background:'${DMG_BACKGROUND_IMG}'"
|
||||
set position of item "'${APP_NAME}'.app" of container window to {160, 205}
|
||||
set position of item "Applications" of container window to {360, 205}
|
||||
close
|
||||
open
|
||||
update without registering applications
|
||||
delay 2
|
||||
end tell
|
||||
end tell
|
||||
' | osascript
|
||||
|
||||
sync
|
||||
|
||||
# unmount it
|
||||
hdiutil detach "${DEVICE}"
|
||||
|
||||
# now make the final image a compressed disk image
|
||||
echo "Creating compressed image"
|
||||
hdiutil convert "${DMG_TMP}" -format UDZO -imagekey zlib-level=9 -o "${DMG_FINAL}"
|
||||
|
||||
# clean up
|
||||
rm -rf "${DMG_TMP}"
|
||||
rm -rf "${STAGING_DIR}"
|
||||
|
||||
echo 'Done.'
|
||||
|
||||
exit
|
||||
52
contrib/sda_checkpoints.pl
Executable file
52
contrib/sda_checkpoints.pl
Executable file
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/perl
|
||||
# Copyright (c) 2016-2022 The Hush developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
# This script is used to generate the checkpoint data used by the SilentDragon Android SDK
|
||||
# https://git.hush.is/fekt/hush-android-wallet-sdk/src/branch/main/sdk-lib/src/main/assets/co.electriccoin.zcash/checkpoint/mainnet
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
my $hush = "./src/hush-cli";
|
||||
my $getblock= "$hush getblock";
|
||||
my $gethash = "$hush getblockhash";
|
||||
my $gettree = "$hush getblockmerkletree";
|
||||
my $start = shift || 1390000;
|
||||
my $end = shift || 1422000;
|
||||
my $stride = shift || 10000;
|
||||
|
||||
my $blocks = qx{$hush getblockcount};
|
||||
if($?) {
|
||||
print "ERROR, is hushd running? exiting...\n";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
if ($end > $blocks) {
|
||||
print "The block $end is beyond how many blocks this node knows about, exiting...\n";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
if ($start < 1) {
|
||||
print "Invalid start block $start, exiting...\n";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
my $block = $start;
|
||||
while (1) {
|
||||
last if $block > $end;
|
||||
my $blockhash = qx{$gethash $block};
|
||||
my $blocktime = qx{$getblock $block | grep time};
|
||||
my $merkle = qx{$gettree $block};
|
||||
chomp $merkle;
|
||||
chomp $blockhash;
|
||||
chomp $blocktime;
|
||||
$blocktime =~ s/^\s+|\s+$//g;
|
||||
my $checkpoint = qq{{\n\t"network": "main",\n\t"height": "$block",\n\t"hash": "$blockhash",\n\t$blocktime\n\t"saplingTree": "$merkle"\n}\n};
|
||||
my $filename = "$block.json";
|
||||
open(FH, '>', $filename) or die $!;
|
||||
print FH $checkpoint;
|
||||
close(FH);
|
||||
|
||||
$block += $stride;
|
||||
}
|
||||
44
contrib/sdl_checkpoints.pl
Executable file
44
contrib/sdl_checkpoints.pl
Executable file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/perl
|
||||
# Copyright (c) 2016-2023 The Hush developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
# 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,8 +1,10 @@
|
||||
### Seeds ###
|
||||
# Seeds
|
||||
|
||||
Utility to generate the seeds.txt list that is compiled into the client
|
||||
(see [src/chainparamsseeds.h](/src/chainparamsseeds.h) and other utilities in [contrib/seeds](/contrib/seeds)).
|
||||
(see [src/chainparamsseeds.h](hush/hush3/src/branch/master/src/chainparamsseeds.h) and other utilities in [contrib/seeds](hush/hush3/src/branch/master/contrib/seeds/)).
|
||||
|
||||
## Updating seeds
|
||||
|
||||
Update [contrib/seeds/nodes_main.txt](hush/hush3/src/branch/master/contrib/seeds/nodes_main.txt) and run `make seeds` in the root directory of this repo to update [src/chainparamsseeds.h](hush/hush3/src/branch/master/src/chainparamsseeds.h) then commit the result.
|
||||
|
||||
The 512 seeds compiled into the 0.10 release were created from sipa's DNS seed data, like this:
|
||||
|
||||
curl -s http://bitcoin.sipa.be/seeds.txt | makeseeds.py
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright (c) 2014 Wladimir J. van der Laan
|
||||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2016-2023 The Hush developers
|
||||
# Copyright (c) 2014-2021 The Bitcoin Core developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
'''
|
||||
@@ -11,45 +12,63 @@ argument:
|
||||
nodes_main.txt
|
||||
nodes_test.txt
|
||||
|
||||
These files must consist of lines in the format
|
||||
These files must consist of lines in the format
|
||||
|
||||
<ip>
|
||||
<ip>:<port>
|
||||
[<ipv6>]
|
||||
<ip>
|
||||
[<ipv6>]:<port>
|
||||
[<ipv6>]
|
||||
<onion>.onion:<port>
|
||||
<onion>.onion
|
||||
0xDDBBCCAA (IPv4 little-endian old pnSeeds format)
|
||||
<i2p>.b32.i2p:<port>
|
||||
<i2p>.b32.i2p
|
||||
|
||||
The output will be two data structures with the peers in binary format:
|
||||
|
||||
static SeedSpec6 pnSeed6_main[]={
|
||||
...
|
||||
}
|
||||
static SeedSpec6 pnSeed6_test[]={
|
||||
static const uint8_t chainparams_seed_{main,test}[]={
|
||||
...
|
||||
}
|
||||
|
||||
These should be pasted into `src/chainparamsseeds.h`.
|
||||
To update the generated code :
|
||||
|
||||
./contrib/seeds/generate-seeds.py contrib/seeds > src/chainparamsseeds.h
|
||||
|
||||
'''
|
||||
from __future__ import print_function, division
|
||||
|
||||
from base64 import b32decode
|
||||
from binascii import a2b_hex
|
||||
import sys, os
|
||||
from enum import Enum
|
||||
import struct
|
||||
import sys
|
||||
import os
|
||||
import re
|
||||
|
||||
# ipv4 in ipv6 prefix
|
||||
pchIPv4 = bytearray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff])
|
||||
# tor-specific ipv6 prefix
|
||||
pchOnionCat = bytearray([0xFD,0x87,0xD8,0x7E,0xEB,0x43])
|
||||
class BIP155Network(Enum):
|
||||
IPV4 = 1
|
||||
IPV6 = 2
|
||||
TORV2 = 3 # no longer supported
|
||||
TORV3 = 4
|
||||
I2P = 5
|
||||
CJDNS = 6
|
||||
|
||||
def name_to_ipv6(addr):
|
||||
if len(addr)>6 and addr.endswith('.onion'):
|
||||
def name_to_bip155(addr):
|
||||
'''Convert address string to BIP155 (networkID, addr) tuple.'''
|
||||
if addr.endswith('.onion'):
|
||||
vchAddr = b32decode(addr[0:-6], True)
|
||||
if len(vchAddr) != 16-len(pchOnionCat):
|
||||
raise ValueError('Invalid onion %s' % s)
|
||||
return pchOnionCat + vchAddr
|
||||
if len(vchAddr) == 35:
|
||||
assert vchAddr[34] == 3
|
||||
return (BIP155Network.TORV3, vchAddr[:32])
|
||||
elif len(vchAddr) == 10:
|
||||
return (BIP155Network.TORV2, vchAddr)
|
||||
else:
|
||||
raise ValueError('Invalid onion %s' % vchAddr)
|
||||
elif addr.endswith('.b32.i2p'):
|
||||
vchAddr = b32decode(addr[0:-8] + '====', True)
|
||||
if len(vchAddr) == 32:
|
||||
return (BIP155Network.I2P, vchAddr)
|
||||
else:
|
||||
raise ValueError(f'Invalid I2P {vchAddr}')
|
||||
elif '.' in addr: # IPv4
|
||||
return pchIPv4 + bytearray((int(x) for x in addr.split('.')))
|
||||
return (BIP155Network.IPV4, bytes((int(x) for x in addr.split('.'))))
|
||||
elif ':' in addr: # IPv6
|
||||
sub = [[], []] # prefix, suffix
|
||||
x = 0
|
||||
@@ -66,14 +85,13 @@ def name_to_ipv6(addr):
|
||||
sub[x].append(val & 0xff)
|
||||
nullbytes = 16 - len(sub[0]) - len(sub[1])
|
||||
assert((x == 0 and nullbytes == 0) or (x == 1 and nullbytes > 0))
|
||||
return bytearray(sub[0] + ([0] * nullbytes) + sub[1])
|
||||
elif addr.startswith('0x'): # IPv4-in-little-endian
|
||||
return pchIPv4 + bytearray(reversed(a2b_hex(addr[2:])))
|
||||
return (BIP155Network.IPV6, bytes(sub[0] + ([0] * nullbytes) + sub[1]))
|
||||
else:
|
||||
raise ValueError('Could not parse address %s' % addr)
|
||||
|
||||
def parse_spec(s, defaultport):
|
||||
match = re.match('\[([0-9a-fA-F:]+)\](?::([0-9]+))?$', s)
|
||||
def parse_spec(s):
|
||||
'''Convert endpoint string to BIP155 (networkID, addr, port) tuple.'''
|
||||
match = re.match(r'\[([0-9a-fA-F:]+)\](?::([0-9]+))?$', s)
|
||||
if match: # ipv6
|
||||
host = match.group(1)
|
||||
port = match.group(2)
|
||||
@@ -84,17 +102,42 @@ def parse_spec(s, defaultport):
|
||||
(host,_,port) = s.partition(':')
|
||||
|
||||
if not port:
|
||||
port = defaultport
|
||||
port = 0
|
||||
else:
|
||||
port = int(port)
|
||||
|
||||
host = name_to_ipv6(host)
|
||||
host = name_to_bip155(host)
|
||||
|
||||
return (host,port)
|
||||
if host[0] == BIP155Network.TORV2:
|
||||
return None # TORV2 is no longer supported, so we ignore it
|
||||
else:
|
||||
return host + (port, )
|
||||
|
||||
def process_nodes(g, f, structname, defaultport):
|
||||
g.write('static SeedSpec6 %s[] = {\n' % structname)
|
||||
first = True
|
||||
def ser_compact_size(l):
|
||||
r = b""
|
||||
if l < 253:
|
||||
r = struct.pack("B", l)
|
||||
elif l < 0x10000:
|
||||
r = struct.pack("<BH", 253, l)
|
||||
elif l < 0x100000000:
|
||||
r = struct.pack("<BI", 254, l)
|
||||
else:
|
||||
r = struct.pack("<BQ", 255, l)
|
||||
return r
|
||||
|
||||
def bip155_serialize(spec):
|
||||
'''
|
||||
Serialize (networkID, addr, port) tuple to BIP155 binary format.
|
||||
'''
|
||||
r = b""
|
||||
r += struct.pack('B', spec[0].value)
|
||||
r += ser_compact_size(len(spec[1]))
|
||||
r += spec[1]
|
||||
r += struct.pack('>H', spec[2])
|
||||
return r
|
||||
|
||||
def process_nodes(g, f, structname):
|
||||
g.write('static const uint8_t %s[] = {\n' % structname)
|
||||
for line in f:
|
||||
comment = line.find('#')
|
||||
if comment != -1:
|
||||
@@ -102,37 +145,39 @@ def process_nodes(g, f, structname, defaultport):
|
||||
line = line.strip()
|
||||
if not line:
|
||||
continue
|
||||
if not first:
|
||||
g.write(',\n')
|
||||
first = False
|
||||
|
||||
(host,port) = parse_spec(line, defaultport)
|
||||
hoststr = ','.join(('0x%02x' % b) for b in host)
|
||||
g.write(' {{%s}, %i}' % (hoststr, port))
|
||||
g.write('\n};\n')
|
||||
spec = parse_spec(line)
|
||||
if spec is None: # ignore this entry (e.g. no longer supported addresses like TORV2)
|
||||
continue
|
||||
blob = bip155_serialize(spec)
|
||||
hoststr = ','.join(('0x%02x' % b) for b in blob)
|
||||
g.write(f' {hoststr}, // {line}\n')
|
||||
g.write('};\n')
|
||||
|
||||
def main():
|
||||
if len(sys.argv)<2:
|
||||
print(('Usage: %s <path_to_nodes_txt>' % sys.argv[0]), file=sys.stderr)
|
||||
exit(1)
|
||||
sys.exit(1)
|
||||
g = sys.stdout
|
||||
indir = sys.argv[1]
|
||||
g.write('#ifndef BITCOIN_CHAINPARAMSSEEDS_H\n')
|
||||
g.write('#define BITCOIN_CHAINPARAMSSEEDS_H\n')
|
||||
g.write('/**\n')
|
||||
g.write(' * List of fixed seed nodes for the bitcoin network\n')
|
||||
g.write(' * AUTOGENERATED by contrib/seeds/generate-seeds.py\n')
|
||||
g.write(' *\n')
|
||||
g.write(' * Each line contains a 16-byte IPv6 address and a port.\n')
|
||||
g.write(' * IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly.\n')
|
||||
g.write(' */\n')
|
||||
with open(os.path.join(indir,'nodes_main.txt'),'r') as f:
|
||||
process_nodes(g, f, 'pnSeed6_main', 8233)
|
||||
g.write('// Copyright (c) 2016-2023 The Hush developers\n')
|
||||
g.write('// Distributed under the GPLv3 software license, see the accompanying\n')
|
||||
g.write('// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html\n')
|
||||
g.write('// THIS FILE IS AUTOGENERATED, DO NOT MODIFY DIRECTLY\n')
|
||||
g.write('// Instead, update contrib/seeds/nodes_main.txt then run\n')
|
||||
g.write('// ./contrib/seeds/generate-seeds.py contrib/seeds > src/chainparamsseeds.h\n')
|
||||
g.write('// OR run: make seeds\n')
|
||||
g.write('#ifndef HUSH_CHAINPARAMSSEEDS_H\n')
|
||||
g.write('#define HUSH_CHAINPARAMSSEEDS_H\n')
|
||||
g.write('// List of fixed seed nodes for the Hush network\n')
|
||||
g.write('// Each line contains a BIP155 serialized address.\n')
|
||||
g.write('//\n')
|
||||
with open(os.path.join(indir,'nodes_main.txt'), 'r', encoding="utf8") as f:
|
||||
process_nodes(g, f, 'chainparams_seed_main')
|
||||
g.write('\n')
|
||||
with open(os.path.join(indir,'nodes_test.txt'),'r') as f:
|
||||
process_nodes(g, f, 'pnSeed6_test', 18233)
|
||||
g.write('#endif // BITCOIN_CHAINPARAMSSEEDS_H\n')
|
||||
|
||||
with open(os.path.join(indir,'nodes_test.txt'), 'r', encoding="utf8") as f:
|
||||
process_nodes(g, f, 'chainparams_seed_test')
|
||||
g.write('#endif // HUSH_CHAINPARAMSSEEDS_H\n')
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
|
||||
@@ -1,6 +1,35 @@
|
||||
185.25.48.236:27485
|
||||
185.25.48.236:27487
|
||||
185.64.105.111:27485
|
||||
185.64.105.111:27487
|
||||
185.25.48.72:27485
|
||||
185.25.48.72:27487
|
||||
# node1.hush.land
|
||||
185.241.61.43
|
||||
|
||||
# node2.hush.land
|
||||
87.251.76.166
|
||||
|
||||
# node3.hush.land
|
||||
45.82.68.233
|
||||
|
||||
# node4.hush.land
|
||||
87.251.76.33
|
||||
|
||||
# node2.hush.is
|
||||
137.74.4.198
|
||||
|
||||
# lite.hushpool.is
|
||||
149.28.102.219
|
||||
|
||||
# lite2.hushpool.is
|
||||
155.138.228.68
|
||||
|
||||
# wtfistheinternet.hush.is
|
||||
107.174.70.251
|
||||
|
||||
# torv3
|
||||
56wqzfj6mhxgsv3h3nh3pdocguogxfxud55libqjhjsdh5alfsko2iqd.onion
|
||||
hushv3h6mbxd2pptj42reko3jcexcgnz5zvp3mqcu6myto3jhhn4yzyd.onion
|
||||
hushv3xvheqh42ms3ld2nh555muscietkib7gycb7s4psbrjsysfywqd.onion
|
||||
|
||||
# ipv6
|
||||
2a0c:b641:6f1:34::2
|
||||
2a0c:b641:6f1:c::2
|
||||
|
||||
# i2p
|
||||
iljqq7nnmw2ij2ezl334cerwwmgzmmbmoc3n4saditd2xhi3xohq.b32.i2p
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
# List of fixed seed nodes for testnet
|
||||
# note: File must be non-empty to compile
|
||||
1.2.3.4
|
||||
|
||||
# Onion nodes
|
||||
thfsmmn2jbitcoin.onion
|
||||
it2pj4f7657g3rhi.onion
|
||||
nkf5e6b7pl4jfd4a.onion
|
||||
4zhkir2ofl7orfom.onion
|
||||
t6xj6wilh4ytvcs7.onion
|
||||
i6y6ivorwakd7nw3.onion
|
||||
ubqj4rsu3nqtxmtp.onion
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -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-2020 The Hush developers
|
||||
# Copyright (c) 2016-2023 The 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-2020 The Hush developers
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2016-2023 The Hush developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
if ! [[ "$2" =~ [git@]?[www.]?hush.is[:|/]bitcoin/bitcoin[.git]? ]]; then
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2016-2020 The Hush developers
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2016-2023 The Hush developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
|
||||
@@ -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-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
|
||||
|
||||
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-2020 The Hush developers
|
||||
# Copyright (c) 2016-2023 The 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
|
||||
|
||||
@@ -8,7 +8,7 @@ darwin_CXX=g++-8 -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysro
|
||||
darwin_CFLAGS=-pipe
|
||||
darwin_CXXFLAGS=$(darwin_CFLAGS)
|
||||
|
||||
darwin_release_CFLAGS=-O3
|
||||
darwin_release_CFLAGS=-O1
|
||||
darwin_release_CXXFLAGS=$(darwin_release_CFLAGS)
|
||||
|
||||
darwin_debug_CFLAGS=-O1
|
||||
|
||||
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
|
||||
@@ -14,7 +14,7 @@ ifneq ($(build_os),darwin)
|
||||
$(package)_config_opts_darwin=--disable-atomicsupport
|
||||
endif
|
||||
$(package)_config_opts_aarch64=--disable-atomicsupport
|
||||
$(package)_cxxflags=-std=c++11
|
||||
$(package)_cxxflags+=-std=c++11
|
||||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
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)_file_name=$(package)_$($(package)_version).tar.bz2
|
||||
$(package)_sha256_hash=59c9b274bc451cf91a9ba1dd2c7fdcaf5d60b1b3aa83f2c9fa143417cc660722
|
||||
$(package)_file_name=$(package)_$($(package)_version).tar.bz2
|
||||
$(package)_download_path=https://git.hush.is/attachments
|
||||
$(package)_file_name=7b13759e-8623-4e48-ae08-f78502f4b6a5
|
||||
$(package)_download_file=7b13759e-8623-4e48-ae08-f78502f4b6a5
|
||||
$(package)_patches=fix-Solaris.patch
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts_release=variant=release
|
||||
@@ -21,13 +25,14 @@ $(package)_archiver_$(host_os)=$($(package)_ar)
|
||||
$(package)_toolset_darwin=gcc
|
||||
$(package)_archiver_darwin=$($(package)_ar)
|
||||
$(package)_config_libraries=chrono,filesystem,program_options,system,thread,test
|
||||
$(package)_cxxflags=-std=c++11 -fvisibility=hidden
|
||||
$(package)_cxxflags+=-std=c++11 -fvisibility=hidden
|
||||
$(package)_cxxflags_linux=-fPIC
|
||||
endef
|
||||
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
echo "using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$(boost_archiver_$(host_os))\" <striper>\"$(host_STRIP)\" <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam
|
||||
echo "using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$(boost_archiver_$(host_os))\" <striper>\"$(host_STRIP)\" <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam&& \
|
||||
patch -p1 < $($(package)_patch_dir)/fix-Solaris.patch
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
@@ -36,16 +41,16 @@ endef
|
||||
|
||||
ifeq ($(host_os),linux)
|
||||
define $(package)_build_cmds
|
||||
./b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) cxxflags=-std=c++11 stage
|
||||
./b2 -d2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) cxxflags=-std=c++11 stage
|
||||
endef
|
||||
define $(package)_stage_cmds
|
||||
./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) cxxflags=-std=c++11 install
|
||||
./b2 -d0 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) cxxflags=-std=c++11 install
|
||||
endef
|
||||
else
|
||||
define $(package)_build_cmds
|
||||
./b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) stage
|
||||
./b2 -d2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) stage
|
||||
endef
|
||||
define $(package)_stage_cmds
|
||||
./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) install
|
||||
./b2 -d0 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) install
|
||||
endef
|
||||
endif
|
||||
|
||||
@@ -1,12 +1,20 @@
|
||||
package=libcurl
|
||||
|
||||
ifeq ($(host_os),mingw32)
|
||||
$(package)_version=7.67.0
|
||||
$(package)_dependencies=wolfssl
|
||||
$(package)_download_path=https://curl.haxx.se/download
|
||||
$(package)_file_name=curl-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=52af3361cf806330b88b4fe6f483b6844209d47ae196ac46da4de59bb361ab02
|
||||
$(package)_config_opts_linux=--disable-shared --enable-static --with-wolfssl --without-ssl --prefix=$(host_prefix) --host=$(host)
|
||||
else
|
||||
$(package)_version=8.4.0
|
||||
$(package)_file_name=curl-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=816e41809c043ff285e8c0f06a75a1fa250211bbfb2dc0a037eeef39f1a9e427
|
||||
endif
|
||||
|
||||
$(package)_dependencies=wolfssl
|
||||
$(package)_download_path=https://curl.haxx.se/download
|
||||
$(package)_config_opts_linux=--disable-shared --enable-static --without-ssl --prefix=$(host_prefix) --host=$(host)
|
||||
$(package)_config_opts_mingw32=--enable-mingw --disable-shared --enable-static --with-wolfssl --without-ssl --prefix=$(host_prefix) --host=x86_64-w64-mingw32
|
||||
$(package)_config_opts_darwin=--disable-shared --enable-static --with-wolfssl --without-ssl --prefix=$(host_prefix)
|
||||
$(package)_config_opts_darwin=--disable-shared --enable-static --without-ssl --prefix=$(host_prefix)
|
||||
$(package)_cflags_darwin=-mmacosx-version-min=10.9
|
||||
$(package)_conf_tool=./configure
|
||||
|
||||
|
||||
@@ -4,8 +4,11 @@ $(package)_download_path=https://github.com/libevent/libevent/archive
|
||||
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
||||
$(package)_download_file=release-$($(package)_version)-stable.tar.gz
|
||||
$(package)_sha256_hash=316ddb401745ac5d222d7c529ef1eada12f58f6376a66c1118eee803cb70f83d
|
||||
$(package)_patches=detect-arch4random_addrandom.patch detect-arch4random_addrandom-fix.patch
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
patch -p1 <$($(package)_patch_dir)/detect-arch4random_addrandom.patch && \
|
||||
patch -p1 <$($(package)_patch_dir)/detect-arch4random_addrandom-fix.patch && \
|
||||
./autogen.sh
|
||||
endef
|
||||
|
||||
|
||||
@@ -9,16 +9,15 @@ $(package)_git_commit=42ba95387cdfd67399f7aac52fddb8d6e1258ee6
|
||||
$(package)_dependencies=
|
||||
$(package)_config_opts=--enable-cxx --disable-shared
|
||||
else ifeq ($(build_os),darwin)
|
||||
$(package)_download_path=https://git.hush.is/duke/$(package)/archive
|
||||
$(package)_file_name=$(package)-$($(package)_git_commit).tar.gz
|
||||
$(package)_download_file=$($(package)_git_commit).tar.gz
|
||||
$(package)_sha256_hash=59b2c2b5d58fdf5943bfde1fa709e9eb53e7e072c9699d28dc1c2cbb3c8cc32c
|
||||
$(package)_git_commit=aece03c7b6967f91f3efdac8c673f55adff53ab1
|
||||
$(package)_dependencies=
|
||||
$(package)_version=6.1.1
|
||||
$(package)_download_path=https://git.hush.is/attachments
|
||||
$(package)_file_name=d613c855-cd92-4efb-b893-658496852019
|
||||
$(package)_download_file=d613c855-cd92-4efb-b893-658496852019
|
||||
$(package)_sha256_hash=a8109865f2893f1373b0a8ed5ff7429de8db696fc451b1036bd7bdf95bbeffd6
|
||||
$(package)_config_opts=--enable-cxx --disable-shared
|
||||
else
|
||||
$(package)_version=6.1.1
|
||||
$(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
|
||||
|
||||
@@ -7,6 +7,8 @@ $(package)_file_name_darwin=rust-$($(package)_version)-x86_64-apple-darwin.tar.g
|
||||
$(package)_sha256_hash_darwin=f0dfba507192f9b5c330b5984ba71d57d434475f3d62bd44a39201e36fa76304
|
||||
$(package)_file_name_mingw32=rust-$($(package)_version)-x86_64-pc-windows-gnu.tar.gz
|
||||
$(package)_sha256_hash_mingw32=358e1435347c67dbf33aa9cad6fe501a833d6633ed5d5aa1863d5dffa0349be9
|
||||
$(package)_file_name_aarch64_linux=rust-$($(package)_version)-aarch64-unknown-linux-gnu.tar.gz
|
||||
$(package)_sha256_hash_aarch64_linux=60def40961728212da4b3a9767d5a2ddb748400e150a5f8a6d5aa0e1b8ba1cee
|
||||
|
||||
# Mapping from GCC canonical hosts to Rust targets
|
||||
# If a mapping is not present, we assume they are identical, unless $host_os is
|
||||
@@ -46,12 +48,12 @@ define $(package)_extract_cmds
|
||||
endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
bash ./install.sh --destdir=$($(package)_staging_dir) --prefix=$(host_prefix)/native --disable-ldconfig && \
|
||||
../$(canonical_host)/install.sh --destdir=$($(package)_staging_dir) --prefix=$(host_prefix)/native --disable-ldconfig
|
||||
bash ./install.sh --destdir=$($(package)_staging_dir) --prefix=$(host_prefix)/native --disable-ldconfig --without=rust-docs && \
|
||||
../$(canonical_host)/install.sh --destdir=$($(package)_staging_dir) --prefix=$(host_prefix)/native --disable-ldconfig --without=rust-docs
|
||||
endef
|
||||
else
|
||||
|
||||
define $(package)_stage_cmds
|
||||
bash ./install.sh --destdir=$($(package)_staging_dir) --prefix=$(host_prefix)/native --disable-ldconfig
|
||||
bash ./install.sh --destdir=$($(package)_staging_dir) --prefix=$(host_prefix)/native --disable-ldconfig --without=rust-docs
|
||||
endef
|
||||
endif
|
||||
|
||||
@@ -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,9 +1,9 @@
|
||||
package=wolfssl
|
||||
$(package)_version=4.7.0
|
||||
$(package)_version=4.6.0
|
||||
$(package)_download_path=https://github.com/wolfSSL/wolfssl/archive
|
||||
$(package)_download_file=v$($(package)_version)-stable.tar.gz
|
||||
$(package)_file_name=wolfssl-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=b0e740b31d4d877d540ad50cc539a8873fc41af02bd3091c4357b403f7106e31
|
||||
$(package)_sha256_hash=053aefbb02d0b06b27c5e2df6875b4b587318755b7db9d6aa8d72206b310a848
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)"
|
||||
|
||||
@@ -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
|
||||
23
depends/patches/boost/fix-Solaris.patch
Normal file
23
depends/patches/boost/fix-Solaris.patch
Normal file
@@ -0,0 +1,23 @@
|
||||
From 74fb0a26099bc51d717f5f154b37231ce7df3e98 Mon Sep 17 00:00:00 2001
|
||||
From: Rob Boehne <robb@datalogics.com>
|
||||
Date: Wed, 20 Nov 2019 11:25:20 -0600
|
||||
Subject: [PATCH] Revert change to elide a warning that caused Solaris builds to fail.
|
||||
|
||||
---
|
||||
boost/thread/pthread/thread_data.hpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/boost/thread/pthread/thread_data.hpp b/boost/thread/pthread/thread_data.hpp
|
||||
index aefbeb43c..bc9b1367a 100644
|
||||
--- a/boost/thread/pthread/thread_data.hpp
|
||||
+++ b/boost/thread/pthread/thread_data.hpp
|
||||
@@ -57,7 +57,7 @@ namespace boost
|
||||
#else
|
||||
std::size_t page_size = ::sysconf( _SC_PAGESIZE);
|
||||
#endif
|
||||
-#if PTHREAD_STACK_MIN > 0
|
||||
- if (size<PTHREAD_STACK_MIN) size=PTHREAD_STACK_MIN;
|
||||
+#ifdef PTHREAD_STACK_MIN
|
||||
+ if (size<static_cast<std::size_t>(PTHREAD_STACK_MIN)) size=PTHREAD_STACK_MIN;
|
||||
#endif
|
||||
size = ((size+page_size-1)/page_size)*page_size;
|
||||
@@ -0,0 +1,43 @@
|
||||
From 266f43af7798befa3d27bfabaa9ae699259c3924 Mon Sep 17 00:00:00 2001
|
||||
From: Azat Khuzhin <a3at.mail@gmail.com>
|
||||
Date: Mon, 27 Mar 2017 15:50:23 +0300
|
||||
Subject: [PATCH] Fix arc4random_addrandom() detecting and fallback
|
||||
(regression)
|
||||
|
||||
But this is kind of hot-fix, we definitelly need more sane arc4random
|
||||
compat layer.
|
||||
|
||||
Fixes: #488
|
||||
Introduced-in: 6541168 ("Detect arch4random_addrandom() existence")
|
||||
---
|
||||
event-config.h.cmake | 3 +++
|
||||
include/event2/util.h | 2 +-
|
||||
2 files changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/event-config.h.cmake b/event-config.h.cmake
|
||||
index b7f0be57c..5c233a3d9 100644
|
||||
--- a/event-config.h.cmake
|
||||
+++ b/event-config.h.cmake
|
||||
@@ -53,6 +53,9 @@
|
||||
/* Define to 1 if you have the `arc4random_buf' function. */
|
||||
#cmakedefine EVENT__HAVE_ARC4RANDOM_BUF 1
|
||||
|
||||
+/* Define to 1 if you have the `arc4random_addrandom' function. */
|
||||
+#cmakedefine EVENT__HAVE_ARC4RANDOM_ADDRANDOM 1
|
||||
+
|
||||
/* Define if clock_gettime is available in libc */
|
||||
#cmakedefine EVENT__DNS_USE_CPU_CLOCK_FOR_ID 1
|
||||
|
||||
diff --git a/include/event2/util.h b/include/event2/util.h
|
||||
index c4af2bd60..ca4048944 100644
|
||||
--- a/include/event2/util.h
|
||||
+++ b/include/event2/util.h
|
||||
@@ -842,7 +842,7 @@ int evutil_secure_rng_init(void);
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evutil_secure_rng_set_urandom_device_file(char *fname);
|
||||
|
||||
-#ifdef EVENT__HAVE_ARC4RANDOM_ADDRANDOM
|
||||
+#if !defined(EVENT__HAVE_ARC4RANDOM) || defined(EVENT__HAVE_ARC4RANDOM_ADDRANDOM)
|
||||
/** Seed the random number generator with extra random bytes.
|
||||
|
||||
You should almost never need to call this function; it should be
|
||||
77
depends/patches/libevent/detect-arch4random_addrandom.patch
Normal file
77
depends/patches/libevent/detect-arch4random_addrandom.patch
Normal file
@@ -0,0 +1,77 @@
|
||||
From 6541168d7037457b8e5c51cc354f11bd94e618b6 Mon Sep 17 00:00:00 2001
|
||||
From: Marek Sebera <marek.sebera@gmail.com>
|
||||
Date: Mon, 6 Mar 2017 00:55:16 +0300
|
||||
Subject: [PATCH] Detect arch4random_addrandom() existence
|
||||
|
||||
Refs: #370
|
||||
Refs: #475
|
||||
---
|
||||
CMakeLists.txt | 1 +
|
||||
configure.ac | 1 +
|
||||
evutil_rand.c | 2 ++
|
||||
include/event2/util.h | 2 ++
|
||||
4 files changed, 6 insertions(+)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index a861e7d96..f609d02d0 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -338,6 +338,7 @@ CHECK_FUNCTION_EXISTS_EX(sysctl EVENT__HAVE_SYSCTL)
|
||||
CHECK_FUNCTION_EXISTS_EX(accept4 EVENT__HAVE_ACCEPT4)
|
||||
CHECK_FUNCTION_EXISTS_EX(arc4random EVENT__HAVE_ARC4RANDOM)
|
||||
CHECK_FUNCTION_EXISTS_EX(arc4random_buf EVENT__HAVE_ARC4RANDOM_BUF)
|
||||
+CHECK_FUNCTION_EXISTS_EX(arc4random_addrandom EVENT__HAVE_ARC4RANDOM_ADDRANDOM)
|
||||
CHECK_FUNCTION_EXISTS_EX(epoll_create1 EVENT__HAVE_EPOLL_CREATE1)
|
||||
CHECK_FUNCTION_EXISTS_EX(getegid EVENT__HAVE_GETEGID)
|
||||
CHECK_FUNCTION_EXISTS_EX(geteuid EVENT__HAVE_GETEUID)
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index a127bbc91..e73c29b14 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -342,6 +342,7 @@ AC_CHECK_FUNCS([ \
|
||||
accept4 \
|
||||
arc4random \
|
||||
arc4random_buf \
|
||||
+ arc4random_addrandom \
|
||||
eventfd \
|
||||
epoll_create1 \
|
||||
fcntl \
|
||||
diff --git a/evutil_rand.c b/evutil_rand.c
|
||||
index 046a14b07..4be0b1c5e 100644
|
||||
--- a/evutil_rand.c
|
||||
+++ b/evutil_rand.c
|
||||
@@ -192,12 +192,14 @@ evutil_secure_rng_get_bytes(void *buf, size_t n)
|
||||
ev_arc4random_buf(buf, n);
|
||||
}
|
||||
|
||||
+#if !defined(EVENT__HAVE_ARC4RANDOM) || defined(EVENT__HAVE_ARC4RANDOM_ADDRANDOM)
|
||||
void
|
||||
evutil_secure_rng_add_bytes(const char *buf, size_t n)
|
||||
{
|
||||
arc4random_addrandom((unsigned char*)buf,
|
||||
n>(size_t)INT_MAX ? INT_MAX : (int)n);
|
||||
}
|
||||
+#endif
|
||||
|
||||
void
|
||||
evutil_free_secure_rng_globals_(void)
|
||||
diff --git a/include/event2/util.h b/include/event2/util.h
|
||||
index dd4bbb69d..c4af2bd60 100644
|
||||
--- a/include/event2/util.h
|
||||
+++ b/include/event2/util.h
|
||||
@@ -842,6 +842,7 @@ int evutil_secure_rng_init(void);
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evutil_secure_rng_set_urandom_device_file(char *fname);
|
||||
|
||||
+#ifdef EVENT__HAVE_ARC4RANDOM_ADDRANDOM
|
||||
/** Seed the random number generator with extra random bytes.
|
||||
|
||||
You should almost never need to call this function; it should be
|
||||
@@ -858,6 +859,7 @@ int evutil_secure_rng_set_urandom_device_file(char *fname);
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evutil_secure_rng_add_bytes(const char *dat, size_t datlen);
|
||||
+#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
@@ -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
|
||||
|
||||
115
doc/cjdns.md
Normal file
115
doc/cjdns.md
Normal file
@@ -0,0 +1,115 @@
|
||||
# CJDNS support in Hush
|
||||
|
||||
It is possible to run Hush over CJDNS, an encrypted IPv6 network that
|
||||
uses public-key cryptography for address allocation and a distributed hash table
|
||||
for routing.
|
||||
|
||||
## What is CJDNS?
|
||||
|
||||
CJDNS is like a distributed, shared VPN with multiple entry points where every
|
||||
participant can reach any other participant. All participants use addresses from
|
||||
the `fc00::/8` network (reserved IPv6 range). Installation and configuration is
|
||||
done outside of Hush, similarly to a VPN (either in the host/OS or on
|
||||
the network router). See https://github.com/cjdelisle/cjdns#readme and
|
||||
https://github.com/hyperboria/docs#hyperboriadocs for more information.
|
||||
|
||||
Compared to IPv4/IPv6, CJDNS provides end-to-end encryption and protects nodes
|
||||
from traffic analysis and filtering.
|
||||
|
||||
Used with Tor and I2P, CJDNS is a complementary option that can enhance network
|
||||
redundancy and robustness for both the Hush network and individual nodes.
|
||||
|
||||
Each network has different characteristics. For instance, Tor is widely used but
|
||||
somewhat centralized. I2P connections have a source address and I2P is slow.
|
||||
CJDNS is fast but does not hide the sender and the recipient from intermediate
|
||||
routers.
|
||||
|
||||
## Installing CJDNS and finding a peer to connect to the network
|
||||
|
||||
To install and set up CJDNS, follow the instructions at
|
||||
https://github.com/cjdelisle/cjdns#how-to-install-cjdns.
|
||||
|
||||
You need to initiate an outbound connection to a peer on the CJDNS network
|
||||
before it will work with your Hush node. This is described in steps
|
||||
["2. Find a friend"](https://github.com/cjdelisle/cjdns#2-find-a-friend) and
|
||||
["3. Connect your node to your friend's
|
||||
node"](https://github.com/cjdelisle/cjdns#3-connect-your-node-to-your-friends-node)
|
||||
in the CJDNS documentation.
|
||||
|
||||
One quick way to accomplish these two steps is to query for available public
|
||||
peers on [Hyperboria](https://github.com/hyperboria) by running the following:
|
||||
|
||||
```
|
||||
git clone https://github.com/hyperboria/peers hyperboria-peers
|
||||
cd hyperboria-peers
|
||||
./testAvailable.py
|
||||
```
|
||||
|
||||
For each peer, the `./testAvailable.py` script prints the filename of the peer's
|
||||
credentials followed by the ping result.
|
||||
|
||||
Choose one or several peers, copy their credentials from their respective files,
|
||||
paste them into the relevant IPv4 or IPv6 "connectTo" JSON object in the
|
||||
`cjdroute.conf` file you created in step ["1. Generate a new configuration
|
||||
file"](https://github.com/cjdelisle/cjdns#1-generate-a-new-configuration-file),
|
||||
and save the file.
|
||||
|
||||
## Launching CJDNS
|
||||
|
||||
Typically, CJDNS might be launched from its directory with
|
||||
`sudo ./cjdroute < cjdroute.conf` and it sheds permissions after setting up the
|
||||
[TUN](https://en.wikipedia.org/wiki/TUN/TAP) interface. You may also [launch it as an
|
||||
unprivileged user](https://github.com/cjdelisle/cjdns/blob/master/doc/non-root-user.md)
|
||||
with some additional setup.
|
||||
|
||||
The network connection can be checked by running `./tools/peerStats` from the
|
||||
CJDNS directory.
|
||||
|
||||
## Run Hush with CJDNS
|
||||
|
||||
Once you are connected to the CJDNS network, the following Hush
|
||||
configuration option makes CJDNS peers automatically reachable:
|
||||
|
||||
```
|
||||
-cjdnsreachable
|
||||
```
|
||||
|
||||
When enabled, this option tells Hush that it is running in an
|
||||
environment where a connection to an `fc00::/8` address will be to the CJDNS
|
||||
network instead of to an [RFC4193](https://datatracker.ietf.org/doc/html/rfc4193)
|
||||
IPv6 local network. This helps Hush perform better address management:
|
||||
- Your node can consider incoming `fc00::/8` connections to be from the CJDNS
|
||||
network rather than from an IPv6 private one.
|
||||
- If one of your node's local addresses is `fc00::/8`, then it can choose to
|
||||
gossip that address to peers.
|
||||
|
||||
## Additional configuration options related to CJDNS
|
||||
|
||||
```
|
||||
-onlynet=cjdns
|
||||
```
|
||||
|
||||
Make automatic outbound connections only to CJDNS addresses. Inbound and manual
|
||||
connections are not affected by this option. It can be specified multiple times
|
||||
to allow multiple networks, e.g. onlynet=cjdns, onlynet=i2p, onlynet=onion.
|
||||
|
||||
CJDNS support was added to Hush in version 3.9.3 and there may be fewer
|
||||
CJDNS peers than Tor or IP ones. You can use `hush-cli -addrinfo` to see the
|
||||
number of CJDNS addresses known to your node.
|
||||
|
||||
In general, a node can be run with both an onion service and CJDNS (or any/all
|
||||
of IPv4/IPv6/onion/I2P/CJDNS), which can provide a potential fallback if one of
|
||||
the networks has issues. There are a number of ways to configure this; see
|
||||
[doc/tor.md](https://git.hush.is/hush/hush3/src/branch/master/doc/tor.md) for
|
||||
details.
|
||||
|
||||
## CJDNS-related information in Hush
|
||||
|
||||
There are several ways to see your CJDNS address in Hush:
|
||||
- in the "Local addresses" output of CLI `-netinfo`
|
||||
- in the "localaddresses" output of RPC `getnetworkinfo`
|
||||
|
||||
To see which CJDNS peers your node is connected to, use `hush-cli -netinfo 4`
|
||||
or the `getpeerinfo` RPC (i.e. `hush-cli getpeerinfo`).
|
||||
|
||||
You can use the `getnodeaddresses` RPC to fetch a number of CJDNS peers known to your node; run `hush-cli help getnodeaddresses` for details.
|
||||
79
doc/config.md
Normal file
79
doc/config.md
Normal file
@@ -0,0 +1,79 @@
|
||||
# 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 and Stratum server options
|
||||
|
||||
These options are only of interest to solo miners and mining pool operators....
|
||||
|
||||
## stratum
|
||||
|
||||
Defaults to off. This option enables a Stratum server.
|
||||
|
||||
## stratumaddress=<address>
|
||||
|
||||
Defaults to none. This option sets a Stratum Mining address to use when special address of 'x' is sent by miner.
|
||||
|
||||
## stratumbind=<ipaddr>
|
||||
|
||||
Defaults to: bind to all interfaces. This option Binds to given address to listen for Stratum work requests. Use [host]:port notation for IPv6. This option can be specified multiple times.
|
||||
|
||||
## stratumport=<port>
|
||||
|
||||
Defaults to 19031 or 19031 for testnet. This option sets the <port> to listen for Stratum work requests on.
|
||||
|
||||
## stratumallowip=<ip>
|
||||
|
||||
No default. This option allows Stratum work requests from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times.
|
||||
|
||||
# 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
|
||||
@@ -1,5 +1,135 @@
|
||||
Coding
|
||||
====================
|
||||
# Fresh sync
|
||||
|
||||
Many times, you will want to do a "fresh sync" test, to verify code works when syncing from the genesis block, which is a different code path than a "partial sync" which means you already have part of blockchain history and are "catching up" to get in sync.
|
||||
|
||||
A "fresh sync" goes thru the Initial Blockchain Download (IBD) optimized codepath and is often faster than than rescanning all of history. Fresh sync and partial sync testing any important change should be done for all important changes.
|
||||
|
||||
A fresh sync preserves peers.dat, so it will always be faster than a "fresh clone", which has to learn enough p2p peers to being syncing, which can often add many minutes to completing a sync. When code related to peers.dat changes (such in the `p2p` branch) then doing a fresh clone is needed to fully test it.
|
||||
|
||||
One way to do a fresh sync is:
|
||||
|
||||
```
|
||||
cd ~/.hush/HUSH3
|
||||
rm blocks chainstate database notarizations hushstate
|
||||
```
|
||||
|
||||
NOTE: The legacy directory is ~/.komodo/HUSH3 and hushd will use data from either, or ~/.hush/HUSH3 if both exist.
|
||||
|
||||
If you are using `zindex=1` then you need to also delete zindex.dat
|
||||
|
||||
```
|
||||
cd ~/.hush/HUSH3
|
||||
rm zindex.dat blocks chainstate database notarizations hushstate
|
||||
```
|
||||
|
||||
It's possible to confused hush if you ran old code, stop, restart, and then write out zindex.dat that is incorrect, which later hushds will load from disk and believe.
|
||||
|
||||
# Parsing RPC output with jq
|
||||
|
||||
jq is a very useful tool to parse JSON output, install it with:
|
||||
|
||||
apt install jq
|
||||
|
||||
Let's say you want to parse a very large output from `listunspent` which has spendable and
|
||||
unspendable funds mixed together. This can happen when you import a viewing key. Funds from
|
||||
the address of a viewing key will have `spendable = false` :
|
||||
|
||||
|
||||
hush-cli listunspent|jq '.[] | {spendable, address, amount} | select(.spendable != false)'
|
||||
|
||||
The above command will only show spendable UTXOs. The jq language is very powerful and is very
|
||||
useful for devops and developer scripts.
|
||||
|
||||
The jq manual can be found here: https://stedolan.github.io/jq/manual/
|
||||
|
||||
|
||||
# Making a new release of Hush
|
||||
|
||||
See doc/release-process.md for details.
|
||||
|
||||
|
||||
# Testing a Branch
|
||||
|
||||
To test a branch called `zindexdb` with a fresh clone:
|
||||
|
||||
```
|
||||
# TODO: this should probably become a script in ./contrib
|
||||
git clone https://git.hush.is/hush/hush3 hush3-testing
|
||||
cd hush3-testing
|
||||
git checkout zindexdb
|
||||
# you need 2GB RAM free per -jN
|
||||
./build.sh -j2; make; make; make # this deals with build-system race condition bugs
|
||||
|
||||
# we want to test a fresh sync, so backup current data
|
||||
TIME=`perl -e "print time"`
|
||||
mv ~/.hush/{HUSH3,HUSH3-backup-$TIME}
|
||||
mkdir ~/.hush/HUSH3
|
||||
|
||||
# Use your previous config as a base
|
||||
cp ~/.hush/{HUSH3-backup-$TIME,HUSH3}/HUSH3.conf
|
||||
# Add zindex to your node
|
||||
echo "zindex=1" >> ~/.hush/HUSH3/HUSH3.conf
|
||||
|
||||
|
||||
# This is optional but will likely speed up sync time greatly
|
||||
cp ~/.hush/{HUSH3-backup,HUSH3}/peers.dat
|
||||
|
||||
# This log file is helpful for debugging more and will contain a history of the
|
||||
# size of the anonset at every block height
|
||||
./src/hushd &> hushd.log &
|
||||
# to look at the log
|
||||
tail -f hushd.log
|
||||
```
|
||||
|
||||
To get a CSV file of the value of the anonset size for every block height:
|
||||
```
|
||||
grep anonset hushd.log | cut -d= -f2 > anonset.csv
|
||||
```
|
||||
|
||||
This only needs to be calculated once, if we can verify it's correct. These are historical values that do not change. The goal is a web page with a historical view of the HUSH anonset size.
|
||||
|
||||
|
||||
These values should match on all nodes:
|
||||
|
||||
```
|
||||
46913,2547,2253,294
|
||||
46914,2549,2254,295
|
||||
46915,2549,2254,295
|
||||
46916,2553,2257,296
|
||||
46917,2553,2257,296
|
||||
```
|
||||
|
||||
We should also check a recent block height to verify it's working correctly. The big "test" for this `zindexdb` branch is:
|
||||
|
||||
* If you stop a node, and restart, are the stats from `getchaintxtstats` correct, i.e. the anonset stats? For instance, `shielded_pool_size` should be close to 500000, if it's close to or exactly 0, something is wrong.
|
||||
* Is there a new file called `zindex.dat` in `~/.hush/HUSH3/` ?
|
||||
* Is `zindex.dat` 149 bytes ?
|
||||
|
||||
# Adding a PoW algorithm
|
||||
|
||||
We will describe here the high-level ideas on how to add a new PoW algorithm to
|
||||
the Hush codebase. Adding a new PoW algo means adding a new option to the `-ac_algo`
|
||||
CLI param for HSC's.
|
||||
|
||||
* Add the new value to the end of the `ASSETCHAINS_ALGORITHMS` array in `src/hush_utils.h`
|
||||
* You cannot add it to the front because the first element is the default "equihash"
|
||||
* You will also need to add a new constant, such as `ASSETCHAINS_FOOHASH` to `src/hush_globals.h`
|
||||
* Increase the value of `ASSETCHAINS_NUMALGOS` by one
|
||||
* This value cannot be automatically be determined by the length of the above array because Equihash has different supported variants of (N,K) values
|
||||
* Add the new PoW mining library to a subdirectory in src, such as RandomX official code being in `src/RandomX`
|
||||
* The largest part of adding a new PoW algo is adding a new class to src/miner.cpp
|
||||
* Originally there was only BitcoinMiner, which was modified from a double-sha256 miner to an equihash miner, without changing the name
|
||||
* When RandomX was added as an option, many big internals changes were needed to support more than a single miner class
|
||||
* It is now easier to add PoW algos because the internals support using different miner classes
|
||||
* Currently BitcoinMiner and RandomXMiner classes have a lot of duplicated code, but this is intentional
|
||||
* In theory we could refactor the miner classes to share more code, but this means changes to one miner could break another and it is very challenging to test every possibile edge case for mining code
|
||||
* So code duplication is purposeful, because it isolates the risk of breaking one PoW by changing another. We tried very hard to not break Equihash mining when adding RandomX mining.
|
||||
* When adding a new mining class, copying the RandomXMiner class is best, since it's newer and does not contain various legacy code that still exists in BitcoinMiner
|
||||
* So copy RandomXMiner to your new FooMiner, delete all the randomx-specific stuff and add in the PoW mining code
|
||||
* Some other changes to src/miner.cpp will be needed
|
||||
* Update `GenerateBitcoins` function to start mining threads with your new algo with `else if(ASSETCHAINS_ALGO == ASSETCHAINS_FOOHASH) { minerThreads->create_thread(&FooMiner)}`
|
||||
|
||||
# Coding
|
||||
|
||||
Various coding styles have been used during the history of the codebase,
|
||||
and the result is not very consistent. However, we're now trying to converge to
|
||||
@@ -36,59 +166,6 @@ class Class
|
||||
}
|
||||
```
|
||||
|
||||
Doxygen comments
|
||||
-----------------
|
||||
|
||||
To facilitate the generation of documentation, use doxygen-compatible comment blocks for functions, methods and fields.
|
||||
|
||||
For example, to describe a function use:
|
||||
```c++
|
||||
/**
|
||||
* ... text ...
|
||||
* @param[in] arg1 A description
|
||||
* @param[in] arg2 Another argument description
|
||||
* @pre Precondition for function...
|
||||
*/
|
||||
bool function(int arg1, const char *arg2)
|
||||
```
|
||||
A complete list of `@xxx` commands can be found at http://www.stack.nl/~dimitri/doxygen/manual/commands.html.
|
||||
As Doxygen recognizes the comments by the delimiters (`/**` and `*/` in this case), you don't
|
||||
*need* to provide any commands for a comment to be valid; just a description text is fine.
|
||||
|
||||
To describe a class use the same construct above the class definition:
|
||||
```c++
|
||||
/**
|
||||
* Alerts are for notifying old versions if they become too obsolete and
|
||||
* need to upgrade. The message is displayed in the status bar.
|
||||
* @see GetWarnings()
|
||||
*/
|
||||
class CAlert
|
||||
{
|
||||
```
|
||||
|
||||
To describe a member or variable use:
|
||||
```c++
|
||||
int var; //!< Detailed description after the member
|
||||
```
|
||||
|
||||
Also OK:
|
||||
```c++
|
||||
///
|
||||
/// ... text ...
|
||||
///
|
||||
bool function2(int arg1, const char *arg2)
|
||||
```
|
||||
|
||||
Not OK (used plenty in the current source, but not picked up):
|
||||
```c++
|
||||
//
|
||||
// ... text ...
|
||||
//
|
||||
```
|
||||
|
||||
A full list of comment syntaxes picked up by doxygen can be found at http://www.stack.nl/~dimitri/doxygen/manual/docblocks.html,
|
||||
but if possible use one of the above styles.
|
||||
|
||||
Development tips and tricks
|
||||
---------------------------
|
||||
|
||||
@@ -107,8 +184,9 @@ on all categories (and give you a very large debug.log file).
|
||||
|
||||
**testnet and regtest modes**
|
||||
|
||||
Run with the -testnet option to run with "play zcash" on the test network, if you
|
||||
are testing multi-machine code that needs to operate across the internet.
|
||||
Run with the -testnet option to run with "play HUSH" on the test network, if you
|
||||
are testing multi-machine code that needs to operate across the internet. You can
|
||||
also make a Hush Smart Chain "testcoin" with a single command: `hushd -ac_name=COIN ...`
|
||||
|
||||
If you are testing something that can run on one machine, run with the -regtest option.
|
||||
In regression test mode, blocks can be created on-demand; see qa/rpc-tests/ for tests
|
||||
|
||||
@@ -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
|
||||
35
doc/hushd-systemd.md
Normal file
35
doc/hushd-systemd.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# Systemd script for the Hush daemon
|
||||
|
||||
## Set it up
|
||||
|
||||
First set it up as follows:
|
||||
* Copy hushd.service to the systemd user directory, which is /usr/lib/systemd/user directory
|
||||
|
||||
## Basic Usage
|
||||
|
||||
How to start the script:
|
||||
`systemctl start --user hushd.service`
|
||||
|
||||
How to stop the script:
|
||||
`systemctl stop --user hushd.service`
|
||||
|
||||
How to restart the script:
|
||||
`systemctl restart --user hushd.service`
|
||||
|
||||
## How to watch it as it starts
|
||||
|
||||
Use the following on most Linux distros:
|
||||
`watch systemctl status --user hushd.service`
|
||||
|
||||
If you're using Ubuntu 20.04, then try this instead as the above did not work for me on Ubuntu 20.04 server:
|
||||
`tail -f ~/.hush/HUSH3/debug.log`
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
* Don't run it with sudo or root, or it won't work with the wallet.
|
||||
|
||||
### To-do
|
||||
|
||||
* Determine why Ubuntu 20.04 didn't produce the expected outcome with watch and systemctl
|
||||
* Create the hushd rc.d script
|
||||
* Create the hushd runit script
|
||||
9
doc/hushd.service
Normal file
9
doc/hushd.service
Normal file
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Hush daemon
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/hushd
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
200
doc/i2p.md
Normal file
200
doc/i2p.md
Normal file
@@ -0,0 +1,200 @@
|
||||
# I2P support in Hush
|
||||
|
||||
It is possible to run a Hush or HSC full node as an
|
||||
[I2P (Invisible Internet Project)](https://en.wikipedia.org/wiki/I2P)
|
||||
service and connect to such services.
|
||||
|
||||
This [glossary](https://geti2p.net/en/about/glossary) may be useful to get
|
||||
started with I2P terminology.
|
||||
|
||||
## Run with an I2P router (proxy)
|
||||
|
||||
A running I2P router (proxy) with [SAM](https://geti2p.net/en/docs/api/samv3)
|
||||
enabled is required. Options include:
|
||||
|
||||
- [i2prouter (I2P Router)](https://geti2p.net), the official implementation in
|
||||
Java
|
||||
- [i2pd (I2P Daemon)](https://github.com/PurpleI2P/i2pd)
|
||||
([documentation](https://i2pd.readthedocs.io/en/latest)), a lighter
|
||||
alternative in C++ (successfully tested with version 2.23 and up; version 2.36
|
||||
or later recommended)
|
||||
- [i2p-zero](https://github.com/i2p-zero/i2p-zero)
|
||||
- [other alternatives](https://en.wikipedia.org/wiki/I2P#Routers)
|
||||
|
||||
Note the IP address and port the SAM proxy is listening to; usually, it is
|
||||
`127.0.0.1:7656`.
|
||||
|
||||
Once an I2P router with SAM enabled is up and running, use the following
|
||||
configuration options:
|
||||
|
||||
```
|
||||
-i2psam=<ip:port>
|
||||
I2P SAM proxy to reach I2P peers and accept I2P connections (default:
|
||||
none)
|
||||
|
||||
-i2pacceptincoming
|
||||
Whether to accept inbound I2P connections (default: 1). Ignored if
|
||||
-i2psam is not set. Listening for inbound I2P connections is
|
||||
done through the SAM proxy, not by binding to a local address and
|
||||
port.
|
||||
```
|
||||
|
||||
In a typical situation, this suffices:
|
||||
|
||||
```
|
||||
hushd -i2psam=127.0.0.1:7656
|
||||
```
|
||||
|
||||
The first time hushd connects to the I2P router, if
|
||||
`-i2pacceptincoming=1`, then it will automatically generate a persistent I2P
|
||||
address and its corresponding private key. The private key will be saved in a
|
||||
file named `i2p_private_key` in the Hush data directory. The persistent
|
||||
I2P address is used for accepting incoming connections and for making outgoing
|
||||
connections if `-i2pacceptincoming=1`. If `-i2pacceptincoming=0` then only
|
||||
outbound I2P connections are made and a different transient I2P address is used
|
||||
for each connection to improve privacy.
|
||||
|
||||
## Additional configuration options related to I2P
|
||||
|
||||
```
|
||||
-debug=i2p
|
||||
```
|
||||
|
||||
Set the `debug=i2p` config logging option to see additional information in the
|
||||
debug log about your I2P configuration and connections.
|
||||
|
||||
```
|
||||
-onlynet=i2p
|
||||
```
|
||||
|
||||
Make automatic outbound connections only to I2P addresses. Inbound and manual
|
||||
connections are not affected by this option. It can be specified multiple times
|
||||
to allow multiple networks, e.g. onlynet=onion, onlynet=i2p.
|
||||
|
||||
I2P support was added to Hush in version 3.9.3 and there may be fewer I2P
|
||||
peers than Tor or IP ones. Therefore, using I2P alone without other networks may
|
||||
make a node more susceptible to [Sybil
|
||||
attacks](https://en.bitcoin.it/wiki/Weaknesses#Sybil_attack).
|
||||
|
||||
Another consideration with `onlynet=i2p` is that the initial blocks download
|
||||
phase when syncing up a new node can be very slow. This phase can be sped up by
|
||||
using other networks, for instance `onlynet=onion`, at the same time.
|
||||
|
||||
In general, a node can be run with both onion and I2P hidden services (or
|
||||
any/all of IPv4/IPv6/onion/I2P/CJDNS), which can provide a potential fallback if
|
||||
one of the networks has issues.
|
||||
|
||||
## Persistent vs transient I2P addresses
|
||||
|
||||
In I2P connections, the connection receiver sees the I2P address of the
|
||||
connection initiator. This is unlike the Tor network where the recipient does
|
||||
not know who is connecting to them and can't tell if two connections are from
|
||||
the same peer or not.
|
||||
|
||||
If an I2P node is not accepting incoming connections, then Hush uses
|
||||
random, one-time, transient I2P addresses for itself for outbound connections
|
||||
to make it harder to discriminate, fingerprint or analyze it based on its I2P
|
||||
address.
|
||||
|
||||
## Additional configuration options related to I2P
|
||||
|
||||
```
|
||||
-debug=i2p
|
||||
```
|
||||
|
||||
Set the `debug=i2p` config logging option to see additional information in the
|
||||
debug log about your I2P configuration and connections. Run `hush-cli help
|
||||
logging` for more information.
|
||||
|
||||
```
|
||||
-onlynet=i2p
|
||||
```
|
||||
|
||||
Make automatic outbound connections only to I2P addresses. Inbound and manual
|
||||
connections are not affected by this option. It can be specified multiple times
|
||||
to allow multiple networks, e.g. onlynet=onion, onlynet=i2p.
|
||||
|
||||
I2P support was added to Hush in version 3.9.3 and there may be fewer I2P
|
||||
peers than Tor or IP ones. Therefore, using I2P alone without other networks may
|
||||
make a node more susceptible to [Sybil
|
||||
attacks](https://en.bitcoin.it/wiki/Weaknesses#Sybil_attack). You can use
|
||||
`hush-cli -addrinfo` to see the number of I2P addresses known to your node.
|
||||
|
||||
Another consideration with `onlynet=i2p` is that the initial blocks download
|
||||
phase when syncing up a new node can be very slow. This phase can be sped up by
|
||||
using other networks, for instance `onlynet=onion`, at the same time.
|
||||
|
||||
In general, a node can be run with both onion and I2P hidden services (or
|
||||
any/all of IPv4/IPv6/onion/I2P/CJDNS), which can provide a potential fallback if
|
||||
one of the networks has issues.
|
||||
|
||||
## I2P-related information
|
||||
|
||||
There are several ways to see your I2P address if accepting
|
||||
incoming I2P connections (`-i2pacceptincoming`):
|
||||
- in the "Local addresses" output of CLI `-netinfo`
|
||||
- in the "localaddresses" output of RPC `getnetworkinfo`
|
||||
- in the debug log (grep for `AddLocal`; the I2P address ends in `.b32.i2p`)
|
||||
|
||||
To see which I2P peers your node is connected to, use `hush-cli -netinfo 4`
|
||||
or the `getpeerinfo` RPC (e.g. `hush-cli getpeerinfo`).
|
||||
|
||||
To see which I2P addresses your node knows, use the `getnodeaddresses 0 i2p`
|
||||
RPC.
|
||||
|
||||
## Compatibility
|
||||
|
||||
Hush uses the [SAM v3.1](https://geti2p.net/en/docs/api/samv3) protocol
|
||||
to connect to the I2P network. Any I2P router that supports it can be used.
|
||||
|
||||
## Ports in I2P and Hush
|
||||
|
||||
Hush uses the [SAM v3.1](https://geti2p.net/en/docs/api/samv3)
|
||||
protocol. One particularity of SAM v3.1 is that it does not support ports,
|
||||
unlike newer versions of SAM (v3.2 and up) that do support them and default the
|
||||
port numbers to 0. From the point of view of peers that use newer versions of
|
||||
SAM or other protocols that support ports, a SAM v3.1 peer is connecting to them
|
||||
on port 0, from source port 0.
|
||||
|
||||
To allow future upgrades to newer versions of SAM, Hush sets its
|
||||
listening port to 0 when listening for incoming I2P connections and advertises
|
||||
its own I2P address with port 0. Furthermore, it will not attempt to connect to
|
||||
I2P addresses with a non-zero port number because with SAM v3.1 the destination
|
||||
port (`TO_PORT`) is always set to 0 and is not in the control of Hush.
|
||||
|
||||
## Bandwidth
|
||||
|
||||
By default, your node shares bandwidth and transit tunnels with the I2P network
|
||||
in order to increase your anonymity with cover traffic, help the I2P router used
|
||||
by your node integrate optimally with the network, and give back to the network.
|
||||
It's important that the nodes of a popular application like Hush contribute
|
||||
as much to the I2P network as they consume.
|
||||
|
||||
It is possible, though strongly discouraged, to change your I2P router
|
||||
configuration to limit the amount of I2P traffic relayed by your node.
|
||||
|
||||
With `i2pd`, this can be done by adjusting the `bandwidth`, `share` and
|
||||
`transittunnels` options in your `i2pd.conf` file. For example, to limit total
|
||||
I2P traffic to 256KB/s and share 50% of this limit for a maximum of 20 transit
|
||||
tunnels:
|
||||
|
||||
```
|
||||
bandwidth = 256
|
||||
share = 50
|
||||
|
||||
[limits]
|
||||
transittunnels = 20
|
||||
```
|
||||
|
||||
Similar bandwidth configuration options for the Java I2P router can be found in
|
||||
`http://127.0.0.1:7657/config` under the "Bandwidth" tab.
|
||||
|
||||
Before doing this, please see the "Participating Traffic Considerations" section
|
||||
in [Embedding I2P in your Application](https://geti2p.net/en/docs/applications/embedding).
|
||||
|
||||
In most cases, the default router settings should work fine.
|
||||
|
||||
## Bundling I2P in a Hush application
|
||||
|
||||
Please see the "General Guidance for Developers" section in https://geti2p.net/en/docs/api/samv3
|
||||
if you are developing a downstream application that may be bundling I2P with Hush.
|
||||
@@ -1 +1 @@
|
||||
dist_man1_MANS=komodod.1 komodo-cli.1 komodo-tx.1
|
||||
dist_man1_MANS=hushd.1 hush-cli.1 hush-tx.1
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.10.
|
||||
.TH HUSH-CLI "1" "March 2021" "hush-cli v3.7.0" "User Commands"
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
|
||||
.TH HUSH-CLI "1" "January 2024" "hush-cli v3.10.1" "User Commands"
|
||||
.SH NAME
|
||||
hush-cli \- manual page for hush-cli v3.7.0
|
||||
hush-cli \- manual page for hush-cli v3.10.1
|
||||
.SH DESCRIPTION
|
||||
Hush RPC client version v3.7.0\-af5f461d0
|
||||
Hush RPC client version v3.10.1\-05ee31891\-dirty
|
||||
.PP
|
||||
In order to ensure you are adequately protecting your privacy when using Hush,
|
||||
please see <https://hush.is/security/>.
|
||||
@@ -25,11 +25,11 @@ This help message
|
||||
.HP
|
||||
\fB\-conf=\fR<file>
|
||||
.IP
|
||||
Specify configuration file (default: komodo.conf)
|
||||
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
|
||||
@@ -38,8 +38,8 @@ Use the test network
|
||||
\fB\-regtest\fR
|
||||
.IP
|
||||
Enter regression test mode, which uses a special chain in which blocks
|
||||
can be solved instantly. This is intended for regression testing tools
|
||||
and app development.
|
||||
can be solved instantly. This is intended for regression testing
|
||||
tools and app development.
|
||||
.HP
|
||||
\fB\-rpcconnect=\fR<ip>
|
||||
.IP
|
||||
@@ -47,7 +47,7 @@ Send commands to node running on <ip> (default: 127.0.0.1)
|
||||
.HP
|
||||
\fB\-rpcport=\fR<port>
|
||||
.IP
|
||||
Connect to JSON\-RPC on <port> (default: 8232 or testnet: 18232)
|
||||
Connect to JSON\-RPC on <port> (default: 18030 )
|
||||
.HP
|
||||
\fB\-rpcwait\fR
|
||||
.IP
|
||||
@@ -75,9 +75,12 @@ Read extra arguments from standard input, one per line until EOF/Ctrl\-D
|
||||
In order to ensure you are adequately protecting your privacy when using Hush,
|
||||
please see <https://hush.is/security/>.
|
||||
|
||||
Copyright (C) 2016-2021 Duke Leto and The Hush Developers
|
||||
Copyright (C) 2016-2024 Duke Leto and The Hush Developers
|
||||
|
||||
Copyright (C) 2016-2020 jl777 and SuperNET developers
|
||||
|
||||
Copyright (C) 2016-2018 The Zcash developers
|
||||
|
||||
Copyright (C) 2009-2014 The Bitcoin Core developers
|
||||
|
||||
This is experimental Free Software! Fuck Yeah!!!!!
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.10.
|
||||
.TH HUSH-TX "1" "March 2021" "hush-tx v3.7.0" "User Commands"
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
|
||||
.TH HUSH-TX "1" "January 2024" "hush-tx v3.10.1" "User Commands"
|
||||
.SH NAME
|
||||
hush-tx \- manual page for hush-tx v3.7.0
|
||||
hush-tx \- manual page for hush-tx v3.10.1
|
||||
.SH DESCRIPTION
|
||||
hush\-tx utility version v3.7.0\-af5f461d0
|
||||
hush\-tx utility version v3.10.1\-05ee31891\-dirty
|
||||
.SS "Usage:"
|
||||
.TP
|
||||
hush\-tx [options] <hex\-tx> [commands]
|
||||
@@ -72,7 +72,8 @@ sign=HEIGHT:SIGHASH\-FLAGS
|
||||
.IP
|
||||
Add zero or more signatures to transaction. This command requires JSON
|
||||
registers:prevtxs=JSON object, privatekeys=JSON object. See
|
||||
signrawtransaction docs for format of sighash flags, JSON objects.
|
||||
signrawtransaction docs for format of sighash flags, JSON
|
||||
objects.
|
||||
.PP
|
||||
Register Commands:
|
||||
.IP
|
||||
@@ -88,9 +89,12 @@ Set register NAME to given JSON\-STRING
|
||||
In order to ensure you are adequately protecting your privacy when using Hush,
|
||||
please see <https://hush.is/security/>.
|
||||
|
||||
Copyright (C) 2016-2021 Duke Leto and The Hush Developers
|
||||
Copyright (C) 2016-2024 Duke Leto and The Hush Developers
|
||||
|
||||
Copyright (C) 2016-2020 jl777 and SuperNET developers
|
||||
|
||||
Copyright (C) 2016-2018 The Zcash developers
|
||||
|
||||
Copyright (C) 2009-2014 The Bitcoin Core developers
|
||||
|
||||
This is experimental Free Software! Fuck Yeah!!!!!
|
||||
|
||||
236
doc/man/hushd.1
236
doc/man/hushd.1
@@ -1,9 +1,9 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.10.
|
||||
.TH HUSHD "1" "March 2021" "hushd v3.7.0" "User Commands"
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
|
||||
.TH HUSHD "1" "January 2024" "hushd v3.10.1" "User Commands"
|
||||
.SH NAME
|
||||
hushd \- manual page for hushd v3.7.0
|
||||
hushd \- manual page for hushd v3.10.1
|
||||
.SH DESCRIPTION
|
||||
Hush Daemon version v3.7.0\-af5f461d0
|
||||
Hush Daemon version v3.10.1\-05ee31891\-dirty
|
||||
.PP
|
||||
In order to ensure you are adequately protecting your privacy when using Hush,
|
||||
please see <https://hush.is/security/>.
|
||||
@@ -17,11 +17,6 @@ Start a Hush Daemon
|
||||
.IP
|
||||
This help message
|
||||
.HP
|
||||
\fB\-alertnotify=\fR<cmd>
|
||||
.IP
|
||||
Execute command when a relevant alert is received or we see a really
|
||||
long fork (%s in cmd is replaced by message)
|
||||
.HP
|
||||
\fB\-blocknotify=\fR<cmd>
|
||||
.IP
|
||||
Execute command when the best block changes (%s in cmd is replaced by
|
||||
@@ -49,7 +44,7 @@ Run in the background as a daemon and accept commands
|
||||
.HP
|
||||
\fB\-datadir=\fR<dir>
|
||||
.IP
|
||||
Specify data directory
|
||||
Specify data directory (this path cannot use '~')
|
||||
.HP
|
||||
\fB\-exportdir=\fR<dir>
|
||||
.IP
|
||||
@@ -63,15 +58,23 @@ Set database cache size in megabytes (4 to 16384, default: 512)
|
||||
.IP
|
||||
Imports blocks from external blk000??.dat file on startup
|
||||
.HP
|
||||
\fB\-maxdebugfilesize=\fR<n>
|
||||
.IP
|
||||
Set the max size of the debug.log file (default: 15)
|
||||
.HP
|
||||
\fB\-maxorphantx=\fR<n>
|
||||
.IP
|
||||
Keep at most <n> unconnectable transactions in memory (default: 100)
|
||||
.HP
|
||||
\fB\-maxreorg=\fR<n>
|
||||
.IP
|
||||
Specify the maximum length of a blockchain re\-organization
|
||||
.HP
|
||||
\fB\-mempooltxinputlimit=\fR<n>
|
||||
.IP
|
||||
[DEPRECATED FROM OVERWINTER] Set the maximum number of transparent
|
||||
inputs in a transaction that the mempool will accept (default: 0 = no
|
||||
limit applied)
|
||||
[DEPRECATED/IGNORED] Set the maximum number of transparent inputs in a
|
||||
transaction that the mempool will accept (default: 0 = no limit
|
||||
applied)
|
||||
.HP
|
||||
\fB\-par=\fR<n>
|
||||
.IP
|
||||
@@ -90,10 +93,10 @@ transaction id)
|
||||
\fB\-prune=\fR<n>
|
||||
.IP
|
||||
Reduce storage requirements by pruning (deleting) old blocks. This mode
|
||||
disables wallet support and is incompatible with \fB\-txindex\fR. Warning:
|
||||
Reverting this setting requires re\-downloading the entire blockchain.
|
||||
(default: 0 = disable pruning blocks, >550 = target size in MiB to use
|
||||
for block files)
|
||||
disables wallet support and is incompatible with \fB\-txindex\fR.
|
||||
Warning: Reverting this setting requires re\-downloading the
|
||||
entire blockchain. (default: 0 = disable pruning blocks, >550 =
|
||||
target size in MiB to use for block files)
|
||||
.HP
|
||||
\fB\-reindex\fR
|
||||
.IP
|
||||
@@ -117,7 +120,7 @@ is replaced by transaction hex)
|
||||
\fB\-addressindex\fR
|
||||
.IP
|
||||
Maintain a full address index, used to query for the balance, txids and
|
||||
unspent outputs for addresses (default: 1)
|
||||
unspent outputs for addresses (default: 0)
|
||||
.HP
|
||||
\fB\-timestampindex\fR
|
||||
.IP
|
||||
@@ -127,7 +130,7 @@ by a range of timestamps (default: 0)
|
||||
\fB\-spentindex\fR
|
||||
.IP
|
||||
Maintain a full spent index, used to query the spending txid and input
|
||||
index for an outpoint (default: 1)
|
||||
index for an outpoint (default: 0)
|
||||
.HP
|
||||
\fB\-zindex\fR
|
||||
.IP
|
||||
@@ -142,9 +145,9 @@ Add a node to connect to and attempt to keep the connection open
|
||||
.HP
|
||||
\fB\-asmap=\fR<file>
|
||||
.IP
|
||||
Specify asn mapping used for bucketing of the peers (default:
|
||||
asmap.dat). Relative paths will be prefixed by the net\-specific datadir
|
||||
location.
|
||||
Specify ASN mapping used for bucketing of the peers (default:
|
||||
asmap.dat). Relative paths will be prefixed by the net\-specific
|
||||
datadir location.
|
||||
.HP
|
||||
\fB\-banscore=\fR<n>
|
||||
.IP
|
||||
@@ -192,7 +195,7 @@ Accept connections from outside (default: 1 if no \fB\-proxy\fR or \fB\-connect\
|
||||
.HP
|
||||
\fB\-listenonion\fR
|
||||
.IP
|
||||
Automatically create Tor hidden service (default: 0)
|
||||
Automatically create Tor hidden service (default: 1)
|
||||
.HP
|
||||
\fB\-maxconnections=\fR<n>
|
||||
.IP
|
||||
@@ -211,9 +214,36 @@ Maximum per\-connection send buffer, <n>*1000 bytes (default: 1000)
|
||||
Use separate SOCKS5 proxy to reach peers via Tor hidden services
|
||||
(default: \fB\-proxy\fR)
|
||||
.HP
|
||||
\fB\-nspv_msg\fR
|
||||
.IP
|
||||
Enable NSPV messages processing (default: true when \fB\-ac_private\fR=\fI\,1\/\fR,
|
||||
otherwise false)
|
||||
.HP
|
||||
\fB\-i2psam=\fR<ip:port>
|
||||
.IP
|
||||
I2P SAM proxy to reach I2P peers and accept I2P connections (default:
|
||||
none)
|
||||
.HP
|
||||
\fB\-i2pacceptincoming\fR
|
||||
.IP
|
||||
If set and \fB\-i2psam\fR is also set then incoming I2P connections are
|
||||
accepted via the SAM proxy. If this is not set but \fB\-i2psam\fR is set
|
||||
then only outgoing connections will be made to the I2P network.
|
||||
Ignored if \fB\-i2psam\fR is not set. Listening for incoming I2P
|
||||
connections is done through the SAM proxy, not by binding to a
|
||||
local address and port (default: 1)
|
||||
.HP
|
||||
\fB\-onlynet=\fR<net>
|
||||
.IP
|
||||
Only connect to nodes in network <net> (ipv4, ipv6 or onion)
|
||||
Only connect to nodes in network <net> (ipv4, ipv6, onion or i2p)
|
||||
.HP
|
||||
\fB\-disableipv4\fR
|
||||
.IP
|
||||
Disable Ipv4 network connections (default: 0)
|
||||
.HP
|
||||
\fB\-disableipv6\fR
|
||||
.IP
|
||||
Disable Ipv6 network connections (default: 0)
|
||||
.HP
|
||||
\fB\-permitbaremultisig\fR
|
||||
.IP
|
||||
@@ -243,7 +273,7 @@ Connect to a node to retrieve peer addresses, and disconnect
|
||||
.HP
|
||||
\fB\-timeout=\fR<n>
|
||||
.IP
|
||||
Specify connection timeout in milliseconds (minimum: 1, default: 5000)
|
||||
Specify connection timeout in milliseconds (minimum: 1, default: 60000)
|
||||
.HP
|
||||
\fB\-torcontrol=\fR<ip>:<port>
|
||||
.IP
|
||||
@@ -288,9 +318,9 @@ Bind to given address and allowlist peers connecting to it. Use
|
||||
\fB\-allowlist=\fR<netmask>
|
||||
.IP
|
||||
Allowlist peers connecting from the given netmask or IP address. Can be
|
||||
specified multiple times. Allowlisted peers cannot be DoS banned and
|
||||
their transactions are always relayed, even if they are already in the
|
||||
mempool, useful e.g. for a gateway
|
||||
specified multiple times. Allowlisted peers cannot be DoS banned
|
||||
and their transactions are always relayed, even if they are
|
||||
already in the mempool, useful e.g. for a gateway
|
||||
.PP
|
||||
Wallet options:
|
||||
.HP
|
||||
@@ -306,6 +336,10 @@ Set key pool size to <n> (default: 100)
|
||||
.IP
|
||||
Enable auto Sapling note consolidation (default: false)
|
||||
.HP
|
||||
\fB\-consolidationinterval\fR
|
||||
.IP
|
||||
Block interval between consolidations (default: 25)
|
||||
.HP
|
||||
\fB\-consolidatesaplingaddress=\fR<zaddr>
|
||||
.IP
|
||||
Specify Sapling Address to Consolidate. (default: all)
|
||||
@@ -315,6 +349,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
|
||||
@@ -341,10 +404,19 @@ Minimum fee (in HUSH/kB) to allow for OP_RETURN transactions (default:
|
||||
.IP
|
||||
Fee (in HUSH/kB) to add to transactions you send (default: 0.00)
|
||||
.HP
|
||||
\fB\-keepnotewitnesscache\fR
|
||||
.IP
|
||||
Keep partial Sapling Note Witness cache. Must be used with \fB\-rescanheight\fR
|
||||
to find missing cache items.
|
||||
.HP
|
||||
\fB\-rescan\fR
|
||||
.IP
|
||||
Rescan the block chain for missing wallet transactions on startup
|
||||
.HP
|
||||
\fB\-rescanheight\fR
|
||||
.IP
|
||||
Rescan from specified height when rescan=1 on startup
|
||||
.HP
|
||||
\fB\-salvagewallet\fR
|
||||
.IP
|
||||
Attempt to recover private keys from a corrupt wallet.dat on startup
|
||||
@@ -393,47 +465,32 @@ by TxID)
|
||||
\fB\-allowlistaddress=\fR<Raddress>
|
||||
.IP
|
||||
Enable the wallet filter for notary nodes and add one Raddress to the
|
||||
allowlist of the wallet filter. If \fB\-allowlistaddress=\fR is used, then the
|
||||
wallet filter is automatically activated. Several Raddresses can be
|
||||
defined using several \fB\-allowlistaddress=\fR (similar to \fB\-addnode\fR). The
|
||||
wallet filter will filter the utxo to only ones coming from my own
|
||||
Raddress (derived from pubkey) and each Raddress defined using
|
||||
\fB\-allowlistaddress=\fR this option is mostly for Notary Nodes).
|
||||
allowlist of the wallet filter. If \fB\-allowlistaddress=\fR is used,
|
||||
then the wallet filter is automatically activated. Several
|
||||
Raddresses can be defined using several \fB\-allowlistaddress=\fR
|
||||
(similar to \fB\-addnode\fR). The wallet filter will filter the utxo to
|
||||
only ones coming from my own Raddress (derived from pubkey) and
|
||||
each Raddress defined using \fB\-allowlistaddress=\fR this option is
|
||||
mostly for Notary Nodes).
|
||||
.HP
|
||||
\fB\-zapwallettxes=\fR<mode>
|
||||
.IP
|
||||
Delete all wallet transactions and only recover those parts of the
|
||||
blockchain through \fB\-rescan\fR on startup (1 = keep tx meta data e.g.
|
||||
account owner and payment request information, 2 = drop tx meta data)
|
||||
.PP
|
||||
ZeroMQ notification options:
|
||||
.HP
|
||||
\fB\-zmqpubhashblock=\fR<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>
|
||||
account owner and payment request information, 2 = drop tx meta
|
||||
data)
|
||||
.PP
|
||||
Debugging/Testing options:
|
||||
.HP
|
||||
\fB\-debug=\fR<category>
|
||||
.IP
|
||||
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,
|
||||
tor, zmq, zrpc, zrpcunsafe (implies zrpc).
|
||||
optional). If <category> is not supplied or if <category> = 1,
|
||||
output all debugging information. <category> can be: addrman,
|
||||
bench, coindb, db, deletetx, estimatefee, http, libevent, lock,
|
||||
mempool, net, tls, partitioncheck, pow, proxy, prune, rand,
|
||||
randomx, reindex, rpc, selectcoins, stratum, tor, zrpc,
|
||||
zrpcunsafe (implies zrpc).
|
||||
.HP
|
||||
\fB\-experimentalfeatures\fR
|
||||
.IP
|
||||
@@ -531,8 +588,8 @@ Accept public REST requests (default: 0)
|
||||
\fB\-rpcbind=\fR<addr>
|
||||
.IP
|
||||
Bind to given address to listen for JSON\-RPC connections. Use
|
||||
[host]:port notation for IPv6. This option can be specified multiple
|
||||
times (default: bind to all interfaces)
|
||||
[host]:port notation for IPv6. This option can be specified
|
||||
multiple times (default: bind to all interfaces)
|
||||
.HP
|
||||
\fB\-rpcuser=\fR<user>
|
||||
.IP
|
||||
@@ -544,19 +601,18 @@ Password for JSON\-RPC connections
|
||||
.HP
|
||||
\fB\-rpcport=\fR<port>
|
||||
.IP
|
||||
Listen for JSON\-RPC connections on <port> (default: 7771 or testnet:
|
||||
17771)
|
||||
Listen for JSON\-RPC connections on <port> (default: 0 or testnet: 10000)
|
||||
.HP
|
||||
\fB\-rpcallowip=\fR<ip>
|
||||
.IP
|
||||
Allow JSON\-RPC connections from specified source. Valid for <ip> are a
|
||||
single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0)
|
||||
or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified
|
||||
multiple times
|
||||
single IP (e.g. 1.2.3.4), a network/netmask (e.g.
|
||||
1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This
|
||||
option can be specified multiple times
|
||||
.HP
|
||||
\fB\-rpcthreads=\fR<n>
|
||||
.IP
|
||||
Set the number of threads to service RPC calls (default: 4)
|
||||
Set the number of threads to service RPC calls (default: 8)
|
||||
.PP
|
||||
Metrics Options (only if \fB\-daemon\fR and \fB\-printtoconsole\fR are not set):
|
||||
.HP
|
||||
@@ -574,11 +630,41 @@ output (default: 1 if running in a console, 0 otherwise)
|
||||
Number of seconds between metrics refreshes (default: 1 if running in a
|
||||
console, 600 otherwise)
|
||||
.PP
|
||||
Stratum server options:
|
||||
.HP
|
||||
\fB\-stratum\fR
|
||||
.IP
|
||||
Enable stratum server (default: off)
|
||||
.HP
|
||||
\fB\-stratumaddress=\fR<address>
|
||||
.IP
|
||||
Mining address to use when special address of 'x' is sent by miner
|
||||
(default: none)
|
||||
.HP
|
||||
\fB\-stratumbind=\fR<ipaddr>
|
||||
.IP
|
||||
Bind to given address to listen for Stratum work requests. Use
|
||||
[host]:port notation for IPv6. This option can be specified
|
||||
multiple times (default: bind to all interfaces)
|
||||
.HP
|
||||
\fB\-stratumport=\fR<port>
|
||||
.IP
|
||||
Listen for Stratum work requests on <port> (default: 19031 or testnet:
|
||||
19031)
|
||||
.HP
|
||||
\fB\-stratumallowip=\fR<ip>
|
||||
.IP
|
||||
Allow Stratum work requests from specified source. Valid for <ip> are a
|
||||
single IP (e.g. 1.2.3.4), a network/netmask (e.g.
|
||||
1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This
|
||||
option can be specified multiple times
|
||||
.PP
|
||||
Hush Smart Chain options:
|
||||
.HP
|
||||
\fB\-ac_algo\fR
|
||||
.IP
|
||||
Choose PoW mining algorithm, default is Equihash
|
||||
Choose PoW mining algorithm, either 'equihash' or 'randomx'. default is
|
||||
Equihash (200,9)
|
||||
.HP
|
||||
\fB\-ac_blocktime\fR
|
||||
.IP
|
||||
@@ -652,6 +738,15 @@ Public key for receiving payments on the network
|
||||
.IP
|
||||
Transparent transactions only, default 0
|
||||
.HP
|
||||
\fB\-ac_randomx_interval\fR
|
||||
.IP
|
||||
Controls how often the RandomX key block will change, default is 1024
|
||||
.HP
|
||||
\fB\-ac_randomx_lag\fR
|
||||
.IP
|
||||
Sets the number of RandomX blocks to wait before updating the key block,
|
||||
default is 64
|
||||
.HP
|
||||
\fB\-ac_reward\fR
|
||||
.IP
|
||||
Block reward in satoshis, default is 0
|
||||
@@ -666,7 +761,7 @@ P2SH/multisig address to receive founders rewards
|
||||
.HP
|
||||
\fB\-ac_supply\fR
|
||||
.IP
|
||||
Starting supply, default is 0
|
||||
Starting supply, default is 10
|
||||
.HP
|
||||
\fB\-ac_txpow\fR
|
||||
.IP
|
||||
@@ -676,9 +771,12 @@ 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-2024 Duke Leto and The Hush Developers
|
||||
|
||||
Copyright (C) 2016-2020 jl777 and SuperNET developers
|
||||
|
||||
Copyright (C) 2016-2018 The Zcash developers
|
||||
|
||||
Copyright (C) 2009-2014 The Bitcoin Core developers
|
||||
|
||||
This is experimental Free Software! Fuck Yeah!!!!!
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.10.
|
||||
.TH KOMODO-CLI "1" "December 2019" "komodo-cli v3.3.0" "User Commands"
|
||||
.SH NAME
|
||||
komodo-cli \- manual page for komodo-cli v3.3.0
|
||||
.SH DESCRIPTION
|
||||
Komodo RPC client version v3.3.0\-bde7744d9
|
||||
.PP
|
||||
In order to ensure you are adequately protecting your privacy when using Hush,
|
||||
please see <https://myhush.org/security/>.
|
||||
.SS "Usage:"
|
||||
.TP
|
||||
komodo\-cli [options] <command> [params]
|
||||
Send command to Komodo
|
||||
.TP
|
||||
komodo\-cli [options] help
|
||||
List commands
|
||||
.TP
|
||||
komodo\-cli [options] help <command>
|
||||
Get help for a command
|
||||
.SH OPTIONS
|
||||
.HP
|
||||
\-?
|
||||
.IP
|
||||
This help message
|
||||
.HP
|
||||
\fB\-conf=\fR<file>
|
||||
.IP
|
||||
Specify configuration file (default: komodo.conf)
|
||||
.HP
|
||||
\fB\-datadir=\fR<dir>
|
||||
.IP
|
||||
Specify data directory
|
||||
.HP
|
||||
\fB\-testnet\fR
|
||||
.IP
|
||||
Use the test network
|
||||
.HP
|
||||
\fB\-regtest\fR
|
||||
.IP
|
||||
Enter regression test mode, which uses a special chain in which blocks
|
||||
can be solved instantly. This is intended for regression testing tools
|
||||
and app development.
|
||||
.HP
|
||||
\fB\-rpcconnect=\fR<ip>
|
||||
.IP
|
||||
Send commands to node running on <ip> (default: 127.0.0.1)
|
||||
.HP
|
||||
\fB\-rpcport=\fR<port>
|
||||
.IP
|
||||
Connect to JSON\-RPC on <port> (default: 8232 or testnet: 18232)
|
||||
.HP
|
||||
\fB\-rpcwait\fR
|
||||
.IP
|
||||
Wait for RPC server to start
|
||||
.HP
|
||||
\fB\-rpcuser=\fR<user>
|
||||
.IP
|
||||
Username for JSON\-RPC connections
|
||||
.HP
|
||||
\fB\-rpcpassword=\fR<pw>
|
||||
.IP
|
||||
Password for JSON\-RPC connections
|
||||
.HP
|
||||
\fB\-rpcclienttimeout=\fR<n>
|
||||
.IP
|
||||
Timeout in seconds during HTTP requests, or 0 for no timeout. (default:
|
||||
900)
|
||||
.HP
|
||||
\fB\-stdin\fR
|
||||
.IP
|
||||
Read extra arguments from standard input, one per line until EOF/Ctrl\-D
|
||||
(recommended for sensitive information such as passphrases)
|
||||
.SH COPYRIGHT
|
||||
|
||||
In order to ensure you are adequately protecting your privacy when using Hush,
|
||||
please see <https://myhush.org/security/>.
|
||||
|
||||
Copyright (C) 2009-2019 The Bitcoin Core Developers
|
||||
Copyright (C) 2015-2019 The Zcash Developers
|
||||
Copyright (C) 2015-2019 jl777 and SuperNET developers
|
||||
Copyright (C) 2018-2019 The Hush developers
|
||||
|
||||
This is experimental software!!!
|
||||
|
||||
Distributed under the MIT software license, see the accompanying file COPYING
|
||||
or <http://www.opensource.org/licenses/mit-license.php>.
|
||||
|
||||
This product includes software developed by the OpenSSL Project for use in the
|
||||
OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written
|
||||
by Eric Young.
|
||||
@@ -1,103 +0,0 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.10.
|
||||
.TH KOMODO-TX "1" "December 2019" "komodo-tx v3.3.0" "User Commands"
|
||||
.SH NAME
|
||||
komodo-tx \- manual page for komodo-tx v3.3.0
|
||||
.SH DESCRIPTION
|
||||
Hush komodo\-tx utility version v3.3.0\-bde7744d9
|
||||
.SS "Usage:"
|
||||
.TP
|
||||
komodo\-tx [options] <hex\-tx> [commands]
|
||||
Update hex\-encoded zcash transaction
|
||||
.TP
|
||||
komodo\-tx [options] \fB\-create\fR [commands]
|
||||
Create hex\-encoded zcash transaction
|
||||
.SH OPTIONS
|
||||
.HP
|
||||
\-?
|
||||
.IP
|
||||
This help message
|
||||
.HP
|
||||
\fB\-create\fR
|
||||
.IP
|
||||
Create new, empty TX.
|
||||
.HP
|
||||
\fB\-json\fR
|
||||
.IP
|
||||
Select JSON output
|
||||
.HP
|
||||
\fB\-txid\fR
|
||||
.IP
|
||||
Output only the hex\-encoded transaction id of the resultant transaction.
|
||||
.HP
|
||||
\fB\-regtest\fR
|
||||
.IP
|
||||
Enter regression test mode, which uses a special chain in which blocks
|
||||
can be solved instantly.
|
||||
.HP
|
||||
\fB\-testnet\fR
|
||||
.IP
|
||||
Use the test network
|
||||
.PP
|
||||
Commands:
|
||||
.IP
|
||||
delin=N
|
||||
.IP
|
||||
Delete input N from TX
|
||||
.IP
|
||||
delout=N
|
||||
.IP
|
||||
Delete output N from TX
|
||||
.IP
|
||||
in=TXID:VOUT(:SEQUENCE_NUMBER)
|
||||
.IP
|
||||
Add input to TX
|
||||
.IP
|
||||
locktime=N
|
||||
.IP
|
||||
Set TX lock time to N
|
||||
.IP
|
||||
nversion=N
|
||||
.IP
|
||||
Set TX version to N
|
||||
.IP
|
||||
outaddr=VALUE:ADDRESS
|
||||
.IP
|
||||
Add address\-based output to TX
|
||||
.IP
|
||||
outscript=VALUE:SCRIPT
|
||||
.IP
|
||||
Add raw script output to TX
|
||||
.IP
|
||||
sign=HEIGHT:SIGHASH\-FLAGS
|
||||
.IP
|
||||
Add zero or more signatures to transaction. This command requires JSON
|
||||
registers:prevtxs=JSON object, privatekeys=JSON object. See
|
||||
signrawtransaction docs for format of sighash flags, JSON objects.
|
||||
.PP
|
||||
Register Commands:
|
||||
.IP
|
||||
load=NAME:FILENAME
|
||||
.IP
|
||||
Load JSON file FILENAME into register NAME
|
||||
.IP
|
||||
set=NAME:JSON\-STRING
|
||||
.IP
|
||||
Set register NAME to given JSON\-STRING
|
||||
.SH COPYRIGHT
|
||||
|
||||
In order to ensure you are adequately protecting your privacy when using Hush,
|
||||
please see <https://myhush.org/security/>.
|
||||
|
||||
Copyright (C) 2009-2019 The Bitcoin Core Developers
|
||||
Copyright (C) 2015-2019 The Zcash Developers
|
||||
Copyright (C) 2015-2019 jl777 and SuperNET developers
|
||||
Copyright (C) 2018-2019 The Hush developers
|
||||
|
||||
This is experimental software!!!
|
||||
|
||||
Distributed under the MIT software license, see the accompanying file COPYING
|
||||
or <http://www.opensource.org/licenses/mit-license.php>.
|
||||
|
||||
This product includes software developed by the OpenSSL Project for use in the
|
||||
OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written
|
||||
by Eric Young.
|
||||
@@ -1,637 +0,0 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.10.
|
||||
.TH KOMODOD "1" "December 2019" "komodod v3.3.0" "User Commands"
|
||||
.SH NAME
|
||||
komodod \- manual page for komodod v3.3.0
|
||||
.SH DESCRIPTION
|
||||
Hush Daemon version v3.3.0\-bde7744d9
|
||||
.PP
|
||||
In order to ensure you are adequately protecting your privacy when using Hush,
|
||||
please see <https://myhush.org/security/>.
|
||||
.SS "Usage:"
|
||||
.TP
|
||||
komodod [options]
|
||||
Start Hush\-flavored Komodo Daemon
|
||||
.SH OPTIONS
|
||||
.HP
|
||||
\-?
|
||||
.IP
|
||||
This help message
|
||||
.HP
|
||||
\fB\-alerts\fR
|
||||
.IP
|
||||
Receive and display P2P network alerts (default: 1)
|
||||
.HP
|
||||
\fB\-alertnotify=\fR<cmd>
|
||||
.IP
|
||||
Execute command when a relevant alert is received or we see a really
|
||||
long fork (%s in cmd is replaced by message)
|
||||
.HP
|
||||
\fB\-blocknotify=\fR<cmd>
|
||||
.IP
|
||||
Execute command when the best block changes (%s in cmd is replaced by
|
||||
block hash)
|
||||
.HP
|
||||
\fB\-checkblocks=\fR<n>
|
||||
.IP
|
||||
How many blocks to check at startup (default: 288, 0 = all)
|
||||
.HP
|
||||
\fB\-checklevel=\fR<n>
|
||||
.IP
|
||||
How thorough the block verification of \fB\-checkblocks\fR is (0\-4, default: 3)
|
||||
.HP
|
||||
\fB\-clientname=\fR<SomeName>
|
||||
.IP
|
||||
Full node client name, default 'MagicBean'
|
||||
.HP
|
||||
\fB\-conf=\fR<file>
|
||||
.IP
|
||||
Specify configuration file (default: komodo.conf)
|
||||
.HP
|
||||
\fB\-daemon\fR
|
||||
.IP
|
||||
Run in the background as a daemon and accept commands
|
||||
.HP
|
||||
\fB\-datadir=\fR<dir>
|
||||
.IP
|
||||
Specify data directory
|
||||
.HP
|
||||
\fB\-exportdir=\fR<dir>
|
||||
.IP
|
||||
Specify directory to be used when exporting data
|
||||
.HP
|
||||
\fB\-dbcache=\fR<n>
|
||||
.IP
|
||||
Set database cache size in megabytes (4 to 16384, default: 450)
|
||||
.HP
|
||||
\fB\-loadblock=\fR<file>
|
||||
.IP
|
||||
Imports blocks from external blk000??.dat file on startup
|
||||
.HP
|
||||
\fB\-maxorphantx=\fR<n>
|
||||
.IP
|
||||
Keep at most <n> unconnectable transactions in memory (default: 100)
|
||||
.HP
|
||||
\fB\-mempooltxinputlimit=\fR<n>
|
||||
.IP
|
||||
[DEPRECATED FROM OVERWINTER] Set the maximum number of transparent
|
||||
inputs in a transaction that the mempool will accept (default: 0 = no
|
||||
limit applied)
|
||||
.HP
|
||||
\fB\-par=\fR<n>
|
||||
.IP
|
||||
Set the number of script verification threads (\fB\-8\fR to 16, 0 = auto, <0 =
|
||||
leave that many cores free, default: 0)
|
||||
.HP
|
||||
\fB\-pid=\fR<file>
|
||||
.IP
|
||||
Specify pid file (default: komodod.pid)
|
||||
.HP
|
||||
\fB\-prune=\fR<n>
|
||||
.IP
|
||||
Reduce storage requirements by pruning (deleting) old blocks. This mode
|
||||
disables wallet support and is incompatible with \fB\-txindex\fR. Warning:
|
||||
Reverting this setting requires re\-downloading the entire blockchain.
|
||||
(default: 0 = disable pruning blocks, >550 = target size in MiB to use
|
||||
for block files)
|
||||
.HP
|
||||
\fB\-reindex\fR
|
||||
.IP
|
||||
Rebuild block chain index from current blk000??.dat files on startup
|
||||
.HP
|
||||
\fB\-sysperms\fR
|
||||
.IP
|
||||
Create new files with system default permissions, instead of umask 077
|
||||
(only effective with disabled wallet functionality)
|
||||
.HP
|
||||
\fB\-txindex\fR
|
||||
.IP
|
||||
Maintain a full transaction index, used by the getrawtransaction rpc
|
||||
call (default: 0)
|
||||
.HP
|
||||
\fB\-addressindex\fR
|
||||
.IP
|
||||
Maintain a full address index, used to query for the balance, txids and
|
||||
unspent outputs for addresses (default: 0)
|
||||
.HP
|
||||
\fB\-timestampindex\fR
|
||||
.IP
|
||||
Maintain a timestamp index for block hashes, used to query blocks hashes
|
||||
by a range of timestamps (default: 0)
|
||||
.HP
|
||||
\fB\-spentindex\fR
|
||||
.IP
|
||||
Maintain a full spent index, used to query the spending txid and input
|
||||
index for an outpoint (default: 0)
|
||||
.HP
|
||||
\fB\-zindex\fR
|
||||
.IP
|
||||
Maintain extra statistics about shielded transactions and payments
|
||||
(default: 0)
|
||||
.PP
|
||||
Connection options:
|
||||
.HP
|
||||
\fB\-addnode=\fR<ip>
|
||||
.IP
|
||||
Add a node to connect to and attempt to keep the connection open
|
||||
.HP
|
||||
\fB\-banscore=\fR<n>
|
||||
.IP
|
||||
Threshold for disconnecting misbehaving peers (default: 100)
|
||||
.HP
|
||||
\fB\-bantime=\fR<n>
|
||||
.IP
|
||||
Number of seconds to keep misbehaving peers from reconnecting (default:
|
||||
86400)
|
||||
.HP
|
||||
\fB\-bind=\fR<addr>
|
||||
.IP
|
||||
Bind to given address and always listen on it. Use [host]:port notation
|
||||
for IPv6
|
||||
.HP
|
||||
\fB\-connect=\fR<ip>
|
||||
.IP
|
||||
Connect only to the specified node(s)
|
||||
.HP
|
||||
\fB\-discover\fR
|
||||
.IP
|
||||
Discover own IP addresses (default: 1 when listening and no \fB\-externalip\fR
|
||||
or \fB\-proxy\fR)
|
||||
.HP
|
||||
\fB\-dns\fR
|
||||
.IP
|
||||
Allow DNS lookups for \fB\-addnode\fR, \fB\-seednode\fR and \fB\-connect\fR (default: 1)
|
||||
.HP
|
||||
\fB\-dnsseed\fR
|
||||
.IP
|
||||
Query for peer addresses via DNS lookup, if low on addresses (default: 1
|
||||
unless \fB\-connect\fR)
|
||||
.HP
|
||||
\fB\-externalip=\fR<ip>
|
||||
.IP
|
||||
Specify your own public address
|
||||
.HP
|
||||
\fB\-forcednsseed\fR
|
||||
.IP
|
||||
Always query for peer addresses via DNS lookup (default: 0)
|
||||
.HP
|
||||
\fB\-listen\fR
|
||||
.IP
|
||||
Accept connections from outside (default: 1 if no \fB\-proxy\fR or \fB\-connect\fR)
|
||||
.HP
|
||||
\fB\-listenonion\fR
|
||||
.IP
|
||||
Automatically create Tor hidden service (default: 1)
|
||||
.HP
|
||||
\fB\-maxconnections=\fR<n>
|
||||
.IP
|
||||
Maintain at most <n> connections to peers (default: 384)
|
||||
.HP
|
||||
\fB\-maxreceivebuffer=\fR<n>
|
||||
.IP
|
||||
Maximum per\-connection receive buffer, <n>*1000 bytes (default: 5000)
|
||||
.HP
|
||||
\fB\-maxsendbuffer=\fR<n>
|
||||
.IP
|
||||
Maximum per\-connection send buffer, <n>*1000 bytes (default: 1000)
|
||||
.HP
|
||||
\fB\-onion=\fR<ip:port>
|
||||
.IP
|
||||
Use separate SOCKS5 proxy to reach peers via Tor hidden services
|
||||
(default: \fB\-proxy\fR)
|
||||
.HP
|
||||
\fB\-onlynet=\fR<net>
|
||||
.IP
|
||||
Only connect to nodes in network <net> (ipv4, ipv6 or onion)
|
||||
.HP
|
||||
\fB\-permitbaremultisig\fR
|
||||
.IP
|
||||
Relay non\-P2SH multisig (default: 1)
|
||||
.HP
|
||||
\fB\-peerbloomfilters\fR
|
||||
.IP
|
||||
Support filtering of blocks and transaction with Bloom filters (default:
|
||||
1)
|
||||
.HP
|
||||
\fB\-port=\fR<port>
|
||||
.IP
|
||||
Listen for connections on <port> (default: 7770 or testnet: 17770)
|
||||
.HP
|
||||
\fB\-proxy=\fR<ip:port>
|
||||
.IP
|
||||
Connect through SOCKS5 proxy
|
||||
.HP
|
||||
\fB\-proxyrandomize\fR
|
||||
.IP
|
||||
Randomize credentials for every proxy connection. This enables Tor
|
||||
stream isolation (default: 1)
|
||||
.HP
|
||||
\fB\-seednode=\fR<ip>
|
||||
.IP
|
||||
Connect to a node to retrieve peer addresses, and disconnect
|
||||
.HP
|
||||
\fB\-timeout=\fR<n>
|
||||
.IP
|
||||
Specify connection timeout in milliseconds (minimum: 1, default: 5000)
|
||||
.HP
|
||||
\fB\-torcontrol=\fR<ip>:<port>
|
||||
.IP
|
||||
Tor control port to use if onion listening enabled (default:
|
||||
127.0.0.1:9051)
|
||||
.HP
|
||||
\fB\-torpassword=\fR<pass>
|
||||
.IP
|
||||
Tor control port password (default: empty)
|
||||
.HP
|
||||
\fB\-whitebind=\fR<addr>
|
||||
.IP
|
||||
Bind to given address and whitelist peers connecting to it. Use
|
||||
[host]:port notation for IPv6
|
||||
.HP
|
||||
\fB\-whitelist=\fR<netmask>
|
||||
.IP
|
||||
Whitelist peers connecting from the given netmask or IP address. Can be
|
||||
specified multiple times. Whitelisted peers cannot be DoS banned and
|
||||
their transactions are always relayed, even if they are already in the
|
||||
mempool, useful e.g. for a gateway
|
||||
.PP
|
||||
Wallet options:
|
||||
.HP
|
||||
\fB\-disablewallet\fR
|
||||
.IP
|
||||
Do not load the wallet and disable wallet RPC calls
|
||||
.HP
|
||||
\fB\-keypool=\fR<n>
|
||||
.IP
|
||||
Set key pool size to <n> (default: 100)
|
||||
.HP
|
||||
\fB\-paytxfee=\fR<amt>
|
||||
.IP
|
||||
Fee (in KMD/kB) to add to transactions you send (default: 0.00)
|
||||
.HP
|
||||
\fB\-rescan\fR
|
||||
.IP
|
||||
Rescan the block chain for missing wallet transactions on startup
|
||||
.HP
|
||||
\fB\-salvagewallet\fR
|
||||
.IP
|
||||
Attempt to recover private keys from a corrupt wallet.dat on startup
|
||||
.HP
|
||||
\fB\-sendfreetransactions\fR
|
||||
.IP
|
||||
Send transactions as zero\-fee transactions if possible (default: 0)
|
||||
.HP
|
||||
\fB\-spendzeroconfchange\fR
|
||||
.IP
|
||||
Spend unconfirmed change when sending transactions (default: 1)
|
||||
.HP
|
||||
\fB\-txconfirmtarget=\fR<n>
|
||||
.IP
|
||||
If paytxfee is not set, include enough fee so transactions begin
|
||||
confirmation on average within n blocks (default: 2)
|
||||
.HP
|
||||
\fB\-txexpirydelta\fR
|
||||
.IP
|
||||
Set the number of blocks after which a transaction that has not been
|
||||
mined will become invalid (default: 200)
|
||||
.HP
|
||||
\fB\-maxtxfee=\fR<amt>
|
||||
.IP
|
||||
Maximum total fees (in KMD) to use in a single wallet transaction;
|
||||
setting this too low may abort large transactions (default: 0.10)
|
||||
.HP
|
||||
\fB\-upgradewallet\fR
|
||||
.IP
|
||||
Upgrade wallet to latest format on startup
|
||||
.HP
|
||||
\fB\-wallet=\fR<file>
|
||||
.IP
|
||||
Specify wallet file (within data directory) (default: wallet.dat)
|
||||
.HP
|
||||
\fB\-walletbroadcast\fR
|
||||
.IP
|
||||
Make the wallet broadcast transactions (default: 1)
|
||||
.HP
|
||||
\fB\-walletnotify=\fR<cmd>
|
||||
.IP
|
||||
Execute command when a wallet transaction changes (%s in cmd is replaced
|
||||
by TxID)
|
||||
.HP
|
||||
\fB\-whitelistaddress=\fR<Raddress>
|
||||
.IP
|
||||
Enable the wallet filter for notary nodes and add one Raddress to the
|
||||
whitelist of the wallet filter. If \fB\-whitelistaddress=\fR is used, then the
|
||||
wallet filter is automatically activated. Several Raddresses can be
|
||||
defined using several \fB\-whitelistaddress=\fR (similar to \fB\-addnode\fR). The
|
||||
wallet filter will filter the utxo to only ones coming from my own
|
||||
Raddress (derived from pubkey) and each Raddress defined using
|
||||
\fB\-whitelistaddress=\fR this option is mostly for Notary Nodes).
|
||||
.HP
|
||||
\fB\-zapwallettxes=\fR<mode>
|
||||
.IP
|
||||
Delete all wallet transactions and only recover those parts of the
|
||||
blockchain through \fB\-rescan\fR on startup (1 = keep tx meta data e.g.
|
||||
account owner and payment request information, 2 = drop tx meta data)
|
||||
.PP
|
||||
ZeroMQ notification options:
|
||||
.HP
|
||||
\fB\-zmqpubhashblock=\fR<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>
|
||||
.IP
|
||||
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, estimatefee, http, libevent, lock, mempool, net,
|
||||
partitioncheck, pow, proxy, prune, rand, reindex, rpc, selectcoins, tor,
|
||||
zmq, zrpc, zrpcunsafe (implies zrpc).
|
||||
.HP
|
||||
\fB\-experimentalfeatures\fR
|
||||
.IP
|
||||
Enable use of experimental features
|
||||
.HP
|
||||
\fB\-help\-debug\fR
|
||||
.IP
|
||||
Show all debugging options (usage: \fB\-\-help\fR \fB\-help\-debug\fR)
|
||||
.HP
|
||||
\fB\-logips\fR
|
||||
.IP
|
||||
Include IP addresses in debug output (default: 0)
|
||||
.HP
|
||||
\fB\-logtimestamps\fR
|
||||
.IP
|
||||
Prepend debug output with timestamp (default: 1)
|
||||
.HP
|
||||
\fB\-minrelaytxfee=\fR<amt>
|
||||
.IP
|
||||
Fees (in KMD/kB) smaller than this are considered zero fee for relaying
|
||||
(default: 0.000001)
|
||||
.HP
|
||||
\fB\-printtoconsole\fR
|
||||
.IP
|
||||
Send trace/debug info to console instead of debug.log file
|
||||
.HP
|
||||
\fB\-shrinkdebugfile\fR
|
||||
.IP
|
||||
Shrink debug.log file on client startup (default: 1 when no \fB\-debug\fR)
|
||||
.HP
|
||||
\fB\-testnet\fR
|
||||
.IP
|
||||
Use the test network
|
||||
.PP
|
||||
Node relay options:
|
||||
.HP
|
||||
\fB\-datacarrier\fR
|
||||
.IP
|
||||
Relay and mine data carrier transactions (default: 1)
|
||||
.HP
|
||||
\fB\-datacarriersize\fR
|
||||
.IP
|
||||
Maximum size of data in data carrier transactions we relay and mine
|
||||
(default: 8192)
|
||||
.PP
|
||||
Block creation options:
|
||||
.HP
|
||||
\fB\-blockminsize=\fR<n>
|
||||
.IP
|
||||
Set minimum block size in bytes (default: 0)
|
||||
.HP
|
||||
\fB\-blockmaxsize=\fR<n>
|
||||
.IP
|
||||
Set maximum block size in bytes (default: 2000000)
|
||||
.HP
|
||||
\fB\-blockprioritysize=\fR<n>
|
||||
.IP
|
||||
Set maximum size of high\-priority/low\-fee transactions in bytes
|
||||
(default: 1000000)
|
||||
.PP
|
||||
Mining options:
|
||||
.HP
|
||||
\fB\-mint\fR
|
||||
.IP
|
||||
Mint/stake coins automatically (default: 0)
|
||||
.HP
|
||||
\fB\-gen\fR
|
||||
.IP
|
||||
Mine/generate coins (default: 0)
|
||||
.HP
|
||||
\fB\-genproclimit=\fR<n>
|
||||
.IP
|
||||
Set the number of threads for coin mining if enabled (\fB\-1\fR = all cores,
|
||||
default: 0)
|
||||
.HP
|
||||
\fB\-equihashsolver=\fR<name>
|
||||
.IP
|
||||
Specify the Equihash solver to be used if enabled (default: "default")
|
||||
.HP
|
||||
\fB\-mineraddress=\fR<addr>
|
||||
.IP
|
||||
Send mined coins to a specific single address
|
||||
.HP
|
||||
\fB\-minetolocalwallet\fR
|
||||
.IP
|
||||
Require that mined blocks use a coinbase address in the local wallet
|
||||
(default: 1)
|
||||
.PP
|
||||
RPC server options:
|
||||
.HP
|
||||
\fB\-server\fR
|
||||
.IP
|
||||
Accept command line and JSON\-RPC commands
|
||||
.HP
|
||||
\fB\-rest\fR
|
||||
.IP
|
||||
Accept public REST requests (default: 0)
|
||||
.HP
|
||||
\fB\-rpcbind=\fR<addr>
|
||||
.IP
|
||||
Bind to given address to listen for JSON\-RPC connections. Use
|
||||
[host]:port notation for IPv6. This option can be specified multiple
|
||||
times (default: bind to all interfaces)
|
||||
.HP
|
||||
\fB\-rpcuser=\fR<user>
|
||||
.IP
|
||||
Username for JSON\-RPC connections
|
||||
.HP
|
||||
\fB\-rpcpassword=\fR<pw>
|
||||
.IP
|
||||
Password for JSON\-RPC connections
|
||||
.HP
|
||||
\fB\-rpcport=\fR<port>
|
||||
.IP
|
||||
Listen for JSON\-RPC connections on <port> (default: 7771 or testnet:
|
||||
17771)
|
||||
.HP
|
||||
\fB\-rpcallowip=\fR<ip>
|
||||
.IP
|
||||
Allow JSON\-RPC connections from specified source. Valid for <ip> are a
|
||||
single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0)
|
||||
or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified
|
||||
multiple times
|
||||
.HP
|
||||
\fB\-rpcthreads=\fR<n>
|
||||
.IP
|
||||
Set the number of threads to service RPC calls (default: 4)
|
||||
.PP
|
||||
Metrics Options (only if \fB\-daemon\fR and \fB\-printtoconsole\fR are not set):
|
||||
.HP
|
||||
\fB\-showmetrics\fR
|
||||
.IP
|
||||
Show metrics on stdout (default: 1 if running in a console, 0 otherwise)
|
||||
.HP
|
||||
\fB\-metricsui\fR
|
||||
.IP
|
||||
Set to 1 for a persistent metrics screen, 0 for sequential metrics
|
||||
output (default: 1 if running in a console, 0 otherwise)
|
||||
.HP
|
||||
\fB\-metricsrefreshtime\fR
|
||||
.IP
|
||||
Number of seconds between metrics refreshes (default: 1 if running in a
|
||||
console, 600 otherwise)
|
||||
.PP
|
||||
Komodo Asset Chain options:
|
||||
.HP
|
||||
\fB\-ac_algo\fR
|
||||
.IP
|
||||
Choose PoW mining algorithm, default is Equihash
|
||||
.HP
|
||||
\fB\-ac_blocktime\fR
|
||||
.IP
|
||||
Block time in seconds, default is 60
|
||||
.HP
|
||||
\fB\-ac_cc\fR
|
||||
.IP
|
||||
Cryptoconditions, default 0
|
||||
.HP
|
||||
\fB\-ac_beam\fR
|
||||
.IP
|
||||
BEAM integration
|
||||
.HP
|
||||
\fB\-ac_coda\fR
|
||||
.IP
|
||||
CODA integration
|
||||
.HP
|
||||
\fB\-ac_cclib\fR
|
||||
.IP
|
||||
Cryptoconditions dynamicly loadable library
|
||||
.HP
|
||||
\fB\-ac_ccenable\fR
|
||||
.IP
|
||||
Cryptoconditions to enable
|
||||
.HP
|
||||
\fB\-ac_ccactivate\fR
|
||||
.IP
|
||||
Block height to enable Cryptoconditions
|
||||
.HP
|
||||
\fB\-ac_decay\fR
|
||||
.IP
|
||||
Percentage of block reward decrease at each halving
|
||||
.HP
|
||||
\fB\-ac_end\fR
|
||||
.IP
|
||||
Block height at which block rewards will end
|
||||
.HP
|
||||
\fB\-ac_eras\fR
|
||||
.IP
|
||||
Block reward eras
|
||||
.HP
|
||||
\fB\-ac_founders\fR
|
||||
.IP
|
||||
Number of blocks between founders reward payouts
|
||||
.HP
|
||||
\fB\-ac_halving\fR
|
||||
.IP
|
||||
Number of blocks between each block reward halving
|
||||
.HP
|
||||
\fB\-ac_name\fR
|
||||
.IP
|
||||
Name of asset chain
|
||||
.HP
|
||||
\fB\-ac_notarypay\fR
|
||||
.IP
|
||||
Pay notaries, default 0
|
||||
.HP
|
||||
\fB\-ac_perc\fR
|
||||
.IP
|
||||
Percentage of block rewards paid to the founder
|
||||
.HP
|
||||
\fB\-ac_private\fR
|
||||
.IP
|
||||
Shielded transactions only (except coinbase + notaries), default is 0
|
||||
.HP
|
||||
\fB\-ac_pubkey\fR
|
||||
.IP
|
||||
Public key for receiving payments on the network
|
||||
.HP
|
||||
\fB\-ac_public\fR
|
||||
.IP
|
||||
Transparent transactions only, default 0
|
||||
.HP
|
||||
\fB\-ac_reward\fR
|
||||
.IP
|
||||
Block reward in satoshis, default is 0
|
||||
.HP
|
||||
\fB\-ac_sapling\fR
|
||||
.IP
|
||||
Sapling activation block height
|
||||
.HP
|
||||
\fB\-ac_script\fR
|
||||
.IP
|
||||
P2SH/multisig address to receive founders rewards
|
||||
.HP
|
||||
\fB\-ac_staked\fR
|
||||
.IP
|
||||
Percentage of blocks that are Proof\-Of\-Stake, default 0
|
||||
.HP
|
||||
\fB\-ac_supply\fR
|
||||
.IP
|
||||
Starting supply, default is 0
|
||||
.HP
|
||||
\fB\-ac_timelockfrom\fR
|
||||
.IP
|
||||
Timelocked coinbase start height
|
||||
.HP
|
||||
\fB\-ac_timelockgte\fR
|
||||
.IP
|
||||
Timelocked coinbase minimum amount to be locked
|
||||
.HP
|
||||
\fB\-ac_timelockto\fR
|
||||
.IP
|
||||
Timelocked coinbase stop height
|
||||
.HP
|
||||
\fB\-ac_txpow\fR
|
||||
.IP
|
||||
Enforce transaction\-rate limit, default 0
|
||||
.SH COPYRIGHT
|
||||
|
||||
In order to ensure you are adequately protecting your privacy when using Hush,
|
||||
please see <https://myhush.org/security/>.
|
||||
|
||||
Copyright (C) 2009-2019 The Bitcoin Core Developers
|
||||
Copyright (C) 2015-2019 The Zcash Developers
|
||||
Copyright (C) 2015-2019 jl777 and SuperNET developers
|
||||
Copyright (C) 2018-2019 The Hush developers
|
||||
|
||||
This is experimental software!!!
|
||||
|
||||
Distributed under the MIT software license, see the accompanying file COPYING
|
||||
or <http://www.opensource.org/licenses/mit-license.php>.
|
||||
|
||||
This product includes software developed by the OpenSSL Project for use in the
|
||||
OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written
|
||||
by Eric Young.
|
||||
@@ -14,7 +14,24 @@ Equihash (200,9) (ASIC)
|
||||
|
||||
## P2P
|
||||
|
||||
TLS1.3 via WolfSSL is enforced for all network connections as of v3.6.1
|
||||
TLS1.3 via WolfSSL is enforced for all network connections as of v3.6.1 .
|
||||
Many ciphersuites are technically supported by TLS1.3 but many of them
|
||||
are ancient, proved to be less secure than intended or likely backdoored.
|
||||
Hush only uses what are widely considered to be the most secure and [best ciphersuites](https://ciphersuite.info/cs/).
|
||||
|
||||
New Hush P2P connections randomly choose between these two ciphersuites each
|
||||
time a new connection to a peer is created:
|
||||
|
||||
* `TLS_AES_256_GCM_SHA384`
|
||||
* `TLS_CHACHA20_POLY1305_SHA256`
|
||||
|
||||
Encrypted P2P connections are important because it means passive network spies,
|
||||
such as ISPs, cannot tell what nodes are communicating to each other and also
|
||||
prevents certain attacks against privacy at the network level, such as looking
|
||||
for which node was the first to relay a transaction. Bitcoin has no protection
|
||||
against this which is why it's trivial for network spies to tell which node
|
||||
(and hence which IP address) created a certain transaction and hence which
|
||||
IP address owns which addresses.
|
||||
|
||||
## RPC
|
||||
|
||||
|
||||
12
doc/privacy-basics.md
Normal file
12
doc/privacy-basics.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# Privacy Basics
|
||||
|
||||
## Browser Tips
|
||||
|
||||
Firefox is likely the best browser for privacy. Use this to improve + customize:
|
||||
|
||||
https://ebin.city/~werwolf/posts/firefox-hardening-guide/
|
||||
|
||||
which is a guide around using and customizing the [Arkenfox](https://github.com/arkenfox/user.js/wiki/1.3-Implementation) user.js project
|
||||
|
||||
Those are helpful when NOT using a Tor browser. If you are using Tor Browser (which is a fork of Firefox), then you do not need the above guide and should probably use the default that Tor Browser devs provide.
|
||||
|
||||
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,58 @@
|
||||
# Hush Release Process
|
||||
|
||||
## Pre-release
|
||||
## High-Level Philosophy
|
||||
|
||||
Beware of making high-risk changes (such as consensus changes, p2p layer changes and wallet/transaction changes) too close to a new release, because they will not get as much testing as they should. Don't merge large branches which haven't undergone lots of testing just before a release.
|
||||
|
||||
It is best to keep doc/relnotes/README.md up to date as changes and bug fixes are made. It's more work to summarize all changes and bugfixes just before the release.
|
||||
|
||||
## Check for changes on master that should be on dev
|
||||
|
||||
Often there are trivial changes made directly on master, such as documentation changes. In theory, no code changes should happen on master without being on dev first, but it's better to be safe than sorry. We want the dev branch which undergoes testing to be as close as possible to what the master branch will become, so we don't want to merge dev into master and just assume everything works. So it's best to merge the master branch into dev just before merging the dev branch into master.
|
||||
|
||||
To check if the master branch has any changes that the dev branch does not:
|
||||
|
||||
```
|
||||
# this assumes you are working with https://git.hush.is/hush/hush3 as your remote
|
||||
git checkout dev
|
||||
git pull # make sure dev is up to date
|
||||
git checkout master
|
||||
git pull # make sure master is up to date
|
||||
git diff dev...master # look at the set of changes which exist in master but not dev
|
||||
```
|
||||
|
||||
If the last command has no output, congrats, there is nothing to do. If the last command has output, then you should merge master into dev:
|
||||
|
||||
```
|
||||
git checkout master
|
||||
git merge --no-ff dev # using the default commit message is fine
|
||||
git tag vX.Y.Z # this creates a tag vX.Y.Z on current master, or you can let gitea do it later
|
||||
git push --tags origin master
|
||||
git checkout dev
|
||||
git merge master
|
||||
git push origin dev
|
||||
```
|
||||
|
||||
The `--no-ff` flag above makes sure to make a merge commit, no matter what, even if a "fast forward" could be done. For those in the future looking back, it's much better to see evidence of when branches were merged.
|
||||
|
||||
|
||||
### Git Issues
|
||||
|
||||
Look for Git issues that should be fixed in the next release.
|
||||
Look for Git issues that should be fixed in the next release. Especially low-risk and simple things, like documentation changes, improvements to error messages and RPC help output.
|
||||
|
||||
### Pre-release checklist:
|
||||
* Is this release changing consensus rules?
|
||||
* Is this release changing consensus rules? Definitely update protocol version.
|
||||
|
||||
### Protocol Safety Checks:
|
||||
|
||||
* Does MIN_PROTO_VERSION need to change?
|
||||
* Does `PROTOCOL_VERSION` in src/version.h need to be increased?
|
||||
* All releases with a consensus change should increase the value by 1
|
||||
* All releases with a large change to the networking (P2P) layer should increase the value by 1
|
||||
* This identifies a nodes protocol version to all other peers it connects to.
|
||||
* Does `MIN_PEER_PROTO_VERSION` in src/version.h need to change?
|
||||
* If it does, new nodes will not be able to talk to nodes with a version less than `MIN_PROTO_VERSION`
|
||||
* The main use of these is for newer nodes that know they do not want to talk to older nodes to prevent connecting to older nodes efficiently
|
||||
* For instance, when a new release has different consensus rules than older nodes, `MIN_PROTO_VERSION` prevents wasting lots of network bandwidth talking to incompatible nodes which will eventually be banned for disagreeing on consensus rules
|
||||
|
||||
## Release dependencies
|
||||
|
||||
@@ -20,5 +61,73 @@ Install deps on Linux:
|
||||
apt-get install help2man debchange
|
||||
|
||||
## Release process
|
||||
- If new seeds are being added or seeds are changing:
|
||||
- Edit contrib/seeds/nodes_main.txt
|
||||
- Run "make seeds"
|
||||
- Commit the result
|
||||
- Update version in configure.ac and src/clientversion.h to update the hushd version
|
||||
- In src/clientversion.h you update `CLIENT_VERSION_*` variables. Usually you will just update `CLIENT_VERSION_REVISION`
|
||||
- If there is a consensus change, it may be a good idea to update `CLIENT_VERSION_MINOR` or `CLIENT_VERSION_MAJOR`
|
||||
- To make a pre-release "beta" you can modify `CLIENT_VERSION_BUILD` but that is rarely done in Hush world.
|
||||
- A `CLIENT_VERSION_BUILD` of 50 means "actual non-beta release"
|
||||
- Make sure to keep the values in configure.ac and src/clientversion.h the same. The variables are prefixed wth an underscore in configure.ac
|
||||
- Run `make manpages`, commit + push results
|
||||
- hushd must be running so the script can automatically get the correct version number
|
||||
- There is a hack in the script where you can hardcode a version number if hushd isn't running.
|
||||
- Comment out the HUSHVER line and uncomment the line above it with a hardcoded version number
|
||||
- PROTIP: Man page creation must be done after updating the version number and recompiling and before Debian package creation
|
||||
- Update checkpoints in src/chainparams.cpp via util/checkpoints.pl
|
||||
- Run "./util/checkpoints.pl help" to get example usage
|
||||
- hushd must be running to run this script, since it uses hush-cli to get the data
|
||||
- Look for line which says "END HUSH mainnet checkpoint data" near line 560 in chainparams.cpp , that is where checkpoint data ends
|
||||
- Find the highest block height of checkpoint data, let's call it HEIGHT
|
||||
- Run `./util/checkpoints.pl 1000 HEIGHT &> checkpoints.txt` to generate the latest checkpoint data
|
||||
- To copy the new data from checkpoints.txt into the file, one way in Vim is to type ":r checkpoints.txt" which will read in a file and paste it as the current cursor
|
||||
- You will see 3 lines of "stats" at the end of the output, you just pasted in the newest stats. Delete the old stats that should be the 3 lines under the current stats
|
||||
- Make sure the new code compiles, commit and push
|
||||
- Run `./util/checkpoints.pl help` to see some basic help
|
||||
- By default it will generate checkpoints for every 1000 blocks, the "stride"
|
||||
- You can get a different "stride" by passing it in as the first arg to the script
|
||||
- To get checkpoint data for every 5000 blocks: `./util/checkpoints.pl 5000 &> checkpoints.txt`
|
||||
- Currently checkpoints from before block 340k are given for every 5k blocks to keep the data smaller
|
||||
- checkpoints.pl will just generate the data you need, it must be manually copied into the correct place
|
||||
- Checkpoints are a list of block heights and block hashes that tell a full node the correct block history of the blockchain
|
||||
- Checkpoints make block verification a bit faster, because nodes can say "is this block a descendant of a checkpoint block?" instead of doing full consensus checks, which take more time
|
||||
- Checkpoints also provide a bit of security against some attacks that would create malicious chainforks
|
||||
- They only provide limited security, because they talk about the past, not future block heights.
|
||||
- Try to generate checkpoints as close to the release as possible, so you can have a recent block height be protected.
|
||||
- For instance, don't update checkpoints and then do a release a month later. You can always update checkpoint data again or multiple times
|
||||
- DRAGONX now has checkpoints, you can generate them with: `./util/checkpoints.pl 1000 1 DRAGONX`
|
||||
- Update copyright years if applicable. Example: `./util/update-copyrights.h 2022 2023`
|
||||
- Update doc/relnotes/README.md
|
||||
- To get the stats of file changes: `git diff --stat master...dev`
|
||||
- Do a fresh clone and fresh sync with new checkpoints
|
||||
- Stop node, wait 20 minutes, and then do a partial sync with new checkpoints
|
||||
- Merge dev into master: `git checkout dev && git pull && git checkout master && git pull && git merge --no-ff dev && git push`
|
||||
- The above command makes sure that your local dev branch is up to date before doing anything
|
||||
- The above command will not merge if "git pull" creates a merge conflict
|
||||
- The above command will not push if there is a problem with merging dev
|
||||
- Make Gitea release with git tag from master branch (make sure to merge dev in first)
|
||||
- Make sure git tag starts with a `v` such as `v3.9.2`
|
||||
- Use util/gen-linux-binary-release.sh to make a Linux release binary
|
||||
- Upload Linux binary to Gitea release and add SHA256 sum
|
||||
- Use util/build-debian-package.sh to make an x86 Debian package for the release
|
||||
- Debian packages should be done after you make manpages, because those are included in Debian packages
|
||||
- `lintian` is an optional dependency, it's not needed to build the .deb
|
||||
- Upload .deb to Gitea release
|
||||
- Add SHA256 checksum of .deb to release
|
||||
- Use util/build-debian-package-ARM.sh (does this still work?) to make an ARM Debian package for the release
|
||||
- Upload the debian packages to the Gitea release page, with SHA256 sums
|
||||
- Figure out how to update https://faq.hush.is/rpc/ for new release
|
||||
|
||||
...
|
||||
## Platform-specific notes
|
||||
|
||||
Use `./util/build-mac.sh` to compile on Apple/Mac systems, use `./util/build-win.sh` to build on Windows and `./util/build-arm.sh` to build on ARMv8 systems.
|
||||
|
||||
Use `./util/build-debian-package.sh aarch64` to build a Debian package for aarch64 .
|
||||
|
||||
## Optional things
|
||||
|
||||
### Updating RandomX
|
||||
|
||||
If you need to update the source code of our in tree copy of RandomX, see issue https://git.hush.is/hush/hush3/issues/337#issuecomment-5114 for details. Currently we use RandomX v1.2.1 from the official repo at https://github.com/tevador/RandomX/releases/tag/v1.2.1
|
||||
|
||||
@@ -10,6 +10,329 @@ 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.10.1 "Oneiric Octopus"
|
||||
|
||||
This is an OPTIONAL but RECOMMENDED release for Hush full nodes. It fixes an important bug
|
||||
that affects new Hush nodes. It also makes syncing faster for both Hushd and DragonX nodes.
|
||||
|
||||
```
|
||||
26 files changed, 257 insertions(+), 429 deletions(-)
|
||||
```
|
||||
|
||||
* Fix the bug which causes "payment to wrong pubkey" error when syncing a new node
|
||||
* Faster syncing of Hush and DragonX full nodes
|
||||
* Slightly less memory usage in each Equihash/RandomX mining thread
|
||||
* Fixed compiling issues related to RandomX v1.2.1
|
||||
* Improved RPC docs for `getblocktemplate`
|
||||
* Removed the `getdeprecationinfo` RPC
|
||||
|
||||
|
||||
# Hush 3.10.0 "Sassy Siphonophore"
|
||||
|
||||
```
|
||||
132 files changed, 6387 insertions(+), 2084 deletions(-)
|
||||
```
|
||||
|
||||
This is a MANDATORY release for Hush and *ALL* nodes must upgrade by block height 1605555, which will happen
|
||||
on approximately Dec 16th 2023. YOU MUST UPGRADE YOUR HUSH FULL NODE TO THIS RELEASE BY DEC 15th 2023.
|
||||
If you do not, your node will not work correctly and will require a fresh sync to fix.
|
||||
|
||||
This is an OPTIONAL release for DragonX but it is highly recommended for miners and exchanges
|
||||
to update to this release.
|
||||
|
||||
* Hush and all Hush Smart Chains now use less RAM https://git.hush.is/hush/hush3/issues/283
|
||||
* Hush full nodes will use ~2GB less RAM
|
||||
* DragonX full nodes will use ~30MB less RAM
|
||||
* Antispam defenses
|
||||
* Hush and all Hush Smart Chains now make it harder and more expensive for an attacker to send shielded spam. This raises the cost in CPU https://git.hush.is/hush/hush3/commit/14d3ae17851615a69c33cb7eed623b904b140e3d and transaction fees https://git.hush.is/hush/hush3/commit/2308db22eec78d0a10bde0f674243b2700d59e4a for Denial-of-Service attacks.
|
||||
* New RPC `z_getstats` which reports data about numer of shielded inputs (zins) and shielded outputs (zouts) in transactions. https://git.hush.is/hush/hush3/commit/96ae2d61ca5a392cb476da4c7f6ab1f638839a7f
|
||||
* Fix a bug where `hush-cli stop` would not stop the node during the "Building Witnesses" rescan phase https://git.hush.is/hush/hush3/issues/330
|
||||
* Fix bugs where `abortrescan` couldn't be used when node is start up (RPC warmup) and where it could not abort the rescan if it was in the "Building Witnesses" phase https://git.hush.is/hush/hush3/issues/331
|
||||
* Fix bug in `z_mergetoaddress` where docs said you could use `ANY_ZADDR` but you couldn't https://git.hush.is/hush/hush3/commit/7eb9d75b94469c3fc8c028f29b35be9ac764a10c
|
||||
* RPC `z_listunspent` now returns the text representation of a memo in `memoStr` key
|
||||
* Upgraded curl to 8.4.0 https://git.hush.is/hush/hush3/issues/325
|
||||
* This fixes CVE-2023-38545 which affects very few or potentially no Hush/DragonX users. It could only affect people who compile Hush full node software (not those who use binaries or packages) and who use a malicious SOCKS5 proxy for all network traffic via the operating system.
|
||||
* New documentation about using CJDNS with Hush: https://git.hush.is/hush/hush3/src/branch/dev/doc/cjdns.md
|
||||
* Decentralized Devtax for improved scalability and operational security. This is a consensus change.
|
||||
* DragonX specific changes:
|
||||
* Updated to latest RandomX v1.2.1 which includes mining optimizations https://git.hush.is/hush/hush3/commit/6029b3d571009991ae9c4aea0397f4d00be6a817 https://git.hush.is/hush/hush3/issues/337
|
||||
* Fix RandomX mining memory leak and crash https://git.hush.is/hush/hush3/issues/324
|
||||
* This fixes the bug where stopping mining, making a transaction and then starting mining again
|
||||
* This also avoids an out-of-memory crash when miners change the number of threads of mining
|
||||
* Fixing this bug lead to a 10% hashrate increase vs the previous release
|
||||
* Fixed quoting bugs with dragonx-cli script
|
||||
* For instance, many RPCs such as `dragonx z_sendmany ...` would not previously work because the arguments to the RPC were not quoted correctly.
|
||||
|
||||
|
||||
# Hush 3.9.4 "Maniacal Manticore"
|
||||
|
||||
```
|
||||
68 files changed, 1304 insertions(+), 1343 deletions(-)
|
||||
```
|
||||
|
||||
This is an OPTIONAL release. It is recommended for exchanges, solo miners and mining pools to update to this release.
|
||||
|
||||
* New features and improvements
|
||||
* Hush and DragonX nodes will now sync much faster
|
||||
* DragonX now has checkpoints for faster better chain security
|
||||
* Updated to the latest RandomX code
|
||||
* Rate limiting for the processing of incoming addr messages for increased security.
|
||||
* Removed unused function CWalletTx::GetRequestCount
|
||||
* Removed mapRequest tracking that only affects Qt display.
|
||||
* Randomized message processing peer order for increased privacy.
|
||||
* Removed BIP35 mempool p2p message for increased privacy.
|
||||
* Additional community seed node
|
||||
* Build Improvements
|
||||
* Use custom jobs param when compiling boost for faster compile times
|
||||
* Now builds with gcc13 thanks to testing from jahway
|
||||
* We have an aarch64 deb now thanks to jahway
|
||||
* Bug fixes:
|
||||
* -stratumallowip works with CIDR and netmask ranges again for solo miners
|
||||
* Detect missing autoreconf in build.sh
|
||||
* Various assertions removed from BIP155 changes in previous release.
|
||||
|
||||
|
||||
# Hush 3.9.3 "Lateral Larvacean"
|
||||
|
||||
```
|
||||
1012 files changed, 36253 insertions(+), 5507 deletions(-)
|
||||
```
|
||||
|
||||
This is an OPTIONAL release. It is recommended for exchanges, solo miners and mining pools to update to this release.
|
||||
|
||||
* Many RandomX mining fixes and improvements
|
||||
* Difficulty bug affecting DRAGONX has been fixed
|
||||
* RandomX mining hashrate increase of about 60X
|
||||
* Optimized memory usage of RandomX mining
|
||||
* This release adds Tor v3 and i2p support (BIP155 also known as addrv2)
|
||||
* Basic usage is `hushd -proxy=127.0.0.1:9050` for using a local Tor proxy.
|
||||
* Use port 9150 if you are using Tor Browser. See docs/tor.md for details
|
||||
* New CLI args: `-i2psam=<ip:port>` and `-i2pacceptincoming` . See docs/i2p.md for more info
|
||||
* Tor and i2p seeds have been added
|
||||
* The format of peers.dat has changed. On first startup with this code there will be a short delay of a few minutes while new nodes are found and peers.dat is populated in it's new format.
|
||||
* New RPCs:
|
||||
* getrescaninfo - Says if the node is rescanning with additional info about progress
|
||||
* abortrescan - stop rescanning if a node is currently rescanning
|
||||
|
||||
|
||||
# Hush 3.9.2 "Anecdotal Axolotl"
|
||||
|
||||
```
|
||||
966 files changed, 26999 insertions(+), 2758 deletions(-)
|
||||
```
|
||||
|
||||
This is an OPTIONAL release. It is recommended for exchanges, solo miners and mining pools to update to this release
|
||||
since it contains various bugfixes and improvements that will benefit busy wallets.
|
||||
|
||||
* This release adds RandomX support in Hush Smart Chains (HSCs)
|
||||
* When creating a new HSC specify `-ac_algo=randomx` to use RandomX instead of Equihash
|
||||
* Example: `hush-smart-chain -ac_name=RANDX -ac_algo=randomx ...`
|
||||
* This allows HSCs to be mined with CPUs instead of ASICs
|
||||
* Because of RandomX, `cmake` is a new dependency needed to compile Hush from source
|
||||
* More detailed documentation available at https://git.hush.is/hush/hush3/src/branch/dev/doc/randomx.md
|
||||
* For general info about HSCs see https://git.hush.is/hush/hush3/src/branch/dev/doc/hsc.md
|
||||
* A new feature called "zsweep" has been added, which defaults to disabled.
|
||||
* It will sweep funds from all zaddrs into a single specified zaddr
|
||||
* A new RPC `z_sweepstatus` will show various details about the sweeping
|
||||
* There are many advanced options to it, see full docs at https://git.hush.is/hush/hush3/src/branch/dev/doc/zsweep-consolidation.md
|
||||
* Expired transactions will not be relayed and nodes who relay expired transactions are no longer banned
|
||||
* A node relaying expired transactions is usually misconfigured or confused, not attacking us
|
||||
* This change means node operators no longer need to deal with unbanning or allowlisting confused nodes
|
||||
* Fix a rare coredump that could happen when nodes have many unconfirmed or expired transactions
|
||||
* New RPC: `getblockmerkletree`, which will show the full Merkle Tree for a block height
|
||||
* New RPC: `z_consolidationstatus` is similar to `z_sweepstatus` and will show config+stats about consolidation
|
||||
* New RPC: `z_anonsettxdelta` : Returns delta (difference) in the anonset for a given txid.
|
||||
* A delta > 0 increases the anonset
|
||||
* A delta < 0 reduces the anonset
|
||||
* A delta=0 leaves the anonset the same
|
||||
* New RPC: `z_anonsetblockdelta` : Returns delta (difference) in the anonset for a given block.
|
||||
* getrawtransaction RPC now returns a "size" key with the size in bytes of a transaction
|
||||
* sendmany RPC will now reject transactions that send to taddrs immediately, instead of them being rejected in mempool
|
||||
* Preliminary support for FreeBSD has been added to the Hush build system
|
||||
* New contrib scripts:
|
||||
* `contrib/gen-zaddrs.pl` - Generate zaddrs in bulk, defaults to 50
|
||||
* `contrib/sdl_checkpoints.pl` - Generate SDL checkpoints using `getblockmerkletree`
|
||||
* ZeroMQ support has been removed from Hush
|
||||
|
||||
# Hush 3.9.1 "Luciferous Locust"
|
||||
|
||||
This is an OPTIONAL release. It is most important for users with large wallets, as it fixes an important
|
||||
bug that causes the Hush full node to stop responding to requests. It is recommended for exchanges
|
||||
and mining pools to update to this release.
|
||||
```
|
||||
34 files changed, 6530 insertions(+), 6344 deletions(-)
|
||||
```
|
||||
|
||||
* Fix RPC deadlocks, which caused the RPC interface to hang.
|
||||
* A special thanks to ex-Hush developer miodrag who reported this in an upstream issue comment.
|
||||
* This turned out to be an upstream bug in Zcash that was inherited by Hush.
|
||||
* More details can be found at https://git.hush.is/hush/hush3/issues/77
|
||||
* The `listbanned` RPC now returns a new key `time_remaining` which tells how many
|
||||
seconds are remaining in the ban
|
||||
* The `rescan` RPC now works correctly when given a height. This can be used to do
|
||||
a partial rescan from a custom height, without restarting the node.
|
||||
* Minimum disk space required for a running full node has been increased to 1GB from 50MB
|
||||
* This will print "Disk space is low!!!" and shut down the full node.
|
||||
* To fix, free up disk space and restart the node.
|
||||
* This change was implemented because in rare circumstances, large amounts of disk space
|
||||
can be used up quickly, faster than the node checks for free disk space, which can lead
|
||||
to a corrupt wallet.dat . Requiring more free disk space makes this much less likely.
|
||||
* Dockerfile has been updated
|
||||
|
||||
# Hush 3.9.0 "Unusual Ursid"
|
||||
```
|
||||
136 files changed, 3881 insertions(+), 3156 deletions(-)
|
||||
```
|
||||
|
||||
This is a MANDATORY release, please update as soon as you can! At some point, full nodes older than 3.9.0
|
||||
will no longer be able to sync the current HUSH network correctly. More details will be given in a future update.
|
||||
|
||||
* :rainbow: hushd/hush-cli/hush-tx are now true binaries instead of shell scripts
|
||||
* This means hushd.bat, hush-cli.bat and hush-tx.bat are no longer needed on Windows
|
||||
and simplifies the maintenance of internals
|
||||
* :tada: New official location for full node data is ~/.hush !
|
||||
* New full nodes will install and use ~/.hush
|
||||
* Existing full nodes will continue to use the legacy ~/.komodo directory
|
||||
* If both ~/.hush/HUSH3 and ~/.komodo/HUSH3 exist, the ~/.hush directory will be used
|
||||
* :kiss: Hush full nodes will now attempt to talk to two more nodes by default:
|
||||
* node1.hush.land
|
||||
* node2.hush.land
|
||||
* :fork_and_knife: New RPCs:
|
||||
* listaddresses - Show all taddrs in this wallet.dat
|
||||
* rpcinfo - Shows stats about RPC internals
|
||||
* :unicorn: These RPCs can now be run during RPC warmup:
|
||||
* listaddresses
|
||||
* z\_exportwallet
|
||||
* signmessage
|
||||
* decoderawtransaction
|
||||
* getnetworkinfo
|
||||
* :sweat_drops: New doc/hushd.service to use hushd with systemd
|
||||
* Learn more at doc/hushd-systemd.md
|
||||
* :rocket: Many updates to Hush Smart Chains and Hush internals
|
||||
* Optimize zaddrs by only building witness caches for blocks that involve our wallet
|
||||
* When RPC connection fails hush-cli now tells you which port it was trying to connect to
|
||||
* Calculation of HSC "network magic" has changed as of 3.9.0
|
||||
* If using or developing an HSC, all nodes must use either 3.8.0 or earlier, or
|
||||
preferably, all use 3.9.0 code or later. HSC networks using both 3.8.0 and 3.9.0 will not work.
|
||||
* This was required by internals changes and we do not plan to do this again.
|
||||
* :hammer: New Stratum API so you can Solo mine with your full node!
|
||||
* This is an optional feature that defaults to disabled. Enable it with `-stratum=1`
|
||||
* Example usage: `hushd -stratum=1 -stratumport=31337 -stratumallowip=192.168.0.0/24'
|
||||
* This allows mining connections from your local network where computers have IPs like 192.168.0.x .
|
||||
* Your ASICs must be able to connect to the IP and port of your full node. Firewall rules may be needed.
|
||||
* It offers the highest privacy for miners, since mining pools know your IP and address metadata and can be
|
||||
hacked or coerced into giving that data. Solo mining with your own full node gives the absolute least metadata
|
||||
to third parties.
|
||||
* This is also the cheapest possible way to mine HUSH, since there are NO POOL FEES and NO PAYOUT TRANSACTION FEES! :smile:
|
||||
* Miners can mine entire HUSH blocks from the privacy of their own server
|
||||
* As many ASICs as you like can be used with a single Hush full node, just use an address inside a wallet you control,
|
||||
and set your pool to the IP and port of your Hush full node with Stratum enabled.
|
||||
* :nerd_face: The hush-smart-chain script is now installed in Debian packages
|
||||
|
||||
# Hush 3.8.0 "Chuckling Chupacabra"
|
||||
|
||||
```
|
||||
32 files changed, 712 insertions(+), 183 deletions(-)
|
||||
```
|
||||
|
||||
This is an OPTIONAL release, but since it contains many privacy improvements, it's HIGHLY RECOMMENDED for all users to upgrade.
|
||||
It's VERY HIGHLY RECOMMENDED for mining pools to upgrade, since some improvements affect them.
|
||||
|
||||
* New Sietch feature: Randomized change output location
|
||||
* Zcash and Pirate always put the change as the last shielded output, which leaks metadata. Hush no longer has this metadata leakage.
|
||||
* This feature improves the `z_sendmany`, `z_mergetoaddress` and `z_shieldtocoinbase` since it's done in the Hush TransactionBuilder.
|
||||
* New Sietch feature: Sitech-ified `z_shieldcoinbase`
|
||||
* This RPC now leaks less metadata by making it hard for blockchain analysts to know which of the three outputs has value.
|
||||
* This also increases Hush's "anonset velocity", which is how fast we increase our anonymity set, or "anonset".
|
||||
* Thanks to [LuckPool](https://luckpool.net) for a patch that fixes how the longest chain is calculated.
|
||||
* This bug can prevent mining pools from making payout transactions, which is why this release is HIGHLY RECOMMENDED for mining pools.
|
||||
* Previously you could only run `stop` while Hush was in RPC warmup, but now additional RPCs are allowed:
|
||||
* `stop` - Oops, you started hushd on accident a few seconds ago? Now you can stop it without waiting.
|
||||
* `help` - Get help during long rescans, finally!
|
||||
* `z_listaddresses` - See a list of all zaddrs in this wallet, even during a long rescan!
|
||||
* `z_exportkey` - Export a key from this node, even during rescan!
|
||||
* `listaddresses` - See a list of taddrs as soon as we load the wallet.
|
||||
* `dumpprivkey` - Dump the private key of a taddr, even when node isn't fully synced!
|
||||
* `getpeerinfo` - See current peers even before we get enough peers to start syncing or a long rescan!
|
||||
* If the RPC interface is not functioning (such as filled by deadlocks or something else) it can become impossible to shut down hushd correctly!
|
||||
* Doing a `kill` of the process could corrupt wallet.dat and cause a very long rescan.
|
||||
* Now you can create a file called `plz_stop` in the same directory as wallet.dat
|
||||
* `hushd` checks for this file every 120 seconds and will shutdown if it sees it.
|
||||
* `-keepnotewitnesscache` prevents the Sapling Note Witness cache from being deleted from wallet.dat on shutdown.
|
||||
* If your hushd crashed or needed to be `kill -9`, do `hushd -keepnotewitnesscache -rescan -rescanheight=XXX` with a height of just before it crashed
|
||||
* This will only rescan the latest part of the blockchain looking for new funds, instead of all of history. Much faster!
|
||||
* `-rescanheight` can be used with `-keepnotewitnesscache` and `-rescan` to do a partial rescan of history and avoid completely rebuilding the Witness Cache.
|
||||
* `-zindex` data is now stored on disk in the new `zindex.dat` file
|
||||
* All nodes that use `-zindex` will now have reliable anonset statistics even after a restart
|
||||
* `getpeerinfo` now returns a `relaytxes` key which says if a remote node is relaying transactions to us
|
||||
* Improvements to the RPC help documentation
|
||||
* `hushd.bat` for Windows now uses the ASN map via `-asmap` and has the latest seed nodes
|
||||
* `hushd-tx.bat` for Windows now exists for making raw transactions on Windows
|
||||
|
||||
# Hush 3.7.1 "Neologistic Nautilus"
|
||||
|
||||
```
|
||||
638 files changed, 1484 insertions(+), 962 deletions(-)
|
||||
```
|
||||
|
||||
This is an OPTIONAL release for average Hush users, but is HIGHLY RECOMMENDED for service providers, such as lite wallet server ops, mining pools, exchanges, bots, etc.
|
||||
|
||||
## Notable Changes
|
||||
|
||||
* :tada: More internals code related to unused Sprout transactions was removed, making Hush run and compile faster and use less memory.
|
||||
* :smile: We now give a more useful error message when a user attempts to make a tx before the node is synced.
|
||||
* :nerd_face: `z_sendmany` RPC docs now show an example of a z2z transaction
|
||||
* :closed_lock_with_key: Various security + privacy improvements to the network Peer To Peer (p2p) layer, including:
|
||||
* The deprecated `alert` p2p message is no longer processed and nodes using it will be banned.
|
||||
* `try-before-evict` ported from BTC core, which helps protect again Eclipse and Sybil Attacks
|
||||
* "Feeler connections" ported from BTC, another technique which makes Eclipse and Sybil Attacks harder and more expensive
|
||||
* From the paper "Eclipse Attacks on Bitcoin’s Peer-to-Peer Network" Ethan Heilman, Alison Kendler, Aviv Zohar, Sharon Goldberg. https://eprint.iacr.org/2015/263.pdf
|
||||
* Related to https://github.com/bitcoin/bitcoin/pull/8282
|
||||
* :unicorn: New RPC: `z_getbalances` returns a list of all zaddrs with non-zero balance.
|
||||
* An optional paramater can filter addresses to those with a specified minimum balance, such as
|
||||
`z_getbalances 0.1` will only show HUSH zaddrs with at least 0.1 HUSH.
|
||||
* :rainbow: "Automagic `z_sendmany`" makes the RPC easier to use and also improves privacy
|
||||
* The `z_sendmany` RPC now understands a symbolic from address of `z` which means:
|
||||
* Randomly choose any zaddr with enough balance as from address
|
||||
* This means CLI users no longer need to run multiple RPC's to find a zaddr with enough balance and specify it themselves
|
||||
* It also means that CLI shell history and cronjobs or source code does not contain the source zaddr, improving privacy.
|
||||
|
||||
|
||||
# Hush 3.7.0 "Diffy The DAA Kungfoo Cuckoo"
|
||||
|
||||
```
|
||||
13 files changed, 102 insertions(+), 91 deletions(-)
|
||||
```
|
||||
|
||||
This is an OPTIONAL release for most Hush users. It is MANDATORY for miners, specifically solo miners and mining pools. It is not required for POOL miners.
|
||||
|
||||
# Hush 3.6.3 "Autonomous Aconite's Aunt"
|
||||
|
||||
:rainbow: OPTIONAL but RECOMMENDED release. :rainbow:
|
||||
|
||||
This release is mostly the same as 3.6.2 but it fixes some issues in Debian+Arch packages and binaries not being able to find asmap.dat, which did not occur when building from Git source. This release protects all users, by default, from network attacks like the Erebus Attack: https://erebus-attack.comp.nus.edu.sg/
|
||||
|
||||
# Hush 3.6.2 "Autonomous Aconite"
|
||||
|
||||
:eyes: This is an OPTIONAL but RECOMMENDED Hush Full Node release :eyes:
|
||||
|
||||
|
||||
## Notable changes
|
||||
|
||||
* :robot: Autonomous System Map (asmap) bucketing by default
|
||||
* :tada: HUSH is the first cryptocoin to take this work from BTC Core and turn it on by default for all nodes
|
||||
* :100: SD 1.1.1 did this itself, and now we push that change into the full node itself.
|
||||
* :metal: The new CLI flag `-asmap` is on by default, and can be turned off with `-asmap=0`
|
||||
* :peach: This setting helps users by having 7.4 million "buckets" for peers instead of only 65000 which the traditional /16 scheme uses. This means all Hush full nodes are more protected against network-layer attacks such as the Erebus Attack: https://erebus-attack.comp.nus.edu.sg/
|
||||
* :wink: debug.log is now shrunk to 15MB instead of 100MB
|
||||
* :nerd_face: The max size of debug.log can now be controlled via `-maxdebugfilesize`
|
||||
* :rainbow: A new document that gives an Overview of Hush: https://git.hush.is/hush/hush3/src/branch/master/doc/overview.md
|
||||
|
||||
```
|
||||
30db6e6f0cab9f4ac0a4c4b5968a9db8e04ee6a2eb23fe4ae51e8e6bf76b8044 hush-3.6.2-ubuntu-16.04-amd64.tar.gz
|
||||
2393910c224b98213725bd4671dd245c36c19dbe6abb4015b8df181064eb9b64 hush-3.6.2-ubuntu-16.04.deb
|
||||
```
|
||||
|
||||
# Hush 3.6.1 "Syncopated Sphinx"
|
||||
|
||||
:fire: This is an OPTIONAL release, but upgrading is ENCOURAGED. :fire:
|
||||
|
||||
295
doc/tor.md
295
doc/tor.md
@@ -1,148 +1,225 @@
|
||||
*** Warning: Do not assume Tor support does the correct thing in Hush; better Tor support is a future feature goal. ***
|
||||
# Tor
|
||||
|
||||
# TOR SUPPORT IN HUSH
|
||||
|
||||
It is possible to run Hush as a Tor hidden service, and connect to such services.
|
||||
It is possible to run Hush as a Tor onion service, and connect to such services.
|
||||
|
||||
The following directions assume you have a Tor proxy running on port 9050. Many distributions default to having a SOCKS proxy listening on port 9050, but others may not. In particular, the Tor Browser Bundle defaults to listening on port 9150. See [Tor Project FAQ:TBBSocksPort](https://www.torproject.org/docs/faq.html.en#TBBSocksPort) for how to properly
|
||||
configure Tor.
|
||||
|
||||
## Compatibility
|
||||
|
||||
1. Run Hush behind a Tor proxy
|
||||
-------------------------------
|
||||
- Starting with version 3.9.3, Hush only supports Tor version 3 hidden
|
||||
services (Tor v3). Tor v2 addresses are ignored by Hush and neither
|
||||
relayed nor stored.
|
||||
|
||||
The first step is running Hush behind a Tor proxy. This will already make all
|
||||
outgoing connections be anonymized, but more is possible.
|
||||
- Tor removed v2 support beginning with version 0.4.6.
|
||||
|
||||
-proxy=ip:port Set the proxy server. If SOCKS5 is selected (default), this proxy
|
||||
server will be used to try to reach .onion addresses as well.
|
||||
## How to see information about your Tor configuration via Hush
|
||||
|
||||
-onion=ip:port Set the proxy server to use for Tor hidden services. You do not
|
||||
need to set this if it's the same as -proxy. You can use -noonion
|
||||
to explicitly disable access to hidden service.
|
||||
There are several ways to see your local onion address in Hush:
|
||||
- in the "Local addresses" output of CLI `-netinfo`
|
||||
- in the "localaddresses" output of RPC `getnetworkinfo`
|
||||
- in the debug log (grep for "AddLocal"; the Tor address ends in `.onion`)
|
||||
|
||||
-listen When using -proxy, listening is disabled by default. If you want
|
||||
to run a hidden service (see next section), you'll need to enable
|
||||
it explicitly.
|
||||
You may set the `-debug=tor` config logging option to have additional
|
||||
information in the debug log about your Tor configuration.
|
||||
|
||||
-connect=X When behind a Tor proxy, you can specify .onion addresses instead
|
||||
-addnode=X of IP addresses or hostnames in these parameters. It requires
|
||||
-seednode=X SOCKS5. In Tor mode, such addresses can also be exchanged with
|
||||
other P2P nodes.
|
||||
CLI `-addrinfo` returns the number of addresses known to your node per
|
||||
network. This can be useful to see how many onion peers your node knows,
|
||||
e.g. for `-onlynet=onion`.
|
||||
|
||||
To fetch a number of onion addresses that your node knows, for example seven
|
||||
addresses, use the `getnodeaddresses 7 onion` RPC.
|
||||
|
||||
## 1. Run Hush behind a Tor proxy
|
||||
|
||||
The first step is running Hush behind a Tor proxy. This will already anonymize all
|
||||
outgoing connections, but more is possible.
|
||||
|
||||
-proxy=ip:port Set the proxy server. If SOCKS5 is selected (default), this proxy
|
||||
server will be used to try to reach .onion addresses as well.
|
||||
You need to use -noonion or -onion=0 to explicitly disable
|
||||
outbound access to onion services.
|
||||
|
||||
-onion=ip:port Set the proxy server to use for Tor onion services. You do not
|
||||
need to set this if it's the same as -proxy. You can use -onion=0
|
||||
to explicitly disable access to onion services.
|
||||
------------------------------------------------------------------
|
||||
Note: Only the -proxy option sets the proxy for DNS requests;
|
||||
with -onion they will not route over Tor, so use -proxy if you
|
||||
have privacy concerns.
|
||||
------------------------------------------------------------------
|
||||
|
||||
-listen When using -proxy, listening is disabled by default. If you want
|
||||
to manually configure an onion service (see section 3), you'll
|
||||
need to enable it explicitly.
|
||||
|
||||
-connect=X When behind a Tor proxy, you can specify .onion addresses instead
|
||||
-addnode=X of IP addresses or hostnames in these parameters. It requires
|
||||
-seednode=X SOCKS5. In Tor mode, such addresses can also be exchanged with
|
||||
other P2P nodes.
|
||||
|
||||
-onlynet=onion Make automatic outbound connections only to .onion addresses.
|
||||
Inbound and manual connections are not affected by this option.
|
||||
It can be specified multiple times to allow multiple networks,
|
||||
e.g. onlynet=onion, onlynet=i2p, onlynet=cjdns.
|
||||
|
||||
In a typical situation, this suffices to run behind a Tor proxy:
|
||||
|
||||
./hushd -proxy=127.0.0.1:9050
|
||||
./hushd -proxy=127.0.0.1:9050
|
||||
|
||||
## 2. Automatically create a Hush onion service
|
||||
|
||||
Hush makes use of Tor's control socket API to create and destroy
|
||||
ephemeral onion services programmatically. This means that if Tor is running and
|
||||
proper authentication has been configured, Hush automatically creates an
|
||||
onion service to listen on. The goal is to increase the number of available
|
||||
onion nodes.
|
||||
|
||||
This feature is enabled by default if Hush is listening (`-listen`) and
|
||||
it requires a Tor connection to work. It can be explicitly disabled with
|
||||
`-listenonion=0`. If it is not disabled, it can be configured using the
|
||||
`-torcontrol` and `-torpassword` settings.
|
||||
|
||||
To see verbose Tor information in the hushd debug log, pass `-debug=tor`.
|
||||
|
||||
### Control Port
|
||||
|
||||
You may need to set up the Tor Control Port. On Linux distributions there may be
|
||||
some or all of the following settings in `/etc/tor/torrc`, generally commented
|
||||
out by default (if not, add them):
|
||||
|
||||
```
|
||||
ControlPort 9051
|
||||
CookieAuthentication 1
|
||||
CookieAuthFileGroupReadable 1
|
||||
```
|
||||
|
||||
Add or uncomment those, save, and restart Tor (usually `systemctl restart tor`
|
||||
or `sudo systemctl restart tor` on most systemd-based systems, including recent
|
||||
Debian and Ubuntu, or just restart the computer).
|
||||
|
||||
On some systems (such as Arch Linux), you may also need to add the following
|
||||
line:
|
||||
|
||||
```
|
||||
DataDirectoryGroupReadable 1
|
||||
```
|
||||
|
||||
### Authentication
|
||||
|
||||
Connecting to Tor's control socket API requires one of two authentication
|
||||
methods to be configured: cookie authentication or hushd's `-torpassword`
|
||||
configuration option.
|
||||
|
||||
#### Cookie authentication
|
||||
|
||||
For cookie authentication, the user running hushd must have read access to
|
||||
the `CookieAuthFile` specified in the Tor configuration. In some cases this is
|
||||
preconfigured and the creation of an onion service is automatic. Don't forget to
|
||||
use the `-debug=tor` hushd configuration option to enable Tor debug logging.
|
||||
|
||||
If a permissions problem is seen in the debug log, e.g. `tor: Authentication
|
||||
cookie /run/tor/control.authcookie could not be opened (check permissions)`, it
|
||||
can be resolved by adding both the user running Tor and the user running
|
||||
hushd to the same Tor group and setting permissions appropriately.
|
||||
|
||||
On Debian-derived systems, the Tor group will likely be `debian-tor` and one way
|
||||
to verify could be to list the groups and grep for a "tor" group name:
|
||||
|
||||
```
|
||||
getent group | cut -d: -f1 | grep -i tor
|
||||
```
|
||||
|
||||
You can also check the group of the cookie file. On most Linux systems, the Tor
|
||||
auth cookie will usually be `/run/tor/control.authcookie`:
|
||||
|
||||
```
|
||||
TORGROUP=$(stat -c '%G' /run/tor/control.authcookie)
|
||||
```
|
||||
|
||||
Once you have determined the `${TORGROUP}` and selected the `${USER}` that will
|
||||
run hushd, run this as root:
|
||||
|
||||
```
|
||||
usermod -a -G ${TORGROUP} ${USER}
|
||||
```
|
||||
|
||||
Then restart the computer (or log out) and log in as the `${USER}` that will run
|
||||
hushd.
|
||||
|
||||
#### `torpassword` authentication
|
||||
|
||||
For the `-torpassword=password` option, the password is the clear text form that
|
||||
was used when generating the hashed password for the `HashedControlPassword`
|
||||
option in the Tor configuration file.
|
||||
|
||||
The hashed password can be obtained with the command `tor --hash-password
|
||||
password` (refer to the [Tor Dev
|
||||
Manual](https://2019.www.torproject.org/docs/tor-manual.html.en) for more
|
||||
details).
|
||||
|
||||
|
||||
2. Run a Hush hidden server
|
||||
----------------------------
|
||||
## 3. Manually create a Hush onion service
|
||||
|
||||
If you configure your Tor system accordingly, it is possible to make your node also
|
||||
reachable from the Tor network. Add these lines to your /etc/tor/torrc (or equivalent
|
||||
config file):
|
||||
You can also manually configure your node to be reachable from the Tor network.
|
||||
Add these lines to your `/etc/tor/torrc` (or equivalent config file):
|
||||
|
||||
HiddenServiceDir /var/lib/tor/hush-service/
|
||||
HiddenServicePort 7771 127.0.0.1:7771
|
||||
HiddenServicePort 17771 127.0.0.1:17771
|
||||
HiddenServiceDir /var/lib/tor/hush-service/
|
||||
HiddenServicePort 18030 127.0.0.1:18032
|
||||
|
||||
The directory can be different of course, but (both) port numbers should be equal to
|
||||
your hushd's P2P listen port (7771 by default).
|
||||
The directory can be different of course, but virtual port numbers should be equal to
|
||||
your hushd's P2P listen port (18030 by default), and target addresses and ports
|
||||
should be equal to binding address and port for inbound Tor connections (127.0.0.1:18032 by default).
|
||||
|
||||
-externalip=X You can tell Hush about its publicly reachable address using
|
||||
this option, and this can be a .onion address. Given the above
|
||||
configuration, you can find your onion address in
|
||||
/var/lib/tor/hush-service/hostname. Onion addresses are given
|
||||
preference for your node to advertize itself with, for connections
|
||||
coming from unroutable addresses (such as 127.0.0.1, where the
|
||||
Tor proxy typically runs).
|
||||
-externalip=X You can tell hush about its publicly reachable addresses using
|
||||
this option, and this can be an onion address. Given the above
|
||||
configuration, you can find your onion address in
|
||||
/var/lib/tor/hush-service/hostname. For connections
|
||||
coming from unroutable addresses (such as 127.0.0.1, where the
|
||||
Tor proxy typically runs), onion addresses are given
|
||||
preference for your node to advertise itself with.
|
||||
|
||||
-listen You'll need to enable listening for incoming connections, as this
|
||||
is off by default behind a proxy.
|
||||
You can set multiple local addresses with -externalip. The
|
||||
one that will be rumoured to a particular peer is the most
|
||||
compatible one and also using heuristics, e.g. the address
|
||||
with the most incoming connections, etc.
|
||||
|
||||
-discover When -externalip is specified, no attempt is made to discover local
|
||||
IPv4 or IPv6 addresses. If you want to run a dual stack, reachable
|
||||
from both Tor and IPv4 (or IPv6), you'll need to either pass your
|
||||
other addresses using -externalip, or explicitly enable -discover.
|
||||
Note that both addresses of a dual-stack system may be easily
|
||||
linkable using traffic analysis.
|
||||
-listen You'll need to enable listening for incoming connections, as this
|
||||
is off by default behind a proxy.
|
||||
|
||||
-discover When -externalip is specified, no attempt is made to discover local
|
||||
IPv4 or IPv6 addresses. If you want to run a dual stack, reachable
|
||||
from both Tor and IPv4 (or IPv6), you'll need to either pass your
|
||||
other addresses using -externalip, or explicitly enable -discover.
|
||||
Note that both addresses of a dual-stack system may be easily
|
||||
linkable using traffic analysis.
|
||||
|
||||
In a typical situation, where you're only reachable via Tor, this should suffice:
|
||||
|
||||
./hushd -proxy=127.0.0.1:9050 -externalip=zctestseie6wxgio.onion -listen
|
||||
./hushd -proxy=127.0.0.1:9050 -externalip=7zvj7a2imdgkdbg4f2dryd5rgtrn7upivr5eeij4cicjh65pooxeshid.onion -listen
|
||||
|
||||
(obviously, replace the Onion address with your own). It should be noted that you still
|
||||
(obviously, replace the .onion address with your own). It should be noted that you still
|
||||
listen on all devices and another node could establish a clearnet connection, when knowing
|
||||
your address. To mitigate this, additionally bind the address of your Tor proxy:
|
||||
|
||||
./hushd ... -bind=127.0.0.1
|
||||
./hushd ... -bind=127.0.0.1
|
||||
|
||||
If you don't care too much about hiding your node, and want to be reachable on IPv4
|
||||
as well, use `discover` instead:
|
||||
|
||||
./hushd ... -discover
|
||||
./hushd ... -discover
|
||||
|
||||
and open port 7771 on your firewall (or use -upnp).
|
||||
and open port 18030 on your firewall (or use port mapping, i.e., `-upnp` or `-natpmp`).
|
||||
|
||||
If you only want to use Tor to reach onion addresses, but not use it as a proxy
|
||||
If you only want to use Tor to reach .onion addresses, but not use it as a proxy
|
||||
for normal IPv4/IPv6 communication, use:
|
||||
|
||||
./hushd -onion=127.0.0.1:9050 -externalip=zctestseie6wxgio.onion -discover
|
||||
./hushd -onion=127.0.0.1:9050 -externalip=7zvj7a2imdgkdbg4f2dryd5rgtrn7upivr5eeij4cicjh65pooxeshid.onion -discover
|
||||
|
||||
## 4. Privacy recommendations
|
||||
|
||||
3. Automatically listen on Tor
|
||||
--------------------------------
|
||||
|
||||
Starting with Tor version 0.2.7.1 it is possible, through Tor's control socket
|
||||
API, to create and destroy 'ephemeral' hidden services programmatically.
|
||||
Hush has been updated to make use of this.
|
||||
|
||||
This means that if Tor is running (and proper authentication has been configured),
|
||||
Hush automatically creates a hidden service to listen on. Hush will also use Tor
|
||||
automatically to connect to other .onion nodes if the control socket can be
|
||||
successfully opened. This will positively affect the number of available .onion
|
||||
nodes and their usage.
|
||||
|
||||
This new feature is enabled by default if Hush is listening (`-listen`), and
|
||||
requires a Tor connection to work. It can be explicitly disabled with `-listenonion=0`
|
||||
and, if not disabled, configured using the `-torcontrol` and `-torpassword` settings.
|
||||
To show verbose debugging information, pass `-debug=tor`.
|
||||
|
||||
Connecting to Tor's control socket API requires one of two authentication methods to be
|
||||
configured. For cookie authentication the user running hushd must have write access
|
||||
to the `CookieAuthFile` specified in Tor configuration. In some cases this is
|
||||
preconfigured and the creation of a hidden service is automatic. If permission problems
|
||||
are seen with `-debug=tor` they can be resolved by adding both the user running tor and
|
||||
the user running hushd to the same group and setting permissions appropriately. On
|
||||
Debian-based systems the user running hushd can be added to the debian-tor group,
|
||||
which has the appropriate permissions. An alternative authentication method is the use
|
||||
of the `-torpassword` flag and a `hash-password` which can be enabled and specified in
|
||||
Tor configuration.
|
||||
|
||||
|
||||
4. Connect to a Hush hidden server
|
||||
-----------------------------------
|
||||
|
||||
To test your set-up, you might want to try connecting via Tor on a different computer to just a
|
||||
a single Hush hidden server. Launch hushd as follows:
|
||||
|
||||
./hushd -onion=127.0.0.1:9050 -connect=fuckzookoie6wxgio.onion
|
||||
|
||||
Now use hush-cli to verify there is only a single peer connection.
|
||||
|
||||
hush-cli getpeerinfo
|
||||
|
||||
[
|
||||
{
|
||||
"id" : 1,
|
||||
"addr" : "zctestseie6wxgio.onion:17770",
|
||||
...
|
||||
"version" : 170010,
|
||||
"subver" : "/GoldenSandtrout:3.6.0/",
|
||||
...
|
||||
}
|
||||
]
|
||||
|
||||
To connect to multiple Tor nodes, use:
|
||||
|
||||
./hushd -onion=127.0.0.1:9050 -addnode=fuckzookoeie6wxgio.onion -dnsseed=0 -onlynet=onion
|
||||
- Do not add anything but Hush ports to the onion service created in section 3.
|
||||
If you run a web service too, create a new onion service for that.
|
||||
Otherwise it is trivial to link them, which may reduce privacy. Onion
|
||||
services created automatically (as in section 2) always have only one port
|
||||
open.
|
||||
|
||||
@@ -16,7 +16,7 @@ These instructions are specific for the officially supported Hush Linux client.
|
||||
|
||||
There are multiple ways to make sure you have at least one other copy of the private keys needed to spend your HUSH and view your shielded HUSH.
|
||||
|
||||
For all methods, you will need to include an export directory setting in your config file (`HUSH3.conf` located in the data directory which is `~/.komodo/HUSH3` unless it's been overridden with `datadir=` setting):
|
||||
For all methods, you will need to include an export directory setting in your config file (`HUSH3.conf` located in the data directory which is `~/.hush/HUSH3` or `~/.komodo/HUSH3` (Legacy Location) unless it's been overridden with `datadir=` setting):
|
||||
|
||||
`exportdir=path/to/chosen/export/directory`
|
||||
|
||||
|
||||
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-2020 The Hush developers
|
||||
#!/usr/usr/bin/env bash
|
||||
# Copyright (c) 2016-2023 The Hush developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
# This script makes the neccesary transactions to migrate
|
||||
@@ -11,7 +11,7 @@ address="Rxxx"
|
||||
amount=1
|
||||
|
||||
# Alias for running cli on source chain
|
||||
cli_source="komodo-cli -ac_name=$source"
|
||||
cli_source="hush-cli -ac_name=$source"
|
||||
|
||||
# Raw tx that we will work with
|
||||
txraw=`$cli_source createrawtransaction "[]" "{\"$address\":$amount}"`
|
||||
@@ -37,7 +37,7 @@ read -p "Wait for a notarization to HUSH, and then two more notarizations from t
|
||||
|
||||
# Create import
|
||||
importTx=`$cli_source migrate_createimporttransaction $exportSignedTx $payouts`
|
||||
importTx=`komodo-cli migrate_completeimporttransaction $importTx`
|
||||
importTx=`hush-cli migrate_completeimporttransaction $importTx`
|
||||
|
||||
# Send import
|
||||
komodo-cli -ac_name=$target sendrawtransaction $importTx
|
||||
hush-cli -ac_name=$target sendrawtransaction $importTx
|
||||
|
||||
@@ -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-2020 The Hush developers
|
||||
# Copyright (c) 2016-2023 The 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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user