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

Make it possible to set 0-value user-supplied resource manage limits #9564

Closed
Tracked by #9442
BigLep opened this issue Jan 19, 2023 · 1 comment
Closed
Tracked by #9442

Make it possible to set 0-value user-supplied resource manage limits #9564

BigLep opened this issue Jan 19, 2023 · 1 comment

Comments

@BigLep
Copy link
Contributor

BigLep commented Jan 19, 2023

Done Criteria

It is possible for user to set 0 in cfg.ResourceMgr.Limits and for it to set a zero when the go-libp2p resource manager is enabled.

Why Important

We should provide users with a way to do a hard block on certain resource usage within go-libp2p via Kubo config (e.g., block this specific peer).

Notes

Apply (https://github.com/libp2p/go-libp2p/blob/master/p2p/host/resource-manager/limit.go#L102 ) overrides any 0 value. In https://github.com/ipfs/kubo/blob/master/core/node/libp2p/rcmgr.go#L66, that means that any user-supplied override will be replaced by computed defaults.
I don't know the right place to fix this.
I created #9563 to at least make the situation clearer.

@BigLep
Copy link
Contributor Author

BigLep commented Feb 16, 2023

There is no more planned work on this specifically given:

  1. 0 means 0 as a result of feat!: rcmgr: Change LimitConfig to use LimitVal type libp2p/go-libp2p#2000 and bubbling go-libp2p 0.25 into Kubo.
  2. Override limits will be specified outside of Kubo config as part of Resource Manager: Remove ResourceMgr.Limits configuration from Kubo and use the default libp2p JSON file for it #9603

@BigLep BigLep closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant