-
Notifications
You must be signed in to change notification settings - Fork 385
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
RFC: feat(keys/client): support automatic gas calculation with -simulate test #3330
base: master
Are you sure you want to change the base?
Conversation
🛠 PR Checks Summary🔴 The pull request head branch must be up-to-date with its base (more info) Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):🟢 Maintainers must be able to edit this pull request (more info) ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! |
This would be a huge UX bump; just one concern: what if the price of gas is too high, and I as a user am not willing to pay at that moment, but rather wait for it to drop? For this, I would need an estimate for how much If
WDYT? On another note, I would love if we can set |
Addresses #1826 (and potentially resolves, if this can be seen as a good implementation?).
This PR implements gas calculations in a manner similar to what's described in this comment; but I'm making this PR as a proof of concept before moving ahead and adding tests and cleaning up the code.
What this PR enables, is to work locally with gnodev with
gnokey
commands as simple as the following:For how this works, here's a brief description from
gnokey maketx --help
:The objective is to take advantage of the fact we're now doing transaction simulation in
gnokey
, to try to use that for calculating the amount of gas used in the transaction.-gas-fee
is always 1gnot (as this field is ignored on-chain for now, anyway). How should it eventually be calculated? Should we ask the user for confirmation?crypto/keys/client
, so that other clients aside fromkeyscli
can modify them. Should we prefer something else?