1

I am in the works of making a pool-compatable fully python miner, and I need to know how to generate the blockhashing blob for the miner.

jtgrassie
  • 19,601
  • 4
  • 17
  • 54
Crypthusiast
  • 169
  • 2
  • 8

1 Answers1

3

Step #1 in this answer details how to get a blockhashing_blob.

If you plan on creating it yourself instead, this is much more involved. You would have to deserialize the blocktemplate_blob, calculate the merkle tree root hash for the blocks transactions (including a newly constructed coinbase transaction), then concatenate the block header, merkle tree root hash and transaction count (as a varint). That would get you a manually constructed blockhashing_blob. Doing this in just Python will be a big task.

It's worth noting, a pool-compatible miner doesn't need to create a hashing blob as the pool gives the miner the blob to hash.

jtgrassie
  • 19,601
  • 4
  • 17
  • 54