View this at: https://opreturn.live/
Bitcoin miners can sometimes include data within the coinbase transaction of a block by using an OP_RETURN
transaction output.
The overall goal of this project is to decode and display OP_RETURN
data so that anyone can understand what other entities are associated with a block being mined by a pool.
Take a look at an example coinbase
transaction: https://mempool.space/tx/bbc74341be5a5b89ef876540453fd97acd6bab414612a37364b359ca9aa9e677
Look at the Inputs & Outputs section and notice that there are some outputs called OP_RETURN
with a 0
BTC amount.
In this case, you see 3 OP_RETURN
outputs:
OP_RETURN
!D&'u39 q#me r/
OP_RETURN
COREd$b-(N>,KT2+0
OP_RETURN
RSKBLOCK:K__mu-^Y\Bua
These look like a bunch of gibberish because it's typical in block explorers to convert the actual script (stored in hex) into ASCII to make it readable by humans. But each of these OP_RETURN
s actually mean something and they typically follow a spec and they can be decoded into something that makes sense rather than ASCII text.
Here are the the decoded OP_RETURN
s from the above transaction.
Notice that OP_RETURN
#1 contains the merkle root of some transaction witness data. OP_RETURN
#2 is for merged mining with coredao.org and we're able to decode the details and see which validator they are staking with as well as the rewards address. OP_RETURN
#3 is for merged mining with rootstock.io and the data includes the associated "Merged Mining" hash, which can be cross-referenced in the https://explorer.rootstock.io/ block explorer.
Check out specific implementations details below to see how each of these are decoded.
- Link: https://coredao.org/
- Spec: https://github.com/coredao-org/docs/blob/main/docs/become-a-delegator/delegators/delegating-hash.md#implementation
If anyone can explain this, please open a PR with details.
- Link: https://rootstock.io/
- Spec: https://dev.rootstock.io/rsk/architecture/mining/implementation-guide/
If anyone can explain this, please open a PR with details.
- Link: https://hathor.network/
- Spec: https://github.com/HathorNetwork/rfcs/blob/master/text/0006-merged-mining-with-bitcoin.md
If anyone can explain this, please open a PR with details.
The merkle root for the witness data is in an OP_RETURN output.