secp256k1::uint256 CLKeySearchDevice::getNextKey()
{
uint64_t totalPoints = (uint64_t)_points * _threads * _blocks;
return _start + secp256k1::uint256(totalPoints) * _iterations * _stride;
}
Can I add some creative counting to the function? For example, ×2 private key, ×3 private key, or using fibonacci sequence.
The value of
_start + secp256k1::uint256(totalPoints) * _iterations * _stride is going to be the next private key so if what you are trying to accomplish is to "skip over" private keys, multiply this result by whatever value you want to use, and pass an additional argument to getNextKey() that is a pointer to struct that contains the next number in the sequence to multiply by. Perhaps also include in there a number that the limit to the number of terms in the sequence to use, after which it wraps around.
You could even make this number a modulus for excessively large sequence terms to be divided into.
typedef struct nextkey_state {
uint64_t index;
uint64_t limit; // or uint64_t modulus
} nextkey_state_t;
secp256k1::uint256 CLKeySearchDevice::getNextKey(nextkey_state_t *state)
{
// ...
}
And then of course update all function calls to use this parameter.