Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: romanticon on January 14, 2014, 07:07:14 AM



Title: OP_RETURN
Post by: romanticon on January 14, 2014, 07:07:14 AM
Hi Fellows ,

I am trying to understand how exactly the OP_RETURN
help us to store sporadic data in the chain, can somebody
explain it with some good example.

Thanks in advance
Roman



Title: Re: OP_RETURN
Post by: prezbo on January 14, 2014, 10:41:24 AM
Hi Fellows ,

I am trying to understand how exactly the OP_RETURN
help us to store sporadic data in the chain, can somebody
explain it with some good example.

Thanks in advance
Roman



Just use OP_RETURN <data> as a 0-value output, I guess?


Title: Re: OP_RETURN
Post by: romanticon on January 14, 2014, 11:02:56 AM
That's what I thought , but
what are the actual limits ?
How much data can I place there ?
Is miner going take it with any chunk
of data after the OP_RETURN ?


Title: Re: OP_RETURN
Post by: bitpop on January 14, 2014, 11:35:23 AM
Just look in the source code.


Title: Re: OP_RETURN
Post by: prezbo on January 14, 2014, 12:06:08 PM
Just look in the source code.

Well that's not a terribly useful comment now, is it?


I don't think there are any limitations on the size apart from the 100kb per transaction limit that would make it fail the IsStandard(), but I haven't actually read the source so don't take my word for it


Title: Re: OP_RETURN
Post by: romanticon on January 14, 2014, 01:22:06 PM
Quote

Well that's not a terribly useful comment now, is it?


Well there is some true there, like to say :
"don't ask a stupid questions". My point
is that I am looking somebody with the
experience on that topic.


Title: Re: OP_RETURN
Post by: Luke-Jr on January 14, 2014, 08:27:57 PM
I am trying to understand how exactly the OP_RETURN help us to store sporadic data in the chain, can somebody explain it with some good example.
It's not supposed to.
Don't store data in the chain.

OP_RETURN is like saying "please don't rape me! but if you do, please be gentle".
It doesn't justify or make the rape (abuse of the blockchain, in this case) easier.


Title: Re: OP_RETURN
Post by: michagogo on January 14, 2014, 09:04:00 PM
It's not supposed to.
Don't store data in the chain.

OP_RETURN is like saying "please don't rape me! but if you do, please be gentle".
It doesn't justify or make the rape (abuse of the blockchain, in this case) easier.

Or another way I've seen it phrased, "I can't stop you from raping me, but please be gentle."

To clarify, the only reason that OP_RETURN is in marginally better than other methods of inserting arbitrary data into transactions is that it doesn't bloat the UTXO set, because it can be pruned from there.


Title: Re: OP_RETURN
Post by: romanticon on January 15, 2014, 06:43:43 AM


Quote
because it can be pruned from there.

That's interesting point. What do you mean ?
Is the miner going to prune it, and it wont
reach the block chain at all ?


Title: Re: OP_RETURN
Post by: nederhoed on April 03, 2014, 10:09:23 AM
There is something frustrating about this OP_RETURN discussion as to what the blockchain is supposed to be used for.

High hopes in stories about the blockchain being the infinite third party for proof of existence. Then when people think of ways to leverage that power, they get told not to spam the blockchain, because that's not what it's supposed to be used for.

The same with micro payments. When you get to using it, the fee turns out to be larger than the payment amount (prior to v0.9).

I understand this from a technical view point, but as a Bitcoin user, I find it discouraging.


With v0.9 I believe the OP_RETURN implementation provides a balanced solution: prunable outputs, infinite storage for those who want to build on top of it.

Now let's get us novices up and running with examples on how to create transactions with valid OP_RETURN values. Thank you.


Title: Re: OP_RETURN
Post by: bitpop on April 03, 2014, 11:22:52 AM
You can always hack it eg.
http://www.proofofexistence.com/detail/7348978e437f9c23153ab32379b2012e797eab5a31b3eec679bed4cdd5a12e89