-
Notifications
You must be signed in to change notification settings - Fork 375
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
[chain] Gas Estimations #1826
Comments
Note that at the time of writing, The reason I'm writing here, though, is relating to the latest work undertaken in #1702, which improves the UX for simulating transactions on it seems to me that the approach you quoted @zivkovicmilos with (I think we can still reasonably provide something like For what concerns test4; after #1702 is merged, I propose setting up a "gas estimation system" which would work as follows:
|
@thehowl We need to have an estimation endpoint on the node and not (just) on the indexer because we actually want to "simulate" transactions which are unsigned, and have no specified gas values yet. Gas price delegation to the indexer makes sense, since this value is actually historical, while the estimation depends on the VM |
To be clear, the output of this effort is an endpoint that the user can call? |
Description
This effort covers the introduction of gas estimation functionality for transactions.
Copied from an issue on the Gno repo:
For users to send transactions that will eventually be committed to the Gno chain, they essentially need to provided 2 pieces of information gas-wise:
Currently, gas estimation is not possible for a client application interacting with gno, and therefore applications and users need to guess the gas limit. If they guess incorrectly (too low), their transaction is rejected as being underpriced.
Additionally, there is the problem of gas fees being fixed to 1GNOT (
1000000ugnot
), as outlined in issue #649.Ethereum has support for gas estimations with the following RPC endpoints:
eth_estimateGas
- returns the lowest gas limit at which the transaction is successful. It finds the lowest value by doing a binary search over the gas range, and executing the transaction for each (middle) value in that rangeeth_gasPrice
- returns the current average gas price for a (any) transaction, in wei. Usually, this average is implemented as a rolling average value, and is tied temporally to the node serving the call (the average is reset when the node is restarted)Successful outcome of this effort:
The text was updated successfully, but these errors were encountered: