Skip to content

backport: Merge bitcoin#26642, 27344, gui#726, 27465, 26207, 27468 - #7390

Merged
PastaPastaPasta merged 5 commits into
dashpay:developfrom
vijaydasmp:July_2026_5
Jul 28, 2026
Merged

backport: Merge bitcoin#26642, 27344, gui#726, 27465, 26207, 27468#7390
PastaPastaPasta merged 5 commits into
dashpay:developfrom
vijaydasmp:July_2026_5

Conversation

@vijaydasmp

Copy link
Copy Markdown

bitcoin back ports

@github-actions

github-actions Bot commented Jun 28, 2026

Copy link
Copy Markdown

⚠️ Potential Merge Conflicts Detected

This PR has potential conflicts with the following open PRs:

Please coordinate with the authors of these PRs to avoid merge conflicts.

@vijaydasmp vijaydasmp changed the title backport: Merge bitcoin#26642, 27344 backport: Merge bitcoin#26642, 27344, gui#726, 27465, 26207, 27468 Jun 28, 2026
@vijaydasmp
vijaydasmp marked this pull request as ready for review July 4, 2026 18:25
@thepastaclaw

thepastaclaw commented Jul 4, 2026

Copy link
Copy Markdown

🕓 Ready for review — 2 ahead in queue (commit 2b2fdd9)
Queue position: 3/7 · 2 reviews active
ETA: start ~20:06 UTC · complete ~20:27 UTC (median 21m across 30 recent reviews; 2 slots)
Queued 2h 3m ago · Last checked: 2026-07-27 19:40 UTC

@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@vijaydasmp, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 24 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ef4e7add-6d4b-4861-9e7b-fa58ef505542

📥 Commits

Reviewing files that changed from the base of the PR and between 4817914 and 2b2fdd9.

📒 Files selected for processing (5)
  • doc/REST-interface.md
  • src/httpserver.cpp
  • src/rest.cpp
  • src/test/httpserver_tests.cpp
  • test/functional/interface_rest.py

Walkthrough

This PR updates REST mempool contents query parameters and count parsing, adds URI parse failure handling with tests, removes legacy parsing checks from the string fuzz target, adjusts linting for that file, and adds vector preallocation changes across production and test code. It also includes minor documentation, clang-tidy, benchmark, and literal-search updates.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant rest.cpp
  participant MempoolToJSON

  Client->>rest.cpp: GET /rest/mempool/contents.json?verbose&mempool_sequence
  rest.cpp->>rest.cpp: parse/validate query params
  alt invalid or conflicting params
    rest.cpp-->>Client: HTTP_BAD_REQUEST
  else valid params
    rest.cpp->>MempoolToJSON: verbose, mempool_sequence
    MempoolToJSON-->>rest.cpp: JSON result
    rest.cpp-->>Client: JSON response
  end
Loading
sequenceDiagram
  participant Client
  participant httpserver.cpp
  participant evhttp_uri_parse

  Client->>httpserver.cpp: request with invalid URI
  httpserver.cpp->>evhttp_uri_parse: parse(uri)
  evhttp_uri_parse-->>httpserver.cpp: nullptr
  httpserver.cpp-->>Client: std::runtime_error / HTTP 400
Loading

Suggested reviewers: knst, UdjinM6, PastaPastaPasta

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly reflects that this PR backports multiple Bitcoin merges, matching the overall change set.
Description check ✅ Passed The description is related to the changeset and correctly indicates these are Bitcoin backports.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ 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.

🧹 Nitpick comments (1)
src/rest.cpp (1)

656-679: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicate boolean-parsing boilerplate for verbose/mempool_sequence.

The two query-parameter blocks (fetch → validate "true"/"false" → 400 on error) are structurally identical aside from the parameter name and default. Extracting a small helper (e.g. ParseBoolQueryParam(req, name, default) -> std::optional<bool-or-error>) would remove duplication and make future boolean query params easier to add.

♻️ Example helper sketch
+static util::Result<bool> GetBoolQueryParam(HTTPRequest* req, const std::string& name, bool default_value)
+{
+    std::string raw;
+    try {
+        raw = req->GetQueryParameter(name).value_or(default_value ? "true" : "false");
+    } catch (const std::runtime_error& e) {
+        return util::Error{Untranslated(e.what())};
+    }
+    if (raw != "true" && raw != "false") {
+        return util::Error{Untranslated(strprintf("The \"%s\" query parameter must be either \"true\" or \"false\".", name))};
+    }
+    return raw == "true";
+}
🤖 Prompt for 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.

In `@src/rest.cpp` around lines 656 - 679, The `verbose` and `mempool_sequence`
query-parameter handling in `src/rest.cpp` duplicates the same
fetch/validate/400-error flow twice. Refactor this into a small reusable helper
near the request parsing logic used by `MempoolToJSON`, so both parameters are
parsed through one path that accepts the parameter name and default, validates
only "true"/"false", and returns the boolean value or error consistently.
🤖 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.

Nitpick comments:
In `@src/rest.cpp`:
- Around line 656-679: The `verbose` and `mempool_sequence` query-parameter
handling in `src/rest.cpp` duplicates the same fetch/validate/400-error flow
twice. Refactor this into a small reusable helper near the request parsing logic
used by `MempoolToJSON`, so both parameters are parsed through one path that
accepts the parameter name and default, validates only "true"/"false", and
returns the boolean value or error consistently.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 120e3388-19ce-4e35-8597-bf0c5d9aabb8

📥 Commits

Reviewing files that changed from the base of the PR and between 4af395d and 0e96447e240451b1b814b835edc3488c7e19cd2a.

📒 Files selected for processing (31)
  • ci/dash/lint-tidy.sh
  • doc/REST-interface.md
  • doc/developer-notes.md
  • src/.clang-tidy
  • src/bench/lockedpool.cpp
  • src/bitcoin-cli.cpp
  • src/bitcoin-util.cpp
  • src/httpserver.cpp
  • src/node/interfaces.cpp
  • src/qt/trafficgraphwidget.cpp
  • src/rest.cpp
  • src/rpc/server.cpp
  • src/rpc/util.cpp
  • src/test/allocator_tests.cpp
  • src/test/fuzz/string.cpp
  • src/test/fuzz/tx_pool.cpp
  • src/test/getarg_tests.cpp
  • src/test/httpserver_tests.cpp
  • src/test/policyestimator_tests.cpp
  • src/test/scheduler_tests.cpp
  • src/test/script_p2sh_tests.cpp
  • src/test/util/net.cpp
  • src/test/util_threadnames_tests.cpp
  • src/test/validation_block_tests.cpp
  • src/util/bip32.cpp
  • src/wallet/bdb.cpp
  • src/wallet/rpc/backup.cpp
  • src/wallet/scriptpubkeyman.cpp
  • src/zmq/zmqpublishnotifier.cpp
  • test/functional/interface_rest.py
  • test/lint/lint-locale-dependence.py
💤 Files with no reviewable changes (1)
  • test/lint/lint-locale-dependence.py

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

Code Review

I verified the two parsed Codex findings against the checked-out PR. The REST docs still carry Bitcoin Core's "25.0 and up" release note even though this Dash tree is versioned as 23.1.5, so that is a real in-scope documentation issue. The GUI provenance claim does not hold: the trafficgraphwidget change is part of the listed upstream bitcoin#26642 commit, while bitcoin-core/gui#726 is a different AddressPurpose change.

💬 1 nitpick(s)

Source: reviewers: gpt-5.5 (general, dash-core-commit-history); failed lanes: opus/claude-sonnet-5 (general, dash-core-commit-history, backport-reviewer), gpt-5.5 (backport-reviewer); verifier: gpt-5.5.

Comment thread doc/REST-interface.md Outdated
Refer to the `getrawmempool` RPC help for details. Defaults to setting
`verbose=true` and `mempool_sequence=false`.

*Query parameters for `verbose` and `mempool_sequence` available in 25.0 and up.*

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💬 Nitpick: Remove Bitcoin Core release number from Dash REST docs

This note was copied from the Bitcoin Core backport and says the new verbose and mempool_sequence query parameters are available in 25.0 and up. This is Dash Core documentation, and this PR is based on a Dash tree reporting version 23.1.5 in configure.ac, so the Bitcoin Core release number is misleading for Dash users trying to determine which Dash release contains /rest/mempool/contents.json?verbose=...&mempool_sequence=.... Adapt the sentence to the Dash release that will ship this backport, or remove the version-specific sentence.

source: ['codex']

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Resolved in this update — Remove Bitcoin Core release number from Dash REST docs no longer present.

Auto-resolved by the review system based on the latest commit diff. If you believe this was closed in error, reopen the thread.

fanquake added 3 commits July 7, 2026 23:07
…related fixes

03ec5b6 clang-tidy: Exclude `performance-*` checks rather including them (Hennadii Stepanov)
2400437 clang-tidy: Add `performance-type-promotion-in-math-fn` check (Hennadii Stepanov)
7e975e6 clang-tidy: Add `performance-inefficient-vector-operation` check (Hennadii Stepanov)
516b75f clang-tidy: Add `performance-faster-string-find` check (Hennadii Stepanov)

Pull request description:

ACKs for top commit:
  martinus:
    ACK 03ec5b6
  TheCharlatan:
    re-ACK [03ec5b6](bitcoin@03ec5b6)

Tree-SHA512: 2dfa52f9131da88826f32583bfd534a56a998477db9804b7333c0e7ac0b6b36141009755c7163b9f95d0ecbf5c2cb63f8a69ce4b114bb83423faed21b50cec67
faf8dc4 fuzz: Remove legacy int parse fuzz tests (MarcoFalke)

Pull request description:

  The fuzz tests checked that the result of the new function was equal to the legacy function. (Side note: The checks were incomplete, as evident by the follow-up fix in commit b5c9bb5).

  Given that they haven't found any issues in years (beside missing the above issue, that they couldn't catch), it seems time to remove them.

  They may come in handy in the rare case that someone would want to modify `LocaleIndependentAtoi()` or `Parse*Int*()`, however that seems unlikely. Also, appropriate checks can be added then.

ACKs for top commit:
  fanquake:
    ACK faf8dc4
  dergoegge:
    ACK faf8dc4

Tree-SHA512: 4ec88b9fa8ba49a923b0604016f0f471b3c9b9e0ba6c5c3dc4e20503c6994789921e7221d9ec467a2a37a73f21a70ba51ba3370ed5ad311dee989e218290b29a
f24f4fa Update developer-notes.md (Riahiamirreza)

Pull request description:

ACKs for top commit:
  fanquake:
    ACK f24f4fa

Tree-SHA512: 10301170dff6f2f7b47a229ba99f4a4f4953c361be24996b6dc70343ad118879cd90ebb54d78cd31c852f577fb17f9726582fdd02ed5b6fd7b71566942e8b408

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

Code Review

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

Prior Reconciliation:

  • prior-1: FIXED - doc/REST-interface.md line 135 now says 23.1.5 and up, so the copied Bitcoin Core 25.0 and up wording from the prior review is gone.

Carried-Forward Prior Findings: None.

New Findings In Latest Delta: 2 blocking backport-completeness findings.

The latest push fixes the prior REST documentation nitpick. Current-head review found two in-scope blockers: the advertised gui#726 backport is absent along with its prerequisite chain, and bitcoin#26642 omits upstream hunks because prerequisite upstream content is missing.

🔴 2 blocking

🤖 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/qt/bitcoin.cpp`:
- [BLOCKING] src/qt/bitcoin.cpp:89-91: Advertised gui#726 backport is missing its prerequisite chain
  The PR title still advertises `bitcoin-core/gui#726`, but the current stack over `upstream/develop` contains only the five `bitcoin/bitcoin#...` merge commits and no gui#726 commit. Upstream gui#726 adds `#include <wallet/types.h>`, `Q_DECLARE_METATYPE(wallet::AddressPurpose)`, and `qRegisterMetaType<wallet::AddressPurpose>()` in this file; current `HEAD` has none of those lines, and `src/wallet/types.h` / `wallet::AddressPurpose` are absent. That type is introduced by upstream `bitcoin#27217`, so either the missing prerequisite chain and gui#726 need to be backported, or gui#726 must be removed from the PR title/description so the PR no longer claims to include it.

In `src/.clang-tidy`:
- [BLOCKING] src/.clang-tidy:9: bitcoin#26642 omits upstream hunks because prerequisites are missing
  The PR claims a full `bitcoin#26642` backport and enables broad `performance-*` checks, but the upstream merge changed 25 files while the Dash merge changed 22. The omitted upstream fixes are `src/bench/wallet_create_tx.cpp`, `src/test/txrequest_tests.cpp`, and `src/script/descriptor.cpp`'s `MultiADescriptor::MakeScripts`; those hunks are absent because Dash is missing the prerequisite upstream content from `bitcoin#25234`, `bitcoin#19988`, and `bitcoin#24043`. Under the backport rules, omitted hunks caused by absent prerequisites are prerequisite gaps unless the PR explicitly excludes that upstream area, and I found no such exclusion in the PR metadata or `non-backported.txt`.

Comment thread src/.clang-tidy
performance-move-const-arg,
performance-no-automatic-move,
performance-unnecessary-copy-initialization,
performance-*,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 Blocking: bitcoin#26642 omits upstream hunks because prerequisites are missing

The PR claims a full bitcoin#26642 backport and enables broad performance-* checks, but the upstream merge changed 25 files while the Dash merge changed 22. The omitted upstream fixes are src/bench/wallet_create_tx.cpp, src/test/txrequest_tests.cpp, and src/script/descriptor.cpp's MultiADescriptor::MakeScripts; those hunks are absent because Dash is missing the prerequisite upstream content from bitcoin#25234, bitcoin#19988, and bitcoin#24043. Under the backport rules, omitted hunks caused by absent prerequisites are prerequisite gaps unless the PR explicitly excludes that upstream area, and I found no such exclusion in the PR metadata or non-backported.txt.

source: ['codex']

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.

not relevant ; all performance-* relevant clang-tidy already done as prerequisites.

Any omitted changes in upstream will be highlighted by linter on CI immediately when they will be added to file.

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

utACK 4817914

Comment thread src/.clang-tidy
performance-move-const-arg,
performance-no-automatic-move,
performance-unnecessary-copy-initialization,
performance-*,

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.

not relevant ; all performance-* relevant clang-tidy already done as prerequisites.

Any omitted changes in upstream will be highlighted by linter on CI immediately when they will be added to file.

@knst
knst requested review from PastaPastaPasta and UdjinM6 July 23, 2026 07:14
@knst knst added this to the 24 milestone Jul 23, 2026

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

update doc/REST-interface.md version 23.1.5 -> 24.0

Comment thread doc/REST-interface.md Outdated
Refer to the `getrawmempool` RPC help for details. Defaults to setting
`verbose=true` and `mempool_sequence=false`.

*Query parameters for `verbose` and `mempool_sequence` available in 23.1.5 and up.*

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.

this code will be merged for 24.x branch and won't be backported to 23.x versionl

Please update here version to 24.x or 24.0

achow101 and others added 2 commits July 27, 2026 23:03
…ams for mempool/contents

1ff5d61 doc: add mempool/contents rest verbose and mempool_sequence args (Andrew Toth)
52a31dc tests: mempool/contents verbose and mempool_sequence query params tests (Andrew Toth)
a518fff rest: add verbose and mempool_sequence query params for mempool/contents (Andrew Toth)

Pull request description:

  The verbose mempool json response can get very large. This adds an option to return the non-verbose response of just the txids. It is identical to the rpc response so the diff here is minimal. This also adds the mempool_sequence parameter for rpc consistency. Verbose defaults to true to remain backwards compatible.

  It uses query parameters to be compatible with the efforts in bitcoin#25752.

ACKs for top commit:
  achow101:
    ACK 1ff5d61
  stickies-v:
    re-ACK [1ff5d61](bitcoin@1ff5d61)
  pablomartin4btc:
    tested ACK 1ff5d61.

Tree-SHA512: 1bf08a7ffde2e7db14dc746e421feedf17d84c4b3f1141e79e36feb6014811dfde80e1d8dbc476c15ff705de2d3c967b3081dcd80536d76b7edf888f1a92e9d1
11422cc bugfix: rest: avoid segfault for invalid URI (pablomartin4btc)

Pull request description:

  Minimal fix to get it promptly into 25.0 release (suggested by  [stickies-v](bitcoin#27253 (review)) and supported by [vasild](bitcoin#27253 (review))  )

  Please check bitcoin#27253 for reviewers comments and acks regarding this PR and read the commit comment message body for more details about the fix.

ACKs for top commit:
  achow101:
    ACK 11422cc
  stickies-v:
    re-ACK 11422cc

Tree-SHA512: 5af6b53fb266a12b463f960910556d5e97bc88b3c2a4f437ffa343886b38749e1eb058cf7bc64d62e82e1acf6232a186bddacd8f3b4500c87bf9e550a0153386

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

utACK 2b2fdd9

@PastaPastaPasta
PastaPastaPasta merged commit 147aa90 into dashpay:develop Jul 28, 2026
80 of 81 checks passed
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.

6 participants