-
Notifications
You must be signed in to change notification settings - Fork 14
cmd: add --da.grpc.gasprice optional flag #49
Conversation
Warning Rate Limit Exceeded@tuxcanfly has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 9 minutes and 47 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. WalkthroughThe code changes incorporate a new feature that allows setting a global Changes
Assessment against linked issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #49 +/- ##
==========================================
+ Coverage 73.02% 73.88% +0.85%
==========================================
Files 2 2
Lines 152 157 +5
==========================================
+ Hits 111 116 +5
Misses 28 28
Partials 13 13 ☔ 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.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files selected for processing (5)
- celestia/celestia.go (3 hunks)
- celestia/celestia_test.go (2 hunks)
- celestia_test.go (1 hunks)
- cmd/celestia-da/cmd.go (4 hunks)
- cmd/celestia-da/server.go (2 hunks)
Additional comments: 11
cmd/celestia-da/server.go (1)
- 17-23: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [20-35]
The addition of the
gasPrice
parameter to theserve
function and its subsequent use in theNewCelestiaDA
call is correctly implemented.cmd/celestia-da/cmd.go (3)
15-15: The new constant
grpcGasPriceFlag
is correctly defined for the CLI flag.27-27: The
gasPrice
flag is correctly added to the flag set with a default value of-1
.46-46: The
gasPrice
is correctly retrieved from the command flags and passed to theserve
function.celestia_test.go (1)
- 103-103: The
NewCelestiaDA
function call within theTestCelestiaDA
method correctly passes-1
for thegasPrice
to use the default value.celestia/celestia_test.go (3)
40-40: The
NewCelestiaDA
function call in the setup method is correctly updated to include thegasPrice
parameter.127-133: The new test case
Submit_existing_with_gasprice_global
correctly sets a globalgasPrice
and tests theSubmit
method.135-135: The new test case
Submit_existing_with_gasprice_override
correctly tests theSubmit
method with an overriddengasPrice
.celestia/celestia.go (3)
26-26: The
gasPrice
field is correctly added to theCelestiaDA
struct.31-35: The
NewCelestiaDA
function signature is correctly updated to accept thegasPrice
parameter.85-94: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [88-104]
The
Submit
method is correctly updated to handle thegasPrice
parameter and utilize thegasPrice
field if configured globally.
1295a60
to
b4a99f2
Compare
b4a99f2
to
ebc9e7a
Compare
Overview
This PR adds a new cli flag
--da.grpc.gasprice
that allows the service to configure a global gas price for all blob transactions. It defaults to-1
to use the default fees.Note that each transaction can override the global gas price by passing in a non-negative gas price to
Submit
.Fixes #47
Checklist
Summary by CodeRabbit
New Features
Bug Fixes
Refactor