core, internal: support various eth_call invocations post 1559 #23027
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes
eth_call
for various combinations of pre/post 1559 and various gas parametrization.The two major use cases we need to cover from a UX perspective are:
The solution the PR employs is that if the user doesn't specify any gas price (either the old field or any of the new ones), we assume they only want to read and do not care about execution, so we disable the baseFee accounting. If on the other hand the user does specify any of the gas price fields, we keep the baseFee check live as the assumption is the user wants to dry run a transaction execution. In either case, the
BASEFEE
opcode is left untouched, since the goal is to allow simpler execution, but not to mess with execution results.1. Prior to 1559, if you don't specify a gas price, 0 is used and you can call with no-balance accounts.
2. Prior to 1559, if you do specify a gas price, that is used and your account balance is checked against it.
3. Prior to 1559, if you do specify a 1559 gas pricing, those get ignored and you revert to gasPrice = 0.
4. After 1559, if you don't specify a gas price, 0 is used and you can call with no-balance accounts. The basefee is forced to zero!
5. After 1559, if you do specify a gas price, that is interpreted as both the max and priority fee and your account balance is checked against them + the current base fee.
6. After 1559, if you do specify a 1559 gas pricing, those are interpreted as specified (no auto filling of missing ones) and your account balance is checked against them + the current basefee.
The PR also updates web3js (console) to support setting decimal 1559 call parameters on eth_call variants.