AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 21 Bitcoin

Merge bitcoin/bitcoin#36734: net: Do not add transaction reported as TX_CONSENSUS to the extrapool

Public commit record

What the developer wrote

Authored by merge-script

96/100 · Strong
Merge bitcoin/bitcoin#36734: net: Do not add transaction reported as TX_CONSENSUS to the extrapool

7bc757ce87bfb5f654a4039e453c7f1fdbd744cf net: Do not add consensus invalid transactions to extrapool (Pol Espinasa)

Pull request description:

The extrapool is only used to help reconstruct compact blocks with transactions that for some reason do not fit in our mempool, including consensus invalid transactions.

This small PR excludes the ones initially reported as `TX_CONSENSUS` from being added to the extrapool, without performing additional validation, as they are not useful to reconstruct consensus valid blocks.

Note that this path does not exclude all consensus invalid transactions. Consensus invalid transactions rejected under other categories remain unaffected and are still added to the extrapool. For example an invalid signature can be reported as `TX_NOT_STANDARD` during mempool script checks, or remain undetected if validation stops earlier for some other reason such as insufficient fees.

Note that transactions with unknown inputs (orphans) are not treated as consensus invalid as validity cannot be fully determined.

Avoiding all consensus invalid transactions to be included into the extrapool might not be worth the complexity and validation cost, potentially some extra-script verification steps would be needed.

A possible future improvement could be to manage policy-rejected transactions and transactions removed through replacement separately. But this is outside the scope of this PR, which intends to be a small and simple patch.

To be clear I don't think this is a vulnerability or a regression in the code, I don't think it can be abused by a malicious node trying to DoS us. It's just a small improvement to increase the utility of the extrapool.

ACKs for top commit:
instagibbs:
ACK https://github.com/bitcoin/bitcoin/pull/36734/commits/7bc757ce87bfb5f654a4039e453c7f1fdbd744cf
ismaelsadeeq:
ACK 7bc757ce87bfb5f654a4039e453c7f1fdbd744cf
sedited:
ACK 7bc757ce87bfb5f654a4039e453c7f1fdbd744cf
darosior:
Seems fine to do, since it's there and clearly these are pointless to add to the extrapool. (To be clear: crACK 7bc757ce87bfb5f654a4039e453c7f1fdbd744cf). But i wonder if this might set an expectation that we should be able to distinguish standardness failures from consensus ones, which we cannot do comprehensively, and certainly not in an adversarial scenario.

Tree-SHA512: 0eeb2930ccd6ad74ff715c5b0079c450364a255f87f4a3f91dbb8acc87ea139ddff35e110f587e330825c583788be81e4e2083059d7bf6f06395e5f49b624aa7
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This change stops one specific category of clearly invalid Bitcoin transactions from being kept in a small helper pool used to reconstruct compact blocks. The helper pool (extrapool) stores transactions that did not fit in the normal mempool so they can still be used if a peer later announces a block containing them. The patch says: if a transaction was rejected specifically because it breaks consensus rules, do not bother keeping it, because a valid block can never contain it. The author and reviewers explicitly state this is a minor cleanup, not a security fix or vulnerability.

Recommended action

No urgent action. Treat as a minor code-quality/efficiency improvement. If monitoring, confirm the test change matches intended behavior and that no downstream logic assumes TX_CONSENSUS transactions are always kept in the extrapool.

Security signals we found

01

Behavioral change in transaction rejection handling

02

Explicitly described by author as not a vulnerability or regression

03

Partial mitigation only: does not prevent all consensus-invalid transactions from entering extrapool

04

No validation logic change; only changes default of a boolean flag based on existing rejection reason

Risk score

Why this scored 21/100

Our methodology →
Potential impact 2/30
Exploitability 1/25
Stealth signal 1/15
Affected reach 3/15
Confidence 9/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.