Merge branch 'dev' into danger

This commit is contained in:
Duke Leto
2022-02-03 10:32:23 -05:00
42 changed files with 6722 additions and 6369 deletions

7
.gitignore vendored
View File

@@ -109,14 +109,7 @@ contrib/debian/files
contrib/debian/substvars
src/rpcmisc~.cpp
src/komodo-cli
src/komodod
src/komodo-tx
src/komodo-test
src/wallet-utility
src/komodo-cli.exe
src/komodod.exe
src/komodo-tx.exe
src/hush-cli
src/hushd

View File

@@ -22,8 +22,7 @@ RUN cd /hush && \
./configure --with-incompatible-bdb --with-gui || true && \
./build.sh -j$(nproc)
RUN ln -sf /hush/src/komodod /usr/bin/komodod && \
ln -sf /hush/src/hushd /usr/bin/hushd && \
RUN ln -sf /hush/src/hushd /usr/bin/hushd && \
ln -sf /hush/src/hush-tx /usr/bin/hush-tx && \
ln -sf /hush/src/wallet-utility /usr/bin/hush-wallet-utility && \
ln -sf /hush/src/hush-smart-chain /usr/bin/hush-smart-chain && \

11
INSTALL-BIN.md Normal file
View File

@@ -0,0 +1,11 @@
# Installing Hush binaries
1. First [download the release](https://git.hush.is/hush/hush3/releases) you want to install. It will have a .deb file extension.
1. Next install the Debian package (change the version to what you downloaded above):
`dpkg -i hush-3.8.0-amd64.deb`
1. If you want to remove it, then run this to uninstall:
`apt-get remove hush`

View File

@@ -1,14 +1,6 @@
# Installing Hush
## Installing Binaries
To install a Debian package:
dpkg -i hush-3.6.2-amd4.deb
To uninstall:
apt-get remove hush
Instructions to compile Hush yourself.
## Build HUSH dependencies
@@ -29,9 +21,8 @@ sudo swapon /swapfile
## Build on Linux:
```sh
# install build depedencies
# install build dependencies
sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib \
autoconf libtool ncurses-dev unzip git python zlib1g-dev wget \
bsdmainutils automake curl unzip nano libsodium-dev
@@ -42,7 +33,7 @@ cd hush3
./build.sh -j$(nproc)
```
## Building On Ubuntu 16.04 and older systems
### Building On Ubuntu 16.04 and older systems
Some older compilers may not be able to compile modern code, such as gcc 5.4 which comes with Ubuntu 16.04 by default. Here is how to install gcc 7 on Ubuntu 16.04. Run these commands as root:
@@ -56,6 +47,8 @@ apt-get install -y gcc-7 g++-7 && \
## Run a HUSH Node
After you have compiled Hush, then you can run it with the following command:
```sh
./src/hushd
```
@@ -81,11 +74,7 @@ cd hush
./src/hushd
```
Currently Linux, Windows and Mac OS X are our supported platforms. If you
are interested in porting Hush to a new operating system, we are interested
to talk with you. Experimental FreeBSD support is in progress, thanks to radix42.
We aim to support all platforms, but there is only so much time in the day.
## ARM Architecture
Currently, any ARMv7 machine will not be able to build this repo, because the
underlying tech (zcash and the zksnark library) do not support that instruction

View File

@@ -38,7 +38,7 @@ Run `hushd --version` to find out
### Any extra information that might be useful in the debugging process.
This includes the relevant contents of `~/.komodo/HUSH3/debug.log`. You can paste raw text, attach the file directly in the issue or link to the text via a pastebin type site.
This includes the relevant contents of `~/.hush/HUSH3/debug.log` or `~/.komodo/HUSH3/debug.log` if you have a legacy install. You can paste raw text, attach the file directly in the issue or link to the text via a pastebin type site.
Please also include any non-standard things you did during compilation (extra flags, dependency version changes etc.) if applicable.
Beware that usernames and IP addresses and other metadata is definitely in this log file!

View File

@@ -17,8 +17,8 @@ pkgconfig_DATA = libzcashconsensus.pc
endif
BITCOIND_BIN=$(top_builddir)/src/komodod$(EXEEXT)
BITCOIN_CLI_BIN=$(top_builddir)/src/komodo-cli$(EXEEXT)
BITCOIND_BIN=$(top_builddir)/src/hushd$(EXEEXT)
BITCOIN_CLI_BIN=$(top_builddir)/src/hush-cli$(EXEEXT)
#WALLET_UTILITY_BIN=$(top_builddir)/src/wallet-utility$(EXEEXT)
BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT)

View File

@@ -22,7 +22,7 @@ coin takes over 24 hours to sync their full nodes because of Sprout Transactions
In working on this release, Duke Leto was suspended from Github, which gave Hush developers
the impetus to completely leave that racist and censorship-loving platform.
Hush now has it's own <a href="https://git.hush.is/hush">git.hush.is</a> Gitea instance,
Hush now has it's own [git.hush.is](https://git.hush.is/hush) Gitea instance,
because we will not be silenced by Microsoft.
All Hush software will be released from git.hush.is and hush.is, downloads from any other
@@ -32,7 +32,11 @@ domains should be assumed to be backdoored.
## Installing
See [INSTALL.md](https://git.hush.is/hush/hush3/src/branch/master/INSTALL.md)
You can either compile it yourself or you can install a binary which was compiled by us.
Please refer to the instructions which apply to you below:
* See [INSTALL.md](INSTALL.md) to compile from source on Linux and to cross-compile for Windows
* See [INSTALL-BIN.md](INSTALL-BIN.md) to install pre-compiled binary on Linux
### Claiming Funds From Old Hush Wallets
@@ -40,11 +44,16 @@ If you have an older wallet, then refer to [OLD_WALLETS.md](OLD_WALLETS.md).
### Official Explorer
The link for the Official Hush explorer is: <a href="https://explorer.hush.is">explorer.hush.is</a>
The link for the Official Hush explorer is: [explorer.hush.is](https://explorer.hush.is)
We are looking for alternate explorers to be run on Tor, i2P and other TLDs, if you are interested
please join Telegram and ask questions.
### For system admins
There is a new systemd user service script so you can easily start/stop/restart your hushd service on your server.
[Try it out today](doc/hushd-systemd.md) and the systemd script is located in the doc directory of the source tree.
## Support and Socials
Please feel free to join us on Telegram for official support:

View File

@@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 3)
define(_CLIENT_VERSION_MINOR, 9)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_REVISION, 1)
define(_CLIENT_VERSION_BUILD, 50)
define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50)))
define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1)))

View File

@@ -55,6 +55,6 @@ if ($line1 =~ m/tx=(\d+)/) {
$txs_per_day = $total_txs - $tx1;
}
}
print "(int64_t) $time, // time of last checkpointed block\n";
print ",(int64_t) $time, // time of last checkpointed block\n";
print "(int64_t) $total_txs, // total txs\n";
print "(double) $txs_per_day // txs in the last day before block $blocks\n";

View File

@@ -1,2 +1,3 @@
usr/bin/komodod
usr/bin/komodo-cli
usr/bin/hushd
usr/bin/hush-cli
usr/bin/hush-tx

View File

@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2016-2021 The Hush developers
# Copyright (c) 2016-2022 The Hush developers
# Released under the GPLv3
set -e
@@ -11,14 +11,19 @@ VERSION=$(./src/hushd --version|grep version|cut -d' ' -f4|cut -d- -f1|sed 's/v/
FILE="hush-$VERSION-linux-amd64.tar"
TIME=$(perl -e 'print time')
mv build build.$TIME
if [ -d "build" ]
then
mv build build.$TIME
echo "Moved existing build/ dir to build.$TIME"
fi
mkdir build
echo "Created new build/ dir"
cp contrib/asmap/asmap.dat build/
cp sapling*.params build/
cd src
cp komodod komodo-cli komodo-tx hushd hush-cli hush-tx hush-smart-chain ../build
cp hushd hush-cli hush-tx hush-smart-chain ../build
cd ../build
strip komodo*
strip hushd hush-cli hush-tx
tar -f $FILE -c *
gzip -9 $FILE
sha256sum *.gz

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -22,7 +22,26 @@ cd ~/.hush/HUSH3
rm zindex.dat blocks chainstate database notarizations hushstate
```
It's possible to confused hush if you ran old code, stop, restart, and then write out zindex.dat that is incorrect, with later hushds will load from disk and believe.
It's possible to confused hush if you ran old code, stop, restart, and then write out zindex.dat that is incorrect, which later hushds will load from disk and believe.
# Parsing RPC output with jq
jq is a very useful tool to parse JSON output, install it with:
apt install jq
Let's say you want to parse a very large output from `listunspent` which has spendable and
unspendable funds mixed together. This can happen when you import a viewing key. Funds from
the address of a viewing key will have `spendable = false` :
hush-cli listunspent|jq '.[] | {spendable, address, amount} | select(.spendable != false)'
The above command will only show spendable UTXOs. The jq language is very powerful and is very
useful for devops and developer scripts.
The jq manual can be found here: https://stedolan.github.io/jq/manual/
# Making a new release of Hush

35
doc/hushd-systemd.md Normal file
View File

@@ -0,0 +1,35 @@
# Systemd script for the Hush daemon
## Set it up
First set it up as follows:
* Copy hushd.service to the systemd user directory, which is /usr/lib/systemd/user directory
## Basic Usage
How to start the script:
`systemctl start --user hushd.service`
How to stop the script:
`systemctl stop --user hushd.service`
How to restart the script:
`systemctl restart --user hushd.service`
## How to watch it as it starts
Use the following on most Linux distros:
`watch systemctl status --user hushd.service`
If you're using Ubuntu 20.04, then try this instead as the above did not work for me on Ubuntu 20.04 server:
`tail -f ~/.hush/HUSH3/debug.log`
## Troubleshooting
* Don't run it with sudo or root, or it won't work with the wallet.
### To-do
* Determine why Ubuntu 20.04 didn't produce the expected outcome with watch and systemctl
* Create the hushd rc.d script
* Create the hushd runit script

9
doc/hushd.service Normal file
View File

@@ -0,0 +1,9 @@
[Unit]
Description=Hush daemon
After=network.target
[Service]
ExecStart=/usr/bin/hushd
[Install]
WantedBy=default.target

View File

@@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
.TH HUSH-CLI "1" "July 2021" "hush-cli v3.8.0" "User Commands"
.TH HUSH-CLI "1" "January 2022" "hush-cli v3.9.1" "User Commands"
.SH NAME
hush-cli \- manual page for hush-cli v3.8.0
hush-cli \- manual page for hush-cli v3.9.1
.SH DESCRIPTION
Hush RPC client version v3.8.0\-10a6706e7\-dirty
Hush RPC client version v3.9.1\-804a4abbe\-dirty
.PP
In order to ensure you are adequately protecting your privacy when using Hush,
please see <https://hush.is/security/>.
@@ -25,7 +25,7 @@ This help message
.HP
\fB\-conf=\fR<file>
.IP
Specify configuration file (default: komodo.conf)
Specify configuration file (default: HUSH3.conf)
.HP
\fB\-datadir=\fR<dir>
.IP
@@ -47,7 +47,7 @@ Send commands to node running on <ip> (default: 127.0.0.1)
.HP
\fB\-rpcport=\fR<port>
.IP
Connect to JSON\-RPC on <port> (default: 8232 or testnet: 18232)
Connect to JSON\-RPC on <port> (default: 18030 )
.HP
\fB\-rpcwait\fR
.IP

View File

@@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
.TH HUSH-TX "1" "July 2021" "hush-tx v3.8.0" "User Commands"
.TH HUSH-TX "1" "January 2022" "hush-tx v3.9.1" "User Commands"
.SH NAME
hush-tx \- manual page for hush-tx v3.8.0
hush-tx \- manual page for hush-tx v3.9.1
.SH DESCRIPTION
hush\-tx utility version v3.8.0\-10a6706e7\-dirty
hush\-tx utility version v3.9.1\-804a4abbe\-dirty
.SS "Usage:"
.TP
hush\-tx [options] <hex\-tx> [commands]

View File

@@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
.TH HUSHD "1" "July 2021" "hushd v3.8.0" "User Commands"
.TH HUSHD "1" "January 2022" "hushd v3.9.1" "User Commands"
.SH NAME
hushd \- manual page for hushd v3.8.0
hushd \- manual page for hushd v3.9.1
.SH DESCRIPTION
Hush Daemon version v3.8.0\-10a6706e7\-dirty
Hush Daemon version v3.9.1\-804a4abbe\-dirty
.PP
In order to ensure you are adequately protecting your privacy when using Hush,
please see <https://hush.is/security/>.
@@ -69,9 +69,8 @@ Keep at most <n> unconnectable transactions in memory (default: 100)
.HP
\fB\-mempooltxinputlimit=\fR<n>
.IP
[DEPRECATED FROM OVERWINTER] Set the maximum number of transparent
inputs in a transaction that the mempool will accept (default: 0 = no
limit applied)
[DEPRECATED/IGNORED] Set the maximum number of transparent inputs in a
transaction that the mempool will accept (default: 0 = no limit applied)
.HP
\fB\-par=\fR<n>
.IP
@@ -117,7 +116,7 @@ is replaced by transaction hex)
\fB\-addressindex\fR
.IP
Maintain a full address index, used to query for the balance, txids and
unspent outputs for addresses (default: 1)
unspent outputs for addresses (default: 0)
.HP
\fB\-timestampindex\fR
.IP
@@ -127,7 +126,7 @@ by a range of timestamps (default: 0)
\fB\-spentindex\fR
.IP
Maintain a full spent index, used to query the spending txid and input
index for an outpoint (default: 1)
index for an outpoint (default: 0)
.HP
\fB\-zindex\fR
.IP
@@ -142,7 +141,7 @@ Add a node to connect to and attempt to keep the connection open
.HP
\fB\-asmap=\fR<file>
.IP
Specify asn mapping used for bucketing of the peers (default:
Specify ASN mapping used for bucketing of the peers (default:
asmap.dat). Relative paths will be prefixed by the net\-specific datadir
location.
.HP
@@ -442,7 +441,7 @@ optional). If <category> is not supplied or if <category> = 1, output
all debugging information. <category> can be: addrman, alert, bench,
coindb, db, deletetx, estimatefee, http, libevent, lock, mempool, net,
tls, partitioncheck, pow, proxy, prune, rand, reindex, rpc, selectcoins,
tor, zmq, zrpc, zrpcunsafe (implies zrpc).
stratum, tor, zmq, zrpc, zrpcunsafe (implies zrpc).
.HP
\fB\-experimentalfeatures\fR
.IP
@@ -553,8 +552,7 @@ Password for JSON\-RPC connections
.HP
\fB\-rpcport=\fR<port>
.IP
Listen for JSON\-RPC connections on <port> (default: 7771 or testnet:
17771)
Listen for JSON\-RPC connections on <port> (default: 0 or testnet: 10000)
.HP
\fB\-rpcallowip=\fR<ip>
.IP
@@ -583,11 +581,40 @@ output (default: 1 if running in a console, 0 otherwise)
Number of seconds between metrics refreshes (default: 1 if running in a
console, 600 otherwise)
.PP
Stratum server options:
.HP
\fB\-stratum\fR
.IP
Enable stratum server (default: off)
.HP
\fB\-stratumaddress=\fR<address>
.IP
Mining address to use when special address of 'x' is sent by miner
(default: none)
.HP
\fB\-stratumbind=\fR<ipaddr>
.IP
Bind to given address to listen for Stratum work requests. Use
[host]:port notation for IPv6. This option can be specified multiple
times (default: bind to all interfaces)
.HP
\fB\-stratumport=\fR<port>
.IP
Listen for Stratum work requests on <port> (default: 19031 or testnet:
19031)
.HP
\fB\-stratumallowip=\fR<ip>
.IP
Allow Stratum work requests from specified source. Valid for <ip> are a
single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0)
or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified
multiple times
.PP
Hush Smart Chain options:
.HP
\fB\-ac_algo\fR
.IP
Choose PoW mining algorithm, default is Equihash
Choose PoW mining algorithm, default is Equihash (200,9)
.HP
\fB\-ac_blocktime\fR
.IP

View File

@@ -10,9 +10,89 @@ and no longer on Github, since they banned Duke Leto and
also because they censor many people around the world and work with
evil organizations.
# Hush 3.8.0 "XXX YYY"
# Hush 3.9.1 "Luciferous Locust"
This is an OPTIONAL release. It is most important for users with large wallets, as it fixes an important
bug that causes the Hush full node to stop responding to requests. It is recommended for exchanges
and mining pools to update to this release.
```
34 files changed, 6530 insertions(+), 6344 deletions(-)
```
* Fix RPC deadlocks, which caused the RPC interface to hang.
* A special thanks to ex-Hush developer miodrag who reported this in an upstream issue comment.
* This turned out to be an upstream bug in Zcash that was inherited by Hush.
* More details can be found at https://git.hush.is/hush/hush3/issues/77
* The `listbanned` RPC now returns a new key `time_remaining` which tells how many
seconds are remaining in the ban
* The `rescan` RPC now works correctly when given a height. This can be used to do
a partial rescan from a custom height, without restarting the node.
* Minimum disk space required for a running full node has been increased to 1GB from 50MB
* This will print "Disk space is low!!!" and shut down the full node.
* To fix, free up disk space and restart the node.
* This change was implemented because in rare circumstances, large amounts of disk space
can be used up quickly, faster than the node checks for free disk space, which can lead
to a corrupt wallet.dat . Requiring more free disk space makes this much less likely.
* Dockerfile has been updated
# Hush 3.9.0 "Unusual Ursid"
```
136 files changed, 3881 insertions(+), 3156 deletions(-)
```
This is a MANDATORY release, please update as soon as you can! At some point, full nodes older than 3.9.0
will no longer be able to sync the current HUSH network correctly. More details will be given in a future update.
* :rainbow: hushd/hush-cli/hush-tx are now true binaries instead of shell scripts
* This means hushd.bat, hush-cli.bat and hush-tx.bat are no longer needed on Windows
and simplifies the maintenance of internals
* :tada: New official location for full node data is ~/.hush !
* New full nodes will install and use ~/.hush
* Existing full nodes will continue to use the legacy ~/.komodo directory
* If both ~/.hush/HUSH3 and ~/.komodo/HUSH3 exist, the ~/.hush directory will be used
* :kiss: Hush full nodes will now attempt to talk to two more nodes by default:
* node1.hush.land
* node2.hush.land
* :fork_and_knife: New RPCs:
* listaddresses - Show all taddrs in this wallet.dat
* rpcinfo - Shows stats about RPC internals
* :unicorn: These RPCs can now be run during RPC warmup:
* listaddresses
* z\_exportwallet
* signmessage
* decoderawtransaction
* getnetworkinfo
* :sweat_drops: New doc/hushd.service to use hushd with systemd
* Learn more at doc/hushd-systemd.md
* :rocket: Many updates to Hush Smart Chains and Hush internals
* Optimize zaddrs by only building witness caches for blocks that involve our wallet
* When RPC connection fails hush-cli now tells you which port it was trying to connect to
* Calculation of HSC "network magic" has changed as of 3.9.0
* If using or developing an HSC, all nodes must use either 3.8.0 or earlier, or
preferably, all use 3.9.0 code or later. HSC networks using both 3.8.0 and 3.9.0 will not work.
* This was required by internals changes and we do not plan to do this again.
* :hammer: New Stratum API so you can Solo mine with your full node!
* This is an optional feature that defaults to disabled. Enable it with `-stratum=1`
* Example usage: `hushd -stratum=1 -stratumport=31337 -stratumallowip=192.168.0.0/24'
* This allows mining connections from your local network where computers have IPs like 192.168.0.x .
* Your ASICs must be able to connect to the IP and port of your full node. Firewall rules may be needed.
* It offers the highest privacy for miners, since mining pools know your IP and address metadata and can be
hacked or coerced into giving that data. Solo mining with your own full node gives the absolute least metadata
to third parties.
* This is also the cheapest possible way to mine HUSH, since there are NO POOL FEES and NO PAYOUT TRANSACTION FEES! :smile:
* Miners can mine entire HUSH blocks from the privacy of their own server
* As many ASICs as you like can be used with a single Hush full node, just use an address inside a wallet you control,
and set your pool to the IP and port of your Hush full node with Stratum enabled.
* :nerd_face: The hush-smart-chain script is now installed in Debian packages
# Hush 3.8.0 "Chuckling Chupacabra"
```
32 files changed, 712 insertions(+), 183 deletions(-)
```
This is an OPTIONAL release, but since it contains many privacy improvements, it's HIGHLY RECOMMENDED for all users to upgrade.
It's VERY HIGHLY RECOMMENDED for mining pools to upgrade, since some improvements affect them.
* New Sietch feature: Randomized change output location
* Zcash and Pirate always put the change as the last shielded output, which leaks metadata. Hush no longer has this metadata leakage.
@@ -20,6 +100,8 @@ This is an OPTIONAL release, but since it contains many privacy improvements, it
* New Sietch feature: Sitech-ified `z_shieldcoinbase`
* This RPC now leaks less metadata by making it hard for blockchain analysts to know which of the three outputs has value.
* This also increases Hush's "anonset velocity", which is how fast we increase our anonymity set, or "anonset".
* Thanks to [LuckPool](https://luckpool.net) for a patch that fixes how the longest chain is calculated.
* This bug can prevent mining pools from making payout transactions, which is why this release is HIGHLY RECOMMENDED for mining pools.
* Previously you could only run `stop` while Hush was in RPC warmup, but now additional RPCs are allowed:
* `stop` - Oops, you started hushd on accident a few seconds ago? Now you can stop it without waiting.
* `help` - Get help during long rescans, finally!
@@ -28,10 +110,17 @@ This is an OPTIONAL release, but since it contains many privacy improvements, it
* `listaddresses` - See a list of taddrs as soon as we load the wallet.
* `dumpprivkey` - Dump the private key of a taddr, even when node isn't fully synced!
* `getpeerinfo` - See current peers even before we get enough peers to start syncing or a long rescan!
* If the RPC interface is not functioning (such as filled by deadlocks or something else) it can become impossible to shut down hushd correctly!
* Doing a `kill` of the process could corrupt wallet.dat and cause a very long rescan.
* Now you can create a file called `plz_stop` in the same directory as wallet.dat
* `hushd` checks for this file every 120 seconds and will shutdown if it sees it.
* `-keepnotewitnesscache` prevents the Sapling Note Witness cache from being deleted from wallet.dat on shutdown.
* If your hushd crashed or needed to be `kill -9`, do `hushd -keepnotewitnesscache -rescan -rescanheight=XXX` with a height of just before it crashed
* This will only rescan the latest part of the blockchain looking for new funds, instead of all of history. Much faster!
* `-rescanheight` can be used with `-keepnotewitnesscache` and `-rescan` to do a partial rescan of history and avoid completely rebuilding the Witness Cache.
* `-zindex` data is now stored on disk in the new `zindex.dat` file
* All nodes that use `-zindex` will now have reliable anonset statistics even after a restart
* `getpeerinfo` now returns a `relaytxes` key which says if a remote node is relaying transactions to us
* Improvements to the RPC help documentation
* `hushd.bat` for Windows now uses the ASN map via `-asmap` and has the latest seed nodes
* `hushd-tx.bat` for Windows now exists for making raw transactions on Windows

View File

@@ -11,7 +11,7 @@ address="Rxxx"
amount=1
# Alias for running cli on source chain
cli_source="komodo-cli -ac_name=$source"
cli_source="hush-cli -ac_name=$source"
# Raw tx that we will work with
txraw=`$cli_source createrawtransaction "[]" "{\"$address\":$amount}"`
@@ -37,7 +37,7 @@ read -p "Wait for a notarization to HUSH, and then two more notarizations from t
# Create import
importTx=`$cli_source migrate_createimporttransaction $exportSignedTx $payouts`
importTx=`komodo-cli migrate_completeimporttransaction $importTx`
importTx=`hush-cli migrate_completeimporttransaction $importTx`
# Send import
komodo-cli -ac_name=$target sendrawtransaction $importTx
hush-cli -ac_name=$target sendrawtransaction $importTx

View File

@@ -145,7 +145,7 @@ STAGES = [
STAGE_COMMANDS = {
'btest': [repofile('src/test/test_bitcoin'), '-p'],
'gtest': [repofile('src/komodo-gtest')],
'gtest': [repofile('src/hush-gtest')],
'sec-hard': check_security_hardening,
'no-dot-so': ensure_no_dot_so_in_depends,
'util-test': util_test,

View File

@@ -5,7 +5,9 @@
# Released under the GPLv3
#
HUSH_LOAD_TIMEOUT=500
DATADIR="@abs_top_builddir@/.komodo/HUSH3"
# TODO: support legacy directory. For now, those that want
# to run tests must use the non-legacy directory
DATADIR="@abs_top_builddir@/.hush/HUSH3"
rm -rf "$DATADIR"
mkdir -p "$DATADIR"/regtest
touch "$DATADIR/HUSH3.conf"

View File

@@ -42,7 +42,7 @@ If you get into a bad state, you should be able to recover with:
```bash
rm -rf cache
killall komodod
killall hushd
```
but beware that could kill various other processes you might not want to kill!

View File

@@ -960,10 +960,159 @@ void *chainparams_commandline() {
(662000, uint256S("0x00000011c4659f0bbe3559c32ff24588d78a3822e8b0e31bb9298a16213fe154"))
(663000, uint256S("0x000000076756708535e3daeaca6bc32aa1dc360228af6a0c5e5e07b5d9f5f00b"))
(664000, uint256S("0x000000181806c17b47bb843537cc91c95ca1e3596bb9e049d18c2e73c1026258"))
(665000, uint256S("0x0000001e966c9edae76c40262e65a6c9ab764a09154eb802fb892ceebc2d1935")),
(int64_t) 1631750258, // time of last checkpointed block
(int64_t) 1064407, // total txs
(double) 1402 // txs in the last day before block 665685
(665000, uint256S("0x0000001e966c9edae76c40262e65a6c9ab764a09154eb802fb892ceebc2d1935"))
(666000, uint256S("0x0000000b7594c1e8f6ccdf1559e230fdc6c276e8df0a800b7f7c82a237a6c14e"))
(667000, uint256S("0x000000101801a801c21a2e50d4a5173e494f2e9ee604cec5886a8547680accaa"))
(668000, uint256S("0x00000001ee22e21a6d5a5b322ea1ec69231b35d72d54f9fbdfa5dfdc5c7e2f4a"))
(669000, uint256S("0x0000000f8fa48f7244099f17c8dbf79982f5dec586b5b32d0fa30f18540081ca"))
(670000, uint256S("0x00000008d3b0a1f5286574ba5fe05c3151144cd7f330f2f1ec3f2009d4b82687"))
(671000, uint256S("0x0000000dd430c9a8e3d83f123f0bc6b6ba11e774ec6bdcf1a13c216b8e071d3e"))
(672000, uint256S("0x0000000326bd2c2465754ee03f2a9d82d902a19e7d92aef3c9967cbbbdd37da9"))
(673000, uint256S("0x000000053e15e2ee0f6fdb5d6a096fb3b785f82165f5126805fb785d884bef7c"))
(674000, uint256S("0x0000000472c24f87b24de8e091ae9b191d0a114ecaecf7487c5ccd88680b4799"))
(675000, uint256S("0x00000007bc716ae47620f86f7f38010b43a92560b4d901cd4fa945c20ffeee4a"))
(676000, uint256S("0x00000011506c87f327448ff75a37168ee0a31f199dc8f42499247f4af5f84a71"))
(677000, uint256S("0x00000007e26fe6537984fc6f7d9164a6edcd9fa1c92a0ba1f2bafed491c50976"))
(678000, uint256S("0x00000013a790e855c1722c648e930302366b15c78f6f2a9d0bc01ce0c8faec69"))
(679000, uint256S("0x0000000f8519548ca86c8689fc4282e1ce7ab34a39680c7dde40846e49235299"))
(680000, uint256S("0x000000060f172b876390a65c27ad87360e16b8710a4b184b11ed09844b5327fd"))
(681000, uint256S("0x00000001a43cafd9c0858e23c62e629609f9e73905fe8f6de14b0db5c8811f31"))
(682000, uint256S("0x0000000b8330e95dc616e2b455de087d541e4ab8f17bff162b08d66b113ccee0"))
(683000, uint256S("0x000000082fdac13fff52ef28e0b288963b091b991be5fec2684092664340d05b"))
(684000, uint256S("0x00000037cde1f403c7fadb6042d63bec2b04de94d6a9c6202dc371146d4c4745"))
(685000, uint256S("0x00000010795f12db65a60d307bedf42692c1b09a909cc0963bf73df8960c6d3d"))
(686000, uint256S("0x0000000b1aec6e706333d02892de401375820a71a307b49671667b10738f92fb"))
(687000, uint256S("0x00000014ba8dc2c0e5a40a4787ca257a220627ebc183ee460d8ae7fb6ddd3ce0"))
(688000, uint256S("0x0000000edade4f635276a397c9704ea83bdf006d6ee8c8a2fe0f2a41b1e1a2c7"))
(689000, uint256S("0x0000001834d62f37506d7729df7784ff6aa082f227a8c248bfc7d646856cfb2d"))
(690000, uint256S("0x00000007f1fc92391ef45142f537991b974151eff532aa3832adadf3b46bcb95"))
(691000, uint256S("0x0000000ef2ee7f7801125026414f2e1b98571f8a5f74615447ba2f62c24b4a22"))
(692000, uint256S("0x0000000b4640658900c7265b94dae90370de8d1673a909239629b26bd2fd5b06"))
(693000, uint256S("0x00000012c16de95e8a827c6337de6ab2e04c94eb12a97aa20fac3acc479bd703"))
(694000, uint256S("0x0000000a6ccfa9999373584068cab8a9670b287905d7f095d8144ca03694bbf8"))
(695000, uint256S("0x000000132069bbd8a9dd0cec996879b949b2a9862fdfa907c3559929865372ce"))
(696000, uint256S("0x00000005dc30a87aafed1a5703403573234529a8fc0e7f4cb789d3b22406476e"))
(697000, uint256S("0x00000004f7fc3367c3483d0ac17ef6c30148c31d0dd7ec14503c69e79212aaf2"))
(698000, uint256S("0x000000116f56e8cf6e7ed759f8095f0b7bd48c5aec6d35615bfd479a042cf094"))
(699000, uint256S("0x000000096cc740eada81deca2d6a2f2fb30e5a5f15bce44f206e9a15c374ee84"))
(700000, uint256S("0x0000000ebb5da3d51a7897c9224fc236bd8085fbd0e1ac4eb08063eef04c1326"))
(701000, uint256S("0x000000032acf386d4ac320303d8d3d5e6885dd384417a5d0b994c8fe101405c5"))
(702000, uint256S("0x00000000f135d58892ddb7f17a7d1d34d108b177152bce2adde48d58a72480cd"))
(703000, uint256S("0x0000000a469db4ff74c9bdf7903981a3247cb11cbc6ece12fb0e8d34206ba583"))
(704000, uint256S("0x000000024f09cabdd6fbdd379b74d4535c20d5bc78f78725f2d87b257ab3a64d"))
(705000, uint256S("0x0000000c122244118777ca474fe3f30151849ff253ae730dc433900aea5616c5"))
(706000, uint256S("0x000000044ac2724bdc4a6b2280e56f39bff25a974f0a5dd5254ae485e159a442"))
(707000, uint256S("0x00000000f78f57e7ddb7791529ae2cafcbface8b84dd73cca05b1ee0a39e805d"))
(708000, uint256S("0x0000001103a4845c38a3f66fdd58f9d94374f30ab8c0733d4078d8dcd3d3e26f"))
(709000, uint256S("0x0000000c99f7c770acf46982e474ec975b8553f6cb7280c8aa4dc8ecfd4502e1"))
(710000, uint256S("0x0000001a51c2e34893cc22a3b971bedb378bd67ca72ec7c3ed4d23525adabff4"))
(711000, uint256S("0x00000002c448af5f17a48d7f05af47603b75c630a09e04fef2b9f0f21945aebf"))
(712000, uint256S("0x0000001e0056b9ebeb5243761efeeb0664eaa0ff89abc36dafcf7f71be8193b1"))
(713000, uint256S("0x0000001517c5c0baba314bd145724a2bbf5216263a5c8ce49ca340bebe1599cc"))
(714000, uint256S("0x000000004029d0f2c3e7ec91d2aef9e81d1cf77285f9171c54385ef35c02b6b2"))
(715000, uint256S("0x000000006e564468d95f88cea7cb129d5ec9471d8926899cba01d0983032bf3b"))
(716000, uint256S("0x0000001da54ab2dc4117a35bbfc2338f61baa512e33f34ff18eaa55fc319c586"))
(717000, uint256S("0x0000002259b8ca50a1e7f9b9af40806c985a3132ff6dfd31e6d01bbab5403918"))
(718000, uint256S("0x000000220342ec4cf63c780ce8d08a5af38bfa8b5bb64c972c8a2329610056be"))
(719000, uint256S("0x00000037b81377ae13ce1b04a4404aaeaf495583da0a861f39ce189eabe7d5a7"))
(720000, uint256S("0x0000000eb0b2819480c099e6cca141b798bcf07c66bedd04f5850f86c0b8878b"))
(721000, uint256S("0x0000000865b0212e22de923d8f4bef23c8ce246daeddefabb6241a1eb41da109"))
(722000, uint256S("0x0000000e716a800aedd611b6314c78ac20aefe48fa47573cb70f381160e0db23"))
(723000, uint256S("0x00000011424c16a23f43d2d38a3bbcfab3d821517edd4d57f02ec3a6746db787"))
(724000, uint256S("0x00000023868c6026b6d9b1e409ba4e89815799f04e56dcf9069533ae1822d87d"))
(725000, uint256S("0x0000000ce2234cb1cab7b1f14f0645d8583bcd6577bbc6ce55917bc2e48605b1"))
(726000, uint256S("0x0000000b7d068029b3dc7c3b5b20b5385c440e3fce25f22af01e2f340803e953"))
(727000, uint256S("0x0000001397b76c4d49c4fab404e601125a0339973ddc14d40614a55f54c9d139"))
(728000, uint256S("0x00000021f973a90b8d3056997fae4c623f73af904872aed33f63d5ebce94b315"))
(729000, uint256S("0x0000000316dfae7d3e960e6da972733b97c73f2bba07fc97441d86a1f2632cf7"))
(730000, uint256S("0x0000000c9187c64cad22d367596ee5437ffd41fed4330bcf74fff1ce549f3d9b"))
(731000, uint256S("0x000000041deda86540d5cb4511dd940a683f6bba285e2c89928835101886901c"))
(732000, uint256S("0x000000052705093cb4bcea0f465d0a532b9e9d61ab78be0bc985ebf66187903e"))
(733000, uint256S("0x0000000e5e84cd1dc70734ed8c6befb320cb32840f77d9419d7dfc4471ec6485"))
(734000, uint256S("0x0000000d3fe5f94dc80adfc50d38292d0f94a75d639be4d841b5f77975078102"))
(735000, uint256S("0x000000101579eee0e2ffe5e23626404792cfa337e87cf0375139cd928042244a"))
(736000, uint256S("0x00000011f37e135c1bffb0825f2cf88c3c248daddc3223b1b3fb4138d9f77654"))
(737000, uint256S("0x0000000d96401f6a82ac6d443c99a65e880d79aefac3801d5080c927dbbca761"))
(738000, uint256S("0x0000000d0983a0a7959cf28b2697e3f5902693279f598df70c61906099c38747"))
(739000, uint256S("0x0000000c4614c2dabe3069cbaae5f79509547f632744ed007e96928e3bec6d1c"))
(740000, uint256S("0x0000001370fc0baaf711be451a2b9a5a2d5d59cedde84e69067e060df6cd3778"))
(741000, uint256S("0x0000000c81a032b51c07f7f33979d694c4f563a25de843c3d48201960369712b"))
(742000, uint256S("0x00000016521be5ffa22b2a53f52aaccd1f3c3bfbfd7b3351107bb701934cf2c0"))
(743000, uint256S("0x0000001557b93d2d702c46f80f8a447867bbe2cbd0a9b316561adb01e491276e"))
(744000, uint256S("0x00000004967284091afe656b8224e4da1aa4a5964d1bac02070c89a49534d237"))
(745000, uint256S("0x0000001a96bdfcb7e55584fc9159e7b4c88c6a64892fef3036179135bc49013d"))
(746000, uint256S("0x0000000b44163c78a309335f1ac87d969ff53e38b6994a428b61a192422b32c4"))
(747000, uint256S("0x00000022ba85723a6fc37817c9a5b911c805e9da7296dc4183f642641e14b39b"))
(748000, uint256S("0x000000239b4649133efc60534ce96f3d99974609f3bfce8129cb5f46ec9d3081"))
(749000, uint256S("0x0000001f9228fb3382e0e6f4c12717e8178c2fbd4778844169144676c177b87e"))
(750000, uint256S("0x0000001a4cbef7572c4a65f60b60698030b578076ea9975dd0824373ce2c4183"))
(751000, uint256S("0x000000022106ddb102cdc9b469c396bde3f72193bcf015f40bf6608e72a2c11e"))
(752000, uint256S("0x000000042593732f28182b5ea47ced401b38b9284d9f146be69c46db2740d34b"))
(753000, uint256S("0x000000235270b26418f0794246aa0dd87e5e6f8200737fbb59a0549fbaad9a60"))
(754000, uint256S("0x000000102687d9069e5c4947c438e8a1463c6ca5c790071fce9bea89aabd496c"))
(755000, uint256S("0x000000262e22ed0adb3f0cc209d9f8b1240ff71c7f29e8baec7ce4fdcb0e14c9"))
(756000, uint256S("0x0000001e8d1e8c70ed915ef61dcbb8c2fe10ed0b8e8762085a6bc3e6630b4e87"))
(757000, uint256S("0x0000000501487876ac71c5a07fbeaeaaa636362f671fd067c552350d2ef6fa3b"))
(758000, uint256S("0x000000154c7b0267c5bbbaeb33a84c53fe34781a556d23e26578f12083ff6e04"))
(759000, uint256S("0x0000000aec8ac88a0b28c58b0329bac0091ad68f730ec55f82f2edcc1cce946f"))
(760000, uint256S("0x00000018df2e264ef0fc15bb4ad1fa12e818625f9e095ac6003aaa1f4060ce89"))
(761000, uint256S("0x0000000c78d9666e517303dd7a4b00ec34229f9f429cfe51717a581ea26e67f8"))
(762000, uint256S("0x0000000c3b416775bb8994ce58ae6bae5ce684cc79674f09e36929e76fa4ce07"))
(763000, uint256S("0x00000004383f6ba79fb60065e1c95b3ff98dd1aceb8d49fbe03c350324e5046f"))
(764000, uint256S("0x00000023a90688247c20fd9e74c5a2b3130fb84ee09a5c0a141364bfe760958b"))
(765000, uint256S("0x00000005c59ad86d2fcaca989c59e13bcfd3d63e3130daa5328210ea031109fb"))
(766000, uint256S("0x000000041f64eb49c7d081105daf6d271bc1c1ed9e3d183c843c472045ab94ce"))
(767000, uint256S("0x00000001795f0383cbfd09e28deb4428b6bf336c464c98e843863dbcdee4c025"))
(768000, uint256S("0x0000001834285286165f94ba31da2fbd7e4abe4bfff2713dea4e276b27d6ee93"))
(769000, uint256S("0x000000151c6b74ea90a8948b53d0819c3503429cd6066bfcc7d8b7df283da7aa"))
(770000, uint256S("0x000000085b03765792e28df72ca455c6b286753dc9830198d7fac6e8de9b20f3"))
(771000, uint256S("0x0000000fee1601dd6576b2a79dc44f1c3953102f95428f32db5034148a3c64e0"))
(772000, uint256S("0x000000126b0e3189b7855022476f58dcfe115ee4c70b54ea4f433853f33fd33b"))
(773000, uint256S("0x00000009e4dddde6d966fffd07e28c980b825a3415d60e324e02e30b82a07a50"))
(774000, uint256S("0x0000000402c75136d79a96872dba53464c059732751896df53f332a493a34b31"))
(775000, uint256S("0x00000013cd3e6bf1a13d67849c27538b9aca293fb2f33d9bdbfc038bc8b78186"))
(776000, uint256S("0x000000034bb0753d3ec0f888ac767d0664aab9a62716d2f8e09310b3dfb69589"))
(777000, uint256S("0x0000001a66c05603c01ea5e70050bb3045e49933b2da1f68a089e953fca1cc58"))
(778000, uint256S("0x00000016a6f7b684c02fe3f7d15fc6606410b5ba194b895d99a39aaf766d3d0a"))
(779000, uint256S("0x00000007b84369e550415cd9cbf9b218d7f6c0ab8ce2fd6c3c14d83c24b8c831"))
(780000, uint256S("0x0000001bc54272022faf7cf4c0d7191b59f351c27dbc3e27af61d56adf9f8db8"))
(781000, uint256S("0x0000000422000e5283a68d4b4455f9499095be3c4435499105e2c2e4462042d7"))
(782000, uint256S("0x0000000e8665d4347064e1b5356e12e45ba8777d895c6db62ff1a9d54353d4c5"))
(783000, uint256S("0x0000001596b5ba5abae70e0577fa2d0b9923b137f95c46d9e4e24f9f75408e83"))
(784000, uint256S("0x00000009d64751d77720a9e53afc5772de4b038ffa91b7f01198faf8f92948ba"))
(785000, uint256S("0x00000018491e220d32dd46eb630493cf5b5d3510ead86fccdd24941a096fdffc"))
(786000, uint256S("0x00000009b3bba2ff0ce705eac99fd25cdf57c8e10f562a30c8b7d536dc25f807"))
(787000, uint256S("0x00000001713c2458ca82591e673efdfdec1351c65e948cac6596d567b014d5a4"))
(788000, uint256S("0x0000000fcc283f93d198e9af8ebeaf352004aa176ee1343b67167f3fc5b7fca0"))
(789000, uint256S("0x000000126872b709595db5a70d1ed1734824c7975a910d76c32e8c5339f7e66f"))
(790000, uint256S("0x0000001759742e4eed5989c313b0de4309155e131dcdd1d2c08506c72d3ae39d"))
(791000, uint256S("0x0000001cf3dd31bdcdbeee12a7fe7771f9a4c4e8536e6c3da9a0f9657c6b1233"))
(792000, uint256S("0x00000013718aa22f069d05e7bf02e7c7f534b739f3561d9beaa3c6d4f07e89b7"))
(793000, uint256S("0x0000000d5f13600d80b55d0d6ef495c97a33ee81794682336d6a161add5aa6f1"))
(794000, uint256S("0x000000125c3875745f5afb75b60a9d378bd707d6e36020e4a9462e0a3078851a"))
(795000, uint256S("0x00000016aaa27a9b6dc0b2e2192417fc202185ca52f47bb34dbad624163c32c2"))
(796000, uint256S("0x00000016fa029c2e10941d5f59930047e02ea3cf0f4960bcf0ab0b3e02ec1c47"))
(797000, uint256S("0x0000000e250a69c6c8a1b7d86bc1a69c1f9c20ef78fe90902d581add6e7725c9"))
(798000, uint256S("0x0000000bb74902f5d5a6ecf084bbf1b9bf00c2ee0db935942df8278b1e9e98df"))
(799000, uint256S("0x0000000bdf0fd1c93e8e105d87e0fa93b80cb46b7fe8775975df4f696ca496ec"))
(800000, uint256S("0x0000000f0fb98bf6890d4fcae25128c10e6b8956fd5672dad3aa8cb50d7e1caf"))
(801000, uint256S("0x000000114369a780ce7f71b8482036d1897e9d798a67b8a3933628391b6af27a"))
(802000, uint256S("0x0000000342e0f9b65b257046b0581d0701ffa639b7c67cc0573e3825590f291b"))
(803000, uint256S("0x00000012460bda352fde2c8ef056ef266532fbf10902882b405c5bc9ae9a846f"))
(804000, uint256S("0x0000001fc3769dbbf3877a52ff39316e2132d81f8f0d0376927b64d94e4f7b63"))
(805000, uint256S("0x000000053cb85ac301727f883cbff748da578d69f2206026afa3a82cce2274eb"))
(806000, uint256S("0x00000001e56632c584ade9824907b1edf792cbdef8152466fd6d78792da295b4"))
(807000, uint256S("0x00000013511a9e9871f33543489892e0abc81e942b7c234496f0ad228fd71908"))
(808000, uint256S("0x00000025d48985adb86510fc873ec49c1013daa8baa5bb6d1b9f27fb64d1c557"))
(809000, uint256S("0x0000001cf14358b8ec250c36882add7327d1683311dfe616803ea7dfb4c4fa0b"))
(810000, uint256S("0x00000025015c9b84da2768de29734421ea62eeec748707e5e71072544808f890"))
(811000, uint256S("0x000000135b3c8688693605a5878f5ffc9c486e13e4f12846e27b20da6486df29"))
(812000, uint256S("0x000000130932327eb52b9229cb8574b552f39a83d8def5bd2ce12a6094f26093"))
(813000, uint256S("0x0000000236505351e3ed94c075d7ab4f91cec65b4d15d8e47338833c744eaf00"))
(814000, uint256S("0x000000025cdfe869ed1ab7cf74c5fdad85e7c2b1b946b2c618d4035db2ae25cb")),
(int64_t) 1643000155, // time of last checkpointed block
(int64_t) 1256633, // total txs
(double) 1264 // txs in the last day before block 814560
};
} else {
checkpointData = //(Checkpoints::CCheckpointData)

View File

@@ -30,7 +30,7 @@
// Must be kept in sync with configure.ac , ugh!
#define CLIENT_VERSION_MAJOR 3
#define CLIENT_VERSION_MINOR 9
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_REVISION 1
#define CLIENT_VERSION_BUILD 50
//! Set to true for release, false for prerelease or test build

View File

@@ -5697,9 +5697,9 @@ bool CheckDiskSpace(uint64_t nAdditionalBytes)
if(fDebug) {
fprintf(stderr,"Free bytes on disk: %lu\n", nFreeBytesAvailable);
}
// Check for nMinDiskSpace bytes (currently 50MB)
// Check for nMinDiskSpace bytes (defined in main.h)
if (nFreeBytesAvailable < nMinDiskSpace + nAdditionalBytes)
return AbortNode("Disk space is low!", _("Error: Disk space is low!"));
return AbortNode("Disk space is low!!!", _("Error: Disk space is low!!!"));
return true;
}

View File

@@ -172,7 +172,7 @@ extern int64_t nMaxTipAge;
extern CBlockIndex *pindexBestHeader;
/** Minimum disk space required - used in CheckDiskSpace() */
static const uint64_t nMinDiskSpace = 52428800;
static const uint64_t nMinDiskSpace = 1073741824; // 1GB
/** Pruning-related variables and constants */
/** True if any block files have ever been pruned. */

View File

@@ -1,5 +1,6 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin Core developers
// Copyright (c) 2016-2021 The Hush developers
// Distributed under the GPLv3 software license, see the accompanying
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
/******************************************************************************

View File

@@ -36,6 +36,7 @@ public:
static const CRPCConvertParam vRPCConvertParams[] =
{
{ "rescan", 0 },
{ "stop", 0 },
{ "setmocktime", 0 },
{ "getaddednodeinfo", 0 },

View File

@@ -635,6 +635,7 @@ UniValue listbanned(const UniValue& params, bool fHelp, const CPubKey& mypk)
std::map<CSubNet, int64_t> banMap;
CNode::GetBanned(banMap);
const int64_t current_time{GetTime()};
UniValue bannedAddresses(UniValue::VARR);
for (std::map<CSubNet, int64_t>::iterator it = banMap.begin(); it != banMap.end(); it++)
@@ -642,6 +643,7 @@ UniValue listbanned(const UniValue& params, bool fHelp, const CPubKey& mypk)
UniValue rec(UniValue::VOBJ);
rec.push_back(Pair("address", (*it).first.ToString()));
rec.push_back(Pair("banned_until", (*it).second));
rec.push_back(Pair("time_remaining", (*it).second - current_time));
bannedAddresses.push_back(rec);
}

View File

@@ -42,7 +42,7 @@ using namespace RPCServer;
using namespace std;
extern uint16_t ASSETCHAINS_P2PPORT,ASSETCHAINS_RPCPORT;
static bool fRPCRunning = false;
static std::atomic<bool> fRPCRunning {false};
static bool fRPCInWarmup = true;
static std::string rpcWarmupStatus("RPC server started");
static CCriticalSection cs_rpcWarmup;

View File

@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2018-2020 The Hush developers
# Copyright (c) 2018-2021 The Hush developers
set -eo pipefail
# You can now add delay line to pubkey.txt file

View File

@@ -900,7 +900,7 @@ void ShrinkDebugFile()
int maxlogsize = GetArg("-maxdebugfilesize", 15);
unsigned int MAX_DEBUG_LOG_SIZE = maxlogsize*(1024*1024); // convert to MB
if (file && boost::filesystem::file_size(pathLog) > MAX_DEBUG_LOG_SIZE ) {
fprintf(stderr,"Shrinking %s to be at most %d bytes\n", GetDataDir().c_str(), MAX_DEBUG_LOG_SIZE );
fprintf(stderr,"Shrinking %s to be at most %d bytes\n", pathLog.string().c_str(), MAX_DEBUG_LOG_SIZE );
// Restart the file with some of the end
std::vector <char> vch(200000,0);
fseek(file, -((long)vch.size()), SEEK_END);

View File

@@ -1,5 +1,6 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin Core developers
// Copyright (c) 2016-2021 The Hush developers
// Distributed under the GPLv3 software license, see the accompanying
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
@@ -7,7 +8,6 @@
#define HUSH_VALIDATIONINTERFACE_H
#include <boost/signals2/signal.hpp>
#include "zcash/IncrementalMerkleTree.hpp"
class CBlock;

View File

@@ -178,9 +178,13 @@ UniValue rescan(const UniValue& params, bool fHelp, const CPubKey& mypk)
}
LogPrintf("Rescanning from height=%d\n", nRescanHeight);
//pwalletMain->ScanForWalletTransactions(chainActive[nRescanHeight],true);
bool update = false;
pwalletMain->ScanForWalletTransactions(chainActive.Genesis(),update);
bool update = true;
if (nRescanHeight > 0) {
pwalletMain->ScanForWalletTransactions(chainActive[nRescanHeight],update);
} else {
pwalletMain->ScanForWalletTransactions(chainActive.Genesis(),update);
}
LogPrintf("Done rescanning from height=%d\n", nRescanHeight);
//TODO: can we return something more useful?
return NullUniValue;
}

View File

@@ -5241,9 +5241,7 @@ UniValue z_mergetoaddress(const UniValue& params, bool fHelp, const CPubKey& myp
"\nto combine those into a single note."
"\n\nThis is an asynchronous operation, and UTXOs selected for merging will be locked. If there is an error, they"
"\nare unlocked. The RPC call `listlockunspent` can be used to return a list of locked UTXOs."
"\n\nThe number of UTXOs and notes selected for merging can be limited by the caller. If the transparent limit"
"\nparameter is set to zero, and Overwinter is not yet active, the -mempooltxinputlimit option will determine the"
"\nnumber of UTXOs. Any limit is constrained by the consensus rule defining a maximum transaction size of"
"\n\nThe number of UTXOs and notes selected for merging can be limited by the caller."
"\nArguments:\n"
"1. fromaddresses (string, required) A JSON array with addresses.\n"
" The following special strings are accepted inside the array:\n"
@@ -5259,7 +5257,7 @@ UniValue z_mergetoaddress(const UniValue& params, bool fHelp, const CPubKey& myp
"3. fee (numeric, optional, default="
+ strprintf("%s", FormatMoney(MERGE_TO_ADDRESS_OPERATION_DEFAULT_MINERS_FEE)) + ") The fee amount to attach to this transaction.\n"
"4. transparent_limit (numeric, optional, default="
+ strprintf("%d", MERGE_TO_ADDRESS_DEFAULT_TRANSPARENT_LIMIT) + ") Limit on the maximum number of UTXOs to merge. Set to 0 to use node option -mempooltxinputlimit (before Overwinter), or as many as will fit in the transaction (after Overwinter).\n"
+ strprintf("%d", MERGE_TO_ADDRESS_DEFAULT_TRANSPARENT_LIMIT) + ") Limit on the maximum number of UTXOs to merge. Set to 0 to use as many as will fit in the transaction.\n"
"4. shielded_limit (numeric, optional, default="
+ strprintf("%d Sapling Notes", MERGE_TO_ADDRESS_DEFAULT_SAPLING_LIMIT) + ") Limit on the maximum number of notes to merge. Set to 0 to merge as many as will fit in the transaction.\n"
"5. maximum_utxo_size (numeric, optional) eg, 0.0001 anything under 10000 satoshies will be merged, ignores 10,000 sat p2pk utxo that dragon uses, and merges coinbase utxo.\n"

View File

@@ -1662,6 +1662,9 @@ void CWallet::EraseFromWallet(const uint256 &hash)
if (mapWallet.erase(hash))
CWalletDB(strWalletFile).EraseTx(hash);
}
if(fDebug) {
LogPrintf("%s: erased txid %s\n", __func__, hash.ToString().c_str() );
}
return;
}
@@ -3052,6 +3055,8 @@ std::vector<uint256> CWallet::ResendWalletTransactionsBefore(int64_t nTime)
multimap<unsigned int, CWalletTx*> mapSorted;
uint32_t now = (uint32_t)time(NULL);
std::vector<uint256> vwtxh;
uint32_t erased = 0, skipped = 0;
BOOST_FOREACH(PAIRTYPE(const uint256, CWalletTx)& item, mapWallet)
{
CWalletTx& wtx = item.second;
@@ -3061,12 +3066,16 @@ std::vector<uint256> CWallet::ResendWalletTransactionsBefore(int64_t nTime)
if ( (wtx.nLockTime >= LOCKTIME_THRESHOLD && wtx.nLockTime < now-HUSH_MAXMEMPOOLTIME) )
{
LogPrintf("%s: skip Relaying wtx %s nLockTime %u vs now.%u\n", __func__, wtx.GetHash().ToString(),(uint32_t)wtx.nLockTime,now);
if(fDebug) {
LogPrintf("%s: skip Relaying wtx %s nLockTime %u vs now.%u\n", __func__, wtx.GetHash().ToString(),(uint32_t)wtx.nLockTime,now);
}
skipped++;
//vwtxh.push_back(wtx.GetHash());
continue;
}
mapSorted.insert(make_pair(wtx.nTimeReceived, &wtx));
}
BOOST_FOREACH(PAIRTYPE(const unsigned int, CWalletTx*)& item, mapSorted)
{
if ( item.second != 0 )
@@ -3076,10 +3085,21 @@ std::vector<uint256> CWallet::ResendWalletTransactionsBefore(int64_t nTime)
result.push_back(wtx.GetHash());
}
}
// TODO: this does not seem to handle rescanning+finding old coinbase txs correctly
// Unless we remove these unconfirmed txs from the wallet, they will
// persist there forever. They are too old to be accepted by network
// consensus rules, so we erase them.
for (auto hash : vwtxh)
{
EraseFromWallets(hash);
EraseFromWallet(hash);
erased++;
}
if(erased > 0 || skipped > 0) {
LogPrintf("%s: Prevented relaying %d and erased %d transactions which are too old\n", __func__, skipped, erased);
}
return result;
}

View File

@@ -827,6 +827,7 @@ protected:
return;
}
try {
LOCK(cs_wallet);
for (std::pair<const uint256, CWalletTx>& wtxItem : mapWallet) {
auto wtx = wtxItem.second;
// We skip transactions for which mapSaplingNoteData

View File

@@ -43,33 +43,24 @@ chmod 0755 -R $BUILD_DIR/*
#cp $SRC_DEB/postrm $BUILD_DIR/DEBIAN
#cp $SRC_DEB/preinst $BUILD_DIR/DEBIAN
#cp $SRC_DEB/prerm $BUILD_DIR/DEBIAN
# Copy binaries. We prefix our komodod binaries with hush- to prevent conflicting with
# a stock komodod or other flavors of KMD
cp $SRC_PATH/contrib/asmap/asmap.dat $DEB_SHR
cp $SRC_PATH/sapling-spend.params $DEB_SHR
cp $SRC_PATH/sapling-output.params $DEB_SHR
cp $SRC_PATH/src/komodod $DEB_BIN/hush-komodod
strip $DEB_BIN/hush-komodod
cp $SRC_PATH/src/komodo-cli $DEB_BIN/hush-komodo-cli
strip $DEB_BIN/hush-komodo-cli
cp $SRC_PATH/src/komodo-tx $DEB_BIN/hush-komodo-tx
strip $DEB_BIN/hush-komodo-tx
cp $SRC_PATH/src/hushd $DEB_BIN
strip $DEB_BIN/hushd
cp $SRC_PATH/src/hush-cli $DEB_BIN
strip $DEB_BIN/hush-cli
cp $SRC_PATH/src/hush-tx $DEB_BIN
strip $DEB_BIN/hush-tx
cp $SRC_PATH/src/hush-smart-chain $DEB_BIN
#cp $SRC_DEB/changelog $DEB_DOC/changelog.Debian
cp $SRC_DEB/copyright $DEB_DOC
cp -r $SRC_DEB/examples $DEB_DOC
# Copy manpages
cp $SRC_DOC/man/komodod.1 $DEB_MAN/hush-komodod.1
cp $SRC_DOC/man/komodo-cli.1 $DEB_MAN/hush-komodo-cli.1
cp $SRC_DOC/man/komodo-tx.1 $DEB_MAN/hush-komodo-tx.1
cp $SRC_DOC/man/komodod.1 $DEB_MAN/hushd.1
cp $SRC_DOC/man/komodo-cli.1 $DEB_MAN/hush-cli.1
cp $SRC_DOC/man/komodo-tx.1 $DEB_MAN/hush-tx.1
#TODO: process these copies and update names/binaries/etc
cp $SRC_DOC/man/hushd.1 $DEB_MAN/hushd.1
cp $SRC_DOC/man/hush-cli.1 $DEB_MAN/hush-cli.1
cp $SRC_DOC/man/hush-tx.1 $DEB_MAN/hush-tx.1
# Copy bash completion files
cp $SRC_PATH/contrib/hushd.bash-completion $DEB_CMP/hushd
@@ -78,9 +69,6 @@ cp $SRC_PATH/contrib/hush-tx.bash-completion $DEB_CMP/hush-tx
# Gzip files
#gzip --best -n $DEB_DOC/changelog
#gzip --best -n $DEB_DOC/changelog.Debian
gzip --best -n $DEB_MAN/hush-komodod.1
gzip --best -n $DEB_MAN/hush-komodo-cli.1
gzip --best -n $DEB_MAN/hush-komodo-tx.1
gzip --best -n $DEB_MAN/hushd.1
gzip --best -n $DEB_MAN/hush-cli.1
gzip --best -n $DEB_MAN/hush-tx.1
@@ -88,7 +76,7 @@ gzip --best -n $DEB_MAN/hush-tx.1
cd $SRC_PATH/contrib
# Create the control file
dpkg-shlibdeps $DEB_BIN/hush-komodod $DEB_BIN/hush-komodo-cli $DEB_BIN/hush-komodo-tx
dpkg-shlibdeps $DEB_BIN/hushd $DEB_BIN/hush-cli $DEB_BIN/hush-tx
dpkg-gencontrol -P$BUILD_DIR -v$DEBVERSION
#dpkg-gencontrol -P$BUILD_DIR

View File

@@ -24,4 +24,4 @@ cd $WD
CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site CXXFLAGS="-DPTW32_STATIC_LIB -DCURL_STATICLIB -fopenmp -pthread" ./configure --prefix="${PREFIX}" --host=x86_64-w64-mingw32 --enable-static --disable-shared
sed -i 's/-lboost_system-mt /-lboost_system-mt-s /' configure
cd src/
CC="${CC} -g " CXX="${CXX} -g " make V=1 komodod.exe komodo-cli.exe komodo-tx.exe
CC="${CC} -g " CXX="${CXX} -g " make V=1 hushd.exe hush-cli.exe hush-tx.exe

View File

@@ -6,12 +6,13 @@
#set -ex
echo "...Checking HUSH3.conf"
if [ ! -e "$HOME/.komodo/HUSH3/HUSH3.conf" ]; then
mkdir -p $HOME/.komodo/HUSH3
# TODO: support legacy location?
if [ ! -e "$HOME/.hush/HUSH3/HUSH3.conf" ]; then
mkdir -p $HOME/.hush/HUSH3
DATE=$(date)
echo "...Creating HUSH3.conf"
cat <<EOF > $HOME/.komodo/HUSH3.conf
cat <<EOF > $HOME/.hush/HUSH3.conf
# Generated by docker-entrypoint.sh at $DATE
rpcuser=hush
rpcpassword=${rpcpassword:-`dd if=/dev/urandom bs=33 count=1 2>/dev/null | base64`}
@@ -24,7 +25,7 @@ zdebug=0
zindex=0
EOF
cat $HOME/.komodo/HUSH3/HUSH3.conf
cat $HOME/.hush/HUSH3/HUSH3.conf
fi
if [ $# -gt 0 ]; then