Closed toco3DevTobias closed 10 months ago
When the given nonce is >2,147,483,647 (max integer) thetimeBitsNonceBuffer.writeInt32LE(nonce, 8) is value is out of range.
timeBitsNonceBuffer.writeInt32LE(nonce, 8)
Since you can not mix little endians 32-bit and 64-bit - another workaround is required.
The miners will iterate through all 32-bit values, so they have 4,294,967,296 tries.
Any idea to fix timeBitsNonceBuffer.writeInt32LE(nonce, 8) that max range is allowed to 4,294,967,296.
The implemented algorithm is still working fine - I validated the latest 20 blocks correctly (where the nonce was < 2,147,483,647).
The .writeInt32LE function has additional arguments. One of them is noAsssert. Set it to true then it works
When the given nonce is >2,147,483,647 (max integer) the
timeBitsNonceBuffer.writeInt32LE(nonce, 8)
is value is out of range.Since you can not mix little endians 32-bit and 64-bit - another workaround is required.
The miners will iterate through all 32-bit values, so they have 4,294,967,296 tries.
Any idea to fix
timeBitsNonceBuffer.writeInt32LE(nonce, 8)
that max range is allowed to 4,294,967,296.The implemented algorithm is still working fine - I validated the latest 20 blocks correctly (where the nonce was < 2,147,483,647).