Skip to content

backport: v24.0.x backports for v24.0.1 - #8128

Merged
PastaPastaPasta merged 11 commits into
dashpay:v24.0.xfrom
PastaPastaPasta:backport/v24.0.1
Nov 12, 2026
Merged

PastaPastaPasta merged 11 commits into
dashpay:v24.0.xfrom
PastaPastaPasta:backport/v24.0.1

Conversation

@PastaPastaPasta

@PastaPastaPasta PastaPastaPasta commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Issue being fixed or feature implemented

Backports for v24.0.1, on top of v24.0.x at 938fba5 (v24.0.0). v24.0.0 is running on mainnet ahead of the V24 hard fork, and a handful of fixes that landed on develop since the release should not wait for 24.1: a test_dash-qt failure that blocks distribution packagers (#8075), a broken dependency download, a peer-triggerable busy loop, a way for a quorum commitment to be lost for a whole DKG cycle, and a node abort after a reorg.

It also carries #8131, which changes when masternodes vote NO on superblock triggers. Inside a superblock's maturity window a masternode votes NO on every trigger that doesn't match its candidate and never revisits that vote. If the approved set changes while triggers are being created, masternodes can end up having voted NO on the trigger that matches their final candidate, and the superblock can go unpaid. With #8131 a masternode waits for a trigger matching its own candidate before it votes NO on the others (until 3 blocks before the superblock), and clears the per-cycle "voted YES" marker by height so an unfunded cycle doesn't carry over into the next one. This was a separate PR (#8132) until #8131 merged on develop; it is folded in here so the release branch gets one backport PR.

It also carries the fixes for the llmq_400_85 DKG rounds that have been failing on mainnet, which is what the stalled v24 activation is waiting on: #8135, which stops DKG members from reloading every verification vector at commit time, the reason slow members have been missing the commit phase of llmq_400_85 rounds, and #8130, which makes a member relay its own DKG messages before it works through queued peer messages.

What was done?

Picked

All eleven are picked from their develop merge commits with git cherry-pick -m1 -x. Each pick changes the same lines as its develop counterpart except where noted.

Adaptations

Not picked

How Has This Been Tested?

macOS arm64, depends build with --enable-debug --enable-werror, no GUI. The current head is 78ad074.

On the current head:

  • dashd and test_dash build cleanly.
  • Unit suites governance*, llmq*, dkg*, evo* and versionbits* pass, on the relic-based BLS library this branch uses.
  • feature_governance_trigger_voting.py, feature_governance.py, feature_governance_cl.py, feature_governance_objects.py, feature_llmq_dkgerrors.py, feature_mnehf.py and interface_rest.py pass.

On earlier revisions of this branch. The current head has the same content as those revisions for the picks concerned; since then #8129 was dropped (one line in src/llmq/ehf_signals.cpp plus its test changes), the #8097 and #8131 picks were added, and the later picks were redone from their develop merge commits without changing the tree:

#8131 describes its scenarios and how each was shown to fail without the change.

The GUI picks (#8052, #8080) were not built or run locally; CI covers them. The first push of this branch did not compile (m_special_tx, see Adaptations); review caught it and it was fixed before any of the above was run.

Breaking Changes

None. Behaviour change for masternodes (#8131): a NO vote on a non-matching trigger may be cast later than before, when the masternode's own candidate has no trigger yet, and at the latest 3 blocks before the superblock.

Checklist:

  • 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

knst and others added 4 commits November 11, 2026 17:55
cba106e fix(build): fetch miniupnpc sources from miniupnp.free.fr (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented

      curl: (28) Failed to connect to miniupnp.tuxfamily.org port 443 after 30002 ms: Timeout was reached
      Fetching miniupnpc-2.2.7.tar.gz from http://dash-depends-sources.s3-website-us-west-2.amazonaws.com/
        % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                       Dload  Upload   Total   Spent    Left  Speed

        0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
        0   570    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
      curl: (22) The requested URL returned error: 404
      make[1]: *** [funcs.mk:301: /home/runner/work/dash/dash/depends/sources/download-stamps/.stamp_fetched-miniupnpc-2.2.7-b0c3a27056840fd0ec9328a5a9bac3dc5e0ec6d2e8733349cf577b0aa1e70ac1.hash] Error 22
      make[1]: Leaving directory '/home/runner/work/dash/dash/depends'

  So apparently build with depends without cache can't succeed anymore.

  ## What was done?
  Point the package at the author's other mirror, http://miniupnp.free.fr, which serves the tarball with the expected hash. This is what Bitcoin Core did in bitcoin#30151 for the same outage but it had been reverted later by bitcoin core by mistake and never refixed, instead bitcoin core dropped miniupnpc altogether (bitcoin#31130), so there is no later upstream fix to backport.

  ## How Has This Been Tested?
  Can be tested by CI on dashpay#7939 when rebased on top of merged this PR

  ## Breaking Changes
  N/A

  ## 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)_

Top commit has no ACKs.

Tree-SHA512: c53eb4eaed3bdeb7d024bba61acf21e79054dbb2356d408397b1c7e4232e0bee3f511201d26f1e87b9b688e996501578253377d355d64f178d1de5ef1bf53426
(cherry picked from commit 3d85a15)
…ibution again after a release

01cda37 fix(qt): reserve the same shared masternode contribution again after a release (pasta)

Pull request description:

  ## Issue being fixed or feature implemented

  In the Qt shared masternode wizard, if the coordinator releases and re-reserves its coins after a participant has replied, that participant can no longer accept the locked terms. The coordinator gets no warning. GUI QA found this on the `v24.0.0-rc.7` tag (`111a2c533e19`), on regtest:

  1. alice coordinates. She reserves her coins on "Your contribution" and saves the invitation, which carries her contribution, change address included.
  2. bob opens the invitation and sends his Details.
  3. alice goes back to "Your contribution", presses **Release**, pastes bob's Details and presses **Next**. Next reserves her coins again.
  4. alice locks the terms and sends the locked terms to bob.

  **Result:** bob gets "The locked terms do not contain the details you sent."
  - alice's board shows every reply in, with no "must reply again" warning.
  - In the same window, bob can't load alice's current invitation either: the copy looks like nothing new to him.
  - His only way forward is to open the locked terms in a fresh dialog.

  No funds move and nothing is signed or broadcast, but the participant is stuck with an error that doesn't say what to do.

  **Why it happens:** the re-reserve in step 3 selects coins afresh, so alice's contribution gets a **new change address**. bob's copy still lists the contribution from the invitation, and `MnShareSession::adoptLockedTerms` compares every contribution it knows.

  **Why rc.6 completes the same steps:** absorbing bob's reply used to put alice's released contribution back and relock it. That was a separate bug, fixed by dashpay#8035, which keeps released contributions out of absorbed replies. With that fixed, the new contribution from the re-reserve is what gets locked.

  ## What was done?

  `SharedMnCreateDialog::reserveCoins()` now puts back the most recently released contribution for this share, unchanged, when all of these hold:
  - Reserve built it in this dialog from this wallet's own coin selection. That's tracked in `m_built_contributions`, compared with `MnShareSession::SameContribution`: inputs in order with their sequences, and the same change;
  - every input is still one Reserve could select, from the same `fundingCandidates()` list `selectCoins()` now uses: unspent, unlocked and spendable, with no unconfirmed coins the wallet doesn't trust;
  - the inputs minus the change still equal what the share needs: the share amount, plus the Network fee for the coordinator. A contribution with no change may also exceed it by a dust amount, which `selectCoins()` leaves to the fee in the same way (the shared `isDust()`).

  Otherwise it selects coins as before. In that case the contribution really did change, for example the fee or the share amount changed, or a coin was spent. Earlier replies are then out of date, as they are today.

  The "built here" rule matters because of what a reply can contain. A reply can list a contribution under this wallet's share name that spends another of this wallet's coins, with any change, sequences or repeated inputs the sender chose. The wallet already refuses to sign such a contribution, but a release would put it into the released list. A contribution absorbed from a reply is therefore never put back. Reserve builds the wallet's own contribution instead.

  `fundingCandidates()` is the coin filter `selectCoins()` already used, moved into its own function so that reuse and fresh selection accept the same coins. `reservableAgain()` makes the reuse decision once for both Reserve and the coins card on "Your contribution". While the coins are released, the card says it uses the coins "as reserved before" and that the change "returns to the same address of yours", instead of describing a fresh selection.

  **Known limits, left as is:** reuse doesn't survive reopening a saved session, because neither the released nor the built list is saved. Also, two changes can cancel out. For example, the coordinator releases, raises the fee and reserves, then releases again and restores the fee. The original contribution was replaced in between, so the second re-reserve can't bring it back and builds a new one. This is rare, and it's the general "the coordinator changed their own funding after replies" case, which needs a reply-again signal on the board rather than reuse.

  ## How Has This Been Tested?

  **New scenario:** `SharedMnWizardTests::reservingAgainKeepsEarlierReplies`, with a confirmed coin in a real wallet.
  - **Main case:** reserve, then take the invitation, then bob's and carol's replies to it. Release, absorb bob's reply and reserve again.
    - The contribution must match the one bob holds.
    - After a real `PrepareRegistration` + `freeze`, bob's `adoptLockedTerms` on the locked terms must succeed.
  - **A reply plants a contribution under alice's name:** the variants are change paid elsewhere, one coin listed twice, 100 duffs of change to this wallet, and an exactly funded input at sequence 1. After Release and Reserve, the wallet must go back to its own contribution each time, and the planted coin must stay unlocked.
  - **No change, dust remainder:** Reserve itself builds a no-change contribution from a coin 100 duffs over the share plus fee, with the other coins locked. After a release it is reserved again unchanged.
  - **Coins card:** a larger coin arrives after the first reservation. After Release, the card must describe the contribution Reserve will put back, not the larger coin.
  - **Fee changed:** after a release and a fee change, reserving again must select afresh.

  **Fails without the fix:**
  - With the reuse removed, the scenario fails at the check that the re-reserved contribution is the one sent (`sharedmnwizardtests.cpp:471`).
  - With reuse allowed for any released contribution, it fails at the first planted case (`:547`). With the card still showing a fresh selection, it fails at `:504` with "Uses 1 coin (600 tDASH); change 199.999 tDASH returns to a new address of yours".

  **Full `test_dash-qt` with the fix**, run headless (`QT_QPA_PLATFORM=minimal`) on Linux: 164 passed, 0 failed, 2 skipped. The skips are the OptionTests font tests, which can't run on the headless `minimal` platform. SharedMnWizardTests: 22 passed.

  **GUI on regtest**, run as a 2-party session with the steps above. Each binary was built from its exact commit:
  - **PR base** `9e5e3d59a1e3` and the **`v24.0.0-rc.7`** tag `111a2c533e19`: the re-reserve picks a new change address, and bob gets "The locked terms do not contain the details you sent."
  - **PR head at the time,** `eb4929384856`: the change address stays the same, bob gets Approve terms, and the registration confirms. Its change pays the address bob's Details listed.
  - **Head `496130ce0637`** (since superseded): the same flow was rerun with the same result: unchanged change address, Approve terms, ProRegTx `2db9621d…7834` confirmed. See [that evidence comment](dashpay#8052 (comment)).
  - **Head `55672100f0b0`:** it adds the coins-card change above. The same flow was rerun on it: unchanged change address, Approve terms, ProRegTx `59ba8be9…5c95` confirmed. After Release, the card reads "as reserved before … the same address of yours", where the base reads "a new address of yours". See [the current-head evidence comment](dashpay#8052 (comment)).
  - **Current head `01cda37af25`:** after `55672100` it adds only the reuse restriction above, through the untested intermediate `2a1bcc63`. The same flow was rerun on binaries built from exact `01cda37a`: unchanged change address, the "as reserved before … same address" coins card, Approve terms, and the ProRegTx `dcea870f…105d` confirmed. See [the current-head evidence comment](dashpay#8052 (comment)).

  Screenshots and provenance are in [the UI evidence comment](dashpay#8052 (comment)) and at [dash-ui-artifacts@`034c3d7` / dash/pr-8052](https://github.com/PastaPastaPasta/dash-ui-artifacts/blob/034c3d7dc83b896aca0182126aa748a72b4b1be9/dash/pr-8052/README.md).

  On the earlier pre-review head `46de5fe1dea`, the same flow also passed. So did a participant releasing and reserving again on the contribution page. A fee change after a reply gives a new contribution, as expected.

  ## 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: 0bb7afb3948fd947a73dd5b16f7e1b75ba3e10e650383609509d1220309b6baddb2244f110623c86badf51d7c8adf84dfca36d06482d92988ec7616903661825
(cherry picked from commit b2172a9)
…uffer is full

19da39c fix(net): wait for socket writability after failed sends (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  When a nonblocking `send()` to a peer fails with a would-block error (the peer has stopped reading and its TCP window is full), `CConnman::SocketSendData` leaves `fCanSendData` set. The peer therefore stays in the sendable set, the socket handler keeps polling with a zero timeout, and the net thread busy-loops until the peer starts reading again or times out.

  Before the transport refactor (bitcoin#28165, merged here in 63962ec) a failed send cleared the flag; that reset was lost in the merge.

  ## What was done?
  Clear `fCanSendData` whenever the send returns an error, so the next iteration waits for the socket to become writable again. The empty-send path and partial successful sends are unchanged.

  ## How Has This Been Tested?
  Reproduced with a functional script that connects a peer which never reads and streams pings at the node: before the change the node's net thread used ~100% of a CPU core (9.86 s of CPU vs 9.88 s for a reference busy loop); with the change it used 0.02-0.03 s over three runs. That script measures CPU time, so it is not added as a CI test. `test_dash --run_test=net_tests,sock_tests`, `p2p_ping.py` and `p2p_v2_transport.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: 0af7f3b48164fae294d81f828cf1d5c25f6cb86a41257dd4c981116a30a8fc5c976be0345f389f03033ec390ecc1c42853bf161350be9f8f14e1f011f63d923d
(cherry picked from commit 34f990e)
…the shared masternode wizard's prompt

a5618a0 test(qt): don't leave address book message answers armed after the edit (pasta)

Pull request description:

  ## Issue being fixed or feature implemented

  Fixes dashpay#8075. With a distribution Qt, `test_dash-qt` fails in `SharedMnWizardTests::signedSessionReservation()`. It either hangs until QtTest's 300 s watchdog fires, or aborts with `free(): invalid size`. Builds against depends' Qt pass.

  The shared masternode wizard is not at fault. `AddressBookTests` leaves two answers to a message box behind. `EditAddressAndSubmit()` calls `ConfirmMessage(&warning_text, 5ms)` before every edit, but a successful edit opens no box. Its timer then outlives the function, holding a pointer to the function's stack `QString`. The two successful edits run last, so both timers are still pending when the suite ends. No later suite runs an event loop until the wizard's "Keep this session for later?" prompt (added in dashpay#8035, which is why the bisect lands there).

  Whether that prompt survives depends on Qt's event dispatcher:
  - **Unix dispatcher** (depends builds Qt with `-no-glib`): the test's own "Cancel" ends the modal loop before timers are checked. The stale timers fire later, when no box is left, and do nothing.
  - **GLib dispatcher** (what Fedora's and other distribution Qt packages use): the timers fire in the same iteration as the test's answer. They write the box's text through the dangling pointer and click its default button, "Save and Close", over the test's "Cancel". The dialog then opens a save-file dialog that nothing answers, which is the hang. When the stray write hits a live frame instead, the result is `free(): invalid size`.

  The hardening flags in the report are incidental: the same Fedora build passes with `QT_NO_GLIB=1`. Bitcoin Core has the same `EditAddressAndSubmit()`, but no modal test runs after it there. Since dashpay#8077, `AddressBookTests` also runs on macOS, so the stale timers exist there too.

  ## What was done?

  `ConfirmMessage()` takes an optional context object, and `EditAddressAndSubmit()` scopes it to the edit, so a box that never opens leaves nothing armed. The existing address book scenario now also opens a message box after the successful edits and checks that its own answer wins.

  No production code changes. The dialog did what the stale click told it to do.

  ## How Has This Been Tested?

  Reproduced in a Fedora 44 container (GCC 16.2.1, system Qt 5.15.18) with the exact `CFLAGS`/`CXXFLAGS`/`LDFLAGS`/`configure` line from the issue. Results are for the full `test_dash-qt`. The "develop" column is develop at 4c5c015, and the "This PR" column is this PR on 8dbdcb4.

  | Build | Dispatcher | develop | This PR |
  |---|---|---|---|
  | Fedora RPM flags | GLib (default) | hangs in `signedSessionReservation` | 163 passed, 0 failed |
  | Fedora RPM flags | Unix (`QT_NO_GLIB=1`) | 163 passed | 163 passed, 0 failed |
  | ASan+UBSan, `detect_stack_use_after_return=1` | GLib | **stack-use-after-return** in the `ConfirmMessage` lambda (`qt/test/util.cpp:22`), inside the wizard prompt's `exec()` | 163 passed, no ASan report |
  | ASan+UBSan | Unix | passes | 163 passed, no ASan report |
  | Default depends build, `--enable-werror` | Unix | passes | 163 passed, 0 failed |
  | Fedora RPM flags under valgrind memcheck, `QT_ENABLE_REGEXP_JIT=0` | GLib | n/a (hangs) | 163 passed, 0 errors |

  - A gdb breakpoint on `QMessageBox::buttonClicked` during the hang showed the test's "Cancel" click, then two clicks from `ConfirmMessage`'s lambda in the same `exec()`.
  - With `scope` replaced by `nullptr`, the new address book check fails with either dispatcher: "Compared pointers are not the same", or a crash in the stale callback at `util.cpp:22`.
  - UBSan reports the existing misaligned store in the vendored X11 code (`crypto/x11/sph_types.h:613`), with and without this PR. On this PR's base it also reports one invalid `bool` load at `qt/transactionrecord.h:70`, in code this PR does not touch: `decomposeTransaction()` copies a record into its list before setting its uninitialised `involvesWatchAddress`. With Qt's regexp JIT left on, valgrind's only reports are uninitialised-value warnings in JIT-generated code. With the JIT off there are none.
  - clang-format-diff (18.1.8) and `lint-whitespace.py` are clean.

  ## Breaking Changes

  None. Test code only.

  ## 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

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

Top commit has no ACKs.

Tree-SHA512: d68bacc7990c68c1966cf0d020795d7638b29b9f49d5bc42620189fffa3afb36585bcbab9653f95bccfbda1f9dcf8d0fd05ea7e2cd3c3955f762230c186e4b11
(cherry picked from commit 6cedd34)
@PastaPastaPasta PastaPastaPasta added this to the 24 milestone Nov 12, 2026
@thepastaclaw

thepastaclaw commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

⏹️ Not reviewed — PR is closed (merged) (commit 78ad074)

@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 validation — Phase 1 + Phase 2

Verified the finding against exact head abe4b37: the commitment-cleanup backport introduces two references to an undeclared processor member, preventing validation.cpp from compiling. Current CI shows lint and Cppcheck passing, with source builds and several dependency builds still pending; this verification was static and no local builds or tests were run.

🔴 1 blocking

Review provenance

Source: reviewer 1: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: backport-reviewer); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: dash-core-commit-history); reviewer 4: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: critical by gpt-6.1-sol (effort low) — This is a large, cross-cutting backport whose diff changes critical peer-facing validation and consensus-sensitive paths, including InstantSend lock deserialization/validation in src/instantsend/net_instantsend.cpp and quorum commitment processing in src/llmq/blockprocessor.cpp.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity quota lookup failed), glm-5.3-flash (not used above high effort; tier asks max)
  • Single stage: Phase 1 and Phase 2 reviewed this head side by side, with no blocker gate between them (triage tier)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — backport-reviewer (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — dash-core-commit-history (completed, effort xhigh); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.

In `src/validation.cpp`:
- [BLOCKING] src/validation.cpp:2928: Adapt both commitment-cleanup calls to the v24 Chainstate API
  Both this new call in ConnectBlock and the new call in RollforwardBlock at line 5222 reference `m_special_tx`, which is not declared on this branch. Chainstate instead accesses the processor through `m_chain_helper->special_tx`, as the existing ProcessSpecialTxsInBlock calls at lines 2674 and 5213 demonstrate. These two undeclared-identifier references prevent validation.cpp from compiling. Change both cleanup calls to `m_chain_helper->special_tx->RemoveMineableCommitmentsForBlock(block, pindex);` so the backport uses the release branch's processor API.

Comment thread src/validation.cpp Resolved
@thepastaclaw thepastaclaw added the pastaclaw:changes-requested thepastaclaw's latest review requested changes label Nov 12, 2026
@thepastaclaw thepastaclaw removed the pastaclaw:changes-requested thepastaclaw's latest review requested changes label Nov 12, 2026

@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.

Re-review — Final validation — Phase 1 + Phase 2

Static review of b2b83b8 found no actionable in-scope defects: all ten picks preserve their source transformations, with only the documented release-branch adaptations. Current CI has passed all seven dependency builds and the aarch64 and fuzz source builds; other source builds remain pending, while the ARM64 slim-container failure is unrelated infrastructure trouble—the job log reports curl exit 7 connecting to apt.llvm.org in the unchanged Dockerfile. Approval applies only to this head and does not waive the four declared source-PR merge gates.

🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)

Review provenance

Source: reviewer 1: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: backport-reviewer); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: dash-core-commit-history); reviewer 4: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); 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: critical by gpt-6.1-sol (effort low) — The intricate contribution re-reservation changes in src/qt/sharedmncreatedialog.cpp directly alter coin selection and reuse of funding inputs and change outputs, meeting the critical-surface bar beyond the PR's overall size.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity quota lookup failed), glm-5.3-flash (not used above high effort; tier asks max)
  • Single stage: Phase 1 and Phase 2 reviewed this head side by side, with no blocker gate between them (triage tier)
  • Fresh final gate: an independent Phase-2 review ran after iterative findings were reconciled
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — backport-reviewer (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — dash-core-commit-history (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — general (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — backport-reviewer (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — dash-core-commit-history (completed, effort xhigh); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify the current code and confirm that no unresolved issues remain.

No unresolved findings remain from the prior review on this head.
Out-of-scope follow-up suggestions (1)

These are valid observations, but they are outside this PR's scope and should be handled in separate issues or author/maintainer-requested PRs rather than blocking this review.

  • Handle incomplete Platform entries in provider JSON rendering — The unchanged GetPlatformPort() implementation in src/evo/core_write.cpp assumes nonempty extended Evo network data includes both required Platform entries. Deserialization does not enforce that completeness, so rendering malformed provider payloads with deprecated service fields enabled can throw; the REST block handler and HTTP worker do not contain that exception, allowing node termination. This is separate from the unsupported-version/null-netInfo case fixed here.
    • Follow-up: Open a separate provider-rendering fix that tolerates incomplete extended network data, with RPC and REST regression coverage.

@thepastaclaw thepastaclaw added pastaclaw:approved thepastaclaw's latest review approved this PR and removed pastaclaw:approved thepastaclaw's latest review approved this PR labels Nov 12, 2026
…lock is rejected

3936953 fix: keep final commitments mineable when their block is rejected (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  `CQuorumBlockProcessor::ProcessCommitment()` removed a block's final commitments from the mineable pool while the block was still being validated. `ConnectBlock()` processes quorum commitments early, before inputs, scripts, the coinbase amount/payee checks and several special-transaction checks. A block carrying the commitment of a finished DKG that then failed one of those later checks was never connected, yet every node that validated it (compact blocks are relayed before validation) had dropped the commitment from its pool. Nothing re-adds it, so that quorum was not mined in that DKG cycle.

  ## What was done?
  - `ProcessCommitment()` no longer touches the mineable pool, apart from dropping its caches.
  - New `CQuorumBlockProcessor::RemoveMineableCommitmentsForBlock()` removes the same entries as before, called once `ConnectBlock()` has accepted the block (next to where the BLS scheme switch is committed) and in `RollforwardBlock()`.
  - Check-only validation (`fJustCheck` / `TestBlockValidity`) returns before that point and never touches the pool. `UndoBlock()` still re-adds the commitments of a disconnected block, so reorgs behave as before.

  Re-adding on the failure path instead was rejected: a block can fail partway through its commitments, which could re-pool a commitment that was never verified. This doesn't overlap with dashpay#8048, which changes `AddMineableCommitment` only.

  ## How Has This Been Tested?
  `feature_llmq_dkgerrors.py`: after the existing `invalidateblock` check, the test submits the same commitment-carrying block with the coinbase paying 1 duff too much, expects `bad-cb-amount`, and asserts the commitment is still listed as mineable in `quorum dkgstatus`. It fails on `develop` and passed three times with this change. A five-node reproduction also fails on `develop`; with the fix every node keeps the commitment and the quorum is mined within its window. `llmq_*`, `evo_*` and `validation_chainstatemanager_tests` unit tests pass, as do `feature_llmq_rotation.py`, `feature_llmq_is_cl_conflicts.py`, `feature_llmq_evo.py`, `feature_llmq_signing.py`, `feature_llmq_simplepose.py`, `feature_llmq_singlenode.py`, `feature_llmq_dkg_intake.py`, `feature_dip4_coinbasemerkleroots.py`, `feature_quorum_proof_chain.py`, `rpc_quorum.py`, `feature_new_quorum_type_activation.py` and `feature_abortnode.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)

Top commit has no ACKs.

Tree-SHA512: a306a6fbf6613ca25dfce8665815c94833ebeb012642f492db882ea7154ac1a987bfe5c0afbebcc7d09762fcf8373e664ea3bb2a82e0c5921d87723426e2f4b6
v24.0.x adaptations: Chainstate has no m_special_tx member here, so
ConnectBlock() and RollforwardBlock() call the processor through
m_chain_helper->special_tx like the neighbouring special-tx calls.
CQuorumBlockProcessor keeps the v24.0.x GetCommitmentsFromBlock(), and
RemoveMineableCommitmentsForBlock()'s lock annotation drops
!m_commitment_payload_mutex, which only exists with dashpay#7936.

(cherry picked from commit ce9ef66)

@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.

Re-review — Final validation — Phase 1 + Phase 2

Static verification of head 32a1553 found no new actionable issues; the cherry-picks preserve their source changes and regression tests, with compatible release-branch adaptations. The failed “Build slim container / Build container (amd64)” check is unrelated: its job log shows curl error 7 connecting to apt.llvm.org while downloading the LLVM signing key in the unchanged container definition. Dependency and source-build jobs remain pending; no local builds or tests were run.

🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)

Review provenance

Source: reviewer 1: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: backport-reviewer); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: dash-core-commit-history); reviewer 4: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: critical by gpt-6.1-sol (effort low) — The diff is intricate and directly changes critical surfaces, including coin selection and contribution reuse in SharedMnCreateDialog::reserveCoins and BLS verification-vector and secret-key caching in CDKGSessionManager.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity quota lookup failed), glm-5.3-flash (not used above high effort; tier asks max)
  • Single stage: Phase 1 and Phase 2 reviewed this head side by side, with no blocker gate between them (triage tier)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — backport-reviewer (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — dash-core-commit-history (completed, effort xhigh); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify the current code and confirm that no unresolved issues remain.

No unresolved findings remain from the prior review on this head.

@thepastaclaw thepastaclaw added the pastaclaw:approved thepastaclaw's latest review approved this PR label Nov 12, 2026
@thepastaclaw thepastaclaw removed the pastaclaw:approved thepastaclaw's latest review approved this PR label Nov 12, 2026

@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.

Re-review — Final validation — Phase 1 + Phase 2

Verified the ten-commit backport range at 8d2bc98 against the original Dash source commits; differences match the documented release-branch adaptations, and no actionable in-scope issues remain. Current CI reports lint and several dependency builds passing, with source builds, remaining dependency builds, and cppcheck still pending and no failed checks reported. This was a static review; no local builds or tests were run.

🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)

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); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: normal by gpt-6.1-sol (effort low) — This is a broad multi-subsystem backport involving LLMQ processing, governance reorg handling, networking, REST behavior, Qt wallet flows, and functional tests, but the diff does not directly change consensus rules, funds movement, cryptography, key handling, peer-facing deserialization, or storage migrations.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity quota lookup failed), glm-5.3-flash (not used above high effort; tier asks max)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — backport-reviewer (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — dash-core-commit-history (completed, effort high); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify the current code and confirm that no unresolved issues remain.

No unresolved findings remain from the prior review on this head.

@thepastaclaw thepastaclaw added the pastaclaw:approved thepastaclaw's latest review approved this PR label Nov 12, 2026
@thepastaclaw thepastaclaw removed the pastaclaw:approved thepastaclaw's latest review approved this PR label Nov 12, 2026

@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.

Re-review — Final validation — Phase 1 + Phase 2

Static verification of f353baf found no new actionable defects in the nine-pick backport series; comparisons with the source patches confirm the release-branch adaptations preserve their behavior and regression coverage. The failed “Build slim container / Build container (arm64)” job is unrelated to these changes: its log shows LLVM package downloads failing with “Could not resolve 'apt.llvm.org'” during container setup. Several CI builds remain pending; no builds or tests were run locally.

🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)

Review provenance

Source: reviewer 1: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: backport-reviewer); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: dash-core-commit-history); reviewer 4: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: critical by gpt-6.1-sol (effort low) — The multi-fix backport includes intricate changes to coin selection and contribution reuse in SharedMnCreateDialog::reservableAgain, fundsShareAgain, and reserveCoins in src/qt/sharedmncreatedialog.cpp, directly affecting wallet funding inputs and change.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity quota lookup failed), glm-5.3-flash (not used above high effort; tier asks max)
  • Single stage: Phase 1 and Phase 2 reviewed this head side by side, with no blocker gate between them (triage tier)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — backport-reviewer (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — dash-core-commit-history (completed, effort xhigh); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify the current code and confirm that no unresolved issues remain.

No unresolved findings remain from the prior review on this head.

@thepastaclaw thepastaclaw added the pastaclaw:approved thepastaclaw's latest review approved this PR label Nov 12, 2026
…es masternode internal ids

a1a84a0 fix: match governance voting keys by registration hash across reorgs (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  `CGovernanceManager::RemoveInvalidVotes` diffs the masternode list it last saw against the list at the new tip. `BuildDiff` keys updated entries by their internal id in the *new* list, but governance looked that id up in the *old* list and asserted the result exists. Internal ids are assigned in registration order, so a reorg that changes the order or height at which a ProRegTx is mined gives the same masternode a different id. The lookup then fails (or finds a different masternode) and `assert(oldDmn)` aborts every node that has finished governance sync. Because the old list is persisted in `governance.dat`, the node aborts again on every restart until that file is removed.

  ## What was done?
  Resolve each updated entry in the new list, then find its previous entry by proTxHash. Those lookups cannot fail for a diff built from these two lists, so they are guarded with `Assume` and a missing entry is skipped instead of aborting the node; the removed-entries loop gets the same treatment. Other consumers of the diff (`protx listdiff`, MNAUTH, `ApplyDiff`) already resolve ids against the right list.

  ## How Has This Been Tested?
  New case `governance_vote_processing_tests/votes_follow_masternode_identity_across_reorg`: real registrations, a voting-key update, then invalidating and re-mining blocks so the registrations get new internal ids. It checks that votes signed with the old key are removed and an unchanged masternode's vote still counts. On `develop` it aborts at `assert(oldDmn)`; it passes with this change. A multi-node functional reproduction (including the restart case) also aborts on `develop` and passed three times with the fix. `test_dash --run_test='governance_*,evo_dip3_activation_tests,evo_mnauth_tests'` and `feature_governance.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: 80afc57427ce02614f0bcfda4fdaa77c9806c3fe946698c571229390bb5ec88c912866bbe0973e4ce8e33a4c7540ca8cea090154d7e133cb47573371e3fecabc
(cherry picked from commit c68d3cd)
…able ProTx payloads

9560439 fix: skip undecoded provider payloads in transaction JSON (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  A ProRegTx or ProUpServTx with an unsupported payload version deserializes only its version field and leaves `netInfo` null. `TxToUniv` still treats the payload as decodable and calls `ToJson()`, which hits a `CHECK_NONFATAL` on the null `netInfo`. Over RPC that becomes an internal-bug error, but in `GET /rest/block/<hash>.json` the `NonFatalCheckError` escapes the HTTP worker and `std::terminate`s the node. Such a block can be stored without ever being connected (it is rejected with `bad-protx-version` at connect time), so a REST client could stop a node with `-rest` enabled.

  ## What was done?
  `TxToUniv` omits the decoded `proRegTx` / `proUpServTx` object when `netInfo` is unset, the same as it already does for payloads that fail to deserialize. The raw `extraPayload` stays in the output. Rendering of supported versions and all validation are unchanged. No HTTP-wide exception handling was added; the fix is at the rendering step, which covers RPC and REST alike.

  ## How Has This Been Tested?
  `interface_rest.py` stores a rejected block with both payload types at versions 0 and 65535 and checks that REST `/block` and `/block/notxdetails`, `getblock`, `decoderawtransaction` and `getrawtransaction` return the transactions with their raw payload and without the decoded object, with and without `-deprecatedrpc=service`, and that the node stays up. On `develop` the REST block request kills the node (`RemoteDisconnected`); with this change it passed three times. `rpc_deprecated.py`, which previously expected the internal-bug error for these payloads, now checks the same successful rendering. `feature_protx_version.py`, `rpc_netinfo.py` and the `evo_netinfo`, `evo_sharedmn`, `evo_dip3_activation`, `evo_simplifiedmns` unit tests 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: 64c4e1b41ef0006ba07a4bd8dfa972a50165f41a8a1d48454fa9e247f98a2568132459e9aabac98d68bd88cfcc121f4ca683ac3064759ea1e4e04b1068666e4f
(cherry picked from commit 6f5e9cf)
…ugh the commit phase

898351d perf(llmq): keep verified DKG contributions cached for the session (Konstantin Akimov)
49d9ed5 bench: measure the DKG commit step at llmq_400_85 size (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented

  Building a premature commitment for `llmq_400_85` takes about 5 seconds of single-threaded work, almost all of it avoidable. `SendCommitment` and the verification of every received premature commitment call `CDKGSessionManager::GetVerifiedContributions`, which reads each member's verification vector back from LevelDB and decodes it: 400 members x 340 BLS public keys, about 34 µs per key (25 µs subgroup check, 8 µs point decompression). The contributions cache was filled only by reads and expired after 60 seconds, so it was always cold at commit time, although the DKG session still held the same vectors in memory.

  dashpay#8130 reports that this delay made members miss short commit phases on mainnet, and fixes it. This PR is a smaller alternative to the cache part of dashpay#8130.

  ## What was done?

  - `WriteVerifiedVvecContribution` now also puts the vector into `contributionsCache`, sharing the pointer the session already holds (no copy).
  - `WriteVerifiedSkContribution` updates the cached entry, so a share verified or justified later is visible to the next lookup.
  - `CleanupCache` drops an entry after 60 seconds only when nothing else references its vector, so entries live as long as their session and entries loaded from disk expire as before.
  - Benchmarks for the commit step at 400 members / threshold 340: `BLSDKG_BuildCommitment_cold_400`, `BLSDKG_BuildCommitment_cached_400`, `BLSDKG_VerifyCommitment_400`.

  The database writes and the cold-read path are unchanged, so restarts, watchers and later quorum builds behave as before.

  ### Compared to dashpay#8130

  dashpay#8130 has the same idea but is +580 −9 across 7 files. This PR is +88 −6 across 3 files and reaches the same speed.

  One behaviour difference from dashpay#8130: under the legacy BLS scheme (before v19) a received vector is cached as decoded, without the subgroup check that the database read applies. dashpay#8130 falls back to the database read in that case. There's no reason to keep different behaviour for 2 scenarios.

  ## How Has This Been Tested?

  ### Measurements

  x86_64, blst, release build, 400 members / threshold 340:

  | Benchmark | Time |
  |---|---:|
  | `BLSDKG_BuildCommitment_cold_400` (decode from database encoding first) | 5.28 s |
  | `BLSDKG_BuildCommitment_cached_400` | 0.09 s |
  | `BLSDKG_VerifyCommitment_400` (per received commitment) | 0.018 s |

  Through the real `CDKGSessionManager`, using the end-to-end benchmark from dashpay#8130: 5.03 s on develop, 0.20 s with this PR, 0.22 s on dashpay#8130, same commitment hash in all three.

  ## Breaking Changes

  None. No protocol, message, consensus or on-disk change.

  ## 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)_

Top commit has no ACKs.

Tree-SHA512: fa65560612bbd1ac1d448a4e35cb1f3a4316257a5ff521f1cb503599c91a33ca221113d53f244b3db0d1ca1c4cf99de68f06118f6a6fcb25272f15b88b904136
(cherry picked from commit 1abaa0d)
…ueued peer messages

0c3ba64 fix(llmq): process our own DKG messages ahead of queued peer messages (pasta)

Pull request description:

  ## Issue being fixed or feature implemented

  A masternode's own DKG messages (contribution, complaint, justification, premature commitment) are pushed onto the same pending queue as the messages it receives from peers, at the back. They are only verified and relayed when the DKG thread gets to them, so a node's own message waits behind every peer message that was already queued.

  In the commit phase that wait can be long. Each received premature commitment is verified one at a time on the DKG thread (a public-key-share computation and a pairing: about 20 ms on blst, several times that on relic), and in a 400-member quorum up to 399 of them can be ahead. A slow member that falls behind on verifying its peers' commitments therefore also holds back its own, and the commit phase is 4 blocks, which fast blocks have cut to under two minutes on mainnet (see dashpay#8135 for the rounds that failed). The other members can only count a commitment they have received.

  This PR used to carry a contribution cache change as well. dashpay#8135 does that part in less code, so it has been dropped from here; this is the remaining, independent change.

  ## What was done?

  `CDKGPendingMessages::PushPendingMessage` puts a message the node produced itself (`from == -1`) at the front of the queue instead of the back. Peer messages keep their order.

  Nothing else changes: the message is still verified by the same code before it is relayed, and there is no protocol, message, consensus or on-disk change.

  ## How Has This Been Tested?

  - New unit test `pending_messages_own_message_is_processed_first` in `llmq_dkg_tests`: with peer messages queued, a node's own message is popped first and the peer messages follow in their original order. It fails with the change reverted.
  - Unit tests `llmq_dkg_tests` pass.
  - Functional tests on this branch: `feature_llmq_dkgerrors.py`, `feature_llmq_simplepose.py` (both variants), `feature_llmq_rotation.py`, `feature_llmq_signing.py` (both variants), `feature_llmq_data_recovery.py`, `feature_llmq_connections.py` and `feature_llmq_chainlocks.py` pass.
  - The same commit on a `v24.0.x` build together with dashpay#8135's cache commit: unit tests `llmq*`, `dkg*`, `bls*`, `evo*` pass, and the functional tests above plus `feature_llmq_evo.py`, `feature_llmq_singlenode.py` and `feature_mnehf.py` pass.

  The effect on a mainnet-sized commit phase was not measured; the change is justified by the queue order alone.

  ## 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)

ACKs for top commit:
  knst:
    utACK 0c3ba64

Tree-SHA512: c2078b24b75095470fc0549c4fa53396809a1cfb819c3fd25a38548ddded3cb03dcd609b380aa67ef11149422cf9a2d80ff1a6ea9e2d36061fa7e5a78a5455f8
(cherry picked from commit 1e3aeb3)
… test networks

6955798 fix: initialize governance cleanup from the active tip (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  `CGovernanceManager::LoadCache` runs `CheckAndRemove()` and `InitOnLoad()` before the first tip notification sets `nCachedBlockHeight`, so loaded triggers are checked against height 0. On testnet, devnets and regtest that makes valid stored triggers look too far in the future, and they are scheduled for deletion. After the deletion delay the restarted node no longer has the trigger and rejects the valid superblock with `bad-cb-amount`. Mainnet is not affected.

  ## What was done?
  Set `nCachedBlockHeight` from the active chain before the load-time cleanup and trigger registration. `LoadCache(true)` is only called when an active tip exists and the node is not reindexing.

  ## How Has This Been Tested?
  `feature_governance.py` now restarts its pruned node after the first funded trigger has its votes, advances mocktime past the deletion delay, and then runs the existing superblock mining, sync and payment checks. On `develop` the restarted node rejects superblock 160 with `bad-cb-amount` and the test fails; with this change it passed in three runs. `test_dash --run_test='governance*'` 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: 405023d8e78ab9c028d711dd09d8a8670d45f4d71d549883d2c52c5fe51c09ba21f4e2fbe6ee15bc3ba7a3e9909129713b024d6a059b377c49a87b66b7b5fa00

v24.0.x: source change only. The feature_governance.py step is left out
because it restarts the pruned node added with dashpay#7860, which v24.0.x does
not have. The restart case in feature_governance_trigger_voting.py covers
it here: a masternode restarted inside the maturity window has to keep its
triggers to accept the superblock.

(cherry picked from commit 146bed9)
…e voting NO on the others

c65cd59 test: cover superblock trigger voting across approved set changes (pasta)
79606fb fix(governance): track trigger vote height and defer early NO votes (pasta)

Pull request description:

  ## Issue being fixed or feature implemented

  Inside a superblock's maturity window a masternode votes YES on the trigger that matches its own candidate and NO on every other trigger, and it never revisits a funding vote it has cast. That is fragile when the set of approved proposals changes while triggers are being created: a masternode whose candidate has no trigger yet votes NO on the triggers that do exist, and if its candidate later matches one of those, it cannot vote YES on it any more. With enough masternodes in that state no trigger reaches the funding threshold and the superblock pays nothing, including proposals that stayed approved throughout.

  A second problem makes such a cycle carry over. The marker that records "I already voted YES this cycle" was only cleared when a superblock was actually found at a superblock height. After a cycle that ended without one, the masternodes that had voted YES kept the marker, built no candidate in the next cycle and voted NO on its trigger.

  ## What was done?

  All in `GovernanceSigner`; no vote that has been cast is ever changed, and nothing changes in consensus, P2P, RPC or storage.

  - **Wait for a matching trigger before voting NO.** If the masternode has a candidate for this block but no trigger matches it yet, it casts no NO votes that block. Once a matching trigger exists (it votes YES on it, or already has a vote on it), or when it has no candidate at all (nothing approved, outside the window, not synced), it votes NO on the other triggers exactly as before.
  - **A deadline for that wait.** In the last 3 blocks before the superblock the NO votes are cast regardless, so a trigger that does not match can't keep its funding only because masternodes were still waiting.
  - **The per-cycle marker records its superblock height** and is cleared once the tip reaches that height, whether or not a trigger was funded. It is not cleared by a tip below the maturity window, so a rollback can't lead to a second YES. The existing reset stays.

  Masternodes without this change keep voting as before, so the benefit grows with the share of masternode vote weight that has upgraded; without a change in the approved set, old and new masternodes end with the same votes.

  ## How Has This Been Tested?

  New functional test `feature_governance_trigger_voting.py` (6 nodes, `-budgetparams=10:10:10`, each scenario in its own cycle, payee asserted through `masternode winners`):

  1. A cycle that ends with no funded trigger while its creator holds a YES: in the next cycle every masternode, the creator included, votes YES and the proposal is paid. Also with the creator restarted inside the window, so its YES is re-learned from the stored vote. Without the change the creator votes NO in the next cycle (`not(no == yes)`).
  2. A masternode with a candidate but no matching trigger, and not the payee, has no vote on the other trigger 5 and 4 blocks before the superblock and votes NO on it 3 blocks before. Without the change it has voted NO already at 5 blocks (`not(no == None)`).
  3. A masternode that already voted NO on the trigger matching its candidate keeps that vote and still votes NO on a non-matching trigger.
  4. After a YES, invalidating back below the window and re-entering with a different approved set produces no second YES from that masternode.
  5. Unchanged behaviour, passing with and without the change: with nothing approved, masternodes vote NO on an existing trigger at the next block; after a single change of the approved set the later set's trigger is the one paid.

  Scenarios 3 and 4 pin behaviour the change must keep; each fails against a variant of the rules that was considered and rejected (waiting whenever no YES has been cast; clearing the marker on any tip outside the window). The file passed 3 runs in its final form (21-24 s each).

  A further end-to-end scenario was run locally against builds with and without the change: it fails without it and passed 5 of 5 runs with it.

  Existing tests on the final build: `feature_governance.py`, `feature_governance_cl.py`, `feature_governance_objects.py` and the 36 `governance*` unit cases pass unchanged. `feature_governance.py` is intermittent on this machine at its "Should have 25 votes on all nodes" step (`not(24 == 25)`) both with and without the change; the log points at the test's sequential governance re-sync dropping a vote request, not at trigger voting.

  ## Breaking Changes

  None. Behaviour change for masternodes: a NO vote on a non-matching trigger may be cast later than before, when the masternode's own candidate has no trigger yet, and at the latest 3 blocks before the superblock.

  ## 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)_

  ## Council review

  Rounds: 3

  | Member | Round 1 | Round 2 | Round 3 |
  | --- | --- | --- | --- |
  | Fable 5.2 (high) | 7/10 | 8/10 | 8/10 |
  | Opus 5.5 (high) | 7/10 | 7/10 | 8/10 |
  | GPT 6.1 Sol (high) | 7/10 | 6/10 | 8/10 |

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

Top commit has no ACKs.

Tree-SHA512: 544e1c1e50fc4ac034bbb543646a55941c88bd998426123cdbf2f863886a559dbb617f837c567fa20fc52719172354ec18c09f93808bbe150fd4e6b5e984baaa
(cherry picked from commit 5c34dcf)
@thepastaclaw thepastaclaw removed the pastaclaw:approved thepastaclaw's latest review approved this PR label Nov 12, 2026
@PastaPastaPasta
PastaPastaPasta merged commit 2257b94 into dashpay:v24.0.x Nov 12, 2026
40 of 41 checks passed
PastaPastaPasta added a commit that referenced this pull request Nov 12, 2026
038306f chore: prepare v24.0.1 release (pasta)

Pull request description:

  ## Issue being fixed or feature implemented

  Prepares the **v24.0.1** point release on top of the v24.0.1 backports (#8128), following the v23.1.10 prep (#7983). v24.0.1 carries the fix for what has held up `v24` activation on mainnet (`LLMQ_400_85` DKG rounds failing at the commit step, so no new quorum is selected to sign the EHF signal), plus a small set of other fixes.

  ## What was done?

  - `configure.ac`: `_CLIENT_VERSION_BUILD` 0 → 1 (`_CLIENT_VERSION_IS_RELEASE` stays `true`, no RC).
  - `doc/release-notes.md`: v24.0.1 notes covering #8135, #8130 and #8104 (v24 activation), #8131 and #8097 (governance), #8100, #8094, #8099 and #8052 (other fixes), and #8088 and #8080 (build and tests). Upgrade and downgrade notes point to the v24.0.0 notes for everything that applies when coming from v23.
  - Archived the v24.0.0 notes to `doc/release-notes/dash/release-notes-24.0.0.md` (verbatim copy), added v24.0.0 to "Older releases", and pointed the change log link at `v24.0.0...v24.0.1`.
  - `contrib/flatpak/org.dash.dash-core.metainfo.xml`: `24.0.1` release entry dated 2026-11-12. The date needs changing if the tag is cut on another day.
  - `doc/man/*.1`: version string bump only; no CLI option changed since v24.0.0.

  ## How Has This Been Tested?

  Release mechanics only; no code changes.

  - Built the branch (macOS arm64, wallet, no GUI); `dashd -version` and `dash-cli -version` report `v24.0.1`.
  - Regenerated the `dash-cli`, `dash-tx`, `dash-wallet` and `dash-util` man pages with `contrib/devtools/gen-manpages.py` from that build: byte-identical to this commit. `dashd.1` differs from the regenerated one in a single line, the `lock` debug category that only an `--enable-debug` build lists, so the committed page matches a release build. `dash-qt.1` got the same version-only bump and wasn't regenerated (no GUI build).
  - The archived 24.0.0 notes are byte-identical to the previous `doc/release-notes.md`.
  - The notes were checked against the merged diffs and kept to effects.

  ## Breaking Changes

  None in this PR. The behaviour changes that ship in the fixes are described in the notes: masternodes cast some NO-FUNDING trigger votes later than before.

  ## 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: 1553e82ef0da95830bf0edada0354820da75d72645faec37663694dc790f816fe597f220abee7bad0485be4d41596d26d27f0d2bfc44a05510d71346f5a3204c
PastaPastaPasta added a commit that referenced this pull request Nov 13, 2026
038306f chore: prepare v24.0.1 release (pasta)
78ad074 Merge #8131: fix: wait for a matching superblock trigger before voting NO on the others (merge-script)
6faa5ce Merge #8097: fix: keep governance triggers across a restart on test networks (pasta)
2757e83 Merge #8130: fix: process a node's own DKG messages ahead of queued peer messages (merge-script)
cbbee0e Merge #8135: perf: keep verified DKG contributions cached through the commit phase (merge-script)
29a3cdd Merge #8099: fix(rest): don't terminate on blocks with undecodable ProTx payloads (merge-script)
275a142 Merge #8100: fix: don't abort in governance when a reorg changes masternode internal ids (merge-script)
d00c4e6 Merge #8104: fix: keep final commitments mineable when their block is rejected (merge-script)
b051d3a Merge #8080: test(qt): stop address book tests from answering the shared masternode wizard's prompt (merge-script)
ec9e944 Merge #8094: fix(net): stop busy-looping while a peer's send buffer is full (merge-script)
033dae3 Merge #8052: fix(qt): reserve the same shared masternode contribution again after a release (merge-script)
65603d5 Merge #8088: fix: fetch miniupnpc sources from miniupnp.free.fr (merge-script)

Pull request description:

  ## Issue being fixed or feature implemented
  Merges the v24.0.1 release back into develop, as the release process asks once `master` is fast-forwarded. `master`, `v24.0.x` and the signed `v24.0.1` tag all point to the same commit (137d999).

  ## What was done?
  One merge commit of `master` into develop.

  Every code change in `v24.0.0..v24.0.1` is a `cherry-pick -m1 -x` of a develop merge commit (#8088, #8052, #8094, #8080, #8104, #8100, #8099, #8135, #8130, #8097, #8131), and every source commit is already on develop. The two merge commits on `v24.0.x` (#8128, #8133) add nothing beyond their second parents.

  Git reports conflicts in `configure.ac`, `src/validation.cpp`, `src/llmq/blockprocessor.{cpp,h}` and `src/test/governance_vote_processing_tests.cpp`, because `v24.0.x` carries adapted copies of those changes. All of them resolve to develop's side, which keeps develop's code and version (`configure.ac` stays at 24.1.0, `CLIENT_VERSION_IS_RELEASE` false).

  Taken from v24.0.1:
  - `doc/release-notes.md`: the v24.0.1 release notes. The v24.0.0 notes move to `doc/release-notes/dash/release-notes-24.0.0.md`, unchanged from develop's current `doc/release-notes.md`.
  - The version string in the man pages (no option changed since v24.0.0).
  - The v24.0.1 entry in the flatpak release history.

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

  ## How Has This Been Tested?
  - `git diff develop` on this branch touches only the 9 doc and flatpak files above; `src/`, `test/` and `configure.ac` are byte-identical to develop, so nothing was rebuilt.
  - Checked that the `-x` source of every non-merge commit in `v24.0.0..master` is an ancestor of develop.

  ## Breaking Changes
  None. Develop's code is unchanged.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [x] 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: d7021c283bd5fedce891e1317f08d1389b7538755fa63964aeba43a77dba7e1752c96add49d2a18d04ad6406b004bd7a42cce1637e46816a722a8d4dda480904
@UdjinM6 UdjinM6 modified the milestones: 24, 24.0.1 Nov 13, 2026
PastaPastaPasta added a commit that referenced this pull request Nov 14, 2026
b534385 chore: prepare v24.0.2 release (pasta)
70e06ae Merge #8117: fix: races in watch-connection seed, partial sig-share batches, and ChainLock shutdown (merge-script)
d50ea34 Merge #8115: fix: free pooled secure allocations with their allocated size (merge-script)
824e58a Merge #8113: fix(wallet): schedule CoinJoin auto-denomination per wallet and guard an empty round list (merge-script)
068529f Merge #8112: fix: answer govsync only to the requesting peer and index replayed orphan votes (merge-script)
484ec63 Merge #8119: fix(stats): wrong inputValue gauge, counter data race, and null-tip crash (merge-script)
28d5711 Merge #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 (#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 #8115 describes the bug as latent.
  - **macOS crash on close (#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 #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 #8073). Together they leave one change: `appMenuBar->clear()` when shutdown starts.
  - #8120 fix(utils): accept -printcrashinfo in dash-cli and dash-tx
  - #8119 fix(stats): wrong inputValue gauge, counter data race, and null-tip crash
  - #8112 fix: answer govsync only to the requesting peer and index replayed orphan votes
  - #8113 fix(wallet): schedule CoinJoin auto-denomination per wallet and guard an empty round list
  - #8115 fix: free pooled secure allocations with their allocated size
  - #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` (#8120) is a hidden option, so no help text changed.

  ### Adaptations

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

  - **#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.
  - **#8112:** `test/functional/feature_governance.py` differs on `v24.0.x` (no pruned node from #7860). The `v24.0.x` file is kept and only #8112's additions are applied: the imports it needs, `GovernanceSyncPeer`, `check_govsync_is_peer_local()` and its call. The source change is identical.
  - **#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.
  - **#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

  - #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.
  - #8118 (RPC argument and locking fixes): changes RPC error behaviour and needs a hand-port to `rpc/masternode.cpp`.
  - #8122 (CacheMultiMap): the use-after-free can't be reached on `v24.0.x`, and the capacity part is hardening with no behaviour change.
  - #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.
  - #8092 (wording): changes two translatable strings.
  - #8101, #8102, #8098, #8095 with #8121, #8116 with #7815, #8085: unchanged from the v24.0.1 decision in #8128.
  - Features, refactors, Bitcoin Core backports, CI and test-only changes merged since the branch point.

  #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` (#8115), `coinjoin_tests/coinjoin_maintenance_runs_for_every_wallet` (#8113) and the orphan-vote case in `governance_vote_processing_tests` (#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` (#8112), `feature_stats.py` (#8119) and `interface_bitcoin_cli.py` (#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 #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
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.

4 participants