You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #1221 from keep-network/channel-channel-channel
BroadcastChannel: improve delivery rate
Two changes to improve the delivery rate of messages.
Create separate broadcast channel for DKG execution
BroadcastChannel libp2p implementation synchronizes on mutex when publishing message to the pubsub and when firing handlers. When we had one channel for the given list of stakers used for all group operations, it could happen that it was used at the same time for DKG and relay entry
signing if the same list of stakers was selected to a new group. As a result, some messages could not reach the destination because mutex synchronization was slowing down message exchange and the given phase could end before all messages were sent and delivered.
This change separates DKG from relay entry signing. We create a temporary channel, just for DKG. The name of the final channel for a group is a group public key in a compressed form and that final channel is used always for every single relay entry signing.
Initialize channel unmarshallers as early as possible
We are sometimes running into a situation when relay entry signing or DKG result publication channel handlers are not yet initialized when the first message is sent by other members.
This change moves initialization of entry signing and DKG result publication protocol handlers a bit earlier.
0 commit comments