OP_RETURN 40 to 80 bytes

December 30, 2016

At first it is really confusing understanding the actual size of the OP_RETURN field. This field in a bitcoin transaction allows arbitrary data to be written to the bitcoin blockchain and was “standardised” in v0.9.0 of the bitcoin core client on 19 March 2014. The core developers noted however that “Storing arbitrary data in the blockchain is still a bad idea; it is less costly and far more efficient to store non-currency data elsewhere.

5 Jun 2013 was the initial pull request for the 80 byte OP_RETURN These notes go with it:

On 25 Feb 2014, it was proposed to be reduced to 40 bytes as can be seen by this pull request The comments make an interesting read! It was then accepted (merged) into the code on 27 Feb 2014 as part of v0.9.0.

On 16 Nov 2014 there was a pull request to have the OP_RETURN size increased “back” to 80 bytes.

“The maximum size for OP_RETURN outputs used to be 80 bytes, then got changed to 40 bytes to be on the safe side. We have now been running with 40 bytes for about 9 months, and nothing catastrophic happened to the Blockchain, so I am proposing to increase it back to 80 bytes.”

This was then accepted (merged) on 4 Feb 2015. summarises this well saying:

  • Bitcoin Core 0.9.x to 0.10.x will, by default, relay and mine null data transactions with up to 40 bytes in a single data push
  • Bitcoin Core 0.11.x increases this default to 80 bytes, with the other rules remaining the same.

It seems that OP_RETURN has been there from the beginning, referenced from

            pc = pend;




Leave a Comment!

Your email address will not be published. Required fields are marked *