Open AnnaShaleva opened 1 month ago
ValidBlockStart
is always zero for us, so it's just about ValidBlockEnd
, additional tolerance is needed or better a counter of errors (in the upper layer). The purpose of disconnect is mostly to avoid malicious nodes spamming us with bad things. We can tolerate some amount of some errors per some amount of time. There are grave protocol violations (like not performing a handshake properly) and there are these softer ones like someone can send a stale transaction or a too new extensible.
Based on the recent experiments with time-constrained dBFT, the following behaviour pattern was discovered: with low MillisecondsPerBlock setting often CVs happen due to peer disconnections:
It's caused by the lack of synchronization between peers and by the fact that network delays are comparable with MillisecondsPerBlock. We need to adjust the rule for Extensible verification and likely do not disconnect from peers that are not far ahead from the node: https://github.com/nspcc-dev/neo-go/blob/0b136c1c9cde3df17c1dff90b2aa25dd4f1d9984/pkg/network/extpool/pool.go#L83-L91