Bitcoin Forum
November 12, 2024, 03:44:19 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: OP_RETURN and non-standard transactions  (Read 3281 times)
locksley (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
December 30, 2013, 07:01:27 AM
 #1

I have an idea that uses OP_RETURN. However, the wiki states that "Note that this mechanism is not yet a standard transaction type, and thus will not be relayed by nodes on mainnet."

If it doesn't get relayed by nodes (and rather only included if you've mined that block), then how did this particular transaction get in there?

https://blockchain.info/tx/eb31ca1a4cbd97c2770983164d7560d2d03276ae1aee26f12d7c2c6424252f29

Also, I was wondering what is meant by this in the IsStandard() method?

Code:
    // only one OP_RETURN txout is permitted
    if (nDataOut > 1) {
        reason = "mucho-data";
        return false;
    }

See here https://github.com/bitcoin/bitcoin/blob/master/src/main.cpp#L408-412
locksley (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
December 30, 2013, 08:17:24 AM
 #2

Answering my own question, but I eventually found this https://bitcoinfoundation.org/blog/?p=290

Summary: In 0.9, OP_RETURN data TxOut will become a standard transaction type. However, this is controversial, and some miners may just reject OP_RETURNs with data junk.
maaku
Legendary
*
expert
Offline Offline

Activity: 905
Merit: 1012


View Profile
December 30, 2013, 08:48:26 AM
 #3

The answer to your question as stated is that if you connect directly to a miner which accepts that transaction type, then you can get those transactions in their blocks. Just because some nodes won't relay doesn't mean other nodes won't include it in their blocks.

I'm an independent developer working on bitcoin-core, making my living off community donations.
If you like my work, please consider donating yourself: 13snZ4ZyCzaL7358SmgvHGC9AxskqumNxP
loquitus_of_borg
Newbie
*
Offline Offline

Activity: 50
Merit: 0


View Profile
February 18, 2014, 10:19:43 PM
 #4

The answer to your question as stated is that if you connect directly to a miner which accepts that transaction type, then you can get those transactions in their blocks. Just because some nodes won't relay doesn't mean other nodes won't include it in their blocks.

Given we know this tx did get relayed, if we want to send out OP_RETURN tx's, is there a way to do so? I have figured out how to construct such a message properly, but it seems to be impossible so far to send it out, as expected. The typical "entry points" to send the raw tx (such as blockchain.info's push or bitcoind's sendrawtransaction) tend to fail. The latter fails client-side, I think and does not even bother talking to the network.

Perhaps the IP of the node that relayed this example tx successfully is a miner that does accept such tx's?
dexX7
Legendary
*
Offline Offline

Activity: 1106
Merit: 1026



View Profile WWW
February 18, 2014, 10:51:31 PM
 #5

It's possible, you should try to push the transactions via Eligius: http://eligius.st/~wizkid057/newstats/pushtxn.php

Could take a while, if you're unlucky though. (1-4 hours)

loquitus_of_borg
Newbie
*
Offline Offline

Activity: 50
Merit: 0


View Profile
February 18, 2014, 11:10:34 PM
 #6

Interesting!

I tried and got the following:

Trying to send...
array(3) {
  ["result"]=>
  string(64) "<XXX>"
  ["error"]=>
  NULL
  ["id"]=>
  string(1) "1"
}
Response = 0

<XXX> replaces what appears to be a hex string that is the same length as a tx hash.

What does this mean?

Also, when you say it could take a while, do you mean the confirmation time?

It's possible, you should try to push the transactions via Eligius: http://eligius.st/~wizkid057/newstats/pushtxn.php

Could take a while, if you're unlucky though. (1-4 hours)
maaku
Legendary
*
expert
Offline Offline

Activity: 905
Merit: 1012


View Profile
February 19, 2014, 12:12:53 AM
 #7

Eligius does not accept OP_RETURN outputs.

I'm an independent developer working on bitcoin-core, making my living off community donations.
If you like my work, please consider donating yourself: 13snZ4ZyCzaL7358SmgvHGC9AxskqumNxP
TierNolan
Legendary
*
Offline Offline

Activity: 1232
Merit: 1104


View Profile
February 19, 2014, 10:21:16 AM
 #8

Eligius does not accept OP_RETURN outputs.

Is that a policy thing, or they haven't updated?

1LxbG5cKXzTwZg9mjL3gaRE835uNQEteWF
maaku
Legendary
*
expert
Offline Offline

Activity: 905
Merit: 1012


View Profile
February 19, 2014, 10:42:47 AM
 #9

Policy.

I'm an independent developer working on bitcoin-core, making my living off community donations.
If you like my work, please consider donating yourself: 13snZ4ZyCzaL7358SmgvHGC9AxskqumNxP
TierNolan
Legendary
*
Offline Offline

Activity: 1232
Merit: 1104


View Profile
February 19, 2014, 11:38:57 AM
 #10

Policy.

Is their reasoning that people shouldn't be spamming the blockchain with data unrelated to bitcoin?  If so, how do they propose to stop it?

1LxbG5cKXzTwZg9mjL3gaRE835uNQEteWF
loquitus_of_borg
Newbie
*
Offline Offline

Activity: 50
Merit: 0


View Profile
February 19, 2014, 01:31:39 PM
 #11

It is a matter of opinion if it is spamming. You can argue it both ways. Frankly, miners can always choose to reject your TX if they want to, based on what fee you provide. So ultimately, the miners could just process such TX's with a high enough fee that justifies it. Sort of alleviates a mass-spam issue and now, people are paying to store data.

Policy.

Is their reasoning that people shouldn't be spamming the blockchain with data unrelated to bitcoin?  If so, how do they propose to stop it?
maaku
Legendary
*
expert
Offline Offline

Activity: 905
Merit: 1012


View Profile
February 19, 2014, 03:48:49 PM
 #12

Or, like Eligius, they can reason that spamming the network with data is uniformity bad for everyone and an externalized cost that is not properly accounted for, and reject all data transactions on principle, for the health of the network.

I'm an independent developer working on bitcoin-core, making my living off community donations.
If you like my work, please consider donating yourself: 13snZ4ZyCzaL7358SmgvHGC9AxskqumNxP
TierNolan
Legendary
*
Offline Offline

Activity: 1232
Merit: 1104


View Profile
February 19, 2014, 06:42:29 PM
 #13

Or, like Eligius, they can reason that spamming the network with data is uniformity bad for everyone and an externalized cost that is not properly accounted for, and reject all data transactions on principle, for the health of the network.

Well, if people are going to do it anyway, the OP_RETURN system means that it is does less damage (disk block rather than RAM bloat).

1LxbG5cKXzTwZg9mjL3gaRE835uNQEteWF
dexX7
Legendary
*
Offline Offline

Activity: 1106
Merit: 1026



View Profile WWW
February 19, 2014, 11:39:59 PM
 #14

Eligius does not accept OP_RETURN outputs.

I was pretty sure that I sent those two transactions via Eligius, but after looking at it again, it shows another transmitter:

https://blockchain.info/en/tx/ac960e5ae5e574f95de11eabf5671f7bec30c964377f643c8358d0ca0728e385
https://blockchain.info/en/tx/4feb2528d2b262099e03add25a76221078f53c919fdcbb509b3161e2eb8d5e86

Anyway, loquitus_of_borg: try to look up the txid in a few hours. If it worked, awesome, otherwise I guess I was indeed wrong. Sorry then.

genjix
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1076


View Profile
February 21, 2014, 12:36:14 PM
 #15

Eligius does not accept OP_RETURN outputs.

yes they do.
maaku
Legendary
*
expert
Offline Offline

Activity: 905
Merit: 1012


View Profile
February 21, 2014, 05:13:35 PM
 #16

Well, it's not *supposed* to, and Luke-Jr considers it a bug if it does.

Quote
[09:09:16] <maaku> Luke-Jr: does Eligius accept OP_RETURN data outputs?
[09:10:23] <Luke-Jr> maaku: not intentionally.
[09:11:01] <maaku> you've fixed it right, so it no longer does?
[09:11:08] <Luke-Jr> not sure
[09:13:40] <Luke-Jr> maaku: if it works right now, hopefully we will fix that soon

I'm an independent developer working on bitcoin-core, making my living off community donations.
If you like my work, please consider donating yourself: 13snZ4ZyCzaL7358SmgvHGC9AxskqumNxP
genjix
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1076


View Profile
February 21, 2014, 07:03:43 PM
 #17

Well, it's not *supposed* to, and Luke-Jr considers it a bug if it does.

Quote
[09:09:16] <maaku> Luke-Jr: does Eligius accept OP_RETURN data outputs?
[09:10:23] <Luke-Jr> maaku: not intentionally.
[09:11:01] <maaku> you've fixed it right, so it no longer does?
[09:11:08] <Luke-Jr> not sure
[09:13:40] <Luke-Jr> maaku: if it works right now, hopefully we will fix that soon

ok thanks for clarifying
gidgreen
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
March 24, 2014, 08:58:59 AM
 #18

This site shows all recent OP_RETURNs in the bitcoin blockchain:

http://coinsecrets.org/

Might be helpful for debugging purposes.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!