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

RateLimit counter for getPeers should be reset #5804

Closed
shuse2 opened this issue Sep 11, 2020 · 0 comments · Fixed by #5826
Closed

RateLimit counter for getPeers should be reset #5804

shuse2 opened this issue Sep 11, 2020 · 0 comments · Fixed by #5826

Comments

@shuse2
Copy link
Member

shuse2 commented Sep 11, 2020

Expected behavior

Even when running a small network, peer should not get banned if not misbehaving.
To achieve that

  • the counter for getPeers should be reset every discovery period (30s)
  • Returned length of peer list should be lowered to 200 from 1000

Actual behavior

When connecting 2 nodes, since one node constantly ask for peers (since it does not have enough outbound peer) from seed node, it will reach threshold of banning after a while.
Every 30s it will increase penalty by 10, so after 300s it will get banned

Steps to reproduce

Connect 2 local nodes and wait for more than 5 mins to see if non-seed node will get banned

Which version(s) does this affect? (Environment, OS, etc...)

5.0.0-alpha.0

Additional Information

Resetting the counter every 10s on peer/base.ts should mitigate this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants