Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [op-return]

An opcode that allows you to create an unspendable transaction output that stores up to 80 bytes of data.

Filter by
Sorted by
Tagged with
0 votes
1 answer
57 views

Can I create multiple OP_RETURN UTxO in single transaction

Is it possible to generate multiple OP_RETURN utxos in one transaction? I see there is an answer for that in 2015, I wonder if it's still the case. I know nothing prevents us from doing so, but ...
Saburo Ronin's user avatar
1 vote
1 answer
61 views

Other than for obvious spam, what is OP_RETURN used for in non-coinbase transactions?

Some time a go I heard from Bitcoin Mechanic that there was a coin join implementation that inscribes some data that they need in order to determine their pricing. Is that true? Do custodians such as ...
John Smith's user avatar
5 votes
1 answer
515 views

When is OP_RETURN cheaper than OP_FALSE OP_IF?

Since January 2023 there have been many transactions that embed arbitrary data in the leaf script of a P2TR input using the opcodes OP_FALSE OP_IF (also called "inscription envelope"). This ...
Vojtěch Strnad's user avatar
0 votes
0 answers
23 views

How can I tell who mined a certain block? [duplicate]

Just like title says, how can I tell who mined a certain block. Is it just the decoded hex value of the OP_RETURN in the first tx?
user2880722's user avatar
2 votes
1 answer
132 views

Can OP_DROP be used to include arbitrary data?

I have recently been looking into OP_RETURN and its uses in so far as including data in a transaction. Given the fact that OP_RETURN is limited to 80 bytes I thought what if OP_DROP was used? That way ...
user2334659's user avatar
3 votes
1 answer
282 views

What could this OP_RETURN value be

I was messing around on the blockchain learning about OP_RETURN outputs and the equivalent use of Input Data in Ethereum and came across something interesting and I can't make sense of it. It starts ...
user2334659's user avatar
1 vote
2 answers
84 views

Is it possible/feasible for nodes to redact information (for example inappropriate images) in their blockchain and remain part of the network?

With the freedom to run nodes being critical to bitcoin's success, I'm concerned that if someone successfully writes highly inappropriate or abhorrent information/images as a valid transaction then ...
evo_race's user avatar
1 vote
1 answer
106 views

How can I add more OP_RETURN outputs to a PSBT transaction?

I want to fund a PSBT transaction that I created with Bitcoin rust. It looks like there is no such function to do that as the Creator is the only one that can set the inputs and outputs. There is an ...
David 天宇 Wong's user avatar
5 votes
1 answer
132 views

When was the first OP_RETURN output in a coinbase?

One way to deal with the BIP34 does not imply BIP30 issue, aka the Block 1,983,702 Problem, is a soft-fork that makes the SegWit commitment mandatory. [0] There are no OP_RETURN outputs in any of the ...
Sjors Provoost's user avatar
0 votes
0 answers
60 views

How is the d-30ad... pseudo-address generated for OP_RETURN

How are the pseudo-addresses (e.g., "d-30ad...") used in Bitcoin's OP_RETURN transactions generated? Specifically what process or criteria are used to create these unique identifiers ...
ihatecsv's user avatar
  • 101
1 vote
1 answer
216 views

Is the Bitcoin whitepaper embedded in the Bitcoin blockchain? [duplicate]

The Bitcoin blockchain can store arbitrary data. Especially recently, with the ordinals inscriptions, I've seen claims that images up to 390 kB are stored on the chain. In light of this, I was ...
kfx's user avatar
  • 113
2 votes
1 answer
72 views

How can I store a file hash in a Schnorr signature? Or something other than an OP_RETURN?

I have this python script that puts file hashes on the bitcoin blockchain: from bitcoinutils.utils import to_satoshis from bitcoinutils.setup import setup from bitcoinutils.transactions import ...
ChristianOConnor's user avatar
0 votes
1 answer
68 views

How can I optimize my python script that creates a btc native segwit tx with an OP_RETURN message?

I have the following code that successfully created a bitcoin transaction with an OP_RETURN message: from bitcoinutils.utils import to_satoshis from bitcoinutils.setup import setup from bitcoinutils....
ChristianOConnor's user avatar
2 votes
1 answer
197 views

How do I use python-bitcoin-utils to add an OP_RETURN message into a bitcoin transaction?

I have the following code that successfully created a bitcoin transaction with python-bitcoin-utils: from bitcoinutils.utils import to_satoshis from bitcoinutils.setup import setup from bitcoinutils....
ChristianOConnor's user avatar
0 votes
3 answers
93 views

Can someone break down what is returned by pybtc?

I am feeding network data to pybtc.Transactions. What I do is I take tx messages (which I understand to only contain a single transaction) and I feed them into pybtc.Transaction but only after ...
bitcoinluvr6969's user avatar
3 votes
2 answers
561 views

Why weren’t Inscriptions possible before taproot by just using OP_RETURN to store the data?

With the recent rise of Inscriptions using the script in the taproot input, why wasn't this possible previously just using OP_RETURN? What is special about the taproot upgrade that made this feasible ...
Patoshi パトシ's user avatar
2 votes
1 answer
249 views

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? If not, why not? Also, how could I figure this out from reading Bitcoin Core source? I looked at this file, and it wasn't quite clear ...
Hunter Beast's user avatar
5 votes
2 answers
2k views

Understanding how ordinals work with the Bitcoin blockchain. What is exactly stored on the blockchain?

Supposedly someone uploaded a Doom clone to the bitcoin blockchain: https://ordinals.com/content/521f8eccffa4c41a3a7728dd012ea5a4a02feed81f41159231251ecf1e5c79dai0 But I'm a bit confused on exactly ...
Patoshi パトシ's user avatar
2 votes
1 answer
173 views

Raw data vs information encoded in OP_RETURNs

Imagine I want to fill the 80 bytes of OP_RETURN data with zeroes, so that the resulting data is 640 bits set to 0, or 160 hex digits set to 0. The data is 640 bits but the information encoded is much ...
Son Kaos999's user avatar
8 votes
2 answers
1k views

Was the lifting of the Taproot transaction size limit "accidental"? Why would ordinals want to fill a block with OP_RETURNs?

I was reading this Twitter thread from pourteaux. I'm pretty sure there are some inaccuracies in it but I have a couple of questions. He states: Taproot accidentally blew up the old transaction size ...
Michael Folkson's user avatar
3 votes
1 answer
391 views

How can I recognize an OP_RETURN transaction looking only at the hex?

Looking at these two transactions for example: tx1 and tx2. tx1 is an OP_RETURN trasaction, tx2 is a normal transaction. raw hex from tx1 (OP_RETURN): ...
luisschwab's user avatar
1 vote
1 answer
40 views

Can BIP351 notification transactions be discovered via compact client-side block filters?

I have been reading a bit about BIP351 Private Payments. BIP351 uses nulldata outputs (OP_RETURN) to create shared secrets on the blockchain. Could these notification outputs be monitored client-side ...
Murch's user avatar
  • 75.7k
0 votes
1 answer
63 views

How can I prevent a transaction from being spent

For an academic article I want to know if I can prevent a transaction from being spent at all? I tried to send a transaction with only one output that contains only data (no output address provided) ...
liorko's user avatar
  • 239
1 vote
2 answers
111 views

What are the mean, median, range, limits and trends in the size of coinbase transactions?

I'm attempting to estimate how much "spare capacity" there is for merged mining protocols. As I understand it the scriptSig in the coinbase transaction must be less than 100B. However, the ...
Lee's user avatar
  • 833
3 votes
1 answer
282 views

Tx with OP_RETURN with 77 bytes of data refused by node

A transaction with a 77 bytes OP_RETURN is refused, but with shorter data (e.g. 74 bytes) is accepted, although up to 80 bytes should work. What is the safe limit to be used? Per these references the ...
OptOut's user avatar
  • 344
3 votes
2 answers
383 views

Why isn't it possible to add an OP_RETURN (or some arbitrary script) inside a taproot script path with a descriptor?

I'm reading the Bitcoin Core's descriptor documentation and I noticed that the raw() SCRIPT expression can only be used at descriptor top-level. Indeed when called with this descriptor ...
Sosthène's user avatar
  • 643
2 votes
1 answer
426 views

What is OP_RETURN b9e11b6d?

While investigating some Bitcoin coinbase transactions, I notice that a lot of them have an output of the form OP_RETURN OP_PUSHBYTES_36 b9e11b6d… where ‘…’ is 32 bytes, probably a hash of something. ...
George Lowther's user avatar
0 votes
1 answer
170 views

How can I query for all OP_RETURN data starting at a specific block height (or hash)

I'm working on a "light client" for ION (Identity Overlay Network), and I'd like to see if there is a better method to grab the OP_RETURN data that it needs in order to build state. ...
user1943442's user avatar
1 vote
3 answers
224 views

Different ways in which bitcoin can be burnt

I'm interested in the different ways in which bitcoin can be burnt. I can see three ways: Send coins to a 'made-up' address. There's no way to distinguish it from a real address (so the transaction ...
andrewr's user avatar
  • 13
1 vote
1 answer
206 views

Are OP_RETURN transactions not stored in chainstate database?

I'm running a bitcoin node on regtest. I'm writing scripts to interact with the chain-state database. For my purpose, I'm creating, signing and sending a transaction to my node (pretty much following ...
Nirmal Khedkar's user avatar
5 votes
2 answers
510 views

Was Bitcoin 0.3.7 actually hard-forking?

Reading through the wiki (bitcoin.it consensus versions) I noticed that release 0.3.7 ("scriptSig + scriptPubKey evaluations separated") is listed as a hard-forking change. In BitMEX's ...
user avatar
2 votes
1 answer
145 views

What is encoded in the first taproot enabled block?

There are a bunch of encoded messages in the first taproot enabled block in op_return outputs. What is encoded there?
Patoshi パトシ's user avatar
0 votes
0 answers
167 views

Creating an OP_Return TX with Python bitcoinlib

How can I create an op_return TX with python bitcoinlib? The transaction should include the OP_RETURN HEX-Data and an address where I send my change money
Captain Evening's user avatar
0 votes
2 answers
214 views

How much information can a single taproot output hold?

Does taproot make OP_RETURN obsolete? How much information can I stuff into an output? A tapscript leaf? Is there a max depth to the tapscript tree?
arshbot's user avatar
  • 1,788
10 votes
1 answer
2k views

How does OP_RETURN burn coins?

What exactly causes the output containing OP_RETURN to be unspendable? And why do I have to use the byes after OP_RETURN for keeping data in the blockchain and I can't use bytes before OP_RETURN?
Rony Tesler's user avatar
0 votes
2 answers
574 views

Why are OP_RETURN transactions discouraged? Does using version or locktime make any difference?

Why are OP_RETURN transactions discouraged? Are they paying less fees compared to other transactions? Will it make any difference if same thing is done using version or locktime when data is either 1 ...
user avatar
0 votes
1 answer
235 views

Accessing bitcoind from python module hits error

I am experimenting with the blockchain a bit, specifically trying to use the python-OP_RETURN module to put a few bytes into the blockchain op_return field. To use this module I blv I need a running ...
jeremy_rutman's user avatar
4 votes
1 answer
538 views

What has OP_RETURN been used for over Bitcoin's history?

What has OP_RETURN been used for over Bitcoin's history? How were these use cases enabled?
Michael Folkson's user avatar
2 votes
1 answer
327 views

Can Taproot be used to commit arbitrary data to chain without any additional footprint?

A common way of committing some data to the chain is through an OP_RETURN with some hash. Doing this marks an output unspendable, but the output still requires some footprint (and cost) on the chain ...
Mark H's user avatar
  • 3,334
3 votes
1 answer
162 views

"At first, anyone could spend anyone's coins"?

I've been watching this Bitcoin video: https://youtu.be/ZIugzFygviw?t=294 At the linked-to timestamp, he claims that: Due to bugs, at first, anyone could spend anyone's coins! I'm not saying that I ...
Infinity's user avatar
1 vote
1 answer
207 views

Why is the source code fee calculated higher than the current bitcoin fee amount?

In python bit (https://github.com/ofek/bit/), when sending a message, it is properly 80 bytes or less (https://developer.bitcoin.org/devguide/transactions.html) fee is If it is a 4-byte character ...
ground clown's user avatar
4 votes
4 answers
871 views

What is the currently most efficient and reliable method to store the Bitcoin blockchain in a local database?

I have seen several posts on this before, and have tried all the suggested solutions, but I can't get any of them to work. I am interested in analysing transactions with the OP_RETURN opcode for a ...
Johannes Mols's user avatar
0 votes
1 answer
300 views

How to send a 100KB OP_RETURN? [closed]

I'm trying to send an OP_RETURN transaction, and the program says that I can't do it because it is over 80 bytes. I would like to send a transaction using OP_RETURN that stores data. There is a site ...
Flash Uploader's user avatar
1 vote
0 answers
453 views

How to add money to my Bitcoin Wallet and send my first Raw Transaction with OP_RETURN using bitcoin-cli

Background So after reading these two articles (Learning Bitcoin from the Command Line and Mastering Bitcoin), I am trying to piece together how I can get my first transaction with OP_RETURN data ...
Lance's user avatar
  • 221
1 vote
1 answer
89 views

Send payment and message at the same time

I am using NBitcoin to write some code. I want to send some bitcoin to an address AND include a message with it. The message could say who the payment came from or why it was sent. According to the ...
ThirdPrize's user avatar
0 votes
1 answer
196 views

Is OP_RETURN dangerous for Bitcoin?

Please explain something about OP_RETURN to me? https://bitcointalk.org/index.php?topic=1166928.0 I saw a discussion that the contents of OP_RETURN can open the value of access to the private key. I ...
Izi Tors's user avatar
5 votes
1 answer
864 views

Why does this coinbase transaction have two op_return outputs?

I've been looking at coinbase transactions for fun and I came across one with two op_return outputs.. Does anyone know what the second one is? Also, I understand the first op_return is used to ...
Andrew's user avatar
  • 51
1 vote
1 answer
96 views

What is service or entity broadcasts transactions with OP_RETURN data starting with "LP..."?

There have been quite a few OP_RETURN transactions recently where OP_RETURN data in the scriptPubKey starts with 4c 50 which is LP as ASCII. For example these transactions: - ...
0xb10c's user avatar
  • 1,440
0 votes
1 answer
1k views

How do I broadcast an OP_RETURN transaction using bitcoin cli

I am using Bitcoin Testnet's command line (and GUI). I am curious how, using my own computer and equipment (I already used a faucet) I could send a transaction easily. I tried https://github.com/...
Number File's user avatar
0 votes
1 answer
91 views

Retrieve number of OP-RETURN transaction

Is there a possible way to extract the bitcoin transaction protocoll with Python and extract specifically OP RETURN transaction? I want to plot the number of those over the course of time to derive ...
Nils2's user avatar
  • 1