Sia-GPU-Miner icon indicating copy to clipboard operation
Sia-GPU-Miner copied to clipboard

why only first 8 bytes of target is used for blake2b GPU version?

Open fatrat1117 opened this issue 6 years ago • 0 comments

Hi: Giving Sia target is 32 bytes, I am confused that the source code only uses the first 8 bytes. I extract the code where initialize, compute and compare target.

// Copy target to header.
for (i = 0; i < 8; i++) {
	blockHeader[i + 32] = target[7-i];
}
    

ulong target = headerIn[4];

if (as_ulong(as_uchar8(0x6a09e667f2bdc928 ^ v[0] ^ v[8]).s76543210) < target) {
	*nonceOut = m[4];
	return;
}

I believe the code is correct. Is there a theory behind this? Thanks!

fatrat1117 avatar Mar 28 '18 03:03 fatrat1117