RunSaplingSweep returned early, and retried the next block, whenever a
consolidation round was running or due within 5 blocks, but kept no memory of
having given way. With consolidationinterval=5 the "due within 5 blocks" test is
always true, and with longer intervals a long consolidation round could fill the
remaining blocks, so on a busy wallet the sweep could go a whole run without
dispatching while deposits piled up.
Measured on the 2026-11-29 stress fleet (exchange-style wallet, zsweepinterval=5,
consolidationinterval=5, 150 deposit notes): in 20 minutes consolidation ran
4 rounds / 11 txs and the sweep 0, with 45 "not sweeping since consolidation"
lines; the deposit notes never moved.
A due sweep now gives way once and records it in fSweepWaiting. While that is
set, RunSaplingConsolidation starts no new round (nextConsolidation is left
alone, so that round runs right after the sweep), and the sweep skips the
5-block blackout. The flag is cleared when the sweep is dispatched, disabled, or
skipped for a locked wallet, so it cannot hold consolidation off once there is
no sweep to wait for. z_sweepstatus reports it as waiting_for_consolidation.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The automated ops set nExpiryHeight to buildHeight + 15. The wallet only
rebroadcasts its unconfirmed transactions every 0-30 minutes (randomised, for
privacy), and only those a few minutes older than the last block, while each
transaction is relayed to a random half of the node's peers. A tx that missed
the miners on its first relay was therefore almost never retried before block
+15 (~9 minutes on mainnet), and expired. The op had already logged "Committed"
and, for zsweep, added it to amount_swept; the notes reappeared as unspent and
were swept again a round later. Nothing was lost, but z_sweepstatus overstated
progress, and manual z_sendmany calls from the deposit addresses kept colliding
with the re-sweeps ("bad-txns-shielded-requirements-not-met").
Measured on the 2026-11-29 stress fleet (exchange-style node with ~5 peer
connections): 38 of 184 sweep txs (21%) never confirmed; the log shows 1810
"ignoring expired tx" lines from the rebroadcast pass.
The three ops now use -txexpirydelta (default 200), the same window every other
wallet transaction gets, through AutoOpExpiryDelta(). Their NU-straddle guards
use the same window, so near a network upgrade they pause for the full expiry
window instead of 15 blocks. This applies to v1.2.0 too (its per-op
*_EXPIRY_DELTA constants were also 15); it is not a v1.3.0 regression.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
developer-notes.md and tor.md still gave 18030 (the HUSH3 port) as the
DragonX P2P port, contradicting the README. DragonX derives 21768 from
its chain parameters (hush_utils.h), as contrib/seeds shows. The tor.md
torrc example now maps 21768 to 127.0.0.1:21768, matching what
torcontrol.cpp's ADD_ONION uses (GetListenPort() for both).
sdl_checkpoints.pl: the "another chain" example now passes -ac_name,
since ./src/dragonx-cli is already the default.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
User-visible text:
- validateaddress help: "the given DragonX address" / "The DragonX
address validated".
- getblockmerkletree help and error: "a given block height" / "Invalid
block height parameter".
- ContextualCheckBlockHeader debug log: "HAC nbits" -> "nbits".
Comments and docs: HAC / Arrakis chain -> "smart chain" or "chain"
(src, contrib, util, doc/DEVELOPING.md, doc/randomx.md); the HAC and
Arrakis lines in doc/relnotes/README.md and contrib/debian/changelog
say "smart chain". Older "Hush Smart Chain" history is left as is.
Dead scripts removed: src/hush-arrakis-chain(.bat), src/smartchains and
src/sc/{koolaid,kush,zex}. They all start ./hushd, which the build no
longer produces, and none is in the release archive or the deb package.
The Dockerfile symlink to the launcher is dropped, and the rpc-test
framework defaults to src/dragonxd like util.py already does.
README: P2P port is 21768 (what the network and contrib/seeds use),
not 18030.
No identifiers, options (-ac_*), consensus code or licence headers are
changed. The miner.cpp change is a comment only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
z_consolidate creates and broadcasts transactions, so like z_sendmany
and z_shieldcoinbase it must not run in safe mode. Its fee argument is
in DRGX, like z_sendmany's, while -consolidationtxfee and every amount
in z_consolidationstatus are in puposhis; the help and the doc now say
so.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With -zsweep=1 and -consolidation=0, z_consolidate consolidated every
address: the sweep-address substitution sat under
fSaplingConsolidationEnabled, and an explicit address list skipped the
sweep-address rule. Sweep and consolidation then fight over the same
notes and pay fees for nothing. Apply the rule whatever -consolidation
is, and have z_consolidate refuse any address but the sweep address
while zsweep is on.
The branch also started checking -consolidatesaplingaddress with
-consolidation=0, so an old config with a stale, watch-only or mistyped
address, which used to be ignored, stopped startup. Keep the InitError
with -consolidation=1; with it off, warn and drop the address (with
zsweep on, use the sweep address instead).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The round took its anchor from GetSaplingNoteWitnesses, a majority vote
over the planned notes alone that never looks at the chain. A real
wallet has had 108 notes desynced onto one root the chain never had, at
the same address as 104 healthy ones. Smallest-first planning can pick
a batch that is mostly desynced notes. The vote then made the healthy
notes the "unusable" ones, and the tx was proved at a non-anchor: Build
succeeds, since witnesses and anchor agree, but CommitTransaction adds
it to the wallet before the mempool refuses it. Its notes then look
spent, and since the plan is nearly deterministic this recurs every
round. One failed tx also ended the round for every other address.
PlanSaplingConsolidationSpends now plans over the notes that can be
spent together. A planned note is used only if its newest witness root
is a Sapling anchor the chain holds (GetSaplingAnchorAt on pcoinsTip,
the check consensus makes) and is its address's anchor: the tip's root
if any planned note is there, else the chain anchor most share. Other
planned notes are left out and the round is re-planned until none are.
The planner is pure apart from its callbacks and is tested, including
a desynced majority. GetSaplingNoteLatestWitness is pass 1 of
GetSaplingNoteWitnesses, split out; that function is unchanged.
A tx that fails to build or commit now only skips the rest of its own
address's txs; the first failure is the round's error.
Skipped notes are logged once per round with a count and the first
five outpoints, instead of once per process: a note that is unusable
only during a witness rebuild was otherwise never reported again.
The fee rule moves into SaplingConsolidationTxFee, with a test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A stop issued during a consolidation round waited for the whole round
to be built and committed: 634 s in review, ~8 min for the default 18
txs on a crowded wallet. StopRPC cancels every queued operation, but
AsyncRPCOperation::cancel() is not virtual, so the op's own cancel(),
which moves an EXECUTING op to CANCELLED, is never called and its
isCancelled() checks between transactions never fire. A GUI that kills
dragonxd 20 s into shutdown then kills it mid-round, which costs a
chainstate replay and a witness rebuild on the next start.
Check ShutdownRequested() next to isCancelled() before building each
transaction and before committing it, so a stop waits for one tx at
most. Making cancel() virtual would also do it, but would change what
the sweep and autoshield schedulers' cancel of their previous op does.
dragonxd also has a single async worker, so a z_sendmany made during a
round waited for all of it. After each committed tx the round now ends
when another operation is queued. Its unspent planned notes are
unlocked as before and the next round takes them up. last_round and the
op result report it as yielded.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rewrite the consolidation part of doc/zsweep-consolidation.md to match
the code: off by default (also for GUI wallets, which the doc claimed
were on), what an eligible note is, the threshold/batch/maxtxs policy
and its defaults including -consolidationinterval, smallest-first and
the randomised input count, the 8-output shape, locking only the
round's notes, skipped bad-witness notes, the fee range (fee 0 is no
longer accepted), the spending-key requirement, z_consolidationstatus
(the doc named z_sweepstatus) and its verbose mode, z_consolidate, and
the off-but-suggested hint.
Also fix -zsweepinterval: it defaults to 10 (values below 5 fall back to
10), not the 5 the doc and -help claimed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dev is 22 commits past the v1.3.0 tag and still stamped 1.3.0, so a
release built from it would be indistinguishable from v1.3.0 on the wire,
in getnetworkinfo and to the wallet's updater.
Bump REVISION, not MINOR: the delta is bug fixes and wallet performance.
It adds no subsystem, and the new RPC-visible options (-notecachewarmup,
-checknotecache) are debug-help only.
configure.ac, src/clientversion.h 1.3.0 -> 1.3.1 (CLIENT_VERSION 1030150)
doc/man/*.1 version strings restamped
contrib/debian/changelog 1.3.1 entry
src/chain.h the CLIENT_VERSION comment
The man page content needs no regeneration: every option in
`dragonxd --help` at 3032eb786 is already in dragonxd.1, and the two new
options appear only in -help-debug.
No consensus change since v1.3.0, so PROTOCOL_VERSION and
MIN_PEER_PROTO_VERSION are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The man pages were regenerated at e2e10f6ef from a binary built at af7d9e230 and
carry "v1.3.0-af7d9e230". The release will be tagged v1.3.0, so the shipped man
pages would contradict the tag they ship under -- the same provenance gap af7d9e230
itself was written to close.
A faithful regeneration cannot fix this before the tag exists: gen-manpages.sh reads
--version from the binary, genbuild.sh derives that from `git describe`, and that
only prints exactly "v1.3.0" once the annotated tag is in place. Regenerating after
tagging would mean committing on top of the tag and moving it. doc/release-process.md
anticipates this and documents hardcoding the version instead.
Content is untouched and needs no regeneration: all 150 daemon options in the man
page match `dragonxd --help` exactly, including the five -autoshield* flags.
Not changed: dragonx-tx.1 still describes itself as "hush-tx utility". That string
comes from the binary's own --help, so editing the man page would make it diverge
from what the tool actually prints. It is a binary-level branding fix, not a doc one.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FU87LdsJZiZkfq1eXubpeo
Previously the version strings were restamped by hand in af7d9e230 because
help2man and a built binary were both unavailable. Regenerated properly via
util/gen-manpages.sh against freshly built v1.3.0 binaries, which also picks
up two options that were never documented:
-sietch-min-zouts=<n> decoy Sapling outputs added to each z_sendmany
-stratumtarget=<hex> pool share target, for solo/low-difficulty mining
NOTE: the version lines read "v1.3.0-af7d9e230" because `git describe` has
no annotated tag to find yet. Once v1.3.0 is tagged annotated, these must be
regenerated once more so they read a clean "v1.3.0" -- that step stays open
on the release checklist.
Generated on seed 176 (glibc 2.35 runs the binaries; help2man is installed
there and not on the primary), with an isolated HOME so nothing touched the
node's datadir. The reindex running on that box was not disturbed.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FU87LdsJZiZkfq1eXubpeo
The tree stamped 1.2.0 in both configure.ac and src/clientversion.h, but
v1.2.0 is an annotated tag already pushed at fad05d3ab and dev is 27
commits past it. Both trees therefore produced CLIENT_VERSION 1020050 and
announced an identical /DragonX:1.2.0/ subversion, so a released binary
would have been indistinguishable from the tag on the wire, in
getnetworkinfo, and to the wallet's in-app updater -- destroying the only
provenance check users have: build the tag, compare the binary.
Bump MINOR rather than REVISION: the delta since v1.2.0 adds a subsystem
(RandomX stratum) and a new RPC (stratummine).
configure.ac, src/clientversion.h 1.2.0 -> 1.3.0 (CLIENT_VERSION 1030050)
doc/man/*.1 version strings restamped
contrib/debian/changelog 1.3.0 entry for the 27 commits
src/chain.h stale "CLIENT_VERSION is 1010050" comment
Man page *content* still needs a real regeneration: util/gen-manpages.sh
requires help2man and built 1.3.0 binaries, so it belongs in the release
build, where it will also pick up the new stratum options.
doc/release-process.md is why v1.1.0 and v1.2.0 were tagged but never
became releases. Followed verbatim it produced a release the wallet
refuses to install:
- it directed releases to a branch named `dragonx`, which does not
exist; releases are cut on `master`
- it never once mentioned signing, yet the updater pins an ed25519 key
and sets kDaemonRequireSignature = true, so an unsigned release is
refused outright and every user silently stays on their old daemon
- it did not require the release tag to be annotated, and genbuild.sh
calls `git describe` without --tags, so a lightweight tag stamps the
build `v<older-tag>-<sha>` instead of the release version -- which is
exactly what happened to v1.0.0 through v1.0.3
- it referenced util/build-debian-package-ARM.sh, which is not in tree
Adds the signing and checksum-table steps, the annotated-tag requirement
with a `git describe` verification, and the rule that a new version must
exceed every existing tag including unpublished ones.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FU87LdsJZiZkfq1eXubpeo
They still described v1.0.3-4caf2fc68, so none of the options added
since -- -autoshield and its four companions, -mnemonic,
-mnemonicsaplinggap -- appeared anywhere in them.
Generated from a binary built at a clean tree on an annotated v1.2.0
tag, which is what makes util/genbuild.sh emit BUILD_DESC "v1.2.0"
rather than a version with a commit suffix. Note that genbuild.sh uses
`git describe --abbrev=0`, which ignores lightweight tags; v1.0.0
through v1.0.3 were lightweight, which is why those releases all
reported themselves as v1.0.x-<sha>. Tag releases annotated.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FU87LdsJZiZkfq1eXubpeo
node6.dragonx.is (13.140.58.251) and node7.dragonx.is (5.104.83.100)
are new full nodes in regions the existing five did not cover. Both go
into the compiled-in fixed-seed list and into the DRAGONX -addnode set.
node8 through node10 are reserved names with no DNS records yet. A
hostname that does not resolve is harmless on this path --
ThreadOpenAddedConnections simply fails to open the connection and
retries on its normal cycle -- and reserving the names in the binary
means a future seed can be brought into the default addnode set by
creating a single DNS record, with no release and no waiting for users
to upgrade. seed.dragonx.is already gives the DNS-seed path that
property; this extends it to the addnode path.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FU87LdsJZiZkfq1eXubpeo
Binaries built on Ubuntu 22.04 require GLIBC_2.34 and GLIBCXX_3.4.30 and will not
start on Ubuntu 20.04 -- which is four of our five seeds, and an unknown share of
users. The binary the fleet actually runs today needs only GLIBC_2.29, so it was
built somewhere older; seed 176 has since been upgraded to 22.04 and now produces
binaries it is the only seed able to run.
--linux-compat and Dockerfile.compat already solved this (6d56ad854) but were
undocumented outside the build script and pinned to one base image. Parameterise
the base via ARG BASE_IMAGE (default unchanged, so --linux-compat behaves exactly
as before) and document the whole path.
doc/build-containers.md is written to be executed by a person or an agent starting
from a machine with nothing installed: why the glibc direction matters, with the
measured numbers; what already exists in the repo so nobody writes a second build
system; prerequisites and honest cost (~15GB, 4GB RAM, 1-2h per base because
depends/ builds boost, BDB, wolfssl and rust from source); one-target and
multi-target recipes; which base to pick and why 20.04 is the recommended floor
while 18.04 needs verifying (GCC 7 against -std=c++17); a mandatory verification
step with the exact objdump/readelf commands and the expected ceilings; and the
traps.
The traps are the part worth having written down: ETXTBSY when installing over a
running daemon (cp fails even after the process exits -- stage and rename, then
sha256-verify before starting); never touching configure.ac in a configured tree,
because the mtime alone triggers a reconfigure that dies on libdb_cxx; never
blind-touching a path that may not exist, which silently creates stray empty files;
RandomX needing ARCH=default or it emits AVX-512 that SIGILLs the fleet; build-win.sh
silently discarding every argument; and macOS being uncontainerisable because
depends/ has no darwin cross path at all.
Also records that full static linking is NOT the answer here: the daemon resolves
node1..node5.dragonx.is via getaddrinfo, and static glibc pushes that through NSS,
which dlopens libnss_dns at runtime and reintroduces the dependency it was meant to
remove.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The docs/packaging were largely un-rebranded Hush3 content, with several
docs stating facts that are wrong for DragonX. This rewrites them against
the verified DragonX source state.
Corrections (not just branding):
- PoW: RandomX (CPU), not Equihash/ASIC — README, overview.md, randomx.md
- Privacy: private from genesis (ac_private=1, Sapling@height1), not "as of
block 340000" — overview.md, payment-api.md
- Removed the false "coinbase must be shielded" consensus claim
(shield-coinbase.md, payment-api.md); coinbase is directly spendable
- Fixed default fee 0.0001 (was 0.0010000, 10x); stratum port 22769 (was 19031)
- datadir ~/.hush/DRAGONX, DRAGONX.conf, dragonxd/dragonx-cli/dragonx-tx,
git.dragonx.is throughout; branch model dev->dragonx
- Softened the inherited dPoW reorg claim (no live DragonX notary infra)
Packaging: fix build-debian-package.sh + gen-manpages.sh to use the dragonx
binaries/manpages; rename bash-completions to dragonx*; drop hush-arrakis-chain
from the package. Keep /usr/share/hush (hardcoded in the binary for params).
Also: README links/logo, ObsidianDragon + SilentDragonXAndroid wallets,
networking/init/dev-process/contrib/util rebrand, and leftover helper scripts.
Delete legacy duplicates (hushd.* init/service, HUSH3.conf examples,
OLD_WALLETS.md, hsc.md) and rename hush-uri.bat -> dragonx-uri.bat.
Out of scope (noted, not changed): historical changelog/copyright, the Hush
mainnet airdrop snapshot, seed data files, depends/ source mirrors, and the
in-code strCurrencyUnits="HUSH".
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The -rpcport help string in bitcoin-cli.cpp hardcoded hush's 18030; the actual default (BaseParams().RPCPort()) is DragonX's 21769, so this was misleading help text only (the CLI already connects to 21769). Set to 21769 and regenerated doc/man/dragonx-cli.1 from the rebuilt binary. NOTE: a separate hush 18030 leftover remains in src/rpc/net.cpp:357 (getpeerinfo help example address) - daemon RPC help, out of scope here. Staged on 176; not pushed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Legal: correct GPLv3 LICENSE (fixes garbled 'GENERAL GENERAL'), AUTHORS DragonX attribution, COPYING. Packaging: man pages REGENERATED from the 1.0.3 binaries via help2man (dragonxd/dragonx-cli/dragonx-tx.1 -> v1.0.3, correct dates), wired into doc/man/Makefile.am (dist_man1_MANS), orphaned hush*.1 removed. Init/openrc/systemd scripts, Debian packaging (control/changelog/copyright rebranded hush->dragonx + install stubs), example confs taken from origin/compliant-rebrand (c05134e77). REMAINING follow-ups: (1) debian/changelog still tops at 1.0.0 - add a 1.0.3 entry; (2) dragonx-cli --help hardcodes rpcport default 18030 (hush) - fix the HelpMessage string in source then regen. Staged on 176 for review; not pushed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Derive transparent (t-addr) keys from the HD seed and add BIP39 mnemonic seed
phrases that are byte-for-byte compatible with SilentDragonXLite, so the same
24 words recover the same shielded and transparent addresses in either wallet.
HD transparent keys:
- Derive t-keys from the seed at m/44'/coin'/0'/0/i (were random CKeys).
- CHDChain gains a version-gated transparent counter; existing wallets load
unchanged. GenerateNewKey routes through DeriveNewChildKey when enabled
(-hdtransparent, default on).
- Restore from a seed hex via -hdseed with gap-limit pre-derivation; birthday
pinned to genesis so the rescan is not clipped.
BIP39 seed phrases:
- Wire the vendored trezor BIP39 lib (src/crypto/bip39) into the build, fix its
BIP39_WORDS guard, and disable the insecure mnemonic cache.
- Match SDXLite exactly: English wordlist, empty passphrase, PBKDF2 64-byte
seed, coin type 141, ZIP-32 m/32'/141'/i' and BIP44 m/44'/141'/0'/0/i. Store
the 32-byte entropy and expand to the 64-byte seed on demand.
- Restore via -mnemonic, create via -usemnemonic, reveal via z_exportmnemonic.
Verified by gtests including a known-answer BIP39 seed vector and z/t address
derivation checks (src/gtest/test_hdtransparent.cpp, test_mnemonic_compat.cpp).
Docs in doc/hd-transparent-keys.md and doc/seed-phrase.md.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>