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


Would appreciate any advice if something seems off! Thanks!

  • How does your hex to ASCII code look like? – Daniel S. Dec 1 '13 at 18:53
  • 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. Dec 1 '13 at 18:55
  • 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 Dec 1 '13 at 20:14
  • 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. Dec 4 '13 at 11:57

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.