-
Notifications
You must be signed in to change notification settings - Fork 432
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
Eth call variants #3824
Eth call variants #3824
Conversation
# Conflicts: # src/Nethermind/Nethermind.JsonRpc/Modules/Eth/EthModule.TransactionExecutor.cs
[ConfigItem( | ||
Description = "Defines whether the eth_call should be executed without taking base fee into consideration (in case when maxPriorityFeePerGas and maxFeePerGas are equal to zero).", | ||
DefaultValue = "false")] | ||
bool NoBaseFee { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't it be true by default?
new CallTxExecutor(_blockchainBridge, _blockFinder, _rpcConfig) | ||
public ResultWrapper<string> eth_call(TransactionForRpc transactionCall, BlockParameter? blockParameter = null) | ||
{ | ||
_rpcConfig.NoBaseFee = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are changing the config?
else | ||
{ | ||
return transaction.GasPrice.IsZero; | ||
} | ||
} | ||
else | ||
{ | ||
return transaction.GasPrice.IsZero; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simplify a bit
UInt256 value = transaction.Value; | ||
|
||
if (!noBaseFee || transaction.MaxFeePerGas > 0 || transaction.MaxPriorityFeePerGas > 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meaningful labels for bool checks
UInt256 senderBalance = _stateProvider.GetBalance(caller); | ||
if (!noValidation && ((ulong)intrinsicGas * effectiveGasPrice + value > senderBalance || | ||
senderReservedGasPayment + value > senderBalance)) | ||
if (!noBaseFee || !skipGasPricing) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meaningful labels for bool checks
Fixes | Closes | Resolves #4948
Changes:
Support various eth_call invocations post-1559. More information can be found here: ethereum/go-ethereum#23027.
Types of changes
What types of changes does your code introduce?
Put an
x
in the boxes that applyTesting
Requires testing
In case you checked yes, did you write tests??