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

feat(share/p2p/peer-manager): use LRU cache for peer-manager blacklisted hashes #1926

Open
walldiss opened this issue Mar 17, 2023 · 0 comments
Labels
area:p2p area:shares Shares and samples enhancement New feature or request good first issue Good for newcomers

Comments

@walldiss
Copy link
Member

Implementation ideas

When peer-manager identifies datahash as invalid, it blacklists it to reject all future shrex.Sub messages with the same hash. Blacklisted hashes are stored in map and never deleted during runtime of node, which means that it could grow in size beyond reasonable limits.

Need to rework blacklisted hashes storage in peer-manager to use LRU cache with limited size instead plain map.

@walldiss walldiss added enhancement New feature or request good first issue Good for newcomers area:shares Shares and samples area:p2p labels Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:p2p area:shares Shares and samples enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant