- snip -
My fix for the issues:
((((total block size sum of the last 2016 blocks) + (unconfirmed transactions size at the time of last block) / 2016)*1.03)
This will allow the block size to change as needed and reset every difficulty change. Also the setting for bitcoind should be changed to a percentage base value to allow for the variable block size.
- snip -
It is not possible to know with any certainty what is the total "unconfirmed transactions size at the time of last block".
Additionally, this algorithm would allow a malicious miner to create blocks that are the full current size (to force the future size to continuously increase to sizes that interfere with the potential for decentralization.
It would also allow an attacker to regularly create a huge number of unconfirmed transactions just before the difficulty adjustment to force the block size to continuously increase to excessive size.