maticnetwork / bor

Official repository for the Polygon Blockchain
https://polygon.technology/
GNU Lesser General Public License v3.0
986 stars 476 forks source link

eth: broadcast block to static and trusted peers as well #1258

Closed pratikspatil024 closed 3 weeks ago

pratikspatil024 commented 3 weeks ago

Description

The block is broadcasted to only Sqrt(peers) in geth. We observed that in case of validator-sentry architecture, the validator, sometime, might not receive a block which will force the validator to mine on his own, resulting in a reorg.

In this PR, we are making sure that the block will be broadcasted to all the static and trusted peers of a particular node.

Changes

Breaking changes

Please complete this section if any breaking changes have been made, otherwise delete it

Nodes audience

In case this PR includes changes that must be applied only to a subset of nodes, please specify how you handled it (e.g. by adding a flag with a default value...)

Checklist

Cross repository changes

Testing

Manual tests

Please complete this section with the steps you performed if you ran manual tests for this functionality, otherwise delete it

Additional comments

Please post additional comments in this section if you have them, otherwise delete it