Skip to content

backport: Merge bitcoin/bitcoin#26048, 25976, 26087 #6623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 27, 2025

Conversation

vijaydasmp
Copy link

BTC Backport

@vijaydasmp vijaydasmp force-pushed the Apr_2025_02 branch 3 times, most recently from 3fd01e8 to 068f155 Compare April 10, 2025 02:48
@vijaydasmp vijaydasmp changed the title backport: Merge bitcoin/bitcoin#26048, 25990, 25983, 25976, 26087 backport: Merge bitcoin/bitcoin#26048, 25976, 26087 Apr 10, 2025
@vijaydasmp
Copy link
Author

@vijaydasmp vijaydasmp marked this pull request as ready for review April 10, 2025 14:40
Copy link

coderabbitai bot commented Apr 10, 2025

Walkthrough

The changes span several modules. A mutex named g_httppathhandlers_mutex is introduced in the HTTP server component to protect concurrent access to the global vector of HTTP path handlers, with locking added in the request callback, registration, and unregistration functions. In the transaction mempool module, two helper structs for updating descendant and ancestor states are removed and replaced by inline lambda functions passed directly to mapTx.modify() calls, preserving existing logic. In the ZeroMQ modules, include directives are updated: <validation.h> is removed and replaced by <primitives/block.h> in one file, and by <util/system.h> in another, altering dependencies without changing public interfaces.

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 068f155 and 452f7ed.

📒 Files selected for processing (2)
  • src/httpserver.cpp (3 hunks)
  • src/txmempool.cpp (6 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/httpserver.cpp
  • src/txmempool.cpp
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: arm-linux-build / Build source
  • GitHub Check: win64-build / Build source
  • GitHub Check: linux64_ubsan-build / Build source
  • GitHub Check: linux64_sqlite-build / Build source
  • GitHub Check: linux64_fuzz-build / Build source
  • GitHub Check: linux64-build / Build source
  • GitHub Check: x86_64-pc-linux-gnu_multiprocess / Build depends
  • GitHub Check: x86_64-apple-darwin / Build depends
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@vijaydasmp
Copy link
Author

Hello @UdjinM6 @knst requesting review

UdjinM6
UdjinM6 previously approved these changes Apr 15, 2025
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

utACK 068f155

@@ -9,7 +9,7 @@
#include <netbase.h>
#include <node/blockstorage.h>
#include <streams.h>
#include <validation.h>
#include <util/system.h>
Copy link
Collaborator

Choose a reason for hiding this comment

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

seems as unrelated, do you really need util/system.h here or that's copy-paste error?

Copy link
Author

Choose a reason for hiding this comment

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

copy-paste error , fixed it

Copy link

This pull request has conflicts, please rebase.

@PastaPastaPasta
Copy link
Member

needs rebase

fanquake and others added 3 commits May 24, 2025 18:27
a10df7c build: prune BOOST_CPPFLAGS from libbitcoin_zmq (fanquake)

Pull request description:

  Rather than including `validation.h`, which ultimately means needing boost via `txmempool.h`, include `primitives/block.h` for `CBlock`, and remove `validation.h`, as we can get `cs_main` from `node/blockstorage.h`.

ACKs for top commit:
  theuni:
    Nice. ACK a10df7c.
  hebasto:
    ACK a10df7c, tested on Linux x86_64 using theuni's [patch](theuni@e131d8f) with depends.

Tree-SHA512: 792b6f9e7e7788d10333b4943609efbc798f3b187c324a0f2d5acbb2d44e3c67705dc54d698eb04c23e5af7b8b73a47f8e7974e819eac12f12ae62f28c807476
4296dde Prevent data race for `pathHandlers` (Hennadii Stepanov)

Pull request description:

  Fixes bitcoin#19341.

ACKs for top commit:
  ryanofsky:
    Code review ACK 4296dde. This should protect the vector. It also seems to make the http_request_cb callback single threaded, but that seems ok, since it is just adding work queue items not actually processing requests.

Tree-SHA512: 1c3183100bbc80d8e83543da090b8f4521921cf30d444e3e4c87102bf7a1e67ccc4dfea7e9990ac49741b2a5708f259f4eced9d4049c20ae4e531461532a6aef
…lambdas

1b348d2 [mempool] replace update_descendant_state with lambda (glozow)

Pull request description:

  These were introduced in commit bitcoin@5add7a7, when the codebase was pre-C++11. We can use lambdas now.

ACKs for top commit:
  MarcoFalke:
    review ACK 1b348d2 👮
  w0xlt:
    ACK bitcoin@1b348d2

Tree-SHA512: b664425b395e39ecf1cfc1e731200378261cf58c3985075fdc6027731a5caf995de72ea25be99b4c0dbec2e3ee6cf940e7c577638844619c66c8494ead5da459
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

utACK 452f7ed

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

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

utACK 452f7ed

@PastaPastaPasta PastaPastaPasta merged commit f7f4ef3 into dashpay:develop May 27, 2025
36 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.

5 participants