-
Notifications
You must be signed in to change notification settings - Fork 14
da: replace submit options with gas price #46
Conversation
Important Auto Review SkippedReview was skipped due to path filters WalkthroughThe recent update introduces configurable gas fees for transactions in the Celestia Node API. It allows clients to specify a gas price when submitting transactions, enabling them to influence the priority of their transactions within the network. This change addresses the need for flexible gas fee configurations, as requested in a feature proposal. 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 #46 +/- ##
==========================================
+ Coverage 71.52% 73.02% +1.49%
==========================================
Files 2 2
Lines 144 152 +8
==========================================
+ Hits 103 111 +8
Misses 28 28
Partials 13 13 ☔ View full report in Codecov by Sentry. |
8ebfea4
to
a650b09
Compare
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: 0
Configuration used: CodeRabbit UI
Files ignored due to filter (2)
- go.mod
- go.sum
Files selected for processing (3)
- celestia/celestia.go (3 hunks)
- celestia/celestia_test.go (2 hunks)
- specs/src/celestia-da.md (1 hunks)
Additional comments: 7
specs/src/celestia-da.md (1)
- 51-57: The documentation updates clearly explain the new
gasPrice
parameter's functionality and its effect onSubmitOptions
. This aligns with the code changes and provides the necessary information for users to understand how to use the updatedSubmit
function.celestia/celestia_test.go (3)
82-82: The update to the
Submit_empty
test case correctly adds agasPrice
of0
, which should use the default submission options.121-125: The update to the
Submit_existing
test case correctly adds agasPrice
of0
, which should use the default submission options.127-128: The addition of the
Submit_existing_with_gasprice
test case is a good practice to test the new functionality with a non-zerogasPrice
.celestia/celestia.go (3)
7-7: The import of
math
is necessary for the use ofmath.Ceil
in theSubmit
function to calculate the fee based on thegasPrice
.16-17: The new imports
sdktypes
andauth
are required for the updatedSubmit
function to calculate gas prices and limits.80-94: The
Submit
function has been correctly updated to handle the newgasPrice
parameter. The logic to calculateGasLimit
andFee
based on thegasPrice
is sound, and the use ofmath.Ceil
ensures that the fee is rounded up to the nearest integer.
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.
approved, but consider < 0
for a sentinel value!
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: 0
Configuration used: CodeRabbit UI
Files selected for processing (4)
- celestia/celestia.go (3 hunks)
- celestia/celestia_test.go (2 hunks)
- celestia/mock.go (1 hunks)
- specs/src/celestia-da.md (1 hunks)
Files skipped from review as they are similar to previous changes (3)
- celestia/celestia.go
- celestia/celestia_test.go
- specs/src/celestia-da.md
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: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- specs/src/celestia-da.md (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- specs/src/celestia-da.md
Overview
This PR upgrades go-da to v0.1.0 (pending release) which has a breaking change:
Submit
now accepts an additionalGasPrice
param which can be set to negative to use default options.Checklist
Fixes #29
Depends on:
Summary by CodeRabbit
New Features
Documentation
Tests
Submit
function calls.