The datacarriersize
policy option is meant to limit the size of extra data allowed in transactions for relaying and mining. Since the end of 2022, however, attackers have found a way to bypass this limit by obfuscating their spam inside OP_FALSE OP_IF patterns instead of using the standardized OP_RETURN. This remains under active exploitation to a degree very harmful to Bitcoin even today.
A straightforward way to address this is to simply fix the bug (#28408), but that was (inappropriately) closed due to social attacks.
This remains an active issue that needs to be addressed.
Other solutions have been proposed, including:
- Rejecting transactions entirely if they attempt to bypass the datacarriersize limit (so-called “Ordisrespector”)
- Extending the existing policy script size limits to Tapscript. Currently, this varies for pre-segwit (1650) and segwit v0 transactions (3600), but could be unified and applied equally to all scripts. (This is included in Knots v25.1 currently)
- Identifying extra data yet removing the witness discount rather than filtering it out entirely. It’s not clear this would be effective alone, but is supported by Knots v25.1.
- Adding a second
datacarriersize
with a broader scope like in #28408 (suggested by glozow). - Moving back to a whitelist-based transaction policy, where only known/standardized scripts are accepted.
- A softfork making data storage impractical. This would likely be very “painful” to implement, review, and even adopt (it would require upgrades from all wallets). It would also be a slow process and entail risks without significant economic support upfront.
I have written code for the first 3, which I am happy to PR if there’s interest. Perhaps others can suggest and/or implement other solutions.