OP_RETURN and data commitments
Terms used in this lesson
- OP_RETURN
- A Bitcoin Script operation commonly used to create an unspendable output carrying a small amount of data.
- UTXO
- Unspent transaction output: one discrete chunk of bitcoin that can be used as a transaction input.
- UTF-8
- A standard variable-length byte encoding for Unicode text.
- OP_PUSHDATA1
- A Bitcoin Script data-push operation whose following byte states the length of an item from 76 through 255 bytes.
- Transaction ID
- The identifier produced by hashing a Bitcoin transaction’s non-witness serialization.
- ASCII
- A standard mapping between common text characters and byte values.
OP_RETURN outputs carry provably unspendable data but do not themselves enforce later spending conditions.
Loading lesson visuals...
Learn the idea
OP_RETURN is a Bitcoin Script opcode that terminates execution as failure. Outputs beginning with it are provably unspendable, so nodes do not add them to the UTXO set. UTF-8 means Unicode Transformation Format, 8-bit, the byte encoding used by the text case. OP_PUSHDATA1 is the Script length prefix used when the next pushed item is too long for a one-byte direct-push opcode. Relay policy permits common bounded data-carrier forms, while consensus only requires the whole transaction and block remain valid under consensus limits.
Encode application bytes
An application defines its own prefix, version, and payload grammar. Bitcoin does not assign business meaning to arbitrary bytes.
Inspect every idea above to open it.
OP_RETURN makes the output unspendable. Later application meaning comes from external parsing unless another spendable output explicitly commits enforcement.
The questions unlock after every required learning activity
Inspect every guided idea, open the worked example, rebuild its mechanism, and complete the deterministic lesson tool. Your progress is saved automatically.