Bitcoin Forum
June 25, 2024, 07:30:22 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Blockchain Info API - Payment Tx_Hash  (Read 863 times)
YellowBlueGreen (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
February 27, 2014, 09:11:26 AM
 #1

Hi guys,

When making a payment using the Blockchain Info API, I receive a success response but the tx_hash doesn't seem correct.

Here's the JSON response:
{"message":"Sent 0.0001 BTC to 1Jp6r9MqJQY5RBaF6mDtM4cjDJ3mBNpj8J","tx_hash":"aa1effcea0956eba9f7b46d3b1f7c0187534fa89c53d9cd1fe1fd73499288cfd"}

However the tx appears to actually be: fe34089c3b43d6f4f20363305a7b53c15c007431feca953b1193bcc321dc324f.

Am I not understanding something correctly?
Bitalo_Maciej
Member
**
Offline Offline

Activity: 80
Merit: 10


Lead developer


View Profile WWW
February 27, 2014, 09:49:23 AM
 #2

Did you tried to contact Blockchain.info support about that? It might be an issue with their system. Or, you could be a victim of transaction malleability issue that was quite well known in last weeks. See: http://bitcoin.stackexchange.com/questions/22051/transaction-malleability-in-the-blockchain

Web wallets get hacked all the time. Computer wallets get hacked all the time as well.
Solution? Hybrid P2SH wallets - safer than your online and offline wallets combined. Check it out, store and trade your Bitcoins with ease of mind!
YellowBlueGreen (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
February 27, 2014, 11:36:21 AM
 #3

Thanks for your reply. Much appreciated!

I think it's more that I don't understand the purpose of the returned tx hash? I get the same problem with blockchain RPC. I get a tx hash returned but I'm not sure what to do with it. When the transaction appears on blockchain it is a different id/hash that I can then monitor.

What's the purpose of the returned tx_hash? I was hoping I can use it to verify or monitor the transaction. But that doesn't seem to be the case? Do I need some other way of tracking each specific transaction or some way to get the actual transaction id?
Bitalo_Maciej
Member
**
Offline Offline

Activity: 80
Merit: 10


Lead developer


View Profile WWW
February 27, 2014, 12:20:09 PM
 #4

Raw data for the transaction you posted is:

Code:
01000000010a76e7737d25ebab31a954919f9126940ffbe136a9523d9c3940e8af912ccace010000008c4930460221009d208a10475c9f67f21fe192ad4c0a27c66bf4f05627a65194e8b2fcc419362a022100a47ba43195b58d8cf32c6a1ebb1d911926f986e4b76259c1a92bfc040310e77801410481751ad255b2b79cfde9c0f4230148ee5b83621052241e1baa51123557cdb565a0ad817f2839a927da0840ef236b2127163b7f5ff830d2c8445c42ba77de2070ffffffff0210270000000000001976a914c36291d28c66530f3e79c89aa34b763e20e574dc88ac23ed9200000000001976a914a341c6fd7f94118af99a6cfeaffcebcc8714817888ac00000000

With input signatures stripped and hashType added:
Code:
01000000010a76e7737d25ebab31a954919f9126940ffbe136a9523d9c3940e8af912ccace0100000000ffffffff0210270000000000001976a914c36291d28c66530f3e79c89aa34b763e20e574dc88ac23ed9200000000001976a914a341c6fd7f94118af99a6cfeaffcebcc8714817888ac0000000001000000

I tried to hash these in various ways, but nothing returned the hash that they are returning in the tx_hash parameter.

It really seems that it's an issue on Blockchain.info's side:

https://github.com/blockchain/My-Wallet/issues/72
http://bitcoinewz.com/news/blockchain-info-api-payment-txhash

OR the hash is just something they use internally, but it's unlikely, because I couldn't find any documentation about it, and everything that I did found suggested that tx_hash should represent TXID of the transaction.

Web wallets get hacked all the time. Computer wallets get hacked all the time as well.
Solution? Hybrid P2SH wallets - safer than your online and offline wallets combined. Check it out, store and trade your Bitcoins with ease of mind!
wisefear
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
November 02, 2014, 02:38:32 AM
 #5

The tx_hash returned by Blockchain.info is in reverse byte order, which is the way it's represented internally in the Bitcoin network.

It's actually the same data / hash, but the first byte is at the end, and so on.
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!