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

improve fork detection performance #115

Merged
merged 9 commits into from
Aug 26, 2024

Conversation

pk910
Copy link
Member

@pk910 pk910 commented Aug 24, 2024

Drastically reduced fork detection processing time by:

  • simplified the fork detection logic (only detect forks in currently processed block, instead of scanning the whole block range)
  • added a parentRoot->Block map to the block cache (heavily used by fork detection to update subsequent blocks).

fixes #114

@pk910 pk910 force-pushed the pk910/fix-fork-detection-performance branch from d575598 to 97b2666 Compare August 24, 2024 19:53
@pk910 pk910 force-pushed the pk910/fix-fork-detection-performance branch from 97b2666 to 9844958 Compare August 24, 2024 19:54
@pk910 pk910 marked this pull request as ready for review August 24, 2024 20:34
@pk910 pk910 requested a review from skylenet August 24, 2024 20:34
@pk910 pk910 force-pushed the pk910/fix-fork-detection-performance branch from 813f8ad to fbc38ae Compare August 25, 2024 21:10
@pk910 pk910 force-pushed the pk910/fix-fork-detection-performance branch from fbc38ae to dda9d01 Compare August 25, 2024 21:11
@pk910 pk910 merged commit 8446512 into master Aug 26, 2024
3 checks passed
@pk910 pk910 deleted the pk910/fix-fork-detection-performance branch August 26, 2024 09:34
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.

Fork detection takes too long to keep up with the chain during long unfinality
2 participants