Repository navigation
backport: v24.0.x backports and release prep for v24.0.2 - #8143
Conversation
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 <32963518+hebasto@users.noreply.github.com> (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 <32963518+hebasto@users.noreply.github.com> (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 <noreply@anthropic.com>
|
✅ Final review complete — no blockers (commit b534385) · triage: normal |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
The release backport range is internally consistent and the reviewed source transformations are present without a concrete correctness, security, consensus, or runtime defect. The sole reviewer suggestion asks for confirmation of release policy rather than identifying an actionable code issue, so it is dropped. One arm64 build job reported failure, but its logs were unavailable while the workflow remained in progress, so no failure attributable to this change was established.
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: backport-reviewer); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: dash-core-commit-history); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 6: gpt-6.1-sol (agent: phase2-reviewer, role: backport-reviewer); reviewer 7: gpt-6.1-sol (agent: phase2-reviewer, role: dash-core-commit-history); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.1-sol(effort low) — This is a broad release backport containing multiple logic, concurrency, allocator, wallet, governance, GUI shutdown, and release-documentation changes, but the diff does not directly alter consensus rules, funds movement, cryptographic primitives, peer-facing deserialization, or storage migrations. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(antigravity quota lookup failed),glm-5.3-flash(not used above high effort; tier asks max) - Second Phase-2 pass: on this first full review every Phase-2 reviewer also ran a second, independent time, and the verifier weighed both sets
- Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— backport-reviewer (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— dash-core-commit-history (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— backport-reviewer (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— dash-core-commit-history (completed, effort high); agentphase2-reviewer
Issue being fixed or feature implemented
Backports and release prep for v24.0.2, on top of
v24.0.xat 137d999 (v24.0.1). One PR carries both, so the release branch gets a single merge.Two fixes are the reason for the release:
v24.0.xBLS 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 fix: free pooled secure allocations with their allocated size #8115 describes the bug as latent.File > Open Wallet,Close Walletand 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-xfrom the commits #8073 merged, like earlier partial picks on this branch.appMenuBar->clear()when shutdown starts.Then one commit,
chore: prepare v24.0.2 release:configure.ac:_CLIENT_VERSION_BUILD1 → 2.doc/release-notes.md: v24.0.2 notes. The v24.0.1 notes are archived verbatim todoc/release-notes/dash/release-notes-24.0.1.mdand added to "Older releases".contrib/flatpak/org.dash.dash-core.metainfo.xml:24.0.2entry dated 2026-11-13. The date needs changing if the tag is cut on another day.doc/man/*.1: version string only.-printcrashinfo(fix(utils): accept -printcrashinfo in dash-cli and dash-tx #8120) is a hidden option, so no help text changed.Adaptations
Every pick changes the same lines as its develop counterpart except:
v24.0.xdoesn't need.test/functional/feature_governance.pydiffers onv24.0.x(no pruned node from feat: run governance on pruned nodes #7860). Thev24.0.xfile is kept and only fix: answer govsync only to the requesting peer and index replayed orphan votes #8112's additions are applied: the imports it needs,GovernanceSyncPeer,check_govsync_is_peer_local()and its call. The source change is identical.v24.0.xhas the five-argumentCWalletconstructor andCreateMockWalletDatabase(), so the second wallet is built the way the fixture in the same file builds the first. The source change is identical.src/llmq/utils.cppthe neighbouring includes differ; the pick removes<atomic>and adds nothing. The source change is otherwise identical.Not picked
rpc/masternode.cpp.v24.0.x, and the capacity part is hardening with no behaviour change.v24.0.xa synced node never records the uncommitted tip it handles, and the governance index it mainly covers doesn't exist here.#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_dashandtest_dash-qtbuild cleanly;dashd -versionreportsv24.0.2.test_dash(1106 cases),test_dash-qtandtest/util/test_runner.pypass. That includes the picked unit tests:allocator_tests/mt_pooled_secure_allocator_reuses_all_chunks(fix: free pooled secure allocations with their allocated size #8115),coinjoin_tests/coinjoin_maintenance_runs_for_every_wallet(fix(wallet): schedule CoinJoin auto-denomination per wallet and guard an empty round list #8113) and the orphan-vote case ingovernance_vote_processing_tests(fix: answer govsync only to the requesting peer and index replayed orphan votes #8112).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 andfeature_unsupported_utxo_db.py). The run includes the scenarios the picks add or extend:feature_governance.py(fix: answer govsync only to the requesting peer and index replayed orphan votes #8112),feature_stats.py(fix(stats): wrong inputValue gauge, counter data race, and null-tip crash #8119) andinterface_bitcoin_cli.py(fix(utils): accept -printcrashinfo in dash-cli and dash-tx #8120).feature_llmq_is_cl_conflicts.py, inmine_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 test: moving over quorum phases rapid fast; increase stability by proper waiting for the DKG messages #7892). Run again on its own four times in parallel, it passed all four.getmemoryinfolocked.usedon each node every 50 locks.contrib/devtools/gen-manpages.pyfrom this build. They are byte-identical to the committed ones except for thelockdebug category indashd.1anddash-qt.1, which only an--enable-debugbuild lists.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-qton 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:
🤖 Generated with Claude Code