Discussion:
[bitcoin-dev] Mutli-push op_return
Chris via bitcoin-dev
2017-01-09 02:09:09 UTC
Permalink
Would there be an objection to making op_return outputs with two
pushdatas standard (same max data size)?

Use case is mostly tagging transactions so they can be returned by bloom
filtering nodes:

OP_RETURN <tag> <data>

Since bip37 nodes test each data element in each output script (which I
believe applies to op_return as well?) it provides a lightweight way of
fetching transactions where the tag matches a specific pattern.

It appears a sizable number of nodes/miners already accept such
transactions as this one was mined in the first block...
https://blockchain.info/tx/400b4738f1e4eab4062e085623b9a3a71670f5c0d42e32dbe5a4e71da5baabe0

- Chris
Luke Dashjr via bitcoin-dev
2017-01-09 03:08:56 UTC
Permalink
Post by Chris via bitcoin-dev
Would there be an objection to making op_return outputs with two
pushdatas standard (same max data size)?
Standards (BIPs) need to describe a specific use case and protocol for doing
it.

As you note, the default policy on most nodes is to allow such outputs.

Luke
Chris via bitcoin-dev
2017-01-09 04:32:53 UTC
Permalink
Maybe I was too premature. The script wiki (which I realize might not be
up to date) says only one pushdata is allowed but I don't see that in
the code.

https://github.com/bitcoin/bitcoin/blob/e8cfe1ee2d01c493b758a67ad14707dca15792ea/src/policy/policy.cpp#L49

Am I missing something or am I correct to assume that multiple pushdatas
in op_return would normally be considered standard?
Post by Luke Dashjr via bitcoin-dev
Post by Chris via bitcoin-dev
Would there be an objection to making op_return outputs with two
pushdatas standard (same max data size)?
Standards (BIPs) need to describe a specific use case and protocol for doing
it.
As you note, the default policy on most nodes is to allow such outputs.
Luke
Loading...