Finally got all coins in the game. The limit is 49999.99994500 SAT. But now I wonder, why the Genesis Block didn't take 50 coins as unspendable forever?
Ah, the genesis coins
are unspendable, there was just an off by one error in calculating the block subsidies, e.g. a new coinbase would receive subsidy at height - 1 which caused an extra 50 coins to be created in one of the halvings (I'll add this fix as part of the update later)
I guess I should experiment a little bit with the format of transactions and blocks, to reach some limits, like uint256 overflow. But anyway, I didn't expect to reach 2^96 chainwork. In general, when there will be 2^128 chainwork at any point in time, then it would mean, that the network produced enough power for a single SHA-256 collision, and then hash function should be upgraded.
I think in an accelerated mini simulation like this, that amount of cumulative chainwork is pretty reasonable. I expect that by its last halving, Bitcoin will probably have an even higher chainwork, so the simulation is probably even a little conservative
