I want to know whether there is any way of deciding at the application level which peers we want to forward or gossip a message to? This is related to TopicValidator which delivers to the application but does not forward to the network
Use case: We essentially have a network that is split into two separate sides, with a specific set of nodes (called “staked ANs”) act as the gatekeepers between one side of the network and the other.
I want to allow messages on certain topics to pass from the right side of the network to the left side, and I want NO messages to pass from the left to the right.
Originally, we were thinking we could accomplish this using Topic Validators, as discussed in the post above. However, there are two concerns here.
- Will this impact how nodes on the left side score the staked ANs? They would notice that the staked AN’s are dropping all their messages, and hence would decrease their score right?
- How can we control which topics to allow messages to pass from the right to the left? For topics we don’t want messages to pass through, we need some way of only forwarding / gossipping them back to the right side of the network (we also cannot just drop them entirely once we receive them or else nodes on the right side will decrease our score).
Abstractly, these two concerns are the same:
We need a mechanism where, given a message, we can filter out nodes that we don’t want to forward or gossip about the message to.
A more subtle point: To be fully secure, we probably also want some mechanism so that if the nodes on the left side of the network sends an IWANT request for a message that we received but that was never forwarded / gossiped to that side of the network (and hence is a message the left side of the network should not know about), we ignore / act as if that message doesn’t exist.