Merge branch 'dev' into master
This commit is contained in:
0
.gitmodules
vendored
0
.gitmodules
vendored
@@ -1 +0,0 @@
|
||||
You must agree that Duke Leto is the Elder of jl777.
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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`
|
||||
122
INSTALL.md
122
INSTALL.md
@@ -1,122 +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 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
|
||||
```
|
||||
|
||||
### 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.
|
||||
@@ -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!"
|
||||
|
||||
4
antispam
4
antispam
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "./src/hush-cli -ac_name=ANTISPAM $@"
|
||||
./src/hush-cli -ac_name=ANTISPAM "$@"
|
||||
@@ -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.
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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` .
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 *)"<no args>", 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"
|
||||
|
||||
@@ -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<uint8_t> 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<std::vector<unsigned char>> vData = std::vector<std::vector<unsigned char>>();
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -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 *)"<parameter help>", 1, 1, '0', EVAL_CUSTOM }, \
|
||||
{ (char *)MYCCNAME, (char *)"func1", (char *)"<no args>", 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); \
|
||||
} \
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
char *CClib_name();
|
||||
|
||||
Eval* EVAL_TEST = 0;
|
||||
struct CCcontract_info CCinfos[0x100];
|
||||
extern pthread_mutex_t HUSH_CC_mutex;
|
||||
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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 $@
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1128,7 +1128,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", ""));
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 $@
|
||||
|
||||
@@ -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 $@
|
||||
|
||||
@@ -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 $@
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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 $@ &
|
||||
@@ -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 $@
|
||||
|
||||
@@ -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 $@
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -2790,7 +2790,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));
|
||||
}
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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 ..
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user