Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: amaclin on March 29, 2014, 03:10:19 PM



Title: testnet: how to spend non-standard output?
Post by: amaclin on March 29, 2014, 03:10:19 PM
Please, help me with two txs
http://test.webbtc.com/tx/73e64e38faea386c88a578fd1919bcdba3d0b3af7b6302bf6ee1b423dc4e4333
http://test.webbtc.com/tx/d85af546147ff78dfb06e9469ddfc84adc3ce00cda54db8d65b7617ff2b7661a

Their output scrips just push very long arrays of data without any OP_CHECKSIG
As far as I understand this value should convert to true
So, it is possible to redeem these outputs with empty scripts
However, the qt-client rejects redeem transaction with errorcode -22
What is wrong?

Code:
sendrawtransaction 010000000133434edc23b4e16ebf02637bafb3d0a3dbbc1919fd78a5886c38eafa384ee6730000000000ffffffff0100f2052a010000001976a9149ed2747b05faac46b84afd1729c6cbf1591d358688ac00000000

TX rejected (code -22)

decoderawtransaction 010000000133434edc23b4e16ebf02637bafb3d0a3dbbc1919fd78a5886c38eafa384ee6730000000000ffffffff0100f2052a010000001976a9149ed2747b05faac46b84afd1729c6cbf1591d358688ac00000000

{
"txid" : "c396703fd9dac1aa791a140acac5ba51dc1e004e777088ef1c8a5b83c3a56f99",
"version" : 1,
"locktime" : 0,
"vin" : [
{
"txid" : "73e64e38faea386c88a578fd1919bcdba3d0b3af7b6302bf6ee1b423dc4e4333",
"vout" : 0,
"scriptSig" : {
"asm" : "",
"hex" : ""
},
"sequence" : 4294967295
}
],
"vout" : [
{
"value" : 50.00000000,
"n" : 0,
"scriptPubKey" : {
"asm" : "OP_DUP OP_HASH160 9ed2747b05faac46b84afd1729c6cbf1591d3586 OP_EQUALVERIFY OP_CHECKSIG",
"hex" : "76a9149ed2747b05faac46b84afd1729c6cbf1591d358688ac",
"reqSigs" : 1,
"type" : "pubkeyhash",
"addresses" : [
"muzjB2si6iYS5Nrf71YfGVap7jfBxuTPr2"
]
}
}
]
}


Title: Re: testnet: how to spend non-standard output?
Post by: piotr_n on March 29, 2014, 07:45:14 PM
executing pkscrip (from the output you're trying to spend) fails in EvalScript(), at this check:

Code:
    if (script.size() > 10000)
        return false;

the pkscript from that coinbase transaction is almost 1MB - that's the reason, it makes it unspendable.