-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add UpdateParams
to attribute module
#1987
Add UpdateParams
to attribute module
#1987
Conversation
WalkthroughThis update brings a significant enhancement to the project by introducing an 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 (
|
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
Outside diff range and nitpick comments (4)
CHANGELOG.md (4)
Line range hint
109-355
: Consider using a consistent style for unordered lists. The markdown file uses dashes (-
) instead of asterisks (*
). While both are valid, using a consistent style improves readability and maintainability of the document.- - message #<issue-number> + * message #<issue-number>
Line range hint
229-229
: It's recommended to use Markdown link syntax instead of bare URLs for better readability and to provide descriptive link text which improves accessibility.- https://github.com/provenance-io/provenance/issues/1772 + [Issue #1772](https://github.com/provenance-io/provenance/issues/1772)Also applies to: 260-260, 359-359, 409-409, 421-421, 437-437, 508-508, 519-519, 527-527, 563-563, 588-588, 600-600, 646-650, 697-697, 738-738, 791-791, 904-904
Line range hint
946-946
: Remove unnecessary spaces inside emphasis markers to maintain proper Markdown formatting.- * ` MsgUpdateParamsRequest ` + * `MsgUpdateParamsRequest`
Line range hint
342-342
: Remove unnecessary spaces inside code span elements to maintain proper Markdown formatting.- ` provenanced query account ` + `provenanced query account`
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (2)
x/attribute/types/attribute.pb.go
is excluded by!**/*.pb.go
x/attribute/types/tx.pb.go
is excluded by!**/*.pb.go
Files selected for processing (12)
- CHANGELOG.md (1 hunks)
- client/docs/swagger-ui/swagger.yaml (1 hunks)
- proto/provenance/attribute/v1/attribute.proto (1 hunks)
- proto/provenance/attribute/v1/tx.proto (3 hunks)
- x/attribute/client/cli/tx.go (4 hunks)
- x/attribute/keeper/keeper.go (3 hunks)
- x/attribute/keeper/msg_server.go (1 hunks)
- x/attribute/keeper/msg_server_test.go (1 hunks)
- x/attribute/types/events.go (2 hunks)
- x/attribute/types/msgs.go (2 hunks)
- x/attribute/types/msgs_test.go (2 hunks)
- x/marker/client/cli/cli_test.go (2 hunks)
Files skipped from review due to trivial changes (1)
- client/docs/swagger-ui/swagger.yaml
Additional Context Used
GitHub Check Runs (1)
golangci-lint failure (11)
x/attribute/keeper/msg_server.go: [failure] 269-269:
Error return value of(github.com/cosmos/cosmos-sdk/types.EventManagerI).EmitTypedEvent
is not checked (errcheck)
Additional comments not posted (8)
proto/provenance/attribute/v1/attribute.proto (1)
116-119
: The addition ofEventAttributeParamsUpdated
is well-defined and aligns with the module's functionality.x/attribute/types/events.go (1)
126-128
: The implementation ofNewEventAttributeParamsUpdated
correctly formatsmaxValueLength
for event logging.x/attribute/types/msgs.go (1)
154-168
: The addition ofMsgUpdateParamsRequest
and its validation logic are correctly implemented, ensuring theauthority
field is a valid address.x/attribute/types/msgs_test.go (1)
164-200
: The tests forMsgUpdateParamsRequest
are comprehensive and effectively validate the message's basic constraints.proto/provenance/attribute/v1/tx.proto (1)
35-36
: The addition of theUpdateParams
RPC method is correctly implemented and aligns with the module's functionality.x/attribute/keeper/msg_server_test.go (1)
330-373
: The implementation ofTestUpdateParams
is robust, covering essential success and failure scenarios. Good use of structured tests and clear error messages enhances maintainability.x/attribute/client/cli/tx.go (1)
322-352
: TheNewUpdateParamsCmd
function is well-implemented, providing a clear and user-friendly interface for updating attribute module parameters via governance proposals. Error handling and command structure are appropriately managed.x/attribute/keeper/keeper.go (1)
65-81
: The implementation of authority management functions (GetAuthority
,IsAuthority
,ValidateAuthority
) is clear and concise. Good use of case-insensitive comparison and informative error messages enhances the robustness and maintainability of the module.
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 (1)
- x/attribute/keeper/msg_server.go (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- x/attribute/keeper/msg_server.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: 0
Outside diff range and nitpick comments (5)
CHANGELOG.md (5)
Line range hint
110-356
: Consistency in list item markers is important for maintaining a uniform style in markdown files. It's recommended to use either asterisks (*) or dashes (-) consistently for list items. The current file uses both, which can be visually inconsistent and potentially confusing. Consider standardizing to one style.- - + *Also applies to: 712-712, 720-720, 765-765, 773-773
Line range hint
819-819
: Multiple consecutive blank lines found in the document. It's a good practice to limit to one blank line to separate sections or elements for better readability and to maintain a clean and professional appearance in the document.- +Also applies to: 1220-1220, 1237-1237, 1289-1289, 1393-1393
Line range hint
230-230
: Bare URLs are used in the document. It's a good practice to use descriptive link text rather than bare URLs. Descriptive links are more accessible and improve the readability of the document.- https://github.com/provenance-io/provenance/issues/123 + [Issue #123](https://github.com/provenance-io/provenance/issues/123)Also applies to: 261-261, 360-360, 410-410, 422-422, 438-438, 509-509, 520-520, 528-528, 564-564, 589-589, 601-601, 647-651, 698-698, 739-739, 792-792, 905-905
Line range hint
947-947
: Spaces found inside emphasis markers. This can lead to rendering issues in some markdown parsers. It's recommended to remove any leading or trailing spaces inside emphasis markers.- * emphasized text * + *emphasized text*
Line range hint
343-343
: Spaces found inside code span elements. This can lead to unintended display of spaces in the formatted document. It's recommended to remove any leading or trailing spaces inside code spans.- ` code ` + `code`
Description
Added
UpdateParams
rpc end point and a cli command.closes: #XXXX
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passesSummary by CodeRabbit
New Features
UpdateParams
endpoint and CLI for the attribute module, enabling users to update attribute parameters via governance proposals.UpdateParams
functionality.Documentation
MsgUpdateParamsResponse
definition and descriptions for the new UpdateParams endpoint.Tests
UpdateParams
functionality and authority management.