-
Notifications
You must be signed in to change notification settings - Fork 925
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
refactor(blob)!: replace SubmitOptions with a GasPrice parameter #3094
Conversation
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.
What has happened with the order of gomock
import in /mocks/
?
2c97cf5
to
3c5f082
Compare
It looks like this is now correct, but I'm also not sure |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #3094 +/- ##
==========================================
- Coverage 51.96% 51.85% -0.12%
==========================================
Files 178 178
Lines 11206 11226 +20
==========================================
- Hits 5823 5821 -2
- Misses 4888 4906 +18
- Partials 495 499 +4 ☔ View full report in Codecov by Sentry. |
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.
I agree with the goal of making this path easier to use. IMO a user shouldn't have to explicitly specify their gas price, gas limit, or fee.
- If a user doesn't specify their gas price, the default gas price of .002 should be used.
- If a user doesn't specify their gas limit, one is estimated based on the transaction contents (i.e. blob sizes)
- If a user doesn't specify their fee, it is calculated based on fee = gasPrice * gasLimit.
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.
utACK
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.
also utack
If we're removing the ability to set gas limit, we need to be 100% the gas limit estimate is correct, as I have heard reports from teams that the estimated gas limit is lower than it actually should be. This is why wallets like Keplr multiply gas limit estimates 1.2x |
has this been tested? |
I just did and it worked for me celestia version
export NODE_STORE=$HOME/.celestia-light-mocha-4
celestia blob submit 0x6B656B 'kek' --gas.price 0.0069 --node.store $NODE_STORE
Semantic version: v0.13.0
Commit: e55e1c88708b46839867bcbbed9bcdd8a3ffa830
Build Date: Wed Feb 7 19:32:07 EST 2024
System version: arm64/darwin
Golang version: go1.21.1
{
"result": {
"height": 1126617,
"commitment": "cjtmIuILvB4ItexsJoHux/G6Yp15w6YmpSbXkSlS2ZE="
}
} |
How does this apply to the remainder of methods? context in this issue #3174 |
This PR modifies the blob interface to replace SubmitOptions with GasLimit. The reasoning here is that setting a gas price is a lot more intuitive/easier than calculating the fee and gas limit, which take cosmossdk and celestia-app imports to calculate without much effort. Related: rollkit/go-da#30
Based on a suggestion from @vgonkivs we alias float64 to be able to provide a default value, but now that its there I think we can just have float64 and the same constructor, as it doesn't change that much.
Breaks the API, cc @jcstein, @tuxcanfly, and @Ferret-san .
Closes #3053.