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

Fix BlockchainQueries::gasPrice when chain head block body still not fully persisted #7482

Merged
merged 2 commits into from
Aug 19, 2024

Conversation

fab-10
Copy link
Contributor

@fab-10 fab-10 commented Aug 19, 2024

PR description

As well explained by @matthew1001 here, since in PR #7102, the current chain head is correctly included in the computation of the gasPrice, it could happen that the chain head block body is still not persisted, so in order to always retrieve it successfully we first try optimistically, then if not found, the new getBlockBodySafe that is synchronized and so will wait until the pending persist operation is done.

Fixed Issue(s)

fixes #7287

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests

@fab-10 fab-10 force-pushed the fix-blockchainQueries-getPrice branch from 81bf4fd to 444cd7d Compare August 19, 2024 11:51
@fab-10 fab-10 changed the title Fix BlockchainQueries::getPrice when chain head block body still not fully persisted Fix BlockchainQueries::gasPrice when chain head block body still not fully persisted Aug 19, 2024
@fab-10 fab-10 marked this pull request as ready for review August 19, 2024 11:59
Copy link
Contributor

@matthew1001 matthew1001 left a comment

Choose a reason for hiding this comment

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

LGTM @fab-10

Signed-off-by: Fabio Di Fabio <[email protected]>
@fab-10 fab-10 merged commit 0dffe63 into hyperledger:main Aug 19, 2024
40 checks passed
@fab-10 fab-10 deleted the fix-blockchainQueries-getPrice branch August 19, 2024 13:20
cloudspores pushed a commit to cloudspores/besu that referenced this pull request Aug 23, 2024
…fully persisted (hyperledger#7482)

* Fix BlockchainQueries::gasPrice when chain head block body still not fully persisted

Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Ade Lucas <[email protected]>
gconnect pushed a commit to gconnect/besu that referenced this pull request Aug 26, 2024
…fully persisted (hyperledger#7482)

* Fix BlockchainQueries::gasPrice when chain head block body still not fully persisted

Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: gconnect <[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.

eth_gasPrice ERROR Could not retrieve block
2 participants