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)..

holiman
holiman approved these changes Aug 2, 2021
Copy link
Contributor

@holiman holiman left a comment

LGTM

@holiman holiman merged commit c38fab9 into ethereum:master Aug 3, 2021
1 of 2 checks passed
@holiman holiman added this to the 1.10.7 milestone Aug 3, 2021
@s1na s1na deleted the header-from-block-cache branch Aug 3, 2021
sidhujag added a commit to sidhujag/go-ethereum that referenced this issue Aug 4, 2021
reds pushed a commit to reds/go-ethereum that referenced this issue Aug 28, 2021
i-norden added a commit to vulcanize/go-ethereum that referenced this issue Sep 10, 2021
atif-konasl added a commit to lukso-network/pandora-execution-engine that referenced this issue 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
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants