There seems to be a lot of confusion about the upcoming Bitcoin version 30.
Many people fear that one of the changes of this version, called often the "lifting of OP_RETURN size limits", will lead to a high amount of NFTs, images, and even illegal material being "spammed" on the blockchain.
These fears are mostly unfounded. There is only one effect that could happen and I will talk about this at the end of the post, but it has no technical reason, but more is caused by the cryptocurrency market's social and economic dynamics.
What is OP_RETURN?
Since the genesis block stored by Satoshi in 2009, people have used the Bitcoin blockchain to publish arbitrary data of non-financial nature, like small images, texts, poems and so on.
About 10 years ago, the Bitcoin Core developers created a specific mechanism to publish data in a way they cause the least possible harm to the nodes. This mechanism relies on the opcode (Bitcoin Script command) OP_RETURN.
OP_RETURN means nothing more that everything after this command can be ignored by the nodes. The data is placed behind that command. And if they want, the nodes can process it once and then delete it. [1]
OP_RETURN was necessary because people were publishing images, texts and other media disguising it as financial data. You would see a transaction and think it's a money transfer, but the data actually contained an image. And for several reasons this is actually more harmful and costly for nodes than OP_RETURN, because they can't ignore the data.
What's the change everybody's talking about?
Until Bitcoin 30, Bitcoin Core had a default value of 80 bytes for OP_RETURN outputs.
This means: Nodes which used this default value, would not accept a transaction with data behind of an OP_RETURN command with more than 80 bytes.
However, nodes were always free to change this default value. Miners are free to change that value too. It can be seen as a "recommendation". Transactions obeying this limit are called "standard" transactions.
But the 80 bytes limit only applied to data behind OP_RETURN. Not for other techniques to insert data into the blockchain.
In Bitcoin 30, the default value is set to "unlimited".
This does not mean that data of unlimited size is now "allowed by Bitcoin" and before it was not. Instead it means: If you as a node operator want to limit the OP_RETURN data in transactions your node accepts, you must manually set a limit (using the datacarriersize option).
Why this change?
The OP_RETURN limit increase is justified in the following way by its supporters:
Since 2023, we have seen a wave of transactions using other means to put data in the blockchain, including "fake public keys" and a "Taproot witness method" used by Ordinals. They have put up to 400 kB in a "standard" transaction, and up to 4 MB into a "non-standard" transaction.
These methods are more costly for the nodes to process, and thus they could harm decentralization of the Bitcoin network if they become too widespread. [2]
Developers decided thus to try to encourage those that want to store data on chain, to use the OP_RETURN method.
There are other advantages of the change but they are more difficult to understand. For example, block propagation could be improved and maintainance cost of the code could be lower. To understand why the change will probably not affect the level of spam, these reasons aren't important.
Why can't we simply stop the spam and filter all data transactions?
This is the most important part to understand.
The Core developers "could" put a "filter" in place to disallow two methods: OP_RETURN and the "Taproot exploit". But this filter would be ineffective, because the "fake public key" method cannot be blocked this way.
Unfortunately this method is also the most costly for nodes and thus the most harmful for decentralization. Remember why OP_RETURN was introduced? (see above) Because the "fake public key" method and similar techniques were already causing harm around 2014/15.
The Three Doors or why OP_RETURN doesn't open a new door
A very simple way to describe the change:
We have a house with three doors. Outside are 99 monsters who will enter the house by any means. The probability of the monsters to enter the house by any door is the same.
Door 1 is completely open now. Monsters entering this door can go directly into the whole house including the bedrooms and eat the people living there. This is the "fake public key method", the most harmful of all.
Door 2 is mostly open, some people are trying to close it sometimes but with not much luck. Monsters can enter the kitchen, but not the bedrooms, so the house's inhabitants are a bit safer, but still frequently a monster will be able to eat somebody.[3] This is the "Taproot witness method", the second most harmful.
Door 3 is currently only a bit open. Only small monsters can enter it. But even if the door was completely open, the monsters would only reach a guest room almost nobody of the inhabitants uses, and thus only rarely eat somebody. This is OP_RETURN.
We cannot close Door 1 (see above). Door 2 can be closed but the effect would be limited, because the monsters would then use Door 1 and the number of eaten people would even be higher.
We can however open Door 3. The monsters using this door would not cause much harm. Monsters entering via the other two doors could still enter, but we would have 1/3 less deaths.
This is what Core did lifting the OP_RETURN limits. It will probably not cause the spam (monster waves) to stop, but it could reduce their harm, at least a bit.
What is the effect you mentioned in the first paragraph? Why could we see more data/spam in the blockchain after Core 30 is released?
Technically, it makes not a big difference for those developing and storing NFTs, images, tokens (like Runes, BRC-20 and SRC-20) to use OP_RETURN or another method to store their data. There are lots of tools available, for example the Stampchain / Bitcoin Stamps project uses fake public keys, and Ordinals uses the Taproot witness method.
So why could this change lead to a temporary "data spam" wave?
The reason is that the NFT market could try to market a new type of NFT. The NFT market lives due to trends, fads, "cool collections" and similar reasons, and NFT collection creators often try to exploit the novelty of a method. If OP_RETURN based NFTs become now attractive, then an OP_RETURN based NFT protocol could try to get attention once Bitcoin Core 30 gets published, like Ordinals did in 2023. And this could lead to a spam wave indeed.
It is also possible that people annoyed by the OP_RETURN change could publish NFTs as a kind of "vengeance attack".
For this reason I personally would have preferred a gradual increment of the OP_RETURN default (standardness) limits and not the complete removal of limits.
But in the long run, it is highly likely that the amount of spam or arbitrary data transactions will not increase as an effect of the OP_RETURN change of Bitcoin 30.
Notes: (ELI18)
[1] The nodes only need to process the data to calculate the merkle tree of the transaction and the transaction ID. Then they can in theory delete the data behind the code if they want. The only problem is that they can't transmit the complete transaction in question to other nodes requesting it.
[2] The reason is that the techniques like the "Taproot witness method" used by Ordinals and the "fake public keys" used by Stampchain lead to a lot of UTXOs being created which will never be spent. These UTXOs have to be stored and managed by the nodes in an additional database. This maintenance work is much more costly to simply store the blockchain data.
[3] The analogy here: A "death" by being eaten by a monster is an UTXO which has to be stored by all nodes in their UTXO database forever, because it never will be spent. The fake public key method produces the highest rate of these UTXOs and they are impossible to spend. The "Taproot witness exploit" ocassionally creates dust UTXOs, which can be spent but the fees to do so will be higher than the value transacted. OP_RETURN does only very rarely lead to dust UTXOs and never to completely unspendable UTXOs.