Bitcoin Forum
May 22, 2024, 05:33:59 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Why won't Core send this transaction?  (Read 2029 times)
TimS (OP)
Sr. Member
****
Offline Offline

Activity: 250
Merit: 253


View Profile WWW
July 11, 2014, 12:20:38 PM
Last edit: July 11, 2014, 01:21:29 PM by TimS
 #1

I'm attempting to spend the output from this thread. I used Bitcoin Core's createrawtransaction, some manual fiddling to add another anyone-spend output (worth 0.0001 this time) and signrawtransaction to create this transaction:

01000000023c25123a6db0122f8987e52afae8835ee521cad7d7b9e2012bd88aae6aedd88700000 0000151ffffffff982e3c5df57e9fb59a397794552b6162b5afb22e45d3f5141ec4c05cbf258fe6 000000006b483045022100bdb2202b620991c98d8d7650219af5ff7762ab0b949fd4c329da4b6e6 97cb59f02201e183c9f3a7780c4dadbe818b22e11922279db615495b7823f2d2527acfc66f70121 03683cff3601cff805af6a43cd49a80f8571e2509643cd7be725aaae498d291ea6ffffffff02803 80100000000001976a9142befe08e305ac175088ad56c5d003bbc041b27bb88ac10270000000000 000000000000

Which, when decoded, is:

Code:
{
    "txid": "ce7d73cba662af3dfbd699384111115f4ccd24b3748a88bf9bc70c1cc4d08660",
    "version": 1,
    "locktime": 0,
    "vin": [
        {
            "txid": "87d8ed6aae8ad82b01e2b9d7d7ca21e55e83e8fa2ae587892f12b06d3a12253c",
            "vout": 0,
            "scriptSig": {
                "asm": "1",
                "hex": "51"
            },
            "sequence": 4294967295
        },
        {
            "txid": "e68f25bf5cc0c41e14f5d3452eb2afb562612b559477399ab59f7ef55d3c2e98",
            "vout": 0,
            "scriptSig": {
                "asm": "3045022100bdb2202b620991c98d8d7650219af5ff7762ab0b949fd4c329da4b6e697cb59f02201e183c9f3a7780c4dadbe818b22e11922279db615495b7823f2d2527acfc66f701 03683cff3601cff805af6a43cd49a80f8571e2509643cd7be725aaae498d291ea6",
                "hex": "483045022100bdb2202b620991c98d8d7650219af5ff7762ab0b949fd4c329da4b6e697cb59f02201e183c9f3a7780c4dadbe818b22e11922279db615495b7823f2d2527acfc66f7012103683cff3601cff805af6a43cd49a80f8571e2509643cd7be725aaae498d291ea6"
            },
            "sequence": 4294967295
        }
    ],
    "vout": [
        {
            "value": 0.0008,
            "n": 0,
            "scriptPubKey": {
                "asm": "OP_DUP OP_HASH160 2befe08e305ac175088ad56c5d003bbc041b27bb OP_EQUALVERIFY OP_CHECKSIG",
                "hex": "76a9142befe08e305ac175088ad56c5d003bbc041b27bb88ac",
                "reqSigs": 1,
                "type": "pubkeyhash",
                "addresses": [
                    "151KRCz9zHfCGJSWUKjwrFUL9oKwJhw4KD"
                ]
            }
        },
        {
            "value": 0.0001,
            "n": 1,
            "scriptPubKey": {
                "asm": "",
                "hex": "",
                "type": "nonstandard"
            }
        }
    ]
}

All seems good so far, but when I try to sendrawtransaction, I get the error:

64: scriptpubkey (code -26)

I've also tried submitting through https://blockchain.info/pushtx, which says "Script not of right size, expecting 2 but got 1", and http://blockr.io/tx/push which says "There was an error pushing your transaction to network! Did you sign your transaction? Is this double spend? Have you already sent this transaction?". Can anyone tell me what's wrong here? Are these all rejecting it simply because it's nonstandard, or is there something else wrong with the transaction?
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
July 11, 2014, 03:46:56 PM
 #2

ScriptPubKey indicates the issue is with one of the vouts.  IIRC an empty PkScript ("output script") is no longer valid.  One thing I never understood is that internally Bitcoin has a number of error codes to indicate exactly why the txn failed but then it "dumbs them down" and returns essentially uselessly vague error codes.

One other thing that would help is if "decoderawtransaction" actually did some parsing and validation.  It could indicate if the txn is non-standard and/or invalid and EXACTLY why.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
July 11, 2014, 03:55:03 PM
 #3

Actually looking at the debug.log it looks likes the error is simply indicating the txn is non-standard.

Code:
2014-07-11 15:53:13 ERROR: AcceptToMemoryPool : nonstandard transaction: scriptpubkey

You would need to find a method to relay this txn directly to a miner that accepts non-standard txns. 
TimS (OP)
Sr. Member
****
Offline Offline

Activity: 250
Merit: 253


View Profile WWW
July 11, 2014, 04:21:08 PM
 #4

Actually looking at the debug.log it looks likes the error is simply indicating the txn is non-standard.

Code:
2014-07-11 15:53:13 ERROR: AcceptToMemoryPool : nonstandard transaction: scriptpubkey

You would need to find a method to relay this txn directly to a miner that accepts non-standard txns.  

Thanks. I pushed it to Eligius at http://eligius.st/~wizkid057/newstats/pushtxn.php, since Eligius accepts non-standard TXs. I got this result, so I guess it was added to their pool of transactions:

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

They find several blocks a day, so I should either see it confirm or find that they didn't actually include it some time soon.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
July 11, 2014, 04:25:24 PM
 #5

The txn has been accepted into their memory pool but I don't believe Eligius will include it in a block without a fee though.
http://eligius.st/wiki/index.php/Policies
TimS (OP)
Sr. Member
****
Offline Offline

Activity: 250
Merit: 253


View Profile WWW
July 11, 2014, 04:39:59 PM
 #6

The txn has been accepted into their memory pool but I don't believe Eligius will include it in a block without a fee though.
http://eligius.st/wiki/index.php/Policies

I included a transaction fee of 0.0001 on the transaction of 243 bytes (0.001+0 input, 0.0008 out to me, 0.0001 out to any, 0.0001 remaining as tx fee), well above their required "0.1 TBC (0.00004096 BTC) per 512 bytes." I realized that no pool would process this transaction (doesn't fall under the free rules, plus it's non-standard) without a fee, which is why I included the second input in the first place (made this much more complicated, by involving real money/wallets instead of just handwriting a transaction).
TimS (OP)
Sr. Member
****
Offline Offline

Activity: 250
Merit: 253


View Profile WWW
July 11, 2014, 07:17:24 PM
 #7

It has confirmed successfully: https://blockchain.info/tx/ce7d73cba662af3dfbd699384111115f4ccd24b3748a88bf9bc70c1cc4d08660 Neat. Cool
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!