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

Stream blocks without internal transactions in reverse order #9461

Merged
merged 2 commits into from Mar 1, 2024

Conversation

k1rill-fedoseev
Copy link
Collaborator

@k1rill-fedoseev k1rill-fedoseev commented Feb 24, 2024

Motivation

Whenever there is a long backlog of blocks without fetched internal transactions, it makes sense to fetch them in block_number desc order instead of random as-is order, as more recent blocks likely contain more relevant information for the end user.
It may also lead to faster loading overall, as nearby blocks share most of the state Merkle Patricia tree, thus querying them sequentially from the same node may improve node's internal cache hit ratio.

Checklist for your Pull Request (PR)

@k1rill-fedoseev k1rill-fedoseev self-assigned this Feb 24, 2024
@k1rill-fedoseev k1rill-fedoseev marked this pull request as ready for review February 24, 2024 16:55
@vbaranov vbaranov merged commit 35409fa into master Mar 1, 2024
42 of 46 checks passed
@vbaranov vbaranov deleted the kf-pbo-order branch March 1, 2024 15: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.

None yet

3 participants