-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: backoff recon synchronization to peers with bad data (#597)
* feat: backoff recon synchronization to peers with bad data With this change peers will backoff synchronization attempts with peers that fail synchronization. This will have the effect that the bootstrap nodes do not talk to nodes that are sending bad data very often. However the backoff state is tied to the connection state and is reset if the connection resets. Allowing developers to restart their node and be in good standing with bootstrap nodes. Additionally a small change was added to prefer using the connected address to a peer when reporting the address of connected peers. * fix: change default connection timeout to 15m Keep connections around longer so we can remember that we have backed off peers, otherwise we the connection will close and reconnect resetting the backoff delay. * fix: keep interests and model syncs separate This change makes it so that interests and model syncs are independent. We always start with the interests sync. But then after the initial syncs they can independently be backed off. This helps with no resetting idle connections and therefore resetting the backoff state. As there is likely some activity on the connection for one of the two syncs. * comment * Update recon/src/libp2p.rs Co-authored-by: Mohsin Zaidi <[email protected]> --------- Co-authored-by: Mohsin Zaidi <[email protected]>
- Loading branch information
1 parent
315d791
commit 1a895e1
Showing
6 changed files
with
274 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.