-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove provider migration for CV 3 to 6 (#2211)
* remove migrations to CV < 7 * add changelog entry * fix version name
- Loading branch information
Showing
8 changed files
with
10 additions
and
191 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
.changelog/unreleased/features/provider/2211-deprecate-migration.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- Remove provider migrations to consensus versions lower than 7. | ||
To migrate the provider module from consensus version 3, 4, or 5 to consensus version 7 or higher, | ||
users should use v4.3.x in production to migrate to consensus version 6. | ||
([\#2211](https://github.com/cosmos/interchain-security/pull/2211)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,9 +8,6 @@ import ( | |
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" | ||
|
||
providerkeeper "github.com/cosmos/interchain-security/v5/x/ccv/provider/keeper" | ||
v4 "github.com/cosmos/interchain-security/v5/x/ccv/provider/migrations/v4" | ||
v5 "github.com/cosmos/interchain-security/v5/x/ccv/provider/migrations/v5" | ||
v6 "github.com/cosmos/interchain-security/v5/x/ccv/provider/migrations/v6" | ||
v7 "github.com/cosmos/interchain-security/v5/x/ccv/provider/migrations/v7" | ||
v8 "github.com/cosmos/interchain-security/v5/x/ccv/provider/migrations/v8" | ||
) | ||
|
@@ -55,24 +52,23 @@ func (m Migrator) Migrate2to3(ctx sdktypes.Context) error { | |
// Migrate3to4 migrates x/ccvprovider state from consensus version 3 to 4. | ||
// The migration consists of provider chain params additions. | ||
func (m Migrator) Migrate3to4(ctx sdktypes.Context) error { | ||
v4.MigrateParams(ctx, m.paramSpace) | ||
return nil | ||
return fmt.Errorf("state migration failed: " + | ||
"first run [email protected] in production to migrate from consensus version 3 to 4") | ||
} | ||
|
||
// Migrate4to5 migrates x/ccvprovider state from consensus version 4 to 5. | ||
// The migration consists of setting a top N of 95 for all registered consumer chains. | ||
func (m Migrator) Migrate4to5(ctx sdktypes.Context) error { | ||
v5.MigrateTopNForRegisteredChains(ctx, m.providerKeeper) | ||
return nil | ||
return fmt.Errorf("state migration failed: " + | ||
"first run [email protected] in production to migrate from consensus version 4 to 5") | ||
} | ||
|
||
// Migrate5to6 migrates x/ccvprovider state from consensus version 5 to 6. | ||
// It consists of setting the `NumberOfEpochsToStartReceivingRewards` param, as well as | ||
// computing and storing the minimal power in the top N for all registered consumer chains. | ||
func (m Migrator) Migrate5to6(ctx sdktypes.Context) error { | ||
v6.MigrateParams(ctx, m.paramSpace) | ||
v6.MigrateMinPowerInTopN(ctx, m.providerKeeper) | ||
return nil | ||
return fmt.Errorf("state migration failed: " + | ||
"first run [email protected] in production to migrate from consensus version 5 to 6") | ||
} | ||
|
||
// Migrate6to7 migrates x/ccvprovider state from consensus version 6 to 7. | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.