lighthouse icon indicating copy to clipboard operation
lighthouse copied to clipboard

Remove deficit gossipsub scoring during topic transition

Open AgeManning opened this issue 3 years ago • 0 comments

Description

When we fork, we transition between gossipsub topics. We remain subscribed to old topics to keep track of any stragglers. As the optimal case involves everyone shifting to new topics, we would expect little to no messages being sent along the old topics.

This poses an issue for gossipsub scoring which expects a minimum number of messages to be sent on a given topic. Thus peers that left on the mesh on old topics get penalized for not sending us the expected minimum number of messages. This can result in disconnecting and potentially banning of honest peers.

In the event of a fork or topic transition, we should adjust the scoring parameters such that we eliminate the minimum deficit value indicating that it is perfectly fine to receive no messages on that topic. We can use this function: https://github.com/libp2p/rust-libp2p/blob/master/protocols/gossipsub/src/behaviour.rs#L900 to achieve this.

The network crate mainly controls the fork-switching logic, so it may need to inform the behaviour of when to adjust the scoring for topics.

AgeManning avatar Jun 03 '22 02:06 AgeManning