Some people asking about why they don't see superblocks. We checked the code and its behavior, we did see an issue. Let me explain it here:
The random calculation code:
std::string cseed_str = prevHash.ToString().substr(4,7);
const char* cseed = cseed_str.c_str();
long seed = hex2long(cseed);
int rand = generateMTRandom(seed, 19200);
what this means is that the program takes the previous block hash, extracts 7 characters from the hash, starting from 4th position in the hash, and use it as the seed to generate a random number, then the random number will determine if a block is superblock.
This scheme works fine for all other coins that has random blocks, and works for this one at the beginning (< block 300). But after some time, the generated hashes have a lot zeros in the beginning, for example:
00000000002d016cb29ac26baec5270f2496e8a33295d2c624673687e0d37942 height=340
00000000000cc102320be68cc8939e446d98f77f144a1e2bde452f8132128b80 height=873
00000000002125cd2153c7cdd926ac56baf0c1c418bb7fe88ad4261458e03e89 height=1324
in consequence, the cseed string, instead of being random, becomes some fixed strings like "0000000", "0000001", "0000002", etc, and none of these correspond to a superblock
.
I don't know why the hash have so many zeros at the beginning while at the start (blocks < 300) everything is fine (at least 3 random characters in the seed). This probably has to do with diff etc.
We are two ways to proceed:
1. Ignore it, and think in general there will be no superblocks in this coin. I know it is bad, but if the hash string changes back to less zeros (as it will likely to), we will see superblocks again like at the beginning of the blockchain. At least for this we don't need to do a forced upgrade / hard fork, so the mining will go smoothly.
2. We can fix the code, by extracting the seed string from, say, 11th character in each hash. This way, the randomness will be guaranteed, and we should see the superblocks as designed. The problem is that it will be a mandatory upgrade of the client for everyone. I can switch at certain block number, say block 3000 (now we are at block 1750), extracting seed from 11th character instead of 4th character.
Please let me know which you prefer, I'll do whatever the community agrees upon.