You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OS : Linux
JVM : Oracle Corporation 1.8.0_161 amd64
Version : 4.7.6
Code : 18306
Expected behaviour
When a light node disconnects from a peer or is disconnected by a peer, it should provide the correct reason for the disconnection.
Actual behaviour
Node A (IP_A) is a full node on the mainnet, syncing from block height 0. Node B (IP_B) is a light node on the mainnet.
The following is Node B’s log, including it and Node A.
09:06:29.419 INFO [peerWorker-6] [net](PeerConnection.java:184) Send peer /IP_A:63577 message type: P2P_HELLO
from: /IP_B:18888
timestamp: 1733907989415
headBlockId: Num:65574487,ID:0000000003e8965718a4d51d2efcdefcdd5aa52b3cc0a46e0cf42bb3d6a99113
nodeType: 1
lowestBlockNum: 5376487
codeVersion:4.7.6
09:06:29.825 INFO [peerWorker-6] [net](P2pEventHandlerImpl.java:169) Receive message from peer: /IP_A:63577, type: P2P_HELLO
from: /IP_A:18888
timestamp: 1733907987872
headBlockId: Num:61750,ID:000000000000f1361ade00d9bd8147a39412b6a1f3afd3bce3137b6035cbee28
nodeType: 0
lowestBlockNum: 0
codeVersion:4.7.7
09:06:29.825 INFO [peerWorker-6] [net](HandshakeService.java:100) Peer /IP_A:63577 different solid block, peer->Num:61732,ID:000000000000f124236a6a8758c2950a0789f61685ae21011f29833460379549, me->Num:65574470,ID:0000000003e896465618a62d1c46ef8b82e5e6b1b3cbb3020702b3fe74eb7b29
09:06:29.825 INFO [peerWorker-6] [net](PeerConnection.java:184) Send peer /IP_A:63577 message type: P2P_DISCONNECT
reason: FORKED
09:06:29.826 INFO [peerWorker-6] [net](P2pChannelInitializer.java:45) Close channel:/IP_A:63577
09:06:29.826 WARN [peerWorker-6] [net](P2pEventHandlerImpl.java:124) Receive msg from unknown peer /IP_A:63577
When processing the HelloMessage received from full node A, light node B failed the validation and disconnected with the reason FORKED. The validation failed because B's lowest block height was higher than A's highest block height, making synchronization impossible. However, both nodes are actually on the same chain, so the disconnection reason is incorrect.
The interaction between the local light node and its peer falls into two scenarios:
The local node's head block number is lower than the peer's lowest block number. In this case, if the peer is also a light node, the handshake fails and the error LIGHT_NODE_SYNC_FAIL is reported.
The local node's lowest block number is higher than the peer's highest finalized block. In this case, the handshake also fails and should report LIGHT_NODE_SYNC_FAIL. However, the actual disconnection reason reported is FORKED.
In the current implementation, if the peer's highest finalized block is not on the local node's main chain, it is immediately treated as a fork.However, the local node should first determine whether it is a light node. For light nodes, it is possible that the peer's finalized block is not on the local main chain, and this alone should not be treated as a fork.
Frequency
The reproduction rate is approximately 50%, depending on the order of HelloMessage exchange — whether B sends the HelloMessage to A first or vice versa.
Steps to reproduce the behaviour
As described above.
Backtrace
[backtrace]
When submitting logs: please submit them as text and not screenshots.
The text was updated successfully, but these errors were encountered:
Software Versions
Expected behaviour
When a light node disconnects from a peer or is disconnected by a peer, it should provide the correct reason for the disconnection.
Actual behaviour
Node A (IP_A) is a full node on the mainnet, syncing from block height 0. Node B (IP_B) is a light node on the mainnet.
The following is Node B’s log, including it and Node A.
When processing the HelloMessage received from full node A, light node B failed the validation and disconnected with the reason
FORKED
. The validation failed because B's lowest block height was higher than A's highest block height, making synchronization impossible. However, both nodes are actually on the same chain, so the disconnection reason is incorrect.The interaction between the local light node and its peer falls into two scenarios:
The local node's head block number is lower than the peer's lowest block number. In this case, if the peer is also a light node, the handshake fails and the error
LIGHT_NODE_SYNC_FAIL
is reported.The local node's lowest block number is higher than the peer's highest finalized block. In this case, the handshake also fails and should report
LIGHT_NODE_SYNC_FAIL
. However, the actual disconnection reason reported isFORKED
.In the current implementation, if the peer's highest finalized block is not on the local node's main chain, it is immediately treated as a fork.However, the local node should first determine whether it is a light node. For light nodes, it is possible that the peer's finalized block is not on the local main chain, and this alone should not be treated as a fork.
Frequency
The reproduction rate is approximately 50%, depending on the order of HelloMessage exchange — whether B sends the HelloMessage to A first or vice versa.
Steps to reproduce the behaviour
As described above.
Backtrace
When submitting logs: please submit them as text and not screenshots.
The text was updated successfully, but these errors were encountered: