Skip to content

Prevent Routing.Type=auto from enabling dhtserver mode if have too low of limits #9548

@BigLep

Description

@BigLep

Done Criteria

A Kubo node with Routing.Type=auto doesn't attempt to be a DHT server if the following additional conditions aren't met:

  1. Swarm.ResourceMgr.System.ConnsInbound > 800 AND
  2. Swarm.ResourceMgr.System.StreamsInbound > 800 AND
  3. Swarm.ResourceMgr.Protocol.kaddht.StreamsInbound > 800 AND
  4. Swarm.ConnMgr is enabled

(Existing logic of ensuring the node is publicly dialable will still apply.)

Why Important

If a "dhtserver" node advertises itself to the DHT but has too-low of hard Swarm.ResourceMgr limits, then it won't be able to function and be of value to the DHT and instead degrades performance.

Notes

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