1
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
- foreach input and output, add them to the sha256 engine. call finalize at the end.
- 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)
- 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: https://bitcoin.stackexchange.com/questions/22168/what-is-the-normalized-transaction-hash-of-a-transaction
– Steven Roose – 2014-03-10T10:22:13.027Thanks 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. – goodguys_activate – 2014-03-10T11:43:11.030
Just now the core BTC devs decided to not support normalized txids. – Steven Roose – 2014-03-11T00:45:31.607