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

Optimization for eth_call use of blockHeader <> hash #4924

Merged
merged 8 commits into from
Jan 16, 2023

Conversation

macfarla
Copy link
Contributor

Optimization for eth_call

  • previously was getting header, getting blockHash, creating ChainHead with hash, and then getting header by hash again - and under load, sometimes, was getting null for the header by hash - even though we know there is a header because that's how we got the hash in the first place. This is what caused the occasional 'block not found' errors per Race condition in JsonRpcExecutor #4192
  • refactor to store the header on ChainHead and get the hash when needed

Fixes #4192

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if
    updates are required.

Changelog

@macfarla macfarla enabled auto-merge (squash) January 16, 2023 03:50
@macfarla macfarla merged commit 1190250 into hyperledger:main Jan 16, 2023
@macfarla macfarla deleted the eth_call_by_header branch February 7, 2023 06:17
elenduuche pushed a commit to elenduuche/besu that referenced this pull request Aug 16, 2023
* refactor eth_call to use chain head header directly

Signed-off-by: Sally MacFarlane <[email protected]>
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
* refactor eth_call to use chain head header directly

Signed-off-by: Sally MacFarlane <[email protected]>
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.

Race condition in JsonRpcExecutor
2 participants