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

core: use blockchain's block cache for headers #23299

Merged
merged 1 commit into from
Aug 3, 2021

Conversation

s1na
Copy link
Contributor

@s1na s1na commented Jul 29, 2021

When looking at #23277 I noticed that GetTransactionReceipt fetches the same block body twice and its header once from storage. This PR targets one of those, i.e. getting the header of a block when that block is already cached in Blockchain.

Alternatively I could warm the headerchain's cache when a block is cached.

This only saves one lookup for each block that's cached (when the header is not)..

Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@holiman holiman merged commit c38fab9 into ethereum:master Aug 3, 2021
@holiman holiman added this to the 1.10.7 milestone Aug 3, 2021
@s1na s1na deleted the header-from-block-cache branch August 3, 2021 17:01
sidhujag pushed a commit to sidhujag/go-ethereum that referenced this pull request Aug 4, 2021
atif-konasl pushed a commit to frozeman/pandora-execution-engine that referenced this pull request Oct 15, 2021
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.

3 participants