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!: Allow inactive provider chain validators to validate on consumer chains #2079

Merged
merged 54 commits into from
Aug 6, 2024

Conversation

p-offtermatt
Copy link
Contributor

@p-offtermatt p-offtermatt commented Jul 22, 2024

Description

Closes: #1913

Combines all changes for allowing inactive validators to validate on consumer chains.
Recommended order of reviewing:

  • Review the ADR for context
  • Review the core logic changes:
    • New parameters/consumer chain configurations in the provider and how they are used
    • Check the bonded validators and bonded active validators functions and where they are used: GetLastActiveBondedValidators vs GetLastBondedValidators need to be used correctly (GetLastBondedValidators if all bonded validators should be included, GetLastActiveBondedValidators if only active validators should be included)
    • Review how provider validator updates are computed in EndBlock (see module.go in x/ccv/provider)
    • Review how validator updates for consumer chains are computed in x/ccv/provider/keeper/partial_set_security.go
    • Review the new app wiring in app/provider/app.go
  • Review tests:
    • Simulator is now enabled and checks some properties, see app/provider/sim_test.go
    • e2e tests: there are a lot of e2e tests because the feature is better suited to be tested e2e. integration tests are not very extensive here in comparison

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

…sus validator storage (#1990)

* Refactor validator set storage

* Add comment for getTotalPower

* Add provider consensus validator set storage

* Add key to key test

* Add unit test for LastTotalProviderConsensusPower

* Address comments
* Refactor validator set storage

* Add comment for getTotalPower

* Add provider consensus validator set storage

* Add new MaxProviderConsensusValidators param

* Add validation for MaxProviderConsensusValidators

* Add function to get MaxProviderConsensusValidators param

* refactor!: Refactor the validator set storage and add provider consensus validator storage (#1990)

* Refactor validator set storage

* Add comment for getTotalPower

* Add provider consensus validator set storage

* Add key to key test

* Add unit test for LastTotalProviderConsensusPower

* Address comments
…f the staking module (#1993)

* Refactor validator set storage

* Add comment for getTotalPower

* Add provider consensus validator set storage

* Add new MaxProviderConsensusValidators param

* Add validation for MaxProviderConsensusValidators

* Add no_valupdates_staking module

* Add function to get MaxProviderConsensusValidators param

* Start returning validators in EndBlock

* Fix tests

* Revert cosmetic change

* Revert cosmetic changes

* Revert formatting

* Add genutil replacer module

* Revert formatting

* Revert formatting in tests/integration

* Revert minor formatting

* Fix type

* Change wrapped staking to conform to EndBlocker interface

* Fix typo

* Revert "Fix typo"

This reverts commit 62dfd1e.

* Add e2e test for inactive vals

* Start fixing e2e test

* Revert formatting changes

* Remove more formatting

* Revert extra formatting

* Re-wire provider/app.go to use wrapped modules

* Remove consumer rewards check

* Add inactive provider vals testcase to nightly

* Adjust comment

* Address comments

* Fix nightly test name

* feat: Initialize the max validators parameter for existing consumers (#2012)

* Add initialization for validator cap

* Remove migration test

* Fix inconsistent naming
* Refactor validator set storage

* Add comment for getTotalPower

* Add provider consensus validator set storage

* Add new MaxProviderConsensusValidators param

* Add validation for MaxProviderConsensusValidators

* Add no_valupdates_staking module

* Add function to get MaxProviderConsensusValidators param

* Start returning validators in EndBlock

* Fix tests

* Revert cosmetic change

* Revert cosmetic changes

* Revert formatting

* Add genutil replacer module

* Revert formatting

* Revert formatting in tests/integration

* Revert minor formatting

* Fix type

* Change wrapped staking to conform to EndBlocker interface

* Fix typo

* Revert "Fix typo"

This reverts commit 62dfd1e.

* Add e2e test for inactive vals

* Start fixing e2e test

* Revert formatting changes

* Remove more formatting

* Revert extra formatting

* Re-wire provider/app.go to use wrapped modules

* Remove consumer rewards check

* Add simulator test

* Add randomly generated parameters for provider in sim

* Add invariant

* Add simulation to Makefile and github workflow

* Use simcli instead of just passing true
…2035)

* Add minimum stake key

* Add MinValidatorRank prefix

* Add keeper and tests for new parameters

* Utilize MinStake and MaxRank parameters in computing next validators

* Mention MinStake and MaxRank in adr

* Add test for FulfillsMinStake

* Handle multiple validators with same power

* Add min stake and max rank to docs

* Add minStake and maxRank to proposals

* Check for untyped equality

* Handle minStake and maxRank in Msgs

* Add integration test for min stake and max rank

* Rename test and testfile

* Update docs/docs/adrs/adr-017-allowing-inactive-validators.md

* Add changelog entries for maxrank and minstake

* Address comments

* Clarify which feature is disabled by setting maxrank

* Test validator powers cap and validator set cap into int param testing function
* Change wiring for mint and gov to use ProviderKeeper instead of StakingKeeper

* Add test for IterateBondedValidatorsByPower

* Rewire GovKeeper

* Fix docstrings

* Test other modified functions

* Start writing some testing scenarios

* Add TotalBondedTokens to expected staking keeper interface
* Add test for inactive vals with top N

* Add test case to predefined tests

* Fix bonded/active validator distinction

* Fix relay test to set max provider consensus vals correctly

* feat!: Add a parameter that determines whether consumer chains allow inactive validators to validate them (#2066)

* Introduce new AllowInactiveValidators param for consumer chains

* Add AllowInactiveValidators param to tests

* Set MaxProviderConsensusValidators in tests

* Add migration to initialize inactive vals

* Add changelog entries for inactive vals param

* Add property-based test for inactive vals

* Add docs for inactive vals param

* Set AllowInactiveVals parameter in e2e test

* test: Add e2e tests for inactive vals (#2064)

* Start adding e2e test for governance

* Debug gov with inactive vals test

* Outline for test scenarios where they are tested

* Add MaxRank steps

* Add e2e tests for min stake and max rank

* Revert formatting change

* Refactor stepsOptIn

* Use adjusted config for e2e tests

* Write for more scenarios where they are tested

* Add test for mint

* Add docstrings for e2e steps
@p-offtermatt p-offtermatt requested a review from a team as a code owner July 22, 2024 14:30
@github-actions github-actions bot added C:Testing Assigned automatically by the PR labeler C:x/consumer Assigned automatically by the PR labeler C:x/provider Assigned automatically by the PR labeler C:x/types Assigned automatically by the PR labeler C:Build Assigned automatically by the PR labeler C:CI Assigned automatically by the PR labeler C:Docs Assigned automatically by the PR labeler C:ADR Assigned automatically by the PR labeler C:x/democracy Assigned automatically by the PR labeler labels Jul 22, 2024
// get the bonded validators from the staking module
bondedValidators, err := k.stakingKeeper.GetBondedValidatorsByPower(ctx)
if err != nil {
panic(fmt.Errorf("failed to get bonded validators: %w", err))

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods Warning

Possible panics in BeginBock- or EndBlock-related consensus methods could cause a chain halt
tests/e2e/state.go Dismissed Show dismissed Hide dismissed
Copy link
Contributor

@mpoke mpoke left a comment

Choose a reason for hiding this comment

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

Great work @p-offtermatt. See my comments below.

proto/interchain_security/ccv/provider/v1/provider.proto Outdated Show resolved Hide resolved
proto/interchain_security/ccv/provider/v1/tx.proto Outdated Show resolved Hide resolved
docs/docs/features/power-shaping.md Outdated Show resolved Hide resolved
docs/docs/features/power-shaping.md Outdated Show resolved Hide resolved
x/ccv/provider/keeper/partial_set_security.go Outdated Show resolved Hide resolved
x/ccv/provider/keeper/partial_set_security.go Outdated Show resolved Hide resolved
x/ccv/provider/keeper/genesis.go Outdated Show resolved Hide resolved
x/ccv/provider/keeper/relay.go Show resolved Hide resolved
// get the last validator set sent to consensus
currentValidators, err := k.GetLastProviderConsensusValSet(ctx)
if err != nil {
panic(fmt.Errorf("failed to get last provider consensus validator set: %w", err))

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods Warning

Possible panics in BeginBock- or EndBlock-related consensus methods could cause a chain halt
currentValidators := k.GetConsumerValSet(ctx, chainID)
currentValidators, err := k.GetConsumerValSet(ctx, chainID)
if err != nil {
panic(fmt.Errorf("failed to get consumer validators: %w", err))

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods Warning

Possible panics in BeginBock- or EndBlock-related consensus methods could cause a chain halt

### Scenario 3: Inactive validators should get rewards from consumer chains

An inactive validator that is validating on a consumer chain should receive rewards in the consumer chain token.
Copy link
Contributor

Choose a reason for hiding this comment

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

"[...] in the consumer chain token" is this actually tested? I only see:
IsNativeDenom: true, // check for rewards in the provider denom
in the tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will merge for now to get this out of the way, and we can handle this in a separate PR imo

Copy link
Contributor

@insumity insumity left a comment

Choose a reason for hiding this comment

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

Amazing work Philip! 🎉

I reviewed everything last week and went again over today to look more closely at the general idea, wiring, E2E tests. Specifically, the reviewing chunks (i.e., "ADR for context", "core logic changes", and "tests" (I only skimmed through the simulator)) you mention in your PR. It looks really good to me. It might still be good to have a second pair of 👁️ s on the wiring (although it looks fine to me) because I'm not that familiar with how everything is going to fit together, especially afterwards when we bring this into gaia.

Copy link
Contributor

@mpoke mpoke left a comment

Choose a reason for hiding this comment

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

Great work @p-offtermatt

p-offtermatt and others added 2 commits August 5, 2024 19:13
Co-authored-by: insumity <karolos@informal.systems>
Co-authored-by: insumity <karolos@informal.systems>
@p-offtermatt p-offtermatt added this pull request to the merge queue Aug 5, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Aug 5, 2024
@p-offtermatt p-offtermatt added this pull request to the merge queue Aug 6, 2024
Merged via the queue into main with commit 0e080c3 Aug 6, 2024
16 of 18 checks passed
@p-offtermatt p-offtermatt deleted the ph/inactive-vals-v50-2 branch August 6, 2024 05:15
@p-offtermatt p-offtermatt restored the ph/inactive-vals-v50-2 branch August 10, 2024 14:03
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 <43466467+bermuell@users.noreply.github.com>

* 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 <116630536+kirdatatjana@users.noreply.github.com>

* 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 <43466467+bermuell@users.noreply.github.com>

* 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 <43466467+bermuell@users.noreply.github.com>
Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
Co-authored-by: kirdatatjana <116630536+kirdatatjana@users.noreply.github.com>
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 <43466467+bermuell@users.noreply.github.com>

* 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 <116630536+kirdatatjana@users.noreply.github.com>

* 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 <43466467+bermuell@users.noreply.github.com>

* 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 <43466467+bermuell@users.noreply.github.com>
Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
Co-authored-by: kirdatatjana <116630536+kirdatatjana@users.noreply.github.com>
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 <43466467+bermuell@users.noreply.github.com>

* 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 <116630536+kirdatatjana@users.noreply.github.com>

* 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 <43466467+bermuell@users.noreply.github.com>

* 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 <43466467+bermuell@users.noreply.github.com>

* 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 <116630536+kirdatatjana@users.noreply.github.com>

* 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 <43466467+bermuell@users.noreply.github.com>

* 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 <43466467+bermuell@users.noreply.github.com>
Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
Co-authored-by: kirdatatjana <116630536+kirdatatjana@users.noreply.github.com>

* 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 <karolos@informal.systems>

* fix tests

---------

Co-authored-by: insumity <karolos@informal.systems>

* nit

* nits

* nit

---------

Co-authored-by: insumity <karolos@informal.systems>
Co-authored-by: bernd-m <43466467+bermuell@users.noreply.github.com>
Co-authored-by: kirdatatjana <116630536+kirdatatjana@users.noreply.github.com>
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 <43466467+bermuell@users.noreply.github.com>

* 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 <116630536+kirdatatjana@users.noreply.github.com>

* 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 <43466467+bermuell@users.noreply.github.com>

* 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 <43466467+bermuell@users.noreply.github.com>
Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
Co-authored-by: kirdatatjana <116630536+kirdatatjana@users.noreply.github.com>

* 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 <karolos@informal.systems>

* fix tests

---------

Co-authored-by: insumity <karolos@informal.systems>

* add UT

* nits

* nits

* revert legacy prop funcs

* fix UT

---------

Co-authored-by: insumity <karolos@informal.systems>
Co-authored-by: bernd-m <43466467+bermuell@users.noreply.github.com>
Co-authored-by: kirdatatjana <116630536+kirdatatjana@users.noreply.github.com>
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 <43466467+bermuell@users.noreply.github.com>

* 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 <116630536+kirdatatjana@users.noreply.github.com>

* 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 <43466467+bermuell@users.noreply.github.com>

* 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 <43466467+bermuell@users.noreply.github.com>
Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
Co-authored-by: kirdatatjana <116630536+kirdatatjana@users.noreply.github.com>

* 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 <karolos@informal.systems>
Co-authored-by: bernd-m <43466467+bermuell@users.noreply.github.com>
Co-authored-by: kirdatatjana <116630536+kirdatatjana@users.noreply.github.com>
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 <43466467+bermuell@users.noreply.github.com>

* 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 <116630536+kirdatatjana@users.noreply.github.com>

* 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 <43466467+bermuell@users.noreply.github.com>

* 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 <43466467+bermuell@users.noreply.github.com>
Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
Co-authored-by: kirdatatjana <116630536+kirdatatjana@users.noreply.github.com>

* 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 <karolos@informal.systems>

* fix tests

---------

Co-authored-by: insumity <karolos@informal.systems>

* 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 <43466467+bermuell@users.noreply.github.com>

* 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 <116630536+kirdatatjana@users.noreply.github.com>

* 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 <43466467+bermuell@users.noreply.github.com>

* 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 <43466467+bermuell@users.noreply.github.com>

* 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 <116630536+kirdatatjana@users.noreply.github.com>

* 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 <43466467+bermuell@users.noreply.github.com>

* 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 <43466467+bermuell@users.noreply.github.com>
Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
Co-authored-by: kirdatatjana <116630536+kirdatatjana@users.noreply.github.com>

* 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 <karolos@informal.systems>

* fix tests

---------

Co-authored-by: insumity <karolos@informal.systems>

* nit

* nits

* nit

---------

Co-authored-by: insumity <karolos@informal.systems>
Co-authored-by: bernd-m <43466467+bermuell@users.noreply.github.com>
Co-authored-by: kirdatatjana <116630536+kirdatatjana@users.noreply.github.com>

* 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 <43466467+bermuell@users.noreply.github.com>

* 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 <116630536+kirdatatjana@users.noreply.github.com>

* 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 <43466467+bermuell@users.noreply.github.com>

* 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 <43466467+bermuell@users.noreply.github.com>
Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
Co-authored-by: kirdatatjana <116630536+kirdatatjana@users.noreply.github.com>

* 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 <karolos@informal.systems>

* fix tests

---------

Co-authored-by: insumity <karolos@informal.systems>

* add UT

* nits

* nits

* revert legacy prop funcs

* fix UT

---------

Co-authored-by: insumity <karolos@informal.systems>
Co-authored-by: bernd-m <43466467+bermuell@users.noreply.github.com>
Co-authored-by: kirdatatjana <116630536+kirdatatjana@users.noreply.github.com>

* 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 <43466467+bermuell@users.noreply.github.com>

* 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 <116630536+kirdatatjana@users.noreply.github.com>

* 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 <43466467+bermuell@users.noreply.github.com>

* 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 <43466467+bermuell@users.noreply.github.com>
Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
Co-authored-by: kirdatatjana <116630536+kirdatatjana@users.noreply.github.com>

* 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 <karolos@informal.systems>
Co-authored-by: bernd-m <43466467+bermuell@users.noreply.github.com>
Co-authored-by: kirdatatjana <116630536+kirdatatjana@users.noreply.github.com>

* 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 <karolos@informal.systems>

* 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 <karolos@informal.systems>

* apply review suggestions

* apply review suggestions

---------

Co-authored-by: insumity <karolos@informal.systems>

* 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 <marius.poke@posteo.de>

* took into account comments

---------

Co-authored-by: mpoke <marius.poke@posteo.de>

* 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 <matija.salopek994@gmail.com>

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

Co-authored-by: MSalopek <matija.salopek994@gmail.com>

* generate proto

---------

Co-authored-by: MSalopek <matija.salopek994@gmail.com>

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

replace CanLaunch with InitializeConsumer

* fix: improve commands' description (#2227)

init commit

---------

Co-authored-by: insumity <karolos@informal.systems>
Co-authored-by: bernd-m <43466467+bermuell@users.noreply.github.com>
Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
Co-authored-by: kirdatatjana <116630536+kirdatatjana@users.noreply.github.com>
Co-authored-by: MSalopek <matija.salopek994@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:ADR Assigned automatically by the PR labeler C:Build Assigned automatically by the PR labeler 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/consumer Assigned automatically by the PR labeler C:x/democracy Assigned automatically by the PR labeler C:x/provider Assigned automatically by the PR labeler C:x/types Assigned automatically by the PR labeler
Projects
None yet
4 participants