2

My understanding is that OP_RETURN was first introduced in v0.9.0 (https://bitcoin.org/en/release/v0.9.0).

This link (https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2014-November/006917.html) mentions "initially supposed to be 80 bytes, but got reduced to 40".

This link (https://github.com/bitcoin/bitcoin/pull/5286) says: "The maximum size for OP_RETURN outputs used to be 80 bytes, then got changed to 40 bytes to be on the safe side".

Pull request https://github.com/bitcoin/bitcoin/pull/3737 talks about reducing it to 40 bytes. Was it ever in the code at 80 bytes prior?

1 Answer 1

4

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 will not mine the transaction.

OP_RETURN has been around since the beginning, in 0.1.0. This was the fragment that implemented OP_RETURN in 0.1.0:

        case OP_RETURN:
        {
            pc = pend;
        }
        break;

Back then, OP_RETURN didn't necessarily cause a script to fail. You could also use it in the scriptSig of a transaction, meaning that you could steal anyone's Bitcoins by pushing a non-zero value and calling OP_RETURN. Ah, those were the days.

6

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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