Skip to content

chore: merge master (v24.0.3) back into develop - #8234

Merged
PastaPastaPasta merged 34 commits into
dashpay:developfrom
PastaPastaPasta:merge_master_24.0.3
Nov 23, 2026
Merged

PastaPastaPasta merged 34 commits into
dashpay:developfrom
PastaPastaPasta:merge_master_24.0.3

Conversation

@PastaPastaPasta

Copy link
Copy Markdown
Member

Issue being fixed or feature implemented

Merges the v24.0.2 and v24.0.3 releases back into develop, as the release process asks once master is fast-forwarded. master, v24.0.x and the signed v24.0.3 tag all point to the same commit (5e7a58f). v24.0.2 was never merged back, so it comes in here too.

What was done?

One merge commit of master into develop.

Every code change in v24.0.1..v24.0.3 is a cherry-pick -m1 -x of a develop merge commit, and every source commit is already on develop. The two merge commits on v24.0.x (#8143, #8205) add nothing beyond their second parents, except the two release-prep commits.

Git reports conflicts in 31 files, because v24.0.x carries adapted copies of those changes. Three more files (src/coinjoin/coinjoin.cpp, src/test/governance_superblock_tests.cpp, test/functional/feature_reindex.py) merge cleanly, but the result would define ValidateDSQueue, a governance superblock test and kill_after_reindex a second time. All of these resolve to develop's side, which keeps develop's code. configure.ac stays deleted, since develop builds with CMake.

Taken from v24.0.3:

  • doc/release-notes.md: the v24.0.3 release notes. The v24.0.1 notes move to doc/release-notes/dash/release-notes-24.0.1.md, unchanged from develop's current doc/release-notes.md. The v24.0.2 notes are archived alongside them.
  • The version string in the man pages (no option changed).
  • The v24.0.2 and v24.0.3 entries in the flatpak release history.

None of develop's individual doc/release-notes-*.md files cover changes in v24.0.2 or v24.0.3, so all of them stay.

How Has This Been Tested?

  • git diff develop on this branch touches only the 10 doc and flatpak files above. src/, test/, ci/ and CMakeLists.txt are byte-identical to develop, so nothing was rebuilt.
  • Those 10 files are byte-identical to master.
  • Checked that the -x source of every non-merge commit in v24.0.1..master, other than the two release-prep commits, is an ancestor of develop.

Breaking Changes

None. Develop's code is unchanged.

Checklist:

  • I have performed a self-review of my own code
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone (if you have permission to set one)

🤖 Generated with Claude Code

knst and others added 30 commits November 13, 2026 19:51
8b6470a gui: disable top bar menu actions during shutdown (furszy)
7066e89 gui: provide wallet controller context to wallet actions (furszy)

Pull request description:

  Small follow-up to dashpay#751.

  Fixes another crash cause during shutdown. Which occurs when the user hovers over the wallets list.

  Future Note:
  This surely happen in other places as well, we should re-work the way we connect signals. Register
  lambas without any precaution can leave dangling pointers.

ACKs for top commit:
  hebasto:
    ACK 8b6470a, I've tested each commit separately on macOS Sonoma 14.0 (Apple M1).

Tree-SHA512: 6fbd1bcd6717a8c1633beb9371463ed22422f929cccf9b791ee292c5364134c501e099329cf77a06b74a84c64c1c3d22539199ec49ccd74b3950036316c0dab3

Co-authored-by: Hennadii Stepanov <[email protected]>
(cherry picked from commit eefd3ac)
…ntext to wallet actions"

f09bfab Revert "gui: provide wallet controller context to wallet actions" (Hennadii Stepanov)

Pull request description:

  The commit 7066e89 from bitcoin-core/gui#765 breaks "Open Wallet", "Close Wallet" and "Close All Wallets" items in the File menu (at least on Ubuntu 23.10 + Wayland).

  Reverting it to avoid this regression in the 26.0 release.

ACKs for top commit:
  furszy:
    ACK f09bfab for including it in v26.
  jarolrod:
    ACK f09bfab

Tree-SHA512: fedc621c8e9bf84a263b0c28da53225febe0267d0123830a6192297f38e40726e1613e003b634215e7d16791ba6eab52fb4baab3da9637f6660b6ae1ae98462b

Co-authored-by: Hennadii Stepanov <[email protected]>
(cherry picked from commit 8953180)
…d dash-tx

11c2f73 fix(cli): accept -printcrashinfo in dash-cli and dash-tx (pasta)

Pull request description:

  ## Issue being fixed or feature implemented

  Crash handlers suggest rerunning the executable with `-printcrashinfo`, but dash-cli and dash-tx reject that argument. Their existing decoder paths also return 1 after printing, which signals failure.

  ## What was done?

  Register the hidden argument in both tools and return `EXIT_SUCCESS` after decoding. Add coverage to the existing CLI functional test and dash-tx utility cases.

  ## How Has This Been Tested?

  On macOS arm64 with a debug/werror build:

  - On unchanged develop, the new utility case fails because dash-tx rejects `-printcrashinfo=invalid` and exits 1. Both descriptor and legacy variants of `interface_bitcoin_cli.py` also fail at the new check because dash-cli rejects the option.
  - `make -j4`; `src/test/test_dash --run_test=getarg_tests`; `python test/util/test_runner.py -v`.
  - RAM-disk functional runner: `-j1 --timeout-factor=2 interface_bitcoin_cli.py`, covering both wallet variants. The CLI check requires exit 0 and the expected decoder error text for malformed crash data.
  - Repository-enabled Python flake8 checks, whitespace lint and `git diff --check`. The Python lint mypy step reports three existing errors in unchanged files with mypy 2.4.1.

  ## Breaking Changes

  None.

  ## Checklist:

  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation
  - [ ] I have assigned this pull request to a milestone

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

Top commit has no ACKs.

Tree-SHA512: f4e6dcfe395c384a2ecc4e57daaeb9c442ac97b1224af621330a93538183a22743897783db08f1b12a0fdda4e61d8f4207c4db48c42bd93749a31e5ce4273ce4
(cherry picked from commit 5c9aa9f)
…race, and null-tip crash

419cbb6 fix(stats): wrong inputValue gauge, counter data race, and null-tip crash (pasta)

Pull request description:

  ## Issue being fixed or feature implemented

  The `transactions.inputValue` metric subtracts modified fees from outputs, producing an incorrect input total. Immediate stats sends can also race while updating plain counters, and periodic collection can dereference an absent chain tip during startup or reindexing. Transaction and block statistics additionally perform unnecessary work when collection is disabled.

  ## What was done?

  Compute input value as outputs plus the actual base fee, reuse the mempool entry's sigop count, and gate transaction and ConnectTip statistics on an active client. Make RawSender success/failure counters atomic and load them explicitly for logging. Guard the periodic collector's tip before flushing or collecting UTXO statistics, and protect its chain-state calculations with `cs_main`.

  The existing DisconnectTip statistics behavior is unchanged.

  ## How Has This Been Tested?

  On macOS arm64, with a debug/werror build and functional-test datadirs on a RAM disk:

  - Extended the existing `feature_stats.py` connection scenario to reindex with periodic statistics and check an emitted difficulty metric, then spend a known MiniWallet input after fee prioritization and compare the actual UDP inputValue packet with its value. On unchanged develop, the packet is `transactions.inputValue:49999948000|c` instead of `transactions.inputValue:50000000000|c`.
  - `make -j4`; `src/test/test_dash --run_test=mempool_tests,validation_tests`.
  - RAM-disk functional runner: `-j1 --timeout-factor=2 feature_stats.py`.
  - Repository-enabled Python flake8 checks, whitespace lint and `git diff --check`. The Python lint mypy step reports three existing errors in unchanged files with mypy 2.4.1.

  The null-tip startup condition is not deterministically reproduced; reindex with periodic statistics provides smoke coverage. Counter safety and disabled-client guards were checked by source inspection; no TSAN run was performed.

  ## Breaking Changes

  None. The emitted inputValue metric now reflects the actual spent input value.

  ## Checklist:

  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation
  - [ ] I have assigned this pull request to a milestone

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

Top commit has no ACKs.

Tree-SHA512: 72e0fff72cee1bb7177184f3ce5cfce86e7a4858d71f5d13122e70584b20e2c1f6b33163a01f037f354be809d040d33ca2fd410a9f81d55ee2714f68c7be360c
(cherry picked from commit f9c3e7d)
…nd index replayed orphan votes

fe66649 fix(governance): answer govsync only to the requesting peer and index replayed orphan votes (pasta)

Pull request description:

  ## Issue being fixed or feature implemented

  A peer requesting governance sync broadcasts the response inventories to every relay peer. Votes accepted after their parent arrives are also missing from the vote-to-object index, so the node announces votes that it cannot serve on GETDATA and continues treating their hashes as unknown.

  ## What was done?

  Send object and vote sync inventories only to the requesting peer. Index accepted orphan votes against their stored parent object before relaying them, matching normal vote processing.

  Extend the existing governance functional test with fresh requester/bystander P2P peers for both object and vote sync. Extend the existing orphan-vote unit scenario to require hash lookup and serialization, then deserialize and validate the served vote.

  ## How Has This Been Tested?

  - Debug build with warnings treated as errors: `make -C src -j4 dashd test/test_dash`.
  - On unchanged develop (`34f990e8701e`), the updated orphan scenario failed both `HaveVoteForHash` and `SerializeVoteForHash`; the functional regression failed because the bystander received all three proposal inventories.
  - With the fixes, `./src/test/test_dash --run_test='governance*' --log_level=message` passed all 36 cases.
  - The full `feature_governance.py --descriptors` passed using the RAM-disk helper with `-j1 --timeout-factor=3`. An initial fixed-code attempt hit an occupied RPC port during startup; the successful run used an isolated port range.
  - Repository-selected Python lint, whitespace lint and `git diff --check` passed. Self-review covered pointer ownership, vote-index locking and inventory routing.

  ## Breaking Changes

  None.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation (not needed for these internal fixes)
  - [x] I have assigned this pull request to a milestone

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

Top commit has no ACKs.

Tree-SHA512: 74bea701ed517bd40462938615a330a18e9eefd540913c4ebeaed2bbfb970c24169613fbda87eaee9675b51220f7b1940010a935e60e3e010ac1f962a2742a4c
(cherry picked from commit 1c08908)
…per wallet and guard an empty round list

51134ab fix(coinjoin): don't dereference an empty round list in SubmitDenominate (pasta)
7dc17f6 fix(coinjoin): schedule auto-denomination per wallet (pasta)

Pull request description:

  ## Issue being fixed or feature implemented

  `CCoinJoinClientManager::DoMaintenance` keeps its tick counter and next-run tick in function statics, so every wallet's client manager shares them. With several mixing wallets loaded, the shared counter advances once per wallet per scheduler tick. Only the wallet whose call happens to land on the scheduled tick runs `DoAutomaticDenominating`. Which wallet mixes is effectively arbitrary, a wallet can skip many cycles, and the configured interval is divided by the number of wallets.

  A second, smaller bug in the same file: `SubmitDenominate` reads `vecInputsByRounds.begin()->first` without checking that the vector has an entry. Input selection excludes fully mixed coins using the rounds setting at selection time, while the dry-run loop that fills the vector reads `GetRounds()` again. `SetRounds` (the `setcoinjoinrounds` RPC or the GUI) does not take `cs_wallet`, so lowering the target between the two can leave every selected input outside the loop's range. The vector then stays empty and the dereference is undefined behaviour.

  ## What was done?

  Two commits:
  - Keep the maintenance tick and next-run tick as members of each `CCoinJoinClientManager`. Initial values and trigger logic are unchanged. `DoMaintenance` is only called from the scheduler, so the members need no lock.
  - Skip the per-round attempt when no round count prepared, so the existing all-rounds fallback runs and fails cleanly.

  ## How Has This Been Tested?

  On macOS arm64:
  - A debug build with warnings as errors.
  - `./src/test/test_dash --run_test='coinjoin_*'`.
  - `rpc_coinjoin.py --legacy-wallet` and `--descriptors` (on the earlier revision; the CoinJoin code paths they exercise are unchanged since).

  The new `coinjoin_tests/coinjoin_maintenance_runs_for_every_wallet` test uses the existing wallet fixture and public client methods. With automatic backups disabled, each wallet must stop mixing at its first automatic attempt after five maintenance calls. Applied to unmodified develop, it fails: one wallet runs early and the other misses its deadline. It passes with the fix.

  The empty-vector guard has no test: reaching it needs a rounds change racing with `SubmitDenominate`, which can't be made deterministic. It was checked by reading the selection and dry-run paths.

  ## Breaking Changes

  None.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation (no options or interfaces changed)
  - [x] I have assigned this pull request to a milestone

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

Top commit has no ACKs.

Tree-SHA512: 3d98748396b8348044b63aac4d0a21602659e8d9104719f679e09f1c81325057c7bfb9a2a6e5d9703857c95c4454a85798b54e81228ad902c00f4b4fc9692836
(cherry picked from commit f464016)
…located size

fe26212 fix: free pooled secure allocations with their allocated size (pasta)

Pull request description:

  ## Issue being fixed or feature implemented

  `mt_pooled_secure_allocator` and the BLS `secure_allocate` wrapper each prepend a `size_t` header to the allocation, but their deallocation paths pass the size without that header. The underlying pool rounds sizes up to whole chunks, so when the header pushes an allocation across a chunk boundary, fewer chunks are freed and cleansed than were allocated, and each allocate/free cycle strands a chunk of locked memory.

  This is a latent asymmetry, not an observed leak: the pool chunk is 304 bytes, and current BLS callers request 32, 144 or 288 bytes, which round to one chunk on both the allocation and the free side. Only a request of 289..296 bytes (mod 304) through the BLS wrapper would hit it. The generic allocator is exposed for any size that crosses a chunk boundary once its own header is added.

  ## What was done?

  - Include each layer's header in its deallocation size, so it matches what the same layer requested on allocation.
  - Add an allocator unit test that repeats a boundary-crossing allocate/free cycle and checks that locked-pool usage stays flat.

  An earlier revision of this PR also cleansed the serialized ECDH key in `bls_ies.cpp` and the PBKDF2 temporaries. That was dropped: it wiped only some copies of the secrets involved (the DH point and the plaintext share buffers stayed uncleansed) and no test can observe it, so it does not belong with this fix.

  ## How Has This Been Tested?

  On macOS arm64 with depends, `--enable-debug --enable-werror`:

  - `./src/test/test_dash --run_test=allocator_tests,bls_tests` passes.
  - With the `mt_pooled_secure.h` change reverted, `allocator_tests/mt_pooled_secure_allocator_reuses_all_chunks` fails: locked-pool usage grows from 384 to 82,288 bytes over 1,000 cycles of a 33-byte allocation (two 40-byte chunks allocated, one freed).

  The `secure_free` change in `bls.cpp` has no test of its own; it is the same one-line symmetry fix one layer up, and no current caller reaches the affected sizes.

  ## Breaking Changes

  None.

  ## Checklist:

  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation (not needed)
  - [x] I have assigned this pull request to a milestone

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

Top commit has no ACKs.

Tree-SHA512: 0539c70a4d421207b0aded68f6a1b0a37a3a7df78c74327effa78270ea0981bf5162ffd7c591780b148f48636c81f03d7e00dccb7c34defac95e27e38554e314
(cherry picked from commit ec0c1cd)
…share batches, and ChainLock shutdown

9707616 fix(chainlock): join the scheduler thread in ChainlockHandler::Stop() (pasta)
547392c fix(llmq): drop the whole sig-share batch when a quorum lookup fails (pasta)
5e524df fix(llmq): initialize the watch-connection seed with a function-local static (pasta)

Pull request description:

  ## Issue being fixed or feature implemented

  Concurrent first calls can regenerate the watch-connection seed while another caller reads it. A missing quorum during signature-share collection leaves a partial batch that the caller dispatches to code using `quorums.at()`. ChainLock shutdown also returns before its scheduler thread exits. The thread was only joined when the node context was destroyed, so a task already running could continue after `mn_sync` and the mempool were destroyed, or block shutdown in `ActivateBestChain` waiting on the validation queue of the already stopped main scheduler.

  ## What was done?

  - Initialize the immutable watch-connection seed with thread-safe function-local static initialization.
  - Clear both batch outputs when quorum lookup fails, so the caller cannot dispatch an incomplete batch.
  - Join the ChainLock scheduler thread in `Stop()` and reuse that method from the destructor, guarding repeated joins with `joinable()`.

  Each fix is its own commit.

  Reviewed every handler stop/destruction path: production shutdown joins before stopping the main scheduler, with no chain or handler lock held; the full unit fixture calls `Stop()` before later destruction; reindex resets the handler without those locks while the main scheduler runs. The simpler base fixture leaves the handler dormant. No stop/destructor runs on the handler's own scheduler thread.

  ## How Has This Been Tested?

  - Debug build with warnings treated as errors: `make -C src -j4 dashd test/test_dash`.
  - `./src/test/test_dash --run_test='llmq*' --log_level=message`: all 84 cases passed.
  - `./src/test/test_dash --run_test='validation_chainstatemanager_tests/chainstatemanager,chainstatemanager_snapshot_discarded_on_reindex' --log_level=message`: both cases passed, covering base-fixture teardown and reindex destruction/recreation.
  - RAM-disk functional runner with an isolated port range and `-j1 --timeout-factor=3`: `feature_llmq_chainlocks.py`, `feature_llmq_signing.py`, and its `--spork21` variant all passed.
  - Whitespace lint, `git diff --check`, and self-review passed.

  The seed and partial-batch failure paths were verified by code inspection. No TSAN run or deterministic forced-race reproducer is claimed.

  ## Breaking Changes

  None.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation (not needed for these internal fixes)
  - [x] I have assigned this pull request to a milestone

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

Top commit has no ACKs.

Tree-SHA512: 0d518624c79f2cdee35b2daa341a5905de3e0a27b63105ca06941baa6e620f53ba1f26a0eebe0c843a5118c4615f680b0da7e4f5798eb22c1aefadd717c02baa
(cherry picked from commit 92ed025)
Bump the build version to 2, add the v24.0.2 release notes, archive the
v24.0.1 notes, add the flatpak release entry and bump the version string in
the man pages (no option shown in the help changed since v24.0.1).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
…v24.0.2

b534385 chore: prepare v24.0.2 release (pasta)
70e06ae Merge dashpay#8117: fix: races in watch-connection seed, partial sig-share batches, and ChainLock shutdown (merge-script)
d50ea34 Merge dashpay#8115: fix: free pooled secure allocations with their allocated size (merge-script)
824e58a Merge dashpay#8113: fix(wallet): schedule CoinJoin auto-denomination per wallet and guard an empty round list (merge-script)
068529f Merge dashpay#8112: fix: answer govsync only to the requesting peer and index replayed orphan votes (merge-script)
484ec63 Merge dashpay#8119: fix(stats): wrong inputValue gauge, counter data race, and null-tip crash (merge-script)
28d5711 Merge dashpay#8120: fix(utils): accept -printcrashinfo in dash-cli and dash-tx (merge-script)
578b914 Merge bitcoin-core/gui#770: Revert "gui: provide wallet controller context to wallet actions" (Konstantin Akimov)
d6902fa Merge bitcoin-core/gui#765: Fix wallet list hover crash on shutdown (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented

  Backports and release prep for v24.0.2, on top of `v24.0.x` at 137d999 (v24.0.1). One PR carries both, so the release branch gets a single merge.

  Two fixes are the reason for the release:

  - **Memory leak (dashpay#8115).** Since v24.0.0 a node's locked-memory use grows for as long as it runs. On `v24.0.x` BLS still uses relic, where a G2 element is 296 bytes; the pooled secure allocator frees such an allocation with one chunk fewer than it allocated. The batch-verification weighting added in v24.0.0 makes one such allocation per verified message, so the pool keeps growing until restart. On develop (blst, 288-byte elements) the same code path does not leak, which is why dashpay#8115 describes the bug as latent.
  - **macOS crash on close (dashpay#8073's bitcoin-core/gui#765 and gui#770).** On macOS the menu bar stays usable after the main window is hidden for shutdown. `File > Open Wallet`, `Close Wallet` and the other wallet items then call the wallet controller after it has been deleted.

  The rest are small fixes that were already merged on develop and are low risk to carry.

  ## What was done?

  ### Picked

  In develop merge order. The Dash PRs are picked from their develop merge commits with `git cherry-pick -m1 -x`; the two GUI backports are picked with `-x` from the commits dashpay#8073 merged, like earlier partial picks on this branch.

  - bitcoin-core/gui#765 Fix wallet list hover crash on shutdown, and bitcoin-core/gui#770, which reverts its first commit (from dashpay#8073). Together they leave one change: `appMenuBar->clear()` when shutdown starts.
  - dashpay#8120 fix(utils): accept -printcrashinfo in dash-cli and dash-tx
  - dashpay#8119 fix(stats): wrong inputValue gauge, counter data race, and null-tip crash
  - dashpay#8112 fix: answer govsync only to the requesting peer and index replayed orphan votes
  - dashpay#8113 fix(wallet): schedule CoinJoin auto-denomination per wallet and guard an empty round list
  - dashpay#8115 fix: free pooled secure allocations with their allocated size
  - dashpay#8117 fix: races in watch-connection seed, partial sig-share batches, and ChainLock shutdown

  Then one commit, `chore: prepare v24.0.2 release`:

  - `configure.ac`: `_CLIENT_VERSION_BUILD` 1 → 2.
  - `doc/release-notes.md`: v24.0.2 notes. The v24.0.1 notes are archived verbatim to `doc/release-notes/dash/release-notes-24.0.1.md` and added to "Older releases".
  - `contrib/flatpak/org.dash.dash-core.metainfo.xml`: `24.0.2` entry dated 2026-11-13. The date needs changing if the tag is cut on another day.
  - `doc/man/*.1`: version string only. `-printcrashinfo` (dashpay#8120) is a hidden option, so no help text changed.

  ### Adaptations

  Every pick changes the same lines as its develop counterpart except:

  - **dashpay#8073:** only the two GUI commits are taken. The other two backports in that PR (bitcoin#28629, partial bitcoin#28639) are test and refactor changes for code `v24.0.x` doesn't need.
  - **dashpay#8112:** `test/functional/feature_governance.py` differs on `v24.0.x` (no pruned node from dashpay#7860). The `v24.0.x` file is kept and only dashpay#8112's additions are applied: the imports it needs, `GovernanceSyncPeer`, `check_govsync_is_peer_local()` and its call. The source change is identical.
  - **dashpay#8113:** one line of the new unit test. `v24.0.x` has the five-argument `CWallet` constructor and `CreateMockWalletDatabase()`, so the second wallet is built the way the fixture in the same file builds the first. The source change is identical.
  - **dashpay#8117:** in `src/llmq/utils.cpp` the neighbouring includes differ; the pick removes `<atomic>` and adds nothing. The source change is otherwise identical.

  ### Not picked

  - dashpay#8111 (check every BIP39 checksum bit): it can refuse a mnemonic that v24.0.1 accepts, so it should come with a major or minor release and a release note, not a patch release.
  - dashpay#8118 (RPC argument and locking fixes): changes RPC error behaviour and needs a hand-port to `rpc/masternode.cpp`.
  - dashpay#8122 (CacheMultiMap): the use-after-free can't be reached on `v24.0.x`, and the capacity part is hardening with no behaviour change.
  - dashpay#8047 (index startup after an unclean stop): on `v24.0.x` a synced node never records the uncommitted tip it handles, and the governance index it mainly covers doesn't exist here.
  - dashpay#8092 (wording): changes two translatable strings.
  - dashpay#8101, dashpay#8102, dashpay#8098, dashpay#8095 with dashpay#8121, dashpay#8116 with dashpay#7815, dashpay#8085: unchanged from the v24.0.1 decision in dashpay#8128.
  - Features, refactors, Bitcoin Core backports, CI and test-only changes merged since the branch point.

  dashpay#8103 (EvoDB left ahead of the coins DB after a reindex) is a candidate that is still open on develop. If it merges before this PR does, its pick will be added here.

  ## How Has This Been Tested?

  Linux x86_64, depends build with `--enable-debug --enable-werror`, GUI enabled. Head is b534385.

  - `dashd`, `dash-qt`, `test_dash` and `test_dash-qt` build cleanly; `dashd -version` reports `v24.0.2`.
  - `test_dash` (1106 cases), `test_dash-qt` and `test/util/test_runner.py` pass. That includes the picked unit tests: `allocator_tests/mt_pooled_secure_allocator_reuses_all_chunks` (dashpay#8115), `coinjoin_tests/coinjoin_maintenance_runs_for_every_wallet` (dashpay#8113) and the orphan-vote case in `governance_vote_processing_tests` (dashpay#8112).
  - The full functional suite (`test_runner.py -j14`): 312 passed, 12 skipped, 1 failed. The skipped ones are the usual environment-dependent tests (`feature_bind_port_*`, `rpc_bind.py --ipv6`, `interface_usdt_*`, previous-release compatibility and `feature_unsupported_utxo_db.py`). The run includes the scenarios the picks add or extend: `feature_governance.py` (dashpay#8112), `feature_stats.py` (dashpay#8119) and `interface_bitcoin_cli.py` (dashpay#8120).
  - The failure was `feature_llmq_is_cl_conflicts.py`, in `mine_cycle_quorum`: the node logs show the block for the final commitments being built about 40 ms before the second quorum's final commitment reached the mining node, so that quorum was not mined. It is a timing race in the test helper under load, in code none of the picks touch (develop reworked those waits in dashpay#7892). Run again on its own four times in parallel, it passed all four.
  - **Leak, end to end.** A regtest script (not part of the tree) mines a single-member InstantSend quorum, sends InstantSend-locked transactions and reads `getmemoryinfo` `locked.used` on each node every 50 locks.
    - The published v24.0.1 Linux binary: the four non-masternode nodes go from 39,568 bytes to 467,664 bytes over 600 locks, and are still growing at the end.
    - This branch: the same nodes stay at 20,096 bytes for all 600 locks.
  - The man pages were regenerated with `contrib/devtools/gen-manpages.py` from this build. They are byte-identical to the committed ones except for the `lock` debug category in `dashd.1` and `dash-qt.1`, which only an `--enable-debug` build lists.
  - The archived v24.0.1 notes are byte-identical to the previous `doc/release-notes.md`.

  Not tested: the macOS shutdown crash itself. The GUI change is the upstream one-liner and was built and run through `test_dash-qt` on Linux only.

  ## Breaking Changes

  None. No consensus change, and no change to which P2P messages a node accepts or how it scores peers. A node that syncs governance from a v24.0.2 node receives the same inventories as before; other peers of that node no longer receive them.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [x] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(if you have permission to set one)_

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

Top commit has no ACKs.

Tree-SHA512: 6d9861f4a8c2341889bb0ce5dd500a7083ea59395777a21c5e5d01e70ec8e8b489cf6425bc26ca79f15b1919610ceab10baada361043322dc689b7dfcae7cb5d
…m RPCs

cac11d9 test: reject out-of-range LLMQ types in the remaining quorum RPCs (pasta)
277b74d fix(rpc): reject out-of-range LLMQ types in quorum RPCs (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  The `quorum` RPCs converted the user-supplied quorum type with `static_cast<Consensus::LLMQType>(getInt<int>())`. `Consensus::LLMQType` is a `uint8_t` enum class, so the integer was silently truncated: `356` was treated as type `100`, and negative values wrapped. Each RPC then ran its own validity check on the already-truncated value, and `quorum getdata` had no check at all (it only happened to be safe because `GetQuorum` returns null for unknown types).

  ## What was done?
  Added a single `ParseLLMQType()` helper in `src/rpc/quorums.cpp`. It reads the type with `getInt<uint8_t>()`, so values outside 0..255 fail with "JSON integer out of range" (`RPC_MISC_ERROR`), the same error any other oversized integer argument gets. Types not configured for the active chain still fail with `RPC_INVALID_PARAMETER` and the existing "invalid LLMQ type" message. It is used by all eight RPCs that take a quorum type (`info`, `sign`, `verify`, `hasrecsig`, `getrecsig`, `isconflicting`, `selectquorum`, `getdata`). The now-redundant availability checks at those sites are removed, or turned into `CHECK_NONFATAL` where the params are still fetched afterwards. `quorum sign` now validates the type before the "only available in masternode mode" check.

  ## How Has This Been Tested?
  Added checks to the existing `feature_llmq_signing.py` scenario: all eight RPCs must fail with "JSON integer out of range" for `q_type + 256` and `q_type - 256`, both of which previously wrapped back to a valid type. The test passes with the fix (both variants, with and without `--spork21`) and fails with "No exception raised" when `quorums.cpp` is reverted to `develop`.

  ## Breaking Changes
  None, other than out-of-range quorum types now being rejected instead of being truncated to another type.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation
  - [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

Top commit has no ACKs.

Tree-SHA512: 9716e33a8f594851f8024e2774d8988c2d44018918b5bcd0e71c361f66ad0e29c21063f56f14826b90a55b643395d4f074d94c4d57f4941151a7c1be12bcabe0
(cherry picked from commit c54826e)
…nsaction

8b8f54b refactor(coinjoin): drop the redundant duplicate-scriptSig check (pasta)
79b54fe test: reject a CoinJoin signature that only passes consensus rules (pasta)
6fe2b27 test: cover CoinJoin signature admission rejection (pasta)
3d0c416 fix(coinjoin): bind signatures to the approved transaction (pasta)

Pull request description:

  ## Issue being fixed or feature implemented

  CoinJoin entries arrive without their memory-only previous scripts, but the coordinator used those fields while checking signatures against a reconstructed, unsorted transaction. Signature admission should authenticate the admitted input against the exact final transaction participants approved. This repair aligns coordinator verification with that proposal.

  ## What was done?

  - Retain authoritative previous scripts from the coin view under `cs_main` at entry admission. Later chainstate changes do not turn an ordinary valid signature into participant misbehavior.
  - Bind each submission to the sender's admitted prevout and sequence, then verify against the canonical final transaction with standard script policy before changing accepted state. These checks affect coordinator admission, not consensus flags.
  - Accept identical retransmissions immediately and verify alternate valid signatures without replacing the first committed signature. Multiple entries sharing a connection remain supported.
  - Drop the old cross-entry duplicate-scriptSig check: a scriptSig that verified against one input cannot be valid for another, since every signature hash commits to the prevout.

  Each DSSIGNFINALTX batch is still applied in the single `cs_coinjoin` critical section introduced by dashpay#7537. dashpay#7568 must preserve these checks when resolving overlap.

  ## How Has This Been Tested?

  New unit test `coinjoin_inouts_tests/server_signfinaltx_completes_with_legacy_and_full_signatures` drives the coordinator through `ProcessMessage` with wire-deserialized entries (so `prevPubKey` is empty, as in production) and BIP69-reordered inputs and outputs. It checks that:

  - a valid signature sent by the wrong admitted peer is rejected;
  - a signature over a modified proposal is rejected;
  - an identical retransmission is not rejected, and an invalid retry after acceptance is rejected;
  - a signature that is consensus-valid but non-standard (an extra push) is rejected, so it can't complete a final transaction that then fails mempool acceptance;
  - each rejection leaves the final transaction unchanged and the session in the signing state;
  - a mix of legacy ANYONECANPAY and SIGHASH_ALL signatures completes into the mempool.

  With `src/coinjoin/server.{cpp,h}` reverted to develop, this test fails with 7 failures; it passes with the fix. Removing only the sender binding, restoring the old verify flags, or not retaining the previous script each fails it as well.

  Run locally on macOS arm64:

  - `./src/test/test_dash --run_test=coinjoin_inouts_tests`
  - `./src/test/test_dash --run_test=coinjoin_tests`
  - `test/functional/test_runner.py rpc_coinjoin.py`

  ## Breaking Changes

  None in wire format, consensus rules, or RPC interfaces. Client signing is unchanged; the coordinator accepts both ANYONECANPAY and SIGHASH_ALL signatures that are valid over the canonical transaction.

  ## Checklist:

  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation (no user-facing options or interfaces changed)
  - [x] I have assigned this pull request to a milestone

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

Top commit has no ACKs.

Tree-SHA512: cabb9900f271e65789422dea060523161b9b3d2cdc467ab0750cfe0372c83b895d1486eda87edc52bcf47e91335a3747011824051f096077c1d2c0696b378e35
(cherry picked from commit dcdfefe)

Backport adaptation: include lists only. src/coinjoin/server.cpp adds
<coins.h> without the develop-only <common/system.h> context line, and
src/test/coinjoin_inouts_tests.cpp keeps v24.0.x's <evo/chainhelper.h>
next to the added <coins.h> and <key.h>. The code changes are identical
to the develop pick.
1657b11 fix(llmq): prefer final commitments with more signers (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  When a node already holds a mineable final commitment for a quorum, it is supposed to verify and relay an incoming one only if that one has more signers. The pre-check in `CQuorumBlockProcessor::ProcessMessage` had the comparison reversed: it dropped incoming commitments with more signers and went on to verify ones with fewer or equal signers. In practice the first commitment a node saw stuck, even when a better one was available.

  `AddMineableCommitment` also erased the wrong entry when replacing a commitment: it repointed the quorum key to the new hash and then erased that new hash, so the replaced commitment leaked in `minableCommitments`.

  ## What was done?
  - Drop an incoming commitment only when the stored one has at least as many signers.
  - Erase the replaced commitment before repointing the quorum key to the new one.

  ## How Has This Been Tested?
  New unit test `llmq_blockprocessor_tests/qfcommit_with_more_signers_replaces_stored_one`. It sends solicited `qfcommit` messages through `PeerManager`: ones with fewer or equal signers are dropped before verification, and one with more signers reaches verification. It then checks that a replacement removes the old commitment. The test fails on `develop` and passes with this change. `test_dash --run_test='llmq_*'` passes.

  ## Breaking Changes
  None.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation
  - [ ] I have assigned this pull request to a milestone _(if you have permission to set one)_

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

Top commit has no ACKs.

Tree-SHA512: b64bc5d4b28f647f99807a9a30cb88652f8af32cec1da11e32fdbd44af8af4461c44a416855582ca793e84e8f0b8bfe44d437e3a0bf0fed854de7b4cc8ffafd2
(cherry picked from commit 9c981d9)

Backport adaptation (src/test/llmq_blockprocessor_tests.cpp): v24.0.x has
no ChainstateManager::IsInitialBlockDownload(); the new test calls it on
the active chainstate, as the existing test in this file does. The source
change is identical to the develop pick.
…once when choosing a collateral to charge

f2f4658 fix(coinjoin): count each non-signing participant once when choosing a collateral to charge (pasta)

Pull request description:

  ## Issue being fixed or feature implemented

  During signing timeout, a participant's collateral is added to the offender list once for every unsigned input. With three admitted participants, a single participant leaving three inputs unsigned therefore trips the “everyone is an offender” guard and escapes a collateral charge. Smaller duplicate counts can also bias the charge gates and random selection.

  ## What was done?

  Stop scanning an entry after its first unsigned input. Each non-signing participant contributes its collateral once. The session-collateral denominator, charge probabilities, reservations and signature admission checks are unchanged.

  ## How Has This Been Tested?

  The new `coinjoin_inouts_tests/server_signing_timeout_charges_each_offender_once` test uses the existing server fixture and deterministic GetRand mode, then calls `CheckTimeout()` and observes which signed collateral transaction enters the mempool. It covers one missing signature, three missing signatures from one participant, no offenders, and all participants offending. No new server testing hooks were added.

  With the test applied to unmodified develop at `7d85e330840f`, the three-unsigned-input case fails with one assertion because the offender's collateral never enters the mempool. It passes with the one-line fix.

  Validation on macOS arm64:

  - Debug build with warnings as errors: `make -C src -j4 dashd dash-cli test/test_dash`.
  - `./src/test/test_dash --run_test=coinjoin_inouts_tests/server_signing_timeout_charges_each_offender_once` before and after the fix.
  - `./src/test/test_dash --run_test=coinjoin_tests,coinjoin_inouts_tests,coinjoin_queue_tests,coinjoin_dstxmanager_tests`
  - Existing `rpc_coinjoin.py --legacy-wallet` and `rpc_coinjoin.py --descriptors` functional tests through the RAM-disk helper, with `TEST_RUNNER_PORT_MIN=15500`. Both passed.
  - `COMMIT_RANGE=HEAD python3 test/lint/lint-whitespace.py` and `git diff --check`.

  ## Breaking Changes

  None. Wire formats, consensus rules and RPC interfaces are unchanged.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation (no options or interfaces changed)
  - [x] I have assigned this pull request to a milestone

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

Top commit has no ACKs.

Tree-SHA512: 085d0b489ff9bc5c2b405673041396c6d70babc1851820f8df6d7210a50536b4ce5c4ea5bb945ea569ca8814bdad8f4549333ee38d850c7b63a26ba3e576edc2
(cherry picked from commit bc71be6)

Backport adaptation (src/test/coinjoin_inouts_tests.cpp): v24.0.x's
SignSignature has no SignatureData out-parameter, so the new test uses the
six-argument form, as the tests from dashpay#7815 in this file do. The source
change is identical to the develop pick.
…as already seen

6876e6e fix(spork): keep signed update timestamps increasing (pasta)

Pull request description:

  ## Issue being fixed or feature implemented

  Two spork updates in the same second leave the signer on the second value while peers keep the first: UpdateSpork signs both with the same timestamp, but ProcessSpork rejects timestamps no newer than the active message. A clock rollback produces the same divergence.

  ## What was done?

  Choose the timestamp while holding the spork manager lock, using the later of adjusted time and the previous active timestamp plus one second. Peer acceptance rules are unchanged.

  The signer's nTimeSigned may run ahead of adjusted time by up to one second per rapid update. Peers reject sporks more than two hours in the future. If enough rapid updates, or an active message already near that limit, would push the next timestamp past it, `UpdateSpork` now fails, and `spork` returns null as for its other failures. It no longer stores and relays a message that peers reject. The regression test covers that case.

  ## How Has This Been Tested?

  Built on macOS arm64 with the prebuilt depends toolchain, debug checks and warnings treated as errors (`make -j4`).

  Added `spork_tests/rapid_updates_are_accepted_by_peers`: two UpdateSpork calls in the same mocktime second, followed by a clock rollback and a forward jump. Every signed message is validated and processed by a separate CSporkManager, and the test checks the peer's active value. Replaying each message is still rejected.

  On unchanged develop `7d85e330840f`, `src/test/test_dash --run_test=spork_tests/rapid_updates_are_accepted_by_peers --log_level=test_suite` exits 201 with six failures: the same-second and rollback updates retain stale timestamps, are rejected by the peer, and leave its value at 1 while the signer advances to 2 and 3.

  With the fix, `src/test/test_dash --run_test=spork_tests --log_level=test_suite` passes all five cases. `COMMIT_RANGE=HEAD python3 test/lint/lint-whitespace.py` and `git diff --check` pass.

  ## Breaking Changes

  Signed timestamps can advance ahead of adjusted time as described above. Message serialization and peer validation rules are unchanged.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation (not needed)
  - [ ] I have assigned this pull request to a milestone

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

Top commit has no ACKs.

Tree-SHA512: 30b905997ff59e89297374e9adf795aadb7d59c190ba99b2c88d6d9d75459a1e657ed50923b78782f430c884e3813eb25a8ae4e2993b3019da18e6a846fa140a
(cherry picked from commit d6436b2)

Backport adaptation (src/test/spork_tests.cpp): v24.0.x does not have
spork_signature_binds_value_and_time (from 84ac97b, not backported) or
the CSporkManager(datadir) constructor (from 3333b4b). The new
rapid_updates_are_accepted_by_peers test is placed after the last existing
case and builds its managers with the default constructor. src/spork.cpp is
unchanged from the develop pick.
cd3968e fix(wallet): check every BIP39 checksum bit (pasta)

Pull request description:

  ## Issue being fixed or feature implemented

  Mnemonic validation uses XOR in the checksum-mask calculation, so it checks only some BIP39 checksum bits: 2, 3, 1, 2 and 2 of the 4, 5, 6, 7 and 8 bits for 12-, 15-, 18-, 21- and 24-word mnemonics. For example, eleven `abandon` words followed by `accident` or `able` are accepted despite having an invalid checksum. Accepting a mistyped mnemonic during wallet setup can derive an unintended seed.

  ## What was done?

  Use the high 4–8 bits of the checksum byte as the mask.

  The new test builds a valid mnemonic for each of the five lengths, flips each checksum bit of the last word in turn, and checks that every resulting mnemonic is rejected.

  No legacy override for the previously accepted phrases is added: they were never valid BIP39 and other wallets already reject them.

  ## How Has This Been Tested?

  On macOS arm64, configured with depends, `--enable-debug`, `--enable-werror` and `--enable-suppress-external-warnings`:

  - `make` passed.
  - `./src/test/test_dash --run_test=bip39_tests` passes with the fix. With `src/wallet/bip39.cpp` reverted to develop, the new case fails for 20 of the 30 flipped-bit mnemonics, across all five lengths.

  ## Breaking Changes

  Wallet setup (new HD wallets and `upgradetohd`) now rejects invalid mnemonics previously accepted by the incomplete checksum check. Existing wallet loading is unaffected: the stored mnemonic is not re-validated on load.

  ## Checklist:

  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation (not needed for this fix)
  - [x] I have assigned this pull request to a milestone

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

Top commit has no ACKs.

Tree-SHA512: b386300df62f38da2e9da75b6ec79dcf953e9b6e4c6ba959cbedf2db31111dda78931aa5964740abd0b1bc673c0b4923f85ac6a046dc9952232277b79f5efbef
(cherry picked from commit 5683ef9)
…nt handling in Dash RPCs

ce16d7f doc(rpc): describe operatorReward as a percentage from 0 to 100 (pasta)
312e853 fix(rpc): require evodb verify/repair endpoints on the active chain (pasta)
57c9178 fix(rpc): use EnsureConnman in mnauth (pasta)
79614ed fix(rpc): accept the single-address string form in getaddressdeltas (pasta)
9338e91 fix(rpc): walk the active chain under cs_main in getblockheaders (pasta)
1aa03e3 fix(rpc): avoid signed overflow in masternode payments and getspecialtxes (pasta)

Pull request description:

  ## Issue being fixed or feature implemented

  Several Dash RPC edge cases reject supported inputs, perform overflowing signed arithmetic, or access chain state without the required protection. EvoDB verification and repair also accept stale-fork endpoints even though they operate on active-chain data.

  ## What was done?

  One commit per fix:

  - `masternode payments`, `getspecialtxes`: handle an explicit null payment count as the default, compute the magnitude of negative counts safely (including INT64_MIN), and avoid overflowing `skip + count`.
  - `getblockheaders`: collect the block indexes and the tip under `cs_main`, then serialize the captured headers outside the lock.
  - `getaddressdeltas`: accept the supported single-address string form.
  - `mnauth`: use `EnsureConnman`.
  - `evodb verify`/`repair`: require both endpoints to belong to the active chain.
  - operatorReward help and error messages: describe percentages from 0 to 100 and display a single percent sign.

  ## How Has This Been Tested?

  On macOS arm64, with a debug/werror build and functional-test datadirs on a RAM disk:

  - Added checks to existing masternode, address-index and blockchain scenarios. On unchanged develop, null payment counts and string-form address deltas fail with RPC type errors, and stale-fork EvoDB endpoints are accepted. Those checks pass with the fixes. The added `getblockheaders` checks (multiple headers, count truncation, hex form) also pass on develop: they cover the rewritten traversal, not the race.
  - Ran the INT64_MIN payment and `getspecialtxes` checks separately on unchanged develop: both terminate the debug daemon with an arithmetic trap (`-ftrapv`). The reachable special-transaction overflow uses count=2147483647, skip=1 in a block containing at least two special transactions.
  - `make -j4`; `src/test/test_dash --run_test=rpc_tests`.
  - RAM-disk functional runner: `-j2 --timeout-factor=2 rpc_masternode.py feature_addressindex.py rpc_blockchain.py rpc_mnauth.py rpc_help.py`.
  - Rebuilt with `--with-sanitizers=integer,undefined` and reran the same five tests with CI's UBSan options and suppressions: all pass. The first version of the negative-count magnitude (`0 - uint64_t(count)`) tripped `unsigned-integer-overflow` in `rpc_masternode.py` there, as it did in `linux64_asan`; it is now `~uint64_t(count) + 1`, the form `CScriptNum` uses.
  - Python flake8 using the repository's enabled checks, whitespace lint, and `git diff --check`. The repository Python lint's mypy step reports three existing errors in unchanged files with mypy 2.4.1.

  The header traversal race and absent-connman path were verified by source inspection; no TSAN run was performed.

  ## Breaking Changes

  EvoDB verify/repair now reject stale-fork endpoints with RPC error -8. Supported active-chain requests retain their behavior.

  Some error messages change on invalid input:
  - `getblockheaders` checks `count` before looking up the block, so a call with an unknown hash and a bad count now reports "Count is out of range".
  - `getaddressdeltas` called without an address or with an array now fails with -5 "Invalid address" instead of a JSON type error.
  - The `evodb` not-found errors now say "... not found in active chain".

  ## Checklist:

  - [x] I have performed a self-review of my own code
  - [x] I have made corresponding changes to the documentation
  - [ ] I have assigned this pull request to a milestone

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

Top commit has no ACKs.

Tree-SHA512: 5149542a735ca73c67c7465920e72d76097c9df7843accfb9725aded418f272242cea1af692e825c9c32205dc25490a2d7814b9e569dbb12fedab77e4804f688
(cherry picked from commit f75b6ab)

Backport adaptation (src/rpc/masternode.cpp): in masternode_payments the
old loop condition on v24.0.x is spelled uint64_t(std::abs(nCount)) and the
neighbouring lines differ (CHECK_NONFATAL(node.chain_helper), the older
ReadBlockFromDisk call). The loop condition is replaced with the develop
one, nAbsCount; the change is otherwise identical to the develop pick.
…cache capacity limits

da98191 fix: enforce the capacity of CacheMap and CacheMultiMap (pasta)
8e0e69a fix: CacheMultiMap use-after-free on same-key eviction and broken copy (pasta)

Pull request description:

  ## Issue being fixed or feature implemented

  Inserting a second value for a key in a full CacheMultiMap can evict the key's last entry and then write through its freed index node. Copy construction and assignment also retain iterators into the source cache, so clearing the source leaves dangling iterators in the copy.

  Separately, both cache types accept inserts at zero capacity (the default-constructed state) and leave old entries behind when their capacity is reduced.

  ## What was done?

  Two commits:

  1. **CacheMultiMap eviction and copy.** `Insert` checks for a duplicate first and resolves the key's index entry only after pruning. CacheMultiMap gets real copy operations that rebuild the index; the old ones took a `CacheMap`, so they were never used as copy operations and the implicit memberwise ones ran instead.
  2. **Capacity enforcement in CacheMap and CacheMultiMap.** Inserts at zero capacity are rejected, `SetMaxSize` prunes down to a reduced bound, and `Insert` prunes until there is room rather than evicting exactly one entry. The zero check is what keeps that loop finite. This is hardening: both production caches are built with `MAX_CACHE_SIZE` and never resized, and no shipped code can produce a cache above its bound, so node behaviour does not change. For the same reason there is no extra code to trim an oversized cache on the duplicate and zero-capacity early returns.

  The serialization format is unchanged, including the serialized `nMaxSize` field.

  dashpay#7819 fixes the same `Insert` use-after-free as part of a larger change, with the same lines as commit 1. Whichever merges second should drop its copy of that hunk and its duplicate eviction test.

  ## How Has This Been Tested?

  Built on macOS arm64 against the depends prefix with `--enable-debug --enable-werror`.

  `src/test/test_dash --run_test=cachemap_tests,cachemultimap_tests,governance_vote_processing_tests` passes at the head, and the two cache suites pass at the first commit on its own.

  With the two headers reverted to develop `5c34dcfbf7`:

  - `cachemultimap_tests/same_key_eviction_at_capacity` fails without a sanitizer (the second insertion writes through the freed index node).
  - `cachemultimap_tests/capacity_limits` and `cachemap_tests/capacity_limits` fail (zero-capacity insertion accepted, old entries surviving a capacity reduction).

  A standalone AddressSanitizer driver over the two headers (same-key insert at capacity 1; copy-construct and assign, clear the source, then `GetAll`/`Erase` on the copies) reports heap-use-after-free on develop and is clean at the first commit and at the head. The copy checks added to `cachemultimap_test` exercise the same path, but only fail deterministically under ASan, which the ASan CI job provides.

  ## Breaking Changes

  No RPC or serialization changes. Zero-capacity caches now reject inserts, and shrinking capacity immediately removes the oldest entries; no production cache does either.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation (not needed)
  - [ ] I have assigned this pull request to a milestone

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

Top commit has no ACKs.

Tree-SHA512: c677e81d6f1e42295112ea875ddcfe5e727c78ac3fbb19ab758fc46298376aaa225daf7ce8cab5f6910d97c255694f528a674a730998f18ba61562f8ab4a7d11
(cherry picked from commit 649903c)
…ets runnable; fix two RPC arguments, BLS bench indexing

83c1f02 bench: cycle parallel BLS verification inputs (pasta)
a34ad94 test: complete the rpc fuzz command tables (pasta)
7a4325d test: fix the tx_pool_standard supply invariant (pasta)
e1f8795 fix(rpc): reject a negative masternode winners count (pasta)
13ac7c7 fix(rpc): reject an out-of-range verifyislock maxHeight (pasta)

Pull request description:

  ## Issue being fixed or feature implemented

  Two fuzz targets abort on valid inputs, and one benchmark measures the wrong workload:

  - `rpc` terminates during initialization because registered Dash commands are missing from its command tables. Once the tables are complete, the target finds two RPC argument bugs straight away:
    - `verifyislock` with a `maxHeight` below -1 or above the tip, for a transaction that is unknown or mined above `maxHeight`, hits `CHECK_NONFATAL` and reports "Internal bug detected".
    - `masternode winners -2147483648` overflows a signed subtraction. That is undefined behavior, and it aborts a `--enable-debug` node (`-ftrapv`).
  - `tx_pool_standard` aborts on its supply invariant. Its fixture mines 500-DASH coinbases but expects 50, and the invariant leaves out mempool fees, so it also fails after the first accepted fee-paying transaction. Bitcoin Core's version of the check starts from `tx_pool.GetTotalFee()`; the Dash backport of bitcoin#21142 dropped that term.
  - The parallel BLS verification benchmark queues signature zero every time instead of cycling through its inputs.

  ## What was done?

  One commit per item:

  **`verifyislock`.** A height that is not on the active chain is rejected with `RPC_INVALID_PARAMETER` ("Block height out of range"), as `getblockhash` does. A `maxHeight` above the tip is still accepted when the transaction is mined at or below it.

  **`masternode winners`.** A negative `count` is rejected with `RPC_INVALID_PARAMETER`. Before, any negative count returned only the projected payees.

  **`tx_pool_standard` target.** Use the Dash regtest subsidy in `SUPPLY_TOTAL` and restore the mempool fee term in the supply invariant, which makes the check match Bitcoin Core.

  **`rpc` target.** Complete the core RPC command tables and remove the duplicate `gettxspendingprevout` entry. Exclude commands that change DKG simulation, masternode sync/authentication, spork, governance or ChainLock state, repair EvoDB, or connect masternodes. Exclude `debug`, which changes global log categories; `logging` stays available, as in Bitcoin Core. Also exclude the `quorum`, `gobject` and `masternode` parent aliases, which can dispatch to excluded subcommands; their read-only subcommands are listed explicitly.

  Compound names such as `quorum info` are split into the parent method and a fixed first argument before CLI parameter conversion and dispatch, the same way `dash-cli` sends them, so numeric and boolean parameters are converted at the right positions. The allow-list is checked against the full name before the split, and fuzzed arguments cannot replace the subcommand.

  `RPCFuzzTestingSetup` constructs an empty governance manager, as node initialization does, so inputs such as `gobject count` can execute. No cache is loaded from disk.

  In wallet-enabled builds `protx list` and `protx info` are registered by the wallet RPC table, which this fixture does not load, so they return "Method not found" there. That is a coverage gap, not a crash, and is left for a separate change.

  **BLS benchmark.** Move the index out of the refill loop. Benchmark sizes and sanity-mode queue sizes are unchanged. `BLS_Verify_BatchedParallel` results are not comparable with earlier runs.

  ## How Has This Been Tested?

  CI builds the fuzz binary but does not run fuzz targets, so these were run locally with the standalone fuzz executable (`--enable-debug` build, no libFuzzer; input replay, not a mutation campaign).

  - On develop, `FUZZ=rpc src/test/fuzz/fuzz </dev/null` aborts on the missing command `bls`. With this PR the target initializes. A 5319-input `rpc` corpus replayed cleanly on the previous revision of the harness; it barely calls the Dash commands, so it only shows that the tables are complete and the upstream commands still pass.
  - The newly listed commands were exercised with 464,448 generated inputs: for each of the 64 new names, every combination of zero, one and two arguments from a pool of 47 values (boundary integers, LLMQ types, zero/genesis/unknown hashes, BLS-sized hex, booleans, addresses, JSON arrays and objects, keywords), plus 5,000 random 3-to-7-argument calls weighted towards hashes and integers. This found the `masternode winners` overflow. The `verifyislock` abort was reproduced without its fix using `verifyislock <id> <txid> <sig> 1`. With both fixes, every input passes. The fixture chain is at genesis with no masternodes or quorums, so this covers argument handling, not deeper state.
  - `rpc_verifyislock.py` and `feature_llmq_evo.py` pass with the added checks.
  - `tx_pool_standard`: 20,000 random inputs replay cleanly. The same binary without the fee term aborts at `supply_now == SUPPLY_TOTAL` on inputs from that set, and without the subsidy change it aborts on the first loop iteration.
  - `src/bench/bench_dash -sanity-check -filter='BLS.*'` passes. A temporary counter in `BLS_Verify_BatchedParallel` showed indices 0 through 11 being queued.

  ## Breaking Changes

  `masternode winners` now rejects a negative `count`, and `verifyislock` reports an out-of-range height as an invalid parameter instead of an internal bug. The corrected parallel BLS benchmark measures a different input workload.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation (not applicable)
  - [ ] I have assigned this pull request to a milestone

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

Top commit has no ACKs.

Tree-SHA512: e892abded198cf7dffcac325276d74239139ee1a91bbccdabfe3bccc6b7613b8ab64335cf25dd0074964b2669a37704c0b1e879d9df6b99b97abcb9618e5c999
(cherry picked from commit 90f6c69)

Backport adaptation (src/test/fuzz/rpc.cpp): the develop changes to the
rpc fuzz target are left out. They build the fuzz setup with develop's
CGovernanceManager constructor and edit command lists that differ on
v24.0.x (for example "importmempool" and "getprioritisedtransactions" do
not exist here), so the file is kept as it is on v24.0.x. The two RPC
fixes (masternode winners, verifyislock), the tx_pool fuzz and BLS bench
fixes and the functional test changes are identical to the develop pick.
…ng clients by sharing the server validation

79defda fix(coinjoin): validate DSQUEUE denomination on mixing clients (pasta)
8957837 refactor(coinjoin): extract shared DSQUEUE validation from the server (pasta)

Pull request description:

  ## Issue being fixed or feature implemented

  Mixing clients accept a signed DSQUEUE with an invalid denomination into their queue. Masternodes have rejected such queues (misbehaving 10) since dashpay#6865, but that check was added only to the server's DSQUEUE handler. The wallet-side handler keeps its own copy of the same validation, and the two copies have drifted apart. The bogus queue matches no session, but it takes up a queue slot, and it counts toward the masternode's mixing-rate threshold.

  ## What was done?

  - **refactor:** moved the DSQUEUE checks that both roles share into `CoinJoin::ValidateDSQueue` (`src/coinjoin/coinjoin.{h,cpp}`):
    - denomination
    - masternode lookup by protx
    - time bounds
    - collateral lookup
    - operator signature

    It returns the signing masternode and the score to penalize the peer with. `CCoinJoinServer::ProcessDSQUEUE` now uses it. The server's checks, order and penalties are unchanged.
  - **fix:** `CJWalletManagerImpl::ProcessDSQueue` uses the same function, so clients now reject invalid denominations with the same penalty as the server (10).

  The duplicate check is passed in as a callback. Each role keeps its own queue storage and locking, and duplicates are still dropped before the BLS signature is verified. Each caller applies the returned penalty its own way (`PeerMisbehaving` on the server, `MisbehavingError` on the client).

  Remaining differences between the two handlers, kept on purpose and not changed here:
  - **Mixing-rate threshold:** the server applies it, and `AllowMixing`, only to non-ready queues, and never stores or relays ready queues. The client first tries to submit to its session for a ready queue. If no session is waiting on that masternode, it applies the threshold and stores the ready queue like any other. So on clients, ready queues count toward the threshold. This is long-standing behavior. It may deserve its own look, but this PR doesn't change it.
  - **Duplicate tracking:** the server uses `TryCheckDuplicate` under `TRY_LOCK` and drops the message silently on lock contention. The client takes a blocking lock, checks `HasQueue(hash)` then `HasQueueFromMasternode`, and holds `cs_ProcessDSQueue` until it has stored the queue.
  - **After validation:** the server relays the queue. The client marks queues it already joined as tried.

  Side effects of the client change:
  - The client penalizes the peer that relayed the queue, as the server already does. Only masternodes relay DSQUEUEs, and since v23.0.0 they drop invalid denominations before relaying. A masternode running something older than v23.0.0 could relay a bad-denomination queue that another masternode signed, and get scored 10. The server has behaved this way since dashpay#6865.
  - A ready queue with an invalid denomination is now dropped before the client tries to submit to its session.

  `masternodeOutpoint` is not serialized, so in practice every DSQUEUE is resolved through `m_protxHash`. The collateral lookup and protx fill-in after it can't fail for network input. I kept them so the server code moves over line for line.

  ## How Has This Been Tested?

  - New unit test `coinjoin_queue_tests/client_rejects_invalid_queues`:
    - It registers a masternode on a DIP3 regtest chain and feeds signed DSQUEUEs through `CJWalletManager::processMessage`.
    - It checks the returned penalty and whether the queue was stored for: an invalid denomination (non-ready and ready queue), a missing protx, an unknown protx and a wrong signer.
    - A valid queue from the same masternode is the accepted control.
    - Without the client change, the invalid-denomination row fails: the queue is stored and no penalty is returned.
  - Both commits build on their own, and `coinjoin_queue_tests` passes on each.
  - Also run on Linux x86_64 with `--enable-debug`:
    - unit tests: `coinjoin_queue_tests`, `coinjoin_inouts_tests`, `coinjoin_dstxmanager_tests`, `coinjoin_tests`
    - functional tests: `rpc_coinjoin.py`, `p2p_dstx.py`
    - lints: `lint-circular-dependencies.py`, `lint-includes.py`, `lint-whitespace.py`

  ## Breaking Changes

  None.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation
  - [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

Top commit has no ACKs.

Tree-SHA512: b34ea65f1977b646253eba334a9b4cbc638869070589f1fac57d3c621b1a149a2d421b952087044dbd087d5fd4189ae57128eeea846174492a6c1410c7e6a4da
(cherry picked from commit e67204d)

Backport adaptation (src/coinjoin/walletman.cpp): the develop hunk replaces
the client's duplicate checks with CoinJoin::ValidateDSQueue. On v24.0.x
the multi-line LogPrint in the duplicate check carries the /* Continued */
marker that this branch's log linter expects; the develop code is taken
with that marker kept. The change is otherwise identical to the develop
pick.

src/test/coinjoin_queue_tests.cpp: v24.0.x has no ChainType, so the new
test fixture passes CBaseChainParams::REGTEST, as other tests here do.
fb48545 fix(qt): keep CoinJoin overview state per wallet page (pasta)
d7bf968 fix(qt): keep the transactions sync warning hidden in discreet mode (pasta)
a8bb1d0 fix(qt): reset overview balance indentation when watch-only is hidden (pasta)
feca328 fix(qt): emit a valid range when a transaction's status is invalidated (pasta)
3747fa0 fix(qt): substitute the chain prefix in the DASH unit description (pasta)
d7b127f fix(qt): keep credit pool placeholders until the feed has data (pasta)
bccc5ed fix(qt): refresh proposal info on display unit change and wallet unload (pasta)
33be09d fix(qt): clear the traffic graph sample stash on clear() (pasta)
4d4af61 fix(qt): keep Coin Control results paired with their outpoints (pasta)
e859c35 fix(qt): keep a contact's label when its sending address is edited (pasta)

Pull request description:

  ## Issue being fixed or feature implemented

  Several Qt views show stale or wrong data, and Coin Control can unselect the wrong input:

  - Editing a contact's address in the address book replaces its label with the new address.
  - After Coin Control skips an unavailable coin, every later `getCoins()` result is matched to the wrong outpoint, so a coin spent elsewhere unselects a different input.
  - Clearing the network traffic graph leaves stashed samples behind, which reappear in the longer ranges.
  - With several wallets loaded, the overview pages share CoinJoin visibility and throttling state, so one wallet's page can suppress another's updates.

  ## What was done?

  One commit per fix:

  - `AddressTableModel`: keep the existing label when a sending address is replaced.
  - `CoinControlDialog`: advance the outpoint index for every `getCoins()` result, including the skipped ones.
  - `TrafficGraphData::clear()`: clear `sampleStash` (it cleared `sampleMap` twice).
  - `ProposalInfo`: refresh when the display unit changes, and when the wallet is unloaded so its masternode counts don't stay on screen.
  - `NetworkWidget`: a display unit change before the first credit pool result no longer replaces the placeholders with zero amounts.
  - `BitcoinUnits`: substitute the chain prefix in the DASH unit description, which was returned with a literal `%1`.
  - `TransactionTableModel`: emit `dataChanged` over the inclusive row range, and only when the transaction is in the model.
  - `OverviewPage`: reset the balance label indentation when watch-only balances are hidden; keep the transactions out-of-sync label hidden in discreet mode; keep the CoinJoin visibility cache and progress throttle per page instead of in function statics.

  The address book and Coin Control bugs are also present in Bitcoin Core (unchanged at bitcoin master `c68583ab5a886b6add45a8607d762b71678c748c`).

  ## How Has This Been Tested?

  Built on macOS arm64 with `--enable-debug --enable-werror`; `src/qt/test/test_dash-qt` passes (16 suites, 164 passed, 0 failed).

  Two existing test scenarios gained checks, and both fail on develop without their fix:

  - `addressbooktests`: an address-only edit through `EditAddressDialog` keeps the label (without the fix the label is the replacement address).
  - `trafficgraphdatatests` `clearTests`: clear, refill, then switch to a longer range (without the fix the first bucket is 102 instead of 3).

  The other fixes have no test: each is evident from the diff, and covering them would need Qt wallet fixtures out of proportion to the change. They were checked against their callers. No interactive GUI testing was done.

  ## Breaking Changes

  None.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation (not needed for these fixes)
  - [ ] I have assigned this pull request to a milestone

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

Top commit has no ACKs.

Tree-SHA512: 4f0bb624c6ddf18b1232ad7d2290d7584443b0f00d8741108cbaa150c4c12c72ae11b89fee5bc29d105b62145a1474f233a6c439e94991cb1f4df2b29f896aec
(cherry picked from commit d2fb5e7)
… the pending queue was full

bba8a4f fix(llmq): re-request a sig share dropped because the pending queue was full (pasta)

Pull request description:

  ## Issue being fixed or feature implemented

  When we request a sig share from a peer and the response arrives while the pending sig share queue is full (the per-node cap of 1000 or the global cap of 10000), the share is dropped and never requested again.

  `ProcessMessageBatchedSigShares()` erases the per-node request entry for every share in the batch and then ignores the result of `TryAddPendingIncomingSigShare()`. Sending the request already cleared the peer's announcement, and `sigSharesRequested` still points at that peer. So `CollectSigSharesToRequest()` never asks that peer again. The share is only recovered if some *other* peer announced it, and even then only after `SIG_SHARE_REQUEST_TIMEOUT` (5s). Otherwise it stays missing until the session ends.

  ## What was done?

  If admission fails for a share whose global request marker still points at the sender, and that peer has no copy of it pending, clear the marker and restore the peer's announcement. A banned peer is skipped: its requests were released when it was banned or have timed out. The share is then requested again on the next housekeeping pass, from this peer or any other peer that announced it.

  The check uses the global marker rather than the per-node request entry. That also covers a response that arrives after the per-node entry has timed out. Unsolicited shares never have a marker pointing at the sender, so they can't cause requests. There is no backoff: while the queue stays full, the share is requested again on each housekeeping pass (every 100ms) until a copy is admitted. That is bounded by the existing limit of 32 outstanding requests per peer, and a rejected response costs only the share rebuild and the cap check, so a backoff timer isn't worth the extra state.

  ## How Has This Been Tested?

  There is no new regression test. Reproducing this needs the pending queue full at the moment a requested response arrives, while the verification thread drains that queue every 100ms. A functional test would need to flood forged-session shares and win that race. The request path also has no unit-test seam.

  To verify the fix, I injected a local fault on one node in `feature_llmq_signing.py` that made `TryAddPendingIncomingSigShare()` fail for the first two copies of each share. The first is the direct push from the signer. The second is the copy the node then requests. This was run on a v23.1.x tree; `ProcessMessageBatchedSigShares()` is identical on develop.

  | | requested copy dropped | re-requested | verified afterwards |
  | --- | --- | --- | --- |
  | without fix | 32 | 0 | 0 |
  | with fix | 32 | 31 | 28 |

  The remaining shares belonged to sessions whose recovered signature arrived first, which stops further requests by design. The test passes in both cases, because the recovered signature still propagates.

  On this branch (rebased on develop), built with `--enable-werror --enable-debug`: `test_dash`, `feature_llmq_signing.py`, `feature_llmq_signing.py --spork21` and `feature_llmq_is_cl_conflicts.py`.

  ## Breaking Changes

  None.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation
  - [ ] I have assigned this pull request to a milestone _(if you have permission to set one)_

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

ACKs for top commit:
  knst:
    utACK bba8a4f

Tree-SHA512: 83897c39a5a2f8a13a8b6f01aa1848e11bcccaffeb96d0f981ea69381e5bf729daf46abadb1c273280f10ec1ea8829bf14c3b979b7787e7760fe29ef4cb3e0e8
(cherry picked from commit 62f7069)
3d7528d fix(scripts): repair broken helper scripts (pasta)
dce21f4 Merge bitcoin#35978: contrib/init: fix unused variables in openrc script (pasta)

Pull request description:

  ## Issue being fixed or feature implemented

  Several maintenance helpers fail at startup, ignore configuration, or use stale paths. In particular, the ZMQ example crashes on Python 3.14, the Docker helper uses a nonexistent build context and a binary source directory that nothing sets, and IPv6 Dash traffic gets a mark that none of the rate-limiting filters match.

  ## What was done?

  Two commits:

  - `Merge bitcoin#35978`: a 1:1 backport for the OpenRC service script. It runs the configured `BITCOIND_BIN` instead of a hardcoded path and passes `BITCOIND_GROUP` to `start-stop-daemon`.
  - `fix(scripts)`: the Dash-side fixes.
    - `contrib/zmq/zmq_sub.py`: create and set an explicit asyncio event loop.
    - `ci/dash/build-docker.sh`: use the deployment Dockerfile's directory as the build context, copy the binaries from `src/` in the repository root it already changes into (instead of the unset `BASE_ROOT_DIR`), and stop on the first failed step (`set -e`) so a missing binary can't produce an image without it. The `rm -rf`/`mkdir -p` pair replaces a `mkdir` that failed on every second run. Nothing in CI calls this script any more; it is kept as a manual helper.
    - `contrib/qos/tc.sh`: mark IPv6 traffic with 2, the mark the `protocol ipv6 ... handle 2 fw` filter matches.
    - `contrib/devtools/copyright_header.py`: report the actual invalid argument, and name the script correctly in the usage text.
    - `contrib/devtools/gen-dash-conf.sh`: include a `[devnet]` section in the generated example configuration.
    - `.gitignore`: update the deployment `bin` path.

  The `zmq_sub.py` and `tc.sh` bugs also exist in Bitcoin Core master. They are fixed here anyway because each one stops the script from doing its job (a crash at startup, and no IPv6 limit at all), and both are one-line changes in files that already differ from upstream.

  ## How Has This Been Tested?

  - Docker helper, with `docker` and `strip` stubbed in a disposable copy of the tree and `BASE_ROOT_DIR` unset (no container image was built): with no binaries, or with only `dashd` missing, the script exits 1 without calling `docker`; with all three present, two consecutive runs exit 0, populate `contrib/containers/deploy/bin` and call `docker build` with that directory as the context.
  - Ran a proof harness before and after the fixes: the copyright error names `bogus`; OpenRC honors `BITCOIND_BIN`; both IPv6 rules match filter 2.
  - Reproduced the subscriber's Python 3.14 RuntimeError before the fix. Afterward, ran it against a live local multipart publisher and against an isolated regtest node, and verified a printed hash from `generatetoaddress`.
  - Ran the configuration generator with the built `dashd` and checked that devnet is absent before and present after the change. Started an isolated devnet with the generated configuration and `-highsubsidyblocks=2 -stopafterblockimport`: clean exit and no unrecognized-section warning. The subsidy option avoids a baseline devnet genesis/block-reward mismatch; no daemon code was changed.
  - `lint-whitespace.py` and `lint-shell.py` pass. The changed lines in `contrib/qos/tc.sh` are indented with spaces instead of the file's tabs so that `lint-whitespace.py` passes.

  No Linux traffic-control or OpenRC service host was available, so neither was run end to end; the OpenRC `-g` hunk is taken from upstream unchanged.

  ## Breaking Changes

  None. With the OpenRC backport the daemon runs under `BITCOIND_GROUP` (default `dashcore`), the group the script already uses for the data directory, PID directory and configuration file.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation
  - [ ] I have assigned this pull request to a milestone

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

Top commit has no ACKs.

Tree-SHA512: 3782cf384b1b32a5cd071ec8c7ab3f7a4f01cea43f26d82ddeb005aee4081214fe031372def9c3d2b86ed19cf3559fe294432e74dce2da5ca994b88396b59b30
(cherry picked from commit 0a163bb)
…n the block-filter rescan

e00bcaf fix(wallet): scan descriptors added during a block-filter rescan (pasta)
deb8004 fix(wallet): read descriptors under their locks in the block-filter rescan (pasta)

Pull request description:

  ## Issue being fixed or feature implemented

  A rescan that uses block filters (`-blockfilterindex`) can skip blocks that pay the wallet and still report success.

  `FastWalletRescanFilter` walks the wallet's descriptor list without `cs_wallet`, and reads each descriptor's scripts and its range end in two separate critical sections. A rescan holds neither lock while it runs, so:

  - `ensureFriendshipReceivingKeychain()` (dashpay#7763) does not reserve the rescan, and can insert a descriptor into the map the filter is walking.
  - A descriptor that is topped up or rebuilt between the two reads is taken with its old scripts, or none, but its new range end. The filter never adds the missing scripts, so it skips the blocks that pay them.
  - A descriptor added after the filter is built is never added to it, because each update only revisits the descriptors seen at construction. Every later block that pays it is skipped.

  This is split out of dashpay#8068, where it was found. It does not depend on that PR.

  ## What was done?

  The filter reads the descriptor list under `cs_wallet`, and each descriptor's scripts and range end together under `cs_desc_man`. Both locks are held only for that read. `cs_desc_man` is recursive, and the order is `cs_wallet` before `cs_desc_man`, as elsewhere.

  Each update re-reads the whole descriptor list and adds any descriptor it has not seen yet, so the filter follows the wallet's current descriptors. Blocks scanned before a descriptor was added are not revisited. As with any import, covering them is the job of whoever adds the descriptor. The filter is built only for wallets flagged as descriptor wallets. A blank wallet without the flag has no managers, so `IsLegacy()` is false for it, yet `importprivkey` can give it a legacy manager mid-scan.

  ## How Has This Been Tested?

  New unit test `wallet_tests/fast_rescan_finds_key_added_mid_scan`: with an in-memory block-filter index, it adds the key paying the coinbases from the rescan's first progress report, after the filter has been built. For a descriptor wallet, the rescan found nothing before the fix (on develop and on the earlier head of this PR) and finds all 100 coinbases with it. A blank non-descriptor wallet that gains a legacy key the same way would abort without the flag gate, and now finds them all through the slow scan. `wallet_tests`, `scriptpubkeyman_tests`, `blockfilter_index_tests` and `platformkeys_tests` pass (Linux x86_64, depends, `--enable-debug --enable-werror`).

  The torn per-descriptor read (the second bullet) has no committed test, because only a scheduling hook inside the wallet code can force that interleaving. On an earlier revision of dashpay#8068 with this same change, a temporary hook and a real block-filter index were used: a rescan racing a re-import of a descriptor missed the payment before the fix (3 of 3 runs) and found it after (3 of 3).

  ## Breaking Changes

  None.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(if you have permission to set one)_

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

Top commit has no ACKs.

Tree-SHA512: ef76031537ca3ac04a39570ea13798bd5161643257593d0c2b0d884d3fdb55859aca8898831e31fa703334caac0e26ba2964501fbea125613cb991461656b5b3

(cherry picked from commit 554030e)

Backport adaptation (src/wallet/test/wallet_tests.cpp): v24.0.x does not
have scan_for_wallet_transactions_abort (not backported), whose end is the
context of the develop hunk, or the include list it sits in. The new
fast_rescan_finds_key_added_mid_scan test is placed after
scan_for_wallet_transactions, only the include it needs is added, and its
wallets use the v24.0.x CWallet constructor (chain, coinjoin loader, name,
args, database) with CreateMockWalletDatabase(), as the neighbouring tests
do. src/wallet/wallet.cpp is unchanged from the develop pick.
…r a reindex

b26d073 fix: flush chainstate after marking masternode list diffs repaired (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  `CDeterministicMNManager::CompleteRepair()` writes its marker and then commits the whole EvoDB root transaction to disk on its own. It runs at the end of the import thread: after every `-reindex` and `-reindex-chainstate`, and after the first-start masternode-list-diff repair. At that point the root transaction also holds the EvoDB state of every block connected since the last full flush, but the coins DB has not been flushed. If the node is killed or crashes before the next full flush, EvoDB is ahead of the coins DB and the next start fails with "Error initializing block database" (or "Found EvoDB inconsistency"), so the user has to reindex again.

  ## What was done?
  - `CompleteRepair()` only writes the marker into the transaction.
  - Both callers in `init.cpp` then force-flush every flushable chainstate, which writes the block index, then coins, then EvoDB, in the same order as a clean shutdown.
  - The flush empties the coins cache, so the existing "Filling coin cache with masternode UTXOs" step now runs after the repair step instead of before it (moved unchanged).

  The marker is written under the normal chainstate's EvoDB identity. If a snapshot chainstate finished validating during the import, that chainstate is no longer flushed and the marker isn't persisted; the repair then simply runs again on the next start.

  ## How Has This Been Tested?
  `feature_reindex.py` now mines past DIP3 activation (height 440), then for both `-reindex` and `-reindex-chainstate` kills the node right after the import thread exits and checks that it restarts cleanly at the same height. On `develop` both variants fail to start with "Error initializing block database" (the coins DB is empty while EvoDB is not); with this change the test passed three times. That failure does not need DIP3; the chain is mined past it so that the passing restart also runs the DIP3-gated check of the EvoDB best block against the coins tip (block verification at startup disconnects the last blocks), which would catch a flush that persists the two databases at different tips. A separate reproduction of the first-start repair path (`-loadblock` import without the repair marker) also fails on `develop` and passes with the fix. `feature_loadblock.py`, `feature_init.py`, `feature_abortnode.py`, `feature_dip3_deterministicmns.py`, `wallet_reindex.py` and `feature_llmq_singlenode.py` pass.

  ## Breaking Changes
  None.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation
  - [ ] I have assigned this pull request to a milestone _(if you have permission to set one)_

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

Top commit has no ACKs.

Tree-SHA512: dea77ffc888211ea3f790d199acdd608ead2043e3da223fecd0e93959deeb4fa09d1ab0f85e356462f6f92f7d59129d3dcba54acbf89fa9f973f71bb0b27b772
(cherry picked from commit b3fb478)
… the chosen superblocks

52ad69d fix(qt): build the proposal payment window around the chosen superblocks (pasta)

Pull request description:

  ## Issue being fixed or feature implemented

  A proposal made with the Create Proposal dialog could pass its vote and still never be paid, after the 1 DASH fee was burned. Fixes dashpay#8153.

  The dialog built the proposal's payment window (`start_epoch`/`end_epoch`) around the moment the dialog was used, not around the superblocks the user picked. The window was always roughly "now minus half a cycle" to "now plus (payments − 0.5) cycles", wherever the chosen superblocks were.

  Masternodes only put a proposal into a superblock whose estimated time lies inside that window (`GovernanceSigner::CreateSuperblockCandidate`), and a proposal past its `end_epoch` is deleted as expired. On mainnet that means:

  - a one-payment proposal for the next superblock is never paid if it is filed more than about 14.5 days before it;
  - a one-payment proposal for any later superblock is never paid;
  - a multi-payment proposal loses its last payment(s). A live 6-payment mainnet proposal created with the dialog expires on 2026-12-16, a few days before the December superblock.

  The dates in the "Payment date" list had the same cause: the next superblock was labelled with the current time, and later ones stepped by 150 s blocks.

  ## What was done?

  - Added `governance::EstimateBlockTime` and `governance::EstimateProposalWindow`. The window runs from half a cycle before the first chosen superblock to half a cycle after the last, with each height's time estimated from the chain tip. This is what the web proposal generator does.
  - The estimate uses the 2.62-minute block interval of the trigger builder, which now calls the same helper (the arithmetic is unchanged). Using the 150 s target spacing instead would drift by about 1.4 days per cycle and cut off the last payment of long proposals.
  - The dialog takes the tip height and time once when it opens and uses them for both the window and the dates in the list, so the date shown is the centre of the window written.
  - The list no longer offers the next superblock once its voting deadline has passed. Because the list is filled when the dialog opens, the deadline of the selected superblock is checked again when Create Proposal is clicked and once more after the unlock and confirmation prompts, before the fee is paid.

  Proposals already created with the old window cannot be repaired, because the window is part of the hashed proposal data.

  ## How Has This Been Tested?

  - New unit test `governance_superblock_tests/proposal_window_holds_exactly_the_chosen_superblocks`: with mainnet cycle parameters, for filing points across the cycle, 1–12 payments, 0–11 skipped superblocks and ±1% block-time drift, it checks that the trigger builder's estimate of each chosen superblock is inside the window, and that the superblocks just before and after are outside it even with the trigger builder's two-hour tolerance. With the old window arithmetic substituted into the helper the test reports 17034 failures; with the fix it passes.
  - `governance_*` unit tests, `feature_governance.py` and `feature_governance_cl.py` pass.
  - Ran the dialog in `dash-qt` on regtest (tip 107, next superblock 1500, cycle 20): the first entry was dated 1393 × 157.2 s ahead and later entries stepped by 20 blocks; for the second entry with 3 payments the JSON showed a window spanning heights 1510–1570. With the tip at 1492 (past the deadline at 1490) the list started at superblock 1520. With the dialog opened before the deadline and the tip then mined past it, Create Proposal showed "Voting deadline has passed for this date" and did not proceed; the same happened when the blocks were mined while the confirmation prompt was open, and the wallet sent no fee transaction. Choosing the following superblock then created the proposal normally, with a window spanning heights 1510–1530 around superblock 1520.

  ## Breaking Changes

  None.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(if you have permission to set one)_

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

Top commit has no ACKs.

Tree-SHA512: 7afd012d802d0e5aa0a4b7a761dd3824553bc9c53ad09b81bc727f7662daa5618631fc096d08469836fefc1ffcae88dd22698912436ec1e44c13185b5c8936aa
(cherry picked from commit d412e52)

Backport adaptation (src/governance/signing.cpp): v24.0.x still has the
two-argument CSuperblock::GetPaymentsLimit(active_chain, height) under
cs_main (develop dropped the chain argument in 2943376, which is a
refactor and is not backported). Only the SBEpochTime line is replaced with
the develop one; the governanceBudget line is kept as it is on v24.0.x. The
arithmetic of the trigger builder's estimate is unchanged. The other files
are unchanged from the develop pick.
…SBT save and shared masternode fee bugs

86aa4ff fix(qt): retry the proposal feed and stop feeds with the client model (pasta)
353765c fix(qt): keep the CoinJoin send tab away from the saved change address (pasta)
85356de fix(qt): report PSBT save failures and handle an unknown PSBT fee (pasta)
71325a1 fix(qt): require a fee address for shared masternode service changes (pasta)
a37fe69 fix(qt): stop a wallet migration when the user cancels it (pasta)
0cb3970 fix(qt): open the requested options page when the wallet is disabled (pasta)

Pull request description:

  ## Issue being fixed or feature implemented

  A batch of small, independent Qt bugs, one commit each:

  - With `-disablewallet`, clicking the proxy icon opens the Appearance page of the options dialog instead of Network.
  - Cancelling a wallet migration leaks its activity object, and cancelling the passphrase prompt does not stop the migration. A wallet unlocked only for mixing is never asked for its passphrase.
  - The service-update and revoke dialogs for a shared masternode leave OK enabled when the wallet has no funded address to pay the fee, and send the request without a fee source.
  - Saving a PSBT reports success even if the write failed, and the file name goes through the local 8-bit code page. The PSBT dialog dereferences an empty optional when the fee is unknown and shows a zero fee as unknown.
  - The CoinJoin send tab loads the regular send tab's saved custom change address and overwrites it on shutdown.
  - The proposal feed gives up when the masternode feed has no data yet, and `ClientModel::stop()` leaves the feed workers running.

  ## What was done?

  - **Options:** register every tab button under its `Tab` value and select the page widget that belongs to it. The buttons used to be numbered in the order they were added, so the IDs shifted when the Wallet and CoinJoin buttons were skipped. `AppearanceWidget::model` is now initialized, because destroying a dialog that never got a model (as the new test does) read it uninitialized.
  - **Migration:** emit `finished()` on both cancel paths, stop when the passphrase prompt is cancelled, and prompt mixing-only wallets too. A failed unlock attempt can leave the wallet unlocked, so a cancelled prompt puts the wallet back into the locked or mixing-only state it started in. Bitcoin Core stops on a cancelled passphrase prompt since bitcoin-core/gui#824, which is not backported here: it is a five-commit feature (migrating wallets that are not loaded), and it still returns from both cancel paths without emitting `finished()`.
  - **Shared masternode dialogs:** OK stays disabled until a fee address is selected, the dialogs re-validate when the selection changes, and the disabled button's tooltip says why. `buildRequest` has no second check: OK is the only way to submit, which matches `UpdateShareDialog`.
  - **PSBT:** both save sites (PSBT operations dialog and the send dialog's export) open the file through `GUIUtil::QStringToPath` and report an error if the stream failed. The fee check uses `has_value()`. Bitcoin Core has the same problems at `6f1365e34f51`, so this is not a backport.
  - **CoinJoin:** skip the `sCustomChangeAddress` read and write for the CoinJoin send dialog.
  - **Feeds:** mark a retry as pending when the proposal feed's masternode data is not ready, and stop the feeds in `ClientModel::stop()`.

  ## How Has This Been Tested?

  macOS arm64, Qt 5.15, `--enable-debug --enable-werror`: `src/qt/test/test_dash-qt` passes (165 passed, 0 failed, 2 skipped).

  - `OptionTests::tabsWithoutWallet` (new) opens Network, Display and Appearance on a dialog built without wallet support. With develop's `optionsdialog.cpp` it fails: Network opens `pageAppearance`.
  - `MasternodeMaintenanceTests::automaticFeeSource` gains checks that OK is disabled for a shared masternode in an unfunded wallet, and that it follows the fee picker's selection in a funded one. With develop's dialogs these fail: OK is enabled in all four cases.

  The migration, PSBT, CoinJoin and feed fixes have no tests. Each is a one- or two-line guard, and exercising them needs modal dialogs, file-system write failures or `QSettings` state shared across dialog lifetimes. They were checked by reading the code paths. The Windows path handling was not run on Windows; it relies on `GUIUtil::QStringToPath`, which the GUI already uses for the data directory path.

  ## Breaking Changes

  None.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation (not needed for these fixes)
  - [x] I have assigned this pull request to a milestone

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

Top commit has no ACKs.

Tree-SHA512: 73bec9006bbaae4a001776ea8edd3cc79788ac92a92531c89b7f7abf920b4ec6c854c141021381f3af7e16c870e532ef92ffef9178a017c400beb8ae18e1dbc9
(cherry picked from commit 1b916c4)

Backport adaptation:
- src/qt/sendcoinsdialog.cpp: on v24.0.x the success message after saving a
  PSBT is not yet wrapped in tr() and has no translator comment (develop
  changed that separately). The new failure check is added above the
  existing v24.0.x success line, which is kept as it is.
- src/qt/test/optiontests.cpp: v24.0.x does not have the develop-only
  fontScaleSources test that precedes the new one; only tabsWithoutWallet
  is added.
The other changes are identical to the develop pick.
…re-sign, so a retroactive IS lock can't be lost

e6f06ff fix(llmq): restart the signing session timeout when we re-sign (pasta)

Pull request description:

  ## Issue being fixed or feature implemented

  `feature_llmq_is_retroactive.py` fails intermittently in the step "testing retroactive signing with partially known TX": `wait_for_chainlocked_block_all_nodes(block)` (line 131) times out after 15 s. On plain `develop` under parallel load it failed 2 times in 118 runs that reached that step. The cause is in dashd, not in the test.

  What happens in that step:
  - Only nodes 1 and 2 have the transaction in their mempools, so only they vote on its two input locks. The `llmq_test_dip0024` quorum needs 3 of 4 shares, so these signing sessions stall at 2 shares.
  - The test bumps mocktime by 601 s and mines a block containing the transaction. On block connect, every member signs the input locks retroactively. Nodes 1 and 2 log `already voted ... Resigning!` and create their shares again.
  - The re-created share is identical to the one the node already holds. `ProcessSigShare` treats it as a duplicate and returns before it updates `timeSeenForSessions`, so the session's last-seen time stays 601 s old.
  - `Cleanup()`'s throttle runs on mocktime. If its first sweep after the bump lands after the re-sign but before shares from nodes 3 and 4 arrive, it times the session out. That removes the node's own share, along with the re-announcement `ForceReAnnouncement` had just queued.
  - Nodes 3 and 4 had already swept their stale copies before signing. Each input lock is then left with 2 shares on every node and never recovers.
  - With no IS lock, nodes 3 and 4 keep logging `not signing block ... due to TX ... not being islocked and not old enough`, so the ChainLock never forms.

  The timing window is a few milliseconds, which is why the failure is rare. Outside tests, the same thing can happen whenever a retroactive re-sign lands within one Cleanup interval after its session expires. In that case the re-sign, which exists to revive the session, has no effect, and the IS lock and the ChainLock of the block that contains the transaction are delayed.

  dashpay#8050 describes this same failure ("a re-sign racing the first `Cleanup` after a mocktime jump") but does not change this path.

  ## What was done?

  When `AsyncSignIfMember` re-signs (`allowReSign`), it now restarts the timeout of a signing session we still track. The shares we hold survive the next `Cleanup` and get re-announced. An untracked session is left alone: the re-created share starts it as usual.

  Only retroactive InstantSend signing passes `allowReSign`, at most once per connected block that contains the unlocked transaction. So a session can't be kept alive by peers. The refresh comes before the `IsAllMembersConnectedEnabled` early return in `ForceReAnnouncement`, so in SPORK_21 mode it also keeps the restarted push of our share.

  If dashpay#8050 lands first, this becomes a small method on its session table that extends only an already-tracked session. Its doc comment ("a new share is the only activity" that extends a session) would need updating.

  ## How Has This Been Tested?

  **Natural repro** (RelWithDebInfo build, `feature_llmq_is_retroactive.py` run many times in parallel on a loaded machine):
  - `develop`: the bug failed 2 times in 118 runs that reached the step. In both, the input locks of the step's transaction were never recovered on any node.
  - With the fix: it failed 0 times in 83 runs that reached the step.
  - The other failures in both builds were node stalls caused by host IO (whole-process log gaps of 12–38 s), at various steps.

  **Forced interleaving** (diagnostic-only patch, not part of this PR):
  - The patch makes nodes that re-sign sweep right after their last re-signed share is processed, and makes first-time signers sweep before signing. These are the orderings seen in the failing logs.
  - `develop`: 16 of 24 runs failed at line 131 with the input locks never recovered.
  - With the fix: 0 of 32 runs failed with that signature. One run failed differently: both members dropped their ChainLock shares right after creating them. That comes from the hook running `Cleanup` on a sig-share worker thread, which hits the inactive-quorum sweep race dashpay#8050 fixes. It is not this bug.

  Also ran `feature_llmq_is_retroactive_session_timeout.py`, `feature_llmq_signing.py`, `feature_llmq_signing.py --spork21` and `feature_llmq_chainlocks.py` with the fix: all pass.

  No new test: the failing order depends on thread scheduling right after a mocktime jump. Making it deterministic needs hooks into private `CSigSharesManager` internals.

  ## Breaking Changes

  None.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(if you have permission to set one)_

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

Top commit has no ACKs.

Tree-SHA512: 7b9c494dc24605595e7d331fb5e11e5fcebebed9462a22e633c05ef705392b776f90c8eabf4411528de68f014f8908f8ec4150b810a3aac9da0017f7ea409382
(cherry picked from commit 20952b0)
…idated blocks

d682da6 fix: stop rebuilding MNHF signal state from unvalidated blocks (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  `getdeploymentinfo <blockhash>` and `GET /rest/deploymentinfo/<blockhash>` accept any stored block, including blocks that were never connected (a stale sibling of the tip, or a block that was rejected). For such blocks `CMNHFManager::GetForBlock` rebuilds the MNHF signal state from block data that was never validated:

  - It persists the result through `AddToCache` → `CEvoDB::WriteDerived` outside any EvoDB transaction. The next full flush (or a clean `stop`) then aborts on `assert(cur_transaction.IsClean())` after the coins DB was already written, and the node needs `-reindex` to start again. Querying an ordinary stale block is enough.
  - A stored block whose MNHF transaction carries a version bit of 29 or above reaches `assert(nBit < VERSIONBITS_NUM_BITS)` in `CChainParams::IsValidMNActivation` and aborts the node.

  ## What was done?
  Signal state now only comes from connecting a block, so no caller can make `CMNHFManager` trust unvalidated block data, whatever block it passes.

  - `GetForBlock` / `GetSignalsStage` only read the in-memory cache and EvoDB. When nothing is stored they throw `EvoDbMissingStateError`, a new subclass of `EvoDbInconsistencyError`. The existing typed catches therefore treat a miss as a local error and never mark the block invalid. It does not abort the node, because an RPC can legitimately ask about a block that has no stored state.
  - The walk back and rebuild from block data moved to `RebuildSignals`. It requires `cs_main` (`EXCLUSIVE_LOCKS_REQUIRED` plus `AssertLockHeld`), throws for any block that never reached script validity, and only runs at startup. A block that was connected and later marked invalid still counts, so an `invalidateblock` interrupted by a crash does not block the replay. That is its original purpose: migrating datadirs that predate the stored state (dashpay#5736). `ForceSignalDBUpdate` runs it for the tip. `ReplayBlocks` also runs it for the last flushed tip, inside its EvoDB transaction: replaying an interrupted coins flush reads that block's signal state, and it runs before `ForceSignalDBUpdate`. Without this, a datadir last run on v21.x or older (v22.0.0 was the first release to store the current `mnhf_s2` state) that also had an interrupted flush would fail to start.
  - The lookup treats the genesis block as having no signals, whatever the V20 height. It is never connected, so nothing is stored for it.
  - The manager never takes `cs_main` itself. `GetSignalsStage` is reached from `VersionBitsCache::State()` while the cache's mutex is held, and taking `cs_main` there would invert the lock order (dashpay#5736 hit exactly this deadlock report).
  - `getdeploymentinfo`, and the REST endpoint that wraps it, reject invalid and unvalidated blocks up front, under the `cs_main` the RPC already holds. The genesis block is exempt: `ConnectBlock` skips it, so it never reaches `BLOCK_VALID_SCRIPTS`, and it has no signal state to get wrong. The guard is still needed with the read-only manager, because a block whose connection failed part-way can leave an entry in the in-memory cache.
  - `AddToCache` checks `Assume(HasActiveTransaction())` before the EvoDB write. Every remaining caller connects a block inside a transaction.
  - `IsValidMNActivation` returns false for out-of-range bits instead of asserting. With the changes above nothing reaches it with such a bit any more (`CheckMNHFTx` rejects it first), so this is defense in depth: the function takes block-derived data and should not assert on it.

  Block processing is unchanged. `ConnectBlock` only asks about the parent, whose state was stored when the parent was connected. Stored state is never erased, so blocks that were connected and later reorged out stay queryable.

  ### Edge case that now returns an error instead of rebuilding
  After `-reindex-chainstate`, `getdeploymentinfo` on a stale side-chain block that was never reconnected returns an error.

  ## How Has This Been Tested?
  - `evo_mnhf_tests`:
    - `IsValidMNActivation` rejects -1, 29 and 255 (29 and 255 abort on `develop`; -1 is a boundary check).
    - A new case stores a sibling block that was never connected. `GetSignalsStage` on it throws `EvoDbMissingStateError`, and succeeds once a reorg connects it. With the on-demand rebuild put back, the case fails.
    - With V20 active from height 0, `GetSignalsStage` on the genesis block returns no signals. Without the genesis case it throws.
  - `interface_rest.py`: `/rest/deploymentinfo` on a header-only block returns the new error, and `getdeploymentinfo` on the genesis block works.
  - Never-connected and rejected stored blocks have no functional test; `evo_mnhf_tests` covers the cause. They were checked end to end at 59db81c, with a scenario that was removed from `interface_rest.py` in review: RPC and REST `deploymentinfo` on a stale stored block, and on a block rejected for MNHF bit 200, returned an error, and a flush and a clean restart followed. Against `develop`'s `dashd` the stale-block query succeeds and the node then aborts on `IsClean()` at shutdown, and the query on the block rejected for bit 200 aborts the node on the `IsValidMNActivation` assert.
  - At 59db81c, rebased onto `develop`: `evo_mnhf_tests`, `versionbits_tests`, `validation_chainstate_tests` and `rpc_tests` pass, as do `interface_rest.py`, `feature_mnehf.py`, `rpc_blockchain.py`, `feature_dbcrash.py` and `rpc_help.py`. The current head differs from it only in `interface_rest.py`, which passes. On an earlier head, removing the RPC's genesis exemption made `interface_rest.py` fail on the genesis query.
  - Accepting a block that was connected and later marked invalid in `RebuildSignals` has no automated test, for the same reason as the replay migration below.
  - The replay migration has no automated test, because it needs a datadir without `mnhf_s2` state. Checked by hand on regtest: a throwaway build that never writes `mnhf_s2` mined 1100 blocks, flushed, then crashed mid-flush (`-dbcrashratio=1 -dbbatchsize=1`) two blocks later. Without the `ReplayBlocks` call, startup on that datadir fails while rolling forward the first block (`MNHF signals unavailable for block ...`). With it, startup rebuilds the state, replays both blocks, and `getdeploymentinfo`, mining and a clean restart work. `feature_asset_locks.py` covers the replay on a current datadir, where the call finds the state already stored.

  ## Breaking Changes
  `getdeploymentinfo` / `/rest/deploymentinfo` now return an error, instead of a result computed from unvalidated data, for a block that is not fully validated: a header-only block, a stored block that was never connected, a rejected block, and a block marked invalid with `invalidateblock`, together with each descendant that is marked failed with it (until `reconsiderblock`).

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [x] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(if you have permission to set one)_

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

ACKs for top commit:
  knst:
    utACK d682da6

Tree-SHA512: 849dbf30ff9845046a9df7e8929e6d67fe1a3fb95185509211c4c03f2c12416dc42a4442b1922bff16b10b6e8da0fba00a5894fa8815cf9a932922374590e3f5
(cherry picked from commit a374e91)

Backport adaptation: v24.0.x has neither the BLS scheme refactor nor
CSpecialTxProcessor's ownership of the MNHF manager.
- src/evo/mnhftx.cpp: ForceSignalDBUpdate() keeps v24.0.x's switch to the
  basic BLS scheme around the walk and calls RebuildSignals() in place of
  GetSignalsStage(). It includes <util/check.h> for the new Assume(), which
  develop gets through other headers.
- src/evo/specialtxman.{h,cpp}: the RebuildMNHFSignals() passthrough calls
  m_mnhfman.RebuildSignals(); v24.0.x's CSpecialTxProcessor holds the manager
  by reference. Only the comment changes apply to the rest of these files;
  the develop-only code around them is left out.
- src/validation.cpp: ReplayBlocks() reaches the passthrough through
  m_chain_helper->special_tx. The walk verifies no BLS signature, so it needs
  no BLS scheme switch.
- The IsValidMNActivation() change goes to src/chainparams.cpp
  (src/kernel/chainparams.cpp on develop).
- src/test/evo_mnhf_tests.cpp: the new tests reach the manager through
  m_node.chain_helper->ehf_manager and include <evo/chainhelper.h>.
The other changes, including test/functional/interface_rest.py, are
identical to the develop pick.
… startup through the uncommitted tip

c366148 fix(index): keep governance running when an unclean stop breaks its uncommitted tip (pasta)
e2d4207 fix(index): don't rewind blocks the index has already indexed (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  Follow-up to dashpay#8042. Since dashpay#8042, an index that writes entries as it appends blocks (address, spent, timestamp and governance collateral) records the tip of a commit it had to skip, and resumes from that tip after an unclean stop. That tip is always above the last coins flush. Coins flush daily but the block index is written hourly, so after a crash the tip's block can be missing from the block index or have only its header. The resume can then stop the node:

  - **The block index lost the tip.** `Init()` fails with "Please rebuild the index". The governance collateral index is always on, so the node doesn't start until `-reindex`. This happens after a crash within about an hour of the index catching up, e.g. after the first v24 start builds it.
  - **The tip has only its header** (common after a crash during IBD, since headers are stored long before block data). The index resumes above the active tip. When the node connects the first block above that tip again, `BlockConnected()` rewinds the index to that block's parent, which reads every block up to the uncommitted tip from disk. Those blocks aren't downloaded again yet, so the node stops with a fatal error. If the chain instead reorgs below the tip, the rewind fails the same way on every restart.

  Neither failure is new: before dashpay#8042 the committed locator caused both. bitcoin#34897 fixed them for the other indexes, but its Dash adaptation left them in place for these four.

  ## What was done?
  - **`BaseIndex::BlockConnected()`** skips a block that is already an ancestor of the index's best block instead of rewinding to its parent and appending it again. The block is already indexed, so this gives the same state without reading anything. It also stops notifications queued before the sync thread caught up from rewinding and re-appending blocks the sync already indexed, a small departure from upstream's `BlockConnected()`.
  - **The governance collateral index tolerates an uncommitted tip it can't use.** A collateral only confirms while its block is on the active chain (`CGovernanceObject::IsCollateralValid`), and appending a block again overwrites its entries, so entries the index can't rewind are harmless. A new `BaseIndex::IgnoresEntriesOffActiveChain()` (true for governance only) makes `Init()` resume from the locator when the block index lost the tip, instead of failing. The governance rewind keeps the collaterals of a block without data instead of failing to read it.

    The rewind checks `BLOCK_HAVE_DATA`, so it would also keep the collaterals of a pruned block. That doesn't change what a pruned node does: a reorg that deep already stops the node in `DisconnectTip()`, which reads the block before the index is notified.

    It still resumes from a tip the block index has, as on develop. On a pruned node this keeps the sync check to the blocks above that tip, since the prune lock follows the index's in-memory tip.

  **Not covered here.** If the chain reorgs below a header-only uncommitted tip after a crash, the address, spent and timestamp indexes still stop with a fatal error, as before dashpay#8042. That needs an unclean stop plus a reorg across those heights. These indexes are optional and can be rebuilt with `-reindex`; their entries can't be left in place, because readers trust them.

  ## How Has This Been Tested?
  - New cases in existing scenarios:
    - `baseindex_tests/restart_rewinds_blocks_synced_above_flush`: an index resumes from a header-only uncommitted tip, and the block below it connects. The test index now reads each block it rewinds, as the address and spent indexes do.
    - `governance_collateral_tests/sync_check_needs_only_blocks_above_the_resume_point`: covers an uncommitted tip missing from the block index, where `Start()` succeeds and the index syncs from the locator. It also covers a header-only tip above the active tip: the sync check needs only blocks above the fork, the index resumes there, and after the tip is invalidated the index follows the replacement block.
  - Mutation checks:
    - Without the `BlockConnected()` change, the baseindex case hits the fatal rewind error and aborts.
    - Without the governance rewind skip, the header-only case does the same.
    - Without the `Init()` fallback, the governance index's `Start()` fails.
  - Full `test_dash` suite passes. `feature_addressindex`, `feature_spentindex`, `feature_timestampindex`, `feature_index_prune`, `feature_coinstatsindex`, `feature_governance`, `feature_governance_cl`, `feature_governance_objects`, `feature_pruning`, `feature_dbcrash`, `feature_abortnode` and `rpc_getblockfilter` pass.
  - Each commit builds and passes the index unit tests on its own.

  ## Breaking Changes
  None.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation
  - [ ] I have assigned this pull request to a milestone _(if you have permission to set one)_

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

ACKs for top commit:
  knst:
    utACK c366148

Tree-SHA512: 6f1fbbf22e7a768d10fc5649e13578ce476a0d74b7f0d3cbdfc460a617d4705f16f236ec938dd8c26b93992a9ca88cd392443aa462ecfbd5df236fcbf07437f5
(cherry picked from commit f94502b)

Backport adaptation: only the first commit of the PR, e2d4207 ("don't
rewind blocks the index has already indexed"), is applied. The second,
c366148, keeps the governance collateral index running after an unclean
stop; v24.0.x has no governance collateral index, so its changes to
src/index/govcollateralindex.{cpp,h}, src/test/governance_collateral_tests.cpp
and the hooks it adds to src/index/base.{cpp,h} are left out.
- src/test/baseindex_tests.cpp: the include list conflicted; <chainparams.h>,
  <pow.h> and <shutdown.h> are added as on develop. The test index reads each
  block with v24.0.x's node::ReadBlockFromDisk(block, pindex,
  Params().GetConsensus()) in place of BlockManager::ReadBlockFromDisk().
src/index/base.cpp is otherwise identical to the first commit.
PastaPastaPasta and others added 4 commits November 20, 2026 10:51
…other chain

96b7240 fix: only cache quorum scans computed against the active chain (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  `CQuorumManager::ScanMined` caches its result under the scan's start block hash, but builds it from the mined-commitment index, which only describes the active chain. If a scan runs for a block that a reorg has already disconnected (for example a queued `UpdatedBlockTip` handled by `NetQuorum` after a fork race in a DKG mining window), it caches the other branch's quorum set under that block's hash. Nothing removes the entry. If that block's branch later wins, ChainLock signing-quorum selection reads the stale set: the node rejects the valid CLSIG, marks the block that carries it in its CbTx as `bad-cbtx-invalid-clsig`, and stays behind until restarted (`reconsiderblock` alone doesn't help).

  ## What was done?
  - Read the commitment index and check that the start block and the scan block are on the active chain under one `cs_main` hold; populate the cache only if they are.
  - Since building the entries runs without `cs_main`, re-check the start block under `cs_main` right before inserting.
  - Results returned to callers are unchanged, and scans from active-chain blocks are cached as before. An entry computed while its block was active stays correct after a reorg away and back (the key is a block hash and a block's ancestry never changes), so nothing needs clearing on disconnect.
  - Lock order: `cs_main` before `m_evoDb.cs` (as in `ConnectBlock`) and before `m_cs_maps` (as in the chain-aware `GetQuorum`); the non-chain `ScanQuorums` path already took `cs_main` per quorum, so no new lock-order edge. The header comments that called these scans `cs_main`-free now state when they take it.
  - Not covered here: if two branches mine different final commitments for the same quorum hash and the chain reorgs away and back while one `ScanQuorums` call is building, the scan can cache the other branch's quorum object. `mapQuorumsCache` already has that exposure on its own (it is keyed by quorum hash alone and isn't cleared on disconnect), so fixing it only in the scan cache wouldn't remove the stale quorum; it needs a separate change there. `ScanCommitments` isn't affected: its caller holds `cs_main` for the whole scan.

  ## How Has This Been Tested?
  New unit test `quorum_proofs_tests/scan_from_stale_fork_block_is_rescanned_once_active`: scans from a fork block while it is off the active chain, then makes that branch active and scans again. On `develop` both `ScanQuorums` and `ScanCommitments` return the other branch's quorum; with this change they don't. A multi-node functional reproduction of the full stall (fork race in the mining window, then `bad-cbtx-invalid-clsig`) fails 3/3 on `develop` and passed in every run with the fix. `test_dash --run_test='quorum_proofs_tests,llmq_*'`, `feature_llmq_chainlocks.py`, `feature_llmq_rotation.py` and `feature_llmq_signing.py` pass.

  ## Breaking Changes
  None.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation
  - [ ] I have assigned this pull request to a milestone _(if you have permission to set one)_

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

ACKs for top commit:
  knst:
    utACK 96b7240

Tree-SHA512: 5873778d113599545ed8a07e3356b8c37ec19930c42367c60692243a3f5cf39fd6d858ab84adc658bbdd8ce6a05133a7a1ac75ab3afd7187a7b61ce387e0c57a
(cherry picked from commit 5736c65)

Backport adaptation (hand-port): develop applies the fix once in ScanMined(),
which ScanQuorums() and ScanCommitments() share there. v24.0.x doesn't have
that refactor, so the same change goes into both functions:
- the mined-commitment index is read, and the store block and scan start
  are checked against the active chain, under one cs_main hold;
- the result is cached only if both were on the active chain, and the store
  block is checked again under cs_main right before it is cached.
ScanQuorums() keeps caching only when no chain is passed, as before.
The header comments change as on develop, and the new
scan_from_stale_fork_block_is_rescanned_once_active test is added as is, in
front of consensus_valid_envelopes_are_provable (v24.0.x lacks the
develop-only test above it).
Bump the build version to 3, add the v24.0.3 release notes, archive the
v24.0.2 notes, add the flatpak release entry (and date the 24.0.1 and
24.0.2 entries with their GitHub release dates, as the release notes do)
and bump the version string in the man pages (no option shown in the help
changed since v24.0.2).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…v24.0.3

e959293 chore: prepare v24.0.3 release (pasta)
e2a99d9 Merge dashpay#8102: fix: don't cache quorum scans computed against another chain (merge-script)
ea6f034 Merge dashpay#8047: fix: keep an unclean shutdown from blocking index startup through the uncommitted tip (merge-script)
8375967 Merge dashpay#8098: fix: stop rebuilding MNHF signal state from unvalidated blocks (merge-script)
a1559f5 Merge dashpay#8203: fix: restart the signing session timeout when we re-sign, so a retroactive IS lock can't be lost (merge-script)
cfa2d42 Merge dashpay#8124: fix(qt): options tabs, wallet migration cancel, PSBT save and shared masternode fee bugs (merge-script)
cb9916e Merge dashpay#8154: fix(qt): build the proposal payment window around the chosen superblocks (merge-script)
c6efdb9 Merge dashpay#8103: fix: don't leave EvoDB ahead of the coins DB after a reindex (merge-script)
6f56966 Merge dashpay#8139: fix(wallet): read descriptors under their locks in the block-filter rescan (merge-script)
06082fa Merge dashpay#8109: fix(scripts): repair broken helper scripts (merge-script)
20bcdc0 Merge dashpay#7994: fix: re-request an LLMQ sig share dropped because the pending queue was full (merge-script)
b31d4b5 Merge dashpay#8123: fix(qt): wallet data display and model correctness (merge-script)
f5d0a75 Merge dashpay#7955: fix: reject invalid-denomination DSQUEUEs on mixing clients by sharing the server validation (merge-script)
9ada750 Merge dashpay#8125: test: make the rpc and tx_pool_standard fuzz targets runnable; fix two RPC arguments, BLS bench indexing (merge-script)
f861f73 Merge dashpay#8122: fix: CacheMultiMap use-after-free and unenforced cache capacity limits (merge-script)
bf03ae2 Merge dashpay#8118: fix(rpc): undefined behaviour, locking and argument handling in Dash RPCs (merge-script)
6078865 Merge dashpay#8111: fix(wallet): check every BIP39 checksum bit (merge-script)
8f4cd80 Merge dashpay#8127: fix: never sign a spork update peers will reject as already seen (merge-script)
c058585 Merge dashpay#8116: fix: count each non-signing CoinJoin participant once when choosing a collateral to charge (merge-script)
3d43766 Merge dashpay#8085: fix: prefer final commitments with more signers (merge-script)
38f7429 Merge dashpay#7815: fix: bind CoinJoin signatures to the approved transaction (merge-script)
39cfadc Merge dashpay#7954: fix(rpc): reject out-of-range LLMQ types in quorum RPCs (pasta)

Pull request description:

  ## Issue being fixed or feature implemented

  Backports and release prep for v24.0.3, on top of `v24.0.x` at e6dc05c (v24.0.2). One PR carries both, so the release branch gets a single merge.

  **Ready for ACK (knst, UdjinM6).** Final pick set; head `e959293e3f`. CI proof for `v24.0.x` (its own workflows, ASan included) is the fork push of the branch at `68d2fb3396`, which has the same code (the head differs from it only in `doc/release-notes.md`): https://github.com/PastaPastaPasta/dash/actions/runs/44810919549 — `linux64_asan-build` and `linux64_asan-test` passed, as did every other job that finished (28); `linux64_tsan-test` and `linux64_multiprocess-build` were cancelled by the release-notes push. At `de1bc05e9f`, same code again, every job passed: https://github.com/PastaPastaPasta/dash/actions/runs/44777539733. Fork CI on the head itself: https://github.com/PastaPastaPasta/dash/actions/runs/44825156764. PR CI here runs develop's workflows, so `linux64_asan-build` fails on any `v24.0.x` PR (no depends), which is expected.

  It takes the fixes merged on develop since v24.0.0 that matter to 24.0.x users. Most are edge-case fixes; the notable ones:

  - **Proposal payment window in the Qt Create Proposal dialog (dashpay#8154)**, which could leave out a later chosen superblock.
  - **Database flush after a reindex (dashpay#8103)** and **index startup after an unclean stop (dashpay#8047).**
  - **Block-filter rescan race (dashpay#8139)** and **full BIP39 checksum validation (dashpay#8111).**
  - **CoinJoin validation (dashpay#7815, dashpay#8116, dashpay#7955)** and **quorum caching after some reorgs (dashpay#8102).**
  - RPC argument handling and locking fixes (dashpay#7954, dashpay#8118, dashpay#8125, dashpay#8098).

  Four fixes merged on develop after this PR was opened (dashpay#8203, dashpay#8098, dashpay#8047, dashpay#8102) and are included. dashpay#7638 and dashpay#7819 had not merged on develop by the 24.0.3 cutoff and move to 24.0.4.

  ## What was done?

  Every pick is a single `git cherry-pick -m1 -x <develop merge commit>`, in develop merge order. Conflicts are resolved inside the pick commit and described in its message. Then one last commit, `chore: prepare v24.0.3 release`, does the following:

  - `configure.ac`: `_CLIENT_VERSION_BUILD` 2 → 3. `_CLIENT_VERSION_IS_RELEASE` stays true.
  - `doc/release-notes.md`: v24.0.3 notes. The v24.0.2 notes are archived verbatim to `doc/release-notes/dash/release-notes-24.0.2.md`.
  - `contrib/flatpak/org.dash.dash-core.metainfo.xml`: `24.0.3` entry dated 2026-11-23. The date needs changing if the tag is cut on another day. The 24.0.1 and 24.0.2 entries move to their GitHub release dates (2026-11-13 and 2026-11-14), which the release notes already use.
  - `doc/man/*.1`: version string only. No option shown in the help changed.

  ### Decisions

  | PR | What it fixes | Status | Reason |
  | --- | --- | --- | --- |
  | dashpay#7954 | Quorum RPCs silently truncated an out-of-range quorum type (`356` became `100`) | included, clean | RPC correctness bug; only invalid input behaves differently |
  | dashpay#7815 | CoinJoin coordinator checked signatures against an empty previous script, not the approved transaction | included, include-list conflicts | Any participant could break a session; masternode-side only |
  | dashpay#8085 | Final commitments with more signers were dropped; replaced ones leaked | included, clean | Only changes which valid commitment is relayed and mined |
  | dashpay#8116 | A participant with several unsigned inputs counted several times, escaping the collateral charge | included, clean | One-line fix; its test builds on dashpay#7815 |
  | dashpay#8127 | Spork updates in the same second left the signer and the network on different values | included, test conflict | Signer-side only |
  | dashpay#8111 | BIP39 validation checked only some checksum bits | included, clean | A mistyped mnemonic could create or restore an unintended wallet; it was never valid BIP39 and other wallets already refuse it |
  | dashpay#8118 | Signed overflow, missing `cs_main`, argument handling in Dash RPCs | included, one-line conflict | Undefined behaviour and locking bugs; errors change only for invalid input |
  | dashpay#8122 | CacheMultiMap use-after-free and unenforced capacity | included, clean | Header-only; it has to land before the orphan-vote fix (dashpay#7819) makes that path reachable |
  | dashpay#8125 | `masternode winners` negative count (signed overflow) and `verifyislock` out-of-range height (internal error) | included, fuzz harness file left out | Two small RPC fixes; the rpc fuzz target changes need develop-only APIs |
  | dashpay#7955 | Mixing clients accepted DSQUEUEs with invalid denominations | included, log-marker conflict | Same validation masternodes already apply; only masternodes relay DSQUEUEs |
  | dashpay#8123 | Qt address book, Coin Control, traffic graph and overview page bugs | included, clean | GUI bugs users hit |
  | dashpay#7994 | Dropped sig share never re-requested | included, clean | Small LLMQ signing fix |
  | dashpay#8109 | Broken helper scripts (OpenRC, `zmq_sub.py`, `tc.sh`) | included, clean | `contrib` only, no binary change |
  | dashpay#8139 | Block-filter rescan could skip blocks that pay the wallet | included, test conflict | Wallet correctness |
  | dashpay#8103 | EvoDB left ahead of the coins DB after a reindex | included, clean | Avoids a second reindex |
  | dashpay#8154 | Create Proposal dialog payment window missed the chosen superblocks | included, one-line conflict | No prerequisite is needed: the conflicting line differs only because of a develop refactor the fix doesn't use |
  | dashpay#8124 | Qt options tabs with `-disablewallet`, migration cancel, PSBT save errors, CoinJoin change address, shared-MN fee source | included, two conflicts | GUI bugs users hit; adds three translatable strings, shown in English until translated |
  | dashpay#8203 | Re-signing doesn't restart the signing-session timeout, so a retroactive IS lock can be lost | included, clean | Small InstantSend/ChainLock liveness fix |
  | dashpay#8098 | Rebuilding MNHF signal state from unvalidated blocks writes EvoDB outside a transaction (assert, then reindex) | included, adapted | Crash reachable from RPC/REST |
  | dashpay#8047 | Unclean stop can make an index resume above the active tip and fail | included, first commit only | Reachable with `-addressindex`/`-spentindex`/`-timestampindex`; its governance collateral index part doesn't apply to v24.0.x |
  | dashpay#8102 | Quorum scan cache keeps another chain's quorums after a reorg, so a valid ChainLock is rejected until restart | included, hand-port conflicts | Serious ChainLock stall; develop's version sits on a refactor |
  | dashpay#7819 | Orphan governance votes: only one kept per missing object | excluded: not merged on develop by the cutoff, moves to 24.0.4 | Governance correctness; builds on dashpay#8122 |
  | dashpay#7638 | A reorg that re-mines a ProRegTx drops that masternode's valid pending updates from the mempool | excluded: not merged on develop by the cutoff (changes requested), moves to 24.0.4 | Mempool correctness |
  | dashpay#8095, dashpay#8121 | Block templates while the best ChainLock is above the tip | excluded | Together they refuse the same templates v24.0.0 already refuses; only the error text changes |
  | dashpay#8049 | DKG threads spin while a snapshot chainstate is unvalidated | excluded | Unreachable: v24.0.x can't create a snapshot chainstate |
  | dashpay#8092 | Stale wallet and masternode wording | excluded | Wording only; changes translated strings |
  | dashpay#7835 | An invalid block could clear a local Platform ban | excluded | Needs a mined invalid block; the port changes `ProcessBlock` in block-connection code, too risky for the benefit |
  | dashpay#8101 | Malleated ISDLOCK displaces the genuine lock | excluded | Upgraded nodes would drop some honest locks from un-upgraded masternodes around a rotation |
  | dashpay#8199 | IS-locked transactions evicted from a full mempool | excluded | 292-line mempool policy change, not yet approved |
  | dashpay#7885 | Stale caches after an overridden confirmed IS lock | excluded | Described as hardening; needs conflicting ChainLocks and a hand-port into code develop has since moved |
  | dashpay#7886 | Orphan-vote parents through the request tracker, per-masternode cap | excluded | Large change to P2P fetching that collides with dashpay#7819, which carries the vote-ordering fix |
  | dashpay#7823 | Wallet load aborts on a mismatched mnemonic or unreadable tx record | excluded | Its diff carries a 24.1 upstream backport; reachable only from corrupt wallet files |
  | dashpay#8194 | Oversized backup count disables automatic backups | excluded | Follow-up to a 24.1 feature not on v24.0.x |
  | dashpay#8162, dashpay#8166, dashpay#8180, dashpay#8077 | Bitcoin Core backport batches | excluded | Upstream refactors, tests, docs and features |
  | dashpay#8145, dashpay#8093, dashpay#8189, dashpay#8195, dashpay#8197, dashpay#8202, dashpay#8200, dashpay#8193 | Merged on develop Nov 19–20 | excluded | Refactors (BLS scheme, signature hashing, local clock / `-maxtimeadjustment` removal), Guix and CMake backports, CI and test-only changes, socket backport |

  Also left out: features, refactors, performance work, CI and test-only changes, and the CMake switch. dashpay#8052, dashpay#8088, dashpay#8094, dashpay#8097, dashpay#8099, dashpay#8100, dashpay#8104, dashpay#8130, dashpay#8131 and dashpay#8135 are already in v24.0.1; dashpay#8073, dashpay#8112, dashpay#8113, dashpay#8115, dashpay#8117, dashpay#8119 and dashpay#8120 in v24.0.2. Not part of this patch release: the minimum chain work and assumevalid update, and the seeds.

  ### Conflict resolutions

  - **dashpay#7815:** include lists only, in `coinjoin/server.cpp` and `coinjoin_inouts_tests.cpp`.
  - **dashpay#8127:** `spork_tests.cpp` on `v24.0.x` lacks a develop-only test and the `CSporkManager(datadir)` constructor; the new test uses the default constructor.
  - **dashpay#8118:** the old loop condition in `masternode payments` is spelled differently; only that condition is replaced.
  - **dashpay#8125:** the changes to `src/test/fuzz/rpc.cpp` are left out (they use develop's `CGovernanceManager` constructor and RPC lists that differ here). Adapting that fuzz harness to v24's command set is left as a follow-up; the functional regression tests are included. The RPC fixes, the tx_pool fuzz and bench fixes, and the functional test changes are identical.
  - **dashpay#7955:** develop's code is taken, keeping the `/* Continued */` marker that this branch's log linter expects.
  - **dashpay#8139:** `wallet_tests.cpp` lacks a develop-only test; the new test uses the five-argument `CWallet` constructor.
  - **dashpay#8154:** `v24.0.x` still has the two-argument `CSuperblock::GetPaymentsLimit(active_chain, height)`. Only the `SBEpochTime` line is replaced, and the arithmetic is unchanged.
  - **dashpay#8098:** `v24.0.x` has neither the BLS scheme refactor nor `CSpecialTxProcessor`'s ownership of the MNHF manager. `ForceSignalDBUpdate()` keeps its basic-BLS-scheme switch and calls `RebuildSignals()`; the `RebuildMNHFSignals()` passthrough uses the manager reference `CSpecialTxProcessor` holds here, and `ReplayBlocks()` reaches it through `m_chain_helper->special_tx`; `IsValidMNActivation()` is in `src/chainparams.cpp`; the unit tests reach the manager through `m_node.chain_helper->ehf_manager`.
  - **dashpay#8047:** only the first commit (e2d4207) is applied. The second keeps the governance collateral index running, and `v24.0.x` has no such index, so its changes are backed out inside the pick. `baseindex_tests.cpp` uses v24.0.x's `node::ReadBlockFromDisk(block, pindex, consensus)`.
  - **dashpay#8102:** develop applies the fix once in `ScanMined()`, a refactor `v24.0.x` doesn't have, so the same change goes into both `ScanQuorums()` and `ScanCommitments()`: the mined-commitment read and the active-chain checks share one `cs_main` hold, and the result is cached only if the store block is still on the active chain right before caching. The new unit test is added as is.
  - **dashpay#8124:** `sendcoinsdialog.cpp` keeps v24.0.x's success message as it is and adds the new failure check; `optiontests.cpp` lacks a develop-only test before the new one.

  ## How Has This Been Tested?

  macOS arm64, depends build with `--enable-debug --enable-werror`, GUI enabled, at the PR head: `dashd`, `dash-qt`, `test_dash`, `test_dash-qt` and the fuzz binary build cleanly and report `v24.0.3`.

  - After adding dashpay#8102: `test_dash --run_test='quorum_proofs_tests,llmq_*'` passes, as do `feature_llmq_chainlocks.py`, `feature_llmq_rotation.py`, `feature_llmq_signing.py` (with and without `--spork21`), `feature_llmq_is_cl_conflicts.py`, `feature_llmq_is_retroactive.py`, `feature_llmq_simplepose.py`, `feature_llmq_data_recovery.py`, `feature_dip3_deterministicmns.py` and `rpc_quorum.py`.
  - After adding dashpay#8047: `test_dash --run_test=baseindex_tests,coinstatsindex_tests,blockfilter_index_tests,txindex_tests` passes, as do `feature_reindex.py`, `feature_addressindex.py`, `feature_spentindex.py`, `feature_timestampindex.py`, `feature_coinstatsindex.py`, `feature_blockfilterindex_prune.py` and `feature_dbcrash.py`.
  - After adding dashpay#8098: `test_dash --run_test=evo_mnhf_tests,versionbits_tests,validation_chainstate_tests,rpc_tests,evo_dip3_activation_tests` and `interface_rest.py`, `feature_mnehf.py`, `rpc_blockchain.py`, `feature_dbcrash.py`, `feature_reindex.py`, `feature_asset_locks.py` and `rpc_help.py` pass.
  - After adding dashpay#8203: `test_dash --run_test='llmq_*'` and `feature_llmq_is_retroactive.py`, `feature_llmq_signing.py` (with and without `--spork21`), `feature_llmq_chainlocks.py` and `feature_llmq_is_cl_conflicts.py` pass.
  - `test_dash` (1117 cases) and `test/util/test_runner.py` pass, including the tests the picks add (for example `llmq_blockprocessor_tests/qfcommit_with_more_signers_replaces_stored_one`, `coinjoin_queue_tests`, `coinjoin_inouts_tests`, `bip39_tests`, `cachemultimap_tests`, `governance_superblock_tests`, `spork_tests/rapid_updates_are_accepted_by_peers`, `wallet_tests/fast_rescan_finds_key_added_mid_scan`).
  - Functional tests, all passing: `feature_reindex.py`, `feature_addressindex.py`, `feature_dip3_deterministicmns.py --descriptors`, `feature_governance.py --descriptors`, `feature_governance_trigger_voting.py --descriptors`, `feature_llmq_signing.py` (with and without `--spork21`), `feature_llmq_chainlocks.py`, `feature_llmq_is_cl_conflicts.py`, `feature_llmq_dkgerrors.py`, `feature_llmq_evo.py`, `feature_llmq_rotation.py`, `feature_sporks.py`, `p2p_dstx.py`, `rpc_blockchain.py`, `rpc_coinjoin.py`, `rpc_masternode.py`, `rpc_quorum.py`, `rpc_verifyislock.py`, `wallet_basic.py`, `wallet_fast_rescan.py`, `wallet_import_rescan.py`, `wallet_transactiontime_rescan.py`, `wallet_mnemonicbits.py`, `wallet_upgradetohd.py` and `wallet_hd.py`. CI runs the full suite.
  - `test_dash-qt`: `SharedMnWizardTests::signedSessionReservation` crashes with SIGSEGV in this macOS build, and it crashes the same way on unmodified `v24.0.x` (v24.0.2) built the same way. With that suite skipped locally, every other suite passes (including `OptionTests::tabsWithoutWallet`, `MasternodeMaintenanceTests`, `AddressBookTests` and `TrafficGraphDataTests`, which the picks extend) except `SharedMnWalkthroughTests::walkthrough`, which also fails without dashpay#8124. Both are in shared masternode code no pick changes, and are followed up separately; CI runs `test_dash-qt` on Linux.

  Each pick was compared line by line with its develop merge (`git diff <merge>^1 <merge>`). Apart from the adaptations listed above, they change the same lines. The archived v24.0.2 notes are byte-identical to the previous `doc/release-notes.md`.

  ## Breaking Changes

  None. No consensus change. The only change to peer scoring is that mixing clients now give a peer relaying a DSQUEUE with an invalid denomination the same penalty (10) masternodes already give; only masternodes relay DSQUEUEs, and since v23.0.0 they drop such queues. RPC calls with valid arguments behave as before, except that `getdeploymentinfo` and REST `/deploymentinfo` now return an error for a block that is not fully validated or is marked invalid (dashpay#8098); the error changes for invalid arguments are in the release notes. A mnemonic with an invalid BIP39 checksum is now refused when creating or restoring a wallet.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [x] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(if you have permission to set one)_

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

Top commit has no ACKs.

Tree-SHA512: 6d7a9c93d92173d5462b3a61c13f552f5e014a638a5c5db489ca5dc74e01d5d3107671e5fbdc1dba0a4f3175eb0e3f8630cc733aa10eff282c02caee6c9f28c3
Brings the v24.0.2 and v24.0.3 releases into develop. upstream/master
is at the signed v24.0.3 tag (5e7a58f), so this merges master
itself. v24.0.2 was never merged back, so both releases come in here.

Every code change in v24.0.1..v24.0.3 is a cherry-pick -m1 -x of a
develop merge commit, and each source commit is already on develop.
Git reports conflicts in 31 files because v24.0.x carries adapted
copies of those changes; three more files merge cleanly but would
duplicate code develop already has (ValidateDSQueue, a governance
superblock test, kill_after_reindex). All of them resolve to develop's
side, which keeps develop's code. configure.ac stays deleted, since
develop builds with CMake.

Taken from v24.0.3:
- doc/release-notes.md: the v24.0.3 release notes; the v24.0.1 and
  v24.0.2 notes are archived in doc/release-notes/dash/
- the version string in the man pages (no option changed)
- the v24.0.2 and v24.0.3 flatpak release entries

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@PastaPastaPasta PastaPastaPasta added this to the 24.1 milestone Nov 23, 2026
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The release documentation adds archived notes for v24.0.1 and v24.0.2. It updates the current release notes, Flatpak metadata, and manual pages to document v24.0.3, including its upgrade and downgrade guidance and listed fixes.

Estimated code review effort: 2 (Simple) | ~12 minutes

Possibly related PRs

  • dashpay/dash#8141: Updates overlapping release notes, man pages, and Flatpak history for v24.0.1.
  • dashpay/dash#8064: Establishes the release-notes archive convention and updates documentation paths also used by this PR.
Merge Risk: Minimal · up to eb502

This merge-back updates release documentation and version labels for v24.0.3 and leaves code untouched. It has no identified runtime or production impact and appears ready to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "chore: merge master (v24.0.3) back into develop" matches the changeset. The PR merges master into develop, and the diff touches only release notes, man pages, and Flatpak metadata for v24.0…
Description check Passed The description states that the PR merges the v24.0.2 and v24.0.3 releases from master back into develop. It lists the 10 doc and Flatpak files that change, explains the conflict resolution in favor o…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "chore: merge master (v24.0.3) back into develop" matches the changeset. The PR merges master into develop, and the diff touches only release notes, man pages, and Flatpak metadata for v24.0.2 and v24.0.3. It is a short, specific, single-sentence title that names the main change.

Full details: Description check

Explanation

The description states that the PR merges the v24.0.2 and v24.0.3 releases from master back into develop. It lists the 10 doc and Flatpak files that change, explains the conflict resolution in favor of develop, and gives validation steps. It directly describes the changeset.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f0681b39-7157-4b4c-9689-3f8424071d0b
Commits

Reviewing files that changed from the base of the PR and between c9aafd7 and eb502c5.

Files selected for processing: 10

  • contrib/flatpak/org.dash.dash-core.metainfo.xml
  • doc/man/dash-cli.1
  • doc/man/dash-qt.1
  • doc/man/dash-tx.1
  • doc/man/dash-util.1
  • doc/man/dash-wallet.1
  • doc/man/dashd.1
  • doc/release-notes.md
  • doc/release-notes/dash/release-notes-24.0.1.md
  • doc/release-notes/dash/release-notes-24.0.2.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@thepastaclaw

thepastaclaw commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Final review complete — Phase 1 only — no blockers (commit eb502c5) · triage: trivial

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final review — Phase 1 only (trivial change)

Nothing blocks: no blocking finding stands on this head.

This merge brings the v24.0.2 and v24.0.3 release documentation back into develop, updating the release notes, man-page version strings, and Flatpak release history. All 10 changed files match the v24.0.3 tag, the v24.0.1 notes are archived unchanged, and develop’s source, tests, and build configuration are untouched. All completed build, test, and lint checks passed; linux64_asan-test and linux64_multiprocess-lint are still pending.

Review provenance

Source: reviewer 1: glm-5.3-flash (agent: phase1-reviewer, role: general); reviewer 2: glm-5.3-flash (agent: phase1-reviewer, role: dash-core-commit-history); final verifier: gpt-6.2-sol (agent: sol-gate-verifier, role: final-verifier)

  • Triage: trivial by gpt-6.2-sol (effort low) — The net diff only updates release notes, man-page version strings, and Flatpak release history, with no behavior change.
  • Phase 1 reviewers: glm-5.3-flash — general (completed, effort high); agent phase1-reviewer, glm-5.3-flash — dash-core-commit-history (completed, effort high); agent phase1-reviewer
  • Phase 1 model: glm-5.3-flash — zai quota: 5h 99% left, weekly 78% left; passed over gemini-3.8-flash-high (lane failed)
  • Fresh verifier: gpt-6.2-sol — final-verifier; agent sol-gate-verifier
  • Phase 2 reviewers: not run (triage rated this change trivial); this review comments and never approves

@thepastaclaw thepastaclaw added the pastaclaw:commented thepastaclaw's latest review was comment-only label Nov 23, 2026

@PastaPastaPasta PastaPastaPasta left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@PastaPastaPasta
PastaPastaPasta merged commit df5f873 into dashpay:develop Nov 23, 2026
51 of 52 checks passed
@thepastaclaw thepastaclaw removed the pastaclaw:commented thepastaclaw's latest review was comment-only label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants