-
Notifications
You must be signed in to change notification settings - Fork 61
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
feat: add a tx gasPrice Buffer to reduce INSUFFICIENT_TX_FEE cases #2692
feat: add a tx gasPrice Buffer to reduce INSUFFICIENT_TX_FEE cases #2692
Conversation
Signed-off-by: nikolay <n.atanasow94@gmail.com>
Signed-off-by: nikolay <n.atanasow94@gmail.com>
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.
Looking good.
One recommendation for coverage
Signed-off-by: nikolay <n.atanasow94@gmail.com>
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.
Good change.
None blocking suggestions that can be done in future PRs
- Move the
addPercentageBufferToGasPrice()
to a different util class (new one if necessary).formatter.ts
doesn't seem like the right location - Adopt the README suggestion
Signed-off-by: nikolay <n.atanasow94@gmail.com>
Signed-off-by: nikolay <n.atanasow94@gmail.com>
Signed-off-by: nikolay <n.atanasow94@gmail.com>
|
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.
LG.
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.
LGTM
…2692) * chore: add buffer Signed-off-by: nikolay <n.atanasow94@gmail.com> * chore: edit tests in order to fix code duplication warning Signed-off-by: nikolay <n.atanasow94@gmail.com> * chore: move the calculations to formatter.ts Signed-off-by: nikolay <n.atanasow94@gmail.com> * chore: fix readme Signed-off-by: nikolay <n.atanasow94@gmail.com> * chore: add utils class Signed-off-by: nikolay <n.atanasow94@gmail.com> * chore: fix sonarcloud issue Signed-off-by: nikolay <n.atanasow94@gmail.com> --------- Signed-off-by: nikolay <n.atanasow94@gmail.com> Signed-off-by: ebadiere <ebadiere@gmail.com>
Description:
Occasionally users observe an
INSUFFICIENT_TX_FEE
.This may be for insufficient gasLimit supply but occasionally it's due to a change in the exchange rate that results in the converted hbar value of the gasLimit not being sufficient.
This is hard to determine as it changes infrequently but also due to caching optimizations the relay may miss this.
Solution:
Add a configureable setting
GAS_PRICE_PERCENTAGE_BUFFER
that adds a percentage on top of the calculated network gasPrice.Note: This may be a band-aid option to improve user experience while exploring other longer-term options.
Related issue(s):
Fixes #2674
Notes for reviewer:
Checklist