Commit Graph
142 Commits
Author SHA1 Message Date
DanSandClaude Opus 4.8 aff6101987 hygiene: Phase 2 — DragonX-authored cleanup (13 findings)
Second phase of the code-hygiene remediation, covering the items the
DragonX team introduced or the rebrand missed. No consensus behavior
changes; validated on a local self-mining node.

Log cruft:
- chainparams: route the startup ">>>>>>>>>>" banner and the port line
  through LogPrintf/LogPrint("net") instead of fprintf(stderr).
- pow: drop the fprintf(stderr) hash-mismatch dump that duplicated the
  LogPrintf copy verbatim.
- miner: gate the RandomXDatasetManager per-alloc/per-VM address dumps and
  MemDiag /proc reads behind LogPrint("randomx"); keep a one-line
  "allocated shared dataset (N GB)" summary at default verbosity.

Named constants (single source of truth in wallet.h):
- DEFAULT_AUTOSHIELD_FEE/INTERVAL, MIN_AUTOSHIELD_INTERVAL,
  DEFAULT_AUTOSHIELD_MIN_UTXOS, AUTOSHIELD_MIN/MAX_FEE for the autoshield
  option parsing and help text (were bare 10000/25/5 literals repeated
  across init.cpp and wallet.h).
- AUTO_OP_TARGET_HEIGHT_OFFSET replaces the three copy-pasted
  `blockHeight + 5` async-op scheduling offsets.
- AUTO_OP_EXPIRY_DELTA replaces the three per-file *_EXPIRY_DELTA=15
  constants (sweep/consolidation/autoshield) with one shared value.
- Move DEFAULT_AUTOSHIELD_FEE out of the op header into wallet.h so it no
  longer collides when both headers are included.

Error surfacing:
- init: report clamped/out-of-range -autoshieldinterval/-autoshieldfee via
  InitWarning() (surfaces to GUI/log) instead of fprintf(stderr).

Rebrand / dead foreign-chain code (approved removals):
- server: drop the HUSH3 special-cases in stop() and HelpExampleCli; the
  cli example now shows "dragonx-cli" instead of "hush-cli".
- getinfo (misc): remove the stale dPoW notarization block (notarized,
  prevMoMheight, notarizedhash, notarizedtxid, notarizedtxid_height,
  HUSHnotarized_height, notarized_confirms) — DragonX is a private chain
  from genesis with no active dPoW. Also fixes the hardcoded "HUSH3" that
  made getinfo query a foreign chain's notarization.
- delete the dead Komodo notary RPCs getera/getdragonjson/
  getnotarysendmany/geterablockheights (getera returned 0;
  getnotarysendmany was marked "this is broke") and their registrations.
- remove the dead ASSETCHAINS_EQUIHASH reporting branches in getinfo and
  getmininginfo — DragonX is RandomX-only.

chainparams: document why the upstream Equihash params and the literal
Bitcoin genesis are retained under RandomX (do not "fix" them).

Deferred: the hdSeedOrigin int->string switch in z_autoshieldstatus
(no shared helper exists to reuse; low value).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-27 12:24:04 -05:00
DanSandClaude Opus 4.8 e3247d946e cleanup: rebrand residual user-facing "HUSH" strings to DragonX
Sweeps the leftover coin-name strings in RPC help text, RPC output, and log
messages that the currency-unit change didn't cover:

- RPC help: "mining reward amount in HUSH" -> DRAGONX (mining.cpp x2);
  "at least minbal HUSH" -> DRAGONX (rpcwallet.cpp); "the HUSH address" /
  "(string) HUSH address" -> DragonX (rawtransaction.cpp)
- RPC output: the SMART_CHAIN_SYMBOL[0]==0 ? "HUSH" : SYMBOL coin-name fallback
  (crosschain/misc/mining/blockchain) -> "DRAGONX"; the notarizations JSON key
  make_pair("HUSH", ...) -> "DRAGONX"
- Logs: "HUSH blocktime changing", "stopping HUSH HTTP/REST/RPC",
  "HUSH raw magic=" -> DragonX

Left untouched (verified): the 82 "HUSH3"/ishush3 chain-symbol consensus checks;
hush_globals.h CURRENCIES[] price-oracle basket (internal lookup, dead feature
on DragonX); hush.h notarization debug printf; a commented-out cout in main.cpp.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 15:37:57 -05:00
DanSandClaude Opus 4.8 a520441e3a fix(rpc): guard z_validateaddress against null pwalletMain under -disablewallet
#11 (HIGH) z_validateaddress locked LOCK2(cs_main, pwalletMain->cs_wallet) with
no availability guard; under -disablewallet pwalletMain is NULL, so the member
deref SIGSEGVs the daemon (execute() only catches std::exception). Use the
null-safe LOCK2 idiom already used by sibling RPCs so validation still works
without a wallet.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 11:21:28 -05:00
Duke 7e63e2f013 We call them HACs now 2025-06-27 05:32:12 -04:00
Duke f5cae3b403 getinfo rpc needs a cs_wallet lock
Without it we get an AssertLockHeld when calling GetKeyPoolSize .
We could probably make this lock apply to less code, possibly only
the single line that calls GetKeyPoolSize() needs it.
2024-09-13 04:37:48 -04:00
Duke 64f59552b3 They are called Hush Arrakis Chains (HACs) now 2024-03-15 13:32:46 -04:00
onryo 58b65f9670 Update copyrights 2024-02-27 23:59:59 +01:00
Duke b41785a684 Delete more CCs #381 2024-02-10 22:56:34 -05:00
Duke 620ca45efc Cleanup notary code 2023-11-22 09:48:09 -05:00
Duke e2521ac2fa Remove unused sproutfunds argument 2023-09-03 08:48:06 -04:00
Duke bd38a12512 Remove useless sprout key from coinsupply RPC 2023-09-03 08:40:06 -04:00
Duke e033a2e6eb Update copyrights to 2023 2023-02-09 18:06:03 -05:00
Duke Leto 1b7f200d29 Fix typo in getsnapshot docs 2022-12-01 14:55:53 -05:00
Duke Leto 9bd41875d7 Return getinfo algo as a single key 2022-07-12 23:20:57 -04:00
jahway603 f55b77f652 changed algo N & K to equihash N & K 2022-07-12 17:19:00 -04:00
jahway603 e6ec40190c algo now reflects N & K if equihash 2022-07-06 11:50:39 -04:00
jahway603 dfc3056ede algo twerking 2022-07-06 01:08:55 -04:00
jahway603 642ac9bda1 algo all day long 2022-07-06 00:12:13 -04:00
Duke Leto b4cf845bf3 New listaddresses RPC and z_exportwallet RPC now can be called during RPC warmup 2021-09-02 12:22:04 -04:00
Duke Leto b30fae8238 clean up some more 2021-09-01 11:13:08 -04:00
Duke Leto e424a997a7 Cleanup 2021-08-26 00:08:37 -04:00
Duke Leto 63e1ede162 Also report work queue threads in rpcinfo 2021-08-09 11:51:25 -04:00
Duke Leto 236d79b3f8 Add rpcinfo rpc to debug deadlocks
We seem to have deadlock bugs in our RPC system, most likely inherited from ZEC or BTC.
Since some Hush RPC's take longer (such as anything with Sietch protections), the deadlocks
are more likely to occur. Eventually all RPC slots are used up and no more RPC commands
can be sent to hushd. This is why the "plz_stop" feature was implemented, but that is just
a workaround to restart the server. We must find and fix the root cause.

This rpc will allow us to see when we are getting close to our maximum work queue depth
and hopefully help us learn exactly what is happening.
2021-08-05 12:44:30 -04:00
Duke Leto 5a3f5b4152 . 2021-07-10 14:05:20 -04:00
Duke Leto 4a536d62dc Update copyrights 2021-04-17 13:03:22 -04:00
Duke Leto 1f4c4f27e6 Refactoring 2021-01-24 08:51:17 -05:00
Duke Leto 482990936f Cleanup 2021-01-23 22:30:56 -05:00
Duke Leto 2e31b7d2dc lol 2021-01-23 22:18:57 -05:00
Duke Leto d5477ab3ab Disable build_date for now, which causes race condition bugs in the build system 2021-01-07 15:57:34 -05:00
Duke Leto e3a68dfdfb Hush is the extreme future, Komodo is the KYC past 2020-12-16 22:49:58 -05:00
Duke Leto c2eec1f7a7 Remove Komodo interest code and various other improvements 2020-12-15 13:14:54 -05:00
Duke Leto 7aacd3dfce Merge branch 'syncbug' into dev
Conflicts:
	src/metrics.cpp
2020-12-11 00:35:14 -05:00
Duke Leto 5b07e01437 Various things 2020-12-11 00:33:56 -05:00
Duke Leto b58c15b9fb update copyrights 2020-12-10 07:45:36 -05:00
Duke Leto 575e5351e5 fix compiler unhappiness 2020-12-10 06:56:46 -05:00
Duke Leto 31fc4099df HUSH NSPV 2020-12-09 19:22:51 -05:00
Duke Leto 4f27af7545 Hush DPoW won't attack their own villages, lulz 2020-12-07 08:24:09 -05:00
Duke Leto 8db68f55c6 Cleanup 2020-12-07 08:21:38 -05:00
Duke Leto b7398f812c Winners write the history books 2020-12-06 18:53:32 -05:00
Duke Leto 6533b7740e update validateaddress help 2020-12-06 15:53:47 -05:00
Duke Leto aae0336733 Playin' dat Long Game with dat Longest Chain 2020-12-06 15:47:04 -05:00
Duke Leto 1f636f4d39 Me love you longest chain 2020-12-06 15:43:56 -05:00
Duke Leto 62ddb079bc Remove JUMBLR dingleberries 2020-12-06 15:42:03 -05:00
Duke Leto c737c0dfaf We call them Hush Smart Chains around here 2020-11-15 11:54:06 -05:00
Duke Leto a23b0e8388 Remove the unsupported concept of staked notaries 2020-11-15 10:28:53 -05:00
Duke Leto 52240c64b1 Tweak test suite and rename to HUSH_INSYNC 2020-11-14 20:00:23 -05:00
Duke Leto ce3039d96c Delete the failed jl777 experiment called JUMBLR 2020-10-25 21:32:27 -04:00
Duke Leto 7524c64024 Our intrepid warrior gazed at his Dragon and both knew what was needed 2020-10-25 19:06:09 -04:00
Duke Leto be16f80abc Hush Full Node is now GPLv3
Any projects which want to use Hush code from now on will need to be licensed as
GPLv3 or we will send the lawyers: https://www.softwarefreedom.org/

Notably, Komodo (KMD) is licensed as GPLv2 and is no longer compatible to receive
code changes, without causing legal issues. MIT projects, such as Zcash, also cannot pull
in changes from the Hush Full Node without permission from The Hush Developers,
which may in some circumstances grant an MIT license on a case-by-case basis.
2020-10-21 07:28:10 -04:00
Miodrag Popović 9a3e68a832 small fix for Mac build 2020-09-29 16:28:50 +02:00