I have spent last few days looking very closely at OP_RETURN
features. This blogpost summarizes my findings and thoughts.
Bitcoin transactions – recap
Every bitcoin transaction creates outputs (called transaction outputs, sometimes called txout) from one or more transaction inputs. All except one type of these transaction output types will create spendable outputs (called unspent transaction outputs – UTXO), the type that behaves differently is OP_RETURN
The UTXO are tracked and stored by every full node (btcd
or bitcoin-core/satoshi client
). You can say, that transactions consume inputs and create new outputs. One transaction can contain one or more inputs and one or more outputs.
Transaction outputs have 2 parts:
- value – how much money you are sending
- a
locking script
– this can be understand as a set of conditions that allow you to “spend” this output. For example this can be an ownership of a specific private key.
继续阅读“How to put custom messages into Bitcoin blockchain – OP_RETURN – Wojciech Programming Blog”