Open yhassanzadeh13 opened 4 months ago
In principle this is fine, as it can allow application specific extensions to the protocol; this is useful for testing and early adoption as a path to standarization. It is also in line with the philosophy of extensibility in the protocol.
However, i think that just sending control messages is insufficient. We also need a way to process incoming custom control messages.
In principle this is fine, as it can allow application specific extensions to the protocol; this is useful for testing and early adoption as a path to standarization. It is also in line with the philosophy of extensibility in the protocol.
Thanks, I'll then proceed with the PR.
We also need a way to process incoming custom control messages.
I believe processing incoming messages has already been implemented through the RPC inspector set by the application layer, as shown in this link: https://github.com/libp2p/go-libp2p-pubsub/pull/509. Are you considering a different functionality?
Oh right, i forgot! No, i think it is sufficient.
Created the PR: https://github.com/libp2p/go-libp2p-pubsub/pull/562
@vyzo a gentle reminder for this issue; the PR is ready pending a review; thanks! https://github.com/libp2p/go-libp2p-pubsub/pull/562
ah sorry, i forgot!
Is it possible to have a tagged release of the master
head (inclusive of https://github.com/libp2p/go-libp2p-pubsub/pull/562)?
sure, will make a patch release.
Description
Proposal: Introduce a new function,
SendControl
, to theGossipSubRouter
that allows the application layer to send direct control messages to a peer. This feature will primarily be used to develop finer-grained testing. Flow blockchain currently uses this feature quite extensively.Proposed Function
Sample implementation on my forked version.
Rationale
Adding this function does not break encapsulation drastically. It is available at the router-level, meaning it is only accessible if the application layer creates a router and passes it to a pubsub instance, rather than creating a gossipsub instance directly. This ensures controlled usage and maintains the integrity of the encapsulation.
Benefits
I can make the PR upon a soft approval.