OP_RETURN is a Bitcoin Script opcode whose modern use includes creating provably unspendable transaction outputs that can carry data. Bitcoin Core calls this output class NULL_DATA. It is one of the seams where three different things are easy to blur together: Bitcoin's consensus rules, a node's transaction-relay policy, and the application protocols that interpret the bytes. Bitcoin Core output types — direct repository record · Bitcoin Script interpreter — direct repository record
What the opcode does
In current Bitcoin Core, executing OP_RETURN fails the script with SCRIPT_ERR_OP_RETURN. The output classifier separately names unspendable OP_RETURN scripts NULL_DATA. A transaction can therefore commit bytes in an output that no future transaction can successfully spend under the current script rules. Current interpreter — direct repository record · Current output classification — direct repository record
Calling this an “OP_RETURN field” is convenient but technically loose. It is not a special metadata field added beside a Bitcoin transaction. It is script in a transaction output.
The earliest tagged source currently pinned by BOMB, Bitcoin v0.1.5, already contains a case OP_RETURN branch in script.cpp. Its exact early execution semantics should not be silently projected forward from modern Core, but the source is enough to reject the simpler claim that the opcode itself first appeared in 2014. Bitcoin v0.1.5 script interpreter — direct repository record
Consensus, relay policy and application meaning
These are different layers.
- Consensus
- A block and the transactions inside it must satisfy Bitcoin's consensus rules. The existence of
OP_RETURNin Script is part of that validation environment.
- Relay and mining policy
- Bitcoin Core applies additional standardness rules to transactions it will normally admit to its mempool, relay to peers and offer to its block-template logic. Those defaults can change between releases without changing Bitcoin consensus. Node operators and miners can also choose different policies.
- Application protocol
- A system such as Open Assets Protocol can assign its own meaning to the bytes carried by an OP_RETURN output. Bitcoin validates the transaction; the application decides that a particular byte sequence means an asset marker, commitment, message or something else.
This distinction became especially visible in 2025. A Bitcoin Core contributor statement about transaction relay said Core developers view relay policy as a tool for accurately predicting and propagating transactions miners are likely to include, while explicitly saying that this position is not an endorsement of non-financial data use. That is a later first-party policy rationale, not a description BOMB should retroactively place in the mouths of 2013 developers. Bitcoin Core relay-policy statement — first-party
From opcode to standard data carrier
OP_RETURN in the script interpreter. This establishes that the opcode predates its later use as a standard data carrier. Direct source record-datacarrier and -datacarriersize, making the node's relay/mining treatment of these outputs explicitly configurable. Release notes — direct repository record-datacarriersize rose to **100,000 bytes**, effectively making transaction size the tighter limit, and multiple OP_RETURN outputs became standard for relay and mining. Operators could still set -datacarriersize=83 to recover the previous size policy. Release announcement · Release notes · Policy change — direct repository recordWhat “prunable” meant in 0.9
The 0.9.0 release note used the phrase “provably-prunable output.” The target of that design argument was the UTXO database: if a node can prove an output can never be spent, it does not need to retain that output as a candidate future coin.
That should not be misread as “the data disappears from Bitcoin.” The transaction remains part of the block history. The historical point is narrower and more interesting: developers were trying to reduce one particular long-lived cost of data-embedding schemes by making the unspendability recognizable to nodes. Contemporary release record
Why metaprotocols cared
OP_RETURN offered a compact place for application protocols to put markers or commitments without pretending that the output was an ordinary spendable coin.
Open Assets Protocol is a clean example. Its early specification used OP_RETURN marker outputs while the actual colored-asset meaning was interpreted by Open Assets-aware software. The marker did not make Bitcoin understand shares, coupons or issuer-defined assets; it gave the higher layer a recognizable byte sequence inside an otherwise ordinary Bitcoin transaction. Early Open Assets specification
That same architecture appears repeatedly in Bitcoin's application-layer history: Bitcoin provides ordering and transaction inclusion; another system decides what selected bytes mean. Colored coins, Counterparty and later metaprotocols differ sharply in their state models, so sharing Bitcoin as a message substrate does not make them the same protocol family.
The 2014 and 2025 caveats rhyme, but they are not identical
There is a useful archival tension across eleven years of Core material.
The 2014 release note said standardizing OP_RETURN was not an endorsement of storing arbitrary data and justified the change as a way to reduce UTXO-set harm from schemes that were already happening. In 2025, Core contributors again said their relay position was not an endorsement of non-financial data, but argued that relay policy should realistically track transactions with sustained economic demand that miners would include anyway. 2014 release record · 2025 contributor statement
The continuity is the refusal to call relay policy an endorsement. The rationale around what good relay policy should accomplish changed with the network around it. BOMB should keep both statements in their own time rather than compressing them into one timeless “Bitcoin Core position.”
Related pages
Open research
Pin the earliest confirmed on-chain transaction output using OP_RETURN and distinguish pre-standard consensus-valid uses from the 0.9-era standard data-carrier pattern.
Trace which early application protocols adopted OP_RETURN immediately after 0.9.0 and which continued using alternative encodings because of relay limits or miner policy.
Preserve the mailing-list discussion behind the February 2014 reduction from the earlier 80-byte development limit to 40 bytes, rather than relying only on the surviving pull-request summaries.