Closed Jim8y closed 11 months ago
The problem here is that malicious nodes can start the consensus early when they become the primary, speeding up the consensus and thus generating more blocks and mining more GAS. We did not check a thing that is similar to mining difficulty
. As v17 has mentioned here https://github.com/neo-project/neo/issues/2918, this is not an emergency fix, it is totally OK, it you think consensus nodes should be allowed to speed up the consensus maliciously.
I use 10000
just because i need a time window to konw what is the average
block time in the past 10000
blocks, if they are shoter than the default
consensus time, then the current consensus round would wait longer to slow down the consensus.
Create a new method IsValidTimestamp(previous, current) with UT?
would be challenging to have 10000 blocks UT, LOL, lets find out.
One way, is to use NeoSystem
in memory, than you could sleep thread until height is 10k. Should download on network and should be quick.
Kinda fun when i set it to 10000, not anymore.
https://github.com/neo-project/neo/issues/2918
Prevents:
future
timestamp.