jackjack (OP)
Legendary
Offline
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
April 06, 2013, 11:03:16 AM Last edit: April 06, 2013, 12:57:55 PM by jackjack |
|
I never managed to make a correct transaction whereas they have the correct format, even though decoderawtransaction understands it But I just realized that I don't put the header (magic bytes, "tx", payload size, checksum)
Is it why it doesn't work? (I'm asking instead or trying because I can't test right now)
|
Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2 Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
|
|
|
deepceleron
Legendary
Offline
Activity: 1512
Merit: 1036
|
|
April 06, 2013, 11:37:00 AM Last edit: April 06, 2013, 11:56:48 AM by deepceleron |
|
Now you can test: importprivkey cPixSa5hRDdiyLUwynjP5jfxWkGoEZHxYonVMvFD18pWgd8VjvcK "testfun"You've got the v0.2.10 protocol change in? https://bitcointalk.org/index.php?topic=55852.0 All messages require checksums. https://en.bitcoin.it/wiki/Protocol_specification#Common_structuresField Size Description Data type Comments 4 magic uint32_t Magic value indicating message origin network, and used to seek to next message when stream state is unknown testnet3 0x0709110B 0B 11 09 07 There's no magic in dumped raw transactions from bitcoin. Are you transmitting over the wire with your own code or just sending to bitcoind? If bitcoin, maybe you are not signing? wiki:Input selection control 1 Get a list of not-yet-spent outputs with listunspent 2 Create a transaction using createrawtransaction 3 Apply signatures using signrawtransaction 4 Submit it using sendrawtransaction
|
|
|
|
jackjack (OP)
Legendary
Offline
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
April 06, 2013, 12:17:28 PM |
|
I'm transmitting over the wire, to both bitcoind and blockchain.info And I create the tx by hand, so I don't use [create/sign]rawtransaction I tried with the header but then bitcoind returns "TX decode failed (code -22)" and blockchain.info returns "Parse: Error Parsing Transaction", so I think I shouldn't put it Here is the raw tx: 0b110907747800000000000000000000df000000c1e1483e (header) 0100000001daebd7d9139eeecd25b207c66e4dbf3e55ca4c13fb6503faf238dd7ac7f8368f010000008a473045022004d1f3c972d65c660400496f49ef85933b4562da1cce110b853fd482b946f02d022100d7b822866a9a426e6a9c8e16f7a8fb8faf592dbf7baecc326696a03382c3243e410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8ffffffff01804a5d05000000001976a91491b24bf9f5288532960ac687abb035127b1d28a588ac00000000 Btw why did you give me that private key? To see if bitcoind works well? If so yes it did import it
|
Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2 Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
|
|
|
deepceleron
Legendary
Offline
Activity: 1512
Merit: 1036
|
|
April 06, 2013, 12:26:59 PM |
|
Did you do the version handshake first?
version:
When a node creates an outgoing connection, it will immediately advertise its version. The remote node will respond with its version. No futher communication is possible until both peers have exchanged their version.
When you get bitcoin to ack the version, you know you are making checksums right, and you've also opened up further communication.
There's dumps of hex transactions on the common structures wiki link above.
BTW, I've never done what you're trying to do, I'm just good at reading(?)
|
|
|
|
jackjack (OP)
Legendary
Offline
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
April 06, 2013, 12:43:29 PM |
|
But this is for messages, whereas I'm just creating transactions here I should not have to deal with the messaging protocol Maybe I misunderstand the purpose of the tools but the blockchain.info/pushtx page seems to claim exactly what I understand: Broadcast Transaction
This page allows you to paste a raw transaction in hex (i.e. characters 0-9, a-f) this will then be checked it is valid and transmitted over the network. And yeah I found the hex transactions on the wiki, and mine is similar. That's why I don't get what happen Edit: I just realized that (without the header) bitcoind returns "TX rejected (code -22)" So it seems that the format is correct, but something is not ok Maybe it's something to do with the signature like you said...
|
Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2 Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
|
|
|
Zeilap
|
|
April 06, 2013, 12:52:05 PM |
|
Edit: I just realized that (without the header) bitcoind returns "TX rejected (code -22)" So it seems that the format is correct, but something is not ok
Maybe it's something to do with the signature like you said...
The outpoint you're trying to spend is from a non-existent transaction 8f36f8c77add38f2fa0365fb134cca553ebf4d6ec607b225cdee9e13d9d7ebda
|
|
|
|
jackjack (OP)
Legendary
Offline
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
April 06, 2013, 12:57:42 PM |
|
Edit: I just realized that (without the header) bitcoind returns "TX rejected (code -22)" So it seems that the format is correct, but something is not ok
Maybe it's something to do with the signature like you said...
The outpoint you're trying to spend is from a non-existent transaction 8f36f8c77add38f2fa0365fb134cca553ebf4d6ec607b225cdee9e13d9d7ebda Sorry, I thought I said that it's in testnet http://blockexplorer.com/testnet/tx/8f36f8c77add38f2fa0365fb134cca553ebf4d6ec607b225cdee9e13d9d7ebda
|
Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2 Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
|
|
|
Zeilap
|
|
April 06, 2013, 01:02:07 PM |
|
Oh, sorry I missed that.
Anyway, bitcoind won't tell you what the error is directly, but it will be in the debug log.
|
|
|
|
jackjack (OP)
Legendary
Offline
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
April 06, 2013, 01:11:47 PM |
|
Yeah thanks, great idea! The result is quite clear: ERROR: CScriptCheck() : f853d2c31e VerifySignature failed ERROR: CTxMemPool::accept() : ConnectInputs failed f853d2c31e
|
Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2 Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
|
|
|
|