Subject: Re: [bitcoindev] Relax OP_RETURN standardness restrictions

From: Chris Guida <[email-masked]>
Date: Tue, 29 Apr 2025 23:39:01 -0600

Good morning devs!

It was suggested in two different PRs ([0] and [1]) that the conceptual
discussion take place in this thread, so I am submitting my comments here.

We are under a spam attack. This is not the first time this has happened.
Bitcoin has endured several spam attacks in the past. They subside when
bitcoin core devs show that they are serious about countering the attacks.
This excellent summary from BitMEX[2] illustrates how altcoin-Ponzi
spammers simply went elsewhere when the core maintainers at the time
demonstrated a willingness to filter every new abusive transaction format
until the spammers were exhausted.

We should not give up this time around! We should send the spammers back to
Ethereum where they belong. This battle is worth fighting, in order to
preserve bitcoin's status as the best medium of exchange and store of value
the world has ever seen.

As history shows, the battle is winnable. Filter authors can keep writing
new filters long after the VCs funding these abusive ventures have become
insolvent.

Unfortunately, the bitcoin core project made a misstep when it rejected
this PR[3] from Luke-jr to filter transactions using the op_false op_if
envelope to exploit the witness discount. This signaled to the community
that bitcoin core was no longer willing to merge filters for new kinds of
spam, even if filter authors were perfectly willing to write them. This, of
course, also had the effect of signaling to the altcoin Ponzi creators that
it was open season to spam the blockchain.

What followed next was the most massive wave of spam we've ever seen.
Onboarding of new users to bitcoin ground to a halt as fees soared. Users
in poor countries were, of course, impacted the most[4].

I've seen lots of comments from anti-filter activists that "we shouldn't
filter transaction types that have significant economic demand", but what
these always fail to point out is that bitcoin core itself created this
demand, by its ambivalence toward countering the spam. If Luke's PR had
been merged, that would have been the end of it. Perhaps there would have
been one or two copycats trying to get around the filters, but swift action
by bitcoin core would have nipped those in the bud. At that point, funding
for altcoin Ponzis built on bitcoin would have shriveled up or moved to
other chains, just as it did in 2014.

Instead, we saw a sudden rush of new Ponzi schemes, all promising something
new and innovative, because Ponzis on bitcoin, which were once treated with
hostility, were now tacitly approved. Bitcoin core continued to double down
on its "no more filters" policy[5], and the feeding frenzy of Ponzis
reached a fever pitch.

Another trope from the anti-filter crowd I keep seeing is that spam
protection is a "cat-and-mouse" game. Well, the cat won in 2014 and the
mouse didn't come back until 2023. The cat has seemingly forgotten how to
chase away the mouse, even though neither it nor the mouse has changed. The
spammers have a bit more of a headstart than they did in 2014, perhaps, but
that doesn't mean filter authors couldn't absolutely crush the entire
"Ponzis on top of bitcoin spam" industry if the core maintainers would
simply allow the filter authors to do their job. This isn't a matter of
lack of will or manpower. There are plenty of devs willing to write filters
for new spam formats as soon as they are announced, myself included. The
problem is that core has signaled that, even if the filters are written, it
will reject them, and that valuable labor will be lost. This is
understandably demoralizing and has a chilling effect on devs who would
otherwise be doing this important work.

We don't need to make sure no spam ever reaches the blockchain. That is, of
course, impossible. All we need to do is show active hostility to the
spammers, and the worst schemes (the ones that rely on a consistent
transaction format) will be impossible to maintain, and will therefore lose
funding. Of course there will be hobbyist spammers here and there, but
that's much less damaging.

We are at a crossroads. Because of bitcoin core's hostility toward filter
devs, the "economic demand" that everyone cites as the reason to allow more
spam has steadily grown larger and is now crushingly huge. The firehose of
spam that will be unleashed if we continue to appease the Ponzi spammers
will eventually make bitcoin unusable as a trustless medium of exchange,
and being a great medium of exchange is, of course, the main reason bitcoin
has any value at all.

If we boldly rise to the challenge and fight back against the Ponzi
spammers, then bitcoin has a bright future, perhaps becoming the dominant
global medium of exchange and even the reserve asset. The Lightning Network
is awe-inspiring and game-changing, and the devs who built it and finally
made it a great UX are heroes. I can't wait to see where it takes us in the
coming years!

However, if we instead cower in the corner and let fiat VCs trick us into
thinking their spammy Ponzis are scary and not just silly mice we can chase
away, then bitcoin's future is not so bright. We need only look at Ethereum
to see what's waiting for us down that road.

It's up to us, and I'm confident that we will prevail, because history
shows that bitcoiners are resourceful and never give up.

Sincerely,

--Chris Guida

[0]: https://github.com/bitcoin/bitcoin/pull/32359
[1]: https://github.com/bitcoin/bitcoin/pull/32381
[2]:
https://blog.bitmex.com/dapps-or-only-bitcoin-transactions-the-2014-debate/
[3]: https://github.com/bitcoin/bitcoin/pull/28408
[4]: https://x.com/AnitaPosch/status/1732722398359638414
[5]: https://github.com/bitcoin/bitcoin/pull/28217

On Tue, Apr 29, 2025 at 1:24 PM Martin Habovštiak <
[email-masked]> wrote:

> Hi,
>
> I have a little demo for you.
>
> Firstly, I think the kind of illegal content most people have in mind are
> images. So let's start with a question: if one takes an illegal picture and
> sets every 173th pixel to a red dot will it become legal?
>
> If you have trouble imagining it, here's an example for you:
> https://imgur.com/a/J7RTPL7
>
> If you believe it would, we can end this conversation and my point is moot.
> However, I think you'll agree the image would still be illegal.
>
> Next, I think it's obvious that an attacker seeking to harm bitcoin users
> would choose an any image format he likes. So for this example I'm picking
> BMP.
>
> If you encode the image above to BMP, which is uncompressed, the red
> pixels turn into bytes 253, 7, 2 which happen to encode witness element
> length 519. The header size is 54 bytes, so stick the byte 54 at the front
> and you have a valid serialization of a sequence of witness elements.
>
> Do you see what this means?
>
>
> ...
>
>
> Yes, it's too late to fix this. It's already trivially possible to make
> your node store a sequence of bytes that is considered illegal. If you're
> worried about it you have to resync the chain right now.
>
> Disclaimer: the numbers above might be a bit off, I did most computation
> in my head. Still, the point stands even if the pixels have a bit different
> spacing/color.
>
> Same thing with malware distribution, except you can easily skip the
> invalid bytes using jump instructions or other techniques, so that might be
> even worse.
>
> Happy syncing!
>
> Martin
>
>
> Dňa ut 29. 4. 2025, 11:15 Jason Hughes (wk057) <[email-masked]>
> napísal(a):
>
>> I was asked to take my comments to the mailing list, so here we go.
>>
>> First, see my comments on Github PR #32359:
>> - https://github.com/bitcoin/bitcoin/pull/32359#issuecomment-2835467933
>> - https://github.com/bitcoin/bitcoin/pull/32359#issuecomment-2835638919
>> - https://github.com/bitcoin/bitcoin/pull/32359#issuecomment-2834012756
>>
>> Next, I'll once again point out relevant history for those just tuning in:
>>
>> OP_RETURN was only made standard in a limited size to encourage less
>> harmful data carrying in Bitcoin. Attackers were using harmful methods of
>> data carrying in unspendable UTXOs, and so a way to inject a small amount
>> of data was TOLERABLE over this harmful UTXO bloat that.  That mostly
>> worked, and such practices were quickly minimized. This remained the case
>> for about a decade without significant issue. Bitcoin is not file storage,
>> and this was known to developers at that time.  Sadly, eventually an
>> exploit called 'inscriptions' happened which blew the cap off of the size
>> limitation of arbitrary data storage... and to make matters worse,
>> developers refused to patch the exploit or otherwise enforce the decade old
>> limit on arbitrary data size. If that wasn't bad enough, exploiters get a
>> 75% discount on transaction fees.
>>
>> With that history in mind, removing limits on OP_RETURN standardness size
>> is pointless. Relaxing OP_RETURN size limits without dealing with the
>> inscriptions exploit means no one will use this for anything besides
>> attacking the network with the worst possible data. There's little to no
>> incentive to use OP_RETURN for data storage when using the 'inscriptions'
>> exploit costs 4x less in transactions. What's the point of having a
>> "standard" way to store arbitrary data if the exploit method is 4x cheaper?
>> And the nonstandard version of the exploit allows 4x the data?
>>
>> Further, the inscriptions exploit currently requires chunking the data
>> between PUSH opcodes, meaning an on-disk analysis doesn't actually directly
>> reveal the underlying data the injector intended.  I can still run
>> something like "photorec" on my system and not have to sift through
>> thousands of 'inscriptions'. Removing the size limit on OP_RETURN breaks
>> this happenstance obfuscation that has saved us to-date. After this change,
>> when data is recovered from a full node system, whatever some anonymous
>> person decided to stuff into an OP_RETURN will be serialized in plaintext
>> directly on disk. For the low price of a few sats per byte, an attacker can
>> now directly poison the storage of every full node runner.
>>
>> If you can't imagine the harm this will do to the ecosystem, let me paint
>> some pictures for you:
>>
>> First, there's the obvious. Everyone running a node will now be
>> guaranteed to "posses and distribute" content that is likely illegal in
>> their jurisdiction. Not only are you storing this as a full node runner,
>> you're serving it to others. Hooray. /s
>>
>> Next, there's less obvious abuses. For example, let's say I want to
>> distribute malware. Well, might as well just store it in an OP_RETURN.
>> Then, any time I compromise a system with a Bitcoin node I know my malware
>> is directly on their system in a mostly predetermined spot already and I
>> don't even need to retrieve it from elsewhere! And, even better, my malware
>> can use the Bitcoin P2P network itself to distribute itself. Just find a
>> willing full node, grab the block it's in. Thanks for the boost, node
>> runners!
>>
>> Worse, in order to actually participate in the network, everyone MUST
>> download all of this data from others (who must host it for you), process
>> it, and generally must host it for others to do the same. The network can't
>> survive with 100% pruned nodes. I think too many users nowadays don't
>> understand that running a full node is the ONLY way to actually participate
>> in Bitcoin.
>>
>> It's bad enough that chunked partly-obfuscated things exist on the
>> systems of full node runners today. It'll be even worse if that's
>> unrestricted with the removal of such limits.
>>
>> As I said in my Github comment: This is far more than a small technical
>> change. This is a fundamental change to the nature of what the Bitcoin
>> network itself is in its entirety. Ten years ago, developers of the
>> reference implementation knew this, and acted in the best interest of
>> Bitcoin itself. Today, too many developers don't understand this duty.
>>
>> That may sound like hyperbole, but it really isn't. If this change is
>> merged into Bitcoin Core, and Bitcoin Core then continues to be the
>> reference implementation... Bitcoin as we know it changes forever in the
>> most fundamental way imaginable: The reference implementation explicitly
>> turning the Bitcoin network into an arbitrary data storage system, instead
>> of evolving it as a decentralized currency.
>>
>> That's not Bitcoin anymore, and we might as well give up on Bitcoin ever
>> being a thing if this is the path chosen.  There are very few paths that
>> lead to a worthless Bitcoin, and this is probably in the top 3 worst
>> options.
>>
>> I can't understate this. It's one thing to refuse to act when faced with
>> an attack/exploit/etc.  That takes actual courage and conviction to do
>> what's right for the ecosystem... and I _almost_ can't fault the current
>> batch of devs for not having that courage.  However, it's another to openly
>> make sweeping changing to the ecosystem in an effort to make such things
>> acceptable.
>>
>> Have the courage to reject this type of thing for the sake of the overall
>> project.
>>
>> JH
>> aka wk057
>> aka wizkid057
>> On Saturday, April 26, 2025 at 8:50:59 AM UTC-4 Pieter Wuille wrote:
>>
>>> On Saturday, April 26th, 2025 at 7:45 AM, Luke Dashjr <[email-masked]>
>>> wrote:
>>>
>>> > That's nonsense. They were and continue to be very effective, even
>>> with
>>> > only a small amount of adoption. Further, mining centralization and
>>>
>>> Standardness rules have definitely been effective in the past, if we go
>>> far enough back in time. But back then:
>>>
>>> * There were far less financial incentives to bypass them. Standardness
>>> adds inconvenience to people developing infrastructure on top, which can
>>> nudge in another direction. But I don't see how million-dollar (or more)
>>> business incentives would be thwarted by the need to communicate with
>>> miners directly (see below). These incentives will only increase as the
>>> subsidy dwindles.
>>>
>>> * There was far more reason for rules of this kind; the network was
>>> small and far less valuable, and there were significant concerns about
>>> increased node operation cost with a quickly-growing blockchain. With
>>> blocks consistently full for most of the time for years now, even at times
>>> without so-called "spam", that concern just does not exist; nodes will be
>>> processing the same amount of transaction data anyway. I think I share
>>> Luke's feelings around non-financially-relevant transactions on-chain, but
>>> given sufficient demand for block space anyway, there just is no need to
>>> discriminate.
>>>
>>> > pools denying miners options has been the biggest barrier to that
>>> > adoption. There is no significant financial impact either, that's just
>>> > FUD; miners using the fixed and improved spam filters have in fact
>>> > earned significantly more than miners using Core.
>>>
>>> I am doubtful of this claim, and would like to see evidence of it.
>>>
>>> > It would be a pain, but it is definitely viable. Thankfully, policy
>>> > works just fine for spam filtration, and can be adapted much quicker.
>>>
>>> Nobody is required to adopt policy, and I think you're burying your head
>>> in the sand if you believe even in a world with more decentralized
>>> hashpower, miners/hashers would voluntarily choose to disregard
>>> transactions that pay a significant fee, if the potential gains from
>>> accepting them exceed the cost of building infrastructure to bypass
>>> whatever policy exists.
>>>
>>> Bitcoin users do have a means to deny usage of the chain to truly
>>> damaging use: consensus changes. Those are not optional, apply to everyone
>>> equally, do not create incentives for bypass, and - and I believe that is a
>>> good thing - can only be adopted with very wide agreement.
>>>
>>> > > b) centralisation
>>> >
>>> > No, this is more FUD.
>>>
>>> The **entire** reason why Bitcoin uses PoW, as opposed to using a
>>> traditional consensus system with a federation of block-builders, is to
>>> avoid censorship. If anyone dislikes the choices current miners make in
>>> what transactions they accept, they can - without asking anyone for
>>> permission - join the set of miners, and earn a proportional piece of the
>>> pie. While it is the case that today mining power is quite concentrated in
>>> a number of businesses, the set of such businesses can, and has, changed
>>> over time. This is a very valuable property.
>>>
>>> Part of the puzzle to make that permissionlessness of mining work is
>>> access to fee-paying transactions from the public. If sufficient economic
>>> demand exist for transactions that the public network denies, miners and
>>> creators of such transaction will develop transaction rails that bypass
>>> that network.
>>>
>>> If it comes to a point where that economic demand is so high that miners
>>> need to rely on private transaction rails to realistically compete, I feel
>>> we'd be giving up on one of the most valuable properties the network has. I
>>> realize this is a slipstreamery-slope argument, but it is already
>>> happening, and once the rails are ubiquitous, it will be very hard to go
>>> back to a public network.
>>>
>>> ---
>>>
>>> Because of all these reasons, Concept ACK on relaxing the OP_RETURN
>>> limits, including removing them entirely. I have been a strong proponent of
>>> these limits in the past, and I'm not happy with seeing the demand for
>>> those transactions. But I also recognize the reality that that demand
>>> exists, and the alternative of pushing that demand to bypass the public
>>> network is far more damaging.
>>>
>>> I will add that I am not in favor of relaxing many other standardness
>>> rules in Bitcoin Core, such as transaction sizes and other resource
>>> limitations. These have significant impact on the public's ability to
>>> verify and relay transactions, and reason about incentive compatibility
>>> while doing so. Significant and sustained economic demand for such
>>> transactions may at some point too mean the policy needs to be revised to
>>> avoid an even worse outcome, but I'm hopeful that is not the case. However,
>>> these arguments do not apply to OP_RETURN limits, which don't serve an
>>> objective harm reduction beyond a subjective "that isn't what you should be
>>> using the chain for".
>>>
>>> --
>>> Pieter
>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "Bitcoin Development Mailing List" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email-masked].
>> To view this discussion visit
>> https://groups.google.com/d/msgid/bitcoindev/f4f6831a-d6b8-4f32-8a4e-c0669cc0a7b8n%40googlegroups.com
>> <https://groups.google.com/d/msgid/bitcoindev/f4f6831a-d6b8-4f32-8a4e-c0669cc0a7b8n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Bitcoin Development Mailing List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email-masked].
> To view this discussion visit
> https://groups.google.com/d/msgid/bitcoindev/CALkkCJY5T5sd5Am0M6abhaMMicwVNvSfwYQP1jMjxfVsuT8Jaw%40mail.gmail.com
> <https://groups.google.com/d/msgid/bitcoindev/CALkkCJY5T5sd5Am0M6abhaMMicwVNvSfwYQP1jMjxfVsuT8Jaw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups "Bitcoin Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email-masked].
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/CAAANnUy08NBOq3B%2B%2B80Rpna2qkD6NJV9RdV9v0Oi8c3G8eq_4g%40mail.gmail.com.