I'm trying to compute the normalized transaction ID so that it matches what is on blockchain.into at the following URL

 http://blockchain.info/q/hashtontxid/  --- normal TX ID here ----

Given that I need to create a canonical id of some type (just the tx inputs, etc), can anyone go into technical detail as to how the hash is created?

Some variations I've tried

  1. foreach input and output, add them to the sha256 engine. call finalize at the end.
  2. foreach input and output, add them to the sha256 engine. call finalize at each round. Use the finalized output to initialize each round, and then the next data[] (input or output array)
  3. make everything one flat memory array, laid out sequentially, hash and finalize.

I'm assuming that the byte[] layout in memory is no different than what it is on the bitcoin network.

I might be dealing with yet another endian issue, so any confirmation on approach will reduce my troubleshooting.

  • Maybe this can help: bitcoin.stackexchange.com/questions/22168/… Mar 10, 2014 at 10:22
  • Thanks I read that, the pull request, and tried to figure out the proposed changes that "were not supposed to be a serious proposal for inclusion into the code" and am having trouble matching C# with what is in block chain. Mar 10, 2014 at 11:43
  • Just now the core BTC devs decided to not support normalized txids. Mar 11, 2014 at 0:45


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.