Skip to content
This repository was archived by the owner on Jul 21, 2023. It is now read-only.

Add message forwarding capabilities #172

@raullaprida

Description

@raullaprida

Some distributed applications (e.g, swarm) require to forward messages to a certain peer via the DHT, instead of looking for closest peers and finally send the message directly to the recipient.
Also, there's a requirement to use a partial recipient address instead of the full address.
The recipient will know the message is for him/her because it can be decrypted successfully.

a new RPC Message type is added to the existing ones (SEND_MSG I proposed in my solution).

The recipient will also forward the message to avoid eavesdroppers to deduct which node is the recipient.

When to stop forwarding the message might be encoded in the message itself and could be some type of TTL. But new ideas can be discussed here.

What this brings:
No direct connection is required to send a message to a peer.
Routing of the message is done through kademlia
Ony the peer public key is required to send a message, the ID can be put partially, the whole ID is not required.

I have a reference implementation I made for my project ( I forked the module) and I will happily provide it as a PR if this feature is interesting for the community.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/supportA question or request for supportstatus/readyReady to be worked

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions