polkadot
polkadot copied to clipboard
`bitfield-distribution`: use unbounded channels for own bitfields
Bitfield gossiping is handled here.
- we can safely prioritise our own bitfields by sending them over the unbounded channel to the
network-bridge. - alternatively we can send all bitfields via unbounded channel, but we limit them by an arbitrary value per relay block (spam needs to also be considered); when the limit is reached we use the bounded channel.
This would make availability faster in situations when the network-bridge is clogged by too many messages:
If bitfields are lagging, this will reduce parachain block production and will thus help reduce load on nodes - which is good! If we want bitfields to propagate faster we have to look into performance optimizations, bypassing natural back pressure will likely make matters worse.
Prioritizing own bitfields might make sense, but I am still a bit uneasy about it. We need to make sure nodes are doing sensible stuff when close to overload. Bitfields in particular are a perfect point in the system to back-pressure, because almost no work will be wasted, things just get slower.
This means if we find bitifields to be delayed because of load on the network bridge, then we should be looking into reducing that load.
I think this is a short term solution, created for #5517 mid-term