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

feat!: Removed legacy-submit-proposal support for consumer addition/modification/removal #2130

Merged
merged 11 commits into from
Aug 14, 2024

Conversation

bermuell
Copy link
Contributor

@bermuell bermuell commented Aug 6, 2024

Description

Remove support for gov submit-legacy-proposal commands to add/modify/remove consumer proposals
and change rewared denoms

To submit a proposal use

interchain-security-pd tx gov submit-proposal [proposal-file]

This replaces the following command which are not supported anymore:

interchain-security-pd tx gov submit-legacy-proposal consumer-addition [proposal-file]
interchain-security-pd tx gov submit-legacy-proposal consumer-modification [proposal-file]
interchain-security-pd tx gov submit-legacy-proposal consumer-removal [proposal-file]
interchain-security-pd tx gov submit-legacy-proposal change-reward-denoms [proposal-file]

see changelog for more details


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • Included the correct type prefix in the PR title
  • Added ! to the type prefix if the change is state-machine breaking
  • Confirmed this PR does not introduce changes requiring state migrations, OR migration code has been added to consumer and/or provider modules
  • Targeted the correct branch (see PR Targeting)
  • Provided a link to the relevant issue or specification
  • Followed the guidelines for building SDK modules
  • Included the necessary unit and integration tests
  • Added a changelog entry to CHANGELOG.md
  • Included comments for documenting Go code
  • Updated the relevant documentation or specification
  • Reviewed "Files changed" and left comments if necessary
  • Confirmed all CI checks have passed
  • If this PR is library API breaking, bump the go.mod version string of the repo, and follow through on a new major release

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! the type prefix if the change is state-machine breaking
  • confirmed this PR does not introduce changes requiring state migrations, OR confirmed migration code has been added to consumer and/or provider modules
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage

Summary by CodeRabbit

  • New Features

    • Streamlined management of governance proposals with the removal of legacy proposal features.
    • Introduced a unified command structure for submitting proposals, simplifying user interactions.
  • Bug Fixes

    • Enhanced proposal processing by updating logic to reflect new message types, improving clarity and reducing errors.
  • Documentation

    • Updated guidance on proposal submissions and requirements to align with the latest functionality, including migration steps for legacy proposals.
  • Chores

    • Removed outdated test cases and functions for improved maintainability.
  • Refactor

    • Simplified proposal construction in tests with clearer templates for better readability and structure.
    • Enhanced flexibility of driver functionality to accommodate different versions of the ICS.

@bermuell bermuell self-assigned this Aug 6, 2024
@github-actions github-actions bot added C:Testing Assigned automatically by the PR labeler C:x/provider Assigned automatically by the PR labeler labels Aug 6, 2024
testutil/keeper/unit_test_helpers.go Dismissed Show dismissed Hide dismissed
@bermuell bermuell force-pushed the bernd/remove_legacy_proposals branch 3 times, most recently from 4ec9955 to 0605f6e Compare August 6, 2024 10:14
@bermuell bermuell force-pushed the bernd/remove_legacy_proposals branch from 0605f6e to 80ad0a7 Compare August 6, 2024 11:27
@github-actions github-actions bot added the C:Docs Assigned automatically by the PR labeler label Aug 6, 2024
@bermuell bermuell force-pushed the bernd/remove_legacy_proposals branch from 912c1a6 to b80084e Compare August 6, 2024 13:02
@bermuell bermuell force-pushed the bernd/remove_legacy_proposals branch from 4136ee3 to 35978c7 Compare August 6, 2024 14:20
@bermuell bermuell marked this pull request as ready for review August 6, 2024 14:21
@bermuell bermuell requested a review from a team as a code owner August 6, 2024 14:21
Copy link
Contributor

coderabbitai bot commented Aug 6, 2024

Walkthrough

Walkthrough

This update streamlines governance by removing legacy proposal handling for consumer management. It consolidates proposal types and simplifies the command structure for submissions, enhancing clarity and maintainability. These changes reflect a shift towards modern practices, improving overall system performance and user experience.

Changes

File Path Change Summary
.changelog/unreleased/api-breaking/provider/... Removed support for the legacy-proposal feature, enhancing proposal management clarity and performance.
app/provider/app.go Removed handlers for consumer management proposals, simplifying the governance functionality.
docs/docs/upgrading/migrate_v4_v5.md Updated documentation to reflect new command structure for submitting proposals, emphasizing consumer modification.
tests/e2e/actions.go Refactored proposal submission functions to use string templates instead of JSON structs for improved clarity.
tests/integration/provider_gov_hooks.go Revised tests to align with current proposal handling, phasing out legacy references.
x/ccv/provider/keeper/hooks.go Renamed method for processing consumer addition proposals, aligning with updated message structures.
UPGRADING.md Documented migration process for legacy proposals to new message types, enhancing clarity in upgrade paths.
tests/e2e/test_driver.go Enhanced version handling in driver methods, allowing compatibility with both legacy and new proposal submission methods.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CLI
    participant Governance
    participant Keeper

    User->>CLI: Submit new proposal
    CLI->>Governance: Process proposal
    Governance->>Keeper: Validate and handle proposal
    Keeper-->>Governance: Return status
    Governance-->>CLI: Confirm submission
    CLI-->>User: Show confirmation
Loading

Recent review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 55835d1 and bd26ec6.

Files selected for processing (1)
  • UPGRADING.md (8 hunks)
Additional context used
LanguageTool
UPGRADING.md

[style] ~35-~35: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...dification-ConsumerRemovalProposalneeds to be converted toMsgConsumerRemoval` - ...

(REP_NEED_TO_VB)


[style] ~36-~36: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...Removal-ChangeRewardDenomsProposalneeds to be converted toMsgChangeRewardDenoms`...

(REP_NEED_TO_VB)


[grammar] ~243-~243: Did you mean the adverb “no longer”?
Context: .... As a result, legacy_ibc_testing` is not longer required and was removed, see https://g...

(NOT_LONGER)

Markdownlint
UPGRADING.md

50-50: Column: 1
Hard tabs

(MD010, no-hard-tabs)


51-51: Column: 1
Hard tabs

(MD010, no-hard-tabs)


52-52: Column: 1
Hard tabs

(MD010, no-hard-tabs)


53-53: Column: 1
Hard tabs

(MD010, no-hard-tabs)


54-54: Column: 1
Hard tabs

(MD010, no-hard-tabs)


55-55: Column: 1
Hard tabs

(MD010, no-hard-tabs)


56-56: Column: 1
Hard tabs

(MD010, no-hard-tabs)


57-57: Column: 1
Hard tabs

(MD010, no-hard-tabs)


58-58: Column: 1
Hard tabs

(MD010, no-hard-tabs)


59-59: Column: 1
Hard tabs

(MD010, no-hard-tabs)


60-60: Column: 1
Hard tabs

(MD010, no-hard-tabs)


61-61: Column: 1
Hard tabs

(MD010, no-hard-tabs)


62-62: Column: 1
Hard tabs

(MD010, no-hard-tabs)


63-63: Column: 1
Hard tabs

(MD010, no-hard-tabs)


64-64: Column: 1
Hard tabs

(MD010, no-hard-tabs)


65-65: Column: 1
Hard tabs

(MD010, no-hard-tabs)


66-66: Column: 1
Hard tabs

(MD010, no-hard-tabs)


67-67: Column: 1
Hard tabs

(MD010, no-hard-tabs)


68-68: Column: 1
Hard tabs

(MD010, no-hard-tabs)


69-69: Column: 1
Hard tabs

(MD010, no-hard-tabs)


70-70: Column: 1
Hard tabs

(MD010, no-hard-tabs)


71-71: Column: 1
Hard tabs

(MD010, no-hard-tabs)


75-75: Column: 1
Hard tabs

(MD010, no-hard-tabs)


76-76: Column: 1
Hard tabs

(MD010, no-hard-tabs)


77-77: Column: 1
Hard tabs

(MD010, no-hard-tabs)


78-78: Column: 1
Hard tabs

(MD010, no-hard-tabs)


79-79: Column: 1
Hard tabs

(MD010, no-hard-tabs)


80-80: Column: 1
Hard tabs

(MD010, no-hard-tabs)


81-81: Column: 1
Hard tabs

(MD010, no-hard-tabs)


82-82: Column: 1
Hard tabs

(MD010, no-hard-tabs)


83-83: Column: 1
Hard tabs

(MD010, no-hard-tabs)


85-85: Column: 1
Hard tabs

(MD010, no-hard-tabs)


86-86: Column: 1
Hard tabs

(MD010, no-hard-tabs)


87-87: Column: 1
Hard tabs

(MD010, no-hard-tabs)


88-88: Column: 1
Hard tabs

(MD010, no-hard-tabs)


89-89: Column: 1
Hard tabs

(MD010, no-hard-tabs)


90-90: Column: 1
Hard tabs

(MD010, no-hard-tabs)


91-91: Column: 1
Hard tabs

(MD010, no-hard-tabs)


92-92: Column: 1
Hard tabs

(MD010, no-hard-tabs)


93-93: Column: 1
Hard tabs

(MD010, no-hard-tabs)


94-94: Column: 1
Hard tabs

(MD010, no-hard-tabs)


33-33: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


146-146: null
Multiple headings with the same content

(MD024, no-duplicate-heading)


205-205: null
Multiple headings with the same content

(MD024, no-duplicate-heading)


209-209: null
Multiple headings with the same content

(MD024, no-duplicate-heading)


203-203: null
Bare URL used

(MD034, no-bare-urls)


207-207: null
Bare URL used

(MD034, no-bare-urls)


213-213: null
Bare URL used

(MD034, no-bare-urls)


237-237: null
Multiple headings with the same content

(MD024, no-duplicate-heading)


245-245: null
Multiple headings with the same content

(MD024, no-duplicate-heading)


243-243: null
Bare URL used

(MD034, no-bare-urls)


311-311: null
Multiple headings with the same content

(MD024, no-duplicate-heading)


315-315: null
Multiple headings with the same content

(MD024, no-duplicate-heading)


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.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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

CodeRabbit Configuration 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.

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: 3

Outside diff range, codebase verification and nitpick comments (3)
x/ccv/provider/types/codec.go (1)

34-36: Clarify TODO comments.

Ensure that the TODO comments are clear and provide enough context for future implementation.

-		&MsgConsumerAddition{}, //TOOD @permissionless: replace with below
-		//&MsgInitializeConsumer{}, //TOOD @permissionless: uncomment once implemented
-		//&MsgUpdateConsumer{}, //TOOD @permissionless: uncomment once implemented
+		&MsgConsumerAddition{}, // TODO: Replace with MsgInitializeConsumer once implemented
+		// &MsgInitializeConsumer{}, // TODO: Uncomment once implemented
+		// &MsgUpdateConsumer{}, // TODO: Uncomment once implemented
tests/e2e/state.go (1)

558-558: Improve log statement clarity.

The log statement for unknown proposal types has been improved for better formatting. This enhances clarity in error reporting.

- log.Fatal("received unknown proposal type: '", propType, "', proposal JSON:", propRaw)
+ log.Fatalf("received unknown proposal type: '%s', proposal JSON: %s", propType, propRaw)
app/provider/app.go (1)

Ensure completeness of removed proposal handlers.

The proposal handlers ConsumerAdditionProposalHandler, ConsumerRemovalProposalHandler, and ConsumerModificationProposalHandler have been removed. However, their associated proposal types (ConsumerAdditionProposal, ConsumerRemovalProposal, ConsumerModificationProposal) are still referenced in multiple files. These references should also be removed or updated to ensure consistency and avoid potential errors.

References to be addressed:

  • x/ccv/provider/types/codec.go
  • x/ccv/provider/types/tx.pb.go
  • x/ccv/provider/types/query.pb.go
  • x/ccv/provider/types/provider.pb.go
  • x/ccv/provider/types/legacy_proposal.go
  • x/ccv/provider/keeper/proposal.go
  • x/ccv/provider/keeper/msg_server.go
  • x/ccv/provider/keeper/legacy_proposal_test.go
  • tests/e2e/steps_partial_set_security.go
  • tests/e2e/steps_active_set_changes.go
  • tests/e2e/steps_consumer_misbehaviour.go
  • tests/e2e/steps_inactive_vals.go

Please ensure that all references to these proposal types are removed or appropriately updated.

Analysis chain

Line range hint 85-86: Ensure correctness of removed proposal handlers.

The proposal handlers ConsumerAdditionProposalHandler, ConsumerRemovalProposalHandler, and ConsumerModificationProposalHandler have been removed. Ensure that these handlers are no longer needed and that their removal does not affect other parts of the codebase.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of the removed proposal handlers.

# Test: Search for the removed proposal handlers. Expect: No occurrences of the old handlers.
rg --type go -A 5 $'ConsumerAdditionProposalHandler'
rg --type go -A 5 $'ConsumerRemovalProposalHandler'
rg --type go -A 5 $'ConsumerModificationProposalHandler'

Length of output: 158


Script:

#!/bin/bash
# Description: Verify the usage of the proposal types to ensure they are not used elsewhere in the codebase.

# Test: Search for the proposal types. Expect: No occurrences of the old proposal types.
rg --type go -A 5 $'ConsumerAdditionProposal'
rg --type go -A 5 $'ConsumerRemovalProposal'
rg --type go -A 5 $'ConsumerModificationProposal'

Length of output: 210549

@insumity
Copy link
Contributor

insumity commented Aug 6, 2024

Nice work!
Looks good to me. My understanding is that changing the rewards can be done through a legacy proposal as well so I'm wondering whether we should remove it as well? In general, everything that is legacy proposal.

@insumity
Copy link
Contributor

insumity commented Aug 8, 2024

In regards to Marius comment, do we keep the x/ccv/provider/client/legacy_proposals.go file for the compatibility tests?

### Governance proposals

To submit a proposal to add/modify/remove a consumer use the following command
```shell
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend adding a tiny bit of info here, along the lines of:
This was the command before: ```command```, now use this new command instead:

btw, why is this in the migration? I think this should be in the changelog instead, because this doesn't actually have anything to do with migrating the state (which I think the upgrading file is usually)
Maybe this should be in an "integrators guide" like I did for the inactive vals here https://github.com/cosmos/interchain-security/pull/2133/files#diff-d3b7b6fffa7d0deffa451f04bcf224da77c989b9ada8c27598cf32817661cc8f

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was described that way for migrate_v4_v6.md when the new commands were added, so I followed the same parttern.
Will remove this file and add more content to the changelog. Added also migration instructions in UPGRADE file.
Not picking up 'integration guide' idea for now as with permissionless we might provide something like that which would touch the same area (consumer proposals).

@p-offtermatt
Copy link
Contributor

Is there any better way to keep the old messages for compatibility tests, but not having to have them in the newest version of the repo anymore? If not, I think it's ok the way it is right now

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

Outside diff range, codebase verification and nitpick comments (3)
UPGRADING.md (3)

30-40: Approved: Documentation on legacy proposal removal.

The section clearly explains the removal of legacy proposal support and the need for migration. This enhances the clarity of the upgrade process.

Consider rephrasing to add variety and improve readability:

- Legacy proposals are not supported anymore by the current version of the provider.
+ The current version of the provider no longer supports legacy proposals.
Tools
LanguageTool

[style] ~34-~34: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...ition-ConsumerModificationProposalneeds to be converted toMsgConsumerModificatio...

(REP_NEED_TO_VB)


[style] ~35-~35: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...dification-ConsumerRemovalProposalneeds to be converted toMsgConsumerRemoval` - ...

(REP_NEED_TO_VB)


[style] ~36-~36: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...Removal-ChangeRewardDenomsProposalneeds to be converted toMsgChangeRewardDenoms`...

(REP_NEED_TO_VB)

Markdownlint

33-33: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


45-72: Approved: Example of migrating legacy proposals.

The function MigrateLegacyConsumerAddition provides a clear example of migrating legacy proposals. This is helpful for users performing migrations.

Address the use of hard tabs for consistency in formatting:

-		ChainId:                           msg.ChainId,
+    ChainId:                           msg.ChainId,
Tools
Markdownlint

50-50: Column: 1
Hard tabs

(MD010, no-hard-tabs)


51-51: Column: 1
Hard tabs

(MD010, no-hard-tabs)


52-52: Column: 1
Hard tabs

(MD010, no-hard-tabs)


53-53: Column: 1
Hard tabs

(MD010, no-hard-tabs)


54-54: Column: 1
Hard tabs

(MD010, no-hard-tabs)


55-55: Column: 1
Hard tabs

(MD010, no-hard-tabs)


56-56: Column: 1
Hard tabs

(MD010, no-hard-tabs)


57-57: Column: 1
Hard tabs

(MD010, no-hard-tabs)


58-58: Column: 1
Hard tabs

(MD010, no-hard-tabs)


59-59: Column: 1
Hard tabs

(MD010, no-hard-tabs)


60-60: Column: 1
Hard tabs

(MD010, no-hard-tabs)


61-61: Column: 1
Hard tabs

(MD010, no-hard-tabs)


62-62: Column: 1
Hard tabs

(MD010, no-hard-tabs)


63-63: Column: 1
Hard tabs

(MD010, no-hard-tabs)


64-64: Column: 1
Hard tabs

(MD010, no-hard-tabs)


65-65: Column: 1
Hard tabs

(MD010, no-hard-tabs)


66-66: Column: 1
Hard tabs

(MD010, no-hard-tabs)


67-67: Column: 1
Hard tabs

(MD010, no-hard-tabs)


68-68: Column: 1
Hard tabs

(MD010, no-hard-tabs)


69-69: Column: 1
Hard tabs

(MD010, no-hard-tabs)


70-70: Column: 1
Hard tabs

(MD010, no-hard-tabs)


71-71: Column: 1
Hard tabs

(MD010, no-hard-tabs)


74-95: Approved: Proposal migration process.

The function MigrateProposal outlines the process of migrating proposals, ensuring a smooth transition from legacy formats.

Address the use of hard tabs for consistency in formatting:

-	for idx, msg := range proposal.GetMessages() {
+  for idx, msg := range proposal.GetMessages() {
Tools
Markdownlint

75-75: Column: 1
Hard tabs

(MD010, no-hard-tabs)


76-76: Column: 1
Hard tabs

(MD010, no-hard-tabs)


77-77: Column: 1
Hard tabs

(MD010, no-hard-tabs)


78-78: Column: 1
Hard tabs

(MD010, no-hard-tabs)


79-79: Column: 1
Hard tabs

(MD010, no-hard-tabs)


80-80: Column: 1
Hard tabs

(MD010, no-hard-tabs)


81-81: Column: 1
Hard tabs

(MD010, no-hard-tabs)


82-82: Column: 1
Hard tabs

(MD010, no-hard-tabs)


83-83: Column: 1
Hard tabs

(MD010, no-hard-tabs)


85-85: Column: 1
Hard tabs

(MD010, no-hard-tabs)


86-86: Column: 1
Hard tabs

(MD010, no-hard-tabs)


87-87: Column: 1
Hard tabs

(MD010, no-hard-tabs)


88-88: Column: 1
Hard tabs

(MD010, no-hard-tabs)


89-89: Column: 1
Hard tabs

(MD010, no-hard-tabs)


90-90: Column: 1
Hard tabs

(MD010, no-hard-tabs)


91-91: Column: 1
Hard tabs

(MD010, no-hard-tabs)


92-92: Column: 1
Hard tabs

(MD010, no-hard-tabs)


93-93: Column: 1
Hard tabs

(MD010, no-hard-tabs)


94-94: Column: 1
Hard tabs

(MD010, no-hard-tabs)

@bermuell bermuell force-pushed the bernd/remove_legacy_proposals branch from 136843b to 55835d1 Compare August 13, 2024 14:22
UPGRADING.md Outdated Show resolved Hide resolved
UPGRADING.md 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

Outside diff range, codebase verification and nitpick comments (4)
UPGRADING.md (4)

32-36: Improve clarity and avoid repetitive phrasing.

Consider rephrasing to enhance clarity and avoid repetition. Here's a suggestion:

Legacy proposals are no longer supported by the current version of the provider. Active legacy proposals (in voting or deposit period) containing the following messages must be migrated:
- Convert `ConsumerAdditionProposal` to `MsgConsumerAddition`
- Convert `ConsumerModificationProposal` to `MsgConsumerModification`
- Convert `ConsumerRemovalProposal` to `MsgConsumerRemoval`
- Convert `ChangeRewardDenomsProposal` to `MsgChangeRewardDenoms`
Tools
LanguageTool

[style] ~35-~35: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...dification-ConsumerRemovalProposalneeds to be converted toMsgConsumerRemoval` - ...

(REP_NEED_TO_VB)


[style] ~36-~36: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...Removal-ChangeRewardDenomsProposalneeds to be converted toMsgChangeRewardDenoms`...

(REP_NEED_TO_VB)

Markdownlint

33-33: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


38-39: Enhance the introduction to the migration example.

Clarify the introduction to the migration example for better understanding. Here's a suggestion:

The following is an example of migrating a proposal containing a legacy consumer addition proposal message. The same pattern applies to migrating other legacy messages. Add the resulting migration code to the upgrade handler of the provider chain.

50-71: Replace hard tabs with spaces.

The code snippet contains hard tabs. Replace them with spaces for consistency.

-		ChainId:                           msg.ChainId,
-		InitialHeight:                     msg.InitialHeight,
-		GenesisHash:                       msg.GenesisHash,
-		BinaryHash:                        msg.BinaryHash,
-		SpawnTime:                         msg.SpawnTime,
-		UnbondingPeriod:                   msg.UnbondingPeriod,
-		CcvTimeoutPeriod:                  msg.CcvTimeoutPeriod,
-		TransferTimeoutPeriod:             msg.TransferTimeoutPeriod,
-		ConsumerRedistributionFraction:    msg.ConsumerRedistributionFraction,
-		BlocksPerDistributionTransmission: msg.BlocksPerDistributionTransmission,
-		HistoricalEntries:                 msg.HistoricalEntries,
-		DistributionTransmissionChannel:   msg.DistributionTransmissionChannel,
-		Top_N:                             msg.Top_N,
-		ValidatorsPowerCap:                msg.ValidatorsPowerCap,
-		ValidatorSetCap:                   msg.ValidatorSetCap,
-		Allowlist:                         msg.Allowlist,
-		Denylist:                          msg.Denylist,
-		Authority:                         authority,
-		MinStake:                          msg.MinStake,
-		AllowInactiveVals:                 msg.AllowInactiveVals,
+    ChainId:                           msg.ChainId,
+    InitialHeight:                     msg.InitialHeight,
+    GenesisHash:                       msg.GenesisHash,
+    BinaryHash:                        msg.BinaryHash,
+    SpawnTime:                         msg.SpawnTime,
+    UnbondingPeriod:                   msg.UnbondingPeriod,
+    CcvTimeoutPeriod:                  msg.CcvTimeoutPeriod,
+    TransferTimeoutPeriod:             msg.TransferTimeoutPeriod,
+    ConsumerRedistributionFraction:    msg.ConsumerRedistributionFraction,
+    BlocksPerDistributionTransmission: msg.BlocksPerDistributionTransmission,
+    HistoricalEntries:                 msg.HistoricalEntries,
+    DistributionTransmissionChannel:   msg.DistributionTransmissionChannel,
+    Top_N:                             msg.Top_N,
+    ValidatorsPowerCap:                msg.ValidatorsPowerCap,
+    ValidatorSetCap:                   msg.ValidatorSetCap,
+    Allowlist:                         msg.Allowlist,
+    Denylist:                          msg.Denylist,
+    Authority:                         authority,
+    MinStake:                          msg.MinStake,
+    AllowInactiveVals:                 msg.AllowInactiveVals,
Tools
Markdownlint

50-50: Column: 1
Hard tabs

(MD010, no-hard-tabs)


51-51: Column: 1
Hard tabs

(MD010, no-hard-tabs)


52-52: Column: 1
Hard tabs

(MD010, no-hard-tabs)


53-53: Column: 1
Hard tabs

(MD010, no-hard-tabs)


54-54: Column: 1
Hard tabs

(MD010, no-hard-tabs)


55-55: Column: 1
Hard tabs

(MD010, no-hard-tabs)


56-56: Column: 1
Hard tabs

(MD010, no-hard-tabs)


57-57: Column: 1
Hard tabs

(MD010, no-hard-tabs)


58-58: Column: 1
Hard tabs

(MD010, no-hard-tabs)


59-59: Column: 1
Hard tabs

(MD010, no-hard-tabs)


60-60: Column: 1
Hard tabs

(MD010, no-hard-tabs)


61-61: Column: 1
Hard tabs

(MD010, no-hard-tabs)


62-62: Column: 1
Hard tabs

(MD010, no-hard-tabs)


63-63: Column: 1
Hard tabs

(MD010, no-hard-tabs)


64-64: Column: 1
Hard tabs

(MD010, no-hard-tabs)


65-65: Column: 1
Hard tabs

(MD010, no-hard-tabs)


66-66: Column: 1
Hard tabs

(MD010, no-hard-tabs)


67-67: Column: 1
Hard tabs

(MD010, no-hard-tabs)


68-68: Column: 1
Hard tabs

(MD010, no-hard-tabs)


69-69: Column: 1
Hard tabs

(MD010, no-hard-tabs)


70-70: Column: 1
Hard tabs

(MD010, no-hard-tabs)


71-71: Column: 1
Hard tabs

(MD010, no-hard-tabs)


243-243: Correct grammar: Use "no longer" instead of "not longer".

The phrase "is not longer required" should be "is no longer required".

- is not longer required
+ is no longer required
Tools
LanguageTool

[grammar] ~243-~243: Did you mean the adverb “no longer”?
Context: .... As a result, legacy_ibc_testing` is not longer required and was removed, see https://g...

(NOT_LONGER)

Markdownlint

243-243: null
Bare URL used

(MD034, no-bare-urls)

@bermuell bermuell added this pull request to the merge queue Aug 14, 2024
Merged via the queue into main with commit cca6887 Aug 14, 2024
17 of 18 checks passed
@bermuell bermuell deleted the bernd/remove_legacy_proposals branch August 14, 2024 07:38
insumity added a commit that referenced this pull request Aug 15, 2024
…roduced old messages so that existing proposals can deserialize
insumity added a commit that referenced this pull request Aug 26, 2024
…roduced old messages so that existing proposals can deserialize
insumity added a commit that referenced this pull request Aug 26, 2024
* (partially) renamed chain ids to consumer ids

* renamed proposal messages

* removed global slash entry

* fixed unit tests

* added new messages

* introduced new state

* added functionality for the register and initialize messages

* renamed (partially) chainIds to consumerIds

* set consumerId to chainId association during registration

* added extra check in the initialization so unknokwn, launched, or stopped chains cannot re-initialize

* added initial work on traversing initialized chains that are to-be-launched

* fixed rebase issues after bringing the VSCMaturedPackets work in

* made it so we traverse initialization records instead of addition proposals (+ additional changes so the unit tests pass)

* renamed more chainIDs to consumerIds

* removed ClientIdToChainId state because chainId already resides on the registration record

* nit fixes in go docs

* removed MsgConsumerAddition

* added CLI commands for new messages

* removed consumer modification proposal

* removed (partially) consumer removal proposal

* rebased to pick up the inactive-validators work (PR #2079)

* introduced consumerId in the equivocation messages (and a useful query for Hermes to get the consumerId)

* added safeguard so that a validator cannot opt-in to two different chains with the same chain id

* renamed some chainIDs to consumerIds

* updated based on comments

Co-authored-by: bernd-m <[email protected]>

* fixed integration tests

* rebased to pick up the removal of legacy proposals (#2130) and re-introduced old messages so that existing proposals can deserialize

* changes messages to only have MsgCreateConsumer and MsgUpdateConsumer and modified protos so that we are backward-compatible

* cleaned up slightly a few things (mostly committing & pushing) so people can pick up the latest changes

* fixed the CreateConsumer and UpdateConsumer logic and made most of the fields optional

* fixed hooks and the code around proposalId to consumerId

* feat: extend consumer validator query to return commission rate (backport #2162) (#2165)

* adapt #2162 changes for permissionless ICS

* nits

---------

Co-authored-by: kirdatatjana <[email protected]>

* renamed some chainIds to consumerIds

* took into account comments and also added safeguard to reject new proposals that still use deprecated messages (e.g., MsgConsumerAddition, etc.)

* Update x/ccv/provider/types/msg.go

Co-authored-by: bernd-m <[email protected]>

* removed double-gas charge on MsgCreateConsumer and imroved the logic of MsgUpdateConsumer

* added PopulateMinimumPowerInTopN tested

* took into account comments (using protos for marshalling string slice, fixed issues in the UpdateConsumer logic, added extra check to abort spurious proposals)

* feat: add fields to consumer validators query (#2167)

* extend consumer validators query

* nit

* nits

* fix msg order

* deprecate power for consumer_power

* modified the way we verify the new owner address, as well as nit refactoring on the ConsumerIds

* fixed some rebase issues and changed a proto to be backward-compatible

---------

Co-authored-by: bernd-m <[email protected]>
Co-authored-by: Simon Noetzlin <[email protected]>
Co-authored-by: kirdatatjana <[email protected]>
insumity added a commit that referenced this pull request Aug 28, 2024
* (partially) renamed chain ids to consumer ids

* renamed proposal messages

* removed global slash entry

* fixed unit tests

* added new messages

* introduced new state

* added functionality for the register and initialize messages

* renamed (partially) chainIds to consumerIds

* set consumerId to chainId association during registration

* added extra check in the initialization so unknokwn, launched, or stopped chains cannot re-initialize

* added initial work on traversing initialized chains that are to-be-launched

* fixed rebase issues after bringing the VSCMaturedPackets work in

* made it so we traverse initialization records instead of addition proposals (+ additional changes so the unit tests pass)

* renamed more chainIDs to consumerIds

* removed ClientIdToChainId state because chainId already resides on the registration record

* nit fixes in go docs

* removed MsgConsumerAddition

* added CLI commands for new messages

* removed consumer modification proposal

* removed (partially) consumer removal proposal

* rebased to pick up the inactive-validators work (PR #2079)

* introduced consumerId in the equivocation messages (and a useful query for Hermes to get the consumerId)

* added safeguard so that a validator cannot opt-in to two different chains with the same chain id

* renamed some chainIDs to consumerIds

* updated based on comments

Co-authored-by: bernd-m <[email protected]>

* fixed integration tests

* rebased to pick up the removal of legacy proposals (#2130) and re-introduced old messages so that existing proposals can deserialize

* changes messages to only have MsgCreateConsumer and MsgUpdateConsumer and modified protos so that we are backward-compatible

* cleaned up slightly a few things (mostly committing & pushing) so people can pick up the latest changes

* fixed the CreateConsumer and UpdateConsumer logic and made most of the fields optional

* fixed hooks and the code around proposalId to consumerId

* feat: extend consumer validator query to return commission rate (backport #2162) (#2165)

* adapt #2162 changes for permissionless ICS

* nits

---------

Co-authored-by: kirdatatjana <[email protected]>

* renamed some chainIds to consumerIds

* took into account comments and also added safeguard to reject new proposals that still use deprecated messages (e.g., MsgConsumerAddition, etc.)

* Update x/ccv/provider/types/msg.go

Co-authored-by: bernd-m <[email protected]>

* removed double-gas charge on MsgCreateConsumer and imroved the logic of MsgUpdateConsumer

* added PopulateMinimumPowerInTopN tested

* took into account comments (using protos for marshalling string slice, fixed issues in the UpdateConsumer logic, added extra check to abort spurious proposals)

* feat: add fields to consumer validators query (#2167)

* extend consumer validators query

* nit

* nits

* fix msg order

* deprecate power for consumer_power

* modified the way we verify the new owner address, as well as nit refactoring on the ConsumerIds

* fixed some rebase issues and changed a proto to be backward-compatible

---------

Co-authored-by: bernd-m <[email protected]>
Co-authored-by: Simon Noetzlin <[email protected]>
Co-authored-by: kirdatatjana <[email protected]>
sainoe added a commit that referenced this pull request Aug 28, 2024
…fore launch (#2164)

* (partially) renamed chain ids to consumer ids

* renamed proposal messages

* removed global slash entry

* fixed unit tests

* added new messages

* introduced new state

* added functionality for the register and initialize messages

* renamed (partially) chainIds to consumerIds

* set consumerId to chainId association during registration

* added extra check in the initialization so unknokwn, launched, or stopped chains cannot re-initialize

* added initial work on traversing initialized chains that are to-be-launched

* fixed rebase issues after bringing the VSCMaturedPackets work in

* made it so we traverse initialization records instead of addition proposals (+ additional changes so the unit tests pass)

* renamed more chainIDs to consumerIds

* removed ClientIdToChainId state because chainId already resides on the registration record

* nit fixes in go docs

* removed MsgConsumerAddition

* added CLI commands for new messages

* removed consumer modification proposal

* removed (partially) consumer removal proposal

* rebased to pick up the inactive-validators work (PR #2079)

* introduced consumerId in the equivocation messages (and a useful query for Hermes to get the consumerId)

* added safeguard so that a validator cannot opt-in to two different chains with the same chain id

* renamed some chainIDs to consumerIds

* updated based on comments

Co-authored-by: bernd-m <[email protected]>

* fixed integration tests

* rebased to pick up the removal of legacy proposals (#2130) and re-introduced old messages so that existing proposals can deserialize

* changes messages to only have MsgCreateConsumer and MsgUpdateConsumer and modified protos so that we are backward-compatible

* cleaned up slightly a few things (mostly committing & pushing) so people can pick up the latest changes

* fixed the CreateConsumer and UpdateConsumer logic and made most of the fields optional

* fixed hooks and the code around proposalId to consumerId

* pre-spawn query

* rebase

* nits

* feat: extend consumer validator query to return commission rate (backport #2162) (#2165)

* adapt #2162 changes for permissionless ICS

* nits

---------

Co-authored-by: kirdatatjana <[email protected]>

* remove panics

* renamed some chainIds to consumerIds

* took into account comments and also added safeguard to reject new proposals that still use deprecated messages (e.g., MsgConsumerAddition, etc.)

* Update x/ccv/provider/types/msg.go

Co-authored-by: bernd-m <[email protected]>

* removed double-gas charge on MsgCreateConsumer and imroved the logic of MsgUpdateConsumer

* added PopulateMinimumPowerInTopN tested

* took into account comments (using protos for marshalling string slice, fixed issues in the UpdateConsumer logic, added extra check to abort spurious proposals)

* update logic

* took into account comments (using protos for marshalling string slice, fixed issues in the UpdateConsumer logic, added extra check to abort spurious proposals)

* feat: add fields to consumer validators query (#2167)

* extend consumer validators query

* nit

* nits

* fix msg order

* deprecate power for consumer_power

* nits

* feat: first iteration on Permissionless ICS (#2117)

* (partially) renamed chain ids to consumer ids

* renamed proposal messages

* removed global slash entry

* fixed unit tests

* added new messages

* introduced new state

* added functionality for the register and initialize messages

* renamed (partially) chainIds to consumerIds

* set consumerId to chainId association during registration

* added extra check in the initialization so unknokwn, launched, or stopped chains cannot re-initialize

* added initial work on traversing initialized chains that are to-be-launched

* fixed rebase issues after bringing the VSCMaturedPackets work in

* made it so we traverse initialization records instead of addition proposals (+ additional changes so the unit tests pass)

* renamed more chainIDs to consumerIds

* removed ClientIdToChainId state because chainId already resides on the registration record

* nit fixes in go docs

* removed MsgConsumerAddition

* added CLI commands for new messages

* removed consumer modification proposal

* removed (partially) consumer removal proposal

* rebased to pick up the inactive-validators work (PR #2079)

* introduced consumerId in the equivocation messages (and a useful query for Hermes to get the consumerId)

* added safeguard so that a validator cannot opt-in to two different chains with the same chain id

* renamed some chainIDs to consumerIds

* updated based on comments

Co-authored-by: bernd-m <[email protected]>

* fixed integration tests

* rebased to pick up the removal of legacy proposals (#2130) and re-introduced old messages so that existing proposals can deserialize

* changes messages to only have MsgCreateConsumer and MsgUpdateConsumer and modified protos so that we are backward-compatible

* cleaned up slightly a few things (mostly committing & pushing) so people can pick up the latest changes

* fixed the CreateConsumer and UpdateConsumer logic and made most of the fields optional

* fixed hooks and the code around proposalId to consumerId

* feat: extend consumer validator query to return commission rate (backport #2162) (#2165)

* adapt #2162 changes for permissionless ICS

* nits

---------

Co-authored-by: kirdatatjana <[email protected]>

* renamed some chainIds to consumerIds

* took into account comments and also added safeguard to reject new proposals that still use deprecated messages (e.g., MsgConsumerAddition, etc.)

* Update x/ccv/provider/types/msg.go

Co-authored-by: bernd-m <[email protected]>

* removed double-gas charge on MsgCreateConsumer and imroved the logic of MsgUpdateConsumer

* added PopulateMinimumPowerInTopN tested

* took into account comments (using protos for marshalling string slice, fixed issues in the UpdateConsumer logic, added extra check to abort spurious proposals)

* feat: add fields to consumer validators query (#2167)

* extend consumer validators query

* nit

* nits

* fix msg order

* deprecate power for consumer_power

* modified the way we verify the new owner address, as well as nit refactoring on the ConsumerIds

* fixed some rebase issues and changed a proto to be backward-compatible

---------

Co-authored-by: bernd-m <[email protected]>
Co-authored-by: Simon Noetzlin <[email protected]>
Co-authored-by: kirdatatjana <[email protected]>

* cover stopped phase case

* fixed bug on removing previous spawn time & added tests

* added some additional tests

* added tests on the hooks

* removed check that spawn time is in the future

* feat: refactor consumer validator set computation (#2175)

* add UT

* nits

* address comments

* Update x/ccv/provider/keeper/partial_set_security.go

Co-authored-by: insumity <[email protected]>

* fix tests

---------

Co-authored-by: insumity <[email protected]>

* nit

* nits

* nit

---------

Co-authored-by: insumity <[email protected]>
Co-authored-by: bernd-m <[email protected]>
Co-authored-by: kirdatatjana <[email protected]>
sainoe added a commit that referenced this pull request Aug 29, 2024
* feat: first iteration on Permissionless ICS (#2117)

* (partially) renamed chain ids to consumer ids

* renamed proposal messages

* removed global slash entry

* fixed unit tests

* added new messages

* introduced new state

* added functionality for the register and initialize messages

* renamed (partially) chainIds to consumerIds

* set consumerId to chainId association during registration

* added extra check in the initialization so unknokwn, launched, or stopped chains cannot re-initialize

* added initial work on traversing initialized chains that are to-be-launched

* fixed rebase issues after bringing the VSCMaturedPackets work in

* made it so we traverse initialization records instead of addition proposals (+ additional changes so the unit tests pass)

* renamed more chainIDs to consumerIds

* removed ClientIdToChainId state because chainId already resides on the registration record

* nit fixes in go docs

* removed MsgConsumerAddition

* added CLI commands for new messages

* removed consumer modification proposal

* removed (partially) consumer removal proposal

* rebased to pick up the inactive-validators work (PR #2079)

* introduced consumerId in the equivocation messages (and a useful query for Hermes to get the consumerId)

* added safeguard so that a validator cannot opt-in to two different chains with the same chain id

* renamed some chainIDs to consumerIds

* updated based on comments

Co-authored-by: bernd-m <[email protected]>

* fixed integration tests

* rebased to pick up the removal of legacy proposals (#2130) and re-introduced old messages so that existing proposals can deserialize

* changes messages to only have MsgCreateConsumer and MsgUpdateConsumer and modified protos so that we are backward-compatible

* cleaned up slightly a few things (mostly committing & pushing) so people can pick up the latest changes

* fixed the CreateConsumer and UpdateConsumer logic and made most of the fields optional

* fixed hooks and the code around proposalId to consumerId

* feat: extend consumer validator query to return commission rate (backport #2162) (#2165)

* adapt #2162 changes for permissionless ICS

* nits

---------

Co-authored-by: kirdatatjana <[email protected]>

* renamed some chainIds to consumerIds

* took into account comments and also added safeguard to reject new proposals that still use deprecated messages (e.g., MsgConsumerAddition, etc.)

* Update x/ccv/provider/types/msg.go

Co-authored-by: bernd-m <[email protected]>

* removed double-gas charge on MsgCreateConsumer and imroved the logic of MsgUpdateConsumer

* added PopulateMinimumPowerInTopN tested

* took into account comments (using protos for marshalling string slice, fixed issues in the UpdateConsumer logic, added extra check to abort spurious proposals)

* feat: add fields to consumer validators query (#2167)

* extend consumer validators query

* nit

* nits

* fix msg order

* deprecate power for consumer_power

* modified the way we verify the new owner address, as well as nit refactoring on the ConsumerIds

* fixed some rebase issues and changed a proto to be backward-compatible

---------

Co-authored-by: bernd-m <[email protected]>
Co-authored-by: Simon Noetzlin <[email protected]>
Co-authored-by: kirdatatjana <[email protected]>

* fixed bug on removing previous spawn time & added tests

* added some additional tests

* added tests on the hooks

* removed check that spawn time is in the future

* feat: refactor consumer validator set computation (#2175)

* add UT

* nits

* address comments

* Update x/ccv/provider/keeper/partial_set_security.go

Co-authored-by: insumity <[email protected]>

* fix tests

---------

Co-authored-by: insumity <[email protected]>

* add UT

* nits

* nits

* revert legacy prop funcs

* fix UT

---------

Co-authored-by: insumity <[email protected]>
Co-authored-by: bernd-m <[email protected]>
Co-authored-by: kirdatatjana <[email protected]>
sainoe added a commit that referenced this pull request Aug 29, 2024
* feat: first iteration on Permissionless ICS (#2117)

* (partially) renamed chain ids to consumer ids

* renamed proposal messages

* removed global slash entry

* fixed unit tests

* added new messages

* introduced new state

* added functionality for the register and initialize messages

* renamed (partially) chainIds to consumerIds

* set consumerId to chainId association during registration

* added extra check in the initialization so unknokwn, launched, or stopped chains cannot re-initialize

* added initial work on traversing initialized chains that are to-be-launched

* fixed rebase issues after bringing the VSCMaturedPackets work in

* made it so we traverse initialization records instead of addition proposals (+ additional changes so the unit tests pass)

* renamed more chainIDs to consumerIds

* removed ClientIdToChainId state because chainId already resides on the registration record

* nit fixes in go docs

* removed MsgConsumerAddition

* added CLI commands for new messages

* removed consumer modification proposal

* removed (partially) consumer removal proposal

* rebased to pick up the inactive-validators work (PR #2079)

* introduced consumerId in the equivocation messages (and a useful query for Hermes to get the consumerId)

* added safeguard so that a validator cannot opt-in to two different chains with the same chain id

* renamed some chainIDs to consumerIds

* updated based on comments

Co-authored-by: bernd-m <[email protected]>

* fixed integration tests

* rebased to pick up the removal of legacy proposals (#2130) and re-introduced old messages so that existing proposals can deserialize

* changes messages to only have MsgCreateConsumer and MsgUpdateConsumer and modified protos so that we are backward-compatible

* cleaned up slightly a few things (mostly committing & pushing) so people can pick up the latest changes

* fixed the CreateConsumer and UpdateConsumer logic and made most of the fields optional

* fixed hooks and the code around proposalId to consumerId

* feat: extend consumer validator query to return commission rate (backport #2162) (#2165)

* adapt #2162 changes for permissionless ICS

* nits

---------

Co-authored-by: kirdatatjana <[email protected]>

* renamed some chainIds to consumerIds

* took into account comments and also added safeguard to reject new proposals that still use deprecated messages (e.g., MsgConsumerAddition, etc.)

* Update x/ccv/provider/types/msg.go

Co-authored-by: bernd-m <[email protected]>

* removed double-gas charge on MsgCreateConsumer and imroved the logic of MsgUpdateConsumer

* added PopulateMinimumPowerInTopN tested

* took into account comments (using protos for marshalling string slice, fixed issues in the UpdateConsumer logic, added extra check to abort spurious proposals)

* feat: add fields to consumer validators query (#2167)

* extend consumer validators query

* nit

* nits

* fix msg order

* deprecate power for consumer_power

* modified the way we verify the new owner address, as well as nit refactoring on the ConsumerIds

* fixed some rebase issues and changed a proto to be backward-compatible

---------

Co-authored-by: bernd-m <[email protected]>
Co-authored-by: Simon Noetzlin <[email protected]>
Co-authored-by: kirdatatjana <[email protected]>

* add phase + metadata

* first logic draft

* add filter

* reformat test

* nits

* nit

* address comments

* update tests

* nits

* update logic

* update CLI

* revert unwanted changes

* remove filter field

* nit

* fix bad int conversion

* update cli

---------

Co-authored-by: insumity <[email protected]>
Co-authored-by: bernd-m <[email protected]>
Co-authored-by: kirdatatjana <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Sep 6, 2024
* feat: first iteration on Permissionless ICS (#2117)

* (partially) renamed chain ids to consumer ids

* renamed proposal messages

* removed global slash entry

* fixed unit tests

* added new messages

* introduced new state

* added functionality for the register and initialize messages

* renamed (partially) chainIds to consumerIds

* set consumerId to chainId association during registration

* added extra check in the initialization so unknokwn, launched, or stopped chains cannot re-initialize

* added initial work on traversing initialized chains that are to-be-launched

* fixed rebase issues after bringing the VSCMaturedPackets work in

* made it so we traverse initialization records instead of addition proposals (+ additional changes so the unit tests pass)

* renamed more chainIDs to consumerIds

* removed ClientIdToChainId state because chainId already resides on the registration record

* nit fixes in go docs

* removed MsgConsumerAddition

* added CLI commands for new messages

* removed consumer modification proposal

* removed (partially) consumer removal proposal

* rebased to pick up the inactive-validators work (PR #2079)

* introduced consumerId in the equivocation messages (and a useful query for Hermes to get the consumerId)

* added safeguard so that a validator cannot opt-in to two different chains with the same chain id

* renamed some chainIDs to consumerIds

* updated based on comments

Co-authored-by: bernd-m <[email protected]>

* fixed integration tests

* rebased to pick up the removal of legacy proposals (#2130) and re-introduced old messages so that existing proposals can deserialize

* changes messages to only have MsgCreateConsumer and MsgUpdateConsumer and modified protos so that we are backward-compatible

* cleaned up slightly a few things (mostly committing & pushing) so people can pick up the latest changes

* fixed the CreateConsumer and UpdateConsumer logic and made most of the fields optional

* fixed hooks and the code around proposalId to consumerId

* feat: extend consumer validator query to return commission rate (backport #2162) (#2165)

* adapt #2162 changes for permissionless ICS

* nits

---------

Co-authored-by: kirdatatjana <[email protected]>

* renamed some chainIds to consumerIds

* took into account comments and also added safeguard to reject new proposals that still use deprecated messages (e.g., MsgConsumerAddition, etc.)

* Update x/ccv/provider/types/msg.go

Co-authored-by: bernd-m <[email protected]>

* removed double-gas charge on MsgCreateConsumer and imroved the logic of MsgUpdateConsumer

* added PopulateMinimumPowerInTopN tested

* took into account comments (using protos for marshalling string slice, fixed issues in the UpdateConsumer logic, added extra check to abort spurious proposals)

* feat: add fields to consumer validators query (#2167)

* extend consumer validators query

* nit

* nits

* fix msg order

* deprecate power for consumer_power

* modified the way we verify the new owner address, as well as nit refactoring on the ConsumerIds

* fixed some rebase issues and changed a proto to be backward-compatible

---------

Co-authored-by: bernd-m <[email protected]>
Co-authored-by: Simon Noetzlin <[email protected]>
Co-authored-by: kirdatatjana <[email protected]>

* fixed bug on removing previous spawn time & added tests

* added some additional tests

* added tests on the hooks

* removed check that spawn time is in the future

* feat: refactor consumer validator set computation (#2175)

* add UT

* nits

* address comments

* Update x/ccv/provider/keeper/partial_set_security.go

Co-authored-by: insumity <[email protected]>

* fix tests

---------

Co-authored-by: insumity <[email protected]>

* fix!: ConsumerModificationProposal is needed in Gaia upgrade handler (#2176)

ConsumerModificationProposal is needed in Gaia upgrade handler

* fix: allow the owner of a chain to remove the chain (#2178)

fixed access in RemoveConsumer

* refactor: add proto enum for ConsumerPhase (#2182)

* feat: extend `consumer_validators` query to return consumer valset before launch (#2164)

* (partially) renamed chain ids to consumer ids

* renamed proposal messages

* removed global slash entry

* fixed unit tests

* added new messages

* introduced new state

* added functionality for the register and initialize messages

* renamed (partially) chainIds to consumerIds

* set consumerId to chainId association during registration

* added extra check in the initialization so unknokwn, launched, or stopped chains cannot re-initialize

* added initial work on traversing initialized chains that are to-be-launched

* fixed rebase issues after bringing the VSCMaturedPackets work in

* made it so we traverse initialization records instead of addition proposals (+ additional changes so the unit tests pass)

* renamed more chainIDs to consumerIds

* removed ClientIdToChainId state because chainId already resides on the registration record

* nit fixes in go docs

* removed MsgConsumerAddition

* added CLI commands for new messages

* removed consumer modification proposal

* removed (partially) consumer removal proposal

* rebased to pick up the inactive-validators work (PR #2079)

* introduced consumerId in the equivocation messages (and a useful query for Hermes to get the consumerId)

* added safeguard so that a validator cannot opt-in to two different chains with the same chain id

* renamed some chainIDs to consumerIds

* updated based on comments

Co-authored-by: bernd-m <[email protected]>

* fixed integration tests

* rebased to pick up the removal of legacy proposals (#2130) and re-introduced old messages so that existing proposals can deserialize

* changes messages to only have MsgCreateConsumer and MsgUpdateConsumer and modified protos so that we are backward-compatible

* cleaned up slightly a few things (mostly committing & pushing) so people can pick up the latest changes

* fixed the CreateConsumer and UpdateConsumer logic and made most of the fields optional

* fixed hooks and the code around proposalId to consumerId

* pre-spawn query

* rebase

* nits

* feat: extend consumer validator query to return commission rate (backport #2162) (#2165)

* adapt #2162 changes for permissionless ICS

* nits

---------

Co-authored-by: kirdatatjana <[email protected]>

* remove panics

* renamed some chainIds to consumerIds

* took into account comments and also added safeguard to reject new proposals that still use deprecated messages (e.g., MsgConsumerAddition, etc.)

* Update x/ccv/provider/types/msg.go

Co-authored-by: bernd-m <[email protected]>

* removed double-gas charge on MsgCreateConsumer and imroved the logic of MsgUpdateConsumer

* added PopulateMinimumPowerInTopN tested

* took into account comments (using protos for marshalling string slice, fixed issues in the UpdateConsumer logic, added extra check to abort spurious proposals)

* update logic

* took into account comments (using protos for marshalling string slice, fixed issues in the UpdateConsumer logic, added extra check to abort spurious proposals)

* feat: add fields to consumer validators query (#2167)

* extend consumer validators query

* nit

* nits

* fix msg order

* deprecate power for consumer_power

* nits

* feat: first iteration on Permissionless ICS (#2117)

* (partially) renamed chain ids to consumer ids

* renamed proposal messages

* removed global slash entry

* fixed unit tests

* added new messages

* introduced new state

* added functionality for the register and initialize messages

* renamed (partially) chainIds to consumerIds

* set consumerId to chainId association during registration

* added extra check in the initialization so unknokwn, launched, or stopped chains cannot re-initialize

* added initial work on traversing initialized chains that are to-be-launched

* fixed rebase issues after bringing the VSCMaturedPackets work in

* made it so we traverse initialization records instead of addition proposals (+ additional changes so the unit tests pass)

* renamed more chainIDs to consumerIds

* removed ClientIdToChainId state because chainId already resides on the registration record

* nit fixes in go docs

* removed MsgConsumerAddition

* added CLI commands for new messages

* removed consumer modification proposal

* removed (partially) consumer removal proposal

* rebased to pick up the inactive-validators work (PR #2079)

* introduced consumerId in the equivocation messages (and a useful query for Hermes to get the consumerId)

* added safeguard so that a validator cannot opt-in to two different chains with the same chain id

* renamed some chainIDs to consumerIds

* updated based on comments

Co-authored-by: bernd-m <[email protected]>

* fixed integration tests

* rebased to pick up the removal of legacy proposals (#2130) and re-introduced old messages so that existing proposals can deserialize

* changes messages to only have MsgCreateConsumer and MsgUpdateConsumer and modified protos so that we are backward-compatible

* cleaned up slightly a few things (mostly committing & pushing) so people can pick up the latest changes

* fixed the CreateConsumer and UpdateConsumer logic and made most of the fields optional

* fixed hooks and the code around proposalId to consumerId

* feat: extend consumer validator query to return commission rate (backport #2162) (#2165)

* adapt #2162 changes for permissionless ICS

* nits

---------

Co-authored-by: kirdatatjana <[email protected]>

* renamed some chainIds to consumerIds

* took into account comments and also added safeguard to reject new proposals that still use deprecated messages (e.g., MsgConsumerAddition, etc.)

* Update x/ccv/provider/types/msg.go

Co-authored-by: bernd-m <[email protected]>

* removed double-gas charge on MsgCreateConsumer and imroved the logic of MsgUpdateConsumer

* added PopulateMinimumPowerInTopN tested

* took into account comments (using protos for marshalling string slice, fixed issues in the UpdateConsumer logic, added extra check to abort spurious proposals)

* feat: add fields to consumer validators query (#2167)

* extend consumer validators query

* nit

* nits

* fix msg order

* deprecate power for consumer_power

* modified the way we verify the new owner address, as well as nit refactoring on the ConsumerIds

* fixed some rebase issues and changed a proto to be backward-compatible

---------

Co-authored-by: bernd-m <[email protected]>
Co-authored-by: Simon Noetzlin <[email protected]>
Co-authored-by: kirdatatjana <[email protected]>

* cover stopped phase case

* fixed bug on removing previous spawn time & added tests

* added some additional tests

* added tests on the hooks

* removed check that spawn time is in the future

* feat: refactor consumer validator set computation (#2175)

* add UT

* nits

* address comments

* Update x/ccv/provider/keeper/partial_set_security.go

Co-authored-by: insumity <[email protected]>

* fix tests

---------

Co-authored-by: insumity <[email protected]>

* nit

* nits

* nit

---------

Co-authored-by: insumity <[email protected]>
Co-authored-by: bernd-m <[email protected]>
Co-authored-by: kirdatatjana <[email protected]>

* fix build

* tests: fix integration test setup (#2183)

* fix integration test setup

* fix integration tests

* feat: add consumer chain query (#2179)

* feat: first iteration on Permissionless ICS (#2117)

* (partially) renamed chain ids to consumer ids

* renamed proposal messages

* removed global slash entry

* fixed unit tests

* added new messages

* introduced new state

* added functionality for the register and initialize messages

* renamed (partially) chainIds to consumerIds

* set consumerId to chainId association during registration

* added extra check in the initialization so unknokwn, launched, or stopped chains cannot re-initialize

* added initial work on traversing initialized chains that are to-be-launched

* fixed rebase issues after bringing the VSCMaturedPackets work in

* made it so we traverse initialization records instead of addition proposals (+ additional changes so the unit tests pass)

* renamed more chainIDs to consumerIds

* removed ClientIdToChainId state because chainId already resides on the registration record

* nit fixes in go docs

* removed MsgConsumerAddition

* added CLI commands for new messages

* removed consumer modification proposal

* removed (partially) consumer removal proposal

* rebased to pick up the inactive-validators work (PR #2079)

* introduced consumerId in the equivocation messages (and a useful query for Hermes to get the consumerId)

* added safeguard so that a validator cannot opt-in to two different chains with the same chain id

* renamed some chainIDs to consumerIds

* updated based on comments

Co-authored-by: bernd-m <[email protected]>

* fixed integration tests

* rebased to pick up the removal of legacy proposals (#2130) and re-introduced old messages so that existing proposals can deserialize

* changes messages to only have MsgCreateConsumer and MsgUpdateConsumer and modified protos so that we are backward-compatible

* cleaned up slightly a few things (mostly committing & pushing) so people can pick up the latest changes

* fixed the CreateConsumer and UpdateConsumer logic and made most of the fields optional

* fixed hooks and the code around proposalId to consumerId

* feat: extend consumer validator query to return commission rate (backport #2162) (#2165)

* adapt #2162 changes for permissionless ICS

* nits

---------

Co-authored-by: kirdatatjana <[email protected]>

* renamed some chainIds to consumerIds

* took into account comments and also added safeguard to reject new proposals that still use deprecated messages (e.g., MsgConsumerAddition, etc.)

* Update x/ccv/provider/types/msg.go

Co-authored-by: bernd-m <[email protected]>

* removed double-gas charge on MsgCreateConsumer and imroved the logic of MsgUpdateConsumer

* added PopulateMinimumPowerInTopN tested

* took into account comments (using protos for marshalling string slice, fixed issues in the UpdateConsumer logic, added extra check to abort spurious proposals)

* feat: add fields to consumer validators query (#2167)

* extend consumer validators query

* nit

* nits

* fix msg order

* deprecate power for consumer_power

* modified the way we verify the new owner address, as well as nit refactoring on the ConsumerIds

* fixed some rebase issues and changed a proto to be backward-compatible

---------

Co-authored-by: bernd-m <[email protected]>
Co-authored-by: Simon Noetzlin <[email protected]>
Co-authored-by: kirdatatjana <[email protected]>

* fixed bug on removing previous spawn time & added tests

* added some additional tests

* added tests on the hooks

* removed check that spawn time is in the future

* feat: refactor consumer validator set computation (#2175)

* add UT

* nits

* address comments

* Update x/ccv/provider/keeper/partial_set_security.go

Co-authored-by: insumity <[email protected]>

* fix tests

---------

Co-authored-by: insumity <[email protected]>

* add UT

* nits

* nits

* revert legacy prop funcs

* fix UT

---------

Co-authored-by: insumity <[email protected]>
Co-authored-by: bernd-m <[email protected]>
Co-authored-by: kirdatatjana <[email protected]>

* feat: extend consumer chains query (#2172)

* feat: first iteration on Permissionless ICS (#2117)

* (partially) renamed chain ids to consumer ids

* renamed proposal messages

* removed global slash entry

* fixed unit tests

* added new messages

* introduced new state

* added functionality for the register and initialize messages

* renamed (partially) chainIds to consumerIds

* set consumerId to chainId association during registration

* added extra check in the initialization so unknokwn, launched, or stopped chains cannot re-initialize

* added initial work on traversing initialized chains that are to-be-launched

* fixed rebase issues after bringing the VSCMaturedPackets work in

* made it so we traverse initialization records instead of addition proposals (+ additional changes so the unit tests pass)

* renamed more chainIDs to consumerIds

* removed ClientIdToChainId state because chainId already resides on the registration record

* nit fixes in go docs

* removed MsgConsumerAddition

* added CLI commands for new messages

* removed consumer modification proposal

* removed (partially) consumer removal proposal

* rebased to pick up the inactive-validators work (PR #2079)

* introduced consumerId in the equivocation messages (and a useful query for Hermes to get the consumerId)

* added safeguard so that a validator cannot opt-in to two different chains with the same chain id

* renamed some chainIDs to consumerIds

* updated based on comments

Co-authored-by: bernd-m <[email protected]>

* fixed integration tests

* rebased to pick up the removal of legacy proposals (#2130) and re-introduced old messages so that existing proposals can deserialize

* changes messages to only have MsgCreateConsumer and MsgUpdateConsumer and modified protos so that we are backward-compatible

* cleaned up slightly a few things (mostly committing & pushing) so people can pick up the latest changes

* fixed the CreateConsumer and UpdateConsumer logic and made most of the fields optional

* fixed hooks and the code around proposalId to consumerId

* feat: extend consumer validator query to return commission rate (backport #2162) (#2165)

* adapt #2162 changes for permissionless ICS

* nits

---------

Co-authored-by: kirdatatjana <[email protected]>

* renamed some chainIds to consumerIds

* took into account comments and also added safeguard to reject new proposals that still use deprecated messages (e.g., MsgConsumerAddition, etc.)

* Update x/ccv/provider/types/msg.go

Co-authored-by: bernd-m <[email protected]>

* removed double-gas charge on MsgCreateConsumer and imroved the logic of MsgUpdateConsumer

* added PopulateMinimumPowerInTopN tested

* took into account comments (using protos for marshalling string slice, fixed issues in the UpdateConsumer logic, added extra check to abort spurious proposals)

* feat: add fields to consumer validators query (#2167)

* extend consumer validators query

* nit

* nits

* fix msg order

* deprecate power for consumer_power

* modified the way we verify the new owner address, as well as nit refactoring on the ConsumerIds

* fixed some rebase issues and changed a proto to be backward-compatible

---------

Co-authored-by: bernd-m <[email protected]>
Co-authored-by: Simon Noetzlin <[email protected]>
Co-authored-by: kirdatatjana <[email protected]>

* add phase + metadata

* first logic draft

* add filter

* reformat test

* nits

* nit

* address comments

* update tests

* nits

* update logic

* update CLI

* revert unwanted changes

* remove filter field

* nit

* fix bad int conversion

* update cli

---------

Co-authored-by: insumity <[email protected]>
Co-authored-by: bernd-m <[email protected]>
Co-authored-by: kirdatatjana <[email protected]>

* feat!: migrations for permissionless  (#2174)

* migrations for permissionless -- wip

* feat!: migrations for permissionless (#2177)

* initial commit

* took into account comments

* removed deprecated queries

* fix error due to rebase

* remove fields from provider genesis

* remove commented code

---------

Co-authored-by: insumity <[email protected]>

* feat: update `consumer_chains` REST endpoint (#2188)

update consumer chains REST endpoint

* fix: permissionless added event + cli changes (#2185)

* add consumer registration event

* fix some queries, CLI and permissionless logic

* cli changes

* addressed review comments

* fix!: several permissionless changes (#2189)

* minor fixes in tests

* replace IsConsumerProposedOrRegistered with IsConsumerActive

* remove param from createStakingValidator

* handle error in GetTopN

* remove aux methods for getting PowerShapingParameters

* remove default PowerShapingParameters

* fix tests

* handle error messages

* fix: fix consumer chain query CLI (#2190)

* fix consumer chains query cli

* add consumer-chain cli command

* fix consumer chains cli bug

* fix!: fix store.set nil values (#2193)

fix store.set nil values

* fix!: msgs validation (#2195)

* add testing for ValidateStringField

* ValidateInitializationParameters

* ValidatePowerShapingParameters

* validate NewOwnerAddress

* apply review suggestions

* fix: fix queries' API REST endpoint path (#2196)

* clean uw files

* doc

* Revert "doc"

This reverts commit efc2718.

* Revert "clean uw files"

This reverts commit 5773cf3.

* remove deprecated REST endpoints

* update REST endpoint

* fix broken UT by previous PR (#2195)

* fix: permissionless query (#2191)

* fix implementation

* addressed comments

* cleanup

* keep metadata and powershaping data for stopped consumer chains

* addressed comments

* adapt unit-tests

* refactor: mostly refactors  (#2194)

* handle errors

* set the reverse index in SetConsumerClientId

* rename method

* create consumer_lifecycle.go with launch/stop logic

* move methods around

* move methods around

* handle ChangeRewardDenoms

* add TODOs

* remove proposal_test

* remove todos

* apply review suggestions

* apply review suggestions

* fix UTs

* fix!: provider msg validation (#2197)

* validate MsgAssignConsumerKey

* validate MsgSubmitConsumerMisbehaviour and MsgSubmitConsumerDoubleVoting

* move RemoveConsumer

* refactor: rearrange messages in msg.go

* validate MsgOptIn and MsgOptOut

* validate MsgSetConsumerCommissionRate

* remove ValidateBasic for deprecated msgs

* remove deprecated GetSigners

* remove deprecated GetSignBytes

* remove deprecated govv1beta1 validation

* remove Route and Type

* Update x/ccv/provider/keeper/msg_server.go

Co-authored-by: insumity <[email protected]>

* apply review suggestions

* apply review suggestions

---------

Co-authored-by: insumity <[email protected]>

* test: fix e2e tests + PSS e2e tests use permissionless (#2192)

Fix e2e tests + make PSS e2e tests use Permissionless ICS

* refactor: power shaping (#2207)

* update allowlist and denylist power shaping update

* fix tests

* refactor: move power shaping params to power_shaping.go

* rename record to parameters

* fix merge conflicts

* feat: fix queries (#2209)

* remove chain ID from all-pairs-valconsensus-address

* add consumer_id to Chain

* add GetAllLaunchedConsumerIds

* fix UT

* apply review suggestions

* fix!: remove `stopTime` from `MsgRemoveConsumer` (#2208)

* init commit

* renamed stop time to removal time

* fix errors in tests

* add GetAllConsumerWithIBCClients

* use GetAllConsumerWithIBCClients for efficiency

* fix UTs

* remove GetAllLaunchedConsumerIds as not needed

* typo in GetAllConsumersWithIBCClients

* improve comment

* Apply suggestions from code review

Co-authored-by: Marius Poke <[email protected]>

* took into account comments

---------

Co-authored-by: mpoke <[email protected]>

* feat: remove provider migration for CV 3 to 6 (#2211)

* remove migrations to CV < 7

* add changelog entry

* fix version name

* fix!: fix migration issue (#2214)

* init commit

* took into account comments

* fix!: register `ConsumerModificationProposal` and others (#2215)

init commit

* fix: fix misbehaviour and equivocation evidence CLI commands (#2213)

* silent errors in MBT driver

* fix misbehaviour and double-signing CLI cmds + few nits

* revert changes

* nit: remove type prefix from consumer phase enum (#2220)

remove type prefix in consumer phase enum

* refactor: stop using signer field in messages (#2219)

* remove error check

* stop using signer field in messages

* expand TODO comment

* replace signer with submitter

* fix UTs

* chore: update TX CLI help (#2222)

* update CLI help

* apply review suggestions

* feat!: add events for provider messages (#2221)

* add events for CreateConsumer

* add events for UpdateConsumer

* add events for RemoveConsumer

* add events for the rest of the messages

* apply review suggestions

* Id instead of ID

* fix events

* fix UT

* remove duplicate AttributeSubmitterAddress

* fix: fix queries' API endpoints (#2226)

* endpoint fixes

* Update proto/interchain_security/ccv/provider/v1/query.proto

Co-authored-by: MSalopek <[email protected]>

* Update proto/interchain_security/ccv/provider/v1/query.proto

Co-authored-by: MSalopek <[email protected]>

* generate proto

---------

Co-authored-by: MSalopek <[email protected]>

* fix!: replace CanLaunch with InitializeConsumer (#2224)

replace CanLaunch with InitializeConsumer

* fix: improve commands' description (#2227)

init commit

---------

Co-authored-by: insumity <[email protected]>
Co-authored-by: bernd-m <[email protected]>
Co-authored-by: Simon Noetzlin <[email protected]>
Co-authored-by: kirdatatjana <[email protected]>
Co-authored-by: MSalopek <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:CI Assigned automatically by the PR labeler C:Docs Assigned automatically by the PR labeler C:Testing Assigned automatically by the PR labeler C:x/provider Assigned automatically by the PR labeler
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

5 participants