migrations

package
v6.0.0-rc0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Migrator

type Migrator struct {
	// contains filtered or unexported fields
}

Migrator is a struct for handling in-place store migrations.

func NewMigrator

func NewMigrator(
	providerKeeper providerkeeper.Keeper,
	paramSpace paramtypes.Subspace,
	storeKey storetypes.StoreKey,
) Migrator

NewMigrator returns a new Migrator.

func (Migrator) Migrate1to2

func (m Migrator) Migrate1to2(ctx sdktypes.Context) error

Migrating consensus version 1 to 2 is a no-op. Migrating from v1 -> v2 -> v3 will require multiple state breaking changes and migrations. First run provider@v2.x.y in production to migrate from consensus version 1 to 2. Then, in order to migrate to consensus version 3, first upgrade to provider@v3.x.y.

func (Migrator) Migrate2to3

func (m Migrator) Migrate2to3(ctx sdktypes.Context) error

Migrate2to3 migrates x/ccvprovider state from consensus version 2 to 3. First run provider@v4.0.x in production to migrate from consensus version 2 to 3.

func (Migrator) Migrate3to4

func (m Migrator) Migrate3to4(ctx sdktypes.Context) error

Migrate3to4 migrates x/ccvprovider state from consensus version 3 to 4. The migration consists of provider chain params additions.

func (Migrator) Migrate4to5

func (m Migrator) Migrate4to5(ctx sdktypes.Context) error

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 (Migrator) Migrate5to6

func (m Migrator) Migrate5to6(ctx sdktypes.Context) error

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 (Migrator) Migrate6to7

func (m Migrator) Migrate6to7(ctx sdktypes.Context) error

Migrate6to7 migrates x/ccvprovider state from consensus version 6 to 7. The migration consists of initializing new provider chain params using params from the legacy store.

func (Migrator) Migrate7to8

func (m Migrator) Migrate7to8(ctx sdktypes.Context) error

Migrate7to8 migrates x/ccvprovider state from consensus version 7 to 8. The migration consists of the following actions: - complete the outstanding paused unbonding ops waiting for VSCMaturedPackets from consumer chains - migrate the ConsumerAddrsToPrune index to ConsumerAddrsToPruneV2 - cleanup deprecated state

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL