paritytech / polkadot-sdk

The Parity Polkadot Blockchain SDK
https://polkadot.network/
1.88k stars 687 forks source link

`bitfield-distribution`: use unbounded channels for own bitfields #825

Open sandreim opened 2 years ago

sandreim commented 2 years ago

Bitfield gossiping is handled here.

This would make availability faster in situations when the network-bridge is clogged by too many messages:

Screenshot 2022-05-12 at 13 01 16
eskimor commented 2 years ago

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.

drahnr commented 2 years ago

I think this is a short term solution, created for paritytech/polkadot-sdk#824 mid-term