11
votes
Explanation of what an OP_RETURN transaction looks like
If you want to write OP_RETURNs to the blockchain without getting into the internals of how transactions are built, an easy way is to use our libraries for PHP and Python:
https://github.com/...
10
votes
Accepted
OP_RETURN in a coinbase transaction?
Every segwit block has one such OP_RETURN in the coinbase transaction: It's the Merkle root of the witness tree.
When the segwit softfork was activated, this included a fix to the third-party ...
10
votes
Accepted
How does OP_RETURN burn coins?
What does exactly cause the output containing OP_RETURN to be unspendable?
Simply the fact that no input can possibly unlock coins which are encumbered with such an OP_RETURN-containing script. ...
9
votes
Why does this coinbase transaction have two op_return outputs?
Coinbase transactions have some special rules not shared by other transactions:
only one per block
must be the first transaction in the block
must have OP_RETURN output with witness commitment if ...
8
votes
Accepted
Raw data vs information encoded in OP_RETURNs
The current Bitcoin P2P protocol has no concept of compression, though there have been some proposals to incorporate it. The transaction data is sent as-is.
Some earlier discussion:
https://lists....
6
votes
Accepted
Can a transaction have a single 0-value OP_RETURN as its only output?
Yes. Such transactions are valid and standard.
6
votes
Accepted
OP_RETURN max bytes clarification
The limitation is a relay standard, but not a consensus rule. This can be modified on a per-node basis with $ bicoind -datacarriersize flag. The consensus rule that would limit this is the max block ...
6
votes
Accepted
Can Taproot be used to commit arbitrary data to chain without any additional footprint?
Yes, you can commit to data this way, but there is nothing special about Taproot here.
The Pay-to-Contract construction used to tweak the root key in Taproot is generally usable, and has in fact been ...
6
votes
Accepted
Understanding how ordinals work with the Bitcoin blockchain. What is exactly stored on the blockchain?
Ordinals Inscriptions don't use OP_RETURN, they are embedded within the script of a taproot input. It's not just a link to a file on some website, the entire file is actually published to the ...
5
votes
Accepted
What would happen if there are more blockchain imitators like Factom?
Factom stores data in a blockchain that's maintained by their network of federated servers. Tierion lets you create a verifiable record of any data or business process by anchoring your data to the ...
5
votes
What would happen if there are more blockchain imitators like Factom?
The way Factom works, they store the merkle root of the various hashes on the blockchain in an OP_RETURN output. This amounts to 80 bytes in the OP_RETURN and the actual transaction is going to be on ...
5
votes
Accepted
What is OP_RETURN b9e11b6d?
The mentioned OP_RETURN output appears to be the footprint of merged-mining VCash, a Mimblewimble-based SHA-256d coin, with Bitcoin. I discovered this via the string 0xb9e11b6d appearing in these ...
5
votes
Accepted
How can I recognize an OP_RETURN transaction looking only at the hex?
You can use bitcoin-cli to decode the transaction and get a sense of what is going on:
bitcoin-cli decoderawtransaction 0100000000010173...275d9a2100000000
That returns:
{
"txid": "...
5
votes
Accepted
Was the lifting of the Taproot transaction size limit "accidental"? Why would ordinals want to fill a block with OP_RETURNs?
No it was not accidental, see the BIP342 section on Resource Limits
Script size limit: The maximum script size of 10000 bytes does not apply. Their size is only implicitly bounded by the block weight ...
5
votes
Accepted
Can any Script opcode be used in the witness program, or only specific ones?
I was wondering, can one use an OP_RETURN in the witness script?
Yes, you can, though I believe it is pointless. Executing an OP_RETURN opcode causes the script to return false immediately, marking ...
4
votes
Explanation of what an OP_RETURN transaction looks like
OP_RETURN is a way to get arbitrary data into the blockchain with less burden to the network
As a consequence, the data will also be present in less clients, as OP_RETURN data can be pruned out.
The ...
4
votes
Where is the code making OP_RETURN a standard transaction type?
This is the PR that made OP_RETURN outputs standard:
https://github.com/bitcoin/bitcoin/pull/2738
The commit:
https://github.com/jgarzik/bitcoin/commit/a79342479f577013f2fd2573fb32585d6f4981b3
...
4
votes
Accepted
Does any current SegWit or blocksize increase proposal also seek an increase in the OP_RETURN byte limit?
Currently, there are no BIPS (Bitcoin Improvement Proposals) that seek to increase the 80 byte limit as you can see here.
Doing a cursory search on that repository, you can see that only a few ...
4
votes
Accepted
OP_RETURN marks transaction or output as invalid
Both.
Transaction output scripts are only executed at the time they are attempted to be spent.
If you try to spend an OP_RETURN output, the spending transaction is invalid, as this instruction ...
4
votes
Accepted
What was the very initial value of OP_RETURN?
My understanding is that OP_RETURN was first introduced in v0.9.0
No, it was just changed to be standard in 0.9.0. If a transaction is nonstandard, miners running Bitcoin Core with default settings ...
4
votes
Accepted
Segwit: Arbitrary data storage in witness?
Your transaction, although not invalid, is non-standard. Since it is non-standard, it will not be propagated and will be rejected for being non-standard. However this does not mean that it cannot be ...
4
votes
Accepted
creating OP_RETURN script on bitcoin core console. i.e. with the help of commands
createrawtransaction has an option for data. That will create an OP_RETURN output with whatever hex-encoded data you want in it. So you would have a createrawtransaction command that looks something ...
4
votes
Accepted
Why is there an output with op-return in regtest mode?
You did, presumably.
The transaction you're showing is the coinbase; it's a special transaction added by the miner. The OP_RETURN output is the SegWit block commitment. It is the Merkle root of all ...
4
votes
Accepted
In the bitcoin scripting language, how can I access other outputs of the transaction? Or how else can I limit how the coins may be spent?
There is no way to enforce a rule regarding the nature of an output when an input is spent. You will have to enforce this off chain in some manner, perhaps through multisig schemes where one key is ...
4
votes
Is OP_RETURN dangerous for Bitcoin?
The method described in the post has nothing to to with OP_RETURN, but is concerned with the SIGOP limits in a block.
Each block has a limit on the number of SIGOPs that can be present in ...
4
votes
Accepted
What has OP_RETURN been used for over Bitcoin's history?
pourteaux answered this in a Twitter thread.
The story starts in 2010, when there was debate on bitcointalk about a proposal to include a DNS service on bitcoin called BitDNS. There was concern (...
4
votes
Why are OP_RETURN transactions discouraged? Does using version or locktime make any difference?
Whether OP_RETURN transactions are discouraged or not is a matter of opinion.
Personally, I think transactions should not store any data that isn't needed for the world to verify them, which is by ...
4
votes
Why isn't it possible to add an OP_RETURN (or some arbitrary script) inside a taproot script path with a descriptor?
It's not clear to me why one would want to commit to an OP_RETURN inside of a P2TR output construction, let alone inside of a descriptor. I feel like there might be a misunderstanding here.
Using the ...
4
votes
Tx with OP_RETURN with 77 bytes of data refused by node
UPDATE: The first version of this answer suggested using two data pushes, updated to use OP_PUSHDATA1.
Further research has clarified the issue:
OP_RETURN max data length is 80 bytes, however
Maximum ...
3
votes
Accepted
Transaction with `OP_RETURN` to a particular address
You can't make an OP_RETURN-based output out to any specific address, since the OP_RETURN opcode marks an output as invalid (thus provably unspendable). In fact, an OP_RETURN-based output will not ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
op-return × 103transactions × 16
blockchain × 14
bitcoind × 11
script × 11
bitcoin-core × 8
segregated-witness × 7
taproot × 7
testnet × 6
python × 6
protocol × 5
coinbase-transaction × 5
raw-transaction × 4
transaction-fees × 3
bitcoin-cli × 3
consensus × 3
history × 3
non-standard-transaction × 3
merged-mining × 3
colored-coins × 3
ordinals × 3
client × 2
block × 2
network × 2
bitcoinj × 2