This PR implements an application-specific RPC inspector for GossipSubRouter. This is an optional and auxilary call-back method that can be set by the application so that all accepted RPCs are inspected and only approved ones resume processing.
When there is no inspected set, handling an accepted RPC goes as normal. This app-specific RPC inspector allows the application developer to:
Collect RPC statistics for application-level decision makings.
Implement application-level BFT mitigations at a lower level.
Implement application-specific white box tests involving the GossipSub.
This PR implements an application-specific RPC inspector for
GossipSubRouter
. This is an optional and auxilary call-back method that can be set by the application so that all accepted RPCs are inspected and only approved ones resume processing.When there is no inspected set, handling an accepted RPC goes as normal. This app-specific RPC inspector allows the application developer to: