This repository was archived by the owner on Apr 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 585
More precise gasWanted
#1287
-
Proposal:
Use more precise bounds for gasWanted via constant time estimates and/or linear time amortization analysis.
Current behavior:
Right now, it uses the user's set gas limit or capping it by an arbitrary number:
Line 201 in 8e2c652
gasWanted += txData.GetGas()
In the future with ABCI++, it may be possible to use gasUsed, but that's not possible now.
Desired behavior:
Ideally, Ethermint could use more tighter bounds without the full EVM execution:
- some constant checks: https://github.com/ethereum/go-ethereum/blob/3e693e1ef6e2da69847a30a14808b327aa07060e/internal/ethapi/api.go#L1022 (many of those are more for max bounds but there may be some more precise / more meaningful values taken from the state)
- linear time analysis: https://www.cs.cmu.edu/~ankushd/docs/move20.pdf (there may be others such as https://arxiv.org/abs/1912.11929 but not sure about their complexity )
Use case:
- better block utilization
- less likely to go over the maximum block gas limit
Requests may be closed if we're not actively planning to work on them.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment