Skip to content
Unverified Commit 23f6d27f authored by Bastian Köcher's avatar Bastian Köcher Committed by GitHub
Browse files

Do not send empty view updates to peers (#2233)



* Do not send empty view updates to peers

It happened that we send empty view updates to our peers, because we
only updated our finalized block. This could lead to situations where we
overwhelmed sub systems with too many messages. On Rococo this lead to
constant restarts of our nodes, because some node apparently was
finalizing a lot of blocks.

To prevent this, the pr is doing the following:

1. If a peer sends us an empty view, we report this peer and decrease it
reputation.

2. We ensure that we only send a view update when the `heads` changed
and not only the `finalized_number`.

3. We do not send empty `ActiveLeavesUpdates` from the overseer, as this
makes no sense to send these empty updates. If some subsystem is relying
on the finalized block, it needs to listen for the overseer signal.

* Update node/network/bridge/src/lib.rs

Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>

* Don't work if they're are no added heads

* Fix test

* Ahhh

* More fixes

Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>
parent 6cfab385
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment