LearnBitcoin

Bitcoin Dev Archive 2017

Mutli-push op_return

3 messages, 9 Jan 2017. Started by Chris Pacia.

Chris Pacia (2), Luke Dashjr

Permalink Original thread on gnusha.org

Chris Pacia permalink original

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 in reply to Chris Pacia permalink original

On Monday, January 09, 2017 2:09:09 AM Chris via bitcoin-dev wrote:

Quoted text (2 lines)
> 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 Pacia in reply to Luke Dashjr permalink original

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?

On 01/08/2017 10:08 PM, Luke Dashjr wrote:

Quoted text (10 lines)
> On Monday, January 09, 2017 2:09:09 AM Chris via bitcoin-dev wrote:
>> 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
>