diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29bb..000000000 diff --git a/DEVELOPER-AGREEMENT b/DEVELOPER-AGREEMENT deleted file mode 100644 index 85d69b4f3..000000000 --- a/DEVELOPER-AGREEMENT +++ /dev/null @@ -1 +0,0 @@ -You must agree that Duke Leto is the Elder of jl777. diff --git a/Dockerfile b/Dockerfile index b011397d8..946cbbd88 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,7 @@ RUN cd /hush && \ RUN ln -sf /hush/src/hushd /usr/bin/hushd && \ ln -sf /hush/src/hush-tx /usr/bin/hush-tx && \ ln -sf /hush/src/wallet-utility /usr/bin/hush-wallet-utility && \ - ln -sf /hush/src/hush-smart-chain /usr/bin/hush-smart-chain && \ + ln -sf /hush/src/hush-arrakis-chain /usr/bin/hush-arrakis-chain && \ ln -sf /hush/util/docker-entrypoint.sh /usr/bin/entrypoint && \ ln -sf /hush/util/docker-hush-cli.sh /usr/bin/hush-cli diff --git a/INSTALL-BIN.md b/INSTALL-BIN.md deleted file mode 100644 index 38c8e5a7d..000000000 --- a/INSTALL-BIN.md +++ /dev/null @@ -1,11 +0,0 @@ -# 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` diff --git a/INSTALL.md b/INSTALL.md deleted file mode 100644 index ee7ead5c1..000000000 --- a/INSTALL.md +++ /dev/null @@ -1,109 +0,0 @@ -# Installing Hush - -Instructions to compile Hush yourself. - -## Swap Space (Optional) -You will need at least 4GB of RAM to build hush from git source, OR you can -enable a swap file. To enable a 4GB swap file on modern Linux distributions: - -```sh -sudo fallocate -l 4G /swapfile -sudo chmod 600 /swapfile -sudo mkswap /swapfile -sudo swapon /swapfile -``` - -## Build on Debian/Ubuntu: - -```sh -# install build dependencies -sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib \ - autoconf libtool ncurses-dev unzip git zlib1g-dev wget \ - bsdmainutils automake curl unzip nano libsodium-dev cmake -# clone git repo -git clone https://git.hush.is/hush/hush3 -cd hush3 -# Build -# This uses 3 build processes, you need 2GB of RAM for each. -./build.sh -j3 -``` - -## Build on Fedora: - -```sh -# install build dependencies -sudo dnf install make automake gcc gcc-c++ kernel-devel cmake libtool ncurses-devel patch -y -# clone git repo -git clone https://git.hush.is/hush/hush3 -cd hush3 -# Build -# This uses 3 build processes, you need 2GB of RAM for each. -./build.sh -j3 -``` - -### 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: - -``` -add-apt-repository ppa:ubuntu-toolchain-r/test && \ -apt update && \ -apt-get install -y gcc-7 g++-7 && \ - update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 60 && \ - update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 -``` - -### Build on Mac - -These instructions are a work in progress. Please report issues to https://hush.is/tg_support - -``` -sudo port update -sudo port upgrade outdated -sudo port install qt5 - -# clone git repo -git clone https://git.hush.is/hush/hush3 -cd hush3 -# Build -# This uses 3 build processes, you need 2GB of RAM for each. -./build.sh -j3 -``` - -## Run a HUSH Node - -After you have compiled Hush, then you can run it with the following command: - -```sh -./src/hushd -``` - -## Windows (cross-compiled on Linux) -Get dependencies: -```ssh -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 mingw-w64 cmake libsodium-dev -``` - -Downloading Git source repo, building and running Hush: - -```sh -# pull -git clone https://git.hush.is/hush/hush3 -cd hush -# Build -./build-win.sh -j$(nproc) -# Run a HUSH node -./src/hushd -``` - -## ARM Architecture - -Currently, any ARMv7 machine will not be able to build this repo, because the -underlying tech (zcash and the zksnark library) do not support that instruction -set. - -This also means that old RaspberryPi devices will not work, unless they have a -newer ARMv8-based Raspberry Pi. Raspberry Pi 4 and newer are known to work. diff --git a/Makefile.am b/Makefile.am index ace177a9d..216a1e1d0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -235,7 +235,7 @@ endif dist_bin_SCRIPTS = dist_noinst_SCRIPTS = autogen.sh util/build-debian-package.sh util/build.sh -EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.sh qa/pull-tester/run-bitcoin-cli qa/rpc-tests qa/hush $(DIST_DOCS) $(BIN_CHECKS) +EXTRA_DIST = $(top_srcdir)/util/genbuild.sh qa/pull-tester/rpc-tests.sh qa/pull-tester/run-bitcoin-cli qa/rpc-tests qa/hush $(DIST_DOCS) $(BIN_CHECKS) install-exec-hook: echo "We no longer install fetch-params!" diff --git a/README.md b/README.md index 2a2bd9431..ddfff9388 100644 --- a/README.md +++ b/README.md @@ -1,75 +1,195 @@ -# Hush +

+ +

-## What is Hush? +

-![Logo](doc/hush/hush.png "Logo") +| Introduction | Install | Compile | FAQ | Documentation | +| :---: | :---: | :---: | :---: | :---: | +| [What is Hush?](#what-is-hush) | [Windows 10 - Video Tutorial](#install-on-windows-10) | [Build on Debian or Ubuntu](#build-on-debian-or-ubuntu) | [Where can I buy Hush?](#where-can-i-buy-hush) | [Cross compiling Windows binaries](#windows-cross-compiled-on-linux) +| [Why not GitHub?](#banned-by-github) | [Build on Mac](#build-on-mac) | [Build on Arch](#build-on-arch) | [Can I mine with CPU or GPU?](#can-i-mine-with-cpu-or-gpu) | [Hush DevOps for pools and CEXs](https://git.hush.is/hush/docs/src/branch/master/advanced/devops.md) +| [What is HushChat?](#what-is-hushchat) | [Debian and Ubuntu](#installing-hush-binaries) | [Build on Fedora](#build-on-fedora) | [Claiming funds from old Hush wallets](https://git.hush.is/hush/hush3/src/branch/dev/doc/OLD_WALLETS.md) | [Earn Hush bounty](#earn-hush-bounty) +| [What is SilentDagon?](#what-is-silentdagon) | [Raspberry Pi](#install-on-arm-architecture) | [Build on Ubuntu 16.04 or older](#building-on-ubuntu-16-04-and-older-systems) | [Where can I spend Hush?](#where-can-i-spend-hush) | [Cross compiling from amd64 to arm64](https://git.hush.is/hush/docs/src/branch/master/advanced/cross-compile-hush-full-node-to-aarch64-with-docker.md) + +

+ +# What is Hush? Hush implements Extreme Privacy via blockchain tech. We have our own genesis block. We are not a chain fork (copy) of another coin. We are based on Bitcoin code, with sophisticated zero-knowledge mathematics added for privacy. This keeps your transaction metadata private! -### This repository +# What is this repository? This software is the Hush node and command-line client. It downloads and stores the entire history of Hush transactions; depending on the speed of your computer and network connection, it will likely take a few hours at least, but -some people report full nodes syncing in less than 1.5 hours. A competing privacy -coin takes over 24 hours to sync their full nodes because of Sprout Transactions, lulz. +some people report full nodes syncing in less than 1.5 hours. -### BANNED BY GITHUB +# Banned by GitHub 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 [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 +the impetus to completely leave that racist and censorship-loving platform. 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 domains should be assumed to be backdoored. **Hush is unfinished and highly experimental.** Use at your own risk! Just like Bitcoin. -## Installing +# Build on Debian or Ubuntu + +```sh +# install build dependencies +sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib \ + autoconf libtool ncurses-dev unzip git zlib1g-dev wget \ + bsdmainutils automake curl unzip nano libsodium-dev cmake +# clone git repo +git clone https://git.hush.is/hush/hush3 +cd hush3 +# Build +# This uses 3 build processes, you need 2GB of RAM for each. +./build.sh -j3 +``` +Video Tutorial: https://videos.hush.is/w/3kKQt81r7UUPWLHVuwK2BZ + +# Build on Arch + +```sh +# install build dependencies +sudo pacman -S gcc libsodium lib32-zlib unzip wget git python rust curl autoconf cmake +# clone git repo +git clone https://git.hush.is/hush/hush3 +cd hush3 +# Build +# This uses 3 build processes, you need 2GB of RAM for each. +./build.sh -j3 +``` + +# Build on Fedora + +```sh +# install build dependencies +sudo dnf install make automake gcc gcc-c++ kernel-devel cmake libtool ncurses-devel patch -y +# clone git repo +git clone https://git.hush.is/hush/hush3 +cd hush3 +# Build +# This uses 3 build processes, you need 2GB of RAM for each. +./build.sh -j3 +``` + +# Install on Windows 10 + +Video Tutorial: https://videos.hush.is/w/oGXff7of3EjmGENtDtYTUX + +# Install on ARM Architecture + +Use this if you have a Raspberry Pi or similar computer. Currently, any ARMv7 machine will not be able to build this repo, because the underlying tech (zcash and the zksnark library) do not support that instruction set. This also means that old RaspberryPi devices will not work, unless they have a newer ARMv8-based Raspberry Pi. Raspberry Pi 4 and newer are known to work. + +1. [Download the latest Debian package with the AARCH64 designation from the releases page](https://git.hush.is/hush/hush3/releases). +1. Install the Debian package, substituting "VERSION-NUMBER" for the version you have downloaded: `sudo dpkg -i hush-VERSION-NUMBER-aarch64.deb`. +1. Run with: `hushd`. + +# 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: + +``` +add-apt-repository ppa:ubuntu-toolchain-r/test && \ +apt update && \ +apt-get install -y gcc-7 g++-7 && \ + update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 60 && \ + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 +``` + +# Build on Mac + +``` +sudo port update +sudo port upgrade outdated +sudo port install qt5 + +# clone git repo +git clone https://git.hush.is/hush/hush3 +cd hush3 +# Build +# This uses 3 build processes, you need 2GB of RAM for each. +./build.sh -j3 +``` + +# Installing Hush binaries + +1. [Download the release](https://git.hush.is/hush/hush3/releases) with a .deb file extension. +1. Install the Debian package, substituting "VERSION-NUMBER" for the version you have downloaded: `sudo dpkg -i hush-VERSION-NUMBER-amd64.deb`. +1. Run with: `hushd`. + +# Windows (cross-compiled on Linux) +Get dependencies: +```ssh +sudo apt-get install \ + build-essential pkg-config libc6-dev m4 g++-multilib libdb++-dev \ + autoconf libtool ncurses-dev unzip git zip \ + zlib1g-dev wget bsdmainutils automake mingw-w64 cmake libsodium-dev +``` + +Downloading Git source repo, building and running Hush: + +```sh +# pull +git clone https://git.hush.is/hush/hush3 +cd hush3 +# Build +./util/build-win.sh -j$(nproc) +# Run a HUSH node +./src/hushd +``` + +# Official Explorers + +The links for the Official Hush explorers: + * [explorer.hush.is](https://explorer.hush.is) + * [explorer.hush.land](https://explorer.hush.land) + +# What is SilentDragon? -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: +* [SilentDragon](https://git.hush.is/hush/SilentDragon) is a desktop wallet for HUSH full node.
+* [SilentDragonLite](https://git.hush.is/hush/SilentDragonLite) is a desktop wallet that does not require you to download the full blockchain. +* [SilentDragonAndroid](https://git.hush.is/hush/SilentDragonAndroid) is a wallet for Android devices. +* [SilentDragonPaper](https://git.hush.is/hush/SilentDragonPaper) is a paper wallet generator that can be run completely offline. -* 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 +# What is HushChat? -### Claiming Funds From Old Hush Wallets +HushChat is a protocol inspired by the design of Signal Protocol, it uses many of the same cryptography and ideas, but does not actually use any code from Signal. Signal requires phone numbers and is a centralized service. HushChat is completely anonymous and decentralized and requires absolutely no metadata be given to any centralized third parties. -If you have an older wallet, then refer to [OLD_WALLETS.md](OLD_WALLETS.md). +# Can I mine with CPU or GPU? -### Official Explorers +Hush cannot be efficiently mined with CPU or GPU, only ASIC mining is recommended. HUSH uses Equihash (200,9) algo, as does Zcash, Horizen or Komodo. -The links for the Official Hush explorers: - * [explorer.hush.is](https://explorer.hush.is) - * [explorer.hush.land](https://explorer.hush.land) +# Where can I buy Hush? + +1. https://nonkyc.io/market/HUSH_BTC +1. https://tradeogre.com/exchange/BTC-HUSH + +# Where can I spend Hush? -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. +AgoraX market (in progress) -### For system admins +# Earn Hush bounty -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. +Developers can earn bounty by fixing bugs or solving feature requests listed in `Issues->Label`: +- https://git.hush.is/hush/hush3/issues +- https://git.hush.is/hush/SilentDragon/issues +- https://git.hush.is/hush/SilentDragonLite/issues -## Support and Socials +![Logo](doc/hush/earnhush.png "Hush Bounty") -Please feel free to join us on Telegram for official support: -* Main group: https://hush.is/tg -* Support group: https://hush.is/telegram_support -* Mining group: https://hush.is/telegram_mining +# Support and Socials -Other socials: -* Twitter: @hushisprivacy -* Matrix: @hush_main:meowchat.xyz -* PeerTube videos.hush.is -* Reddit @Myhush -* Mastodon @myhushteam@fosstodon.org +* Telegram: [https://hush.is/tg](https://hush.is/tg) +* Matrix: [https://hush.is/matrix](https://hush.is/matrix) +* Twitter: [https://hush.is/twitter](https://hush.is/twitter) +* PeerTube [https://hush.is/peertube](https://hush.is/peertube) -## License +# License -For license information see the file [COPYING](COPYING). +For license information see the file [COPYING](COPYING). \ No newline at end of file diff --git a/antispam b/antispam deleted file mode 100755 index 143c8ef32..000000000 --- a/antispam +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -echo "./src/hush-cli -ac_name=ANTISPAM $@" -./src/hush-cli -ac_name=ANTISPAM "$@" diff --git a/code_of_conduct.md b/code_of_conduct.md deleted file mode 100644 index 3c8ae50a3..000000000 --- a/code_of_conduct.md +++ /dev/null @@ -1,8 +0,0 @@ -# Contributor Code of Conduct - -As contributors and maintainers of this project, and in the interest of -fostering an open and welcoming community, we pledge to respect all people who -contribute through reporting issues, posting feature requests, updating -documentation, submitting pull requests or patches, and other activities. - -Don't be an asshole. diff --git a/contrib/dragonx_scanner b/contrib/dragonx_scanner index 4f97d8da4..8e11610ae 100755 --- a/contrib/dragonx_scanner +++ b/contrib/dragonx_scanner @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2024 The Hush developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/contrib/seeds/README.md b/contrib/seeds/README.md index 06035bb72..10948e1b4 100644 --- a/contrib/seeds/README.md +++ b/contrib/seeds/README.md @@ -5,6 +5,6 @@ Utility to generate the seeds.txt list that is compiled into the client ## 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. +Update [contrib/seeds/nodes_main.txt](hush/hush3/src/branch/master/contrib/seeds/nodes_main.txt) and run `make seeds` in the hush root directory of this repo (not the directory of this README) to update [src/chainparamsseeds.h](hush/hush3/src/branch/master/src/chainparamsseeds.h) then commit the result. diff --git a/contrib/seeds/nodes_main.txt b/contrib/seeds/nodes_main.txt index 0d5e68fd4..2fc59ec5e 100644 --- a/contrib/seeds/nodes_main.txt +++ b/contrib/seeds/nodes_main.txt @@ -1,5 +1,5 @@ # node1.hush.land -185.241.61.43 +91.208.127.81 # node2.hush.land 87.251.76.166 @@ -10,8 +10,8 @@ # node4.hush.land 87.251.76.33 -# node2.hush.is -137.74.4.198 +# node5.hush.land +178.250.189.141 # lite.hushpool.is 149.28.102.219 @@ -32,4 +32,4 @@ hushv3xvheqh42ms3ld2nh555muscietkib7gycb7s4psbrjsysfywqd.onion 2a0c:b641:6f1:c::2 # i2p -iljqq7nnmw2ij2ezl334cerwwmgzmmbmoc3n4saditd2xhi3xohq.b32.i2p +7oumuppuzgbzlkahavx7qrtjnvbhkixjqdmeg7f6fhndgfhz7mlq.b32.i2p diff --git a/depends/packages/wolfssl.mk b/depends/packages/wolfssl.mk index 1f5b36a64..44cdec866 100644 --- a/depends/packages/wolfssl.mk +++ b/depends/packages/wolfssl.mk @@ -1,13 +1,17 @@ package=wolfssl + +ifeq ($(host_os),mingw32) +$(package)_version=4.8.1 +$(package)_file_name=wolfssl-$($(package)_version).tar.gz +$(package)_sha256_hash=50db45f348f47e00c93dd244c24108220120cb3cc9d01434789229c32937c444 +else $(package)_version=5.2.0 -$(package)_download_path=https://github.com/wolfSSL/wolfssl/archive -$(package)_download_file=v$($(package)_version)-stable.tar.gz $(package)_file_name=wolfssl-$($(package)_version).tar.gz -#$(package)_sha256_hash=b0e740b31d4d877d540ad50cc539a8873fc41af02bd3091c4357b403f7106e31 -#$(package)_sha256_hash=72c22efcdab0f18f9b0bb45621c213144f88b4a9e9b9cc06878b47744e058885 -#$(package)_sha256_hash=c34b74b5f689fac7becb05583b044e84d3b10d39f38709f0095dd5d423ded67f -#$(package)_sha256_hash=908390282cc613a3943533f3d922b3c18dee3289f498b6f944cb86a19a5eeb56 $(package)_sha256_hash=409b4646c5f54f642de0e9f3544c3b83de7238134f5b1ff93fb44527bf119d05 +endif + +$(package)_download_path=https://github.com/wolfSSL/wolfssl/archive +$(package)_download_file=v$($(package)_version)-stable.tar.gz define $(package)_set_vars $(package)_config_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)" diff --git a/CONTRIBUTING.md b/doc/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to doc/CONTRIBUTING.md diff --git a/DEVELOPING.md b/doc/DEVELOPING.md similarity index 100% rename from DEVELOPING.md rename to doc/DEVELOPING.md diff --git a/OLD_WALLETS.md b/doc/OLD_WALLETS.md similarity index 100% rename from OLD_WALLETS.md rename to doc/OLD_WALLETS.md diff --git a/SECURITY.md b/doc/SECURITY.md similarity index 100% rename from SECURITY.md rename to doc/SECURITY.md diff --git a/doc/developer-notes.md b/doc/developer-notes.md index df090cd05..e83a92145 100644 --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -18,8 +18,8 @@ git checkout dev Then install needed dependencies. This is different on each OS as well as older or newer systems. See https://git.hush.is/hush/hush3/src/branch/dev/INSTALL.md for -details on installing dependencies. If you are using a recent-ish Linux distro, this -is probably what you need: +details on installing dependencies. If you are using a recent-ish Ubuntu or Debian Linux +distro, this is probably what you need: ``` # install build dependencies diff --git a/doc/hsc.md b/doc/hsc.md index 3ff3bc263..1636419b6 100644 --- a/doc/hsc.md +++ b/doc/hsc.md @@ -1,10 +1,10 @@ -# Hush Smart Chains +# Hush Arrakis Chains An overview of HSCs can be found here: https://git.hush.is/hush/hush-smart-chains -Hush Smart Chains allow you to create a privacy coin with no custom C++ code, just running one command! +Hush Arrakis Chains allow you to create a privacy coin with no custom C++ code, just running one command! The new coin that is created can use either Equihash PoW (ASIC or GPU) or RandomX PoW (CPU). ## HSC Creator @@ -13,7 +13,7 @@ https://git.hush.is/hush/hsc-creator with its site https://hush.is/hsc-creator ## HSC HOWTO -https://git.hush.is/onryo/hush-smart-chain-how-to +https://git.hush.is/onryo/hush-arrakis-chain-how-to ## HSC CLI diff --git a/doc/hush/earnhush.png b/doc/hush/earnhush.png new file mode 100644 index 000000000..9437fb259 Binary files /dev/null and b/doc/hush/earnhush.png differ diff --git a/doc/hush/hush0.png b/doc/hush/hush0.png new file mode 100644 index 000000000..32f77375d Binary files /dev/null and b/doc/hush/hush0.png differ diff --git a/doc/i2p.md b/doc/i2p.md index 583f9ddb2..8cc3a6557 100644 --- a/doc/i2p.md +++ b/doc/i2p.md @@ -96,38 +96,6 @@ 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 @@ -135,6 +103,7 @@ 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`) +- in the i2p/i2pd web console under "SAM Sessions" To see which I2P peers your node is connected to, use `hush-cli -netinfo 4` or the `getpeerinfo` RPC (e.g. `hush-cli getpeerinfo`). diff --git a/doc/man/hush-cli.1 b/doc/man/hush-cli.1 index c2e81580b..bab9652d0 100644 --- a/doc/man/hush-cli.1 +++ b/doc/man/hush-cli.1 @@ -1,9 +1,9 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13. -.TH HUSH-CLI "1" "January 2024" "hush-cli v3.10.1" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. +.TH HUSH-CLI "1" "February 2024" "hush-cli v3.10.2" "User Commands" .SH NAME -hush-cli \- manual page for hush-cli v3.10.1 +hush-cli \- manual page for hush-cli v3.10.2 .SH DESCRIPTION -Hush RPC client version v3.10.1\-05ee31891\-dirty +Hush RPC client version v3.10.2\-138cd7ab6 .PP In order to ensure you are adequately protecting your privacy when using Hush, please see . diff --git a/doc/man/hush-tx.1 b/doc/man/hush-tx.1 index 5c1867b46..69b6f9477 100644 --- a/doc/man/hush-tx.1 +++ b/doc/man/hush-tx.1 @@ -1,9 +1,9 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13. -.TH HUSH-TX "1" "January 2024" "hush-tx v3.10.1" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. +.TH HUSH-TX "1" "February 2024" "hush-tx v3.10.2" "User Commands" .SH NAME -hush-tx \- manual page for hush-tx v3.10.1 +hush-tx \- manual page for hush-tx v3.10.2 .SH DESCRIPTION -hush\-tx utility version v3.10.1\-05ee31891\-dirty +hush\-tx utility version v3.10.2\-138cd7ab6 .SS "Usage:" .TP hush\-tx [options] [commands] diff --git a/doc/man/hushd.1 b/doc/man/hushd.1 index 2f6fe2d2a..4164550cc 100644 --- a/doc/man/hushd.1 +++ b/doc/man/hushd.1 @@ -1,9 +1,9 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13. -.TH HUSHD "1" "January 2024" "hushd v3.10.1" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. +.TH HUSHD "1" "February 2024" "hushd v3.10.2" "User Commands" .SH NAME -hushd \- manual page for hushd v3.10.1 +hushd \- manual page for hushd v3.10.2 .SH DESCRIPTION -Hush Daemon version v3.10.1\-05ee31891\-dirty +Hush Daemon version v3.10.2\-138cd7ab6 .PP In order to ensure you are adequately protecting your privacy when using Hush, please see . @@ -78,7 +78,7 @@ applied) .HP \fB\-par=\fR .IP -Set the number of script verification threads (\fB\-8\fR to 16, 0 = auto, <0 = +Set the number of script verification threads (\fB\-12\fR to 16, 0 = auto, <0 = leave that many cores free, default: 0) .HP \fB\-pid=\fR @@ -659,7 +659,7 @@ 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: +Hush Arrakis Chain options: .HP \fB\-ac_algo\fR .IP @@ -670,10 +670,6 @@ Equihash (200,9) .IP Block time in seconds, default is 60 .HP -\fB\-ac_cc\fR -.IP -Cryptoconditions, default 0 -.HP \fB\-ac_beam\fR .IP BEAM integration @@ -682,18 +678,6 @@ BEAM integration .IP CODA integration .HP -\fB\-ac_cclib\fR -.IP -Cryptoconditions dynamicly loadable library -.HP -\fB\-ac_ccenable\fR -.IP -Cryptoconditions to enable -.HP -\fB\-ac_ccactivate\fR -.IP -Block height to enable Cryptoconditions -.HP \fB\-ac_decay\fR .IP Percentage of block reward decrease at each halving @@ -751,10 +735,6 @@ default is 64 .IP Block reward in satoshis, default is 0 .HP -\fB\-ac_sapling\fR -.IP -Sapling activation block height -.HP \fB\-ac_script\fR .IP P2SH/multisig address to receive founders rewards diff --git a/doc/randomx.md b/doc/randomx.md index a690ded2b..1075c8890 100644 --- a/doc/randomx.md +++ b/doc/randomx.md @@ -1,9 +1,9 @@ # RandomX -Hush Smart Chains support using RandomX as a Proof-Of-Work algorithm as of release 3.9.2 . +Hush Arrakis Chains support using RandomX as a Proof-Of-Work algorithm as of release 3.9.2 . This means you can now launch a privacy coin with Hush tech that can be mined with a CPU instead of requiring an ASIC or GPU. RandomX is the same algorithm that Monero (XMR) and -various other cryptocoins use. As far as we know, Hush Smart Chains are the first coins +various other cryptocoins use. As far as we know, Hush Arrakis Chains are the first coins based on Zcash Protocol that can use the RandomX PoW algorithm. Many thanks to all the people who helped make this possible. @@ -13,12 +13,12 @@ The following command can be used to launch an HSC on a single computer. Each op HSC CLI arguments that start with `-ac_` means they *Affect Consensus*. ``` -./src/hush-smart-chain -ac_halving=100 -ac_algo=randomx -ac_name=RANDOMX -ac_private=1 -ac_blocktime=15 -ac_reward=500000000 -ac_supply=55555 -gen=1 -genproclimit=1 -testnode=1 +./src/hush-arrakis-chain -ac_halving=100 -ac_algo=randomx -ac_name=RANDOMX -ac_private=1 -ac_blocktime=15 -ac_reward=500000000 -ac_supply=55555 -gen=1 -genproclimit=1 -testnode=1 ``` - * `hush-smart-chain` is the script used to launch or connect to HSCs + * `hush-arrakis-chain` is the script used to launch or connect to HSCs * It lives in the `./src` directory, next to `hushd` and `hush-cli` - * It is called `hush-smart-chain.bat` on Windows + * It is called `hush-arrakis-chain.bat` on Windows * `-ac_halving=100` means "the block reward halves every 100 blocks" * `-ac_algo=randomx` means "use RandomX for Proof-Of-Work * The default is Equihash (200,9) @@ -41,12 +41,12 @@ HSC CLI arguments that start with `-ac_` means they *Affect Consensus*. * One node would use ``` # first node -./src/hush-smart-chain -ac_halving=100 -ac_algo=randomx -ac_name=RANDOMX -ac_private=1 -ac_blocktime=15 -ac_reward=500000000 -ac_supply=55555 +./src/hush-arrakis-chain -ac_halving=100 -ac_algo=randomx -ac_name=RANDOMX -ac_private=1 -ac_blocktime=15 -ac_reward=500000000 -ac_supply=55555 ``` * And the second node would use: ``` # mining node. NOTE: This node will mine the genesis block and pre-mine, if any -./src/hush-smart-chain -ac_halving=100 -ac_algo=randomx -ac_name=RANDOMX -ac_private=1 -ac_blocktime=15 -ac_reward=500000000 -ac_supply=55555 -gen=1 -genproclimit=1 +./src/hush-arrakis-chain -ac_halving=100 -ac_algo=randomx -ac_name=RANDOMX -ac_private=1 -ac_blocktime=15 -ac_reward=500000000 -ac_supply=55555 -gen=1 -genproclimit=1 ``` # Advanced Options @@ -67,7 +67,7 @@ HUSH RandomX currently has two advanced options that some may want to use: This section is not required reading if you just want to use it as a PoW algorithm for an HSC. Here we will explain how the internals of RandomX works inside of the Hush codebase. -We use the official RandomX implementation from https://github.com/tevador/RandomX with custom configuration options. If some type of hardware is created to mine the XMR RandomX algorithm, it will not be compatible with the Hush RandomX algorithm. This is by design. All Hush Smart Chains use the same RandomX config options, so if a hardware device is created to mine one HSC that uses RandomX, it can be used to mine any HSC using RandomX. Every HSC with unique consensus parameters will start off with it's own unique key block with at least 9 bytes of entropy. +We use the official RandomX implementation from https://github.com/tevador/RandomX with custom configuration options. If some type of hardware is created to mine the XMR RandomX algorithm, it will not be compatible with the Hush RandomX algorithm. This is by design. All Hush Arrakis Chains use the same RandomX config options, so if a hardware device is created to mine one HSC that uses RandomX, it can be used to mine any HSC using RandomX. Every HSC with unique consensus parameters will start off with it's own unique key block with at least 9 bytes of entropy. The source code of RandomX is embedded in the Hush source code at `./src/RandomX` and the configuration options used are at `./src/RandomX/src/configuration.h` . diff --git a/doc/relnotes/README.md b/doc/relnotes/README.md index fddc5344f..89d526429 100644 --- a/doc/relnotes/README.md +++ b/doc/relnotes/README.md @@ -12,16 +12,36 @@ evil organizations. # Hush 3.10.2 "Fiendish Fenrir" - * Update to wolfssl 5.2.0: https://git.hush.is/hush/hush3/issues/380. - * Delete cryptoconditions: https://git.hush.is/hush/hush3/issues/381. - * Better error message: https://git.hush.is/hush/hush3/commit/f64c10baa9ae6940f434f6ff6750b299c1da548e, https://git.hush.is/hush/hush3/commit/f71f8124c3ffb8df6d83f6fd00201cb11aa0f239. - * Improve hush_scanner and seed node contrib file: https://git.hush.is/hush/hush3/commit/16dd3aef74ac312bc8953af34a3d9a297b03d9f4. - * Remove unused Makefile: https://git.hush.is/hush/hush3/issues/291. - * Add script for scanning DragonX nodes: https://git.hush.is/hush/hush3/commit/0679468f609215a0958a95edc70643108ee6530a. - * Add Fedora install process: https://git.hush.is/hush/hush3/pulls/384. - * More details about p2p encryption: https://git.hush.is/hush/hush3/commit/ccc86839b9774934882fec4cbf3428003cf75fd5, https://git.hush.is/hush/hush3/commit/a358acab0b1a589cebc45846ab54f7fa751c4820, https://git.hush.is/hush/hush3/commit/4ed576a7e256abb46e15d8f3606dc30ac276d461. - * Fix boost download link: https://git.hush.is/hush/hush3/commit/323d2134a1fcc119a4da82f9fc37e912b67e58c6. - * Remove unused code. + * RandomX mining is faster for various reasons + * Large page support is enabled (needs to be enabled at OS level to be used) + * This can lead to a 1-2% speed increase in mining depending on RAM and CPU + * Various small optimizations such as making some variables static or const + and removing unnecessary conditionals + * Mining now starts faster because instead of only using 2 threads to prepare + data needed to mine, now it uses all physical cores https://git.hush.is/hush/hush3/commit/1b5422eb2ddcedd9aabdf4f039144f9eef5c6f95 + * RandomX mining takes slightly less memory + * `ac_sapling` is no longer an option for Arrakis Chains + * All chains enable Sapling at height 1 like Hush + DragonX + * This means there is no need to call `NetworkUpgradeActive` on every block height + which means syncing is faster + * Delete cryptoconditions: https://git.hush.is/hush/hush3/issues/381 + * This means Hush+DragonX full nodes take up a lot less memory and binaries are smaller + * It also means syncing, rescanning and compiling is faster + * CLI options related to CryptoConditions ( `-ac_cc -ac_cclib -ac_ccenable -ac_ccactivate) have been removed + * Upgraded WolfSSL to 5.2.0 on Linux+Mac : https://git.hush.is/hush/hush3/issues/380 + * Upgraded to 4.8.1 on Windows because newer versions do not compile on Windows: https://git.hush.is/hush/hush3/commit/5e5a15018d0e55f094c89282a1983104f4d4387a + * Only Hush + DragonX will automatically connect to various seed nodes https://git.hush.is/hush/hush3/issues/379 + * Other Arrakis Chains must opt-in via -connect or -addnode + * Updated i2p seed node: https://git.hush.is/hush/hush3/commit/8c8b6e88f0c076c86c713e7e22e2d826202cc64d + * Better error message: https://git.hush.is/hush/hush3/commit/f64c10baa9ae6940f434f6ff6750b299c1da548e, https://git.hush.is/hush/hush3/commit/f71f8124c3ffb8df6d83f6fd00201cb11aa0f239 + * Improve `hush_scanner` and seed node contrib file: https://git.hush.is/hush/hush3/commit/16dd3aef74ac312bc8953af34a3d9a297b03d9f4 + * Remove unused Makefile: https://git.hush.is/hush/hush3/issues/291 + * Add script for scanning DragonX nodes: https://git.hush.is/hush/hush3/commit/0679468f609215a0958a95edc70643108ee6530a + * Add Fedora install process: https://git.hush.is/hush/hush3/pulls/384 + * Add Arch install process: https://git.hush.is/hush/hush3/pulls/393 + * More details about p2p encryption: https://git.hush.is/hush/hush3/commit/ccc86839b9774934882fec4cbf3428003cf75fd5, https://git.hush.is/hush/hush3/commit/a358acab0b1a589cebc45846ab54f7fa751c4820, https://git.hush.is/hush/hush3/commit/4ed576a7e256abb46e15d8f3606dc30ac276d461 + * Fix boost download link: https://git.hush.is/hush/hush3/commit/323d2134a1fcc119a4da82f9fc37e912b67e58c6 + * Remove unused code # Hush 3.10.1 "Oneiric Octopus" diff --git a/migratecoin.sh b/migratecoin.sh deleted file mode 100644 index a4b05f417..000000000 --- a/migratecoin.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/usr/bin/env bash -# Copyright (c) 2016-2024 The Hush developers -# Distributed under the GPLv3 software license, see the accompanying -# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html -# This script makes the neccesary transactions to migrate -# coin between 2 assetchains on the same -ac_cc id -set -e -source=DERPZ -target=DERPZ000 -address="Rxxx" -amount=1 - -# Alias for running cli on source chain -cli_source="hush-cli -ac_name=$source" - -# Raw tx that we will work with -txraw=`$cli_source createrawtransaction "[]" "{\"$address\":$amount}"` - -# Convert to an export tx -exportData=`$cli_source migrate_converttoexport $txraw $target $amount` -exportRaw=`echo $exportData | jq -r .exportTx` -exportPayouts=`echo $exportData | jq -r .payouts` - -# Fund -exportFundedData=`$cli_source fundrawtransaction $exportRaw` -exportFundedTx=`echo $exportFundedData | jq -r .hex` - -# Sign -exportSignedData=`$cli_source signrawtransaction $exportFundedTx` -exportSignedTx=`echo $exportSignedData | jq -r .hex` - -# Send -echo "Sending export tx" -$cli_source sendrawtransaction $exportSignedTx - -read -p "Wait for a notarization to HUSH, and then two more notarizations from the target chain, and then press enter to continue" - -# Create import -importTx=`$cli_source migrate_createimporttransaction $exportSignedTx $payouts` -importTx=`hush-cli migrate_completeimporttransaction $importTx` - -# Send import -hush-cli -ac_name=$target sendrawtransaction $importTx diff --git a/qa/hush/create_benchmark_archive.py b/qa/hush/create_benchmark_archive.py index 612d5bcad..15994b1a6 100644 --- a/qa/hush/create_benchmark_archive.py +++ b/qa/hush/create_benchmark_archive.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python2 # Copyright (c) 2016-2024 The Hush developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/test_framework/authproxy.py b/qa/rpc-tests/test_framework/authproxy.py index 158fc04e9..366140aab 100644 --- a/qa/rpc-tests/test_framework/authproxy.py +++ b/qa/rpc-tests/test_framework/authproxy.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python2 # Copyright (c) 2016-2024 The Hush developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/test_framework/bignum.py b/qa/rpc-tests/test_framework/bignum.py index f77bc2226..de5bf3f0e 100644 --- a/qa/rpc-tests/test_framework/bignum.py +++ b/qa/rpc-tests/test_framework/bignum.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python2 # Copyright (c) 2016-2024 The Hush developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/test_framework/blockstore.py b/qa/rpc-tests/test_framework/blockstore.py index e1ecf7648..5a3e911e2 100644 --- a/qa/rpc-tests/test_framework/blockstore.py +++ b/qa/rpc-tests/test_framework/blockstore.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python2 # Copyright (c) 2016-2024 The Hush developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/test_framework/blocktools.py b/qa/rpc-tests/test_framework/blocktools.py index 5e87321ec..6f111f3bf 100644 --- a/qa/rpc-tests/test_framework/blocktools.py +++ b/qa/rpc-tests/test_framework/blocktools.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python2 # Copyright (c) 2016-2024 The Hush developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/test_framework/equihash.py b/qa/rpc-tests/test_framework/equihash.py index c19b24217..7a182274d 100755 --- a/qa/rpc-tests/test_framework/equihash.py +++ b/qa/rpc-tests/test_framework/equihash.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python2 # Copyright (c) 2016-2024 The Hush developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/test_framework/mininode.py b/qa/rpc-tests/test_framework/mininode.py index 4a7624cc8..69120e5b8 100755 --- a/qa/rpc-tests/test_framework/mininode.py +++ b/qa/rpc-tests/test_framework/mininode.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python2 # Copyright (c) 2016-2024 The Hush developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/test_framework/script.py b/qa/rpc-tests/test_framework/script.py index 67a868cf6..29ac60ab7 100644 --- a/qa/rpc-tests/test_framework/script.py +++ b/qa/rpc-tests/test_framework/script.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python2 # Copyright (c) 2016-2024 The Hush developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/rpc-tests/test_framework/socks5.py b/qa/rpc-tests/test_framework/socks5.py index 36e2d66b3..16a2d4cbe 100644 --- a/qa/rpc-tests/test_framework/socks5.py +++ b/qa/rpc-tests/test_framework/socks5.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python2 # Copyright (c) 2016-2024 The Hush developers # Copyright (c) 2015 The Bitcoin Core developers # Distributed under the GPLv3 software license, see the accompanying diff --git a/qa/rpc-tests/test_framework/test_framework.py b/qa/rpc-tests/test_framework/test_framework.py index ff9cfaea6..273d9c6bf 100755 --- a/qa/rpc-tests/test_framework/test_framework.py +++ b/qa/rpc-tests/test_framework/test_framework.py @@ -162,10 +162,10 @@ class ComparisonTestFramework(BitcoinTestFramework): def add_options(self, parser): parser.add_option("--testbinary", dest="testbinary", - default=os.getenv("BITCOIND", "hush-smart-chain"), + default=os.getenv("BITCOIND", "hush-arrakis-chain"), help="bitcoind binary to test") parser.add_option("--refbinary", dest="refbinary", - default=os.getenv("BITCOIND", "hush-smart-chain"), + default=os.getenv("BITCOIND", "hush-arrakis-chain"), help="bitcoind binary to use for reference nodes (if any)") def setup_chain(self): diff --git a/src/Makefile.am b/src/Makefile.am index 846c941fb..d6ed7eb41 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -251,7 +251,7 @@ LIBHUSH_H = \ obj/build.h: FORCE @$(MKDIR_P) $(builddir)/obj - @$(top_srcdir)/share/genbuild.sh $(abs_top_builddir)/src/obj/build.h \ + @$(top_srcdir)/util/genbuild.sh $(abs_top_builddir)/src/obj/build.h \ $(abs_top_srcdir) libbitcoin_util_a-clientversion.$(OBJEXT): obj/build.h diff --git a/src/cc/CCcustom.cpp b/src/cc/CCcustom.cpp index 8a30feadf..a98851afc 100644 --- a/src/cc/CCcustom.cpp +++ b/src/cc/CCcustom.cpp @@ -19,11 +19,6 @@ #include "key_io.h" #include "CCinclude.h" -int32_t CClib_initcp(struct CCcontract_info *cp,uint8_t evalcode) -{ - return(-1); -} - struct CCcontract_info *CCinit(struct CCcontract_info *cp, uint8_t evalcode) { return(cp); diff --git a/src/cc/CCinclude.h b/src/cc/CCinclude.h index fb9ac7c47..29cc60d6c 100644 --- a/src/cc/CCinclude.h +++ b/src/cc/CCinclude.h @@ -216,7 +216,6 @@ int32_t CCgetspenttxid(uint256 &spenttxid,int32_t &vini,int32_t &height,uint256 /// @private UniValue CClib(struct CCcontract_info *cp,char *method,char *jsonstr); -UniValue CClib_info(struct CCcontract_info *cp); static const uint256 zeroid; //!< null uint256 constant @@ -430,67 +429,6 @@ void CCaddr3set(struct CCcontract_info *cp,uint8_t evalcode,CPubKey pk,uint8_t * /// @see GetCCaddress1of2 void CCaddr1of2set(struct CCcontract_info *cp, CPubKey pk1, CPubKey pk2,uint8_t *priv,char *coinaddr); -/// Creates a token transaction output with a cryptocondition that allows to spend it by one key. -/// The resulting vout will have two eval codes (EVAL_TOKENS and evalcode parameter value). -/// The returned output should be added to a transaction vout array. -/// @param evalcode cryptocondition eval code (transactions with this eval code in cc inputs will be forwarded to the contract associated with this eval code) -/// @param nValue value of the output in satoshi -/// @param pk pubkey to spend the cc -/// @returns vout object -/// @see CCinit -/// @see CCcontract_info -CTxOut MakeTokensCC1vout(uint8_t evalcode, CAmount nValue, CPubKey pk); - -/// Another MakeTokensCC1vout overloaded function that creates a token transaction output with a cryptocondition with two eval codes that allows to spend it by one key. -/// Resulting vout will have three eval codes (EVAL_TOKENS, evalcode and evalcode2 parameter values). -/// The returned output should be added to a transaction vout array. -/// @param evalcode cryptocondition eval code (transactions with this eval code in cc inputs will be forwarded to the contract associated with this eval code) -/// @param evalcode2 yet another cryptocondition eval code (transactions with this eval code in cc inputs will be forwarded to the contract associated with this eval code) -/// @param nValue value of the output in satoshi -/// @param pk pubkey to spend the cc -/// @returns vout object -/// @see CCinit -/// @see CCcontract_info -CTxOut MakeTokensCC1vout(uint8_t evalcode, uint8_t evalcode2, CAmount nValue, CPubKey pk); - -/// MakeTokensCC1of2vout creates a token transaction output with a 1of2 cryptocondition that allows to spend it by either of two keys. -/// The resulting vout will have two eval codes (EVAL_TOKENS and evalcode parameter value). -/// The returned output should be added to a transaction vout array. -/// @param evalcode cryptocondition eval code (transactions with this eval code in cc inputs will be forwarded to the contract associated with this eval code) -/// @param nValue value of the output in satoshi -/// @param pk1 one of two pubkeys to spend the cc -/// @param pk2 second of two pubkeys to spend the cc -/// @returns vout object -/// @see CCinit -/// @see CCcontract_info -CTxOut MakeTokensCC1of2vout(uint8_t evalcode, CAmount nValue, CPubKey pk1, CPubKey pk2); - -/// Another overload of MakeTokensCC1of2vout creates a token transaction output with a 1of2 cryptocondition with two eval codes that allows to spend it by either of two keys. -/// The resulting vout will have three eval codes (EVAL_TOKENS, evalcode and evalcode2 parameter values). -/// The returned output should be added to a transaction vout array. -/// @param evalcode cryptocondition eval code (transactions with this eval code in cc inputs will be forwarded to the contract associated with this eval code) -/// @param evalcode2 yet another cryptocondition eval code (transactions with this eval code in cc inputs will be forwarded to the contract associated with this eval code) -/// @param nValue value of the output in satoshi -/// @param pk1 one of two pubkeys to spend the cc -/// @param pk2 second of two pubkeys to spend the cc -/// @returns vout object -/// @see CCinit -/// @see CCcontract_info -CTxOut MakeTokensCC1of2vout(uint8_t evalcode, uint8_t evalcode2, CAmount nValue, CPubKey pk1, CPubKey pk2); - -/// Gets adddress for token cryptocondition vout -/// @param cp CCcontract_info structure initialized with EVAL_TOKENS eval code -/// @param[out] destaddr retrieved address -/// @param pk public key to create the cryptocondition -bool GetTokensCCaddress(struct CCcontract_info *cp, char *destaddr, CPubKey pk); - -/// Gets adddress for token 1of2 cc vout -/// @param cp CCcontract_info structure initialized with EVAL_TOKENS eval code -/// @param[out] destaddr retrieved address -/// @param pk first public key to create the cryptocondition -/// @param pk2 second public key to create the cryptocondition -bool GetTokensCCaddress1of2(struct CCcontract_info *cp, char *destaddr, CPubKey pk, CPubKey pk2); - /// CCaddrTokens1of2set sets pubkeys, private key and cc addr for spending from 1of2 token cryptocondition vout /// @param cp contract info structure where the private key is set /// @param pk1 one of the two public keys of the 1of2 cc @@ -501,9 +439,6 @@ bool GetTokensCCaddress1of2(struct CCcontract_info *cp, char *destaddr, CPubKey /// @see CCcontract_info void CCaddrTokens1of2set(struct CCcontract_info *cp, CPubKey pk1, CPubKey pk2, uint8_t *priv, char *coinaddr); -/// @private -int32_t CClib_initcp(struct CCcontract_info *cp,uint8_t evalcode); - /// IsCCInput checks if scriptSig object contains a cryptocondition /// @param scriptSig scriptSig object with a cryptocondition /// @returns true if the scriptSig object contains a cryptocondition diff --git a/src/cc/CCutils.cpp b/src/cc/CCutils.cpp index a96fe02de..e46793288 100644 --- a/src/cc/CCutils.cpp +++ b/src/cc/CCutils.cpp @@ -456,6 +456,4 @@ int64_t TotalPubkeyCCInputs(const CTransaction &tx, const CPubKey &pubkey) return total; } -extern struct CCcontract_info CCinfos[0x100]; extern std::string MYCCLIBNAME; -bool CClib_validate(struct CCcontract_info *cp,int32_t height,Eval *eval,const CTransaction tx,unsigned int nIn); diff --git a/src/cc/cclib.cpp b/src/cc/cclib.cpp index 695ecc91f..cf0dfcfe2 100644 --- a/src/cc/cclib.cpp +++ b/src/cc/cclib.cpp @@ -40,70 +40,6 @@ extern std::string MYCCLIBNAME; char *CClib_name() { return((char *)MYCCLIBNAME.c_str()); } -struct CClib_rpcinfo -{ - char *CCname,*method,*help; - int32_t numrequiredargs,maxargs; - uint8_t funcid,evalcode; -} - -CClib_methods[] = -{ - { (char *)"faucet2", (char *)"fund", (char *)"amount", 1, 1, 'F', EVAL_FAUCET2 }, - { (char *)"faucet2", (char *)"get", (char *)"", 0, 0, 'G', EVAL_FAUCET2 }, -#ifdef BUILD_CUSTOMCC - RPC_FUNCS -#endif -}; - -std::string CClib_rawtxgen(struct CCcontract_info *cp,uint8_t funcid,cJSON *params); - -cJSON *cclib_reparse(int32_t *nump,char *jsonstr) // assumes origparams will be freed by caller -{ - cJSON *params; char *newstr; int32_t i,j; - *nump = 0; - if ( jsonstr != 0 ) - { - if ( jsonstr[0] == '"' && jsonstr[strlen(jsonstr)-1] == '"' ) - { - jsonstr[strlen(jsonstr)-1] = 0; - jsonstr++; - } - newstr = (char *)malloc(strlen(jsonstr)+1); - for (i=j=0; jsonstr[i]!=0; i++) - { - if ( jsonstr[i] == '%' && jsonstr[i+1] == '2' && jsonstr[i+2] == '2' ) - { - newstr[j++] = '"'; - i += 2; - } - else if ( jsonstr[i] == '\'' ) - newstr[j++] = '"'; - else newstr[j++] = jsonstr[i]; - } - newstr[j] = 0; - params = cJSON_Parse(newstr); - if ( 0 && params != 0 ) - printf("new.(%s) -> %s\n",newstr,jprint(params,0)); - free(newstr); - *nump = cJSON_GetArraySize(params); - //free(origparams); - } else params = 0; - return(params); -} - -UniValue CClib_method(struct CCcontract_info *cp,char *method,char *jsonstr) -{ - UniValue result(UniValue::VOBJ); - return(result); -} - -UniValue CClib_info(struct CCcontract_info *cp) -{ - UniValue result(UniValue::VOBJ); - return(result); -} - UniValue CClib(struct CCcontract_info *cp,char *method,char *jsonstr) { UniValue result(UniValue::VOBJ); @@ -120,11 +56,6 @@ bool CClibExactAmounts(struct CCcontract_info *cp,Eval* eval,const CTransaction return false; } -bool CClib_validate(struct CCcontract_info *cp,int32_t height,Eval *eval,const CTransaction tx,unsigned int nIn) -{ - return false; -} - int64_t AddCClibInputs(struct CCcontract_info *cp,CMutableTransaction &mtx,CPubKey pk,int64_t total,int32_t maxinputs,char *cmpaddr,int32_t CCflag) { return 0; @@ -135,21 +66,6 @@ int64_t AddCClibtxfee(struct CCcontract_info *cp,CMutableTransaction &mtx,CPubKe return(0); } -std::string Faucet2Fund(struct CCcontract_info *cp,uint64_t txfee,int64_t funds) -{ - return(""); -} - -std::string CClib_rawtxgen(struct CCcontract_info *cp,uint8_t funcid,cJSON *params) -{ - return(""); -} - -UniValue cclib_error(UniValue &result,const char *errorstr) -{ - return(result); -} - uint256 juint256(cJSON *obj) { uint256 tmp; bits256 t = jbits256(obj,0); @@ -157,11 +73,6 @@ uint256 juint256(cJSON *obj) return(revuint256(tmp)); } -int32_t cclib_parsehash(uint8_t *hash32,cJSON *item,int32_t len) -{ - return(0); -} - #if BUILD_CUSTOMCC #include "customcc.cpp" diff --git a/src/cc/customcc.cpp b/src/cc/customcc.cpp index 7edb95f79..961089de8 100644 --- a/src/cc/customcc.cpp +++ b/src/cc/customcc.cpp @@ -1,88 +1,15 @@ // Copyright (c) 2016-2024 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html -/* - simple stub custom cc - - Just update the functions in this file, then from ~/hush3/src/cc - - ../hush-cli -ac_name=CUSTOM stop - ./makecustom - ../hush-smart-chain -ac_name=CUSTOM -ac_cclib=custom -ac_cc=2 ... - - The above will rebuild hushd and get it running again - */ - -CScript custom_opret(uint8_t funcid,CPubKey pk) -{ - CScript opret; uint8_t evalcode = EVAL_CUSTOM; - opret << OP_RETURN << E_MARSHAL(ss << evalcode << funcid << pk); - return(opret); -} - -uint8_t custom_opretdecode(CPubKey &pk,CScript scriptPubKey) -{ - std::vector vopret; uint8_t e,f; - GetOpReturnData(scriptPubKey,vopret); - if ( vopret.size() > 2 && E_UNMARSHAL(vopret,ss >> e; ss >> f; ss >> pk) != 0 && e == EVAL_CUSTOM ) - { - return(f); - } - return(0); -} - -UniValue custom_rawtxresult(UniValue &result,std::string rawtx,int32_t broadcastflag) -{ - CTransaction tx; - if ( rawtx.size() > 0 ) - { - result.push_back(Pair("hex",rawtx)); - if ( DecodeHexTx(tx,rawtx) != 0 ) - { - if ( broadcastflag != 0 && myAddtomempool(tx) != 0 ) - RelayTransaction(tx); - result.push_back(Pair("txid",tx.GetHash().ToString())); - result.push_back(Pair("result","success")); - } else result.push_back(Pair("error","decode hex")); - } else result.push_back(Pair("error","couldnt finalize CCtx")); - return(result); -} UniValue custom_func0(uint64_t txfee,struct CCcontract_info *cp,cJSON *params) { UniValue result(UniValue::VOBJ); - result.push_back(Pair("result","success")); - result.push_back(Pair("message","just an example of an information returning rpc")); return(result); } -// send yourself 1 coin to your CC address using normal utxo from your -pubkey - UniValue custom_func1(uint64_t txfee,struct CCcontract_info *cp,cJSON *params) { - CMutableTransaction mtx = CreateNewContextualCMutableTransaction(Params().GetConsensus(), hush_nextheight()); std::string rawtx; - UniValue result(UniValue::VOBJ); CPubKey mypk; int64_t amount = COIN; int32_t broadcastflag=0; - if ( txfee == 0 ) - txfee = CUSTOM_TXFEE; - mypk = pubkey2pk(Mypubkey()); - if ( AddNormalinputs2(mtx,COIN+txfee,64) >= COIN+txfee ) // add utxo to mtx - { - // make op_return payload as normal. - CScript opret = custom_opret('1',mypk); - std::vector> vData = std::vector>(); - if ( makeCCopret(opret, vData) ) - { - // make vout0 with op_return included as payload. - mtx.vout.push_back(MakeCC1vout(cp->evalcode,amount,mypk,&vData)); - fprintf(stderr, "vout size2.%li\n", mtx.vout.size()); - rawtx = FinalizeCCTx(0,cp,mtx,mypk,txfee,CScript()); - return(custom_rawtxresult(result,rawtx,broadcastflag)); - } - } + UniValue result(UniValue::VOBJ); return(result); } - -bool custom_validate(struct CCcontract_info *cp,int32_t height,Eval *eval,const CTransaction tx) -{ - return false; -} diff --git a/src/cc/customcc.h b/src/cc/customcc.h index 4159d9608..7dfb78f84 100644 --- a/src/cc/customcc.h +++ b/src/cc/customcc.h @@ -1,20 +1,6 @@ // Copyright (c) 2016-2024 The Hush developers // Distributed under the GPLv3 software license, see the accompanying // file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html -/* - to create a custom libcc.so: - - 1. change "func0" and "func1" to method names that fit your custom cc. Of course, you can create more functions by adding another entry to RPC_FUNCS. there is not any practical limit to the number of methods. - - 2. For each method make sure there is a UniValue function declaration and CUSTOM_DISPATCH has an if statement checking for it that calls the custom_func - - 3. write the actual custom_func0, custom_func1 and custom_validate in customcc.cpp - - 4. ./makecustom, which builds cclib.cpp with -DBUILD_CUSTOMCC and puts the libcc.so in ~/hush3/src and rebuilds hushd - - 5. launch your chain with -ac_cclib=customcc -ac_cc=2 - - */ std::string MYCCLIBNAME = (char *)"customcc"; @@ -27,22 +13,3 @@ std::string MYCCLIBNAME = (char *)"customcc"; { (char *)MYCCNAME, (char *)"func0", (char *)"", 1, 1, '0', EVAL_CUSTOM }, \ { (char *)MYCCNAME, (char *)"func1", (char *)"", 0, 0, '1', EVAL_CUSTOM }, -bool custom_validate(struct CCcontract_info *cp,int32_t height,Eval *eval,const CTransaction tx); -UniValue custom_func0(uint64_t txfee,struct CCcontract_info *cp,cJSON *params); -UniValue custom_func1(uint64_t txfee,struct CCcontract_info *cp,cJSON *params); - -#define CUSTOM_DISPATCH \ -if ( cp->evalcode == EVAL_CUSTOM ) \ -{ \ - if ( strcmp(method,"func0") == 0 ) \ - return(custom_func0(txfee,cp,params)); \ - else if ( strcmp(method,"func1") == 0 ) \ - return(custom_func1(txfee,cp,params)); \ - else \ - { \ - result.push_back(Pair("result","error")); \ - result.push_back(Pair("error","invalid customcc method")); \ - result.push_back(Pair("method",method)); \ - return(result); \ - } \ -} diff --git a/src/cc/dapps/dappinc.h b/src/cc/dapps/dappinc.h index d9d77e4dc..e9afd7fdc 100644 --- a/src/cc/dapps/dappinc.h +++ b/src/cc/dapps/dappinc.h @@ -339,7 +339,7 @@ cJSON *get_hushcli(char *refcoin,char **retstrp,char *acname,char *method,char * if ( acname[0] != 0 ) { if ( refcoin[0] != 0 && strcmp(refcoin,"HUSH3") != 0 && strcmp(refcoin,acname) != 0 ) printf("unexpected: refcoin.(%s) acname.(%s)\n",refcoin,acname); - sprintf(cmdstr,"hush-smart-chain -ac_name=%s %s %s %s %s %s %s %s %s > %s\n",acname,method,arg0,arg1,arg2,arg3,arg4,arg5,arg6,fname); + sprintf(cmdstr,"hush-arrakis-chain -ac_name=%s %s %s %s %s %s %s %s %s > %s\n",acname,method,arg0,arg1,arg2,arg3,arg4,arg5,arg6,fname); } else if ( strcmp(refcoin,"HUSH3") == 0 ) sprintf(cmdstr,"hush-cli %s %s %s %s %s %s %s %s > %s\n",method,arg0,arg1,arg2,arg3,arg4,arg5,arg6,fname); diff --git a/src/cc/dapps/zmigrate.c b/src/cc/dapps/zmigrate.c index e373d788b..4ccbc3636 100644 --- a/src/cc/dapps/zmigrate.c +++ b/src/cc/dapps/zmigrate.c @@ -23,7 +23,7 @@ #include "cJSON.c" /* -NOTE: HUSH nor any Hush Smart Chain has any sprout outputs. This code is kept for historical and educational purposes. +NOTE: HUSH nor any Hush Arrakis Chain has any sprout outputs. This code is kept for historical and educational purposes. z_migrate: the purpose of z_migrate is to make converting of all sprout outputs into sapling. the usage would be for the user to specify a sapling address and call z_migrate zsaddr, until it returns that there is nothing left to be done. diff --git a/src/cc/eval.cpp b/src/cc/eval.cpp index 93e7d3927..4ee4547ff 100644 --- a/src/cc/eval.cpp +++ b/src/cc/eval.cpp @@ -30,7 +30,6 @@ char *CClib_name(); Eval* EVAL_TEST = 0; -struct CCcontract_info CCinfos[0x100]; extern pthread_mutex_t HUSH_CC_mutex; diff --git a/src/chainparams.cpp b/src/chainparams.cpp index ddc3638fe..02ab894a9 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -117,7 +117,7 @@ public: consensus.nPowMaxAdjustDown = 32; // 32% adjustment down consensus.nPowMaxAdjustUp = 16; // 16% adjustment up // we are emulating old node behavior at startup, they used 150s - consensus.nPowTargetSpacing = 150; // 75; // HUSH is 75 seconds, Hush Smart Chains are 60 seconds by default + consensus.nPowTargetSpacing = 150; // 75; // HUSH is 75 seconds, Hush Arrakis Chains are 60 seconds by default consensus.nPowAllowMinDifficultyBlocksAfterHeight = boost::none; // HUSH never had Sprout in our blockchain history, but some internals require *knowing* about Sprout // or it breaks backward compatibility. We do what we can. @@ -1921,7 +1921,7 @@ void *chainparams_commandline() { (1620000, uint256S("0x000000048c6667a8724512cbd999bc491ec8522b1f3817001c7ba485dec46d10")) (1621000, uint256S("0x00000005d981cd3473f8815d18965c0e0035993117390e9659fe8d3b9562c8dc")) (1622000, uint256S("0x0000000371a1663973c7b19a0b4dd8673f1ddb14a0438c89de3908712437f688")) - // Generated at 1709073559 via hush3 util/checkpoints.pl by onryo + // Generated at 1709544651 via hush3 util/checkpoints.pl by onryo (1623000, uint256S("0x000000038ed359f4cdcfb54a0ba36a8ac89e4f697836920c28dd038d643064d1")) (1624000, uint256S("0x00000000ca915eb30164ac2aad328ae5d9d4531bf8ef30c7bdf3c18c0abcdae4")) (1625000, uint256S("0x0000000303957deb36dc6a3b6597984ca9585172a198342eb102a9d3b9455596")) @@ -1988,10 +1988,16 @@ void *chainparams_commandline() { (1686000, uint256S("0x000000047a42b4eabe3ffab8d95e3cb1a2d923afcbda4e335374e728777fc474")) (1687000, uint256S("0x00000003eda47c88b7d313cc525f0511934dacc364d045057eefc2148934cfbb")) (1688000, uint256S("0x000000040d7bda41689357c29aedb77b016f3cd2ce2bc3ba04c4bdd95d455286")) - (1689000, uint256S("0x0000000128027ca8f7b2dccb44d26946b9df6533f05e63da9d475867c4b251fa")) - ,(int64_t) 1709047548, // time of last checkpointed block - (int64_t) 2532221, // total txs - (double) 2900 // txs in the last day before block 1689336 + (1689000, uint256S("0x0000000128027ca8f7b2dccb44d26946b9df6533f05e63da9d475867c4b251fa")) + (1690000, uint256S("0x00000002dbbef67d168a562e36ba850e15acfad1172d1134df4f1f4288c9d865")) + (1691000, uint256S("0x000000048ad7645fb07ec103dadabfb66c2b544c69bd920692a834a8844be93d")) + (1692000, uint256S("0x000000010ddd71bc79e292a7c6e3c70565ba211f918eb1751e905301acbcd517")) + (1693000, uint256S("0x000000010dc70ae11c82e34000cd7d1a344bbf9fcf6344b3ac04f3173d1703d0")) + (1694000, uint256S("0x000000027e5cb8c5bfd613100811708f7d180b994650d3ca6900a81683d50fa0")) + (1695000, uint256S("0x000000014325867b388dc34843b695536eb9185c6782707f1c86edf0b5b89e9d")) + ,(int64_t) 1709499985, // time of last checkpointed block + (int64_t) 2539894, // total txs + (double) 1801 // txs in the last day before block 1695599 }; // END HUSH mainnet checkpoint data } else if (strcmp(SMART_CHAIN_SYMBOL,"DRAGONX") == 0) { @@ -2988,7 +2994,7 @@ void *chainparams_commandline() { (987000, uint256S("0x00002723abb80e9ece84055c113e0caa507177ddc88cb6b8011ecba39b490dd8")) (988000, uint256S("0x00001938e724c8033d1f60ddd27512f6f358847e96c63def28e85bd40616117c")) (989000, uint256S("0x00003071ff9188d27f744395aefb1d406cccc15f61b7f79bba0ea9d100475a63")) - // Generated at 1709073764 via hush3 util/checkpoints.pl by onryo + // Generated at 1709542425 via hush3 util/checkpoints.pl by onryo (990000, uint256S("0x00005340e6855081dd3fade7baa8db18b660ffd272373e67c812c5cf69006300")) (991000, uint256S("0x000027d07656cbdbd3746495e091388f35c9e2a11a2389174490a9433a9e0da4")) (992000, uint256S("0x00001413d8eb317a69e45bf44aba0af79c724b45272043307480213bd4e7d653")) @@ -3129,9 +3135,22 @@ void *chainparams_commandline() { (1127000, uint256S("0x000062ad6d9175ffa331b96444ad6b8b9842d564d359b68ac6b325b80f874f86")) (1128000, uint256S("0x000030af1516b3d81082bbbf43054f723ea8090c31939f8335e2548861f585b0")) (1129000, uint256S("0x00004691aec7b3d82d064a112e4a480e48ec3d7fa678862df12ae146265f5482")) - ,(int64_t) 1709063880, // time of last checkpointed block - (int64_t) 0, // total txs - (double) 2304 // txs in the last day before block 1129274 + (1130000, uint256S("0x000082de552f3b0dbd1a805e08db29f9f60fe020ee88944b0266e55cda2f7e78")) + (1131000, uint256S("0x0000061cc63ed366899e9d4d7c748ac75ae3ef9a32ef60e92cf7c0c306ee9711")) + (1132000, uint256S("0x00008bd55bfae2a954b70b04f570e03b9148d639358a697b5d2e948fc6345918")) + (1133000, uint256S("0x00003a59655529f46df2b436019db7b1d7b9757f4416699ab5d895cd68f9be64")) + (1134000, uint256S("0x00004f6097651296f52e7d69a51e7b82ce12599109c5abc201d77cf9af9d6e88")) + (1135000, uint256S("0x000049450fcc6b737c938099e17bc0c54cd18b385112cd7689477a9cc8a27e99")) + (1136000, uint256S("0x00005ea94a0ee3a23b8224a87dd107e13ea0e86a59c3d2de4fb9fd3a94c0fe27")) + (1137000, uint256S("0x0000270eb8f01ef39a7a1cbc8a3d0d2ceefc65f5842ac3001b4a5247e8c2e525")) + (1138000, uint256S("0x0000339b020870d50d1496802dcf21142c95971f1781000c202d1e8a52bf12ca")) + (1139000, uint256S("0x0000716e4b703564bd4b4bfa84fd6b317aefcea3d13e6eead901de144a703005")) + (1140000, uint256S("0x0000012c87cc87745fe70667c7a2eca8b03dac27a8424b0830c06a18fdf9fc77")) + (1141000, uint256S("0x00006bf655db63cb0e89eb631a25d198d80d593cd4d35c8c9de2b62003a8f4f2")) + (1142000, uint256S("0x00000949c0348276363e0aabc6895b7a5298ba2ba1f003c2a4a23be5c6d843a7")) + ,(int64_t) 1709532066, // time of last checkpointed block + (int64_t) 1170154, // total txs + (double) 2511 // txs in the last day before block 1142288 }; } else { // all other HSC's with no checkpoints diff --git a/src/chainparamsseeds.h b/src/chainparamsseeds.h index 31fff7378..dc2b4948c 100644 --- a/src/chainparamsseeds.h +++ b/src/chainparamsseeds.h @@ -11,11 +11,11 @@ // Each line contains a BIP155 serialized address. // static const uint8_t chainparams_seed_main[] = { - 0x01,0x04,0xb9,0xf1,0x3d,0x2b,0x00,0x00, // 185.241.61.43 + 0x01,0x04,0x5b,0xd0,0x7f,0x51,0x00,0x00, // 91.208.127.81 0x01,0x04,0x57,0xfb,0x4c,0xa6,0x00,0x00, // 87.251.76.166 0x01,0x04,0x2d,0x52,0x44,0xe9,0x00,0x00, // 45.82.68.233 0x01,0x04,0x57,0xfb,0x4c,0x21,0x00,0x00, // 87.251.76.33 - 0x01,0x04,0x89,0x4a,0x04,0xc6,0x00,0x00, // 137.74.4.198 + 0x01,0x04,0xb2,0xfa,0xbd,0x8d,0x00,0x00, // 178.250.189.141 0x01,0x04,0x95,0x1c,0x66,0xdb,0x00,0x00, // 149.28.102.219 0x01,0x04,0x9b,0x8a,0xe4,0x44,0x00,0x00, // 155.138.228.68 0x01,0x04,0x6b,0xae,0x46,0xfb,0x00,0x00, // 107.174.70.251 @@ -24,7 +24,7 @@ static const uint8_t chainparams_seed_main[] = { 0x04,0x20,0x3d,0x24,0x7a,0xee,0xf5,0x39,0x20,0x7e,0x69,0x92,0xda,0xc7,0xa6,0x9f,0xbd,0xeb,0x29,0x21,0x20,0x93,0x52,0x03,0xf3,0x60,0x41,0xfc,0xb8,0xf9,0x06,0x29,0x96,0x24,0x00,0x00, // hushv3xvheqh42ms3ld2nh555muscietkib7gycb7s4psbrjsysfywqd.onion 0x02,0x10,0x2a,0x0c,0xb6,0x41,0x06,0xf1,0x00,0x34,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00, // 2a0c:b641:6f1:34::2 0x02,0x10,0x2a,0x0c,0xb6,0x41,0x06,0xf1,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00, // 2a0c:b641:6f1:c::2 - 0x05,0x20,0x42,0xd3,0x08,0x7d,0xad,0x65,0xb4,0x84,0xe8,0x99,0x5e,0xf7,0xc1,0x12,0x36,0xb3,0x0d,0x96,0x30,0x2c,0x70,0xb6,0xde,0x48,0x03,0x44,0xc7,0xab,0x9d,0x1b,0xbb,0x8f,0x00,0x00, // iljqq7nnmw2ij2ezl334cerwwmgzmmbmoc3n4saditd2xhi3xohq.b32.i2p + 0x05,0x20,0xfb,0xa8,0xca,0x3d,0xf4,0xc9,0x83,0x95,0xa8,0x07,0x05,0x6f,0xf8,0x46,0x69,0x6d,0x42,0x75,0x22,0xe9,0x80,0xd8,0x43,0x7c,0xbe,0x29,0xda,0x33,0x14,0xf9,0xfb,0x17,0x00,0x00, // 7oumuppuzgbzlkahavx7qrtjnvbhkixjqdmeg7f6fhndgfhz7mlq.b32.i2p }; static const uint8_t chainparams_seed_test[] = { diff --git a/src/crypto/common.h b/src/crypto/common.h index bfc43d8bc..64c144848 100644 --- a/src/crypto/common.h +++ b/src/crypto/common.h @@ -1,4 +1,3 @@ -// Copyright (c) 2016-2024 The Hush developers // Copyright (c) 2014 The Bitcoin Core developers // Copyright (c) 2016-2024 The Hush developers // Released under the GPLv3 diff --git a/src/dragonxd b/src/dragonxd index 7e6320ba5..076ce94dc 100755 --- a/src/dragonxd +++ b/src/dragonxd @@ -13,4 +13,4 @@ cd $DIR SEEDNODE=176.126.87.241 # Remember Remember the 5th November for freedom of speech is not free!! -./hush-smart-chain -ac_name=DRAGONX -ac_algo=randomx -ac_halving=3500000 -ac_reward=300000000 -ac_blocktime=36 -ac_private=1 -addnode=$SEEDNODE $@ +./hush-arrakis-chain -ac_name=DRAGONX -ac_algo=randomx -ac_halving=3500000 -ac_reward=300000000 -ac_blocktime=36 -ac_private=1 -addnode=$SEEDNODE $@ diff --git a/src/hush-smart-chain b/src/hush-arrakis-chain similarity index 100% rename from src/hush-smart-chain rename to src/hush-arrakis-chain diff --git a/src/hush-smart-chain.bat b/src/hush-arrakis-chain.bat similarity index 100% rename from src/hush-smart-chain.bat rename to src/hush-arrakis-chain.bat diff --git a/src/hush_bitcoind.h b/src/hush_bitcoind.h index 57eb1c8f3..59de08708 100644 --- a/src/hush_bitcoind.h +++ b/src/hush_bitcoind.h @@ -948,7 +948,7 @@ CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams); // This function defines the Hush Founders Reward (AKA Dev Tax) // 10% of all block rewards go towards Hush core team // If you do not like this, you are encouraged to fork the chain -// or start your own Hush Smart Chain: https://git.hush.is/hush/hush-smart-chains +// or start your own Hush Arrakis Chain: https://git.hush.is/hush/hush-arrakis-chains // HUSH supply curve cannot be exactly represented via CLI args, so we do it ourselves. // You specify the BR, and the FR % gets added so 10% of 12.5 is 1.25 // but to tell the AC params, I need to say "11% of 11.25" is 1.25 diff --git a/src/hush_utils.h b/src/hush_utils.h index 7b9269f0b..7da3fc452 100644 --- a/src/hush_utils.h +++ b/src/hush_utils.h @@ -1611,7 +1611,7 @@ uint64_t hush_block_subsidy(int height) return subsidy; } -// wrapper for more general supply curves of Hush Smart Chains +// wrapper for more general supply curves of Hush Arrakis Chains uint64_t hush_sc_block_subsidy(int nHeight) { // Find current era, start from beginning reward, and determine current subsidy diff --git a/src/init.cpp b/src/init.cpp index 5dd529ed8..d12828343 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1129,7 +1129,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) LogPrintf("%s: parameter interaction: -externalip set -> setting -discover=0\n", __func__); } - // Read asmap file by default for HUSH3 and all Hush Smart Chains + // Read asmap file by default for HUSH3 and all Hush Arrakis Chains if (GetArg("-asmap",1)) { fs::path asmap_path = fs::path(GetArg("-asmap", "")); diff --git a/src/miner.cpp b/src/miner.cpp index 95797c684..9a4b17842 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -1128,7 +1128,7 @@ void static RandomXMiner() char randomxHash[RANDOMX_HASH_SIZE]; rxdebug("%s: created randomxHash of size %d\n", RANDOMX_HASH_SIZE); char randomxKey[82]; // randomx spec says keysize of >60 bytes is implementation-specific - // initial randomx key is unique to every Hush Smart Chain, and has at least 9 bytes (2^9=128 bits) of entropy + // initial randomx key is unique to every Hush Arrakis Chain, and has at least 9 bytes (2^9=128 bits) of entropy // since magic is 4 bytes, rpc port is 4 bytes and smart chain symbol must be at least 1 character long snprintf(randomxKey, 81, "%08x%s%08x", ASSETCHAINS_MAGIC, SMART_CHAIN_SYMBOL, ASSETCHAINS_RPCPORT); diff --git a/src/net.cpp b/src/net.cpp index 1223e252f..fd6ec86fe 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2733,7 +2733,7 @@ bool CNode::GetTlsValidate() { if (tlsValidate == eTlsOption::FALLBACK_UNSET) { - // This is useful for private Hush Smart Chains, that want to exist + // This is useful for private Hush Arrakis Chains, that want to exist // on a closed VPN with an internal CA or trusted cert system, or // various other use cases if ( GetBoolArg("-tlsvalidate", false)) { diff --git a/src/pow.cpp b/src/pow.cpp index ac5bbb1f8..484b25b95 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -578,7 +578,7 @@ unsigned int CalculateNextWorkRequired(arith_uint256 bnAvg, return bnNew.GetCompact(); } -// HUSH does not use these functions but Hush Smart Chains can opt-in to using more bleeding edge DAA's +// HUSH does not use these functions but Hush Arrakis Chains can opt-in to using more bleeding edge DAA's // ASIC chains do not need these protections as much -- Duke Leto unsigned int lwmaGetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHeader *pblock, const Consensus::Params& params) { diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 6b5f2e6b3..dbd0da9ed 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1620,12 +1620,12 @@ UniValue getchaintxstats(const UniValue& params, bool fHelp, const CPubKey& mypk throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid block count: should be between 0 and the block's height - 1"); } } - LogPrintf("%s: blockcount = %d\n", __func__, blockcount); + // LogPrintf("%s: blockcount = %d\n", __func__, blockcount); const CBlockIndex* pindexPast = pindex->GetAncestor(pindex->GetHeight() - blockcount); int nTimeDiff = pindex->GetMedianTimePast() - pindexPast->GetMedianTimePast(); int nTxDiff = pindex->nChainTx - pindexPast->nChainTx; - LogPrintf("%s: pindexPast.height = %d, pindex.height = %d\n", __func__, pindexPast->GetHeight(), pindex->GetHeight() ); + // LogPrintf("%s: pindexPast.height = %d, pindex.height = %d\n", __func__, pindexPast->GetHeight(), pindex->GetHeight() ); UniValue ret(UniValue::VOBJ); ret.pushKV("time", (int64_t)pindex->nTime); @@ -1657,7 +1657,7 @@ UniValue getchaintxstats(const UniValue& params, bool fHelp, const CPubKey& mypk ret.pushKV("window_tx_count", nTxDiff); ret.pushKV("window_interval", nTimeDiff); int64_t nPaymentsDiff = pindex->nChainPayments - pindexPast->nChainPayments; - LogPrintf("%s: pindexPast.nChainPayments = %d, pindex.nChainPayments = %d\n", __func__, pindexPast->nChainPayments, pindex->nChainPayments ); + //LogPrintf("%s: pindexPast.nChainPayments = %d, pindex.nChainPayments = %d\n", __func__, pindexPast->nChainPayments, pindex->nChainPayments ); int64_t nShieldedTxDiff = pindex->nChainShieldedTx - pindexPast->nChainShieldedTx; int64_t nShieldingTxDiff = pindex->nChainShieldingTx - pindexPast->nChainShieldingTx; int64_t nDeshieldingTxDiff = pindex->nChainDeshieldingTx - pindexPast->nChainDeshieldingTx; diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index 5273d40d8..f70f60f79 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -482,7 +482,7 @@ UniValue validateaddress(const UniValue& params, bool fHelp, const CPubKey& mypk if (fHelp || params.size() != 1) throw runtime_error( "validateaddress \"addr\"\n" - "\nReturn information about the given Hush or Hush Smart Chain (HSC) address.\n" + "\nReturn information about the given Hush or Hush Arrakis Chain (HAC) address.\n" "\nArguments:\n" "1. \"addr\" (string, required) The address to validate\n" "\nResult:\n" diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp index de61c3eff..096f7b558 100644 --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -31,6 +31,8 @@ #include #include +extern uint16_t ASSETCHAINS_P2PPORT,ASSETCHAINS_RPCPORT; + using namespace std; using namespace hush; @@ -276,8 +278,8 @@ UniValue addnode(const UniValue& params, bool fHelp, const CPubKey& mypk) "1. \"node\" (string, required) The node (see getpeerinfo for nodes)\n" "2. \"command\" (string, required) 'add' to add a node to the list, 'remove' to remove a node from the list, 'onetry' to try a connection to the node once\n" "\nExamples:\n" - + HelpExampleCli("addnode", "\"192.168.0.6:18030\" \"onetry\"") - + HelpExampleRpc("addnode", "\"192.168.0.6:18030\", \"onetry\"") + + HelpExampleCli("addnode", "\"192.168.0.6:" + to_string(ASSETCHAINS_P2PPORT) + "\" \"onetry\"") + + HelpExampleRpc("addnode", "\"192.168.0.6:" + to_string(ASSETCHAINS_P2PPORT) + "\", \"onetry\"") ); string strNode = params[0].get_str(); @@ -320,8 +322,8 @@ UniValue disconnectnode(const UniValue& params, bool fHelp, const CPubKey& mypk) "\nArguments:\n" "1. \"node\" (string, required) The node (see getpeerinfo for nodes)\n" "\nExamples:\n" - + HelpExampleCli("disconnectnode", "\"192.168.0.6:18030\"") - + HelpExampleRpc("disconnectnode", "\"192.168.0.6:18030\"") + + HelpExampleCli("disconnectnode", "\"192.168.0.6:" + to_string(ASSETCHAINS_P2PPORT) + "\"") + + HelpExampleRpc("disconnectnode", "\"192.168.0.6:" + to_string(ASSETCHAINS_P2PPORT) + "\"") ); CNode* pNode = FindNode(params[0].get_str()); diff --git a/src/sc/koolaid b/src/sc/koolaid index 9db2e58ce..a46b71aeb 100755 --- a/src/sc/koolaid +++ b/src/sc/koolaid @@ -1,3 +1,3 @@ #!/usr/bin/env bash # Copyright (c) 2018-2024 The Hush developers -./hush-smart-chain -ac_name=KOOLAID $@ +./hush-arrakis-chain -ac_name=KOOLAID $@ diff --git a/src/sc/kush b/src/sc/kush index bb8a34893..a5349a6a3 100755 --- a/src/sc/kush +++ b/src/sc/kush @@ -1,3 +1,3 @@ #!/usr/bin/env bash # Copyright (c) 2018-2024 The Hush developers -./hush-smart-chain -ac_name=KUSH $@ +./hush-arrakis-chain -ac_name=KUSH $@ diff --git a/src/sc/zex b/src/sc/zex index 12ffea170..55b4640ef 100755 --- a/src/sc/zex +++ b/src/sc/zex @@ -1,3 +1,3 @@ #!/usr/bin/env bash # Copyright (c) 2018-2024 The Hush developers -./hush-smart-chain -ac_name=ZEX $@ +./hush-arrakis-chain -ac_name=ZEX $@ diff --git a/src/sietch.h b/src/sietch.h index fe6352072..4194e19eb 100644 --- a/src/sietch.h +++ b/src/sietch.h @@ -29,8 +29,8 @@ SendManyRecipient newSietchRecipient(string zaddr) { // Sietch zouts have random data in their memos so they are indistinguishable from // encrypted data being stored in the memo field char hex[] = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'}; - // memo field is 512 bytes or 1024 hex chars - char str[1024]; + // memo field is 512 bytes or 1024 hex chars plus a null byte + char str[1025]; for(int i=0;i<1024;i++) { str[i] = hex[GetRandInt(16)]; } diff --git a/src/smartchains b/src/smartchains index ce46c8f18..e48482da2 100755 --- a/src/smartchains +++ b/src/smartchains @@ -6,7 +6,7 @@ set -eo pipefail source pubkey.txt overide_args="$@" seed_ip=$(SEEDNODE) -hsc='./hush-smart-chain' +hsc='./hush-arrakis-chain' if [ -z "$delay" ]; then delay=20; fi diff --git a/src/smartchains.old b/src/smartchains.old deleted file mode 100755 index 4df00be85..000000000 --- a/src/smartchains.old +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2018-2024 The Hush developers -set -x -delay=60 -source pubkey.txt -echo $pubkey -echo "jl777 is a traitor to his village of cypherpunks, ca333 is his obedient servant" - -hsc="./hush-smart-chain" -ip=$(HUSHDEX_SEEDNODE) - -# this chain helps power HushDEX -$hsc -pubkey=$pubkey -ac_name=ZEX -ac_supply=100000000 -addnode=$ip $@ & - -# these are testcoins, like ARRR -$hsc -pubkey=$pubkey -ac_name=ZUSH -ac_supply=100000000 -addnode=$ip $@ & -$hsc -pubkey=$pubkey -ac_name=KOOLAID -ac_supply=100000000 -addnode=$ip $@ & diff --git a/src/stratum.cpp b/src/stratum.cpp index 17dce9450..c7bed37df 100644 --- a/src/stratum.cpp +++ b/src/stratum.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2021-2024 The Hush developers -// Copyright (c) 2020-2024 The Freicoin Developers -// Copyright (c) 2021-2024 Decker +// Copyright (c) 2020-2023 The Freicoin Developers +// Copyright (c) 2021-2023 Decker // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. diff --git a/src/stratum.h b/src/stratum.h index 383380157..9a63863ab 100644 --- a/src/stratum.h +++ b/src/stratum.h @@ -1,5 +1,5 @@ // Copyright (c) 2021-2024 The Hush developers -// Copyright (c) 2020-2024 The Freicoin Developers +// Copyright (c) 2020-2023 The Freicoin Developers // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. diff --git a/src/testdragonxd b/src/testdragonxd index 640152196..953ffd4ae 100755 --- a/src/testdragonxd +++ b/src/testdragonxd @@ -14,4 +14,4 @@ BLOCKTIME=18 SUPPLY=0 # Remember Remember the 5th November for freedom of speech is not free!! -./hush-smart-chain -ac_name=TESTDRAGONX -ac_algo=randomx -ac_halving=3500000 -ac_reward=300000000 -ac_blocktime=$BLOCKTIME -ac_private=1 -ac_supply=$SUPPLY -debug=randomx $@ +./hush-arrakis-chain -ac_name=TESTDRAGONX -ac_algo=randomx -ac_halving=3500000 -ac_reward=300000000 -ac_blocktime=$BLOCKTIME -ac_private=1 -ac_supply=$SUPPLY -debug=randomx $@ diff --git a/src/testequihashd b/src/testequihashd index 3de539bd9..5e46cddc1 100755 --- a/src/testequihashd +++ b/src/testequihashd @@ -15,4 +15,4 @@ SUPPLY=0 # same as TESTDRAGONX except equihash and different ac_name # and debug=pow which is the equivalent of debug=randomx for equihash mining -./hush-smart-chain -ac_name=TESTEQUIHASH -ac_halving=3500000 -ac_reward=300000000 -ac_blocktime=$BLOCKTIME -ac_private=1 -ac_supply=$SUPPLY -debug=pow $@ +./hush-arrakis-chain -ac_name=TESTEQUIHASH -ac_halving=3500000 -ac_reward=300000000 -ac_blocktime=$BLOCKTIME -ac_private=1 -ac_supply=$SUPPLY -debug=pow $@ diff --git a/src/wallet/asyncrpcoperation_sendmany.cpp b/src/wallet/asyncrpcoperation_sendmany.cpp index f754158e3..311fc217c 100644 --- a/src/wallet/asyncrpcoperation_sendmany.cpp +++ b/src/wallet/asyncrpcoperation_sendmany.cpp @@ -363,7 +363,7 @@ bool AsyncRPCOperation_sendmany::main_impl() { /** - * SCENARIO #0 (All HUSH and Hush Smart Chains) + * SCENARIO #0 (All HUSH and Hush Arrakis Chains) * Sprout not involved, so we just use the TransactionBuilder and we're done. * We added the transparent inputs to the builder earlier. */ diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 0006ea921..d9ed9a311 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -5311,7 +5311,7 @@ UniValue z_sendmany(const UniValue& params, bool fHelp, const CPubKey& mypk) } txsize += CTXOUT_REGULAR_SIZE * taddrRecipients.size(); if (txsize > max_tx_size) { - throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Too many outputs, size of raw transaction would be larger than limit of %d bytes", max_tx_size )); + throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Size of raw transaction %d would be larger than limit of %d bytes", txsize, max_tx_size )); } // Minimum confirmations diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 7dfeb4a70..c108cd867 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2935,7 +2935,7 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate) // This should never fail: we should always be able to get the tree // state on the path to the tip of our chain if (pindex->pprev) { - const bool sapling = true; + const bool sapling = pindex->GetHeight() >= 2 ? true : false; if (sapling) { // NetworkUpgradeActive(pindex->pprev->GetHeight(), Params().GetConsensus(), Consensus::UPGRADE_SAPLING)) { assert(pcoinsTip->GetSaplingAnchorAt(pindex->pprev->hashFinalSaplingRoot, saplingTree)); } diff --git a/test_antispam b/test_antispam deleted file mode 100755 index 5ccfb4752..000000000 --- a/test_antispam +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -# any CLI args given to this script will be passed along -# example: ./test_antispam -debug=blah -#./src/hushd -ac_name=ANTISPAM -ac_private=1 -ac_blocktime=180 -ac_reward=500000000 -ac_supply=55555 -gen=1 -genproclimit=1 -testnode=1 $@ - -./src/hushd -ac_name=ANTISPAM -ac_private=1 -ac_blocktime=180 -ac_reward=500000000 -ac_supply=55555 $@ -# to run via the debugger -# type "run" when gdb prompt appears -#gdb --args ./src/hushd -- -ac_algo=randomx -ac_name=ANTISPAM -ac_private=1 -ac_blocktime=180 -ac_reward=500000000 -ac_supply=55555 -gen=1 -genproclimit=1 -testnode=1 diff --git a/util/build-debian-package.sh b/util/build-debian-package.sh index c9719fd18..6fa0f1f7e 100755 --- a/util/build-debian-package.sh +++ b/util/build-debian-package.sh @@ -77,7 +77,7 @@ strip $DEB_BIN/hush-tx cp $SRC_PATH/src/dragonx-cli $DEB_BIN cp $SRC_PATH/src/dragonxd $DEB_BIN -cp $SRC_PATH/src/hush-smart-chain $DEB_BIN +cp $SRC_PATH/src/hush-arrakis-chain $DEB_BIN #cp $SRC_DEB/changelog $DEB_DOC/changelog.Debian cp $SRC_DEB/copyright $DEB_DOC cp -r $SRC_DEB/examples $DEB_DOC diff --git a/util/checkpoints.pl b/util/checkpoints.pl index 486002c75..a0a4e1273 100755 --- a/util/checkpoints.pl +++ b/util/checkpoints.pl @@ -7,7 +7,7 @@ use strict; # Generate checkpoint data for use in src/chainparams.cpp my $perday = 1152; -my $cli = "./src/hush-cli -ac_name=DRAGONX"; +my $cli = "./src/hush-cli"; my $stride = shift || 1000; if ($stride =~ m/help/) { print "To generate checkpoint data every 1000 blocks: $0 &> checkpoints.txt\n"; diff --git a/util/gen-linux-binary-release.sh b/util/gen-linux-binary-release.sh index f658fc5da..dbf5f392e 100755 --- a/util/gen-linux-binary-release.sh +++ b/util/gen-linux-binary-release.sh @@ -24,7 +24,7 @@ echo "Created new build dir $BUILD" cp contrib/asmap/asmap.dat $BUILD cp sapling*.params $BUILD cd src -cp hushd hush-cli hush-tx hush-smart-chain dragonx-cli dragonxd ../$BUILD +cp hushd hush-cli hush-tx hush-arrakis-chain dragonx-cli dragonxd ../$BUILD cd ../$BUILD strip hushd hush-cli hush-tx cd .. diff --git a/share/genbuild.sh b/util/genbuild.sh similarity index 100% rename from share/genbuild.sh rename to util/genbuild.sh diff --git a/test_randomx b/util/test_randomx similarity index 61% rename from test_randomx rename to util/test_randomx index bc41bb85c..7afc95931 100755 --- a/test_randomx +++ b/util/test_randomx @@ -2,7 +2,7 @@ # any CLI args given to this script will be passed along # example: ./test_randomx -debug=randomx - ./src/hushd -ac_randomx_interval=10 -ac_randomx_lag=3 -ac_halving=20 -ac_algo=randomx -ac_name=RANDOMX10 -ac_private=1 -ac_blocktime=20 -ac_reward=500000000 -ac_supply=55555 -gen=1 -genproclimit=1 -testnode=1 $@ + ../src/hushd -ac_randomx_interval=10 -ac_randomx_lag=3 -ac_halving=20 -ac_algo=randomx -ac_name=RANDOMX10 -ac_private=1 -ac_blocktime=20 -ac_reward=500000000 -ac_supply=55555 -gen=1 -genproclimit=1 -testnode=1 $@ # to run via the debugger # type "run" when gdb prompt appears diff --git a/toolchain-info.sh b/util/toolchain-info.sh similarity index 100% rename from toolchain-info.sh rename to util/toolchain-info.sh