Skip to content

mempool: honor reduced-data grandfathering when relaying spends#322

Closed
kwsantiago wants to merge 1 commit into
bitcoinknots:29.x-knotsfrom
privkeyio:rdts-mempool-grandfather
Closed

mempool: honor reduced-data grandfathering when relaying spends#322
kwsantiago wants to merge 1 commit into
bitcoinknots:29.x-knotsfrom
privkeyio:rdts-mempool-grandfather

Conversation

@kwsantiago

Copy link
Copy Markdown

Reduced-data (RDTS) exempts inputs spending UTXOs created before activation from the reduced-data rules. Consensus applies this per-input in ConnectBlock (validation.cpp), but the mempool script checks do not: PolicyScriptChecks and ConsensusScriptChecks apply the reduced-data flags uniformly to every input. As a result a spend of a grandfathered UTXO is valid in a block but rejected as non-standard at relay, so Knots nodes won't propagate it.

This strips the reduced-data flags for inputs spending pre-activation UTXOs in both mempool script checks, using the per-input flags that CheckInputScripts already supports and mirroring ConnectBlock. Pre-activation behavior is unchanged (nothing is exempted, the relay filter still applies).

Test: feature_reduced_data_utxo_height.py gains a mempool case, a spend of a grandfathered OP_IF-tapscript UTXO is relayable, while a newly-created one is still rejected. (OP_IF-in-tapscript is used rather than an oversized push because the latter is masked by the unrelated 80-byte witness-stack-item standardness rule.)

@luke-jr

luke-jr commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

The current behaviour is intentional

@kwsantiago

Copy link
Copy Markdown
Author

Agreed, the policy rejection is intentional (a grandfathered spend's change output typically reuses the same script). Closing this. I'll follow up with a way for miners to manually override the rejection instead, as you suggested.

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.

2 participants