Skip to content

Commit

Permalink
feat!: Introduce Partial Set Security (#1809)
Browse files Browse the repository at this point in the history
* cleanup ./changelog entries

* docs: changelog and release notes for v4.0.0 (#1564)

* add v4.0.0 section to changelog

* add release notes

* fix!: Validation of SlashAcks fails due to marshaling to Bech32  (backport #1570) (#1577)

fix!: Validation of SlashAcks fails due to marshaling to Bech32  (#1570)

* add different Bech32Prefix for consumer and provider

* separate app encoding and params

* remove ConsumerValPubKey from ValidatorConfig

* update addresses in tests

* make SlashAcks consistent across chains

* add comments for clarity

* Regenerate traces

* Fix argument order

* set bech32prefix for provider to cosmos

* add changelog entries

* add consumer-double-downtime e2e test

* update nightly-e2e workflow

* fix typo

* add consumer-double-downtime to testConfigs

* remove changes on provider

* skip invalid SlashAcks

* seal the config

* clear the outstanding downtime flag for new vals

* add info on upgrading to v4.0.0

* fix upgrade handler

* fix changeover e2e test

* Update tests/e2e/config.go

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* Update tests/e2e/config.go

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* add AccountPrefix to ChainConfig

* fix docstrings

* update AccountAddressPrefix in app.go

* fix consumer-misb e2e test

---------

Co-authored-by: Philip Offtermatt <p.offtermatt@gmail.com>
Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>
(cherry picked from commit 8604692)

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

* docs: update changelog for v4.0.0 (#1578)

update changelog

* docs: prepare for v4.0.0 (#1581)

* unclog build

* update release notes

* update release date

* feat!: enable Opt In and Top N chains through gov proposals (#1615)

* init commit

* added test

* fixed tests

* added changelog entry and comment

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

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* Update .changelog/unreleased/features/1587-enable-opt-in-chains-through-gov-proposals.md

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

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

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

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

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

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

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

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

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

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

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* changed to tabular test

---------

Co-authored-by: insumity <karolos@informal.systems>
Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* feat!: introduce MsgOptIn and MsgOptOut (#1620)

* init commit

* cleaning up

* changed cons to val address

* Revert "changed cons to val address"

This reverts commit a32e882.

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

Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>

* took into account comments

* added key assignment

* add contraint such that opt out only works if the chain is running

---------

Co-authored-by: insumity <karolos@informal.systems>
Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>

* test: MBT: Add partial set security to model (feature branch version) (#1627)

* Port changes from branch to main

* Add model analysis changes to Makefile

* test: Ports key assignment to the driver on the PSS feature branch (#1628)

* Port key assignment to MBT driver

* Add comment and make var names clearer

* feat!: automatically opt in validators that vote Yes on consumer addition proposals (#1629)

* init commit

* changed providerKeeper.GetProposedConsumerChain to return a  bool

* add logging mesages

* one more log message

* fix comment

* added one more test case of NO vote and made tabular test

* test: Add driver for PSS (#1636)

* Port key assignment to MBT driver

* Add PSS trace generation

* Add PSS trace gen to longer trace gen

* Start handling top N parameter for new consumers

* Finish merge

* Add handling for optin/optout steps

* Remove expected error from OptIn, which should not error

* set top N parameter during path setup

* Add comment to setup.go

* feat!: add PSS reward distribution spike (#1632)

* PSS reward distribution

* "add optin mapping to test"

* Update app/provider/app.go

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* docs

* add TODO

* fix Dos vector in IBCMiddlewarea

* add reformat

* fix DOS issue and make integration tests pass

* doc

* add integration test

* doc

* Compute total vp per consumer

* add comments

* remove opt-in comments and add TODOs

* format

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

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

* add UT + doc

* Update tests/integration/distribution.go

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

* Update tests/integration/distribution.go

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

* nits

* Update x/ccv/provider/ibc_middleware.go

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

* add panics in IBC Middleware ICS4wrapper funcs

* address comments

---------

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>
Co-authored-by: insumity <karolos@informal.systems>
Co-authored-by: Marius Poke <marius.poke@posteo.de>

* feat! use protos to serialize opted-in validators (#1659)

move OptedInValidators to proto

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

* feat!: PSS enable per-consumer chain commission (#1657)

* add draft commission

* implement consumer commission draft

* formatting

* add msg handling

* improve UT

* nits

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

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

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

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

* optimize keys

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

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

* address comments

* address comments

* remove unnecessary check

* Revert "remove unnecessary check"

This reverts commit 2951e9b.

* fix minor bug in StopConsumerChain

---------

Co-authored-by: insumity <karolos@informal.systems>
Co-authored-by: Marius Poke <marius.poke@posteo.de>

* test: update integration test suite for PSS (#1687)

* draft multi consumer transfer setup and test

* format multi consumer distribution test

* update test for democ consumer chains

* nits

* nit

* docs: changelog and release notes for v4.0.0 (#1564)

* add v4.0.0 section to changelog

* add release notes

* fix!: Validation of SlashAcks fails due to marshaling to Bech32  (backport #1570) (#1577)

fix!: Validation of SlashAcks fails due to marshaling to Bech32  (#1570)

* add different Bech32Prefix for consumer and provider

* separate app encoding and params

* remove ConsumerValPubKey from ValidatorConfig

* update addresses in tests

* make SlashAcks consistent across chains

* add comments for clarity

* Regenerate traces

* Fix argument order

* set bech32prefix for provider to cosmos

* add changelog entries

* add consumer-double-downtime e2e test

* update nightly-e2e workflow

* fix typo

* add consumer-double-downtime to testConfigs

* remove changes on provider

* skip invalid SlashAcks

* seal the config

* clear the outstanding downtime flag for new vals

* add info on upgrading to v4.0.0

* fix upgrade handler

* fix changeover e2e test

* Update tests/e2e/config.go

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* Update tests/e2e/config.go

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* add AccountPrefix to ChainConfig

* fix docstrings

* update AccountAddressPrefix in app.go

* fix consumer-misb e2e test

---------

Co-authored-by: Philip Offtermatt <p.offtermatt@gmail.com>
Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>
(cherry picked from commit 8604692)

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

* docs: update changelog for v4.0.0 (#1578)

update changelog

* feat!: enable Opt In and Top N chains through gov proposals (#1615)

* init commit

* added test

* fixed tests

* added changelog entry and comment

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

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* Update .changelog/unreleased/features/1587-enable-opt-in-chains-through-gov-proposals.md

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

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

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

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

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

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

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

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

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

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

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* changed to tabular test

---------

Co-authored-by: insumity <karolos@informal.systems>
Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* feat!: introduce MsgOptIn and MsgOptOut (#1620)

* init commit

* cleaning up

* changed cons to val address

* Revert "changed cons to val address"

This reverts commit a32e882.

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

Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>

* took into account comments

* added key assignment

* add contraint such that opt out only works if the chain is running

---------

Co-authored-by: insumity <karolos@informal.systems>
Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>

* test: MBT: Add partial set security to model (feature branch version) (#1627)

* Port changes from branch to main

* Add model analysis changes to Makefile

* feat!: add PSS reward distribution spike (#1632)

* PSS reward distribution

* "add optin mapping to test"

* Update app/provider/app.go

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* docs

* add TODO

* fix Dos vector in IBCMiddlewarea

* add reformat

* fix DOS issue and make integration tests pass

* doc

* add integration test

* doc

* Compute total vp per consumer

* add comments

* remove opt-in comments and add TODOs

* format

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

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

* add UT + doc

* Update tests/integration/distribution.go

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

* Update tests/integration/distribution.go

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

* nits

* Update x/ccv/provider/ibc_middleware.go

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

* add panics in IBC Middleware ICS4wrapper funcs

* address comments

---------

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>
Co-authored-by: insumity <karolos@informal.systems>
Co-authored-by: Marius Poke <marius.poke@posteo.de>

* feat!: PSS enable per-consumer chain commission (#1657)

* add draft commission

* implement consumer commission draft

* formatting

* add msg handling

* improve UT

* nits

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

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

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

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

* optimize keys

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

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

* address comments

* address comments

* remove unnecessary check

* Revert "remove unnecessary check"

This reverts commit 2951e9b.

* fix minor bug in StopConsumerChain

---------

Co-authored-by: insumity <karolos@informal.systems>
Co-authored-by: Marius Poke <marius.poke@posteo.de>

* fix nits in MBT model after merging #1676 from main

* Fix merging ccv model

* Remove conflict markers

* Remove more conflict markers

* EndProviderEpoch takes ConsumerAdditionMsg

* Fix using consumer addition msgs instead of chain names in boundeddrift.qnt

* lint

* chore: rebase PSS branch with main (#1689)

* Update tests/mbt/driver/mbt_test.go

* nits

* revert unwanted line deletion from linter

---------

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* feat!: complete the PSS reward distribution (#1709)

* update compute consumer total power for reward distribution

* update distribution logic to work with epochcs

* Adapt reward distribution mem test to epochs

* doc

* nits

* other nits

* nits

* Update tests/integration/distribution.go

* feat!: Add slashing logic for PSS (#1710)

* add check for consumer validators in downtime logic

* fix UT

* try to fix weird errors in gh worfklow

* fix silly merge bug

* nits

* ci: do not scan the tests for security issues (#1717)

init commit

* feat!: compute partial sets (#1702)

* init commit

* nit change

* cleaning up

* clean up

* fix distribution test

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

Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>

* took into Simon's comments

* took into rest of the comments

* nit change

* return an error if validator cannot opt out from a Top N chain

* removed automatic opt-in for validators that vote Yes on proposals

* tiny fix for E2E tests

* nit change to remove unecessary else

* fixed topN == 0 issue

---------

Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>

* feat!: update PSS cli (#1708)

finalize PSS CLI cmds

* Rename and add comission rate command to commands

* feat!: only perform consumer additions for non-empty chains (#1730)

* init commit

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

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

---------

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* feat: Add queries for PSS and consumer commission rate (#1733)

* init commit

* nit change

* cleaning up

* clean up

* fix distribution test

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

Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>

* took into Simon's comments

* took into rest of the comments

* nit change

* return an error if validator cannot opt out from a Top N chain

* removed automatic opt-in for validators that vote Yes on proposals

* tiny fix for E2E tests

* nit change to remove unecessary else

* update consumer chains query to return topN

* update query consu chains proto

* add consumer chains per validator query

* Add PSS command to provider's cli

* nits

* add consumer commission rate query

* nits

* big renaming

* fix doc

* nits

* nits

* docs

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

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

* nit

* add OptedIn in QueryConsumerChainsValidatorHasToValidate

* remove OptIn field in consumer chains query response

* include validators that opt-in during the next epochs

* update has-to-validate condition

* fix tinny bug in the tests after merging  feat/partial-security

* update doc

* update cli description

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

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

* changes

---------

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

* fix!: Fix opt-in assignment (#1732)

* Make the same validator assigning the same key a noop instead of an error

* Adjust test

* Update tests

* Fix newline warning

* Regenerate traces

* Add key assignment change to changelog

* Add info log for same key same validator assignments

* Add changelog entry to api-breaking

* Update x/ccv/provider/handler_test.go

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

* Add more comments to test and return right validator

---------

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

* fix silly bug in PSS opted-in val query

* fix logging in ibc_module.go

* test: add partial-set-security E2E tests (#1737)

* init commit

* fix traces

* Add PSS to default tests

* Update tests/e2e/steps_partial_set_security.go

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* Update tests/e2e/steps_partial_set_security.go

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

---------

Co-authored-by: Philip Offtermatt <p.offtermatt@gmail.com>
Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* Nit changes based on Simons comments. To be pushed directly because E2E PR 1737 were the comments were written was accidentally merged.

* fix!: return a SlashAck even if the validator is not a consumer validator (#1763)

* init commit

* fix test

* test: Expand PSS e2e test to include slashing (#1752)

* Expand test to include slashing

* Add back existing steps

* Add downtime to top N test

* Fix nits

* fix!: update unbonding  pausing for PSS (#1728)

* draft PSS unbonding fix

* fix hook logic to retrieve validator address from ubd op

* add unbonding pausing unit-test

* remove panic in hook

* Get back 3.2.0 and 3.3.0 changelog from main

* Port epilogue from main

* Fix proto conflict

* generate proto files

* Port RELEASE_NOTES

* Fix merge for tests

* Merge declaration and assignment

* Clean up model files

* Add pss tests to MBT readme

* Restore MsgSubmitConsumerDoubleVoting handler

* Remove local driver files

* Remove Quint guidelines

* Add optin/optout to MBT readme

* Fix types in model

* Fix model

* Add migration

* Ensure SlashAcks are sent even when the valset does not change

* adding changelog entry

* Empty DowntimeSlachAcks on EndBlock

* Remove logs

* Change condition for sending slash acks

* Revert model changes

* Start fixing PSS issues in model

* Add expected errors to opt out action

* Revert PSS quint model changes

* Add parameter to ComputeNextEpochConsumerValSet

* Set top N param in setup

* Fix: do not try key assignment if there is no nonjailed validator

* Do not assign keys for jailed validators

* Only jail validators with non-zero-power

* Add unit test

* Add unit test for unset case

* Panic on not being able to unmarshal

* Move packet handling into ack.Success block

* Format

* Remove unnecessary comment

* Add parens for clarity

* Format and fix typo

* Move OptIn/OptOut events to provider events

* Remove unused function

* Improve comments for keys

* Improve comments for key getter functions

* Remove order change for existing keys

* Re-add nolint instruction

* nit comment fix

* Move ConsumerAllocationTests to correct folder

* nit comment fix

* fix!: handle consumer commission marshalling errors gracefully (#1836)

* handle consumer commission setter/getter gracefully to avoid BeginBlock panic + add msg in codec

* fix consumer commission query rest path

* fix: update queries REST path for PSS (#1839)

update queries rest path

* Clarify that GetProposedConsumerChain is test-only

* fix: Fix has-to-validate query (#1823)

* Fix has-to-validate query

* Flip comparison sign for checking minPower

* Regenerate traces

* Remove unnecessary print

* Address comments

* fix!: fix slashing in PSS (#1838)

* drop slash packet for opted-out validators before updating slash meter

* fix integration test

* fix ut

* update UT

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

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

* Remove BlockValidatorUpdate from expected staking keeper

* added an error response value to ComputeMinPowerToOptIn

* delete additional state when we stop a chain

* Assign keys and change voting power only for unjailed nodes with >0 power

* fix: Validate consumer commission rate against minimal rate (#1834)

* Validate consumer commission rate

* Add test for commission rates

* Remove static minimum commission rate validation from Set

* feat!: introduce power shaping (#1830)

* added power shaping

* fixes

* Add property based test for power cap

* fixed tests & added algorithm's idea

* nit changes

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

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* remove empty-validator-set check

* implicit memory aliasing issue fixed

* added keeper tests

* updated HasToValidate query

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

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

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

Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* took into account comments

* do not use cached ctx

* Fix E2E test. A jailed validator does not have to validate.

* fix merge issue and format

---------

Co-authored-by: Philip Offtermatt <p.offtermatt@gmail.com>
Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>

* Update v4 to v5 in package version

* Bump consensus version

* Add migration in correct folder

* Update version from v4 to v5 in migration

---------

Co-authored-by: mpoke <marius.poke@posteo.de>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: insumity <insumity@users.noreply.github.com>
Co-authored-by: insumity <karolos@informal.systems>
Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
  • Loading branch information
6 people authored May 1, 2024
1 parent ab71eae commit 8c4d87f
Show file tree
Hide file tree
Showing 196 changed files with 11,433 additions and 1,230 deletions.
Empty file added .changelog/unreleased/.gitkeep
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Assigning a key that is already assigned by the same validator will now be a no-op instead of throwing an error.
([\#1732](https://github.com/cosmos/interchain-security/pull/1732))
3 changes: 3 additions & 0 deletions .changelog/unreleased/features/1809-pss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Adding the Partial Set Security (PSS) feature cf. [ADR 015](https://cosmos.github.io/interchain-security/adrs/adr-015-partial-set-security).
PSS enables consumer chains to join ICS as _Top N_ or _Opt In_ chains and enables validators to opt to validate the consumer chains they want.
([\#1809](https://github.com/cosmos/interchain-security/pull/1809))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Enable Opt In and Top N chains through gov proposals.
([\#1587](https://github.com/cosmos/interchain-security/pull/1587))
2 changes: 2 additions & 0 deletions .changelog/unreleased/state-breaking/1809-pss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Adding the Partial Set Security feature cf. [ADR 015](https://cosmos.github.io/interchain-security/adrs/adr-015-partial-set-security).
([\#1809](https://github.com/cosmos/interchain-security/pull/1809))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Enable Opt In and Top N chains through gov proposals.
([\#1587](https://github.com/cosmos/interchain-security/pull/1587))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Assigning a key that is already assigned by the same validator will now be a no-op instead of throwing an error.
([\#1732](https://github.com/cosmos/interchain-security/pull/1732))
4 changes: 2 additions & 2 deletions app/consumer-democracy/ante/forbidden_proposals_ante_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
"github.com/cosmos/cosmos-sdk/x/params/types/proposal"

app "github.com/cosmos/interchain-security/v4/app/consumer-democracy"
"github.com/cosmos/interchain-security/v4/app/consumer-democracy/ante"
app "github.com/cosmos/interchain-security/v5/app/consumer-democracy"
"github.com/cosmos/interchain-security/v5/app/consumer-democracy/ante"
)

// in SDKv47 parameter updates full params object is required
Expand Down
6 changes: 3 additions & 3 deletions app/consumer-democracy/ante_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/ante"

democracyante "github.com/cosmos/interchain-security/v4/app/consumer-democracy/ante"
consumerante "github.com/cosmos/interchain-security/v4/app/consumer/ante"
ibcconsumerkeeper "github.com/cosmos/interchain-security/v4/x/ccv/consumer/keeper"
democracyante "github.com/cosmos/interchain-security/v5/app/consumer-democracy/ante"
consumerante "github.com/cosmos/interchain-security/v5/app/consumer/ante"
ibcconsumerkeeper "github.com/cosmos/interchain-security/v5/x/ccv/consumer/keeper"
)

// HandlerOptions extend the SDK's AnteHandler options by requiring the IBC
Expand Down
16 changes: 8 additions & 8 deletions app/consumer-democracy/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ import (
"github.com/cometbft/cometbft/libs/log"
tmos "github.com/cometbft/cometbft/libs/os"

appencoding "github.com/cosmos/interchain-security/v4/app/encoding"
testutil "github.com/cosmos/interchain-security/v4/testutil/integration"
consumer "github.com/cosmos/interchain-security/v4/x/ccv/consumer"
consumerkeeper "github.com/cosmos/interchain-security/v4/x/ccv/consumer/keeper"
consumertypes "github.com/cosmos/interchain-security/v4/x/ccv/consumer/types"
ccvdistr "github.com/cosmos/interchain-security/v4/x/ccv/democracy/distribution"
ccvgov "github.com/cosmos/interchain-security/v4/x/ccv/democracy/governance"
ccvstaking "github.com/cosmos/interchain-security/v4/x/ccv/democracy/staking"
appencoding "github.com/cosmos/interchain-security/v5/app/encoding"
testutil "github.com/cosmos/interchain-security/v5/testutil/integration"
consumer "github.com/cosmos/interchain-security/v5/x/ccv/consumer"
consumerkeeper "github.com/cosmos/interchain-security/v5/x/ccv/consumer/keeper"
consumertypes "github.com/cosmos/interchain-security/v5/x/ccv/consumer/types"
ccvdistr "github.com/cosmos/interchain-security/v5/x/ccv/democracy/distribution"
ccvgov "github.com/cosmos/interchain-security/v5/x/ccv/democracy/governance"
ccvstaking "github.com/cosmos/interchain-security/v5/x/ccv/democracy/staking"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions app/consumer-democracy/proposals_whitelisting_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
ibctesting "github.com/cosmos/ibc-go/v7/testing"
"github.com/stretchr/testify/require"

appConsumer "github.com/cosmos/interchain-security/v4/app/consumer-democracy"
icstestingutils "github.com/cosmos/interchain-security/v4/testutil/ibc_testing"
testutil "github.com/cosmos/interchain-security/v4/testutil/integration"
appConsumer "github.com/cosmos/interchain-security/v5/app/consumer-democracy"
icstestingutils "github.com/cosmos/interchain-security/v5/testutil/ibc_testing"
testutil "github.com/cosmos/interchain-security/v5/testutil/integration"
)

func TestDemocracyGovernanceWhitelistingKeys(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions app/consumer/ante/disabled_modules_ante_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types"
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"

"github.com/cosmos/interchain-security/v4/app/consumer/ante"
appencoding "github.com/cosmos/interchain-security/v4/app/encoding"
"github.com/cosmos/interchain-security/v5/app/consumer/ante"
appencoding "github.com/cosmos/interchain-security/v5/app/encoding"
)

func TestDisabledModulesDecorator(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions app/consumer/ante/msg_filter_ante_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"

"github.com/cosmos/interchain-security/v4/app/consumer/ante"
appencoding "github.com/cosmos/interchain-security/v4/app/encoding"
"github.com/cosmos/interchain-security/v5/app/consumer/ante"
appencoding "github.com/cosmos/interchain-security/v5/app/encoding"
)

type consumerKeeper struct {
Expand Down
4 changes: 2 additions & 2 deletions app/consumer/ante_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/ante"

consumerante "github.com/cosmos/interchain-security/v4/app/consumer/ante"
ibcconsumerkeeper "github.com/cosmos/interchain-security/v4/x/ccv/consumer/keeper"
consumerante "github.com/cosmos/interchain-security/v5/app/consumer/ante"
ibcconsumerkeeper "github.com/cosmos/interchain-security/v5/x/ccv/consumer/keeper"
)

// HandlerOptions extend the SDK's AnteHandler options by requiring the IBC
Expand Down
10 changes: 5 additions & 5 deletions app/consumer/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ import (
"github.com/cometbft/cometbft/libs/log"
tmos "github.com/cometbft/cometbft/libs/os"

appencoding "github.com/cosmos/interchain-security/v4/app/encoding"
testutil "github.com/cosmos/interchain-security/v4/testutil/integration"
ibcconsumer "github.com/cosmos/interchain-security/v4/x/ccv/consumer"
ibcconsumerkeeper "github.com/cosmos/interchain-security/v4/x/ccv/consumer/keeper"
ibcconsumertypes "github.com/cosmos/interchain-security/v4/x/ccv/consumer/types"
appencoding "github.com/cosmos/interchain-security/v5/app/encoding"
testutil "github.com/cosmos/interchain-security/v5/testutil/integration"
ibcconsumer "github.com/cosmos/interchain-security/v5/x/ccv/consumer"
ibcconsumerkeeper "github.com/cosmos/interchain-security/v5/x/ccv/consumer/keeper"
ibcconsumertypes "github.com/cosmos/interchain-security/v5/x/ccv/consumer/types"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions app/consumer/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/version"

consumerTypes "github.com/cosmos/interchain-security/v4/x/ccv/consumer/types"
"github.com/cosmos/interchain-security/v4/x/ccv/types"
consumerTypes "github.com/cosmos/interchain-security/v5/x/ccv/consumer/types"
"github.com/cosmos/interchain-security/v5/x/ccv/types"
)

// The genesis state of the blockchain is represented here as a map of raw json
Expand Down
6 changes: 3 additions & 3 deletions app/consumer/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/x/auth/types"

app "github.com/cosmos/interchain-security/v4/app/consumer"
consumerTypes "github.com/cosmos/interchain-security/v4/x/ccv/consumer/types"
ccvtypes "github.com/cosmos/interchain-security/v4/x/ccv/types"
app "github.com/cosmos/interchain-security/v5/app/consumer"
consumerTypes "github.com/cosmos/interchain-security/v5/x/ccv/consumer/types"
ccvtypes "github.com/cosmos/interchain-security/v5/x/ccv/types"
)

const (
Expand Down
26 changes: 15 additions & 11 deletions app/provider/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,13 @@ import (
"github.com/cometbft/cometbft/libs/log"
tmos "github.com/cometbft/cometbft/libs/os"

appencoding "github.com/cosmos/interchain-security/v4/app/encoding"
testutil "github.com/cosmos/interchain-security/v4/testutil/integration"
ibcprovider "github.com/cosmos/interchain-security/v4/x/ccv/provider"
ibcproviderclient "github.com/cosmos/interchain-security/v4/x/ccv/provider/client"
ibcproviderkeeper "github.com/cosmos/interchain-security/v4/x/ccv/provider/keeper"
providertypes "github.com/cosmos/interchain-security/v4/x/ccv/provider/types"
appencoding "github.com/cosmos/interchain-security/v5/app/encoding"
testutil "github.com/cosmos/interchain-security/v5/testutil/integration"
"github.com/cosmos/interchain-security/v5/x/ccv/provider"
ibcprovider "github.com/cosmos/interchain-security/v5/x/ccv/provider"
ibcproviderclient "github.com/cosmos/interchain-security/v5/x/ccv/provider/client"
ibcproviderkeeper "github.com/cosmos/interchain-security/v5/x/ccv/provider/keeper"
providertypes "github.com/cosmos/interchain-security/v5/x/ccv/provider/types"
)

const (
Expand Down Expand Up @@ -470,12 +471,15 @@ func New(
app.BankKeeper,
scopedTransferKeeper,
)
transferModule := transfer.NewAppModule(app.TransferKeeper)
ibcmodule := transfer.NewIBCModule(app.TransferKeeper)

// Add an IBC middleware callback to track the consumer rewards
var transferStack porttypes.IBCModule
transferStack = transfer.NewIBCModule(app.TransferKeeper)
transferStack = provider.NewIBCMiddleware(transferStack, app.ProviderKeeper)

// create static IBC router, add transfer route, then set and seal it
ibcRouter := porttypes.NewRouter()
ibcRouter.AddRoute(ibctransfertypes.ModuleName, ibcmodule)
ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferStack)
ibcRouter.AddRoute(providertypes.ModuleName, providerModule)
app.IBCKeeper.SetRouter(ibcRouter)

Expand Down Expand Up @@ -514,7 +518,7 @@ func New(
evidence.NewAppModule(app.EvidenceKeeper),
ibc.NewAppModule(app.IBCKeeper),
params.NewAppModule(app.ParamsKeeper),
transferModule,
transfer.NewAppModule(app.TransferKeeper),
providerModule,
)

Expand Down Expand Up @@ -610,7 +614,7 @@ func New(
params.NewAppModule(app.ParamsKeeper),
evidence.NewAppModule(app.EvidenceKeeper),
ibc.NewAppModule(app.IBCKeeper),
transferModule,
transfer.NewAppModule(app.TransferKeeper),
)

app.sm.RegisterStoreDecoders()
Expand Down
5 changes: 3 additions & 2 deletions app/sovereign/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ import (
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"

// add mint
mint "github.com/cosmos/cosmos-sdk/x/mint"
mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper"
Expand All @@ -105,8 +106,8 @@ import (
"github.com/cometbft/cometbft/libs/log"
tmos "github.com/cometbft/cometbft/libs/os"

appencoding "github.com/cosmos/interchain-security/v4/app/encoding"
testutil "github.com/cosmos/interchain-security/v4/testutil/integration"
appencoding "github.com/cosmos/interchain-security/v5/app/encoding"
testutil "github.com/cosmos/interchain-security/v5/testutil/integration"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions cmd/interchain-security-cd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import (
tmcfg "github.com/cometbft/cometbft/config"
"github.com/cometbft/cometbft/libs/log"

consumer "github.com/cosmos/interchain-security/v4/app/consumer"
appencoding "github.com/cosmos/interchain-security/v4/app/encoding"
consumer "github.com/cosmos/interchain-security/v5/app/consumer"
appencoding "github.com/cosmos/interchain-security/v5/app/encoding"
)

// NewRootCmd creates a new root command for simd. It is called once in the
Expand Down
6 changes: 3 additions & 3 deletions cmd/interchain-security-cd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"github.com/cosmos/cosmos-sdk/server"
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"

app "github.com/cosmos/interchain-security/v4/app/consumer"
appparams "github.com/cosmos/interchain-security/v4/app/params"
"github.com/cosmos/interchain-security/v4/cmd/interchain-security-cd/cmd"
app "github.com/cosmos/interchain-security/v5/app/consumer"
appparams "github.com/cosmos/interchain-security/v5/app/params"
"github.com/cosmos/interchain-security/v5/cmd/interchain-security-cd/cmd"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions cmd/interchain-security-cdd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import (
tmcfg "github.com/cometbft/cometbft/config"
"github.com/cometbft/cometbft/libs/log"

cdd "github.com/cosmos/interchain-security/v4/app/consumer-democracy"
appencoding "github.com/cosmos/interchain-security/v4/app/encoding"
cdd "github.com/cosmos/interchain-security/v5/app/consumer-democracy"
appencoding "github.com/cosmos/interchain-security/v5/app/encoding"
)

// NewRootCmd creates a new root command for simd. It is called once in the
Expand Down
6 changes: 3 additions & 3 deletions cmd/interchain-security-cdd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"github.com/cosmos/cosmos-sdk/server"
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"

app "github.com/cosmos/interchain-security/v4/app/consumer-democracy"
appparams "github.com/cosmos/interchain-security/v4/app/params"
"github.com/cosmos/interchain-security/v4/cmd/interchain-security-cdd/cmd"
app "github.com/cosmos/interchain-security/v5/app/consumer-democracy"
appparams "github.com/cosmos/interchain-security/v5/app/params"
"github.com/cosmos/interchain-security/v5/cmd/interchain-security-cdd/cmd"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions cmd/interchain-security-pd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import (
tmcfg "github.com/cometbft/cometbft/config"
"github.com/cometbft/cometbft/libs/log"

appencoding "github.com/cosmos/interchain-security/v4/app/encoding"
providerApp "github.com/cosmos/interchain-security/v4/app/provider"
appencoding "github.com/cosmos/interchain-security/v5/app/encoding"
providerApp "github.com/cosmos/interchain-security/v5/app/provider"
)

// NewRootCmd creates a new root command for simd. It is called once in the
Expand Down
6 changes: 3 additions & 3 deletions cmd/interchain-security-pd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"github.com/cosmos/cosmos-sdk/server"
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"

appparams "github.com/cosmos/interchain-security/v4/app/params"
app "github.com/cosmos/interchain-security/v4/app/provider"
"github.com/cosmos/interchain-security/v4/cmd/interchain-security-pd/cmd"
appparams "github.com/cosmos/interchain-security/v5/app/params"
app "github.com/cosmos/interchain-security/v5/app/provider"
"github.com/cosmos/interchain-security/v5/cmd/interchain-security-pd/cmd"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions cmd/interchain-security-sd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import (
tmcfg "github.com/cometbft/cometbft/config"
"github.com/cometbft/cometbft/libs/log"

appencoding "github.com/cosmos/interchain-security/v4/app/encoding"
sovereignApp "github.com/cosmos/interchain-security/v4/app/sovereign"
appencoding "github.com/cosmos/interchain-security/v5/app/encoding"
sovereignApp "github.com/cosmos/interchain-security/v5/app/sovereign"
)

// NewRootCmd creates a new root command for simd. It is called once in the
Expand Down
6 changes: 3 additions & 3 deletions cmd/interchain-security-sd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"github.com/cosmos/cosmos-sdk/server"
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"

appparams "github.com/cosmos/interchain-security/v4/app/params"
app "github.com/cosmos/interchain-security/v4/app/sovereign"
"github.com/cosmos/interchain-security/v4/cmd/interchain-security-sd/cmd"
appparams "github.com/cosmos/interchain-security/v5/app/params"
app "github.com/cosmos/interchain-security/v5/app/sovereign"
"github.com/cosmos/interchain-security/v5/cmd/interchain-security-sd/cmd"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/cosmos/interchain-security/v4
module github.com/cosmos/interchain-security/v5

go 1.21.1

Expand Down
2 changes: 1 addition & 1 deletion proto/interchain_security/ccv/consumer/v1/consumer.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";
package interchain_security.ccv.consumer.v1;

option go_package = "github.com/cosmos/interchain-security/v4/x/ccv/consumer/types";
option go_package = "github.com/cosmos/interchain-security/v5/x/ccv/consumer/types";

import "google/protobuf/any.proto";
import "gogoproto/gogo.proto";
Expand Down
2 changes: 1 addition & 1 deletion proto/interchain_security/ccv/consumer/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package interchain_security.ccv.consumer.v1;

option go_package = "github.com/cosmos/interchain-security/v4/x/ccv/consumer/types";
option go_package = "github.com/cosmos/interchain-security/v5/x/ccv/consumer/types";

import "interchain_security/ccv/v1/shared_consumer.proto";
import "ibc/lightclients/tendermint/v1/tendermint.proto";
Expand Down
2 changes: 1 addition & 1 deletion proto/interchain_security/ccv/consumer/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package interchain_security.ccv.consumer.v1;
import "interchain_security/ccv/v1/shared_consumer.proto";
option go_package = "github.com/cosmos/interchain-security/v4/x/ccv/consumer/types";
option go_package = "github.com/cosmos/interchain-security/v5/x/ccv/consumer/types";

import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
Expand Down
2 changes: 1 addition & 1 deletion proto/interchain_security/ccv/provider/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package interchain_security.ccv.provider.v1;

option go_package = "github.com/cosmos/interchain-security/v4/x/ccv/provider/types";
option go_package = "github.com/cosmos/interchain-security/v5/x/ccv/provider/types";

import "gogoproto/gogo.proto";
import "interchain_security/ccv/v1/shared_consumer.proto";
Expand Down
Loading

0 comments on commit 8c4d87f

Please sign in to comment.