Compare commits

..

No commits in common. "5184b4483fc57f64af9fd0d08487a37d1182f52d" and "65b9e74333b5a1770ea30d9067c937a46ea92486" have entirely different histories.

816 changed files with 3626 additions and 9883 deletions

View File

@ -1,4 +1,4 @@
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
FROM ubuntu:16.04 FROM ubuntu:16.04

View File

@ -1,4 +1,4 @@
# Copyright 2016-2023 The Hush developers # Copyright 2016-2022 The Hush developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
@ -247,9 +247,6 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-man
clean-local: clean-local:
rm -rf test_bitcoin.coverage/ total.coverage/ rm -rf test_bitcoin.coverage/ total.coverage/
seeds:
./contrib/seeds/generate-seeds.py contrib/seeds > src/chainparamsseeds.h
manpages: manpages:
./util/gen-manpages.sh ./util/gen-manpages.sh
@echo "Please review the man pages changes to see if they look correct, then commit and push" @echo "Please review the man pages changes to see if they look correct, then commit and push"

View File

@ -42,11 +42,9 @@ Please refer to the instructions which apply to you below:
If you have an older wallet, then refer to [OLD_WALLETS.md](OLD_WALLETS.md). If you have an older wallet, then refer to [OLD_WALLETS.md](OLD_WALLETS.md).
### Official Explorers ### Official Explorer
The links for the Official Hush explorers: The link for the Official Hush explorer is: [explorer.hush.is](https://explorer.hush.is)
* [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 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. please join Telegram and ask questions.

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
set -e set -e

View File

@ -1,19 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
set -eu -o pipefail set -eu -o pipefail
./util/build.sh --disable-tests $@
# run correct build script for detected OS
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
./util/build.sh --disable-tests $@
elif [[ "$OSTYPE" == "darwin"* ]]; then
./util/build-mac.sh --disable-tests $@
elif [[ "$OSTYPE" == "msys"* ]]; then
./util/build-win.sh --disable-tests $@
#elif [[ "$OSTYPE" == "freebsd"* ]]; then
# placeholder
else
echo "Unable to detect your OS. What are you using?"
fi

View File

@ -1,14 +1,13 @@
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60]) AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 3) define(_CLIENT_VERSION_MAJOR, 3)
dnl Must be kept in sync with src/clientversion.h , ugh!
define(_CLIENT_VERSION_MINOR, 9) define(_CLIENT_VERSION_MINOR, 9)
define(_CLIENT_VERSION_REVISION, 3) define(_CLIENT_VERSION_REVISION, 2)
define(_CLIENT_VERSION_BUILD, 50) 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(_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_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(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2023) define(_COPYRIGHT_YEAR, 2021)
AC_INIT([Hush],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_SUFFIX(_ZC_BUILD_VAL)],[https://git.hush.is/hush/hush3],[hush]) 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_SRCDIR([src/main.cpp])
AC_CONFIG_HEADERS([src/config/bitcoin-config.h]) AC_CONFIG_HEADERS([src/config/bitcoin-config.h])
@ -222,29 +221,6 @@ 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([-Wunused-local-typedef],[CXXFLAGS="$CXXFLAGS -Wno-unused-local-typedef"],,[[$CXXFLAG_WERROR]])
AX_CHECK_COMPILE_FLAG([-Wdeprecated-register],[CXXFLAGS="$CXXFLAGS -Wno-deprecated-register"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wdeprecated-register],[CXXFLAGS="$CXXFLAGS -Wno-deprecated-register"],,[[$CXXFLAG_WERROR]])
fi 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" CPPFLAGS="$CPPFLAGS -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS"
AC_ARG_WITH([utils], AC_ARG_WITH([utils],
@ -265,16 +241,6 @@ AC_ARG_WITH([daemon],
[build_bitcoind=$withval], [build_bitcoind=$withval],
[build_bitcoind=yes]) [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 use_pkgconfig=yes
case $host in case $host in
*mingw*) *mingw*)
@ -743,7 +709,7 @@ fi
# These packages don't provide pkgconfig config files across all # These packages don't provide pkgconfig config files across all
# platforms, so we use older autoconf detection mechanisms: # platforms, so we use older autoconf detection mechanisms:
AC_CHECK_HEADER([gmp.h],,AC_MSG_ERROR(libgmp headers missing)) 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_HEADER([gmpxx.h],,AC_MSG_ERROR(libgmpxx headers missing))
AC_CHECK_LIB([gmpxx],[main],GMPXX_LIBS=-lgmpxx, [AC_MSG_ERROR(libgmpxx missing)]) AC_CHECK_LIB([gmpxx],[main],GMPXX_LIBS=-lgmpxx, [AC_MSG_ERROR(libgmpxx missing)])
@ -849,7 +815,6 @@ AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows])
AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet = xyes]) AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet = xyes])
AM_CONDITIONAL([ENABLE_MINING],[test x$enable_mining = xyes]) AM_CONDITIONAL([ENABLE_MINING],[test x$enable_mining = xyes])
AM_CONDITIONAL([ENABLE_TESTS],[test x$BUILD_TEST = 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([USE_LCOV],[test x$use_lcov = xyes])
AM_CONDITIONAL([GLIBC_BACK_COMPAT],[test x$use_glibc_compat = xyes]) AM_CONDITIONAL([GLIBC_BACK_COMPAT],[test x$use_glibc_compat = xyes])
AM_CONDITIONAL([HARDEN],[test x$use_hardening = xyes]) AM_CONDITIONAL([HARDEN],[test x$use_hardening = xyes])

View File

@ -1,5 +1,5 @@
#!/usr/bin/env perl #!/usr/bin/env perl
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
use warnings; use warnings;

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env perl #!/usr/bin/env perl
# Copyright 2019-2023 The Hush developers # Copyright 2019-2022 The Hush developers
# Released under the GPLv3 # Released under the GPLv3
use warnings; use warnings;
use strict; use strict;

View File

@ -1,5 +1,5 @@
#!/usr/bin/env perl #!/usr/bin/env perl
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Released under the GPLv3 # Released under the GPLv3
use strict; use strict;

View File

@ -1,5 +1,5 @@
#!/usr/bin/env perl #!/usr/bin/env perl
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
use strict; use strict;

View File

@ -1,5 +1,5 @@
#!/usr/bin/env perl #!/usr/bin/env perl
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Released under the GPLv3 # Released under the GPLv3
use warnings; use warnings;
use strict; use strict;

View File

@ -35,6 +35,12 @@ pre-start script
echo echo
echo "bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'" echo "bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'"
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 exit 1
fi fi

View File

@ -81,6 +81,11 @@ checkconfig()
eerror "" eerror ""
eerror "bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'" eerror "bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'"
eerror "" 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 "" eerror ""
return 1 return 1
fi fi

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

View File

@ -1,136 +0,0 @@
#!/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

View File

@ -1,5 +1,5 @@
#!/usr/bin/perl #!/usr/bin/perl
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,10 +1,8 @@
# Seeds ### Seeds ###
Utility to generate the seeds.txt list that is compiled into the client Utility to generate the seeds.txt list that is compiled into the client
(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/)). (see [src/chainparamsseeds.h](/src/chainparamsseeds.h) and other utilities in [contrib/seeds](/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

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python3 #!/usr/bin/env python
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2014 Wladimir J. van der Laan
# Copyright (c) 2014-2021 The Bitcoin Core developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
''' '''
@ -12,63 +11,45 @@ argument:
nodes_main.txt nodes_main.txt
nodes_test.txt nodes_test.txt
These files must consist of lines in the format These files must consist of lines in the format
<ip>:<port>
<ip> <ip>
[<ipv6>]:<port> <ip>:<port>
[<ipv6>] [<ipv6>]
<onion>.onion:<port> [<ipv6>]:<port>
<onion>.onion <onion>.onion
<i2p>.b32.i2p:<port> 0xDDBBCCAA (IPv4 little-endian old pnSeeds format)
<i2p>.b32.i2p
The output will be two data structures with the peers in binary format: The output will be two data structures with the peers in binary format:
static const uint8_t chainparams_seed_{main,test}[]={ static SeedSpec6 pnSeed6_main[]={
...
}
static SeedSpec6 pnSeed6_test[]={
... ...
} }
To update the generated code : These should be pasted into `src/chainparamsseeds.h`.
./contrib/seeds/generate-seeds.py contrib/seeds > src/chainparamsseeds.h
''' '''
from __future__ import print_function, division
from base64 import b32decode from base64 import b32decode
from enum import Enum from binascii import a2b_hex
import struct import sys, os
import sys
import os
import re import re
class BIP155Network(Enum): # ipv4 in ipv6 prefix
IPV4 = 1 pchIPv4 = bytearray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff])
IPV6 = 2 # tor-specific ipv6 prefix
TORV2 = 3 # no longer supported pchOnionCat = bytearray([0xFD,0x87,0xD8,0x7E,0xEB,0x43])
TORV3 = 4
I2P = 5
CJDNS = 6
def name_to_bip155(addr): def name_to_ipv6(addr):
'''Convert address string to BIP155 (networkID, addr) tuple.''' if len(addr)>6 and addr.endswith('.onion'):
if addr.endswith('.onion'):
vchAddr = b32decode(addr[0:-6], True) vchAddr = b32decode(addr[0:-6], True)
if len(vchAddr) == 35: if len(vchAddr) != 16-len(pchOnionCat):
assert vchAddr[34] == 3 raise ValueError('Invalid onion %s' % s)
return (BIP155Network.TORV3, vchAddr[:32]) return pchOnionCat + vchAddr
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 elif '.' in addr: # IPv4
return (BIP155Network.IPV4, bytes((int(x) for x in addr.split('.')))) return pchIPv4 + bytearray((int(x) for x in addr.split('.')))
elif ':' in addr: # IPv6 elif ':' in addr: # IPv6
sub = [[], []] # prefix, suffix sub = [[], []] # prefix, suffix
x = 0 x = 0
@ -85,13 +66,14 @@ def name_to_bip155(addr):
sub[x].append(val & 0xff) sub[x].append(val & 0xff)
nullbytes = 16 - len(sub[0]) - len(sub[1]) nullbytes = 16 - len(sub[0]) - len(sub[1])
assert((x == 0 and nullbytes == 0) or (x == 1 and nullbytes > 0)) assert((x == 0 and nullbytes == 0) or (x == 1 and nullbytes > 0))
return (BIP155Network.IPV6, bytes(sub[0] + ([0] * nullbytes) + sub[1])) return bytearray(sub[0] + ([0] * nullbytes) + sub[1])
elif addr.startswith('0x'): # IPv4-in-little-endian
return pchIPv4 + bytearray(reversed(a2b_hex(addr[2:])))
else: else:
raise ValueError('Could not parse address %s' % addr) raise ValueError('Could not parse address %s' % addr)
def parse_spec(s): def parse_spec(s, defaultport):
'''Convert endpoint string to BIP155 (networkID, addr, port) tuple.''' match = re.match('\[([0-9a-fA-F:]+)\](?::([0-9]+))?$', s)
match = re.match(r'\[([0-9a-fA-F:]+)\](?::([0-9]+))?$', s)
if match: # ipv6 if match: # ipv6
host = match.group(1) host = match.group(1)
port = match.group(2) port = match.group(2)
@ -102,42 +84,17 @@ def parse_spec(s):
(host,_,port) = s.partition(':') (host,_,port) = s.partition(':')
if not port: if not port:
port = 0 port = defaultport
else: else:
port = int(port) port = int(port)
host = name_to_bip155(host) host = name_to_ipv6(host)
if host[0] == BIP155Network.TORV2: return (host,port)
return None # TORV2 is no longer supported, so we ignore it
else:
return host + (port, )
def ser_compact_size(l): def process_nodes(g, f, structname, defaultport):
r = b"" g.write('static SeedSpec6 %s[] = {\n' % structname)
if l < 253: first = True
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: for line in f:
comment = line.find('#') comment = line.find('#')
if comment != -1: if comment != -1:
@ -145,39 +102,37 @@ def process_nodes(g, f, structname):
line = line.strip() line = line.strip()
if not line: if not line:
continue continue
if not first:
g.write(',\n')
first = False
spec = parse_spec(line) (host,port) = parse_spec(line, defaultport)
if spec is None: # ignore this entry (e.g. no longer supported addresses like TORV2) hoststr = ','.join(('0x%02x' % b) for b in host)
continue g.write(' {{%s}, %i}' % (hoststr, port))
blob = bip155_serialize(spec) g.write('\n};\n')
hoststr = ','.join(('0x%02x' % b) for b in blob)
g.write(f' {hoststr}, // {line}\n')
g.write('};\n')
def main(): def main():
if len(sys.argv)<2: if len(sys.argv)<2:
print(('Usage: %s <path_to_nodes_txt>' % sys.argv[0]), file=sys.stderr) print(('Usage: %s <path_to_nodes_txt>' % sys.argv[0]), file=sys.stderr)
sys.exit(1) exit(1)
g = sys.stdout g = sys.stdout
indir = sys.argv[1] indir = sys.argv[1]
g.write('// Copyright (c) 2016-2023 The Hush developers\n') g.write('#ifndef BITCOIN_CHAINPARAMSSEEDS_H\n')
g.write('// Distributed under the GPLv3 software license, see the accompanying\n') g.write('#define BITCOIN_CHAINPARAMSSEEDS_H\n')
g.write('// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html\n') g.write('/**\n')
g.write('// THIS FILE IS AUTOGENERATED, DO NOT MODIFY DIRECTLY\n') g.write(' * List of fixed seed nodes for the bitcoin network\n')
g.write('// Instead, update contrib/seeds/nodes_main.txt then run\n') g.write(' * AUTOGENERATED by contrib/seeds/generate-seeds.py\n')
g.write('// ./contrib/seeds/generate-seeds.py contrib/seeds > src/chainparamsseeds.h\n') g.write(' *\n')
g.write('// OR run: make seeds\n') g.write(' * Each line contains a 16-byte IPv6 address and a port.\n')
g.write('#ifndef HUSH_CHAINPARAMSSEEDS_H\n') g.write(' * IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly.\n')
g.write('#define HUSH_CHAINPARAMSSEEDS_H\n') g.write(' */\n')
g.write('// List of fixed seed nodes for the Hush network\n') with open(os.path.join(indir,'nodes_main.txt'),'r') as f:
g.write('// Each line contains a BIP155 serialized address.\n') process_nodes(g, f, 'pnSeed6_main', 8233)
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') g.write('\n')
with open(os.path.join(indir,'nodes_test.txt'), 'r', encoding="utf8") as f: with open(os.path.join(indir,'nodes_test.txt'),'r') as f:
process_nodes(g, f, 'chainparams_seed_test') process_nodes(g, f, 'pnSeed6_test', 18233)
g.write('#endif // HUSH_CHAINPARAMSSEEDS_H\n') g.write('#endif // BITCOIN_CHAINPARAMSSEEDS_H\n')
if __name__ == '__main__': if __name__ == '__main__':
main() main()

View File

@ -1,32 +1,6 @@
# node1.hush.land 185.25.48.236:27485
185.241.61.43 185.25.48.236:27487
185.64.105.111:27485
# node2.hush.land 185.64.105.111:27487
87.251.76.166 185.25.48.72:27485
185.25.48.72:27487
# node3.hush.land
45.82.68.233
# node4.hush.land
87.251.76.33
# node2.hush.is
137.74.4.198
# lite.hushpool.is
149.28.102.219
# wtfistheinternet.hush.is
107.174.70.251
# torv3
56wqzfj6mhxgsv3h3nh3pdocguogxfxud55libqjhjsdh5alfsko2iqd.onion
hushv3h6mbxd2pptj42reko3jcexcgnz5zvp3mqcu6myto3jhhn4yzyd.onion
hushv3xvheqh42ms3ld2nh555muscietkib7gycb7s4psbrjsysfywqd.onion
# ipv6
2a0c:b641:6f1:34::2
2a0c:b641:6f1:c::2
# i2p
iljqq7nnmw2ij2ezl334cerwwmgzmmbmoc3n4saditd2xhi3xohq.b32.i2p

View File

@ -1,5 +1,11 @@
# List of fixed seed nodes for testnet # List of fixed seed nodes for testnet
# note: File must be non-empty to compile
1.2.3.4
# Onion nodes # Onion nodes
thfsmmn2jbitcoin.onion
it2pj4f7657g3rhi.onion
nkf5e6b7pl4jfd4a.onion
4zhkir2ofl7orfom.onion
t6xj6wilh4ytvcs7.onion
i6y6ivorwakd7nw3.onion
ubqj4rsu3nqtxmtp.onion

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
INPUT=$(</dev/stdin) INPUT=$(</dev/stdin)

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
if ! [[ "$2" =~ [git@]?[www.]?hush.is[:|/]bitcoin/bitcoin[.git]? ]]; then if ! [[ "$2" =~ [git@]?[www.]?hush.is[:|/]bitcoin/bitcoin[.git]? ]]; then

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,4 +1,4 @@
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
define int_vars define int_vars

View File

@ -8,7 +8,7 @@ darwin_CXX=g++-8 -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysro
darwin_CFLAGS=-pipe darwin_CFLAGS=-pipe
darwin_CXXFLAGS=$(darwin_CFLAGS) darwin_CXXFLAGS=$(darwin_CFLAGS)
darwin_release_CFLAGS=-O1 darwin_release_CFLAGS=-O3
darwin_release_CXXFLAGS=$(darwin_release_CFLAGS) darwin_release_CXXFLAGS=$(darwin_release_CFLAGS)
darwin_debug_CFLAGS=-O1 darwin_debug_CFLAGS=-O1

View File

@ -9,11 +9,12 @@ $(package)_git_commit=42ba95387cdfd67399f7aac52fddb8d6e1258ee6
$(package)_dependencies= $(package)_dependencies=
$(package)_config_opts=--enable-cxx --disable-shared $(package)_config_opts=--enable-cxx --disable-shared
else ifeq ($(build_os),darwin) else ifeq ($(build_os),darwin)
$(package)_version=6.1.1 $(package)_download_path=https://git.hush.is/duke/$(package)/archive
$(package)_download_path=https://git.hush.is/attachments $(package)_file_name=$(package)-$($(package)_git_commit).tar.gz
$(package)_file_name=d613c855-cd92-4efb-b893-658496852019 $(package)_download_file=$($(package)_git_commit).tar.gz
$(package)_download_file=d613c855-cd92-4efb-b893-658496852019 $(package)_sha256_hash=59b2c2b5d58fdf5943bfde1fa709e9eb53e7e072c9699d28dc1c2cbb3c8cc32c
$(package)_sha256_hash=a8109865f2893f1373b0a8ed5ff7429de8db696fc451b1036bd7bdf95bbeffd6 $(package)_git_commit=aece03c7b6967f91f3efdac8c673f55adff53ab1
$(package)_dependencies=
$(package)_config_opts=--enable-cxx --disable-shared $(package)_config_opts=--enable-cxx --disable-shared
else else
$(package)_version=6.1.1 $(package)_version=6.1.1

View File

@ -1,161 +0,0 @@
# 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
If set and -i2psam is also set then incoming I2P connections are
accepted via the SAM proxy. If this is not set but -i2psam is set
then only outgoing connections will be made to the I2P network.
Ignored if -i2psam is not set. Listening for incoming I2P
connections is done through the SAM proxy, not by binding to a
local address and port (default: 1)
```
In a typical situation, this suffices:
```
hushd -i2psam=127.0.0.1:7656
```
The first time hushd connects to the I2P router, if
`-i2pacceptincoming=1`, then it will automatically generate a persistent I2P
address and its corresponding private key. The private key will be saved in a
file named `i2p_private_key` in the Hush data directory. The persistent
I2P address is used for accepting incoming connections and for making outgoing
connections if `-i2pacceptincoming=1`. If `-i2pacceptincoming=0` then only
outbound I2P connections are made and a different transient I2P address is used
for each connection to improve privacy.
## Persistent vs transient I2P addresses
In I2P connections, the connection receiver sees the I2P address of the
connection initiator. This is unlike the Tor network where the recipient does
not know who is connecting to them and can't tell if two connections are from
the same peer or not.
If an I2P node is not accepting incoming connections, then Hush uses
random, one-time, transient I2P addresses for itself for outbound connections
to make it harder to discriminate, fingerprint or analyze it based on its I2P
address.
## Additional configuration options related to I2P
```
-debug=i2p
```
Set the `debug=i2p` config logging option to see additional information in the
debug log about your I2P configuration and connections. Run `hush-cli help
logging` for more information.
```
-onlynet=i2p
```
Make automatic outbound connections only to I2P addresses. Inbound and manual
connections are not affected by this option. It can be specified multiple times
to allow multiple networks, e.g. onlynet=onion, onlynet=i2p.
I2P support was added to Hush in version 3.9.3 and there may be fewer I2P
peers than Tor or IP ones. Therefore, using I2P alone without other networks may
make a node more susceptible to [Sybil
attacks](https://en.bitcoin.it/wiki/Weaknesses#Sybil_attack). You can use
`hush-cli -addrinfo` to see the number of I2P addresses known to your node.
Another consideration with `onlynet=i2p` is that the initial blocks download
phase when syncing up a new node can be very slow. This phase can be sped up by
using other networks, for instance `onlynet=onion`, at the same time.
In general, a node can be run with both onion and I2P hidden services (or
any/all of IPv4/IPv6/onion/I2P/CJDNS), which can provide a potential fallback if
one of the networks has issues.
## I2P-related information
There are several ways to see your I2P address if accepting
incoming I2P connections (`-i2pacceptincoming`):
- in the "Local addresses" output of CLI `-netinfo`
- in the "localaddresses" output of RPC `getnetworkinfo`
- in the debug log (grep for `AddLocal`; the I2P address ends in `.b32.i2p`)
To see which I2P peers your node is connected to, use `hush-cli -netinfo 4`
or the `getpeerinfo` RPC (e.g. `hush-cli getpeerinfo`).
To see which I2P addresses your node knows, use the `getnodeaddresses 0 i2p`
RPC.
## Compatibility
Hush uses the [SAM v3.1](https://geti2p.net/en/docs/api/samv3) protocol
to connect to the I2P network. Any I2P router that supports it can be used.
## Ports in I2P and Hush
Hush uses the [SAM v3.1](https://geti2p.net/en/docs/api/samv3)
protocol. One particularity of SAM v3.1 is that it does not support ports,
unlike newer versions of SAM (v3.2 and up) that do support them and default the
port numbers to 0. From the point of view of peers that use newer versions of
SAM or other protocols that support ports, a SAM v3.1 peer is connecting to them
on port 0, from source port 0.
To allow future upgrades to newer versions of SAM, Hush sets its
listening port to 0 when listening for incoming I2P connections and advertises
its own I2P address with port 0. Furthermore, it will not attempt to connect to
I2P addresses with a non-zero port number because with SAM v3.1 the destination
port (`TO_PORT`) is always set to 0 and is not in the control of Hush.
## Bandwidth
I2P routers may route a large amount of general network traffic with their
default settings. Check your router's configuration to limit the amount of this
traffic relayed, if desired.
With `i2pd`, the amount of bandwidth being shared with the wider network can be
adjusted with the `bandwidth`, `share` and `transittunnels` options in your
`i2pd.conf` file. For example, to limit total I2P traffic to 256KB/s and share
50% of this limit for a maximum of 20 transit tunnels:
```
bandwidth = 256
share = 50
[limits]
transittunnels = 20
```
If you prefer not to relay any public I2P traffic and only permit I2P traffic
from programs which are connecting via the SAM proxy, e.g. Hush, you
can set the `notransit` option to `true`.
Similar bandwidth configuration options for the Java I2P router can be found in
`http://127.0.0.1:7657/config` under the "Bandwidth" tab.

View File

@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13. .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
.TH HUSH-CLI "1" "February 2023" "hush-cli v3.9.3" "User Commands" .TH HUSH-CLI "1" "September 2022" "hush-cli v3.9.2" "User Commands"
.SH NAME .SH NAME
hush-cli \- manual page for hush-cli v3.9.3 hush-cli \- manual page for hush-cli v3.9.2
.SH DESCRIPTION .SH DESCRIPTION
Hush RPC client version v3.9.3\-1313d39a7 Hush RPC client version v3.9.2\-54cfe1099
.PP .PP
In order to ensure you are adequately protecting your privacy when using Hush, In order to ensure you are adequately protecting your privacy when using Hush,
please see <https://hush.is/security/>. please see <https://hush.is/security/>.
@ -38,8 +38,8 @@ Use the test network
\fB\-regtest\fR \fB\-regtest\fR
.IP .IP
Enter regression test mode, which uses a special chain in which blocks Enter regression test mode, which uses a special chain in which blocks
can be solved instantly. This is intended for regression testing can be solved instantly. This is intended for regression testing tools
tools and app development. and app development.
.HP .HP
\fB\-rpcconnect=\fR<ip> \fB\-rpcconnect=\fR<ip>
.IP .IP
@ -75,12 +75,9 @@ 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, In order to ensure you are adequately protecting your privacy when using Hush,
please see <https://hush.is/security/>. please see <https://hush.is/security/>.
Copyright (C) 2016-2023 Duke Leto and The Hush Developers Copyright (C) 2016-2022 Duke Leto and The Hush Developers
Copyright (C) 2016-2020 jl777 and SuperNET developers Copyright (C) 2016-2020 jl777 and SuperNET developers
Copyright (C) 2016-2018 The Zcash developers Copyright (C) 2016-2018 The Zcash developers
Copyright (C) 2009-2014 The Bitcoin Core developers Copyright (C) 2009-2014 The Bitcoin Core developers
This is experimental Free Software! Fuck Yeah!!!!! This is experimental Free Software! Fuck Yeah!!!!!

View File

@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13. .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
.TH HUSH-TX "1" "February 2023" "hush-tx v3.9.3" "User Commands" .TH HUSH-TX "1" "September 2022" "hush-tx v3.9.2" "User Commands"
.SH NAME .SH NAME
hush-tx \- manual page for hush-tx v3.9.3 hush-tx \- manual page for hush-tx v3.9.2
.SH DESCRIPTION .SH DESCRIPTION
hush\-tx utility version v3.9.3\-1313d39a7 hush\-tx utility version v3.9.2\-54cfe1099
.SS "Usage:" .SS "Usage:"
.TP .TP
hush\-tx [options] <hex\-tx> [commands] hush\-tx [options] <hex\-tx> [commands]
@ -72,8 +72,7 @@ sign=HEIGHT:SIGHASH\-FLAGS
.IP .IP
Add zero or more signatures to transaction. This command requires JSON Add zero or more signatures to transaction. This command requires JSON
registers:prevtxs=JSON object, privatekeys=JSON object. See registers:prevtxs=JSON object, privatekeys=JSON object. See
signrawtransaction docs for format of sighash flags, JSON signrawtransaction docs for format of sighash flags, JSON objects.
objects.
.PP .PP
Register Commands: Register Commands:
.IP .IP
@ -89,12 +88,9 @@ Set register NAME to given JSON\-STRING
In order to ensure you are adequately protecting your privacy when using Hush, In order to ensure you are adequately protecting your privacy when using Hush,
please see <https://hush.is/security/>. please see <https://hush.is/security/>.
Copyright (C) 2016-2023 Duke Leto and The Hush Developers Copyright (C) 2016-2022 Duke Leto and The Hush Developers
Copyright (C) 2016-2020 jl777 and SuperNET developers Copyright (C) 2016-2020 jl777 and SuperNET developers
Copyright (C) 2016-2018 The Zcash developers Copyright (C) 2016-2018 The Zcash developers
Copyright (C) 2009-2014 The Bitcoin Core developers Copyright (C) 2009-2014 The Bitcoin Core developers
This is experimental Free Software! Fuck Yeah!!!!! This is experimental Free Software! Fuck Yeah!!!!!

View File

@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13. .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
.TH HUSHD "1" "February 2023" "hushd v3.9.3" "User Commands" .TH HUSHD "1" "September 2022" "hushd v3.9.2" "User Commands"
.SH NAME .SH NAME
hushd \- manual page for hushd v3.9.3 hushd \- manual page for hushd v3.9.2
.SH DESCRIPTION .SH DESCRIPTION
Hush Daemon version v3.9.3\-1313d39a7 Hush Daemon version v3.9.2\-54cfe1099
.PP .PP
In order to ensure you are adequately protecting your privacy when using Hush, In order to ensure you are adequately protecting your privacy when using Hush,
please see <https://hush.is/security/>. please see <https://hush.is/security/>.
@ -17,6 +17,11 @@ Start a Hush Daemon
.IP .IP
This help message This help message
.HP .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> \fB\-blocknotify=\fR<cmd>
.IP .IP
Execute command when the best block changes (%s in cmd is replaced by Execute command when the best block changes (%s in cmd is replaced by
@ -58,23 +63,14 @@ Set database cache size in megabytes (4 to 16384, default: 512)
.IP .IP
Imports blocks from external blk000??.dat file on startup Imports blocks from external blk000??.dat file on startup
.HP .HP
\fB\-maxdebugfilesize=\fR<n>
.IP
Set the max size of the debug.log file (default: 15)
.HP
\fB\-maxorphantx=\fR<n> \fB\-maxorphantx=\fR<n>
.IP .IP
Keep at most <n> unconnectable transactions in memory (default: 100) Keep at most <n> unconnectable transactions in memory (default: 100)
.HP .HP
\fB\-maxreorg=\fR<n>
.IP
Specify the maximum length of a blockchain re\-organization
.HP
\fB\-mempooltxinputlimit=\fR<n> \fB\-mempooltxinputlimit=\fR<n>
.IP .IP
[DEPRECATED/IGNORED] Set the maximum number of transparent inputs in a [DEPRECATED/IGNORED] Set the maximum number of transparent inputs in a
transaction that the mempool will accept (default: 0 = no limit transaction that the mempool will accept (default: 0 = no limit applied)
applied)
.HP .HP
\fB\-par=\fR<n> \fB\-par=\fR<n>
.IP .IP
@ -93,10 +89,10 @@ transaction id)
\fB\-prune=\fR<n> \fB\-prune=\fR<n>
.IP .IP
Reduce storage requirements by pruning (deleting) old blocks. This mode Reduce storage requirements by pruning (deleting) old blocks. This mode
disables wallet support and is incompatible with \fB\-txindex\fR. disables wallet support and is incompatible with \fB\-txindex\fR. Warning:
Warning: Reverting this setting requires re\-downloading the Reverting this setting requires re\-downloading the entire blockchain.
entire blockchain. (default: 0 = disable pruning blocks, >550 = (default: 0 = disable pruning blocks, >550 = target size in MiB to use
target size in MiB to use for block files) for block files)
.HP .HP
\fB\-reindex\fR \fB\-reindex\fR
.IP .IP
@ -146,8 +142,8 @@ Add a node to connect to and attempt to keep the connection open
\fB\-asmap=\fR<file> \fB\-asmap=\fR<file>
.IP .IP
Specify ASN mapping used for bucketing of the peers (default: Specify ASN mapping used for bucketing of the peers (default:
asmap.dat). Relative paths will be prefixed by the net\-specific asmap.dat). Relative paths will be prefixed by the net\-specific datadir
datadir location. location.
.HP .HP
\fB\-banscore=\fR<n> \fB\-banscore=\fR<n>
.IP .IP
@ -195,7 +191,7 @@ Accept connections from outside (default: 1 if no \fB\-proxy\fR or \fB\-connect\
.HP .HP
\fB\-listenonion\fR \fB\-listenonion\fR
.IP .IP
Automatically create Tor hidden service (default: 1) Automatically create Tor hidden service (default: 0)
.HP .HP
\fB\-maxconnections=\fR<n> \fB\-maxconnections=\fR<n>
.IP .IP
@ -214,36 +210,9 @@ Maximum per\-connection send buffer, <n>*1000 bytes (default: 1000)
Use separate SOCKS5 proxy to reach peers via Tor hidden services Use separate SOCKS5 proxy to reach peers via Tor hidden services
(default: \fB\-proxy\fR) (default: \fB\-proxy\fR)
.HP .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> \fB\-onlynet=\fR<net>
.IP .IP
Only connect to nodes in network <net> (ipv4, ipv6, onion or i2p) Only connect to nodes in network <net> (ipv4, ipv6 or onion)
.HP
\fB\-disableipv4\fR
.IP
Disable Ipv4 network connections (default: 0)
.HP
\fB\-disableipv6\fR
.IP
Disable Ipv6 network connections (default: 0)
.HP .HP
\fB\-permitbaremultisig\fR \fB\-permitbaremultisig\fR
.IP .IP
@ -273,7 +242,7 @@ Connect to a node to retrieve peer addresses, and disconnect
.HP .HP
\fB\-timeout=\fR<n> \fB\-timeout=\fR<n>
.IP .IP
Specify connection timeout in milliseconds (minimum: 1, default: 60000) Specify connection timeout in milliseconds (minimum: 1, default: 5000)
.HP .HP
\fB\-torcontrol=\fR<ip>:<port> \fB\-torcontrol=\fR<ip>:<port>
.IP .IP
@ -318,9 +287,9 @@ Bind to given address and allowlist peers connecting to it. Use
\fB\-allowlist=\fR<netmask> \fB\-allowlist=\fR<netmask>
.IP .IP
Allowlist peers connecting from the given netmask or IP address. Can be Allowlist peers connecting from the given netmask or IP address. Can be
specified multiple times. Allowlisted peers cannot be DoS banned specified multiple times. Allowlisted peers cannot be DoS banned and
and their transactions are always relayed, even if they are their transactions are always relayed, even if they are already in the
already in the mempool, useful e.g. for a gateway mempool, useful e.g. for a gateway
.PP .PP
Wallet options: Wallet options:
.HP .HP
@ -461,32 +430,29 @@ by TxID)
\fB\-allowlistaddress=\fR<Raddress> \fB\-allowlistaddress=\fR<Raddress>
.IP .IP
Enable the wallet filter for notary nodes and add one Raddress to the Enable the wallet filter for notary nodes and add one Raddress to the
allowlist of the wallet filter. If \fB\-allowlistaddress=\fR is used, allowlist of the wallet filter. If \fB\-allowlistaddress=\fR is used, then the
then the wallet filter is automatically activated. Several wallet filter is automatically activated. Several Raddresses can be
Raddresses can be defined using several \fB\-allowlistaddress=\fR defined using several \fB\-allowlistaddress=\fR (similar to \fB\-addnode\fR). The
(similar to \fB\-addnode\fR). The wallet filter will filter the utxo to wallet filter will filter the utxo to only ones coming from my own
only ones coming from my own Raddress (derived from pubkey) and Raddress (derived from pubkey) and each Raddress defined using
each Raddress defined using \fB\-allowlistaddress=\fR this option is \fB\-allowlistaddress=\fR this option is mostly for Notary Nodes).
mostly for Notary Nodes).
.HP .HP
\fB\-zapwallettxes=\fR<mode> \fB\-zapwallettxes=\fR<mode>
.IP .IP
Delete all wallet transactions and only recover those parts of the 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. blockchain through \fB\-rescan\fR on startup (1 = keep tx meta data e.g.
account owner and payment request information, 2 = drop tx meta account owner and payment request information, 2 = drop tx meta data)
data)
.PP .PP
Debugging/Testing options: Debugging/Testing options:
.HP .HP
\fB\-debug=\fR<category> \fB\-debug=\fR<category>
.IP .IP
Output debugging information (default: 0, supplying <category> is Output debugging information (default: 0, supplying <category> is
optional). If <category> is not supplied or if <category> = 1, optional). If <category> is not supplied or if <category> = 1, output
output all debugging information. <category> can be: addrman, all debugging information. <category> can be: addrman, alert, bench,
bench, coindb, db, deletetx, estimatefee, http, libevent, lock, coindb, db, deletetx, estimatefee, http, libevent, lock, mempool, net,
mempool, net, tls, partitioncheck, pow, proxy, prune, rand, tls, partitioncheck, pow, proxy, prune, rand, randomx, reindex, rpc,
randomx, reindex, rpc, selectcoins, stratum, tor, zrpc, selectcoins, stratum, tor, zrpc, zrpcunsafe (implies zrpc).
zrpcunsafe (implies zrpc).
.HP .HP
\fB\-experimentalfeatures\fR \fB\-experimentalfeatures\fR
.IP .IP
@ -584,8 +550,8 @@ Accept public REST requests (default: 0)
\fB\-rpcbind=\fR<addr> \fB\-rpcbind=\fR<addr>
.IP .IP
Bind to given address to listen for JSON\-RPC connections. Use Bind to given address to listen for JSON\-RPC connections. Use
[host]:port notation for IPv6. This option can be specified [host]:port notation for IPv6. This option can be specified multiple
multiple times (default: bind to all interfaces) times (default: bind to all interfaces)
.HP .HP
\fB\-rpcuser=\fR<user> \fB\-rpcuser=\fR<user>
.IP .IP
@ -602,9 +568,9 @@ Listen for JSON\-RPC connections on <port> (default: 0 or testnet: 10000)
\fB\-rpcallowip=\fR<ip> \fB\-rpcallowip=\fR<ip>
.IP .IP
Allow JSON\-RPC connections from specified source. Valid for <ip> are a 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. single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0)
1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified
option can be specified multiple times multiple times
.HP .HP
\fB\-rpcthreads=\fR<n> \fB\-rpcthreads=\fR<n>
.IP .IP
@ -640,8 +606,8 @@ Mining address to use when special address of 'x' is sent by miner
\fB\-stratumbind=\fR<ipaddr> \fB\-stratumbind=\fR<ipaddr>
.IP .IP
Bind to given address to listen for Stratum work requests. Use Bind to given address to listen for Stratum work requests. Use
[host]:port notation for IPv6. This option can be specified [host]:port notation for IPv6. This option can be specified multiple
multiple times (default: bind to all interfaces) times (default: bind to all interfaces)
.HP .HP
\fB\-stratumport=\fR<port> \fB\-stratumport=\fR<port>
.IP .IP
@ -651,9 +617,9 @@ Listen for Stratum work requests on <port> (default: 19031 or testnet:
\fB\-stratumallowip=\fR<ip> \fB\-stratumallowip=\fR<ip>
.IP .IP
Allow Stratum work requests from specified source. Valid for <ip> are a 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. single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0)
1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified
option can be specified multiple times multiple times
.PP .PP
Hush Smart Chain options: Hush Smart Chain options:
.HP .HP
@ -734,15 +700,6 @@ Public key for receiving payments on the network
.IP .IP
Transparent transactions only, default 0 Transparent transactions only, default 0
.HP .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 \fB\-ac_reward\fR
.IP .IP
Block reward in satoshis, default is 0 Block reward in satoshis, default is 0
@ -757,7 +714,7 @@ P2SH/multisig address to receive founders rewards
.HP .HP
\fB\-ac_supply\fR \fB\-ac_supply\fR
.IP .IP
Starting supply, default is 10 Starting supply, default is 0
.HP .HP
\fB\-ac_txpow\fR \fB\-ac_txpow\fR
.IP .IP
@ -767,12 +724,9 @@ Enforce transaction\-rate limit, default 0
In order to ensure you are adequately protecting your privacy when using Hush, In order to ensure you are adequately protecting your privacy when using Hush,
please see <https://hush.is/security/>. please see <https://hush.is/security/>.
Copyright (C) 2016-2023 Duke Leto and The Hush Developers Copyright (C) 2016-2022 Duke Leto and The Hush Developers
Copyright (C) 2016-2020 jl777 and SuperNET developers Copyright (C) 2016-2020 jl777 and SuperNET developers
Copyright (C) 2016-2018 The Zcash developers Copyright (C) 2016-2018 The Zcash developers
Copyright (C) 2009-2014 The Bitcoin Core developers Copyright (C) 2009-2014 The Bitcoin Core developers
This is experimental Free Software! Fuck Yeah!!!!! This is experimental Free Software! Fuck Yeah!!!!!

View File

@ -4,8 +4,6 @@
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. 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 ## 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. 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.
@ -24,12 +22,9 @@ git diff dev...master # look at the set of changes which exist in master but no
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: If the last command has no output, congrats, there is nothing to do. If the last command has output, then you should merge master into dev:
``` ```
git checkout master
git merge --no-ff dev # using the default commit message is fine
git push origin master
git checkout dev git checkout dev
git merge master git merge --no-ff master # using the default commit message is fine
git push origin dev git push
``` ```
The `--no-ff` flag above makes sure to make a merge commit, no matter what, even if a "fast forward" could be done. For those in the future looking back, it's much better to see evidence of when branches were merged. 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.
@ -46,7 +41,6 @@ Look for Git issues that should be fixed in the next release. Especially low-ris
* Does `PROTOCOL_VERSION` in src/version.h need to be increased? * 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 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. * 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? * 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` * If it does, new nodes will not be able to talk to nodes with a version less than `MIN_PROTO_VERSION`
@ -60,10 +54,7 @@ Install deps on Linux:
apt-get install help2man debchange apt-get install help2man debchange
## Release process ## 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 - 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` - 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` - If there is a consensus change, it may be a good idea to update `CLIENT_VERSION_MINOR` or `CLIENT_VERSION_MAJOR`
@ -78,10 +69,11 @@ Install deps on Linux:
- Update checkpoints in src/chainparams.cpp via util/checkpoints.pl - Update checkpoints in src/chainparams.cpp via util/checkpoints.pl
- hushd must be running to run this script, since it uses hush-cli to get the data - 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 - 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 - Find the highest block height of data, let's call it HEIGHT
- Run `./util/checkpoints.pl 1000 HEIGHT &> checkpoints.txt` to generate the latest checkpoint data - 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 - 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 - You will see 3 lines of "stats" at the end of the output, you just pasted in the newest stats. Delete the old stats that should be the 3 lines under the current stats
- The script generates a comment "Generated at ...", that should be moved to the very beginning of the checkpoint data
- Make sure the new code compiles, commit and push - Make sure the new code compiles, commit and push
- Run `./util/checkpoints.pl help` to see some basic help - Run `./util/checkpoints.pl help` to see some basic help
- By default it will generate checkpoints for every 1000 blocks, the "stride" - By default it will generate checkpoints for every 1000 blocks, the "stride"
@ -95,7 +87,7 @@ Install deps on Linux:
- They only provide limited security, because they talk about the past, not future block heights. - 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. - 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 - For instance, don't update checkpoints and then do a release a month later. You can always update checkpoint data again or multiple times
- Update copyright years if applicable. Example: `./util/update-copyrights.h 2022 2023` - Update copyright years (if applicable) with util/replace.pl
- Update doc/relnotes/README.md - Update doc/relnotes/README.md
- To get the stats of file changes: `git diff --stat master...dev` - To get the stats of file changes: `git diff --stat master...dev`
- Do a fresh clone and fresh sync with new checkpoints - Do a fresh clone and fresh sync with new checkpoints
@ -105,18 +97,12 @@ Install deps on Linux:
- The above command will not merge if "git pull" creates a merge conflict - 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 - 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 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 - 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 - 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 - 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 - 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 - 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 ## 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-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.

View File

@ -10,29 +10,6 @@ and no longer on Github, since they banned Duke Leto and
also because they censor many people around the world and work with also because they censor many people around the world and work with
evil organizations. evil organizations.
# Hush 3.9.3 "Lateral Larvacean"
```
1012 files changed, 36253 insertions(+), 5507 deletions(-)
```
This is an OPTIONAL release. It is recommended for exchanges, solo miners and mining pools to update to this release.
* Many RandomX mining fixes and improvements
* Difficulty bug affecting DRAGONX has been fixed
* RandomX mining hashrate increase of about 60X
* Optimized memory usage of RandomX mining
* This release adds Tor v3 and i2p support (BIP155 also known as addrv2)
* Basic usage is `hushd -proxy=127.0.0.1:9050` for using a local Tor proxy.
* Use port 9150 if you are using Tor Browser. See docs/tor.md for details
* New CLI args: `-i2psam=<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" # Hush 3.9.2 "Anecdotal Axolotl"
``` ```

View File

@ -1,225 +1,154 @@
# Tor # Warning
It is possible to run Hush as a Tor onion service, and connect to such services. Do not assume Tor support works perfectly in Hush; better Tor support is currently being worked on.
# Hush + Tor
It is possible to run Hush as a Tor hidden service, and connect to such services.
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 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. configure Tor.
## Compatibility
- Starting with version 3.9.3, Hush only supports Tor version 3 hidden 1. Run Hush behind a Tor proxy
services (Tor v3). Tor v2 addresses are ignored by Hush and neither -------------------------------
relayed nor stored.
- Tor removed v2 support beginning with version 0.4.6. The first step is running Hush behind a Tor proxy. This will already make all
outgoing connections be anonymized, but more is possible.
## How to see information about your Tor configuration via Hush -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.
There are several ways to see your local onion address in Hush: -onion=ip:port Set the proxy server to use for Tor hidden services. You do not
- in the "Local addresses" output of CLI `-netinfo` need to set this if it's the same as -proxy. You can use -noonion
- in the "localaddresses" output of RPC `getnetworkinfo` to explicitly disable access to hidden service.
- in the debug log (grep for "AddLocal"; the Tor address ends in `.onion`)
You may set the `-debug=tor` config logging option to have additional -listen When using -proxy, listening is disabled by default. If you want
information in the debug log about your Tor configuration. to run a hidden service (see next section), you'll need to enable
it explicitly.
CLI `-addrinfo` returns the number of addresses known to your node per -connect=X When behind a Tor proxy, you can specify .onion addresses instead
network. This can be useful to see how many onion peers your node knows, -addnode=X of IP addresses or hostnames in these parameters. It requires
e.g. for `-onlynet=onion`. -seednode=X SOCKS5. In Tor mode, such addresses can also be exchanged with
other P2P nodes.
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: 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 If using the Tor Browser Bundle:
Hush makes use of Tor's control socket API to create and destroy ./hushd -proxy=127.0.0.1:9150
ephemeral onion services programmatically. This means that if Tor is running and
proper authentication has been configured, Hush automatically creates an
onion service to listen on. The goal is to increase the number of available
onion nodes.
This feature is enabled by default if Hush is listening (`-listen`) and
it requires a Tor connection to work. It can be explicitly disabled with
`-listenonion=0`. If it is not disabled, it can be configured using the
`-torcontrol` and `-torpassword` settings.
To see verbose Tor information in the hushd debug log, pass `-debug=tor`.
### Control Port
You may need to set up the Tor Control Port. On Linux distributions there may be
some or all of the following settings in `/etc/tor/torrc`, generally commented
out by default (if not, add them):
```
ControlPort 9051
CookieAuthentication 1
CookieAuthFileGroupReadable 1
```
Add or uncomment those, save, and restart Tor (usually `systemctl restart tor`
or `sudo systemctl restart tor` on most systemd-based systems, including recent
Debian and Ubuntu, or just restart the computer).
On some systems (such as Arch Linux), you may also need to add the following
line:
```
DataDirectoryGroupReadable 1
```
### Authentication
Connecting to Tor's control socket API requires one of two authentication
methods to be configured: cookie authentication or hushd's `-torpassword`
configuration option.
#### Cookie authentication
For cookie authentication, the user running hushd must have read access to
the `CookieAuthFile` specified in the Tor configuration. In some cases this is
preconfigured and the creation of an onion service is automatic. Don't forget to
use the `-debug=tor` hushd configuration option to enable Tor debug logging.
If a permissions problem is seen in the debug log, e.g. `tor: Authentication
cookie /run/tor/control.authcookie could not be opened (check permissions)`, it
can be resolved by adding both the user running Tor and the user running
hushd to the same Tor group and setting permissions appropriately.
On Debian-derived systems, the Tor group will likely be `debian-tor` and one way
to verify could be to list the groups and grep for a "tor" group name:
```
getent group | cut -d: -f1 | grep -i tor
```
You can also check the group of the cookie file. On most Linux systems, the Tor
auth cookie will usually be `/run/tor/control.authcookie`:
```
TORGROUP=$(stat -c '%G' /run/tor/control.authcookie)
```
Once you have determined the `${TORGROUP}` and selected the `${USER}` that will
run hushd, run this as root:
```
usermod -a -G ${TORGROUP} ${USER}
```
Then restart the computer (or log out) and log in as the `${USER}` that will run
hushd.
#### `torpassword` authentication
For the `-torpassword=password` option, the password is the clear text form that
was used when generating the hashed password for the `HashedControlPassword`
option in the Tor configuration file.
The hashed password can be obtained with the command `tor --hash-password
password` (refer to the [Tor Dev
Manual](https://2019.www.torproject.org/docs/tor-manual.html.en) for more
details).
## 3. Manually create a Hush onion service
You can also manually configure your node to be reachable from the Tor network. 2. Run a Hush hidden server
Add these lines to your `/etc/tor/torrc` (or equivalent config file): ----------------------------
HiddenServiceDir /var/lib/tor/hush-service/ If you configure your Tor system accordingly, it is possible to make your node also
HiddenServicePort 18030 127.0.0.1:18032 reachable from the Tor network. Add these lines to your /etc/tor/torrc (or equivalent
config file):
The directory can be different of course, but virtual port numbers should be equal to HiddenServiceDir /var/lib/tor/hush-service/
your hushd's P2P listen port (18030 by default), and target addresses and ports HiddenServicePort 18030 127.0.0.1:18030
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 addresses using The directory can be different of course, but (both) port numbers should be equal to
this option, and this can be an onion address. Given the above your hushd's P2P listen port (18030 by default).
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.
You can set multiple local addresses with -externalip. The -externalip=X You can tell Hush about its publicly reachable address using
one that will be rumoured to a particular peer is the most this option, and this can be a .onion address. Given the above
compatible one and also using heuristics, e.g. the address configuration, you can find your onion address in
with the most incoming connections, etc. /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).
-listen You'll need to enable listening for incoming connections, as this -listen You'll need to enable listening for incoming connections, as this
is off by default behind a proxy. is off by default behind a proxy.
-discover When -externalip is specified, no attempt is made to discover local -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 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 from both Tor and IPv4 (or IPv6), you'll need to either pass your
other addresses using -externalip, or explicitly enable -discover. other addresses using -externalip, or explicitly enable -discover.
Note that both addresses of a dual-stack system may be easily Note that both addresses of a dual-stack system may be easily
linkable using traffic analysis. linkable using traffic analysis.
In a typical situation, where you're only reachable via Tor, this should suffice: In a typical situation, where you're only reachable via Tor, this should suffice:
./hushd -proxy=127.0.0.1:9050 -externalip=7zvj7a2imdgkdbg4f2dryd5rgtrn7upivr5eeij4cicjh65pooxeshid.onion -listen ./hushd -proxy=127.0.0.1:9050 -externalip=hushc0de123.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). Currently only v2 HS's are supported.
listen on all devices and another node could establish a clearnet connection, when knowing 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: 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 If you don't care too much about hiding your node, and want to be reachable on IPv4
as well, use `discover` instead: as well, use `discover` instead:
./hushd ... -discover ./hushd ... -discover
and open port 18030 on your firewall (or use port mapping, i.e., `-upnp` or `-natpmp`). and open port 18030 on your firewall.
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: for normal IPv4/IPv6 communication, use:
./hushd -onion=127.0.0.1:9050 -externalip=7zvj7a2imdgkdbg4f2dryd5rgtrn7upivr5eeij4cicjh65pooxeshid.onion -discover ./hushd -onion=127.0.0.1:9050 -externalip=hushc0de123.onion -discover
## 4. Privacy recommendations
- Do not add anything but Hush ports to the onion service created in section 3. 3. Automatically listen on Tor
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 Starting with Tor version 0.2.7.1 it is possible, through Tor's control socket
open. API, to create and destroy 'ephemeral' hidden services programmatically.
Hush has been updated to make use of this.
This means that if Tor is running (and proper authentication has been configured),
Hush automatically creates a hidden service to listen on. Hush will also use Tor
automatically to connect to other .onion nodes if the control socket can be
successfully opened. This will positively affect the number of available .onion
nodes and their usage.
This new feature is enabled by default if Hush is listening (`-listen`), and
requires a Tor connection to work. It can be explicitly disabled with `-listenonion=0`
and, if not disabled, configured using the `-torcontrol` and `-torpassword` settings.
To show verbose debugging information, pass `-debug=tor`.
Connecting to Tor's control socket API requires one of two authentication methods to be
configured. For cookie authentication the user running hushd must have write access
to the `CookieAuthFile` specified in Tor configuration. In some cases this is
preconfigured and the creation of a hidden service is automatic. If permission problems
are seen with `-debug=tor` they can be resolved by adding both the user running tor and
the user running hushd to the same group and setting permissions appropriately. On
Debian-based systems the user running hushd can be added to the debian-tor group,
which has the appropriate permissions. An alternative authentication method is the use
of the `-torpassword` flag and a `hash-password` which can be enabled and specified in
Tor configuration.
4. Connect to a Hush hidden server
-----------------------------------
To test your set-up, you might want to try connecting via Tor on a different computer to just a
a single Hush hidden server. Launch hushd as follows:
./hushd -onion=127.0.0.1:9050 -connect=fuckzookoie6wxgio.onion
Now use hush-cli to verify there is only a single peer connection.
hush-cli getpeerinfo
[
{
"id" : 1,
"addr" : "zcashhoneypot.onion:18030",
...
"version" : 1987420,
"subver" : "/GoldenSandtrout:3.6.0/",
...
}
]
To connect to multiple Tor nodes, use:
./hushd -onion=127.0.0.1:9050 -addnode=hushbeef123.onion -dnsseed=0 -onlynet=onion

View File

@ -1,5 +1,5 @@
#!/usr/usr/bin/env bash #!/usr/usr/bin/env bash
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
# This script makes the neccesary transactions to migrate # This script makes the neccesary transactions to migrate

View File

@ -1,4 +1,4 @@
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
import binascii import binascii

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2017 The Zcash developers # Copyright (c) 2017 The Zcash developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Execute all of the automated tests related to Hush # Execute all of the automated tests related to Hush
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
# Execute all of the automated tests related to Hush # Execute all of the automated tests related to Hush

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Released under the GPLv3 # Released under the GPLv3
set -e -o pipefail set -e -o pipefail

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Released under the GPLv3 # Released under the GPLv3
# This is a thin wrapper around bitcoin-cli that strips the Windows-style EOLs # This is a thin wrapper around bitcoin-cli that strips the Windows-style EOLs

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# THIS FILE IS GENERATED FROM run-bitcoind-for-test.sh.in # THIS FILE IS GENERATED FROM run-bitcoind-for-test.sh.in
# Copyright (c) 2013-2014 The Bitcoin Core developers # Copyright (c) 2013-2014 The Bitcoin Core developers
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Released under the GPLv3 # Released under the GPLv3
# #
HUSH_LOAD_TIMEOUT=500 HUSH_LOAD_TIMEOUT=500

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# THIS FILE IS GENERATED FROM tests-config.sh.in # THIS FILE IS GENERATED FROM tests-config.sh.in
# Copyright (c) 2013-2014 The Bitcoin Core developers # Copyright (c) 2013-2014 The Bitcoin Core developers
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Released under the GPLv3 # Released under the GPLv3
BUILDDIR="@abs_top_builddir@" BUILDDIR="@abs_top_builddir@"

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2018 SuperNET developers # Copyright (c) 2018 SuperNET developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2014-2015 The Bitcoin Core developers # Copyright (c) 2014-2015 The Bitcoin Core developers
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
# Test addressindex generation and fetching # Test addressindex generation and fetching

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Distributed under the GPLv3/X11 software license, see the accompanying # Distributed under the GPLv3/X11 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
# #

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2014 The Bitcoin Core developers # Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2018 SuperNET developers # Copyright (c) 2018 SuperNET developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2018 SuperNET developers # Copyright (c) 2018 SuperNET developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2018 SuperNET developers # Copyright (c) 2018 SuperNET developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2018 SuperNET developers # Copyright (c) 2018 SuperNET developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2018 SuperNET developers # Copyright (c) 2018 SuperNET developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2018 SuperNET developers # Copyright (c) 2018 SuperNET developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2018 SuperNET developers # Copyright (c) 2018 SuperNET developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2018 SuperNET developers # Copyright (c) 2018 SuperNET developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2018 SuperNET developers # Copyright (c) 2018 SuperNET developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2015 The Bitcoin Core developers # Copyright (c) 2015 The Bitcoin Core developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2014 The Bitcoin Core developers # Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2019 Duke Leto who wrote "The SuperNET developers" while never agreeing to the developer agreement nor being listed in AUTHORS # Copyright (c) 2019 Duke Leto who wrote "The SuperNET developers" while never agreeing to the developer agreement nor being listed in AUTHORS
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# Copyright (c) 2017 The Bitcoin Core developers # Copyright (c) 2017 The Bitcoin Core developers
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
"""Test wallet file location.""" """Test wallet file location."""

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2018 The Zcash developers # Copyright (c) 2018 The Zcash developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2014 The Bitcoin Core developers # Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2014 The Bitcoin Core developers # Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2016 The Zcash developers # Copyright (c) 2016 The Zcash developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2014 The Bitcoin Core developers # Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2014 The Bitcoin Core developers # Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2014 The Bitcoin Core developers # Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# #
# Test hard fork detection # Test hard fork detection

View File

@ -1,10 +1,12 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2014 The Bitcoin Core developers # Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
#
# Test rpc http basics # Test rpc http basics
#
from test_framework.test_framework import BitcoinTestFramework from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal, start_nodes from test_framework.util import assert_equal, start_nodes
@ -95,7 +97,7 @@ class HTTPBasicsTest (BitcoinTestFramework):
conn.request('POST', '/', '{"method": "getbestblockhash"}', headers) conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
out1 = conn.getresponse().read() out1 = conn.getresponse().read()
assert_equal('"error":null' in out1, True) assert_equal('"error":null' in out1, True)
assert_equal(conn.sock!=None, True) # connection must be closed because hushd should use keep-alive by default assert_equal(conn.sock!=None, True) # connection must be closed because bitcoind should use keep-alive by default
if __name__ == '__main__': if __name__ == '__main__':
HTTPBasicsTest().main() HTTPBasicsTest().main()

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2014 The Bitcoin Core developers # Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# #
# Distributed under the GPLv3/X11 software license, see the accompanying # Distributed under the GPLv3/X11 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2019 Bartlomiej Lisiecki # Copyright (c) 2019 Bartlomiej Lisiecki
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2017 The Zcash developers # Copyright (c) 2017 The Zcash developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2014 The Bitcoin Core developers # Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2014 The Bitcoin Core developers # Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# #
# Distributed under the GPLv3/X11 software license, see the accompanying # Distributed under the GPLv3/X11 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2018 The Zcash developers # Copyright (c) 2018 The Zcash developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2014 The Bitcoin Core developers # Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2014 The Bitcoin Core developers # Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2014 The Bitcoin Core developers # Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2018 The Zcash developers # Copyright (c) 2018 The Zcash developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2017 The Zcash developers # Copyright (c) 2017 The Zcash developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2014 The Bitcoin Core developers # Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2014 The Bitcoin Core developers # Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
import sys import sys

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# #
# Distributed under the GPLv3/X11 software license, see the accompanying # Distributed under the GPLv3/X11 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
@ -116,8 +116,8 @@ class TestNode(NodeConnCB):
class AcceptBlockTest(BitcoinTestFramework): class AcceptBlockTest(BitcoinTestFramework):
def add_options(self, parser): def add_options(self, parser):
parser.add_option("--testbinary", dest="testbinary", parser.add_option("--testbinary", dest="testbinary",
default=os.getenv("BITCOIND", "hushd"), default=os.getenv("BITCOIND", "bitcoind"),
help="hushd binary to test") help="bitcoind binary to test")
def setup_chain(self): def setup_chain(self):
initialize_chain_clean(self.options.tmpdir, 2) initialize_chain_clean(self.options.tmpdir, 2)

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2018 The Zcash developers # Copyright (c) 2018 The Zcash developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2018 The Zcash developers # Copyright (c) 2018 The Zcash developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2017 The Zcash developers # Copyright (c) 2017 The Zcash developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2015 The Bitcoin Core developers # Copyright (c) 2015 The Bitcoin Core developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
@ -13,10 +13,10 @@ import os
''' '''
Test plan: Test plan:
- Start hushd's with different proxy configurations - Start bitcoind's with different proxy configurations
- Use addnode to initiate connections - Use addnode to initiate connections
- Verify that proxies are connected to, and the right connection command is given - Verify that proxies are connected to, and the right connection command is given
- Proxy configurations to test on hushd side: - Proxy configurations to test on bitcoind side:
- `-proxy` (proxy everything) - `-proxy` (proxy everything)
- `-onion` (proxy just onions) - `-onion` (proxy just onions)
- `-proxyrandomize` Circuit randomization - `-proxyrandomize` Circuit randomization
@ -26,8 +26,8 @@ Test plan:
- proxy on IPv6 - proxy on IPv6
- Create various proxies (as threads) - Create various proxies (as threads)
- Create hushds that connect to them - Create bitcoinds that connect to them
- Manipulate the hushds using addnode (onetry) an observe effects - Manipulate the bitcoinds using addnode (onetry) an observe effects
addnode connect to IPv4 addnode connect to IPv4
addnode connect to IPv6 addnode connect to IPv6
@ -78,7 +78,7 @@ class ProxyTest(BitcoinTestFramework):
node.addnode("15.61.23.23:1234", "onetry") node.addnode("15.61.23.23:1234", "onetry")
cmd = proxies[0].queue.get() cmd = proxies[0].queue.get()
assert(isinstance(cmd, Socks5Command)) assert(isinstance(cmd, Socks5Command))
# Note: hushd's SOCKS5 implementation only sends atyp DOMAINNAME, even if connecting directly to IPv4/IPv6 # Note: bitcoind's SOCKS5 implementation only sends atyp DOMAINNAME, even if connecting directly to IPv4/IPv6
assert_equal(cmd.atyp, AddressType.DOMAINNAME) assert_equal(cmd.atyp, AddressType.DOMAINNAME)
assert_equal(cmd.addr, "15.61.23.23") assert_equal(cmd.addr, "15.61.23.23")
assert_equal(cmd.port, 1234) assert_equal(cmd.port, 1234)
@ -91,7 +91,7 @@ class ProxyTest(BitcoinTestFramework):
node.addnode("[1233:3432:2434:2343:3234:2345:6546:4534]:5443", "onetry") node.addnode("[1233:3432:2434:2343:3234:2345:6546:4534]:5443", "onetry")
cmd = proxies[1].queue.get() cmd = proxies[1].queue.get()
assert(isinstance(cmd, Socks5Command)) assert(isinstance(cmd, Socks5Command))
# Note: hushd's SOCKS5 implementation only sends atyp DOMAINNAME, even if connecting directly to IPv4/IPv6 # Note: bitcoind's SOCKS5 implementation only sends atyp DOMAINNAME, even if connecting directly to IPv4/IPv6
assert_equal(cmd.atyp, AddressType.DOMAINNAME) assert_equal(cmd.atyp, AddressType.DOMAINNAME)
assert_equal(cmd.addr, "1233:3432:2434:2343:3234:2345:6546:4534") assert_equal(cmd.addr, "1233:3432:2434:2343:3234:2345:6546:4534")
assert_equal(cmd.port, 5443) assert_equal(cmd.port, 5443)
@ -102,24 +102,24 @@ class ProxyTest(BitcoinTestFramework):
if test_onion: if test_onion:
# Test: outgoing onion connection through node # Test: outgoing onion connection through node
node.addnode("hushv3h6mbxd2pptj42reko3jcexcgnz5zvp3mqcu6myto3jhhn4yzyd.onion:18030", "onetry") node.addnode("bitcoinostk4e4re.onion:8333", "onetry")
cmd = proxies[2].queue.get() cmd = proxies[2].queue.get()
assert(isinstance(cmd, Socks5Command)) assert(isinstance(cmd, Socks5Command))
assert_equal(cmd.atyp, AddressType.DOMAINNAME) assert_equal(cmd.atyp, AddressType.DOMAINNAME)
assert_equal(cmd.addr, "hushv3h6mbxd2pptj42reko3jcexcgnz5zvp3mqcu6myto3jhhn4yzyd.onion") assert_equal(cmd.addr, "bitcoinostk4e4re.onion")
assert_equal(cmd.port, 18030) assert_equal(cmd.port, 8333)
if not auth: if not auth:
assert_equal(cmd.username, None) assert_equal(cmd.username, None)
assert_equal(cmd.password, None) assert_equal(cmd.password, None)
rv.append(cmd) rv.append(cmd)
# Test: outgoing DNS name connection through node # Test: outgoing DNS name connection through node
node.addnode("node.noumenon:18030", "onetry") node.addnode("node.noumenon:8333", "onetry")
cmd = proxies[3].queue.get() cmd = proxies[3].queue.get()
assert(isinstance(cmd, Socks5Command)) assert(isinstance(cmd, Socks5Command))
assert_equal(cmd.atyp, AddressType.DOMAINNAME) assert_equal(cmd.atyp, AddressType.DOMAINNAME)
assert_equal(cmd.addr, "node.noumenon") assert_equal(cmd.addr, "node.noumenon")
assert_equal(cmd.port, 18030) assert_equal(cmd.port, 8333)
if not auth: if not auth:
assert_equal(cmd.username, None) assert_equal(cmd.username, None)
assert_equal(cmd.password, None) assert_equal(cmd.password, None)

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2014 The Bitcoin Core developers # Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2014 The Bitcoin Core developers # Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2014 The Bitcoin Core developers # Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2018 The Zcash developers # Copyright (c) 2018 The Zcash developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2014 The Bitcoin Core developers # Copyright (c) 2014 The Bitcoin Core developers
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Released under the GPLv3 # Released under the GPLv3
# #
# Test -reindex with CheckBlockIndex # Test -reindex with CheckBlockIndex

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2014 The Bitcoin Core developers # Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2018 The Zcash developers # Copyright (c) 2018 The Zcash developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# Copyright (c) 2014 The Bitcoin Core developers # Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the GPLv3 software license, see the accompanying # Distributed under the GPLv3 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
# Copyright (c) 2016-2023 The Hush developers # Copyright (c) 2016-2022 The Hush developers
# #
# Distributed under the GPLv3/X11 software license, see the accompanying # Distributed under the GPLv3/X11 software license, see the accompanying
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html

Some files were not shown because too many files have changed in this diff Show More