### Understanding Gossipsub
#### ParallelChain's implementation
The parallelchain protocol uses gossipsub to publish messages to connected peers in the network. Peers will subscribe to a "mailbox" topic, a base64 encoded string of their own public address, as well as protocol topics like consensus and mempool.
#### Technical Understanding
Every peer maintains a mapping of connected peers, along with the topics they are subscribed to as shown below.

Peers will only publish message to **connected** peers who are subscribed to message's topic.
#### The Misunderstanding
But what happens if Peer A has to publish a message with the Topic C to Peer C?
In the case where 2 peers are unaware of each other ( In the example above, Peer A and C are not connected ), we would expect gossipsub to forward the message via a common peer ( Peer B ). We expect Peer B to forward the message via gossiping IHAVE and IWANT messages, as Peer B is aware of both peers' topics.
However, this assumption is incorrect and a misinterpretation of the gossipsub specifiction.
#### Clearing the Misunderstanding
When a network of peers are created, the network is formed per-topic. Gossipsub partition peers based on their topics.
Supposed you have 100 peers connected, and all 100 are subscribed to topic "consensus" and only 1 peer is subscribed to topic "C". Peers subscribed to "Consensus" do not forward any messages of topic "C", as this would be computationally intensive and poor design on large systems as mentioned in [this issue thread](https://github.com/libp2p/rust-libp2p/issues/3216#issuecomment-1747828794).
This means that if Peer A has to publish a message with the Topic C, an insufficient peers error would be returned and the message will never reach Peer C. Only Peer B will be able to successfully publish a message with Topic C as it is directly connected to Peer C.
On the other hand, if Peer A has to publish a message with Topic "Consensus", Peer B will receive the message, and eventually forward it to Peer C.
#### Moving Forward
As the parallelchain network expands, we would expect that the network will not be fully connected. A situation similar to the illustration above might occur, resulting in Messages not being received. Hence, there will be a need to expand mailbox topic networks from a singular peer to multiple peers.