Skip to content
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

Remove legacy marker gov proposal handlers #1961

Merged

Conversation

nullpointer0x00
Copy link
Contributor

@nullpointer0x00 nullpointer0x00 commented Apr 30, 2024

Description

Related to:


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.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

Summary by CodeRabbit

  • New Features

    • Introduced new message response types for various proposal actions, enhancing the proposal handling capabilities.
  • Bug Fixes

    • Updated error messages for deprecated proposal types to clearly indicate their deprecation status.
  • Refactor

    • Removed legacy governance proposal routes and functions.
    • Streamlined proposal handling methods to improve interaction with the Keeper.
  • Tests

    • Added comprehensive test functions for new proposal types.
    • Removed outdated test functions related to legacy proposals.
  • Documentation

    • Updated swagger documentation with new message response types.
    • Updated changelog to reflect the removal of legacy governance proposals.

@nullpointer0x00 nullpointer0x00 self-assigned this Apr 30, 2024
Copy link
Contributor

coderabbitai bot commented Apr 30, 2024

Warning

Rate Limit Exceeded

@nullpointer0x00 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 1 minutes and 42 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.
Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.
Please see our FAQ for further information.

Commits Files that changed from the base of the PR and between 3dfa46e and e3ce724.

Walkthrough

The recent updates focus on refining the governance proposal handling for marker accounts. Key changes include removing legacy proposal routes, adding new message response types, deprecating old message types, and enhancing test coverage. These modifications streamline the proposal process, improve code maintainability, and ensure compatibility with the latest governance standards.

Changes

File Path Change Summary
app/app.go Removed AddRoute for markertypes.ModuleName in govRouter initialization.
client/docs/swagger-ui/swagger.yaml Added new message response types and their definitions.
proto/.../proposals.proto Deprecated multiple message types related to governance proposals for markers.
proto/.../tx.proto Added RPC methods for various proposal types in the Msg service.
x/marker/client/cli/cli_test.go Removed TestMarkerTxGovProposals and added new test functions for different proposal types.
x/marker/client/cli/tx.go Added functions for different proposal types.
x/marker/keeper/msg_server.go Updated methods in msgServer to handle specific proposal types by interacting with the Keeper.
x/marker/keeper/msg_server_test.go Added new test functions for specific proposal types in MsgServerTestSuite.
x/marker/keeper/proposal_handler.go Updated methods to handle specific proposal types by interacting with the Keeper.
x/marker/keeper/proposal_handler_test.go Renamed IntegrationTestSuite to KeeperTestSuite and added new test functions.
x/marker/module.go ProposalContents function now returns an empty slice of simtypes.WeightedProposalMsg.
x/marker/types/msgs.go Added new message request types and modified ValidateBasic method in MsgSupplyIncreaseProposalRequest.
x/marker/types/msgs_test.go Expanded test functions with new test cases and validations for various scenarios.
x/msgfees/types/proposal.go Updated error messages in ValidateBasic functions to indicate deprecation of proposals.
CHANGELOG.md Removed legacy governance proposals for marker.

In fields of code where markers dwell,
Proposals change, and all is well.
With tests anew and methods fine,
The governance now does align.
🐇✨ In bytes and lines, the future's bright,
As rabbits hop through code's delight.


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@SpicyLemon SpicyLemon changed the title Remove legacy msgfees gov proposal handlers Remove legacy marker gov proposal handlers May 6, 2024
@nullpointer0x00 nullpointer0x00 marked this pull request as ready for review May 17, 2024 16:38
@nullpointer0x00 nullpointer0x00 enabled auto-merge (squash) May 17, 2024 16:40
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits Files that changed from the base of the PR and between 0299930 and a14237a.
Files selected for processing (3)
  • x/marker/keeper/proposal_handler_test.go (1 hunks)
  • x/marker/types/msgs.go (3 hunks)
  • x/marker/types/msgs_test.go (6 hunks)
Files skipped from review as they are similar to previous changes (1)
  • x/marker/types/msgs_test.go
Additional Context Used
Learnings (1)
x/marker/types/msgs.go (1)
User: nullpointer0x00
PR: provenance-io/provenance#1961
File: x/marker/types/msgs.go:613-0
Timestamp: 2024-05-16T19:35:55.196Z
Learning: The error message "amount to decrease must be greater than zero" is used for validation errors in the codebase for consistency.
Additional comments not posted (14)
x/marker/keeper/proposal_handler_test.go (7)

59-131: Comprehensive test coverage for SupplyIncreaseProposal.


133-185: Comprehensive test coverage for SupplyDecreaseProposal.


187-244: Comprehensive test coverage for SetAdministratorProposal.


246-303: Comprehensive test coverage for RemoveAdministratorProposal.


305-390: Comprehensive test coverage for ChangeStatusProposal.


392-463: Comprehensive test coverage for WithdrawEscrowProposal.


465-541: Comprehensive test coverage for SetDenomMetadataProposal.

x/marker/types/msgs.go (7)

Line range hint 42-459: Well-structured message type for MsgSupplyIncreaseProposalRequest.


610-626: Well-structured message type for MsgSupplyDecreaseProposalRequest.


628-647: Well-structured message type for MsgSetAdministratorProposalRequest.


649-667: Well-structured message type for MsgRemoveAdministratorProposalRequest.


670-684: Well-structured message type for MsgChangeStatusProposalRequest.


686-709: Well-structured message type for MsgWithdrawEscrowProposalRequest.


711-724: Well-structured message type for MsgSetDenomMetadataProposalRequest.

Taztingo
Taztingo previously approved these changes May 17, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 (5)
CHANGELOG.md (5)

Line range hint 103-218: Consider using a consistent list style in the CHANGELOG.

- -
+ *

Also applies to: 247-249, 326-348, 704-704, 712-712, 757-757, 765-765


Line range hint 811-811: Remove consecutive blank lines to maintain a clean and consistent format in the document.

-

Also applies to: 1212-1212, 1229-1229, 1281-1281, 1385-1385


Line range hint 222-222: Consider using Markdown links instead of bare URLs for better readability and navigation.

- https://github.com/provenance-io/provenance/issues/105
+ [Issue #105](https://github.com/provenance-io/provenance/issues/105)

Also applies to: 253-253, 352-352, 402-402, 414-414, 430-430, 501-501, 512-512, 520-520, 556-556, 581-581, 593-593, 639-639, 640-640, 641-641, 642-642, 643-643, 690-690, 731-731, 784-784, 897-897


Line range hint 939-939: Remove unnecessary spaces inside emphasis markers.

- * message _PR<pull-request-number>_
+ * message _PR<pull-request-number>_

Line range hint 335-335: Remove unnecessary spaces inside code span elements.

- ` MsgAddMarker `
+ `MsgAddMarker`
Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between a14237a and 01c0bb3.
Files selected for processing (2)
  • CHANGELOG.md (1 hunks)
  • app/app.go (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • app/app.go

x/marker/module.go Outdated Show resolved Hide resolved
x/marker/types/msgs.go Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits Files that changed from the base of the PR and between 01c0bb3 and cc3f4f7.
Files selected for processing (2)
  • x/marker/types/msgs.go (3 hunks)
  • x/marker/types/msgs_test.go (6 hunks)
Files skipped from review as they are similar to previous changes (2)
  • x/marker/types/msgs.go
  • x/marker/types/msgs_test.go

Taztingo
Taztingo previously approved these changes May 17, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits Files that changed from the base of the PR and between cc3f4f7 and 18ef18a.
Files selected for processing (1)
  • x/marker/module.go (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • x/marker/module.go

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 (7)
CHANGELOG.md (7)

Line range hint 104-217: Consider using a consistent style for unordered lists throughout the document. The current mix of asterisks and dashes can be unified to use only asterisks for better consistency and readability.

- -
+ *

Line range hint 188-349: Ensure consistency in unordered list markers throughout the document by using asterisks instead of dashes.

- -
+ *

Line range hint 327-349: For consistency and readability, consider using asterisks for all unordered list items throughout the document.

- -
+ *

Line range hint 705-705: Multiple consecutive blank lines detected. It's best to limit to one blank line to maintain clean and readable markdown formatting.

Also applies to: 713-713, 758-758, 766-766


Line range hint 223-223: Bare URLs are used in the document. It's a good practice to use descriptive link texts instead of bare URLs for better readability and accessibility.

Also applies to: 254-254, 353-353, 403-403, 415-415, 431-431, 502-502, 513-513, 521-521, 557-557, 582-582, 594-594, 640-640, 641-641, 642-642, 643-643, 644-644, 691-691, 732-732, 785-785, 898-898


Line range hint 940-940: Remove spaces inside emphasis markers to maintain proper markdown formatting.

- * text *
+ *text*

Line range hint 336-336: Remove spaces inside code span elements to ensure correct markdown rendering.

- ` code `
+ `code`
Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 18ef18a and 3dfa46e.
Files selected for processing (1)
  • CHANGELOG.md (1 hunks)

@nullpointer0x00 nullpointer0x00 merged commit 7bffaa8 into main May 17, 2024
26 of 36 checks passed
@nullpointer0x00 nullpointer0x00 deleted the nullpointer0x00/marker-migrate-legegacy-prop-handlers branch May 17, 2024 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants