0
Let's use the following block for a reference: http://blockexplorer.com/rawblock/00000000000000001e8d6829a8a21adc5d38d0a473b144b6765798e61f98bd1d
According to my understanding (correct if wrong), I need to perform a byteSwap on each child, perform a hexToAscii, concatenate, then perform a double sha256. I am doing this in JAVA, an suspect that my hexToAscii method is off. I was hoping I could give some results to see if someone can verify where the problem is.
String childNode = "0d0eb1b4c4b49fd27d100e9cce555d4110594661b1b8ac05a4b8879c84959bd4";
byteSwap(childNode); //d49b95849c87b8a405acb8b161465910415d55ce9c0e107dd29fb4c4b4b10e0d
hexToAscii(byteSwap(childNode)); //Ô¸¤¬¸±aFYA]UÎ}Ò´Ä´±
And just to verify that my hexToAscii result is correct, can someone check the sha256 hash of the result? I feel that there are encoding issues with my implementation
sha256(hexToAscii(byteSwap(childNode)));
//e799dc13aaeaa1c2797596f5d4bf6c408b97a8595bf32c27c9186125454560d9
Would appreciate any advice if something seems off! Thanks!
How does your hex to ASCII code look like? – Daniel S. – 2013-12-01T18:53:55.397
You can save the result of hexToAscii to a file and then use a hexeditor to verify your data (or hexdump -C <filename> if you have it installed, e.g. on ubuntu). Moreover, you can post this question at stackoverflow, where it will receive way more attention. – Daniel S. – 2013-12-01T18:55:49.370
It would actually be better for someone who has a working bitcoin implementation to verify. This way we can directly compare results. Thanks though. Additionally, my methodology is still in question, and someone with a working knowledge of the implementation might correct me. – Tyrick – 2013-12-01T20:14:24.203
So you're stuck with this problem, you get ideas what to do, and you still +want+ it to be solved in that way that you really want. Mh. – Daniel S. – 2013-12-04T11:57:10.940