Commit Graph
38 Commits
Author SHA1 Message Date
DanSandClaude Opus 5.5 93f8b3768b rpc: read the peer list under cs_vNodes in getinfo/getnetworkinfo; z_getoperationstatus without cs_main
From origin/perf/wallet-scan-rpc-costs, both still on dev:

- getinfo and getnetworkinfo read vNodes.size() and iterated vNodes without cs_vNodes, racing the
  network threads that add and remove peers (a reallocation mid-iteration is undefined behaviour).
  Both now count through one helper that takes the lock.
- z_getoperationstatus and z_listoperationids took cs_main and cs_wallet, though they only read the
  async queue (which has its own mutex) and each operation's status. GUIs poll them, so every poll
  contended with block validation. Regtest: z_getoperationstatus reports a running sweep normally.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-20 20:10:01 -06:00
DanSandClaude Opus 4.8 b7060c7de0 hygiene: Phase 3 — dead-code excision (~7,100 lines)
Third phase of the code-hygiene remediation: remove provably-dead code.
Each in-file deletion was adversarially verified (a per-finding investigator
plus a skeptic that greps the tree to refute deletability); the sanity grep
confirms zero dangling references, and the tree builds and self-mines clean.

Removed wholesale:
- src/cc/dapps/ (9 files, ~6,939 lines): a git-tracked but never-built Komodo
  DEX / z-migration tool (hushdex.c, zmigrate.c, cJSON.c, ...). Nothing in
  Makefile.am/configure.ac references it.

In-file dead code:
- pow.cpp: the `#ifdef original_algo` oldRT_CST_RST function (the macro is
  never defined in source or build flags) and two `if ( 0 )` debug blocks.
- walletdb.cpp: the "orphaned staking transaction" cleanup path (deadTxns) —
  DragonX is RandomX PoW with no staking, so the guard is always false and the
  block never runs; also drop the now-unused static/extern decls.
- cc/eval.h: the ProcessCC / Eval::ImportCoin / ImportPayout / DisputePayout
  declarations that have no definition anywhere in the tree.
- rpc/crosschain.cpp: the crosschainproof stub RPC (returned {} unconditionally)
  and its registrations in rpc/server.cpp, rpc/server.h, rpc/client.cpp.
- coins.cpp: the commented-out `//TODO: delete` Sprout PushAnchor template.
- wallet.cpp: the permanently-zero KMD `interest2` term in CreateTransaction.
- rpc/net.cpp: hush_longestchain's always-zero `n` var (num > (n>>1) => num>0)
  and its `if ( 0 )` debug branch.
- hush_nSPV.h / hush_nSPV_fullnode.h: three `if ( 0 && ... )` dead debug branches.
- net.cpp, crypter.h, saplingconsolidation.cpp (dup set_error_code),
  shieldcoinbase.cpp (`donation < 0` on a uint8_t), cclib.cpp (unused
  FAUCET2SIZE): single-line dead-code fixes.

Deliberately NOT touched (verification refuted the audit's "dead on DragonX"
premise): the ~2,250-line HUSH3 checkpoint block, the miner notary/timelock
paths, and hush_gateway.h — all reachable at runtime via -ac_name / -ac_*
args (the inherited Komodo assetchain model), and hush_gateway's
hush_opretvalidate is called from ConnectBlock (consensus). Dropping those
requires a deliberate decision to remove HAC/HUSH3 mode, tracked separately.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-27 13:20:51 -05:00
DanSandClaude Opus 4.8 53b1fe332b Rebrand cleanups: getpeerinfo help example + 1.0.3 debian changelog entry
net.cpp: getpeerinfo help address example 18030->21768 and 'Hush server'->'DragonX server'. debian/changelog: prepend 1.0.3 release entry summarizing IBD speedups, witness fix, bulk streaming, seed phrases, assumeutxo removal. NOTE net.cpp change needs a daemon rebuild to surface in runtime RPC help. Staged on 176; not pushed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 06:35:46 +02:00
DanS 85c8d7f7dd Rebrand hush3 to DragonX and share RandomX dataset across mining threads
Minimal rebrand (see compliant-rebrand branch for full rebrand):
- Rename binaries: hushd/hush-cli/hush-tx → dragonxd/dragonx-cli/dragonx-tx
- Default to DRAGONX chain params without -ac_* flags (randomx, blocktime=36, private=1)
- Update configure.ac: AC_INIT([DragonX],[1.0.0])
- Update client version string and user-agent to /DragonX:1.0.0/
- Add chainparams.cpp with DRAGONX network parameters
- Update build.sh, miner.cpp, pow.cpp for DragonX
- Add bootstrap-dragonx.sh utility script
- Update .gitignore for release directory

Share single RandomX dataset across all mining threads:
- Add RandomXDatasetManager with readers-writer lock, reducing RAM from
  ~2GB per thread to ~2GB total plus ~2MB per thread for the VM scratchpad
- Add LogProcessMemory() diagnostic helper for Linux and Windows
2026-03-04 18:42:42 -06:00
Duke 18e3364bc2 Make docs for addnode/disconnectnode correct for HACs #376 2024-04-19 07:32:23 -04:00
onryo 58b65f9670 Update copyrights 2024-02-27 23:59:59 +01:00
Duke 20fdc0e4fe Get rid of deprecation entirely which allows current code to run past block height 5555555 2023-12-27 12:57:35 -05:00
Duke c1baab7b8a Rate limit incoming addr p2p messages 2023-03-16 22:33:25 -04:00
Duke e033a2e6eb Update copyrights to 2023 2023-02-09 18:06:03 -05:00
Duke 6f8bce9b3a Fix bug where setban banned a node for 0 seconds 2023-01-12 23:59:11 -05:00
zanzibar 512da314a5 BIP155 (addrv2)
Tor v3 + i2p
2023-01-06 15:23:22 +00:00
Jonathan "Duke" Leto 5d2307a709 Update copyrights to 2022 2022-09-19 15:45:30 -07:00
Duke Leto d8481722ad Add time_remaining to listbanned output
Example output:

hush-cli listbanned
[
  {
    "address": "1.2.3.4/255.255.255.255",
    "banned_until": 1640921730,
    "time_remaining": 86395
  }
]
2021-12-29 22:36:02 -05:00
Duke Leto b7be25e2d5 Thanks to hellcatz for this patch 2021-06-26 14:42:40 -04:00
Duke Leto 860541d2e4 Show relay status in getpeerinfo 2021-05-04 12:25:12 -04:00
Duke Leto 48159bd650 Update network RPC docs 2021-02-08 08:56:10 -05:00
Duke Leto 000ef4ac91 Keeping HUSH on the down low 2021-01-27 13:39:27 -05:00
Duke Leto 1488a03f1c Improved TLS error handling and teach getpeerinfo about cipher of each connection 2021-01-24 15:06:34 -05:00
Duke Leto cde6d33ad1 The term 'whitelist' is racist and so we choose to call this feature 'allowlist' 2021-01-10 10:46:22 -05:00
Duke Leto b58c15b9fb update copyrights 2020-12-10 07:45:36 -05:00
Duke Leto 86bd499818 Tweaks 2020-12-09 19:20:26 -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 c737c0dfaf We call them Hush Smart Chains around here 2020-11-15 11:54:06 -05: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
miodragpop 56d9c00749 asmap bucketing ported from Komodo 2020-10-02 11:10:26 +02:00
Miodrag Popović 9a3e68a832 small fix for Mac build 2020-09-29 16:28:50 +02:00
miodragpop 62f67821ec tls implemented 2020-09-29 13:08:45 +02:00
Duke Leto e87101bd1f RPC help fixes 2020-09-20 11:16:42 -04:00
Duke Leto d4883bce7c More timedate changes from KMD 0.6 2020-07-09 10:31:12 -04:00
Duke Leto 1f03e53f38 rpc/net.cpp changes 2019-12-12 17:21:54 -05:00
Duke Leto f5b4a57702 Fix -clientname, which must be used at runtime, not compile-time 2019-06-19 13:53:03 -04:00
jl777 f093390948 -extern 2019-05-16 06:06:33 -11:00
jl777 0ea9ae3c05 Update copyright to 2019 2018-12-31 21:41:05 -11:00
miketout 6e2a502b0e Merge of Komodo and Verus Technologies Post Sapling, Pre-VerusPoP with Support for Time locked coinbases 2018-11-14 16:40:10 -08:00
miketout 9feb4b9e08 Major updates integration from all upstreams 2018-09-18 14:33:53 -07:00
Wladimir J. van der Laan a9496b08b6 rpc: Register calls where they are defined
Split out methods to every module, apart from 'help' and 'stop' which
are implemented in rpcserver.cpp itself.

- This makes it easier to add or remove RPC commands - no longer everything that includes
    rpcserver.h has to be rebuilt when there's a change there.
- Cleans up `rpc/server.h` by getting rid of the huge cluttered list of function definitions.
- Removes most of the bitcoin-specific code from rpcserver.cpp and .h.

Continues #7307 for the non-wallet.
2018-07-18 11:07:18 -06:00
Daniel Cousens 4519a766b6 move rpc* to rpc/ 2018-07-18 11:07:16 -06:00