core, internal: support various eth_call invocations post 1559#23027
Merged
karalabe merged 1 commit intoethereum:masterfrom Jun 11, 2021
karalabe:1559-call
Merged
core, internal: support various eth_call invocations post 1559#23027karalabe merged 1 commit intoethereum:masterfrom karalabe:1559-call
karalabe merged 1 commit intoethereum:masterfrom
karalabe:1559-call
Conversation
rjl493456442
approved these changes
Jun 10, 2021
Member
rjl493456442
left a comment
There was a problem hiding this comment.
LGTM.
One additional request, we have one similar things checkNonce in the core.Message. In the eth_call we disable the nonce checking. Would be nice to unify these two things. I think we can also move this check_nonce to the config object.
12 tasks
12 tasks
19 tasks
gzliudan
added a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Nov 1, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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_callfor 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
BASEFEEopcode 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.