Skip to content

new version of the stream handler that uses a compact representation per provide #871

@Jorropo

Description

@Jorropo

The current protobuf definition is backward, it allow to define multiple peer id per key and multiple addresses per peer id.
We also enforce that in the server handler.

This means that for 1 announcement we may send a few times more data just in multiaddr. Repeated over millions of CID this is a very wastefull use of resources.

We should create a new version of the stream handler which does not enforce that, instead of maddrs would be magically exchanged OOB (libp2p identify). This will help because it is not hard to have CIDs you host * K / total dht servers to be multiple orders of magnitude over 1, so the protocol should orient itself to batching CIDs or multihashes.
We could even have dedicated stream handler for ADD_PROVIDE and drop protobuf, instead it would be a pure stream of multihashes but this is maybe overkill.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions