Skip to content

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

@BigLep

Description

@BigLep

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions