Conversation
6 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2316 +/- ##
=======================================
Coverage 78.84% 78.85%
=======================================
Files 31 31
Lines 6060 6062 +2
Branches 288 289 +1
=======================================
+ Hits 4778 4780 +2
Misses 1203 1203
Partials 79 79
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Collaborator
Author
|
The MSRV job is failing because of a transitive dependency Happy to open a tiny PR for the pin if that's preferred. |
Member
- Add `tx.compute_txid() == txid` check to validate that fetched raw mempool transaction hashes against their requested txid before caching in Emitter::mempool_at. Returns `Error::UnexpectedStructure` for a mismatch. - Add a regression test for the above check. - Document that the crate assumes a trusted `bitcoind` connection.
tvpeter
force-pushed
the
fix/rpc-verify-mempool-txid
branch
from
September 18, 2026 12:10
2141610 to
3fba250
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a check to validate fetched raw mempool transaction hashes against the requested txid before caching in Emitter::mempool_at, preventing cache poisoning and state corruption from unverified RPC responses. It also adds a module level documentation that
bdk_bitcoind_rpcassumes connection to a trustedbitcoindnode.This addresses only the missing txid-validation part of #2282, following discussions on #2283.
Notes to the reviewers
tx.compute_txid() != txidreturns the existingError::UnexpectedStructureon mismatch, so it is non-breaking.Changelog notice
Emitter::mempool/mempool_at: verify that a fetched transaction's computed txid matches the requested txid before caching, rejecting a mismatch withError::UnexpectedStructure.Checklists
All Submissions:
New Features:
Bugfixes: