Skip to content

Commit

Permalink
feat(blocksync): sort peers by download rate & multiple requests for …
Browse files Browse the repository at this point in the history
…closer blocks (backport #2475) (#2575)

This is an automatic backport of pull request #2475 done by
[Mergify](https://mergify.com).


---


<details>
<summary>Mergify commands and options</summary>

<br />

More conditions and actions can be found in the
[documentation](https://docs.mergify.com/).

You can also trigger Mergify actions by commenting on this pull request:

- `@Mergifyio refresh` will re-evaluate the rules
- `@Mergifyio rebase` will rebase this PR on its base branch
- `@Mergifyio update` will merge the base branch into this PR
- `@Mergifyio backport <destination>` will backport this PR on
`<destination>` branch

Additionally, on Mergify [dashboard](https://dashboard.mergify.com) you
can:

- look at your merge queues
- generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com
</details>

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
  • Loading branch information
mergify[bot] and melekes authored Mar 11, 2024
1 parent 1dedb11 commit cd70243
Show file tree
Hide file tree
Showing 5 changed files with 292 additions and 97 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- `[blocksync]` Request a block from peer B if we are approaching pool's height
(less than 50 blocks) and the current peer A is slow in sending us the
block [\#2475](https://github.com/cometbft/cometbft/pull/2475)
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- `[blocksync]` Request the block N from peer B immediately after getting
`NoBlockResponse` from peer A
[\#2475](https://github.com/cometbft/cometbft/pull/2475)
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `[blocksync]` Sort peers by download rate (the fastest peer is picked first)
[\#2475](https://github.com/cometbft/cometbft/pull/2475)
Loading

0 comments on commit cd70243

Please sign in to comment.