Skip to content

Gossipsub Hello RPC not spec compliant #6271

@dennis-tra

Description

@dennis-tra

Summary

I'm currently extending Nebula to also track the GossipSub topics that the remote peer is subscribed to. To do that I'm waiting for the remote peer to open a GossipSub stream and send the hello RPC which contains the list of subscribed topics.

I noticed that for Lighthouse peers the list only contained a single entry. Turns out that each topic subscription is sent as an individual messaage:

for topic_hash in self.mesh.clone().into_keys() {
self.send_message(peer_id, RpcOut::Subscribe(topic_hash));
}

This is, I guess, not a big issue when it comes to interoperability but it's not spec compliant:

Whenever a new peer is connected, the gossipsub implementation checks to see if the peer implements floodsub and/or gossipsub, and if so, it sends it a hello packet that announces the topics that it is currently subscribing to.

Expected behavior

I would expect that the initial RPC packet contains all topics that a peer is subscribed to.

Actual behavior

The topics that a peer is subscribed to are split across multiple RPCs.

Relevant log output

Possible Solution

No response

Version

No response

Would you like to work on fixing this bug?

Maybe

cc @cortze

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions