From 9177a51b6d2dbfb3a084d73b9375a4ede2d837aa Mon Sep 17 00:00:00 2001 From: Duke Date: Thu, 16 Oct 2025 11:13:57 -0400 Subject: [PATCH 01/11] Remove getbalance64 #473 --- src/rpc/server.cpp | 1 - src/rpc/server.h | 1 - src/wallet/rpcwallet.cpp | 43 ---------------------------------------- 3 files changed, 45 deletions(-) diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp index a16dde687..6d5a166b4 100644 --- a/src/rpc/server.cpp +++ b/src/rpc/server.cpp @@ -428,7 +428,6 @@ static const CRPCCommand vRPCCommands[] = { "wallet", "getaddressesbyaccount", &getaddressesbyaccount, true }, { "wallet", "cleanwallettransactions", &cleanwallettransactions, false }, { "wallet", "getbalance", &getbalance, false }, - { "wallet", "getbalance64", &getbalance64, false }, { "wallet", "getnewaddress", &getnewaddress, true }, { "wallet", "getrawchangeaddress", &getrawchangeaddress, true }, { "wallet", "getreceivedbyaccount", &getreceivedbyaccount, false }, diff --git a/src/rpc/server.h b/src/rpc/server.h index eff98f9c2..08c60fe16 100644 --- a/src/rpc/server.h +++ b/src/rpc/server.h @@ -258,7 +258,6 @@ extern UniValue getreceivedbyaddress(const UniValue& params, bool fHelp, const C extern UniValue getreceivedbyaccount(const UniValue& params, bool fHelp, const CPubKey& mypk); extern UniValue cleanwallettransactions(const UniValue& params, bool fHelp, const CPubKey& mypk); extern UniValue getbalance(const UniValue& params, bool fHelp, const CPubKey& mypk); -extern UniValue getbalance64(const UniValue& params, bool fHelp, const CPubKey& mypk); extern UniValue getunconfirmedbalance(const UniValue& params, bool fHelp, const CPubKey& mypk); extern UniValue movecmd(const UniValue& params, bool fHelp, const CPubKey& mypk); extern UniValue sendfrom(const UniValue& params, bool fHelp, const CPubKey& mypk); diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 6eeafd012..e53fbec1e 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -6255,49 +6255,6 @@ UniValue setpubkey(const UniValue& params, bool fHelp, const CPubKey& mypk) return result; } -UniValue getbalance64(const UniValue& params, bool fHelp, const CPubKey& mypk) -{ - set setAddress; vector vecOutputs; - UniValue ret(UniValue::VOBJ); UniValue a(UniValue::VARR),b(UniValue::VARR); CTxDestination address; - if (!EnsureWalletIsAvailable(fHelp)) - return NullUniValue; - - const CKeyStore& keystore = *pwalletMain; - CAmount nValues[64],nValues2[64],nValue,total,total2; int32_t i,segid; - if (!EnsureWalletIsAvailable(fHelp)) - return NullUniValue; - if (params.size() > 0) - throw runtime_error("getbalance64\n"); - total = total2 = 0; - memset(nValues,0,sizeof(nValues)); - memset(nValues2,0,sizeof(nValues2)); - LOCK2(cs_main, pwalletMain->cs_wallet); - pwalletMain->AvailableCoins(vecOutputs, false, NULL, true); - BOOST_FOREACH(const COutput& out, vecOutputs) - { - nValue = out.tx->vout[out.i].nValue; - if ( ExtractDestination(out.tx->vout[out.i].scriptPubKey, address) ) - { - segid = (hush_segid32((char *)CBitcoinAddress(address).ToString().c_str()) & 0x3f); - if ( out.nDepth < 100 ) - nValues2[segid] += nValue, total2 += nValue; - else nValues[segid] += nValue, total += nValue; - //fprintf(stderr,"%s %.8f depth.%d segid.%d\n",(char *)CBitcoinAddress(address).ToString().c_str(),(double)nValue/COIN,(int32_t)out.nDepth,segid); - } else fprintf(stderr,"no destination\n"); - } - ret.push_back(Pair("mature",(double)total/COIN)); - ret.push_back(Pair("immature",(double)total2/COIN)); - for (i=0; i<64; i++) - { - a.push_back((uint64_t)nValues[i]); - b.push_back((uint64_t)nValues2[i]); - } - ret.push_back(Pair("staking", a)); - ret.push_back(Pair("notstaking", b)); - return ret; -} - - extern UniValue dumpprivkey(const UniValue& params, bool fHelp, const CPubKey& mypk); // in rpcdump.cpp extern UniValue convertpassphrase(const UniValue& params, bool fHelp, const CPubKey& mypk); extern UniValue importprivkey(const UniValue& params, bool fHelp, const CPubKey& mypk); From 5ecd7629ec7e130bacacd77590cc4f18b73f9a78 Mon Sep 17 00:00:00 2001 From: Duke Date: Sun, 26 Oct 2025 09:11:07 -0400 Subject: [PATCH 02/11] Make error message more general for any chain --- src/wallet/rpcdump.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index eb32c244f..d9f265927 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -704,7 +704,7 @@ UniValue dumpwallet_impl(const UniValue& params, bool fHelp, bool fDumpZKeys) throw JSONRPCError(RPC_INTERNAL_ERROR, e.what()); } if (exportdir.empty()) { - throw JSONRPCError(RPC_WALLET_ERROR, "Cannot export wallet until the hushd -exportdir option has been set"); + throw JSONRPCError(RPC_WALLET_ERROR, "Cannot export wallet until the -exportdir option has been set"); } std::string unclean = params[0].get_str(); std::string clean = SanitizeFilename(unclean); From 867ba4159baf803b19cf36db81dbc31cda7ab472 Mon Sep 17 00:00:00 2001 From: Duke Date: Sun, 26 Oct 2025 09:13:44 -0400 Subject: [PATCH 03/11] Avoid ASMap Health Checks if ac_clearnet=0 #475 --- src/net.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/net.cpp b/src/net.cpp index 4b52c796d..efac15c12 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -45,6 +45,7 @@ #include using namespace hush; extern int32_t HUSH_TESTNODE; +extern uint8_t ASSETCHAINS_CLEARNET; // Dump addresses to peers.dat every 5 minutes (300s) // Satoshi originally used 10 seconds(!), did they know something Peter Wuille didn't? @@ -1653,7 +1654,7 @@ int64_t PoissonNextSend(int64_t now, int average_interval_seconds) void ASMapHealthCheck() { // No health check if clearnet is disabled - if (!GetBoolArg("-clearnet", DEFAULT_CLEARNET)) { + if (ASSETCHAINS_CLEARNET == 0 || !GetBoolArg("-clearnet", DEFAULT_CLEARNET)) { return; } From 812f33ff8c4d2b7dcf7efc7e63f46096f00c7fa3 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Wed, 10 Dec 2025 13:10:45 -0500 Subject: [PATCH 04/11] Removed explorer.hush.land from README.md The domain hush.land is up for sale and does not run any more Hush services. --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 4a7cfd389..b1a7cbbbf 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,6 @@ cd hush3 The links for the Official Hush explorers: * [explorer.hush.is](https://explorer.hush.is) - * [explorer.hush.land](https://explorer.hush.land) # What is SilentDragon? From daf697599aa3cf8da8c84fd4837ce493877f17c1 Mon Sep 17 00:00:00 2001 From: Duke Date: Wed, 10 Dec 2025 23:52:11 -0500 Subject: [PATCH 05/11] Parallelize randomx compile and print some timings When using "./build.sh -jX" we now pass the number of jobs to use to the RandomX compilation which greatly speeds it up. --- util/build.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/util/build.sh b/util/build.sh index 6bf7a6d69..9a0221dd4 100755 --- a/util/build.sh +++ b/util/build.sh @@ -128,7 +128,7 @@ ld -v HOST="$HOST" BUILD="$BUILD" "$MAKE" "$@" -C ./depends/ V=1 -./autogen.sh +time ./autogen.sh CONFIG_SITE="$PWD/depends/$HOST/share/config.site" ./configure "$HARDENING_ARG" "$LCOV_ARG" "$TEST_ARG" "$MINING_ARG" $CONFIGURE_FLAGS CXXFLAGS='-g' @@ -147,9 +147,10 @@ then else mkdir build && cd build cmake -DARCH=native .. - make + # pass along potential -jX and other args + time make "$@" fi cd $WD -"$MAKE" "$@" V=1 +time "$MAKE" "$@" V=1 From 8d688a49a51515c24e15baff22cd0087c14ad74a Mon Sep 17 00:00:00 2001 From: Duke Date: Sat, 20 Dec 2025 07:30:08 -0500 Subject: [PATCH 06/11] Update relnotes --- doc/relnotes/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/relnotes/README.md b/doc/relnotes/README.md index cb9172162..c85c387c0 100644 --- a/doc/relnotes/README.md +++ b/doc/relnotes/README.md @@ -12,6 +12,8 @@ evil organizations. They also use all your "private" repos to train their AI. # Hush 3.10.5 "" +This is an OPTIONAL but RECOMMENDED upgrade. + * Concurrent `z_sendmany` now works * A longstanding bug relating to run multiple `z_sendmany` operations at once has been fixed. You can now queue up many `z_sendmany` operations @@ -25,6 +27,7 @@ evil organizations. They also use all your "private" repos to train their AI. release, which caused some nodes to be unable to sync. * This release fixes this issue. * Updated test framework and tests which allowed the fixing of the `z_sendmany` bug above + * Faster compiling of RandomX internals # Hush 3.10.4 "Hazy Hākuturi" From 2fd88b65e3749b5b39c7e44382473cf8dbca464f Mon Sep 17 00:00:00 2001 From: Duke Date: Thu, 25 Dec 2025 12:05:08 -0500 Subject: [PATCH 07/11] Be clear that 0 and 10 are included as valid donation percentages --- src/wallet/asyncrpcoperation_shieldcoinbase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/asyncrpcoperation_shieldcoinbase.cpp b/src/wallet/asyncrpcoperation_shieldcoinbase.cpp index 34d87b58f..a4e4cfecc 100644 --- a/src/wallet/asyncrpcoperation_shieldcoinbase.cpp +++ b/src/wallet/asyncrpcoperation_shieldcoinbase.cpp @@ -69,7 +69,7 @@ AsyncRPCOperation_shieldcoinbase::AsyncRPCOperation_shieldcoinbase( } if (donation < 0 || donation > 10 ) { - throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid donation percentage, must be an integer between 0 and 10"); + throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid donation percentage, must be an integer between 0 and 10 inclusive"); } // Check the destination address is valid for this network i.e. not testnet being used on mainnet From 874e89e4f031f268c1dcad7e6e03a1e58052ed11 Mon Sep 17 00:00:00 2001 From: Duke Date: Thu, 25 Dec 2025 12:06:56 -0500 Subject: [PATCH 08/11] Only validate donation zaddrs if donating --- src/wallet/asyncrpcoperation_shieldcoinbase.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/wallet/asyncrpcoperation_shieldcoinbase.cpp b/src/wallet/asyncrpcoperation_shieldcoinbase.cpp index a4e4cfecc..4c200d19a 100644 --- a/src/wallet/asyncrpcoperation_shieldcoinbase.cpp +++ b/src/wallet/asyncrpcoperation_shieldcoinbase.cpp @@ -216,17 +216,17 @@ bool ShieldToAddress::operator()(const libzcash::SaplingPaymentAddress &zaddr) c m_op->builder_.AddTransparentInput(COutPoint(t.txid, t.vout), t.scriptPubKey, t.amount); } } - //TODO: TESTING zaddr only, only use on regtest - //TODO: randomly select from a set - auto dzaddr = "zregtestsapling1y30nwg0clsu6gcyrnvht8hdyfk3vwtszlh6kc4z5hv9hmpxzg2g0nx7c60xeecggm9x9gma96t4"; - auto donationZaddr = DecodePaymentAddress(dzaddr); - if (!IsValidPaymentAddress(donationZaddr)) { - throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid donation zaddr, Unknown address format: ") + dzaddr); - } - if(donation) { //if donation>0, send X% of value to zaddr and Y% of of value to donatezaddr where X+Y=100% + //TODO: TESTING zaddr only, only use on regtest + //TODO: randomly select from a set + auto dzaddr = "zregtestsapling1y30nwg0clsu6gcyrnvht8hdyfk3vwtszlh6kc4z5hv9hmpxzg2g0nx7c60xeecggm9x9gma96t4"; + auto donationZaddr = DecodePaymentAddress(dzaddr); + if (!IsValidPaymentAddress(donationZaddr)) { + throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid donation zaddr, Unknown address format: ") + dzaddr); + } + // calculate donation as a double then convert to CAmount double amount = (static_cast(donation)/100)*static_cast(sendAmount); CAmount donationAmount = static_cast(amount); From edd856a51a115bff76aadaac9173ee29d16ff98c Mon Sep 17 00:00:00 2001 From: Duke Date: Mon, 29 Dec 2025 19:14:57 -0500 Subject: [PATCH 09/11] Show autoconf version in build output --- util/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/util/build.sh b/util/build.sh index 9a0221dd4..ea7acfb33 100755 --- a/util/build.sh +++ b/util/build.sh @@ -125,6 +125,7 @@ eval "$MAKE" --version | head -n2 as --version | head -n1 as --version | tail -n1 ld -v +autoconf --version HOST="$HOST" BUILD="$BUILD" "$MAKE" "$@" -C ./depends/ V=1 From e9b185f702240aefc64d2c4842199ef3e6fbbda1 Mon Sep 17 00:00:00 2001 From: Duke Date: Mon, 29 Dec 2025 19:18:57 -0500 Subject: [PATCH 10/11] Allow custom compiler via environment variable for src/cc The build system supports using CC to control the C compiler and CXX to control the c++ compiler used but src/cc was hardcoded to use the binary "gcc". Now it respects the custom value of $CC environment variable if it exists. --- src/cc/Makefile_custom | 1 - util/build.sh | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cc/Makefile_custom b/src/cc/Makefile_custom index 9db01b106..d3ecf9c25 100644 --- a/src/cc/Makefile_custom +++ b/src/cc/Makefile_custom @@ -1,5 +1,4 @@ SHELL = /bin/sh -CC = gcc CC_DARWIN = g++-8 CC_WIN = x86_64-w64-mingw32-gcc-posix CC_AARCH64 = aarch64-linux-gnu-g++ diff --git a/util/build.sh b/util/build.sh index ea7acfb33..51c2c5687 100755 --- a/util/build.sh +++ b/util/build.sh @@ -137,7 +137,7 @@ CONFIG_SITE="$PWD/depends/$HOST/share/config.site" ./configure "$HARDENING_ARG" WD=$PWD cd src/cc echo $PWD -./makecustom +CC=${CC:-gcc} ./makecustom cd $WD # Build RandomX From 93c0aa065995bc317812f00995a5f50911e329fb Mon Sep 17 00:00:00 2001 From: Duke Date: Mon, 29 Dec 2025 20:18:01 -0500 Subject: [PATCH 11/11] Use custom compiler env vars CC/CXX for linux hosts when building --- depends/hosts/linux.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/depends/hosts/linux.mk b/depends/hosts/linux.mk index 3805d2307..4895b1e30 100644 --- a/depends/hosts/linux.mk +++ b/depends/hosts/linux.mk @@ -10,15 +10,15 @@ linux_debug_CXXFLAGS=$(linux_debug_CFLAGS) linux_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC ifeq (86,$(findstring 86,$(build_arch))) -i686_linux_CC=gcc -m32 -i686_linux_CXX=g++ -m32 +i686_linux_CC=$(CC) -m32 +i686_linux_CXX=$(CXX) -m32 i686_linux_AR=ar i686_linux_RANLIB=ranlib i686_linux_NM=nm i686_linux_STRIP=strip -x86_64_linux_CC=gcc -m64 -x86_64_linux_CXX=g++ -m64 +x86_64_linux_CC=$(CC) -m64 +x86_64_linux_CXX=$(CXX) -m64 x86_64_linux_AR=ar x86_64_linux_RANLIB=ranlib x86_64_linux_NM=nm