Definition
OP_RETURN is a Bitcoin Script instruction that causes script execution to fail when it is executed. An output whose locking script begins with OP_RETURN is therefore provably unspendable and can be used to carry data without creating an output that nodes must retain as spendable. Applications use such outputs for commitments, metadata, and protocol-specific messages. Any bitcoin value assigned to that unspendable output cannot later be recovered through ordinary spending. The data still occupies transaction and block space, so creating the output is not free storage. Rules governing which data-carrying transactions a node relays are policy matters and can vary by configuration or software version; historical relay limits should not be mistaken for timeless consensus rules. Bitcoin's acceptance of the underlying transaction also does not mean it validates the meaning or accuracy of every application message embedded in the output.
Source references
References accompanying this glossary entry:
- https://github.com/bitcoin/bitcoin/blob/master/src/script/script.h
- https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp
Educational reference, not financial advice. See our financial disclaimer and editorial policy.