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

feat: compute a better gas limit for recursive external contract calls #10128

Merged
merged 1 commit into from
Feb 5, 2023

Conversation

travisperson
Copy link
Contributor

@travisperson travisperson commented Jan 26, 2023

Related Issues

#10041

Proposed Changes

After running GasEstimateMessageGas in EthEstimateGas execute the message using CallWithGas to verify that the estimated gas limit (derived from the gas used) succeeds. If the message fails, double the gas limit till success is achieved (usually within 1), and then binary search to within 100,000 gas, always returning the last successful gas limit that succeeded.

Additional Info

Checklist

Before you mark the PR ready for review, please make sure that:

  • Commits have a clear commit message.
  • PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, test
    • area, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps
  • New features have usage guidelines and / or documentation updates in
  • Tests exist for new functionality or change in behavior
  • CI is green

@travisperson travisperson changed the base branch from master to release/v1.20.0 January 26, 2023 16:42
@travisperson travisperson force-pushed the feat/eth-estimate-gas branch 3 times, most recently from ffa906e to c3dddb7 Compare January 26, 2023 17:18
node/impl/full/eth.go Outdated Show resolved Hide resolved
@travisperson travisperson force-pushed the feat/eth-estimate-gas branch from c3dddb7 to d1aeec7 Compare January 26, 2023 18:22
@travisperson travisperson force-pushed the feat/eth-estimate-gas branch from d1aeec7 to a0c096d Compare January 27, 2023 18:01
@travisperson travisperson changed the title Feat/eth estimate gas feat: compute a better gas limit for recursive external contract calls Jan 27, 2023
@travisperson travisperson force-pushed the feat/eth-estimate-gas branch from 23ecc21 to 94c5fcb Compare January 31, 2023 14:16
@travisperson travisperson marked this pull request as ready for review January 31, 2023 14:36
@travisperson travisperson requested a review from a team as a code owner January 31, 2023 14:36
@travisperson travisperson force-pushed the feat/eth-estimate-gas branch 3 times, most recently from 7fae664 to 34c6b96 Compare January 31, 2023 17:11
Copy link
Contributor

@arajasek arajasek left a comment

Choose a reason for hiding this comment

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

Basically good to go, just some nits.

itests/fevm_test.go Outdated Show resolved Hide resolved
node/impl/full/eth.go Outdated Show resolved Hide resolved
node/impl/full/eth.go Outdated Show resolved Hide resolved
node/impl/full/eth.go Outdated Show resolved Hide resolved
node/impl/full/eth.go Outdated Show resolved Hide resolved
node/impl/full/eth.go Outdated Show resolved Hide resolved
node/impl/full/eth.go Outdated Show resolved Hide resolved
node/impl/full/eth.go Outdated Show resolved Hide resolved
node/impl/full/eth.go Outdated Show resolved Hide resolved
node/impl/full/gas.go Show resolved Hide resolved
@travisperson travisperson force-pushed the feat/eth-estimate-gas branch from 96fb19d to 30b1955 Compare February 1, 2023 18:44
@travisperson travisperson force-pushed the feat/eth-estimate-gas branch 2 times, most recently from d88eb75 to 7cc1bd7 Compare February 2, 2023 17:10
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.

2 participants