New record achieved: 5321 blocks. But then, the network seems to be stuck for some reason (while my own minority chain is still going forward). I will leave it running, and see, if it will just move forward, or if it is really stuck, and will my fork produce more blocks (even if chainwork will be lower).
Current chainwork:
user@st> block 0000000000000000000036ea7e48a6eb87d12924fac5f89ae42ce5dc0fdecb42
{
"version": 1,
"hash": "0000000000000000000036ea7e48a6eb87d12924fac5f89ae42ce5dc0fdecb42",
"height": 5321,
"confirmations": 1,
"time": 1231073167,
"prev_hash": "000000000000000000000c830d7992039735cc3dacceb776926e3a97978f409a",
"chain_work": "0000000000000000000000000000000000000000001da5d7d629256838dcd33d",
"target": "17082528",
"nonce": 519477280,
"merkle_root": "d6b7df6161d7c7c54b1cd7f9a3dd465d9d1bcf9447b29b38e49aa7164df49a58"
}
Sick! But I guess I was wrong about fixing that integer precision bug... The problem is the integers involved in calculating the probability of network finding a block get so big that the fraction loses all precision always equals 0, so basically there is a 0% chance the network can solve a block and progress halts. I've switched it to now use the decimal.js library for high precision fractions, I'll just leave an instance running overnight to check if that fixes it.