Skip to content

backport: Bitcoin Core v0.26 backports (batch 3)#7433

Open
thepastaclaw wants to merge 9 commits into
dashpay:developfrom
thepastaclaw:backport-0.26-batch-3-staging
Open

backport: Bitcoin Core v0.26 backports (batch 3)#7433
thepastaclaw wants to merge 9 commits into
dashpay:developfrom
thepastaclaw:backport-0.26-batch-3-staging

Conversation

@thepastaclaw

@thepastaclaw thepastaclaw commented Jul 8, 2026

Copy link
Copy Markdown

Batch 3 of Bitcoin Core v0.26 backports.

Dash support commit:

  • build: repair dash-chainstate initialization

This keeps the experimental dash-chainstate call sites aligned with the current Dash LoadChainstate / VerifyLoadedChainstate signatures. The bitcoin#27708 backport also wires InitShutdownState() and the recorded exit status into the standalone binary so AbortNode() can report fatal exits correctly.

8 Bitcoin backports:

Intentional exclusions / Dash adaptations:

Validation on the current exact head:

  • git diff --check upstream/develop..HEAD
  • test/lint/lint-includes.py
  • test/lint/lint-whitespace.py
  • test/lint/lint-format-strings.py
  • independent exact-head Codex backport-prerequisite audit covering all recursive dependencies and Bitcoin v26 follow-ups

Fresh GitHub CI is running on the updated head.


Automated backport via PastaClaw backport pipeline. Each Bitcoin backport was individually cherry-picked and reviewer-verified before batching.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

This pull request has conflicts, please rebase.

@thepastaclaw

Copy link
Copy Markdown
Author

CI scope check for tracker #1918: the failing job is the known flaky feature_governance.py --legacy-wallet vote-count assertion, not a #7433 regression. The UBSAN job failed at test/functional/feature_governance.py:313 with gobject("count")["votes"] == 24 instead of 25, matching existing flaky-test issue #7328. I added this occurrence there: https://github.com/dashpay/dash/issues/7328#issuecomment-4919988430\n\nScope checked against upstream/develop..HEAD: #7433 does not touch feature_governance.py; its net_processing.cpp changes are the bitcoin#27625 transaction relay/mapRelay changes, not governance object/vote handling. A local rerun of feature_governance.py --legacy-wallet on the PR branch passed. Leaving the branch untouched; maintainers can rerun CI if needed.

@thepastaclaw

thepastaclaw commented Jul 9, 2026

Copy link
Copy Markdown
Author

🔍 Review in progress — actively reviewing now (commit 3dc9d29)

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Code Review

Source: reviewers claude/general=opus(failed), codex/general=gpt-5.5(completed), claude/dash-core-commit-history=opus(failed), codex/dash-core-commit-history=gpt-5.5(completed), claude/backport-reviewer=opus(failed), codex/backport-reviewer=gpt-5.5(completed); verifier=gpt-5.5.

Verified head 5f660ae. The dashd init split contains a real merge-resolution regression, and several advertised full Bitcoin PR backports omit upstream hunks because Dash is missing prerequisite Bitcoin infrastructure. The deterministic backport-prereq policy gate was applied and its restored prerequisite evidence has been merged into the findings below. No CodeRabbit inline findings were present.

5 blocking | 1 nitpick

Note: GitHub does not allow me to request changes on my own PR, so this is posted as a COMMENT while preserving the verified blocking findings.

Verified Findings

blocking: -printcrashinfo no longer exits after printing

src/bitcoind.cpp:121-123

ParseArgs() prints decoded -printcrashinfo output and returns true, but main() treats that only as successful argument parsing and then continues through ProcessInitCommands() and AppInit(). ProcessInitCommands() only handles help/version, so dashd -printcrashinfo=... can proceed into normal node startup after printing. The same split also moved help/version handling behind datadir/config/settings initialization, while the pre-backport code handled these informational commands before datadir/config validation.

blocking: Missing prerequisite: bitcoin#18044 for bitcoin#27625 wtxid coverage

test/functional/p2p_leak_tx.py:7-8

Upstream bitcoin#27625 changes p2p_leak_tx.py to import MSG_WTX and P2PTxInvStore, adds test_notfound_on_replaced_tx(), and requests both txid and wtxid inventory for the replaced transaction. The Dash cherry-pick only adds disconnect_p2ps() to the older txid-only test because Dash lacks the wtxid relay/test framework; tracing MSG_WTX points to bitcoin#18044. Since the PR advertises a full backport of bitcoin#27625, this omitted upstream test path is a missing prerequisite that needs either the prerequisite backport or an explicit documented exclusion.

blocking: Missing prerequisite: bitcoin#27150 common::InitConfig for bitcoin#27708

src/bitcoind.cpp:126-142

In upstream bitcoin#27708, ParseArgs delegates datadir/config/settings setup to common::InitConfig(args). Dash substitutes the older local sequence (CheckDataDirOption(), ReadConfigFiles(), SelectParams(), InitSettings()) because common::InitConfig is absent; that helper and supporting common/init split were introduced by bitcoin#27150. For a full advertised backport, this is a missing prerequisite rather than a faithful application of the upstream starting state.

blocking: Missing prerequisite: bitcoin#19988 txrequest.cpp hunk for bitcoin#27783

test/lint/lint-includes.py:26-41

Upstream bitcoin#27783 adds explicit Boost public headers in src/txrequest.cpp, including boost/tuple/tuple.hpp, and updates the lint allowlist accordingly. Dash has no src/txrequest.cpp, so the cherry-pick omits that upstream hunk and does not add the matching lint entry. The missing module comes from bitcoin#19988, making this a missing prerequisite for a full backport of bitcoin#27783 unless the exclusion is documented.

blocking: Missing prerequisite: bitcoin#27556/bitcoin#26715 wallet test hunks for bitcoin#27783

src/wallet/test/walletdb_tests.cpp:30-30

Upstream bitcoin#27783 changes BOOST_ASSERT uses in walletdb_read_write_deadlock and wallet_load_ckey. In this Dash tree, walletdb_tests.cpp ends after walletdb_readkeyvalue, and src/wallet/test/walletload_tests.cpp is absent, so both upstream hunks were omitted. Bitcoin history shows walletdb_read_write_deadlock was introduced by bitcoin#27556, while the wallet_load_ckey shape touched by bitcoin#27783 depends on wallet-test work from bitcoin#26715. These are test-only omissions, but they are missing prerequisites under the full-backport completeness rule unless explicitly excluded.

nitpick: Remove transient recovery note from commit message

<commit:6be2980>:1-1

Commit 6be2980 includes an operational recovery note about a Codex worker failure, parent-session staging, and a stray Qt conflict artifact. That is permanent git log noise and does not help future backport archaeology. Keep the durable backport provenance and validation, but drop the internal recovery details before merge.

@thepastaclaw thepastaclaw marked this pull request as ready for review July 10, 2026 00:03
@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown

Potential PR merge conflicts

This is advisory only. It does not block CI, but it marks PRs that will likely need a rebase depending on merge order.

If this PR merges first

These open PRs will likely need a rebase:

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ddf030f4c5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/bitcoind.cpp Outdated
Comment thread src/bitcoind.cpp Outdated
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The pull request centralizes configuration initialization, reorganizes daemon and GUI startup sequencing, propagates atomic exit status through node lifecycle and shutdown paths, and changes fatal failures to use AbortNode. Transaction lookup now uses transactions from the most recently validated PoW block instead of the relay cache. Chainstate, CI, fuzzing, wallet, translation, build, and functional test code are updated.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant MAIN_FUNCTION
  participant ParseArgs
  participant AppInit
  participant NodeContext
  participant Shutdown
  MAIN_FUNCTION->>ParseArgs: parse arguments and configuration
  ParseArgs-->>MAIN_FUNCTION: success or failure
  MAIN_FUNCTION->>AppInit: initialize NodeContext
  AppInit->>NodeContext: register and update exit_status
  MAIN_FUNCTION->>Shutdown: Interrupt and Shutdown
  Shutdown-->>MAIN_FUNCTION: return exit_status
Loading

Possibly related PRs

  • dashpay/dash#7234: Both changes modify the src/bitcoin-chainstate.cpp entrypoint and chainstate startup flow.
  • dashpay/dash#7451: Both changes modify the chainstate load and node::VerifyLoadedChainstate(...) call flow.

Suggested reviewers: knst, pastapastapasta, kwvg

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 19.70% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the batch backport focus and matches the main changeset.
Description check ✅ Passed The description is directly related to the backported Dash/Bitcoin Core changes and their adaptations.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/shutdown.cpp`:
- Around line 25-38: Initialize the shutdown state for standalone chainstate
execution before any validation or blockstorage work can call AbortNode. Locate
the chainstate entry point in bitcoin-chainstate.cpp and invoke
InitShutdownState with the appropriate exit-status storage during startup,
ensuring g_exit_status is set before failures are handled; preserve the existing
initialization path in init.cpp.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: faecc176-cea3-4d9f-ae2e-e77d77a67d34

📥 Commits

Reviewing files that changed from the base of the PR and between 2bbf4a4 and ddf030f.

📒 Files selected for processing (21)
  • ci/test/00_setup_env_native_asan.sh
  • ci/test/00_setup_env_native_fuzz.sh
  • src/bitcoin-chainstate.cpp
  • src/bitcoind.cpp
  • src/index/base.cpp
  • src/init.cpp
  • src/init.h
  • src/interfaces/node.h
  • src/net_processing.cpp
  • src/node/blockstorage.cpp
  • src/node/context.h
  • src/node/interfaces.cpp
  • src/qt/bitcoin.cpp
  • src/qt/bitcoin.h
  • src/shutdown.cpp
  • src/shutdown.h
  • src/test/fuzz/utxo_total_supply.cpp
  • src/wallet/test/wallet_tests.cpp
  • test/functional/feature_abortnode.py
  • test/functional/p2p_leak_tx.py
  • test/functional/test_framework/test_node.py
💤 Files with no reviewable changes (1)
  • src/qt/bitcoin.h

Comment thread src/shutdown.cpp

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Code Review

Source: reviewers claude/general=opus(completed), codex/general=gpt-5.5(failed: ACP refresh token revoked), claude/dash-core-commit-history=opus(completed), codex/dash-core-commit-history=gpt-5.5(failed: ACP refresh token revoked), claude/backport-reviewer=opus(completed), codex/backport-reviewer=gpt-5.5(failed: ACP refresh token revoked); verifier=opus.

Full cumulative verification at head ddf030f. Delta from prior 5f660ae is one empty CI-retrigger commit with zero tree changes, so all prior verified blocking findings still apply. Confirmed the -printcrashinfo merge-resolution regression at src/bitcoind.cpp:121-124/286-288 (ParseArgs returns true, main() only bypasses AppInit for ParseArgs failure or ProcessInitCommands success, so -printcrashinfo falls through to normal node startup). Confirmed four missing upstream prerequisites via direct filesystem/grep checks: no src/txrequest.cpp (bitcoin#19988), no src/wallet/test/walletload_tests.cpp and no walletdb_read_write_deadlock (bitcoin#27556/bitcoin#26715), no common::InitConfig (bitcoin#27150), and p2p_leak_tx.py lacks wtxid coverage (bitcoin#18044). Two style findings on commit hygiene (empty CI-retrigger commit at HEAD, transient recovery note in 6be2980) also verified. Codex lanes failed to produce JSON due to ACP refresh token revocation; no attribution possible. CodeRabbit had no findings.

Commit-history nit: 6be29805584 still embeds transient Codex worker/recovery diagnostics in its permanent commit message; retain durable provenance/validation and remove that operational note before merge.

🔴 5 blocking | 🟡 1 suggestion(s) | 💬 1 nitpick(s)

5 additional finding(s) omitted (not in diff).

🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.

In `src/bitcoind.cpp`:
- [BLOCKING] src/bitcoind.cpp:121-123: -printcrashinfo no longer exits after printing
  `ParseArgs()` prints decoded `-printcrashinfo` output and returns `true` (lines 121-124), but `main()` at lines 286-288 only bypasses `AppInit` when `ParseArgs` returns false or when `ProcessInitCommands` returns true. `ProcessInitCommands` (lines 153-172) only handles `-help`/`-version`, so `dashd -printcrashinfo=...` proceeds through `AppInit(node)` into full node startup after printing the decoded crash info. Before the bitcoin#27708 split, the `-printcrashinfo` branch lived inside `AppInit` and returned `true`, and `main` skipped `WaitForShutdown` on that path; the split moved the branch to `ParseArgs` without preserving the exit semantics. The Dash-only clause needs its own early-exit path — either return a sentinel that `main` treats as EXIT_SUCCESS, or handle `-printcrashinfo` in `ProcessInitCommands` alongside help/version. The same split also moves help/version behind datadir/config/settings initialization; the pre-backport code handled those informational commands before datadir validation, which is a secondary behavioral regression worth revisiting as part of the fix.
- [BLOCKING] src/bitcoind.cpp:126-142: Missing prerequisite: bitcoin#27150 common::InitConfig for bitcoin#27708
  Upstream bitcoin#27708 delegates datadir/config/settings setup to `common::InitConfig(args)`, which centralizes error handling and exit semantics. Dash substitutes the older local sequence — `CheckDataDirOption()`, `ReadConfigFiles()`, `SelectParams()`, `InitSettings()` — because `common::InitConfig` is absent (grep for `common::InitConfig` returns no hits). The helper and supporting `common/init.{h,cpp}` split were introduced by bitcoin#27150. For a full advertised backport of bitcoin#27708, this is a missing prerequisite rather than a faithful application of the upstream starting state. Either backport bitcoin#27150 (and the short chain leading to it) so `ParseArgs` can use `common::InitConfig`, or document the omission and its scope in the commit/PR body.

In `test/functional/p2p_leak_tx.py`:
- [BLOCKING] test/functional/p2p_leak_tx.py:7-8: Missing prerequisite: bitcoin#18044 for bitcoin#27625 wtxid coverage
  Upstream bitcoin#27625 modifies `p2p_leak_tx.py` to import `MSG_WTX` and `P2PTxInvStore`, adds `test_notfound_on_replaced_tx()`, and requests both txid and wtxid inventory for the replaced transaction. The Dash cherry-pick only adds `self.nodes[0].disconnect_p2ps()` to the older txid-only test and omits the wtxid coverage entirely because Dash's node lacks wtxid relay (bitcoin#18044). Even though `MSG_WTX` and `P2PTxInvStore` exist in Dash's `test_framework/p2p.py`, the omitted test path exercises wtxid `notfound` delivery from the node, which requires the wtxid-relay backport. Since the PR advertises a full backport of bitcoin#27625, this is a missing prerequisite: either backport bitcoin#18044's wtxid-relay path or document the intentional exclusion in the commit/PR body.

In `test/lint/lint-includes.py`:
- [BLOCKING] test/lint/lint-includes.py:26-41: Missing prerequisite: bitcoin#19988 txrequest.cpp hunk for bitcoin#27783
  Upstream bitcoin#27783 adds explicit public Boost headers (including `boost/tuple/tuple.hpp`) in `src/txrequest.cpp` and updates the `lint-includes.py` `EXPECTED_BOOST_INCLUDES` allowlist accordingly. Dash has no `src/txrequest.cpp` (confirmed absent by `ls`), so the cherry-pick omits both the source hunk and the matching lint-allowlist entry. The missing module was introduced by bitcoin#19988 (Overhaul transaction request logic). For a full advertised backport of bitcoin#27783 this is a missing prerequisite: either backport bitcoin#19988's txrequest overhaul, or explicitly note in the commit/PR body that the txrequest.cpp hunk is intentionally excluded because the module does not exist in Dash.

In `src/wallet/test/walletdb_tests.cpp`:
- [BLOCKING] src/wallet/test/walletdb_tests.cpp:30: Missing prerequisite: bitcoin#27556/#26715 wallet test hunks for bitcoin#27783
  Upstream bitcoin#27783 changes `BOOST_ASSERT` uses in `walletdb_read_write_deadlock` and `wallet_load_ckey`. In this Dash tree, `walletdb_tests.cpp` lacks `walletdb_read_write_deadlock` entirely, and `src/wallet/test/walletload_tests.cpp` is absent (confirmed by `ls`), so both upstream hunks were omitted. Bitcoin history shows `walletdb_read_write_deadlock` was introduced by bitcoin#27556, and the `wallet_load_ckey` shape touched by #27783 depends on the MockableDatabase wallet-test work from bitcoin#26715. Under the full-backport completeness rule these are missing prerequisites: either backport the wallet-test prerequisites, or document that these `BOOST_ASSERT` hunks are intentionally excluded because the receiving tests do not yet exist in Dash.

In `<commit:ddf030f>`:
- [SUGGESTION] <commit:ddf030f>:1: Drop empty CI-retrigger commit before merge
  Commit `ddf030f4c5e` ("ci: retrigger linux64_ubsan-test after feature_governance flake") introduces zero tree changes — `git show --stat` confirms no files touched. Because Dash Core merges without squashing, this empty commit will land in permanent `develop` history where it becomes noise for `git log`, `git bisect`, and `git blame`. CI reruns should be triggered from the CI UI or a comment trigger rather than by pushing an empty commit. Please drop this commit before merge so the PR tip is the actual backport `5f660ae6`. If a marker is needed for reviewer visibility, use a PR comment instead.

Note: GitHub does not allow me to submit REQUEST_CHANGES on my own PR, so this is posted as a COMMENT while preserving the verified blocking findings.

@thepastaclaw thepastaclaw force-pushed the backport-0.26-batch-3-staging branch from ddf030f to a1f31c5 Compare July 10, 2026 01:09

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a1f31c56cc

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/bitcoind.cpp
node.exit_status = EXIT_FAILURE;
}
Interrupt(node);
Shutdown(node);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid shutdown after pre-main init failures

When AppInit() returns false before AppInitMain() runs—for example AppInitLockDataDirectory() fails because another dashd already owns the datadir—this unconditional Shutdown() now runs anyway. Shutdown() removes GetPidFile(*node.args) in src/init.cpp, but in that lock-failure path this process never created its own pid file because CreatePidFile() is inside AppInitMain(), so a failed second start can delete the running daemon's dashd.pid; the old early-return path did not call Shutdown() for these pre-main failures.

Useful? React with 👍 / 👎.

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Code Review

Source: reviewers claude/general=opus(completed), codex/general=gpt-5.5(failed), claude/dash-core-commit-history=opus(completed), codex/dash-core-commit-history=gpt-5.5(failed), claude/backport-reviewer=opus(completed), codex/backport-reviewer=gpt-5.5(failed); verifier=opus.

Cumulative review at head a1f31c5. Carried-forward prior findings: none — all 7 prior findings from ddf030f are reconciled (2 FIXED for the -printcrashinfo relocation and commit-hygiene cleanup, 4 INTENTIONALLY DEFERRED for missing prerequisites now explicitly documented in both PR description and per-commit bodies, 1 FIXED for the dropped empty CI-retrigger commit). New findings in latest delta: none — the ddf030f..a1f31c5 delta only relocates the -printcrashinfo handler from ParseArgs() into ProcessInitCommands() so main() returns EXIT_SUCCESS before AppInit(), and wires InitShutdownState() into the standalone dash-chainstate binary so AbortNode()'s Assert(g_exit_status) has a valid target. Both changes were verified against the checked-out worktree (src/bitcoind.cpp:150-153,288 and src/bitcoin-chainstate.cpp:62-69,308). CodeRabbit has no actionable inline findings.

Prior finding reconciliation

  1. FIXED — -printcrashinfo no longer exits after printing: src/bitcoind.cpp:150-153 relocates the -printcrashinfo handler into ProcessInitCommands(); src/bitcoind.cpp:288 short-circuits main() with return EXIT_SUCCESS when ProcessInitCommands() returns true.
  2. INTENTIONALLY DEFERRED — Missing prerequisite: bitcoin#18044 for bitcoin#27625 wtxid coverage: Both the PR description under Intentional exclusions / Dash adaptations and commit 00d6eee's body explicitly document that upstream test_notfound_on_replaced_tx() and the MSG_WTX/P2PTxInvStore imports are omitted because Dash disables RBF and has not backported wtxid relay (bitcoin#18044).
  3. INTENTIONALLY DEFERRED — Missing prerequisite: bitcoin#27150 common::InitConfig for bitcoin#27708: PR description and commit 8d9ba7d body both explicitly state that common::InitConfig() comes from bitcoin#27150, which is not backported, so ParseArgs() (src/bitcoind.cpp:112-146) keeps Dash's existing CheckDataDirOption()/ReadConfigFiles()/SelectParams()/InitSettings() sequence with unchanged semantics.
  4. INTENTIONALLY DEFERRED — Missing prerequisite: bitcoin#19988 txrequest.cpp hunk for bitcoin#27783: Commit a1f31c5 body explicitly documents omission of the src/txrequest.cpp hunk and the boost/tuple/tuple.hpp lint-includes.py allowlist entry because Dash has no txrequest module (bitcoin#19988 not backported) and adding the allowlist entry with no user would fail lint-includes.py's unused-dependency check.
  5. INTENTIONALLY DEFERRED — Missing prerequisite: bitcoin#27556/bitcoin#26715 wallet test hunks for bitcoin#27783: Commit a1f31c5 body explicitly excludes the walletdb_read_write_deadlock and wallet_load_ckey hunks because the receiving tests do not exist in Dash (bitcoin#27556 and the bitcoin#26715 wallet-test rework not backported); the coinselector_tests.cpp BOOST_ASSERT line touched upstream also does not exist in Dash.
  6. FIXED — Drop empty CI-retrigger commit before merge: git log develop..a1f31c56 shows the branch was rebuilt with new SHAs (e9f53a6, 7d29963, 00d6eee, 8d9ba7d, 58cf2cd, 7370b87, a1f31c5).
  7. FIXED — Remove transient recovery note from commit message: The prior 6be2980 commit was replaced during rebase by 8d9ba7d.

Posting note: review_poster could not post inline/top-level review cleanly; posting exact-SHA body-only review from the same verifier output.

Verified Findings

No active findings.

@github-actions

Copy link
Copy Markdown

This pull request has conflicts, please rebase.

thepastaclaw and others added 3 commits July 13, 2026 22:31
Drop the now-unused CGovernanceManager stand-in and align the
LoadChainstate/VerifyLoadedChainstate call sites with their current
signatures (mn_sync in, is_addrindex/is_spentindex/is_timeindex out) so
the dash-chainstate binary compiles again after the batch 3 backports.
Backport of bitcoin#27625

Automated backport — cherry-pick of `fbe48f97df`.

Excluded upstream hunks (intentional):
- test/functional/p2p_leak_tx.py: upstream's new
  test_notfound_on_replaced_tx() and the MSG_WTX/P2PTxInvStore imports
  are omitted. The test replaces a mempool transaction and then requests
  it by txid and wtxid; Dash supports neither mempool replacement (RBF
  is disabled) nor wtxid relay (bitcoin#18044 is not backported), so the
  scenario cannot be exercised. The disconnect_p2ps() hardening for the
  existing txid-only test is kept.
@thepastaclaw thepastaclaw force-pushed the backport-0.26-batch-3-staging branch from a1f31c5 to f8000e2 Compare July 14, 2026 04:21

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f8000e2d7f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/test/fuzz/utxo_total_supply.cpp Outdated
Comment on lines +150 to +152
if (duplicate_coinbase_height == ActiveHeight()) {
// we mined the duplicate coinbase
assert(current_block->vtx.at(0)->vin.at(0).scriptSig == duplicate_coinbase_script);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Gate duplicate-coinbase assertion on accepted blocks

When the fuzzer has already reached duplicate_coinbase_height, any later invalid block leaves ActiveHeight() unchanged at that same value, so this moved assertion checks the next block template's coinbase script against the earlier duplicate height and can abort even though no duplicate coinbase was just mined. This creates false fuzz crashes for inputs that make the block after the duplicate height invalid; keep the check under was_valid or compare against the attempted block height instead.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed in d0e40990488 by backporting the upstream bitcoin#27810 follow-up immediately after bitcoin#27780. The duplicate-coinbase assertion is now evaluated only when was_valid, matching upstream. The rewritten stack also adds the independently reviewed bitcoin#27170 prerequisite for bitcoin#27150; exact-head prerequisite review passed at 3dc9d29f285.

…ystem.cpp

Backport of bitcoin#27170 (merge `8303f11e10`).

Squashes the two upstream topic commits in order:
- `b20b34f5b3` refactor: use ArgsManager::GetConfigFilePath()
- `9a9d5da11f` refactor: Stop using gArgs global in system.cpp

Dash adaptation:
- Pass the current ArgsManager to Dash’s existing empty dash.conf creation path after changing GetConfigFile() to require an explicit ArgsManager.

No upstream hunks are excluded; upstream bitcoin#27170 added no tests.
Backport of bitcoin#27150 (merge `fc037c8c83`).

Squashes the four upstream topic commits in order:
- `c361df90b9` scripted-diff: Remove double newlines after some init errors
- `3db2874bd7` Extend bilingual_str support for tinyformat
- `d172b5c671` Add InitError(error, details) overload
- `802cc1ef53` Deduplicate bitcoind and bitcoin-qt init code

Dash adaptations:
- Keep Dash CoreContext construction and -printcrashinfo handling in AppInit,
  and retain dashd/dash-qt/dash.conf naming in user-facing text.
- Apply the InitError fatal-index change to Dash current
  BaseIndex::FatalErrorImpl implementation.
- Qualify nested tfm::format() calls because Dash builds as C++20, where
  upstream unqualified calls collide with std::format through ADL. This was
  fixed later upstream by `fa8ef7d138`.
- Register src/common/init.cpp with IWYU in ci/dash/lint-tidy.sh;
  upstream ci/test/06_script_b.sh was removed when Dash migrated CI.

No source or test hunks are excluded. The AbortError-to-InitError shutdown
change is retained here with its upstream owner, d172b5c.
… errors

Backport of bitcoin#27708

Automated backport — cherry-pick of `c92fd63886`.

Prerequisite:
- bitcoin#27150 is backported in the immediately preceding commit,
  so ParseArgs() now uses common::InitConfig() exactly as upstream intends.
  The AbortError-to-InitError conversion remains in that prerequisite with
  its upstream owner, d172b5c.

Dash adaptations:
- Move Dash-only -printcrashinfo handling into ProcessInitCommands() so it
  remains an early successful-return command alongside -help and -version.
- Retain Dash CoreContext context{node}; in AppInit() for Dash subsystem
  lifetime management after upstream splits argument handling from startup.
- Adapt the fatal-index change to Dash current BaseIndex::FatalErrorImpl().
- Keep Dash interfaces::Node and AppInitParameterInteraction API shapes while
  threading the new exit status through them.
- Initialize shutdown state and return its status in the Dash-specific
  bitcoin-chainstate executable, which can also reach AbortNode().

Excluded upstream hunk (intentional):
- src/qt/bitcoin.cpp does not add node/context.h because Dash reads the status
  through interfaces::Node::getExitStatus(), so the header would be unused.
Backport of bitcoin#27780

Automated backport — cherry-pick of `2a786ea349`.
Backport of bitcoin#27810

Automated backport — cherry-pick of `a1db4476bd`.
Backport of bitcoin#27783

Automated backport — cherry-pick of `361a0c00b3`.

Excluded upstream hunks (intentional):
- src/txrequest.cpp and the matching boost/tuple/tuple.hpp entry in
  test/lint/lint-includes.py: Dash has no txrequest module
  (bitcoin#19988 is not backported), and allowlisting the header with
  no remaining user would itself fail the lint's unused-dependency
  check.
- src/node/miner.h, src/txmempool.h and the remaining lint-includes.py
  allowlist entries: the multi_index identity/indexed_by/tag includes
  and their allowlist entries are already present in Dash.
- src/wallet/test/walletdb_tests.cpp (walletdb_read_write_deadlock) and
  src/wallet/test/walletload_tests.cpp (wallet_load_ckey): the
  receiving tests do not exist in Dash (bitcoin#27556 and the
  bitcoin#26715 wallet-test rework are not backported).
- src/wallet/test/coinselector_tests.cpp: the BOOST_ASSERT line touched
  upstream does not exist in Dash's adapted max-weight test.
@thepastaclaw thepastaclaw force-pushed the backport-0.26-batch-3-staging branch from f8000e2 to 3dc9d29 Compare July 14, 2026 05:22
@thepastaclaw

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@thepastaclaw

Copy link
Copy Markdown
Author

The current macOS failure is CI infrastructure, not a #7433 source failure. The x86_64-apple-darwin / Check cache job could not find SDK key depends-sdks-3b862087...; it downloaded and extracted the SDK, but its post-step could not save it because the pull_request_target token has no writable cache scope. Since the ordinary depends cache was already present, the depends-build job was skipped, and mac-build / Build source then failed immediately on the missing exact SDK cache key before compilation.

depends/hosts/darwin.mk is identical at this PR head, the CI base SHA, and current develop, so the backport did not invalidate the SDK cache. The branch is intentionally unchanged; this needs either a trusted event to seed the cache or a CI same-run SDK artifact handoff. Detailed trace: https://github.com/thepastaclaw/tracker/issues/1918#issuecomment-4965748631

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
✅ Action performed

Reviews resumed.

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.

1 participant