Skip to content

Estimate gas on pending block by default #8627

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

Merged
merged 3 commits into from
May 19, 2025

Conversation

fab-10
Copy link
Contributor

@fab-10 fab-10 commented May 14, 2025

PR description

First PR of a series that improve gas estimations.

When calling eth_estimateGas is the block number or tag parameter is not present, then default to pending instead of latest to improve the accuracy, since the estimation if for inclusion in the next block.

Comparing this PR with current main branch, using https://github.com/Consensys/compate-estimate-gas-plugin, there are less under estimations:

BesuNightly 11434
BesuPR8627 11276

more improvements will be part of following PRs

Fixed Issue(s)

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:

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

@fab-10 fab-10 marked this pull request as ready for review May 14, 2025 09:41
@@ -8,6 +8,7 @@
### Additions and Improvements
- `--Xplugin-rocksdb-blockchain-blob-garbage-collection-enabled` Adds ability to enabled BlobDB GC for BLOCKCHAIN column family [#8599](https://github.com/hyperledger/besu/pull/8599)
- `--Xplugin-rocksdb-blob-garbage-collection-age-cutoff`, `--Xplugin-rocksdb-blob-garbage-collection-force-threshold` BlobDB GC config options [#8599](https://github.com/hyperledger/besu/pull/8599)
- Estimate gas on pending block by default [#8627](https://github.com/hyperledger/besu/pull/8627)
Copy link
Contributor

Choose a reason for hiding this comment

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

is there a use-case for needing the previous behavior? ie is this a breaking change for some segment of users?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I do not think so, because this can be seen as the correct behavior, so kind of a bug fix

@macfarla macfarla added the doc-change-required Indicates an issue or PR that requires doc to be updated label May 19, 2025
fab-10 added 3 commits May 19, 2025 12:16
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
@fab-10 fab-10 force-pushed the improve-estimate-gas1 branch from 345a195 to d34223c Compare May 19, 2025 10:17
@fab-10 fab-10 enabled auto-merge (squash) May 19, 2025 10:19
@fab-10 fab-10 merged commit a9c75e1 into hyperledger:main May 19, 2025
48 checks passed
@fab-10 fab-10 deleted the improve-estimate-gas1 branch May 19, 2025 10:45
@alexandratran alexandratran removed the doc-change-required Indicates an issue or PR that requires doc to be updated label May 19, 2025
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