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

[WIP] Optimize reindex process #1334

Closed
wants to merge 9 commits into from

Conversation

furszy
Copy link

@furszy furszy commented Feb 14, 2020

This is on top of #1333 and #1332 . (First three commits).

Several changes:

  • Make reindex/import use AcceptBlock rather than ProcessNewBlock, so activation of the resulting best chain is delayed.
  • That delayed activation is handled by the existing "Activating best chain" step in the startup process, which is moved to ThreadImport.
  • Optimize ActivateBestChain to not walk the entire chain to find the most work chain to connect for each block (O(n^2) -> O(n)).

More information in upstream@7917.


Current issues: seems that the reindex process starts the sync all over once it's completed.

@furszy furszy self-assigned this Feb 14, 2020
@random-zebra random-zebra modified the milestones: Future, 5.0.0 Apr 20, 2020
@furszy furszy modified the milestones: 4.2.0, 5.0.0 Jun 29, 2020
@furszy
Copy link
Author

furszy commented Oct 14, 2020

Closing this PR for now, some of the commits were already merged in other PRs and the reindex re work needs more time.

@furszy furszy closed this Oct 14, 2020
@Fuzzbawls Fuzzbawls removed this from the 5.0.0 milestone Dec 4, 2020
@furszy furszy deleted the 2020_optimized_reindex branch November 29, 2022 14:25
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.

None yet

3 participants