Skip to content
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

Increase default vote duration to 2 minutes #270

Merged
merged 2 commits into from
Oct 28, 2024

Conversation

AgeManning
Copy link
Member

I have been looking into complications with low ipv6 peers in real world networks.

Originally this default was set, to handle ip changes more rapidly, however with low ipv6 peers on networks this becomes a hindering factor.

Although it is configurable, the default should be large enough to accommodate real-world networks.

I think this might have been originally set when we ping'd every connection. As no longer do that, maintaining pong votes for 2 minutes seems to be a reasonable tradeoff.

Copy link
Member

@jxs jxs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lower in the file there's still a reference to 30 seconds:

discv5/src/config.rs

Lines 163 to 168 in 9304dbb

/// The interval over which votes are remembered when determining our external IP. A lower
/// interval will respond faster to IP changes. Default is 30 seconds.
pub fn vote_duration(&mut self, vote_duration: Duration) -> &mut Self {
self.config.vote_duration = vote_duration;
self
}

@AgeManning
Copy link
Member Author

Fixed, thanks man :)

@AgeManning AgeManning merged commit a196ef7 into master Oct 28, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants