go-spacemesh
go-spacemesh copied to clipboard
p2p: gossip traffic prioritization
Description
for genesis, we are not implementing phased poet servers. so it's very likely that ATXs will be completed/published at the same time. in p2p, we need to prioritize different gossip messages. for example. hare messages are time-sensitive so should have the highest prioritization.
@noamnelke @dshulyak please elaborate the exact prioritization of our message and maybe give more detailed implementation instructions if possible.
this will need to be implemented in the gossipsub fork if we will do it before genesis
before trying to implement priority queuing (it would require forking gossipsub, or custom streaming protocol), we should try to use two (or three) separate routers:
- fast router for hare and proposals (uses flood and eager push)
- slow router for atxs and beacon (only lazy pull)
- maybe separate txs into another slow router (also only lazy pull)
the goal is to reduce duplicate atxs and beacon messages in the gossip, and also don't share queues that are used for protocol and transactions.