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 called https://bico.media/, but I can't use it because I want to use the testnet.

Note: I know that this is bordering on off-topic, but it makes sense and is related to bitcoin. I want to ask how to send an OP_RETURN that large easily, and I think it would be applicable to bitcoin SV too.

  • 3
    If your question is how to easily send a transaction with a 100 kB OP_RETURN, the answer is that you don't. You'd need to contact a miner or mine it yourself to get such a non-standard transaction accepted. – Pieter Wuille Dec 26 '19 at 13:03
  • 2
    The provided link talks about bsv (offtopic scam), which explains a lot because no sane person would think of doing that on the Bitcoin. – Jannes Dec 27 '19 at 21:47

You will not be able to send a transaction with an OP_RETURN larger than 80 bytes unless you mine a block that includes the transaction. An OP_RETURN larger than 80 bytes is considered non-standard, but still valid, meaning nodes will not relay your transaction (on default settings) but will accept the transaction if it is included in a block.

An alternative would be to create multiple OP_RETURN outputs, each of 80 bytes, totaling to your 100KBs. This would require 1,280 OP_RETURN outputs which, again, would be non-standard as it is larger than the maximum relay transaction size for nodes (100KB). You would again need to contact a miner/mine it yourself in a block, or split the OP_RETURN values in half and include 640 OP_RETURNs in one transaction and 640 OP_RETURNs in another transaction.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.