-
Notifications
You must be signed in to change notification settings - Fork 185
feat: implementing a resource manager to prevent resource exhaustion attacks #836
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
base: main
Are you sure you want to change the base?
Conversation
@Sahilgill24 : Hi Sahil. Thank you for submitting the PR. Appreciate it. Please resolve the CI/CD issues. CCing @acul71 and @sumanjeet0012, who will help you arrive at a good conclusion on the issue. |
The CI/CD issues could be resolved, but commits are just the basic structure of the project, so let's here form @Sahilgill24 when he planned to work on this. |
@acul71 : Sure, thank you for your feedback. Appreciate it. As recommended by you in the recent maintainer call, wish to request @Sahilgill24 to add @acul71 (Luca) and @bomanaps (Mercy) as collaborators to this project. They wish to contribute alongside on this important issue raised by rust-libp2p team. |
@acul71 : Please let us know if there are any bottlenecks faced in this PR. CCing @lla-dane and @sumanjeet0012. We have been advised to have this PR landed soon. |
@Sahilgill24 don't respond, and I don't think we have been added as collaborators. |
can you add me and @bomanaps as collaborator (to be able to push to your repo/branch) |
What was wrong?
Issue #572
How was it fixed?
This is currently the implementation of the MVP resource manager, more details about the implementation plan are added in the #572 itself.
1.) The main components of the resource manager are the scopes and the limits, so we will begin by just implementing them and then move on to others like metrics and garbage collection. The below diagram shows the folder structure
2.) A base ResourceManager class would be our main data structure similiar to the go-libp2p's struct and would be defined in the manager.py file and also include the logic for resource transfer from different scopes to their children scopes.
3.) Each scope would be a different Class as well in the scope.py file mimicking the structure of the go-libp2p's implementation and respectively writing the main functions corresponding to them.
4.) The limits for each scope would also be defined in the limits.py file along with the limiter interface. The allowlist.py file would manage the allowlists for all the scopes as well as contain the default parameters.
To-Do