Under the proof of work section in the token page some examples are given.
Merged mining example
The reward function can be called multiple times per block
Math formula example
Front-running
POW example
Front-running
Only the 8 bytes from the LSB of difficulty are used to check POW. Difficulty adjustments can potentially lead to overflow of 8 least significant bytes and difficulty reset
Since only the lowest 8 bytes in difficulty are used, it makes little sense to start off with a difficulty (10^32) that is already greater than 2^64. It makes more sense to start with 2^32.
I think those examples are simply meant to give readers ideas of what can be possibly implemented, and should not be straight out copy pasted. However it should at least give readers some warnings
Under the
proof of work
section in the token page some examples are given.Merged mining example
Math formula example
POW example
difficulty
are used to check POW. Difficulty adjustments can potentially lead to overflow of 8 least significant bytes and difficulty resetdifficulty
are used, it makes little sense to start off with a difficulty (10^32) that is already greater than 2^64. It makes more sense to start with 2^32.I think those examples are simply meant to give readers ideas of what can be possibly implemented, and should not be straight out copy pasted. However it should at least give readers some warnings