From e49836b45ef06137f93b60bb6a727d37060ca0aa Mon Sep 17 00:00:00 2001 From: Duke Date: Sun, 21 Jan 2024 16:59:09 -0500 Subject: [PATCH] Enforce sapling activation at height=1 We used to have the -ac_sapling option which defaulted to one, now we enforce that it must always be one, it cannot be changed and is no longer a CLI option. --- src/hush_utils.h | 2 +- src/init.cpp | 7 ++++--- src/wallet-utility.cpp | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/hush_utils.h b/src/hush_utils.h index de03f73ba..71858ba1f 100644 --- a/src/hush_utils.h +++ b/src/hush_utils.h @@ -2092,7 +2092,7 @@ void hush_args(char *argv0) } // HUSH will always be The First Pure Sapling Coin, no Sprout JoinSplits in our history! ;) - ASSETCHAINS_SAPLING = GetArg("-ac_sapling", 1); + ASSETCHAINS_SAPLING = 1; // GetArg("-ac_sapling", 1); if (ASSETCHAINS_SAPLING == -1) { ASSETCHAINS_OVERWINTER = GetArg("-ac_overwinter", -1); diff --git a/src/init.cpp b/src/init.cpp index 2fd970547..f793bef28 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -597,8 +597,8 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-stratumport=", strprintf(_("Listen for Stratum work requests on (default: %u or testnet: %u)"), BaseParams().StratumPort(), BaseParams().StratumPort())); strUsage += HelpMessageOpt("-stratumallowip=", _("Allow Stratum work requests from specified source. Valid for are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times")); - // "ac" stands for "affects consensus" - strUsage += HelpMessageGroup(_("Hush Smart Chain options:")); + // "ac" stands for "affects consensus" or Arrakis Chain + strUsage += HelpMessageGroup(_("Hush Arrakis Chain options:")); strUsage += HelpMessageOpt("-ac_algo", _("Choose PoW mining algorithm, either 'equihash' or 'randomx'. default is Equihash (200,9)")); strUsage += HelpMessageOpt("-ac_blocktime", _("Block time in seconds, default is 60")); strUsage += HelpMessageOpt("-ac_cc", _("Cryptoconditions, default 0")); @@ -621,7 +621,8 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-ac_randomx_interval", _("Controls how often the RandomX key block will change, default is 1024")); strUsage += HelpMessageOpt("-ac_randomx_lag", _("Sets the number of RandomX blocks to wait before updating the key block, default is 64")); strUsage += HelpMessageOpt("-ac_reward", _("Block reward in satoshis, default is 0")); - strUsage += HelpMessageOpt("-ac_sapling", _("Sapling activation block height")); + // All HAC's activate sapling at block height 1, other heights are not supported + //strUsage += HelpMessageOpt("-ac_sapling", _("Sapling activation block height")); strUsage += HelpMessageOpt("-ac_script", _("P2SH/multisig address to receive founders rewards")); strUsage += HelpMessageOpt("-ac_supply", _("Starting supply, default is 10")); strUsage += HelpMessageOpt("-ac_txpow", _("Enforce transaction-rate limit, default 0")); diff --git a/src/wallet-utility.cpp b/src/wallet-utility.cpp index 19d826c7e..953fa255b 100644 --- a/src/wallet-utility.cpp +++ b/src/wallet-utility.cpp @@ -20,8 +20,8 @@ uint32_t ASSETCHAINS_MAGIC = 2387029918; uint32_t ASSETCHAINS_EQUIHASH = 0; uint32_t ASSETCHAINS_ALGO = 0; int32_t ASSETCHAINS_LWMAPOS = 0; -int32_t ASSETCHAINS_OVERWINTER = 227520; -int32_t ASSETCHAINS_SAPLING = 227520; +int32_t ASSETCHAINS_OVERWINTER = 1; +int32_t ASSETCHAINS_SAPLING = 1; int32_t HUSH_TESTNODE = 0; unsigned int MAX_BLOCK_SIGOPS = 20000;