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

Prevent banning trusted peers for a long time #7056

Closed
mattsse opened this issue Mar 8, 2024 · 1 comment · Fixed by #7071
Closed

Prevent banning trusted peers for a long time #7056

mattsse opened this issue Mar 8, 2024 · 1 comment · Fixed by #7071
Labels
C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started

Comments

@mattsse
Copy link
Collaborator

mattsse commented Mar 8, 2024

Describe the feature

ref #7052

with #7052 we provided a bit more leeway when penalizing misbehaving trusted peers, but we would still endup banning them, which basically puts them into a timeout for:

// Ban peers for 12h
ban_duration: Duration::from_secs(60 * 60 * 12),

TODO

  • ban misbehaving trusted peers for shorter durations:

/// Bans the peer temporarily with the configured ban timeout
fn ban_peer(&mut self, peer_id: PeerId) {
self.ban_list.ban_peer_until(peer_id, std::time::Instant::now() + self.ban_duration);

we should use the default uban interval here so trusted peers get unbanned with the next interval

Additional context

No response

@mattsse mattsse added C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started labels Mar 8, 2024
@int88
Copy link
Contributor

int88 commented Mar 9, 2024

I'd like to fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants