Wanted to make this a forum post so that it’s better documented
With the decision to use two mining algorithms over the first ~2 years can someone confirm whether my assumptions about how the block rewards would work is correct?
- Y% of blocks in 24H period can be mined with cuckoo
- X% of blocks in 24H period can be mined with equihash
If the breakdown is 10% cuckoo and 90% equihash at time n, then in a 24 hour period…
- there will be 1,440 blocks (1 block / min * 60 min * 24 hours)
- 144 blocks will be mineable with cuckoo (10% of 1,440 blocks)
- 1,296 blocks will be mineable with equihash (90% of 1,440 blocks)
- 86,400 grins will be created in total, with 8,640 grins mined by cuckoo and the remaining by equihash (60 grins / block * 1,440 blocks = total grins in 24H)
There’s an open question of which blocks will be mineable by which algorithm and what the sequencing of that will look like, but I assume that’ll be a detail that’s worked out over development and not part of this question.
^ Does my assumption and example above look correct? Can someone correct me if it works a different way?
I think such a clean breakdown would only be possible if blocks must be mined in a set pattern (c,e,e,e,e,e,e,e,e,e,c,e,e…) That would be super undesirable, and irresponsible, see accounts of the bch hash rate attack for details
I would bet whats actually going to happen is that the difficulty of the two is going to be free floating and not attempting to correct issues. So if the cuckoo hashrate grows at say 2x the rate of equihash, it will get more mined.
There is other options but tromp(cuckoo guy) is super pro-simplicity and I think everything else would be ugly as fuck
There is no sequencing of the two PoW. Instead the PoW that gets more than its intended share of rewards will see its difficulty increased, and the one getting less will see its difficulty decreased.
Actually on second thought, attempting to enforce balance over time doesn’t necessarily need to be ugly or drastic.
You could keep a “imbalance counter”, anytime an c block is found it it moves 9 any time an e hash is found its -1; or the equivalents of your target.
You apply a multiplier generated by the “imbalance counter” to the “true difficulty”, to produce the “effective difficulty” that would allow small catchup on the margins.
To prevent the “effective difficulty” from making a rubber banding effect on the “true difficulty”, you calculate the “true difficulty” from the blocks that meet half of the “true difficulty” search space, ignoring the weaker half thats either got an advantage, or the more worrying disadvantage
Not sure whether this is the right thread, but Zcash is also considering dual PoW for our Blossom upgrade, and I thought it might help to link to my analysis of that: https://github.com/zcash/zcash/issues/3672#issuecomment-443919681