Bitcoin Forum
May 10, 2024, 01:09:04 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Transaction Hash Calculation problem (starting @2nd transaction in the block)  (Read 662 times)
Gabrics (OP)
Full Member
***
Offline Offline

Activity: 183
Merit: 112

Just digging around


View Profile WWW
May 05, 2013, 11:10:41 AM
 #1

Hi,

I am trying to calculate the correct hashes of BTC transactions.

I used this as a guide (couldn't find anything deeper Sad):
http://bitcoin.stackexchange.com/questions/2859/how-are-transaction-hashes-calculated

Works ok, as the page says, but only for the first transaction in each block.
All the rest of the transaction hash-es are "no good".
I wonder what should I do differently? Should I carry over something from the 1th hash to the 2nd and so on??

Any help would be appreciated.

Thanks
Gabor
1715346544
Hero Member
*
Offline Offline

Posts: 1715346544

View Profile Personal Message (Offline)

Ignore
1715346544
Reply with quote  #2

1715346544
Report to moderator
1715346544
Hero Member
*
Offline Offline

Posts: 1715346544

View Profile Personal Message (Offline)

Ignore
1715346544
Reply with quote  #2

1715346544
Report to moderator
According to NIST and ECRYPT II, the cryptographic algorithms used in Bitcoin are expected to be strong until at least 2030. (After that, it will not be too difficult to transition to different algorithms.)
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715346544
Hero Member
*
Offline Offline

Posts: 1715346544

View Profile Personal Message (Offline)

Ignore
1715346544
Reply with quote  #2

1715346544
Report to moderator
1715346544
Hero Member
*
Offline Offline

Posts: 1715346544

View Profile Personal Message (Offline)

Ignore
1715346544
Reply with quote  #2

1715346544
Report to moderator
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
May 05, 2013, 11:16:50 AM
 #2

Check endianness carefully. I had similar problem.
Gabrics (OP)
Full Member
***
Offline Offline

Activity: 183
Merit: 112

Just digging around


View Profile WWW
May 06, 2013, 11:28:12 AM
 #3

Thank you.
Could I be wrong at the first transaction at each block, and the same hash calculation fails at all the rest of the transactions?
I can only see that coinbase transactions have very short scriptSigLen. But I have the correct len as all of the transactions have the correct values.

Will try to play with that value a bit more, if I find the solution I will post it here. Any more ideas are welcome Smiley
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!