Skip to content

feat(blocksync): sort peers by download rate & multiple requests for closer blocks (backport #2475)#2575

Merged
melekes merged 1 commit intov1.xfrom
mergify/bp/v1.x/pr-2475
Mar 11, 2024
Merged

feat(blocksync): sort peers by download rate & multiple requests for closer blocks (backport #2475)#2575
melekes merged 1 commit intov1.xfrom
mergify/bp/v1.x/pr-2475

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Mar 11, 2024

This is an automatic backport of pull request #2475 done by Mergify.


Mergify commands and options

More conditions and actions can be found in the documentation.

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 you can:

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

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

…closer blocks (#2475)

It can be reviewed commit by commit.

1. Request the block N from peer B immediately after getting
`NoBlockResponse` from peer A
a718fb4
2. Sort peers by download rate (the fastest peer is picked first)
cf19851
3. 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
e06ebfe
e97007f

Closes #2379

### Benchmarks

Osmosis:

without this PR (baseline): 11.45m
with this PR: 7.29m
~ 36% decrease

---

#### PR checklist

- [x] Tests written/updated
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec

(cherry picked from commit f8366fc)
@mergify mergify bot requested a review from a team as a code owner March 11, 2024 12:52
@mergify mergify bot requested a review from a team March 11, 2024 12:52
@melekes melekes merged commit cd70243 into v1.x Mar 11, 2024
@melekes melekes deleted the mergify/bp/v1.x/pr-2475 branch March 11, 2024 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant