16

I am playing with bitcoin transaction a bit now.

I have a question. Normally, the output script looks like

OP_DUP OP_HASH160 (hash) OP_EQUALVERIFY OP_CHECKSIG

Now that is understandable. However, when I slightly change the script with an outgoing translation to

OP_DUP OP_DROP OP_DUP OP_HASH160 (hash) OP_EQUALVERIFY OP_CHECKSIG

this transaction is never relayed (as far as I can say) and never reaches any miner, even when it's 100% legal.

What is going on? Why is it not relayed? I even added quite large fee on it.

And a second question - if my suspicion is correct and it is actually never relayed - what would happen if some miner actually accepted it and this transaction ended in the blockchain? Would it be a valid transaction? Would the client be able to "see it" when he is not able to relay it?

2
  • How did you change the script? I've been trying to figure out how to do that Aug 31, 2012 at 19:22
  • with playing with the source code. Sep 1, 2012 at 0:48

2 Answers 2

15

The standard client will not relay non-standard transactions. However, if you get them directly to a miner that accepts them, clients will process them correctly and the transaction will work.

You can send your transactions to 173.242.112.53. This is a server run by Eligius that will relay all valid transactions and they will include even non-standard transactions in the blocks they mine. Others who are willing to relay or include free and non-standard transactions also tend to link to this node, so it can get your transaction included in blocks mined by other pools as well.

7
  • 1
    OK, this is interesting. Thanks! What is the reason for this client behaviour? Aug 20, 2012 at 8:23
  • 2
    It's a way to prevent the network from being flooded with a large number of very small nuisance transactions. Someone could move the same coins back and forth over and over, bloating the block chain and flooding out legitimate transactions. The decision not to relay "non-standard" transactions is kind of mysterious and I'm not sure what the thinking is. Aug 20, 2012 at 8:29
  • 5
    If you're testing, you might want to consider running on a test network rather than the real one. Aug 20, 2012 at 8:31
  • 2
    Hm, I have never heard about "test network", it seems interesting, I am probably going to use that. How do I get "test bitcoins"? Aug 20, 2012 at 8:34
  • 3
    From the test faucet of course. Aug 20, 2012 at 8:41
2

This is for sending transactions directly to Eligius: http://eligius.st/~wizkid057/newstats/pushtxn.php

1
  • In fact this should be a comment to David's answer instead of a new answer. Also, you are not meant to include a footer with a tip address in an answer. Jan 5, 2014 at 12:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.