Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: manzati93 on November 20, 2013, 03:00:28 PM



Title: Bicoin Stratum decode data as wiki sais
Post by: manzati93 on November 20, 2013, 03:00:28 PM
i've written a bitcoin miner which, given as string the header_hex of [this example][1] returns the correct hash and check if it is lower than the current target. ([example here][2])
I've tryied to build a server in python (gist.github.com/anonymous/7549461 ) which connects to a pool using stratum and should then send data as hex strings (formatted and swapped as the bitcoin wiki example), but I am not sure about the swapping of the data and target and merkle in order to achieve data as the bitcoin wiki example. This data will be sent to the miner which will succefully works (miner is correct, i've tested it with wiki example and seems to work).

So have I swapped data right in Order to obtain hex strings as bitcoin wiki example?

  [1]: https://en.bitcoin.it/wiki/Block_hashing_algorithm
  [2]: http://matt93.altervista.org/miner3
  [3]: https://gist.github.com/anonymous/7549461