Closed roman-khimov closed 2 years ago
Things that should be taken into account:
SecondsPerBlock
should be altered too. As we could see in benchmarks it can heavily influence TPS when there are many validators.It also affects these things:
getversion
RPC response
It's supposed to be static (as protocol configuration) and clients can cache the value they get initially for their purposes.MaxNotValidBeforeDelta
calculation
Doesn't seem to be critical, but at the moment of switch it can act wrong unless the switch time is known in advance.The other thing to keep in mind is that we have a committee which technically can be of different size than CN list. Usually it's taken from the configuration file, but the number of keys there is not specified explicitly, so changing it requires additional configuration option as well.
Updating the number of validators via the configuration file solves almost all of these problems (except for getversion
), while keeping it in the contract is not easy. Going through the contract we'll need to keep "excessive" standby validators nearby and we'll have to change some internal parameters on the go (without node restart). Legacy voting was somewhat more flexible wrt this issue.
Unless we completely drop the N3 voting ("private FS mode") we better extend the configuration file format and update configs on all nodes. This way it'll at least not require additional switches (of which we have many already) and the extension itself will be completely possible.
Right now
ValidatorsCount
sets proper CN count for the whole network lifetime which is acceptable for most public networks, but doesn't fit well some of NeoFS scenarios (growing a network from one node to many of them). Therefore we need to make it possible to change it.An obvious solution is just an extension of the configuration file, like
ValidatorsCount: {height: number, height: number,...}
, similar to Legacy'sMaxTransactionsPerBlock
orFreeGasLimit
setting. Easy to implement, but it requires configuration file update on all nodes.The other option is going through Policy or other special contract. Committee-signed transactions are always good, but it's a separate mechanism and it contradicts the scheme we have now, so maintaining this functionality (protocol extension) would be rather costly.