-
Notifications
You must be signed in to change notification settings - Fork 20k
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
Transactions with maxFeePerGas
or gasPrice
less than baseFeePerGas
rejected only when gas
is missing
#24661
Comments
I kind of thins this works as expected, though maybe a bit unintuitive:
So, all in all the question I think is whether we should reject a small gas price for all transactions or not. I think way back we did that, but then it may not allow you to deliberately send transactions with lower prices than current network climate. That would be bad too. TL;DR I kind of think it's correct the way it is. |
@karalabe Thanks for the response.
If a user wants to estimate the gas usage of a transaction, why would the gas price need to be relevant? Wouldn't it be most intuitive to ignore gas prices for estimates of gas usage? |
@MicaiahReid GasPrice can be used to check if the sender has enough funds to cover the cost. |
You're kind of right, intuitively. However, if we want to simulate a transaction in a block, the gasPrice is relevant, because it's "visible" on-chain, and it also affects the balance which is also visible on-chain, and also needs to be correct related to the basefee. So it's not directly relevant, but it still needs to be set correctly even for estimation purposes. |
It's interesting that we do allow a tx which can never ever be included in a block:
I guess we allow |
While we agree this issue is unfortunate, it's a consequence of how transactions are handled:
|
@fjl Yes, I understand that when The block the transaction will eventually be included in will rarely be the same block that is used to estimate the transaction's
Even when |
Hi MicaiahReid, this is kind off the topic but may I know how to set baseFeePerGas=0? I tried setting it in |
@RippleLeaf I think it may be more appropriate to open up a discussion question over at Truffle so I can help you with that 😄 |
@RippleLeaf Did you manage to open a ticket over at Truffle as MicaiahRedi suggested? |
Hi @staminna, yes I opened a discussion thread here. Hope this would be helpful! |
Also the gas price and base fee are available in the EVM so different
values can result in different executions.
…On Thu, Apr 28, 2022, 10:27 rjl493456442 ***@***.***> wrote:
@MicaiahReid <https://github.com/MicaiahReid> GasPrice can be used to
check if the sender has enough funds to cover the cost.
—
Reply to this email directly, view it on GitHub
<#24661 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA7UGPSBEM3LE7TL2CEBSLVHJDVRANCNFSM5SZ647KQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thanks for all the work you do! Hopefully this issue is clear.
System information
Geth version:
1.10.18-unstable
, also tested with1.10.15-stable
OS & Version: Linux Ubuntu 20.04
Commit hash : (if
develop
)763b3f8d1f93b57795dd33b35e8b97ef9b9da99f
Expected behaviour
When sending a transaction with
maxFeePerGas
/gasPrice
<baseFeePerGas
and omittinggas
, error in a way that points to the problem of the missinggas
field.Or don't require a
gas
field to be specified in cases wheremaxFeePerGas
orgasPrice
are lower thanbaseFeePerGas
.Actual behaviour
Sending a transaction with no
maxFeePerGas
/gasPrice
and nogas
field, the transaction is accepted.Sending a transaction with
maxFeePerGas
/gasPrice
<baseFeePerGas
and nogas
field, the transaction is rejected with an error suggesting that the effective gas price being lower thanbaseFeePerGas
is the reason for the failure.Sending a transaction with
maxFeePerGas
/gasPrice
<baseFeePerGas
and thegas
field specified, the transaction is accepted.Steps to reproduce the behaviour
The text was updated successfully, but these errors were encountered: