-
Notifications
You must be signed in to change notification settings - Fork 29
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: storage-cost per storage-provider #172
Conversation
WalkthroughThe recent updates focus on enhancing the storage cost management and parameter handling in the application. New functions and structures have been introduced to facilitate migrations and parameter updates, especially for the Changes
Recent Review DetailsConfiguration used: CodeRabbit UI Files selected for processing (2)
Files skipped from review as they are similar to previous changes (1)
Additional Context UsedLanguageTool (22)
Additional comments not posted (1)
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 (
|
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
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
Out of diff range and nitpick comments (1)
app/upgrades/v1_5/upgrade.go (1)
38-75
: The implementation ofmigrateStorageCosts
correctly handles errors and the migration logic is sound. Consider adding a comment or documentation clarifying that all storage providers will have the same storage cost post-migration, as this might be an important assumption for future maintainers or users of the system.
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.
A Go map can not be used for proto marshalling because the iterator is not deterministic. This needs to be changed to an array.
I would then recommend to just build a get and set function which just iterates the array.
Because it's marshalled into one proto object and always gets loaded and stored as a whole, the O(n) for the small in memory list iteration is negligible.
Summary by CodeRabbit
New Features
Documentation
Bug Fixes
Refactor
x/bundles
module to utilize a map structure for storage costs, enhancing flexibility and scalability.