Help - Trying to figure out the algorithm

The block header is slightly modified; it conforms to the ZCash block header.

Details here:

image

As far as Equihash and Blake2b…

This is basic Equihash:

  1. Take block header and perform blake2 many times to create large pool of random-looking working data (several GB for BTG). This means performing many hashes just to create the data.
  2. Look for matched strings in that data of a mininum length. This is called the “Generalized Birthday Problem.” If you find a match, you have a solution.

You can find info about the Equihash parameters BTG is using here. That page also includes links out to references like the original Equihash paper by Biryukov and Khovratovich.

Lastly, you can see a reference client which can perform Equihash mining for BTG here:

Note: this is a reference implementation that runs on CPU and is known to be non-optimal, but will help you understand how the hashing is performed at the code level.

1 Like