-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(core): reconnect disconnected peer #5303
Conversation
Signed-off-by: Lohachov Mykhailo <lohachov@soramitsu.co.jp>
I think this should be fixed differently. There is an existing mechanism when peer constantly tries to connect to other peers - iroha/crates/iroha_core/src/peers_gossiper.rs Lines 121 to 123 in 4e0067d
to () = self.network.wait_online_peers_update(|_| ()) => {
self.gossip_peers();
self.network_update_peers_addresses();
} |
I agree that I believe in the described case, there should be a check after |
Sorry I don't understand the problem, could you give an example? iroha/crates/iroha_p2p/src/network.rs Lines 365 to 369 in 4e0067d
|
Suppose peers in the topology are divided into three categories:
So when some peer connects, it will trigger changes in
If I understand correctly, Please correct me if I am wrong. |
This might be a problem. In this case I propose to remove |
I am not sure what the best solution in this case will be. |
I think this should be fixed this way. I think problem with current implementation in this PR is that it introduces duplicated mechanism for peer address update, and that it fixes only case when |
A smaller change would be preferred for this bug fix, especially since it will be a backport to RC1. |
Summary
This PR addresses scenarios like those described in #5286, where peers may not appear in online peer lists, causing them to passively wait for incoming connections (become isolated).
Changes
TRUSTED_PEERS
. On the other hand, on the restart, peers will reference theTRUSTED_PEERS
list.Checks are added during peer gossip, so there are certain delays in online peer updates. This shouldn't cause problems with too many requests.