Adjust Extensible verification height interval #1309

Open
opened 2025-12-28 17:15:58 +00:00 by sami · 2 comments
Owner

Originally created by @AnnaShaleva on GitHub (May 28, 2024).

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:

2024-05-17T02:07:23.551+0200	WARN	peer disconnected	{"addr": "65.109.22.38:49298", "error": "handling CMDExtensible message: invalid height", "peerCount": 6}

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:
nspcc-dev/neo-go@0b136c1c9c/pkg/network/extpool/pool.go (L83-L91)

Originally created by @AnnaShaleva on GitHub (May 28, 2024). 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: ``` 2024-05-17T02:07:23.551+0200 WARN peer disconnected {"addr": "65.109.22.38:49298", "error": "handling CMDExtensible message: invalid height", "peerCount": 6} ``` 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
Author
Owner

@roman-khimov commented on GitHub (Jun 24, 2024):

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.

@roman-khimov commented on GitHub (Jun 24, 2024): `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.
Author
Owner

@roman-khimov commented on GitHub (Dec 9, 2025):

Mainnet:

neo-go[385]: INFO        peer disconnected        {"addr": "65.109.234.149:10333", "error": "handling CMDExtensible message: invalid height", "peerCount": 31}
neo-go[385]: INFO        peer disconnected        {"addr": "37.27.92.159:10333", "error": "handling CMDExtensible message: invalid height", "peerCount": 30}
neo-go[385]: INFO        peer disconnected        {"addr": "52.51.42.46:5001", "error": "handling CMDExtensible message: invalid height", "peerCount": 29}
neo-go[385]: INFO        peer disconnected        {"addr": "34.250.143.33:5001", "error": "handling CMDExtensible message: invalid height", "peerCount": 28}
neo-go[385]: INFO        peer disconnected        {"addr": "5.161.67.240:10333", "error": "handling CMDExtensible message: invalid height", "peerCount": 27}
...

The problem is slow local processing and some network issues at the same time, but these disconnects then aren't very helpful.

@roman-khimov commented on GitHub (Dec 9, 2025): Mainnet: ``` neo-go[385]: INFO peer disconnected {"addr": "65.109.234.149:10333", "error": "handling CMDExtensible message: invalid height", "peerCount": 31} neo-go[385]: INFO peer disconnected {"addr": "37.27.92.159:10333", "error": "handling CMDExtensible message: invalid height", "peerCount": 30} neo-go[385]: INFO peer disconnected {"addr": "52.51.42.46:5001", "error": "handling CMDExtensible message: invalid height", "peerCount": 29} neo-go[385]: INFO peer disconnected {"addr": "34.250.143.33:5001", "error": "handling CMDExtensible message: invalid height", "peerCount": 28} neo-go[385]: INFO peer disconnected {"addr": "5.161.67.240:10333", "error": "handling CMDExtensible message: invalid height", "peerCount": 27} ... ``` The problem is slow local processing and some network issues at the same time, but these disconnects then aren't very helpful.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neo-go#1309
No description provided.