diff --git a/x/ccv/provider/migrations/v8/migrations.go b/x/ccv/provider/migrations/v8/migrations.go index 2977243e87..6afd1888c6 100644 --- a/x/ccv/provider/migrations/v8/migrations.go +++ b/x/ccv/provider/migrations/v8/migrations.go @@ -247,8 +247,20 @@ func MigrateLaunchedConsumerChains(ctx sdk.Context, store storetypes.KVStore, pk // set ownership -- all existing chains are owned by gov pk.SetConsumerOwnerAddress(ctx, consumerId, pk.GetAuthority()) - // Note: ConsumerMetadata will be populated in the upgrade handler - // Note: InitializationParameters is not needed since the chain is already launched + // Note: ConsumerMetadata will be populated in the upgrade handler. + // Still, add some default values as every chain should have the metadata set. + if err := pk.SetConsumerMetadata(ctx, consumerId, providertypes.ConsumerMetadata{ + Name: chainId, + Description: "TBA", + Metadata: "TBA", + }); err != nil { + return err + } + // Note: InitializationParameters are not needed since the chain is already launched. + // Just add the default values. + if err := pk.SetConsumerInitializationParameters(ctx, consumerId, providertypes.ConsumerInitializationParameters{}); err != nil { + return err + } // migrate power shaping params topNKey := providertypes.StringIdWithLenKey(LegacyTopNKeyPrefix, chainId)