Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: tuning the locator algorithm #3703

Merged
merged 1 commit into from
Nov 15, 2022

Conversation

driftluo
Copy link
Collaborator

@driftluo driftluo commented Nov 14, 2022

What problem does this PR solve?

This previous PR #3261 increased the locator length, but it didn't solve the problem

Take the current height as an example:
Current Algorithm:
[8480818...8480809, 8480807 ...4286507, 92203, 46101, 23050, 11525, 5762]
PR Algorithm:
[8480818...8480809, 8480807 ...4286507, 2143253, 1071626, 535813, 267906, 133953, 66976, 33488, 16744, 8372, 4186]

At the moment index < step * 2, too much data is skipped. This will cause a break in the download process, resulting in ibd not being able to be in a multi-node download state as much as possible.

What we want to do is, at the moment index < step * 2, turn on the right-shift decrement of the index directly, so that the data is not broken as much as possible

ref: #3668

Check List

Tests

  • Unit test
  • Integration test

Release note

Title Only: Include only the PR title in the release note.

@driftluo driftluo requested a review from a team as a code owner November 14, 2022 14:46
@driftluo driftluo requested review from doitian and removed request for a team November 14, 2022 14:46
@driftluo
Copy link
Collaborator Author

bors r+

@bors
Copy link
Contributor

bors bot commented Nov 15, 2022

@bors bors bot merged commit 23438c2 into nervosnetwork:develop Nov 15, 2022
@driftluo driftluo deleted the tuning-the-locator-algorithm branch November 15, 2022 09:15
@doitian doitian mentioned this pull request Nov 18, 2022
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.

2 participants