Closed marco-sundsk closed 4 years ago
We do use genesis hash to distinguish between nodes. Two nodes with two different genesis hash cannot connect to each other. However, we do want to allow two different client with different code to talk to each other. For as long as neither of them is malicious, they should be able to communicate with each other.
Describe the bug or test When some nodes are running with old genesis file and old code, others are running with new genesis and new code, log will show many info about receive invalid block Header and .Error processing sync blocks due to DB Not Found Error.
Although it seems correct according to chain runtime logic, but it consumes nodes resource, let node confused about peer which should or should not to connect, and stucked at some height waiting downloading some block header.
My suggestion is,
How to Reproduce Steps to reproduce the behavior:
Expected behavior OR Outcome of test Node can only establish p2p connection with node which has same code and same genesis.
Specs (please complete the following information):
Additional context log shows: V/11 4/1/40 peers ⬇ 0.8kiB/s ⬆ 0.7kiB/s 0.00 bps 0 gas/s CPU: 0%, Mem: 304.1 MiB [2019-11-20T03:08:33Z ERROR near_client::client_actor] Error processing sync blocks: Old Block Cause: Unknown Backtrace: [2019-11-20T03:08:33Z WARN near_client::client_actor] Banning node for sending invalid block headers [2019-11-20T03:08:39Z INFO near_client::info] # 55752 Downloading headers 74% V/11 4/1/40 peers ⬇ 0.8kiB/s ⬆ 0.7kiB/s 0.00 bps 0 gas/s CPU: 1%, Mem: 304.1 MiB [2019-11-20T03:08:48Z ERROR near_client::client_actor] Error processing sync blocks: Old Block Cause: Unknown Backtrace: [2019-11-20T03:08:48Z WARN near_client::client_actor] Banning node for sending invalid block headers
Screenshots Optional If applicable, add screenshots to help explain your problem.