erigon-pulse/consensus
battlmonstr 2e29ff33e1
bor: BroadcastNewBlock to all peers from validator nodes (#8030)
Currently PropagateNewBlockHashes and BroadcastNewBlock
selects a subset of all sentries by taking a `Sqrt(len(sentries))`,
and then for each sentry SendMessageToRandomPeers
selects a subset of its peers by taking `Sqrt(len(peerInfos))`.

This behaviour limits the broadcast scope with a lot of peers, e.g. 100
becomes 10,
but is not great with very few peers, or if the message is very
important
to broadcast to everyone, which is the case of bor validator/proposer
nodes.

* send to all sentries in both BroadcastNewBlock and PropagateNewBlockHashes
* remove peerCountConstrained sqrt logic in SendMessageToRandomPeers
* add maxPeers provider func as a parameter to MultiClient
* default it to 10 for eth and 0 (unlimited) for bor validators

---------

Co-authored-by: Mark Holt <mark@distributed.vision>
2023-08-23 14:28:39 +02:00
..
aura Snapshots of Bor events (#7901) 2023-08-18 17:10:35 +01:00
bor bor: BroadcastNewBlock to all peers from validator nodes (#8030) 2023-08-23 14:28:39 +02:00
clique Snapshots of Bor events (#7901) 2023-08-18 17:10:35 +01:00
ethash Snapshots of Bor events (#7901) 2023-08-18 17:10:35 +01:00
merge Snapshots of Bor events (#7901) 2023-08-18 17:10:35 +01:00
misc Introduce VerifyAbsenceOfCancunHeaderFields (#7953) 2023-08-02 09:34:30 +02:00
chain_reader.go Add FrozenBlocks function to chainReaders (#7866) 2023-07-10 17:35:27 +01:00
consensus.go Snapshots of Bor events (#7901) 2023-08-18 17:10:35 +01:00
errors.go Withdrawals part 1 (#6009) 2022-12-01 09:15:01 +01:00
result.go Clean up DEBUG category logs (#2776) 2021-10-05 08:14:04 +07:00