Hello Senj,
I have been thinking about the code and wondering if one could "slow down" the PoW "attack" by requiring (or making it more "atractive") to have a PoS block between PoW blocks?
The current miner code, in the daemon & Qt code has this line in the function:
void BitcoinMiner(CWallet *pwallet, bool fProofOfStake)
...
Changing how particular peer mines blocks does not change much - bad miners can edit code, build their own release and produce blocks as they please.
True fix has to be implemented in rules peers use for filtering and accepting those blocks.
My commits do that in two ways (will be three eventually):
- by sharply raising expected difficulty after consecutive PoW block count exceeds ( I refer to this event as overstep ) adjusted PoW/PoS ratio. Here.
- by giving PoW blocks after PoS block higher trust value - higher than currently here (not implemented yet, but it should be only a small change)
- by cutting each overstepped block's trust value in half. Here.
That means branch with less PoS blocks not only scores less chaintrust, but it will be also harder to mine.