-
Notifications
You must be signed in to change notification settings - Fork 17
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: support multiple coins in bundles module #184
Conversation
Warning Rate Limit Exceeded@troykessler has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 7 minutes and 16 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 changes revolve around transitioning monetary-related fields to Changes
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 (
|
bc9ebeb
to
6e2b3b6
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.
Actionable comments posted: 2
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
x/bundles/types/events.pb.go
is excluded by!**/*.pb.go
Files selected for processing (6)
- app/upgrades/v1_5/upgrade.go (1 hunks)
- proto/kyve/bundles/v1beta1/events.proto (2 hunks)
- x/bundles/keeper/keeper_suite_valid_bundles_test.go (1 hunks)
- x/bundles/keeper/logic_bundles.go (9 hunks)
- x/bundles/types/expected_keepers.go (1 hunks)
- x/bundles/types/types.go (3 hunks)
Additional comments not posted (7)
x/bundles/types/types.go (2)
20-28
: The changes to theBundleReward
struct to usesdk.Coins
instead ofuint64
for various fields align with the PR's goal to support multiple coin types. This is a crucial update for handling multi-currency transactions and should work well with the Cosmos SDK's native support for multi-denominational coins.
54-54
: The update of theFundersPayout
field in theTallyResult
struct to usesdk.Coins
is consistent with the changes in theBundleReward
struct and necessary for the multi-coin support. This ensures that all parts of the system that deal with payouts can handle multiple currencies.x/bundles/types/expected_keepers.go (1)
52-52
: Changing theGetCoinWhitelist
method toGetCoinWhitelistMap
and altering its return type from a slice to a map is a significant improvement. This change will likely enhance performance by providing O(1) access time for coin data, which is beneficial for operations that need to frequently access these data.proto/kyve/bundles/v1beta1/events.proto (2)
5-6
: The addition of imports foramino/amino.proto
andcosmos/base/v1beta1/coin.proto
is necessary for the new functionality to handle multiple coin types in the events. These imports are essential for the protobuf definitions that use these types.
92-136
: The changes to theEventBundleFinalized
message to userepeated cosmos.base.v1beta1.Coin
for various reward-related fields are crucial for supporting multiple currencies. This allows the system to handle payouts in different coin types, which is a significant enhancement for the flexibility of the bundles module.x/bundles/keeper/logic_bundles.go (2)
Line range hint
234-295
: The refactoring of thecalculatePayouts
function to handlesdk.Coins
instead ofuint64
is a necessary change to support multiple currencies. The detailed implementation for handling different coin types, including the distribution of storage costs and rewards, is well-thought-out and should work effectively within the multi-coin framework.
Line range hint
361-409
: The updates to thefinalizeCurrentBundleProposal
function to handle multiple coin types in thefundersPayout
parameter and other related changes are well implemented. These changes are crucial for ensuring that the system can finalize bundles with payouts in multiple currencies, enhancing the module's flexibility.
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.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- x/bundles/keeper/keeper_suite_valid_bundles_test.go (1 hunks)
- x/bundles/keeper/logic_bundles.go (8 hunks)
Files skipped from review as they are similar to previous changes (2)
- x/bundles/keeper/keeper_suite_valid_bundles_test.go
- x/bundles/keeper/logic_bundles.go
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.
Actionable comments posted: 3
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (2)
x/bundles/types/params.pb.go
is excluded by!**/*.pb.go
x/funders/types/params.pb.go
is excluded by!**/*.pb.go
Files selected for processing (3)
- docs/static/openapi.yml (3 hunks)
- proto/kyve/bundles/v1beta1/params.proto (1 hunks)
- proto/kyve/funders/v1beta1/params.proto (1 hunks)
Additional comments not posted (3)
docs/static/openapi.yml (3)
33-42
: Descriptions and titles forstorage_provider_id
andcost
fields are clear and informative.
4432-4441
: Descriptions and titles forstorage_provider_id
andcost
fields are clear and informative.
4740-4745
: Description and title forcoin_weight
field are clear and informative.
This PR implements multiple coins for funding in the bundles module
Summary by CodeRabbit
New Features
Refactor
Documentation
storage_provider_id
,cost
, andcoin_weight
.