feat: close outdated connections to non-RT peers #1057
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Summary generated by Reviewpad on 11 Dec 23 11:32 UTC
This pull request includes two patches.
The first patch adds a new feature to close outdated connections to non-RT (real-time) peers. It introduces a new data structure
live_connected_peers
to keep track of peers that have a live connection. It also implements a methodremove_outdated_connections
to remove outdated connections to peers that are not present in the RT (routing table). This ensures that connections to non-RT peers are closed in a timely manner.The second patch includes changes related to the Gossipsub behavior. It modifies the configuration of Gossipsub to avoid message loops. It sets the
iwant_followup_time
to 10 seconds and thepublished_message_ids_cache_time
to 120 seconds. These changes increase the intervals at which certain actions are triggered, reducing the risk of message looping.These patches improve the networking behavior and stability of the system.