diff --git a/proto/interchain_security/ccv/provider/v1/query.proto b/proto/interchain_security/ccv/provider/v1/query.proto index b0c1dc2b47..772f1f2a9e 100644 --- a/proto/interchain_security/ccv/provider/v1/query.proto +++ b/proto/interchain_security/ccv/provider/v1/query.proto @@ -81,6 +81,10 @@ service Query { option (google.api.http).get = "/interchain_security/ccv/provider/registered_consumer_reward_denoms"; } + + rpc QueryParams(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/interchain_security/ccv/provider/params"; + } } message QueryConsumerGenesisRequest { string chain_id = 1; } @@ -187,3 +191,12 @@ message QueryRegisteredConsumerRewardDenomsRequest {} message QueryRegisteredConsumerRewardDenomsResponse { repeated string denoms = 1; } + +// Request to query values set for provider parameters +message QueryParamsRequest {} + +// QueryParamsResponse is response type for the Query/Params RPC method. +message QueryParamsResponse { + // params holds all the parameters of this module. + interchain_security.ccv.provider.v1.Params params = 1 [ (gogoproto.nullable) = false ]; +} diff --git a/proto/interchain_security/ccv/provider/v1/tx.proto b/proto/interchain_security/ccv/provider/v1/tx.proto index 69ccee0a73..4b07c47a0c 100644 --- a/proto/interchain_security/ccv/provider/v1/tx.proto +++ b/proto/interchain_security/ccv/provider/v1/tx.proto @@ -12,6 +12,7 @@ import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; import "cosmos/msg/v1/msg.proto"; import "ibc/core/client/v1/client.proto"; +import "interchain_security/ccv/provider/v1/provider.proto"; // Msg defines the Msg service. service Msg { @@ -28,8 +29,26 @@ service Msg { rpc ChangeRewardDenoms(MsgChangeRewardDenoms) returns (MsgChangeRewardDenomsResponse); + + rpc UpdateParams(MsgUpdateParams) + returns (MsgUpdateParamsResponse); } + + +// MsgUpdateParams is the Msg/UpdateParams request type +message MsgUpdateParams { + option (cosmos.msg.v1.signer) = "signer"; + + // signer is the address of the governance account. + string signer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // params defines the x/provider parameters to update. + Params params = 2 [(gogoproto.nullable) = false]; +} + +message MsgUpdateParamsResponse {} + message MsgAssignConsumerKey { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; diff --git a/x/ccv/consumer/keeper/keeper.go b/x/ccv/consumer/keeper/keeper.go index 84167e61f8..c476db718d 100644 --- a/x/ccv/consumer/keeper/keeper.go +++ b/x/ccv/consumer/keeper/keeper.go @@ -39,7 +39,6 @@ type Keeper struct { storeKey storetypes.StoreKey // TODO: maybe needs to be removed? storeService store.KVStoreService cdc codec.BinaryCodec - paramStore paramtypes.Subspace scopedKeeper ccv.ScopedKeeper channelKeeper ccv.ChannelKeeper portKeeper ccv.PortKeeper @@ -83,7 +82,6 @@ func NewKeeper( authority: authority, storeKey: key, cdc: cdc, - paramStore: paramSpace, scopedKeeper: scopedKeeper, channelKeeper: channelKeeper, portKeeper: portKeeper, @@ -108,9 +106,8 @@ func NewKeeper( // Used only in testing. func NewNonZeroKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey, paramSpace paramtypes.Subspace) Keeper { return Keeper{ - storeKey: key, - cdc: cdc, - paramStore: paramSpace, + storeKey: key, + cdc: cdc, } } @@ -120,18 +117,12 @@ func (k *Keeper) SetStandaloneStakingKeeper(sk ccv.StakingKeeper) { k.standaloneStakingKeeper = sk } -// SetParamSpace sets the param space for the consumer keeper. -// Note: this is only used for testing! -func (k *Keeper) SetParamSpace(ctx sdk.Context, ps paramtypes.Subspace) { - k.paramStore = ps -} - // Validates that the consumer keeper is initialized with non-zero and // non-nil values for all its fields. Otherwise this method will panic. func (k Keeper) mustValidateFields() { // Ensures no fields are missed in this validation // TODO: @MSalopek hangle this better - if reflect.ValueOf(k).NumField() != 20 { + if reflect.ValueOf(k).NumField() != 19 { panic(fmt.Sprintf("number of fields in consumer keeper is not 19 - have %d", reflect.ValueOf(k).NumField())) // incorrect number } @@ -139,26 +130,25 @@ func (k Keeper) mustValidateFields() { panic("validator and/or consensus address codec are nil") } - // Note 17 / 20 fields will be validated, + // Note 16 / 19 fields will be validated, // hooks are explicitly set after the constructor, // stakingKeeper is optionally set after the constructor, ccv.PanicIfZeroOrNil(k.storeKey, "storeKey") // 1 ccv.PanicIfZeroOrNil(k.cdc, "cdc") // 2 - ccv.PanicIfZeroOrNil(k.paramStore, "paramStore") // 3 - ccv.PanicIfZeroOrNil(k.scopedKeeper, "scopedKeeper") // 4 - ccv.PanicIfZeroOrNil(k.channelKeeper, "channelKeeper") // 5 - ccv.PanicIfZeroOrNil(k.portKeeper, "portKeeper") // 6 - ccv.PanicIfZeroOrNil(k.connectionKeeper, "connectionKeeper") // 7 - ccv.PanicIfZeroOrNil(k.clientKeeper, "clientKeeper") // 8 - ccv.PanicIfZeroOrNil(k.slashingKeeper, "slashingKeeper") // 9 - ccv.PanicIfZeroOrNil(k.bankKeeper, "bankKeeper") // 10 - ccv.PanicIfZeroOrNil(k.authKeeper, "authKeeper") // 11 - ccv.PanicIfZeroOrNil(k.ibcTransferKeeper, "ibcTransferKeeper") // 12 - ccv.PanicIfZeroOrNil(k.ibcCoreKeeper, "ibcCoreKeeper") // 13 - ccv.PanicIfZeroOrNil(k.feeCollectorName, "feeCollectorName") // 14 - ccv.PanicIfZeroOrNil(k.authority, "authority") // 15 - ccv.PanicIfZeroOrNil(k.validatorAddressCodec, "validatorAddressCodec") // 16 - ccv.PanicIfZeroOrNil(k.consensusAddressCodec, "consensusAddressCodec") // 17 + ccv.PanicIfZeroOrNil(k.scopedKeeper, "scopedKeeper") // 3 + ccv.PanicIfZeroOrNil(k.channelKeeper, "channelKeeper") // 4 + ccv.PanicIfZeroOrNil(k.portKeeper, "portKeeper") // 5 + ccv.PanicIfZeroOrNil(k.connectionKeeper, "connectionKeeper") // 6 + ccv.PanicIfZeroOrNil(k.clientKeeper, "clientKeeper") // 7 + ccv.PanicIfZeroOrNil(k.slashingKeeper, "slashingKeeper") // 8 + ccv.PanicIfZeroOrNil(k.bankKeeper, "bankKeeper") // 9 + ccv.PanicIfZeroOrNil(k.authKeeper, "authKeeper") // 10 + ccv.PanicIfZeroOrNil(k.ibcTransferKeeper, "ibcTransferKeeper") // 11 + ccv.PanicIfZeroOrNil(k.ibcCoreKeeper, "ibcCoreKeeper") // 12 + ccv.PanicIfZeroOrNil(k.feeCollectorName, "feeCollectorName") // 13 + ccv.PanicIfZeroOrNil(k.authority, "authority") // 14 + ccv.PanicIfZeroOrNil(k.validatorAddressCodec, "validatorAddressCodec") // 15 + ccv.PanicIfZeroOrNil(k.consensusAddressCodec, "consensusAddressCodec") // 16 } // Logger returns a module-specific logger. diff --git a/x/ccv/consumer/keeper/legacy_params.go b/x/ccv/consumer/keeper/legacy_params.go new file mode 100644 index 0000000000..81b5f331ae --- /dev/null +++ b/x/ccv/consumer/keeper/legacy_params.go @@ -0,0 +1,111 @@ +package keeper + +import ( + "time" + + sdk "github.com/cosmos/cosmos-sdk/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + + ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types" +) + +// Legacy: used for migration only! +// GetConsumerParamsLegacy returns the params for the consumer ccv module from x/param subspace +// which will be deprecated soon +func (k Keeper) GetConsumerParamsLegacy(ctx sdk.Context, paramSpace paramtypes.Subspace) ccvtypes.Params { + return ccvtypes.NewParams( + getEnabled(ctx, paramSpace), + getBlocksPerDistributionTransmission(ctx, paramSpace), + getDistributionTransmissionChannel(ctx, paramSpace), + getProviderFeePoolAddrStr(ctx, paramSpace), + getCCVTimeoutPeriod(ctx, paramSpace), + getTransferTimeoutPeriod(ctx, paramSpace), + getConsumerRedistributionFrac(ctx, paramSpace), + getHistoricalEntries(ctx, paramSpace), + getUnbondingPeriod(ctx, paramSpace), + getSoftOptOutThreshold(ctx, paramSpace), + getRewardDenoms(ctx, paramSpace), + getProviderRewardDenoms(ctx, paramSpace), + ) +} + +// getEnabled returns the enabled flag for the consumer module +func getEnabled(ctx sdk.Context, paramStore paramtypes.Subspace) bool { + var enabled bool + paramStore.Get(ctx, ccvtypes.KeyEnabled, &enabled) + return enabled +} + +func getBlocksPerDistributionTransmission(ctx sdk.Context, paramStore paramtypes.Subspace) int64 { + var bpdt int64 + paramStore.Get(ctx, ccvtypes.KeyBlocksPerDistributionTransmission, &bpdt) + return bpdt +} + +func getDistributionTransmissionChannel(ctx sdk.Context, paramStore paramtypes.Subspace) string { + var s string + paramStore.Get(ctx, ccvtypes.KeyDistributionTransmissionChannel, &s) + return s +} + +func getProviderFeePoolAddrStr(ctx sdk.Context, paramStore paramtypes.Subspace) string { + var s string + paramStore.Get(ctx, ccvtypes.KeyProviderFeePoolAddrStr, &s) + return s +} + +// getCCVTimeoutPeriod returns the timeout period for sent ccv related ibc packets +func getCCVTimeoutPeriod(ctx sdk.Context, paramStore paramtypes.Subspace) time.Duration { + var p time.Duration + paramStore.Get(ctx, ccvtypes.KeyCCVTimeoutPeriod, &p) + return p +} + +// getTransferTimeoutPeriod returns the timeout period for sent transfer related ibc packets +func getTransferTimeoutPeriod(ctx sdk.Context, paramStore paramtypes.Subspace) time.Duration { + var p time.Duration + paramStore.Get(ctx, ccvtypes.KeyTransferTimeoutPeriod, &p) + return p +} + +// getConsumerRedistributionFrac returns the fraction of tokens allocated to the consumer redistribution +// address during distribution events. The fraction is a string representing a +// decimal number. For example "0.75" would represent 75%. +func getConsumerRedistributionFrac(ctx sdk.Context, paramStore paramtypes.Subspace) string { + var str string + paramStore.Get(ctx, ccvtypes.KeyConsumerRedistributionFrac, &str) + return str +} + +// getHistoricalEntries returns the number of historical info entries to persist in store +func getHistoricalEntries(ctx sdk.Context, paramStore paramtypes.Subspace) int64 { + var n int64 + paramStore.Get(ctx, ccvtypes.KeyHistoricalEntries, &n) + return n +} + +func getUnbondingPeriod(ctx sdk.Context, paramStore paramtypes.Subspace) time.Duration { + var period time.Duration + paramStore.Get(ctx, ccvtypes.KeyConsumerUnbondingPeriod, &period) + return period +} + +// getSoftOptOutThreshold returns the percentage of validators at the bottom of the set +// that can opt out of running the consumer chain +func getSoftOptOutThreshold(ctx sdk.Context, paramStore paramtypes.Subspace) string { + var str string + paramStore.Get(ctx, ccvtypes.KeySoftOptOutThreshold, &str) + return str +} + +func getRewardDenoms(ctx sdk.Context, paramStore paramtypes.Subspace) []string { + var denoms []string + paramStore.Get(ctx, ccvtypes.KeyRewardDenoms, &denoms) + return denoms +} + +func getProviderRewardDenoms(ctx sdk.Context, paramStore paramtypes.Subspace) []string { + var denoms []string + paramStore.Get(ctx, ccvtypes.KeyProviderRewardDenoms, &denoms) + return denoms +} diff --git a/x/ccv/consumer/keeper/migration.go b/x/ccv/consumer/keeper/migration.go index 361bb2a62f..ffd581d208 100644 --- a/x/ccv/consumer/keeper/migration.go +++ b/x/ccv/consumer/keeper/migration.go @@ -21,6 +21,19 @@ func NewMigrator(ccvConsumerKeeper Keeper, ccvConsumerParamSpace paramtypes.Subs return Migrator{ccvConsumerKeeper: ccvConsumerKeeper, ccvConsumerParamSpace: ccvConsumerParamSpace} } +// MigrateParams migrates the consumers module's parameters from the x/params subspace to the +// consumer modules store. +func (m Migrator) MigrateParams(ctx sdk.Context) error { + params := m.ccvConsumerKeeper.GetConsumerParamsLegacy(ctx, m.ccvConsumerParamSpace) + err := params.Validate() + if err != nil { + return err + } + m.ccvConsumerKeeper.SetParams(ctx, params) + m.ccvConsumerKeeper.Logger(ctx).Info("successfully migrated provider parameters") + return nil +} + // MigrateConsumerPacketData migrates consumer packet data according to // https://github.com/cosmos/interchain-security/pull/1037 // diff --git a/x/ccv/consumer/keeper/migration_test.go b/x/ccv/consumer/keeper/migration_test.go index 7cb87665f0..387b8e1bb2 100644 --- a/x/ccv/consumer/keeper/migration_test.go +++ b/x/ccv/consumer/keeper/migration_test.go @@ -3,9 +3,13 @@ package keeper_test import ( "testing" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/stretchr/testify/require" testutil "github.com/cosmos/interchain-security/v3/testutil/keeper" + + "github.com/cosmos/interchain-security/v3/x/ccv/consumer/keeper" + ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types" ) @@ -61,3 +65,33 @@ func TestMigrateConsumerPacketData(t *testing.T) { require.Equal(t, uint64(88), obtainedPackets[1].GetVscMaturedPacketData().ValsetUpdateId) require.Equal(t, uint64(99), obtainedPackets[2].GetVscMaturedPacketData().ValsetUpdateId) } + +func TestMigrateParams(t *testing.T) { + params := testutil.NewInMemKeeperParams(t) + consumerKeeper, ctx, ctrl, _ := testutil.GetConsumerKeeperAndCtx(t, params) + defer ctrl.Finish() + + testCases := []struct { + name string + legacyParams func() paramtypes.Subspace + expetedParams ccvtypes.Params + }{ + { + "default params", + func() paramtypes.Subspace { + subspace := params.ParamsSubspace + defaultParams := ccvtypes.DefaultParams() + subspace.SetParamSet(ctx, &defaultParams) + return *subspace + }, + ccvtypes.DefaultParams(), + }, + } + for _, tc := range testCases { + migrator := keeper.NewMigrator(consumerKeeper, tc.legacyParams()) + err := migrator.MigrateParams(ctx) + require.NoError(t, err) + params := consumerKeeper.GetConsumerParams(ctx) + require.Equal(t, tc.expetedParams, params) + } +} diff --git a/x/ccv/consumer/keeper/params.go b/x/ccv/consumer/keeper/params.go index 9bd0d1fa10..a9e52b7b30 100644 --- a/x/ccv/consumer/keeper/params.go +++ b/x/ccv/consumer/keeper/params.go @@ -7,31 +7,25 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types" ) // GetParams returns the params for the consumer ccv module // NOTE: it is different from the GetParams method which is required to implement StakingKeeper interface func (k Keeper) GetConsumerParams(ctx sdk.Context) ccvtypes.Params { - return ccvtypes.NewParams( - k.GetEnabled(ctx), - k.GetBlocksPerDistributionTransmission(ctx), - k.GetDistributionTransmissionChannel(ctx), - k.GetProviderFeePoolAddrStr(ctx), - k.GetCCVTimeoutPeriod(ctx), - k.GetTransferTimeoutPeriod(ctx), - k.GetConsumerRedistributionFrac(ctx), - k.GetHistoricalEntries(ctx), - k.GetUnbondingPeriod(ctx), - k.GetSoftOptOutThreshold(ctx), - k.GetRewardDenoms(ctx), - k.GetProviderRewardDenoms(ctx), - ) + store := ctx.KVStore(k.storeKey) + bz := store.Get(types.ParametersKey()) + var params ccvtypes.Params + k.cdc.MustUnmarshal(bz, ¶ms) + return params } // SetParams sets the paramset for the consumer module func (k Keeper) SetParams(ctx sdk.Context, params ccvtypes.Params) { - k.paramStore.SetParamSet(ctx, ¶ms) + store := ctx.KVStore(k.storeKey) + bz := k.cdc.MustMarshal(¶ms) + store.Set(types.ParametersKey(), bz) } // GetParams implements StakingKeeper GetParams interface method @@ -44,98 +38,94 @@ func (k Keeper) GetParams(context.Context) (stakingtypes.Params, error) { // GetEnabled returns the enabled flag for the consumer module func (k Keeper) GetEnabled(ctx sdk.Context) bool { - var enabled bool - k.paramStore.Get(ctx, ccvtypes.KeyEnabled, &enabled) - return enabled + params := k.GetConsumerParams(ctx) + return params.Enabled } func (k Keeper) GetBlocksPerDistributionTransmission(ctx sdk.Context) int64 { - var bpdt int64 - k.paramStore.Get(ctx, ccvtypes.KeyBlocksPerDistributionTransmission, &bpdt) - return bpdt + params := k.GetConsumerParams(ctx) + return params.BlocksPerDistributionTransmission } func (k Keeper) SetBlocksPerDistributionTransmission(ctx sdk.Context, bpdt int64) { - k.paramStore.Set(ctx, ccvtypes.KeyBlocksPerDistributionTransmission, bpdt) + params := k.GetConsumerParams(ctx) + params.BlocksPerDistributionTransmission = bpdt + k.SetParams(ctx, params) } func (k Keeper) GetDistributionTransmissionChannel(ctx sdk.Context) string { - var s string - k.paramStore.Get(ctx, ccvtypes.KeyDistributionTransmissionChannel, &s) - return s + params := k.GetConsumerParams(ctx) + return params.DistributionTransmissionChannel } func (k Keeper) SetDistributionTransmissionChannel(ctx sdk.Context, channel string) { - k.paramStore.Set(ctx, ccvtypes.KeyDistributionTransmissionChannel, channel) + params := k.GetConsumerParams(ctx) + params.DistributionTransmissionChannel = channel + k.SetParams(ctx, params) } func (k Keeper) GetProviderFeePoolAddrStr(ctx sdk.Context) string { - var s string - k.paramStore.Get(ctx, ccvtypes.KeyProviderFeePoolAddrStr, &s) - return s + params := k.GetConsumerParams(ctx) + return params.ProviderFeePoolAddrStr } func (k Keeper) SetProviderFeePoolAddrStr(ctx sdk.Context, addr string) { - k.paramStore.Set(ctx, ccvtypes.KeyProviderFeePoolAddrStr, addr) + params := k.GetConsumerParams(ctx) + params.ProviderFeePoolAddrStr = addr + k.SetParams(ctx, params) } // GetCCVTimeoutPeriod returns the timeout period for sent ccv related ibc packets func (k Keeper) GetCCVTimeoutPeriod(ctx sdk.Context) time.Duration { - var p time.Duration - k.paramStore.Get(ctx, ccvtypes.KeyCCVTimeoutPeriod, &p) - return p + params := k.GetConsumerParams(ctx) + return params.CcvTimeoutPeriod } // GetTransferTimeoutPeriod returns the timeout period for sent transfer related ibc packets func (k Keeper) GetTransferTimeoutPeriod(ctx sdk.Context) time.Duration { - var p time.Duration - k.paramStore.Get(ctx, ccvtypes.KeyTransferTimeoutPeriod, &p) - return p + params := k.GetConsumerParams(ctx) + return params.TransferTimeoutPeriod } // GetConsumerRedistributionFrac returns the fraction of tokens allocated to the consumer redistribution // address during distribution events. The fraction is a string representing a // decimal number. For example "0.75" would represent 75%. func (k Keeper) GetConsumerRedistributionFrac(ctx sdk.Context) string { - var str string - k.paramStore.Get(ctx, ccvtypes.KeyConsumerRedistributionFrac, &str) - return str + params := k.GetConsumerParams(ctx) + return params.ConsumerRedistributionFraction } // GetHistoricalEntries returns the number of historical info entries to persist in store func (k Keeper) GetHistoricalEntries(ctx sdk.Context) int64 { - var n int64 - k.paramStore.Get(ctx, ccvtypes.KeyHistoricalEntries, &n) - return n + params := k.GetConsumerParams(ctx) + return params.HistoricalEntries } // Only used to set an unbonding period in diff tests func (k Keeper) SetUnbondingPeriod(ctx sdk.Context, period time.Duration) { - k.paramStore.Set(ctx, ccvtypes.KeyConsumerUnbondingPeriod, period) + params := k.GetConsumerParams(ctx) + params.UnbondingPeriod = period + k.SetParams(ctx, params) } func (k Keeper) GetUnbondingPeriod(ctx sdk.Context) time.Duration { - var period time.Duration - k.paramStore.Get(ctx, ccvtypes.KeyConsumerUnbondingPeriod, &period) - return period + params := k.GetConsumerParams(ctx) + return params.UnbondingPeriod } // GetSoftOptOutThreshold returns the percentage of validators at the bottom of the set // that can opt out of running the consumer chain func (k Keeper) GetSoftOptOutThreshold(ctx sdk.Context) string { - var str string - k.paramStore.Get(ctx, ccvtypes.KeySoftOptOutThreshold, &str) - return str + params := k.GetConsumerParams(ctx) + return params.SoftOptOutThreshold } func (k Keeper) GetRewardDenoms(ctx sdk.Context) []string { - var denoms []string - k.paramStore.Get(ctx, ccvtypes.KeyRewardDenoms, &denoms) - return denoms + params := k.GetConsumerParams(ctx) + return params.RewardDenoms } func (k Keeper) GetProviderRewardDenoms(ctx sdk.Context) []string { - var denoms []string - k.paramStore.Get(ctx, ccvtypes.KeyProviderRewardDenoms, &denoms) - return denoms + params := k.GetConsumerParams(ctx) + return params.ProviderRewardDenoms } diff --git a/x/ccv/consumer/module.go b/x/ccv/consumer/module.go index a3092345f0..ffbce0eb72 100644 --- a/x/ccv/consumer/module.go +++ b/x/ccv/consumer/module.go @@ -113,6 +113,13 @@ func (AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { // RegisterServices registers module services. func (am AppModule) RegisterServices(cfg module.Configurator) { consumertypes.RegisterQueryServer(cfg.QueryServer(), am.keeper) + + migrator := keeper.NewMigrator(am.keeper, am.paramSpace) + // TODO: adapt 'fromVersion' and use MigrateXtoY() instead once merged with main + err := cfg.RegisterMigration(am.Name(), 1, migrator.MigrateParams) + if err != nil { + panic(err) + } } // InitGenesis performs genesis initialization for the consumer module. It returns diff --git a/x/ccv/consumer/types/keys.go b/x/ccv/consumer/types/keys.go index c9a3d3f5b0..6226bf61e2 100644 --- a/x/ccv/consumer/types/keys.go +++ b/x/ccv/consumer/types/keys.go @@ -106,6 +106,9 @@ const ( // SlashRecordByteKey is the single byte key storing the consumer's slash record. SlashRecordByteKey + // ParametersKey is the single byte key for storing consumer's parameters. + ParametersByteKey + // NOTE: DO NOT ADD NEW BYTE PREFIXES HERE WITHOUT ADDING THEM TO getAllKeyPrefixes() IN keys_test.go ) @@ -113,6 +116,11 @@ const ( // Fully defined key func section // +// ParametersKey returns the key for the consumer parameters in the store +func ParametersKey() []byte { + return []byte{ParametersByteKey} +} + // PortKey returns the key to the port ID in the store func PortKey() []byte { return []byte{PortByteKey} diff --git a/x/ccv/consumer/types/keys_test.go b/x/ccv/consumer/types/keys_test.go index a8cebee284..e1fcbcf733 100644 --- a/x/ccv/consumer/types/keys_test.go +++ b/x/ccv/consumer/types/keys_test.go @@ -43,6 +43,7 @@ func getAllKeyPrefixes() []byte { PrevStandaloneChainByteKey, PendingPacketsIndexByteKey, SlashRecordByteKey, + ParametersByteKey, } } diff --git a/x/ccv/provider/client/cli/query.go b/x/ccv/provider/client/cli/query.go index 1240e242f0..6dabfefb8b 100644 --- a/x/ccv/provider/client/cli/query.go +++ b/x/ccv/provider/client/cli/query.go @@ -33,7 +33,7 @@ func NewQueryCmd() *cobra.Command { cmd.AddCommand(CmdThrottleState()) cmd.AddCommand(CmdThrottledConsumerPacketData()) cmd.AddCommand(CmdRegisteredConsumerRewardDenoms()) - + cmd.AddCommand(CmdProviderParams()) return cmd } @@ -292,7 +292,7 @@ func CmdThrottledConsumerPacketData() *cobra.Command { Short: "Query pending VSCMatured and slash packet data for a consumer chainId", Long: strings.TrimSpace( fmt.Sprintf(`Returns the current pending VSCMatured and slash packet data instances for a consumer chainId. - Queue is ordered by ibc sequence number. + Queue is ordered by ibc sequence number. Example: $ %s query provider throttled-consumer-packet-data foochain `, @@ -356,3 +356,32 @@ $ %s query provider registered-consumer-reward-denoms return cmd } + +// NewQuerySubspaceParamsCmd returns a CLI command handler for querying subspace +// parameters managed by the x/params module. +func CmdProviderParams() *cobra.Command { + cmd := &cobra.Command{ + Use: "params [flags]", + Short: "Query values set as provider parameters", + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + req := types.QueryParamsRequest{} + res, err := queryClient.QueryParams(cmd.Context(), &req) + if err != nil { + return err + } + + return clientCtx.PrintProto(&res.Params) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/ccv/provider/keeper/grpc_query.go b/x/ccv/provider/keeper/grpc_query.go index 2b522ea9ef..09198e0e7d 100644 --- a/x/ccv/provider/keeper/grpc_query.go +++ b/x/ccv/provider/keeper/grpc_query.go @@ -36,6 +36,16 @@ func (k Keeper) QueryConsumerGenesis(c context.Context, req *types.QueryConsumer return &types.QueryConsumerGenesisResponse{GenesisState: gen}, nil } +func (k Keeper) QueryParams(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + params := k.GetParams(ctx) + return &types.QueryParamsResponse{Params: params}, nil +} + func (k Keeper) QueryConsumerChains(goCtx context.Context, req *types.QueryConsumerChainsRequest) (*types.QueryConsumerChainsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") diff --git a/x/ccv/provider/keeper/keeper.go b/x/ccv/provider/keeper/keeper.go index 996ce651cd..605cfc0fd9 100644 --- a/x/ccv/provider/keeper/keeper.go +++ b/x/ccv/provider/keeper/keeper.go @@ -42,7 +42,6 @@ type Keeper struct { storeService store.KVStoreService cdc codec.BinaryCodec - paramSpace paramtypes.Subspace scopedKeeper ccv.ScopedKeeper channelKeeper ccv.ChannelKeeper portKeeper ccv.PortKeeper @@ -79,7 +78,6 @@ func NewKeeper( cdc: cdc, storeKey: key, authority: authority, - paramSpace: paramSpace, scopedKeeper: scopedKeeper, channelKeeper: channelKeeper, portKeeper: portKeeper, @@ -114,19 +112,13 @@ func (k Keeper) ConsensusAddressCodec() addresscodec.Codec { return k.consensusAddressCodec } -// SetParamSpace sets the param space for the provider keeper. -// Note: this is only used for testing! -func (k *Keeper) SetParamSpace(ctx sdk.Context, ps paramtypes.Subspace) { - k.paramSpace = ps -} - // TODO: @MSalopek -> redo validation; some fields will be removed // Validates that the provider keeper is initialized with non-zero and // non-nil values for all its fields. Otherwise this method will panic. func (k Keeper) mustValidateFields() { // Ensures no fields are missed in this validation - if reflect.ValueOf(k).NumField() != 18 { - panic("number of fields in provider keeper is not 18") + if reflect.ValueOf(k).NumField() != 17 { + panic("number of fields in provider keeper is not 17") } // TODO: @MSalopek -> validate once connected and AccountKeeper interface is updated @@ -141,23 +133,22 @@ func (k Keeper) mustValidateFields() { ccv.PanicIfZeroOrNil(k.cdc, "cdc") // 1 ccv.PanicIfZeroOrNil(k.storeKey, "storeKey") // 2 - ccv.PanicIfZeroOrNil(k.paramSpace, "paramSpace") // 3 - ccv.PanicIfZeroOrNil(k.scopedKeeper, "scopedKeeper") // 4 - ccv.PanicIfZeroOrNil(k.channelKeeper, "channelKeeper") // 5 - ccv.PanicIfZeroOrNil(k.portKeeper, "portKeeper") // 6 - ccv.PanicIfZeroOrNil(k.connectionKeeper, "connectionKeeper") // 7 - ccv.PanicIfZeroOrNil(k.accountKeeper, "accountKeeper") // 8 - ccv.PanicIfZeroOrNil(k.clientKeeper, "clientKeeper") // 9 - ccv.PanicIfZeroOrNil(k.stakingKeeper, "stakingKeeper") // 10 - ccv.PanicIfZeroOrNil(k.slashingKeeper, "slashingKeeper") // 11 - ccv.PanicIfZeroOrNil(k.distributionKeeper, "distributionKeeper") // 12 - ccv.PanicIfZeroOrNil(k.bankKeeper, "bankKeeper") // 13 - ccv.PanicIfZeroOrNil(k.feeCollectorName, "feeCollectorName") // 14 - ccv.PanicIfZeroOrNil(k.authority, "authority") // 15 - ccv.PanicIfZeroOrNil(k.validatorAddressCodec, "validatorAddressCodec") // 16 - ccv.PanicIfZeroOrNil(k.consensusAddressCodec, "consensusAddressCodec") // 17 + ccv.PanicIfZeroOrNil(k.scopedKeeper, "scopedKeeper") // 3 + ccv.PanicIfZeroOrNil(k.channelKeeper, "channelKeeper") // 4 + ccv.PanicIfZeroOrNil(k.portKeeper, "portKeeper") // 5 + ccv.PanicIfZeroOrNil(k.connectionKeeper, "connectionKeeper") // 6 + ccv.PanicIfZeroOrNil(k.accountKeeper, "accountKeeper") // 7 + ccv.PanicIfZeroOrNil(k.clientKeeper, "clientKeeper") // 8 + ccv.PanicIfZeroOrNil(k.stakingKeeper, "stakingKeeper") // 9 + ccv.PanicIfZeroOrNil(k.slashingKeeper, "slashingKeeper") // 10 + ccv.PanicIfZeroOrNil(k.distributionKeeper, "distributionKeeper") // 11 + ccv.PanicIfZeroOrNil(k.bankKeeper, "bankKeeper") // 12 + ccv.PanicIfZeroOrNil(k.feeCollectorName, "feeCollectorName") // 13 + ccv.PanicIfZeroOrNil(k.authority, "authority") // 14 + ccv.PanicIfZeroOrNil(k.validatorAddressCodec, "validatorAddressCodec") // 15 + ccv.PanicIfZeroOrNil(k.consensusAddressCodec, "consensusAddressCodec") // 16 // TODO: @MSalopek -> validate once connected - // ccv.PanicIfZeroOrNil(k.storeService, "storeService") // 18 + // ccv.PanicIfZeroOrNil(k.storeService, "storeService") // 17 } // Logger returns a module-specific logger. diff --git a/x/ccv/provider/keeper/legacy_params.go b/x/ccv/provider/keeper/legacy_params.go new file mode 100644 index 0000000000..7758123d16 --- /dev/null +++ b/x/ccv/provider/keeper/legacy_params.go @@ -0,0 +1,95 @@ +package keeper + +import ( + "time" + + sdk "github.com/cosmos/cosmos-sdk/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + ibctmtypes "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" + "github.com/cosmos/interchain-security/v3/x/ccv/provider/types" + + ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types" +) + +// getTemplateClient returns the template client for provider proposals +func getTemplateClient(ctx sdk.Context, paramSpace paramtypes.Subspace) *ibctmtypes.ClientState { + var cs ibctmtypes.ClientState + paramSpace.Get(ctx, types.KeyTemplateClient, &cs) + return &cs +} + +// getTrustingPeriodFraction returns a TrustingPeriodFraction +// used to compute the provider IBC client's TrustingPeriod as UnbondingPeriod / TrustingPeriodFraction +func getTrustingPeriodFraction(ctx sdk.Context, paramSpace paramtypes.Subspace) string { + var f string + paramSpace.Get(ctx, types.KeyTrustingPeriodFraction, &f) + return f +} + +// getCCVTimeoutPeriod returns the timeout period for sent ibc packets +func getCCVTimeoutPeriod(ctx sdk.Context, paramSpace paramtypes.Subspace) time.Duration { + var p time.Duration + paramSpace.Get(ctx, ccvtypes.KeyCCVTimeoutPeriod, &p) + return p +} + +// getInitTimeoutPeriod returns the init timeout period +func getInitTimeoutPeriod(ctx sdk.Context, paramSpace paramtypes.Subspace) time.Duration { + var p time.Duration + paramSpace.Get(ctx, types.KeyInitTimeoutPeriod, &p) + return p +} + +// getVscTimeoutPeriod returns the vsc timeout period +func getVscTimeoutPeriod(ctx sdk.Context, paramSpace paramtypes.Subspace) time.Duration { + var p time.Duration + paramSpace.Get(ctx, types.KeyVscTimeoutPeriod, &p) + return p +} + +// getSlashMeterReplenishPeriod returns the period in which: +// Once the slash meter becomes not-full, the slash meter is replenished after this period. +func getSlashMeterReplenishPeriod(ctx sdk.Context, paramSpace paramtypes.Subspace) time.Duration { + var p time.Duration + paramSpace.Get(ctx, types.KeySlashMeterReplenishPeriod, &p) + return p +} + +// getSlashMeterReplenishFraction returns the string fraction of total voting power that is replenished +// to the slash meter every replenish period. This param also serves as a maximum fraction of total +// voting power that the slash meter can hold. +func getSlashMeterReplenishFraction(ctx sdk.Context, paramSpace paramtypes.Subspace) string { + var f string + paramSpace.Get(ctx, types.KeySlashMeterReplenishFraction, &f) + return f +} + +// getMaxThrottledPackets returns the maximum amount of throttled slash or vsc matured packets +// that can be queued for a single consumer before the provider chain halts. +func getMaxThrottledPackets(ctx sdk.Context, paramSpace paramtypes.Subspace) int64 { + var p int64 + paramSpace.Get(ctx, types.KeyMaxThrottledPackets, &p) + return p +} + +func getConsumerRewardDenomRegistrationFee(ctx sdk.Context, paramSpace paramtypes.Subspace) sdk.Coin { + var c sdk.Coin + paramSpace.Get(ctx, types.KeyConsumerRewardDenomRegistrationFee, &c) + return c +} + +// Legacy: Only for migration purposes. GetParamsLegacy returns the paramset for the provider +// module from a given param subspace +func GetParamsLegacy(ctx sdk.Context, paramspace paramtypes.Subspace) types.Params { + return types.NewParams( + getTemplateClient(ctx, paramspace), + getTrustingPeriodFraction(ctx, paramspace), + getCCVTimeoutPeriod(ctx, paramspace), + getInitTimeoutPeriod(ctx, paramspace), + getVscTimeoutPeriod(ctx, paramspace), + getSlashMeterReplenishPeriod(ctx, paramspace), + getSlashMeterReplenishFraction(ctx, paramspace), + getMaxThrottledPackets(ctx, paramspace), + getConsumerRewardDenomRegistrationFee(ctx, paramspace), + ) +} diff --git a/x/ccv/provider/keeper/migration.go b/x/ccv/provider/keeper/migration.go new file mode 100644 index 0000000000..0d295fe531 --- /dev/null +++ b/x/ccv/provider/keeper/migration.go @@ -0,0 +1,36 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" +) + +type Migrator struct { + keeper Keeper + legacySubspace paramtypes.Subspace +} + +// NewMigrator returns a new Migrator. +func NewMigrator(keeper Keeper, subspace paramtypes.Subspace) Migrator { + return Migrator{ + keeper: keeper, + legacySubspace: subspace, + } +} + +// Migration from consensus version 2 to 3 +func (m Migrator) Migrate2to3(ctx sdk.Context) error { + return m.MigrateParams(ctx) +} + +// MigrateParams migrates the provider module's parameters from the x/params to self store. +func (m Migrator) MigrateParams(ctx sdk.Context) error { + params := GetParamsLegacy(ctx, m.legacySubspace) + err := params.Validate() + if err != nil { + return err + } + m.keeper.SetParams(ctx, params) + m.keeper.Logger(ctx).Info("successfully migrated provider parameters") + return nil +} diff --git a/x/ccv/provider/keeper/migration_test.go b/x/ccv/provider/keeper/migration_test.go new file mode 100644 index 0000000000..0b6760ff27 --- /dev/null +++ b/x/ccv/provider/keeper/migration_test.go @@ -0,0 +1,41 @@ +package keeper_test + +import ( + "testing" + + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + testutil "github.com/cosmos/interchain-security/v3/testutil/keeper" + "github.com/cosmos/interchain-security/v3/x/ccv/provider/keeper" + "github.com/cosmos/interchain-security/v3/x/ccv/provider/types" + "github.com/stretchr/testify/require" +) + +func TestMigrateParams(t *testing.T) { + params := testutil.NewInMemKeeperParams(t) + providerKeeper, ctx, ctrl, _ := testutil.GetProviderKeeperAndCtx(t, params) + defer ctrl.Finish() + + testCases := []struct { + name string + legacyParams func() paramtypes.Subspace + expetedParams types.Params + }{ + { + "default params", + func() paramtypes.Subspace { + subspace := params.ParamsSubspace + defaultParams := types.DefaultParams() + subspace.SetParamSet(ctx, &defaultParams) + return *subspace + }, + types.DefaultParams(), + }, + } + for _, tc := range testCases { + migrator := keeper.NewMigrator(providerKeeper, tc.legacyParams()) + err := migrator.MigrateParams(ctx) + require.NoError(t, err) + params := providerKeeper.GetParams(ctx) + require.Equal(t, tc.expetedParams, params) + } +} diff --git a/x/ccv/provider/keeper/msg_server.go b/x/ccv/provider/keeper/msg_server.go index 491e585f60..d96fd3dfb4 100644 --- a/x/ccv/provider/keeper/msg_server.go +++ b/x/ccv/provider/keeper/msg_server.go @@ -10,6 +10,7 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" tmprotocrypto "github.com/cometbft/cometbft/proto/tendermint/crypto" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/cosmos/interchain-security/v3/x/ccv/provider/types" ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types" @@ -27,6 +28,18 @@ func NewMsgServerImpl(keeper *Keeper) types.MsgServer { var _ types.MsgServer = msgServer{} +// UpdateParams updates the params. +func (k msgServer) UpdateParams(goCtx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { + if k.GetAuthority() != msg.Signer { + return nil, errorsmod.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", k.authority, msg.Signer) + } + + ctx := sdk.UnwrapSDKContext(goCtx) + k.Keeper.SetParams(ctx, msg.Params) + + return &types.MsgUpdateParamsResponse{}, nil +} + // CreateValidator defines a method for creating a new validator func (k msgServer) AssignConsumerKey(goCtx context.Context, msg *types.MsgAssignConsumerKey) (*types.MsgAssignConsumerKeyResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) diff --git a/x/ccv/provider/keeper/params.go b/x/ccv/provider/keeper/params.go index a0bbc27679..5457465e88 100644 --- a/x/ccv/provider/keeper/params.go +++ b/x/ccv/provider/keeper/params.go @@ -1,6 +1,7 @@ package keeper import ( + "fmt" "time" ibctmtypes "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" @@ -8,100 +9,91 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/interchain-security/v3/x/ccv/provider/types" - ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types" ) // GetTemplateClient returns the template client for provider proposals func (k Keeper) GetTemplateClient(ctx sdk.Context) *ibctmtypes.ClientState { - var cs ibctmtypes.ClientState - k.paramSpace.Get(ctx, types.KeyTemplateClient, &cs) - return &cs + params := k.GetParams(ctx) + return params.TemplateClient } // GetTrustingPeriodFraction returns a TrustingPeriodFraction // used to compute the provider IBC client's TrustingPeriod as UnbondingPeriod / TrustingPeriodFraction func (k Keeper) GetTrustingPeriodFraction(ctx sdk.Context) string { - var f string - k.paramSpace.Get(ctx, types.KeyTrustingPeriodFraction, &f) - return f + params := k.GetParams(ctx) + return params.TrustingPeriodFraction } // GetCCVTimeoutPeriod returns the timeout period for sent ibc packets func (k Keeper) GetCCVTimeoutPeriod(ctx sdk.Context) time.Duration { - var p time.Duration - k.paramSpace.Get(ctx, ccvtypes.KeyCCVTimeoutPeriod, &p) - return p + params := k.GetParams(ctx) + return params.CcvTimeoutPeriod } // GetInitTimeoutPeriod returns the init timeout period func (k Keeper) GetInitTimeoutPeriod(ctx sdk.Context) time.Duration { - var p time.Duration - k.paramSpace.Get(ctx, types.KeyInitTimeoutPeriod, &p) - return p + params := k.GetParams(ctx) + return params.InitTimeoutPeriod } // GetVscTimeoutPeriod returns the vsc timeout period func (k Keeper) GetVscTimeoutPeriod(ctx sdk.Context) time.Duration { - var p time.Duration - k.paramSpace.Get(ctx, types.KeyVscTimeoutPeriod, &p) - return p + params := k.GetParams(ctx) + return params.VscTimeoutPeriod } // SetVscTimeoutPeriod sets the vsc timeout period func (k Keeper) SetVscTimeoutPeriod(ctx sdk.Context, period time.Duration) { - k.paramSpace.Set(ctx, types.KeyVscTimeoutPeriod, period) + params := k.GetParams(ctx) + params.VscTimeoutPeriod = period + k.SetParams(ctx, params) } // GetSlashMeterReplenishPeriod returns the period in which: // Once the slash meter becomes not-full, the slash meter is replenished after this period. func (k Keeper) GetSlashMeterReplenishPeriod(ctx sdk.Context) time.Duration { - var p time.Duration - k.paramSpace.Get(ctx, types.KeySlashMeterReplenishPeriod, &p) - return p + params := k.GetParams(ctx) + return params.SlashMeterReplenishPeriod } // GetSlashMeterReplenishFraction returns the string fraction of total voting power that is replenished // to the slash meter every replenish period. This param also serves as a maximum fraction of total // voting power that the slash meter can hold. func (k Keeper) GetSlashMeterReplenishFraction(ctx sdk.Context) string { - var f string - k.paramSpace.Get(ctx, types.KeySlashMeterReplenishFraction, &f) - return f + params := k.GetParams(ctx) + return params.SlashMeterReplenishFraction } // GetMaxThrottledPackets returns the maximum amount of throttled slash or vsc matured packets // that can be queued for a single consumer before the provider chain halts. func (k Keeper) GetMaxThrottledPackets(ctx sdk.Context) int64 { - var p int64 - k.paramSpace.Get(ctx, types.KeyMaxThrottledPackets, &p) - return p + params := k.GetParams(ctx) + return params.MaxThrottledPackets } func (k Keeper) GetConsumerRewardDenomRegistrationFee(ctx sdk.Context) sdk.Coin { // Due to difficulties doing migrations in coordinated upgrades, this param is hardcoded to 10 ATOM in v1.1.0-multiden. // The below code is the proper way to store the param. A future scheduled upgrade will // need to run migrations to add the param. This will allow us to change the fee by governance. - var c sdk.Coin - k.paramSpace.Get(ctx, types.KeyConsumerRewardDenomRegistrationFee, &c) - return c + params := k.GetParams(ctx) + return params.ConsumerRewardDenomRegistrationFee } // GetParams returns the paramset for the provider module func (k Keeper) GetParams(ctx sdk.Context) types.Params { - return types.NewParams( - k.GetTemplateClient(ctx), - k.GetTrustingPeriodFraction(ctx), - k.GetCCVTimeoutPeriod(ctx), - k.GetInitTimeoutPeriod(ctx), - k.GetVscTimeoutPeriod(ctx), - k.GetSlashMeterReplenishPeriod(ctx), - k.GetSlashMeterReplenishFraction(ctx), - k.GetMaxThrottledPackets(ctx), - k.GetConsumerRewardDenomRegistrationFee(ctx), - ) + store := ctx.KVStore(k.storeKey) + bz := store.Get(types.ParametersKey()) + var params types.Params + err := k.cdc.Unmarshal(bz, ¶ms) + if err != nil { + panic(fmt.Sprintf("error unmarshalling module parameters: %v:", err)) + } + return params } // SetParams sets the params for the provider module func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { - k.paramSpace.SetParamSet(ctx, ¶ms) + store := ctx.KVStore(k.storeKey) + bz := k.cdc.MustMarshal(¶ms) + store.Set(types.ParametersKey(), bz) } diff --git a/x/ccv/provider/module.go b/x/ccv/provider/module.go index cfc4e9dfe0..74f340db24 100644 --- a/x/ccv/provider/module.go +++ b/x/ccv/provider/module.go @@ -119,6 +119,13 @@ func (AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { func (am AppModule) RegisterServices(cfg module.Configurator) { providertypes.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) providertypes.RegisterQueryServer(cfg.QueryServer(), am.keeper) + + migrator := keeper.NewMigrator(*am.keeper, am.paramSpace) + // TODO: check/adapt 'fromVersion' once v0.50 branch merged with main + err := cfg.RegisterMigration(am.Name(), 2, migrator.Migrate2to3) + if err != nil { + panic(err) + } } // InitGenesis performs genesis initialization for the provider module. It returns no validator updates. diff --git a/x/ccv/provider/types/codec.go b/x/ccv/provider/types/codec.go index b33a390c5f..300a83f1db 100644 --- a/x/ccv/provider/types/codec.go +++ b/x/ccv/provider/types/codec.go @@ -31,6 +31,7 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { &MsgConsumerAddition{}, &MsgConsumerRemoval{}, &MsgChangeRewardDenoms{}, + &MsgUpdateParams{}, ) registry.RegisterImplementations( (*govv1beta1.Content)(nil), diff --git a/x/ccv/provider/types/keys.go b/x/ccv/provider/types/keys.go index ee4c11015b..643946258a 100644 --- a/x/ccv/provider/types/keys.go +++ b/x/ccv/provider/types/keys.go @@ -138,6 +138,9 @@ const ( // handled in the current block VSCMaturedHandledThisBlockBytePrefix + // ParametersKey is the is the single byte key for storing provider's parameters. + ParametersByteKey + // NOTE: DO NOT ADD NEW BYTE PREFIXES HERE WITHOUT ADDING THEM TO getAllKeyPrefixes() IN keys_test.go ) @@ -145,6 +148,11 @@ const ( // Fully defined key func section // +// ParametersKey returns the key for the parameters of the provider module in the store +func ParametersKey() []byte { + return []byte{ParametersByteKey} +} + // PortKey returns the key to the port ID in the store func PortKey() []byte { return []byte{PortByteKey} diff --git a/x/ccv/provider/types/keys_test.go b/x/ccv/provider/types/keys_test.go index 9f470f4a82..fbdfe1f267 100644 --- a/x/ccv/provider/types/keys_test.go +++ b/x/ccv/provider/types/keys_test.go @@ -54,6 +54,7 @@ func getAllKeyPrefixes() []byte { providertypes.ConsumerAddrsToPruneBytePrefix, providertypes.SlashLogBytePrefix, providertypes.VSCMaturedHandledThisBlockBytePrefix, + providertypes.ParametersByteKey, } } diff --git a/x/ccv/provider/types/params.go b/x/ccv/provider/types/params.go index 9a4cbdb149..b4ca06a314 100644 --- a/x/ccv/provider/types/params.go +++ b/x/ccv/provider/types/params.go @@ -44,6 +44,9 @@ const ( ) // Reflection based keys for params subspace +// Legacy: usage of x/params for parameters is deprecated. +// Use x/ccv/provider/keeper/params instead +// [DEPRECATED] var ( KeyTemplateClient = []byte("TemplateClient") KeyTrustingPeriodFraction = []byte("TrustingPeriodFraction") diff --git a/x/ccv/provider/types/query.pb.go b/x/ccv/provider/types/query.pb.go index 9fc9178e09..858a529c6e 100644 --- a/x/ccv/provider/types/query.pb.go +++ b/x/ccv/provider/types/query.pb.go @@ -1039,6 +1039,89 @@ func (m *QueryRegisteredConsumerRewardDenomsResponse) GetDenoms() []string { return nil } +// Request to query values set for provider parameters +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_422512d7b7586cd7, []int{21} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +// QueryParamsResponse is response type for the Query/Params RPC method. +type QueryParamsResponse struct { + // params holds all the parameters of this module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_422512d7b7586cd7, []int{22} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + func init() { proto.RegisterType((*QueryConsumerGenesisRequest)(nil), "interchain_security.ccv.provider.v1.QueryConsumerGenesisRequest") proto.RegisterType((*QueryConsumerGenesisResponse)(nil), "interchain_security.ccv.provider.v1.QueryConsumerGenesisResponse") @@ -1061,6 +1144,8 @@ func init() { proto.RegisterType((*ThrottledPacketDataWrapper)(nil), "interchain_security.ccv.provider.v1.ThrottledPacketDataWrapper") proto.RegisterType((*QueryRegisteredConsumerRewardDenomsRequest)(nil), "interchain_security.ccv.provider.v1.QueryRegisteredConsumerRewardDenomsRequest") proto.RegisterType((*QueryRegisteredConsumerRewardDenomsResponse)(nil), "interchain_security.ccv.provider.v1.QueryRegisteredConsumerRewardDenomsResponse") + proto.RegisterType((*QueryParamsRequest)(nil), "interchain_security.ccv.provider.v1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "interchain_security.ccv.provider.v1.QueryParamsResponse") } func init() { @@ -1068,90 +1153,94 @@ func init() { } var fileDescriptor_422512d7b7586cd7 = []byte{ - // 1323 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 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, 0x86, 0x61, 0x13, 0xd6, 0x20, 0xac, 0xab, 0xdf, 0x3b, 0xed, 0x7e, 0xad, 0x8b, - 0xc6, 0x83, 0x5d, 0xf3, 0xb7, 0x15, 0x60, 0xb6, 0x31, 0x25, 0xbe, 0x56, 0x2e, 0xfe, 0x17, 0x00, - 0x00, 0xff, 0xff, 0x84, 0xab, 0xda, 0x7b, 0x39, 0x13, 0x00, 0x00, + // 1384 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xc1, 0x6f, 0x13, 0xc7, + 0x1b, 0xf5, 0x26, 0x21, 0x24, 0x13, 0x7e, 0x3f, 0xd0, 0x90, 0x52, 0xb3, 0xa0, 0x98, 0x2e, 0x6a, + 0x1b, 0xa0, 0xdd, 0x4d, 0x8c, 0xaa, 0x02, 0x6d, 0x08, 0x71, 0x48, 0x43, 0x04, 0x88, 0x74, 0x83, + 0x40, 0x6a, 0x2b, 0x96, 0xc9, 0xee, 0xd4, 0x59, 0x75, 0xbd, 0xb3, 0xcc, 0x8c, 0x1d, 0xd2, 0xaa, + 0x87, 0xb6, 0x52, 0xcb, 0x11, 0xa9, 0xea, 0x9d, 0x53, 0xff, 0x80, 0xde, 0x7b, 0xe7, 0x56, 0x5a, + 0x2e, 0x9c, 0x68, 0x15, 0x7a, 0xe8, 0xb1, 0xea, 0xbd, 0x52, 0xb5, 0x33, 0xb3, 0xb6, 0x37, 0xde, + 0xd8, 0x6b, 0x93, 0x9b, 0x3d, 0x3b, 0xdf, 0xfb, 0xde, 0x7b, 0xfe, 0x66, 0xf6, 0x19, 0x58, 0x7e, + 0xc8, 0x31, 0x75, 0x37, 0x90, 0x1f, 0x3a, 0x0c, 0xbb, 0x75, 0xea, 0xf3, 0x2d, 0xcb, 0x75, 0x1b, + 0x56, 0x44, 0x49, 0xc3, 0xf7, 0x30, 0xb5, 0x1a, 0xb3, 0xd6, 0xbd, 0x3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0x01, 0xd7, 0xc0, 0xfe, + 0x08, 0xb9, 0x9f, 0x61, 0xce, 0x8a, 0x23, 0xe2, 0x56, 0x3a, 0x9f, 0xeb, 0x08, 0x25, 0x0e, 0x78, + 0x6b, 0x31, 0xe7, 0x55, 0x81, 0x60, 0x27, 0x48, 0xc6, 0x65, 0x75, 0x88, 0x9b, 0xbb, 0x92, 0x89, + 0x93, 0x1b, 0x2f, 0x23, 0x8e, 0x72, 0xdc, 0xf0, 0xbf, 0x25, 0x17, 0x58, 0x57, 0x18, 0x65, 0x7e, + 0x97, 0x69, 0x83, 0x60, 0x84, 0xf9, 0x9f, 0x4b, 0x97, 0x47, 0x6c, 0xf1, 0x19, 0x6e, 0x82, 0xc3, + 0x51, 0x13, 0x64, 0x25, 0x64, 0x3c, 0x36, 0x9b, 0x15, 0x87, 0x85, 0x05, 0xf3, 0xfd, 0x59, 0xd0, + 0x62, 0x73, 0x9b, 0xa2, 0x28, 0xc2, 0x54, 0xbd, 0x3a, 0xb2, 0x3a, 0x18, 0x3f, 0x6b, 0x60, 0x32, + 0xcb, 0x3c, 0x78, 0x07, 0x1c, 0xa8, 0x06, 0x64, 0x1d, 0x05, 0x0e, 0x0e, 0x39, 0xdd, 0x52, 0x17, + 0xda, 0x3b, 0xb9, 0xa8, 0x2c, 0x8b, 0x42, 0x81, 0xb6, 0x14, 0x17, 0x2b, 0x02, 0x13, 0x12, 0x50, + 0x2c, 0xc1, 0x25, 0x30, 0xe2, 0x21, 0x8e, 0x84, 0x0b, 0x13, 0xe5, 0x33, 0xdd, 0x5e, 0x83, 0x6d, + 0xb4, 0x62, 0xf2, 0x0a, 0x4d, 0x94, 0x1b, 0xcf, 0x34, 0xa0, 0xef, 0xae, 0x1c, 0xae, 0x82, 0x03, + 0x72, 0xc4, 0xa5, 0x76, 0xa5, 0xa2, 0x9f, 0x6e, 0x57, 0x0a, 0xb6, 0x3c, 0x46, 0xca, 0x97, 0xbb, + 0x00, 0x36, 0x98, 0xeb, 0xd4,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0xf4, 0xfc, 0xb0, 0xda, 0x9a, 0x63, 0x95, 0x94, 0xe1, 0x0f, 0x43, 0xe0, 0x64, 0x8e, 0x18, + 0x01, 0x6f, 0xe4, 0xa7, 0x9e, 0x2b, 0xbe, 0xe8, 0xab, 0x7b, 0x07, 0xa8, 0xec, 0xb8, 0x2a, 0xec, + 0x58, 0x82, 0x8b, 0xbd, 0xed, 0xa0, 0x4d, 0xc4, 0x96, 0x23, 0x54, 0x60, 0x3a, 0x32, 0x16, 0xc1, + 0x9f, 0x34, 0x30, 0xd1, 0x96, 0x80, 0xe0, 0xbb, 0xf9, 0xe9, 0xa6, 0x92, 0x94, 0x7e, 0xae, 0xff, + 0x42, 0xa5, 0x67, 0x46, 0xe8, 0x39, 0x0d, 0xa7, 0x73, 0xfc, 0xbc, 0x32, 0x61, 0xdd, 0x7e, 0xbc, + 0x3d, 0xa5, 0x3d, 0xd9, 0x9e, 0xd2, 0xfe, 0xd8, 0x9e, 0xd2, 0x1e, 0xbe, 0x98, 0x2a, 0x3c, 0x79, + 0x31, 0x55, 0x78, 0xf6, 0x62, 0xaa, 0xf0, 0xd1, 0x5c, 0xd5, 0xe7, 0x1b, 0xf5, 0x75, 0xd3, 0x25, + 0x35, 0xcb, 0x25, 0xac, 0x46, 0x58, 0x1b, 0xe8, 0xdb, 0x4d, 0xd0, 0xc6, 0x59, 0xeb, 0xfe, 0x8e, + 0x43, 0xb3, 0x15, 0x61, 0xb6, 0x3e, 0x2a, 0xfe, 0xda, 0x9d, 0xfd, 0x2f, 0x00, 0x00, 0xff, 0xff, + 0x0d, 0xfa, 0x6f, 0xc1, 0x66, 0x14, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1191,6 +1280,7 @@ type QueryClient interface { // QueryRegisteredConsumerRewardDenoms returns a list of consumer reward // denoms that are registered QueryRegisteredConsumerRewardDenoms(ctx context.Context, in *QueryRegisteredConsumerRewardDenomsRequest, opts ...grpc.CallOption) (*QueryRegisteredConsumerRewardDenomsResponse, error) + QueryParams(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) } type queryClient struct { @@ -1282,6 +1372,15 @@ func (c *queryClient) QueryRegisteredConsumerRewardDenoms(ctx context.Context, i return out, nil } +func (c *queryClient) QueryParams(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/interchain_security.ccv.provider.v1.Query/QueryParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // ConsumerGenesis queries the genesis state needed to start a consumer chain @@ -1309,6 +1408,7 @@ type QueryServer interface { // QueryRegisteredConsumerRewardDenoms returns a list of consumer reward // denoms that are registered QueryRegisteredConsumerRewardDenoms(context.Context, *QueryRegisteredConsumerRewardDenomsRequest) (*QueryRegisteredConsumerRewardDenomsResponse, error) + QueryParams(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1342,6 +1442,9 @@ func (*UnimplementedQueryServer) QueryThrottledConsumerPacketData(ctx context.Co func (*UnimplementedQueryServer) QueryRegisteredConsumerRewardDenoms(ctx context.Context, req *QueryRegisteredConsumerRewardDenomsRequest) (*QueryRegisteredConsumerRewardDenomsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryRegisteredConsumerRewardDenoms not implemented") } +func (*UnimplementedQueryServer) QueryParams(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryParams not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1509,6 +1612,24 @@ func _Query_QueryRegisteredConsumerRewardDenoms_Handler(srv interface{}, ctx con return interceptor(ctx, in, info, handler) } +func _Query_QueryParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).QueryParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/interchain_security.ccv.provider.v1.Query/QueryParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).QueryParams(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "interchain_security.ccv.provider.v1.Query", HandlerType: (*QueryServer)(nil), @@ -1549,6 +1670,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "QueryRegisteredConsumerRewardDenoms", Handler: _Query_QueryRegisteredConsumerRewardDenoms_Handler, }, + { + MethodName: "QueryParams", + Handler: _Query_QueryParams_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "interchain_security/ccv/provider/v1/query.proto", @@ -2293,6 +2418,62 @@ func (m *QueryRegisteredConsumerRewardDenomsResponse) MarshalToSizedBuffer(dAtA return len(dAtA) - i, nil } +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -2613,6 +2794,26 @@ func (m *QueryRegisteredConsumerRewardDenomsResponse) Size() (n int) { return n } +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -4486,6 +4687,139 @@ func (m *QueryRegisteredConsumerRewardDenomsResponse) Unmarshal(dAtA []byte) err } return nil } +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/ccv/provider/types/query.pb.gw.go b/x/ccv/provider/types/query.pb.gw.go index 6a249ca2a2..86eecb97a2 100644 --- a/x/ccv/provider/types/query.pb.gw.go +++ b/x/ccv/provider/types/query.pb.gw.go @@ -285,6 +285,24 @@ func local_request_Query_QueryRegisteredConsumerRewardDenoms_0(ctx context.Conte } +func request_Query_QueryParams_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.QueryParams(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_QueryParams_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.QueryParams(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -498,6 +516,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_QueryParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_QueryParams_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -719,6 +760,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_QueryParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_QueryParams_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -740,6 +801,8 @@ var ( pattern_Query_QueryThrottledConsumerPacketData_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"interchain_security", "ccv", "provider", "pending_consumer_packets"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_QueryRegisteredConsumerRewardDenoms_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"interchain_security", "ccv", "provider", "registered_consumer_reward_denoms"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_QueryParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"interchain_security", "ccv", "provider", "params"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -760,4 +823,6 @@ var ( forward_Query_QueryThrottledConsumerPacketData_0 = runtime.ForwardResponseMessage forward_Query_QueryRegisteredConsumerRewardDenoms_0 = runtime.ForwardResponseMessage + + forward_Query_QueryParams_0 = runtime.ForwardResponseMessage ) diff --git a/x/ccv/provider/types/tx.pb.go b/x/ccv/provider/types/tx.pb.go index 168401053f..186c0ec7ca 100644 --- a/x/ccv/provider/types/tx.pb.go +++ b/x/ccv/provider/types/tx.pb.go @@ -39,6 +39,97 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// MsgUpdateParams is the Msg/UpdateParams request type +type MsgUpdateParams struct { + // signer is the address of the governance account. + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + // params defines the x/provider parameters to update. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_43221a4391e9fbf4, []int{0} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +func (m *MsgUpdateParams) GetSigner() string { + if m != nil { + return m.Signer + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_43221a4391e9fbf4, []int{1} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + type MsgAssignConsumerKey struct { // The chain id of the consumer chain to assign a consensus public key to ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` @@ -56,7 +147,7 @@ func (m *MsgAssignConsumerKey) Reset() { *m = MsgAssignConsumerKey{} } func (m *MsgAssignConsumerKey) String() string { return proto.CompactTextString(m) } func (*MsgAssignConsumerKey) ProtoMessage() {} func (*MsgAssignConsumerKey) Descriptor() ([]byte, []int) { - return fileDescriptor_43221a4391e9fbf4, []int{0} + return fileDescriptor_43221a4391e9fbf4, []int{2} } func (m *MsgAssignConsumerKey) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -92,7 +183,7 @@ func (m *MsgAssignConsumerKeyResponse) Reset() { *m = MsgAssignConsumerK func (m *MsgAssignConsumerKeyResponse) String() string { return proto.CompactTextString(m) } func (*MsgAssignConsumerKeyResponse) ProtoMessage() {} func (*MsgAssignConsumerKeyResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_43221a4391e9fbf4, []int{1} + return fileDescriptor_43221a4391e9fbf4, []int{3} } func (m *MsgAssignConsumerKeyResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -182,7 +273,7 @@ func (m *MsgConsumerAddition) Reset() { *m = MsgConsumerAddition{} } func (m *MsgConsumerAddition) String() string { return proto.CompactTextString(m) } func (*MsgConsumerAddition) ProtoMessage() {} func (*MsgConsumerAddition) Descriptor() ([]byte, []int) { - return fileDescriptor_43221a4391e9fbf4, []int{2} + return fileDescriptor_43221a4391e9fbf4, []int{4} } func (m *MsgConsumerAddition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -310,7 +401,7 @@ func (m *MsgConsumerAdditionResponse) Reset() { *m = MsgConsumerAddition func (m *MsgConsumerAdditionResponse) String() string { return proto.CompactTextString(m) } func (*MsgConsumerAdditionResponse) ProtoMessage() {} func (*MsgConsumerAdditionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_43221a4391e9fbf4, []int{3} + return fileDescriptor_43221a4391e9fbf4, []int{5} } func (m *MsgConsumerAdditionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -359,7 +450,7 @@ func (m *MsgConsumerRemoval) Reset() { *m = MsgConsumerRemoval{} } func (m *MsgConsumerRemoval) String() string { return proto.CompactTextString(m) } func (*MsgConsumerRemoval) ProtoMessage() {} func (*MsgConsumerRemoval) Descriptor() ([]byte, []int) { - return fileDescriptor_43221a4391e9fbf4, []int{4} + return fileDescriptor_43221a4391e9fbf4, []int{6} } func (m *MsgConsumerRemoval) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -417,7 +508,7 @@ func (m *MsgConsumerRemovalResponse) Reset() { *m = MsgConsumerRemovalRe func (m *MsgConsumerRemovalResponse) String() string { return proto.CompactTextString(m) } func (*MsgConsumerRemovalResponse) ProtoMessage() {} func (*MsgConsumerRemovalResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_43221a4391e9fbf4, []int{5} + return fileDescriptor_43221a4391e9fbf4, []int{7} } func (m *MsgConsumerRemovalResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -463,7 +554,7 @@ func (m *MsgChangeRewardDenoms) Reset() { *m = MsgChangeRewardDenoms{} } func (m *MsgChangeRewardDenoms) String() string { return proto.CompactTextString(m) } func (*MsgChangeRewardDenoms) ProtoMessage() {} func (*MsgChangeRewardDenoms) Descriptor() ([]byte, []int) { - return fileDescriptor_43221a4391e9fbf4, []int{6} + return fileDescriptor_43221a4391e9fbf4, []int{8} } func (m *MsgChangeRewardDenoms) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -521,7 +612,7 @@ func (m *MsgChangeRewardDenomsResponse) Reset() { *m = MsgChangeRewardDe func (m *MsgChangeRewardDenomsResponse) String() string { return proto.CompactTextString(m) } func (*MsgChangeRewardDenomsResponse) ProtoMessage() {} func (*MsgChangeRewardDenomsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_43221a4391e9fbf4, []int{7} + return fileDescriptor_43221a4391e9fbf4, []int{9} } func (m *MsgChangeRewardDenomsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -551,6 +642,8 @@ func (m *MsgChangeRewardDenomsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgChangeRewardDenomsResponse proto.InternalMessageInfo func init() { + proto.RegisterType((*MsgUpdateParams)(nil), "interchain_security.ccv.provider.v1.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "interchain_security.ccv.provider.v1.MsgUpdateParamsResponse") proto.RegisterType((*MsgAssignConsumerKey)(nil), "interchain_security.ccv.provider.v1.MsgAssignConsumerKey") proto.RegisterType((*MsgAssignConsumerKeyResponse)(nil), "interchain_security.ccv.provider.v1.MsgAssignConsumerKeyResponse") proto.RegisterType((*MsgConsumerAddition)(nil), "interchain_security.ccv.provider.v1.MsgConsumerAddition") @@ -566,70 +659,75 @@ func init() { } var fileDescriptor_43221a4391e9fbf4 = []byte{ - // 995 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xf7, 0x36, 0x69, 0x9a, 0x8c, 0x93, 0x34, 0xd9, 0xa6, 0xea, 0xc6, 0xdf, 0xd4, 0x4e, 0xfc, - 0xe5, 0x10, 0x55, 0x64, 0x97, 0xb4, 0x87, 0x42, 0x24, 0x04, 0x4e, 0x02, 0x04, 0x50, 0xa0, 0x2c, - 0x91, 0x90, 0xe0, 0xb0, 0x1a, 0xcf, 0x4e, 0x76, 0x47, 0xf5, 0xce, 0x58, 0x33, 0xe3, 0x6d, 0x7d, - 0x43, 0x9c, 0x90, 0x90, 0x50, 0x91, 0x38, 0x70, 0xec, 0x81, 0x3f, 0xa0, 0x48, 0xfc, 0x11, 0x3d, - 0x56, 0x08, 0x01, 0xa7, 0x82, 0x92, 0x43, 0x39, 0xf3, 0x17, 0xa0, 0xf9, 0xb1, 0x8e, 0x63, 0xbb, - 0x95, 0x6b, 0x2e, 0xd1, 0xcc, 0x7c, 0x7e, 0xbc, 0xf7, 0x26, 0xef, 0x8d, 0x17, 0xbc, 0x4a, 0xa8, - 0xc4, 0x1c, 0xa5, 0x90, 0xd0, 0x48, 0x60, 0xd4, 0xe1, 0x44, 0x76, 0x03, 0x84, 0xf2, 0xa0, 0xcd, - 0x59, 0x4e, 0x62, 0xcc, 0x83, 0x7c, 0x3b, 0x90, 0xf7, 0xfd, 0x36, 0x67, 0x92, 0xb9, 0xff, 0x1f, - 0xc1, 0xf6, 0x11, 0xca, 0xfd, 0x82, 0xed, 0xe7, 0xdb, 0x95, 0x65, 0x98, 0x11, 0xca, 0x02, 0xfd, - 0xd7, 0xe8, 0x2a, 0x6b, 0x09, 0x63, 0x49, 0x0b, 0x07, 0xb0, 0x4d, 0x02, 0x48, 0x29, 0x93, 0x50, - 0x12, 0x46, 0x85, 0x45, 0x6b, 0x16, 0xd5, 0xbb, 0x66, 0xe7, 0x38, 0x90, 0x24, 0xc3, 0x42, 0xc2, - 0xac, 0x6d, 0x09, 0xd5, 0x41, 0x42, 0xdc, 0xe1, 0xda, 0xc1, 0xe2, 0xab, 0x83, 0x38, 0xa4, 0x5d, - 0x0b, 0xad, 0x24, 0x2c, 0x61, 0x7a, 0x19, 0xa8, 0x55, 0x21, 0x40, 0x4c, 0x64, 0x4c, 0x44, 0x06, - 0x30, 0x1b, 0x0b, 0x5d, 0x33, 0xbb, 0x20, 0x13, 0x89, 0x2a, 0x3d, 0x13, 0x49, 0x91, 0x25, 0x69, - 0xa2, 0x00, 0x31, 0x8e, 0x03, 0xd4, 0x22, 0x98, 0x4a, 0x85, 0x9a, 0x95, 0x21, 0xd4, 0x7f, 0x75, - 0xc0, 0xca, 0xa1, 0x48, 0x1a, 0x42, 0x90, 0x84, 0xee, 0x31, 0x2a, 0x3a, 0x19, 0xe6, 0x1f, 0xe2, - 0xae, 0xbb, 0x0a, 0x66, 0xcd, 0x95, 0x91, 0xd8, 0x73, 0xd6, 0x9d, 0xcd, 0xb9, 0xf0, 0x92, 0xde, - 0xbf, 0x1f, 0xbb, 0xb7, 0xc1, 0x42, 0x71, 0x75, 0x11, 0x8c, 0x63, 0xee, 0x5d, 0x50, 0xf8, 0xae, - 0xfb, 0xcf, 0xd3, 0xda, 0x62, 0x17, 0x66, 0xad, 0x9d, 0xba, 0x3a, 0xc5, 0x42, 0xd4, 0xc3, 0xf9, - 0x82, 0xd8, 0x88, 0x63, 0xee, 0x6e, 0x80, 0x79, 0x64, 0x43, 0x44, 0x77, 0x71, 0xd7, 0x9b, 0xd2, - 0xbe, 0x65, 0xd4, 0x17, 0xf6, 0x35, 0x30, 0xa3, 0x32, 0xc1, 0xdc, 0x9b, 0xd6, 0xa6, 0xde, 0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de, 0x01, 0xee, 0x88, 0xfe, 0xdb, 0x19, 0xdb, 0x77, 0x48, 0x5b, 0xd9, 0x9d, 0x5c, 0x5b, - 0xa4, 0x55, 0xb9, 0xf8, 0xe5, 0xb3, 0x47, 0x37, 0x9c, 0xdd, 0xcf, 0x1e, 0x9f, 0x54, 0x9d, 0x27, - 0x27, 0x55, 0xe7, 0xaf, 0x93, 0xaa, 0xf3, 0xe0, 0xb4, 0x5a, 0x7a, 0x72, 0x5a, 0x2d, 0xfd, 0x71, - 0x5a, 0x2d, 0x7d, 0xfe, 0x66, 0x42, 0x64, 0xda, 0x69, 0xfa, 0x88, 0x65, 0xf6, 0x7b, 0x26, 0x38, - 0x8b, 0xba, 0xd5, 0xfb, 0xb2, 0xcb, 0x6f, 0x05, 0xf7, 0xcf, 0x7f, 0xde, 0xc9, 0x6e, 0x1b, 0x8b, - 0xe6, 0x8c, 0x1e, 0xff, 0x5b, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x2d, 0x6a, 0x00, 0xc7, 0x0f, - 0x0a, 0x00, 0x00, + // 1075 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x41, 0x6f, 0x1b, 0x45, + 0x14, 0xf6, 0x36, 0x6d, 0x9a, 0x8c, 0x93, 0x26, 0x99, 0xa6, 0x8a, 0x63, 0x52, 0x3b, 0x31, 0x1c, + 0xa2, 0x42, 0x76, 0x49, 0x8a, 0x54, 0x88, 0x40, 0x60, 0x27, 0x40, 0x0a, 0x0a, 0x84, 0x25, 0x08, + 0x09, 0x0e, 0xab, 0xf1, 0xec, 0x64, 0x3d, 0xaa, 0x77, 0x66, 0x35, 0x33, 0x76, 0xeb, 0x1b, 0xea, + 0x09, 0x09, 0x09, 0x15, 0x89, 0x03, 0x12, 0x97, 0x1e, 0xf8, 0x01, 0x45, 0xe2, 0x47, 0xf4, 0x58, + 0x21, 0x24, 0x90,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x3a, 0x60, 0x6e, 0x5f, 0x46, 0x9f, + 0x25, 0x21, 0x52, 0xe4, 0x00, 0x09, 0x14, 0x4b, 0xf8, 0x2a, 0x98, 0x94, 0x34, 0x62, 0x44, 0x14, + 0x9c, 0x55, 0x67, 0x7d, 0xba, 0x56, 0xf8, 0xf5, 0x97, 0x8d, 0x45, 0xeb, 0xb1, 0x1a, 0x86, 0x82, + 0x48, 0xf9, 0xa9, 0x12, 0x94, 0x45, 0xbe, 0xc5, 0xc1, 0x9b, 0x60, 0x32, 0x31, 0xdc, 0xc2, 0xb9, + 0x55, 0x67, 0x3d, 0xbf, 0xf5, 0xb2, 0x3b, 0xc2, 0x77, 0x72, 0xd3, 0x74, 0xb5, 0xf3, 0x0f, 0x1f, + 0x97, 0x73, 0xbe, 0x15, 0xd8, 0xce, 0xdf, 0x7d, 0xf2, 0xe0, 0x9a, 0xd5, 0xad, 0x2c, 0x83, 0xa5, + 0x01, 0x73, 0x3e, 0x91, 0x09, 0x67, 0x92, 0x54, 0x7e, 0x73, 0xc0, 0xe2, 0xbe, 0x8c, 0xaa, 0x52, + 0x43, 0x77, 0x38, 0x93, 0xad, 0x98, 0x88, 0x0f, 0x49, 0x07, 0x2e, 0x83, 0xa9, 0x34, 0x2f, 0x0d, + 0x53, 0xff, 0xfe, 0x45, 0xf3, 0x7c, 0x33, 0x84, 0x37, 0xc0, 0x6c, 0x96, 0x3f, 0x40, 0x61, 0x28, + 0x8c, 0xdb, 0xe9, 0x1a, 0xfc, 0xf7, 0x71, 0xf9, 0x52, 0x07, 0xc5, 0xcd, 0xed, 0x0a, 0x4a, 0xcb, + 0xab, 0xf8, 0x33, 0x19, 0x50, 0x17, 0x0c, 0xd7, 0xc0, 0x0c, 0xb6, 0x29, 0x82, 0x5b, 0xa4, 0x53, + 0x98, 0x30, 0xba, 0x79, 0xdc, 0x93, 0xf6, 0x74, 0xd3, 0xce, 0x8f, 0xb6, 0x69, 0xdb, 0x97, 0xbf, + 0xbe, 0x5f, 0xce, 0xfd, 0x73, 0xbf, 0x9c, 0xeb, 0xad, 0xb8, 0x04, 0x56, 0x86, 0x55, 0xd5, 0x2d, + 0xfb, 0xf7, 0x49, 0x70, 0x79, 0x5f, 0x46, 0x59, 0xa8, 0x1a, 0x86, 0x54, 0xf7, 0xe1, 0xb3, 0xaa, + 0x7e, 0x1f, 0x5c, 0xa2, 0x8c, 0x2a, 0x8a, 0x9a, 0x41, 0x83, 0xd0, 0xa8, 0xa1, 0xec, 0x47, 0x2a, + 0xba, 0xb4, 0x8e, 0x5d, 0xdd, 0x50, 0xae, 0x6d, 0xa3, 0xf6, 0xa6, 0xbb, 0x67, 0x10, 0xf6, 0x9b, + 0xcc, 0x5a, 0x5e, 0xfa, 0x52, 0xef, 0x42, 0x44, 0x18, 0x91, 0x54, 0x06, 0x0d, 0x24, 0x1b, 0x66, + 0x17, 0x66, 0xfc, 0xbc, 0x7d, 0xb7, 0x87, 0x64, 0x03, 0x96, 0x41, 0xbe, 0x4e, 0x19, 0x12, 0x9d, + 0x14, 0x71, 0xde, 0x20, 0x40, 0xfa, 0xca, 0x00, 0x76, 0x00, 0x90, 0x09, 0xba, 0xcd, 0x02, 0x3d, + 0x62, 0x85, 0x0b, 0xd6, 0x48, 0x3a, 0x3e, 0x6e, 0x36, 0x3e, 0xee, 0x61, 0x36, 0x7f, 0xb5, 0x29, + 0x6d, 0xe4, 0xde, 0x5f, 0x65, 0xc7, 0x9f, 0x36, 0x3c, 0x1d, 0x81, 0x1f, 0x81, 0xf9, 0x16, 0xab, + 0x73, 0x16, 0x52, 0x16, 0x05, 0x09, 0x11, 0x94, 0x87, 0x85, 0x49, 0x23, 0xb5, 0x7c, 0x46, 0x6a, + 0xd7, 0x4e, 0x6a, 0xaa, 0xf4, 0x83, 0x56, 0x9a, 0xeb, 0x92, 0x0f, 0x0c, 0x17, 0x7e, 0x02, 0x20, + 0xc6, 0x6d, 0x63, 0x89, 0xb7, 0x54, 0xa6, 0x78, 0x71, 0x74, 0xc5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0x39, 0xb5, 0xcf, 0x1f, 0x1e, 0x97, 0x9c, 0x47, + 0xc7, 0x25, 0xe7, 0xef, 0xe3, 0x92, 0x73, 0xef, 0xa4, 0x94, 0x7b, 0x74, 0x52, 0xca, 0xfd, 0x71, + 0x52, 0xca, 0x7d, 0xf1, 0x56, 0x44, 0x55, 0xa3, 0x55, 0x77, 0x31, 0x8f, 0xed, 0x0d, 0xd2, 0x3b, + 0xcd, 0xb7, 0xd1, 0xbd, 0x00, 0xb6, 0xaf, 0x7b, 0x77, 0xfa, 0x6f, 0x81, 0xaa, 0x93, 0x10, 0x59, + 0x9f, 0x34, 0x67, 0xd0, 0xf5, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xc8, 0x60, 0xfa, 0xcb, 0x81, + 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -648,6 +746,7 @@ type MsgClient interface { ConsumerAddition(ctx context.Context, in *MsgConsumerAddition, opts ...grpc.CallOption) (*MsgConsumerAdditionResponse, error) ConsumerRemoval(ctx context.Context, in *MsgConsumerRemoval, opts ...grpc.CallOption) (*MsgConsumerRemovalResponse, error) ChangeRewardDenoms(ctx context.Context, in *MsgChangeRewardDenoms, opts ...grpc.CallOption) (*MsgChangeRewardDenomsResponse, error) + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) } type msgClient struct { @@ -694,12 +793,22 @@ func (c *msgClient) ChangeRewardDenoms(ctx context.Context, in *MsgChangeRewardD return out, nil } +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/interchain_security.ccv.provider.v1.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { AssignConsumerKey(context.Context, *MsgAssignConsumerKey) (*MsgAssignConsumerKeyResponse, error) ConsumerAddition(context.Context, *MsgConsumerAddition) (*MsgConsumerAdditionResponse, error) ConsumerRemoval(context.Context, *MsgConsumerRemoval) (*MsgConsumerRemovalResponse, error) ChangeRewardDenoms(context.Context, *MsgChangeRewardDenoms) (*MsgChangeRewardDenomsResponse, error) + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -718,6 +827,9 @@ func (*UnimplementedMsgServer) ConsumerRemoval(ctx context.Context, req *MsgCons func (*UnimplementedMsgServer) ChangeRewardDenoms(ctx context.Context, req *MsgChangeRewardDenoms) (*MsgChangeRewardDenomsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeRewardDenoms not implemented") } +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -795,6 +907,24 @@ func _Msg_ChangeRewardDenoms_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/interchain_security.ccv.provider.v1.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "interchain_security.ccv.provider.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -815,11 +945,78 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "ChangeRewardDenoms", Handler: _Msg_ChangeRewardDenoms_Handler, }, + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "interchain_security/ccv/provider/v1/tx.proto", } +func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func (m *MsgAssignConsumerKey) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -945,37 +1142,37 @@ func (m *MsgConsumerAddition) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x4a } - n1, err1 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.TransferTimeoutPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.TransferTimeoutPeriod):]) - if err1 != nil { - return 0, err1 - } - i -= n1 - i = encodeVarintTx(dAtA, i, uint64(n1)) - i-- - dAtA[i] = 0x42 - n2, err2 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.CcvTimeoutPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.CcvTimeoutPeriod):]) + n2, err2 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.TransferTimeoutPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.TransferTimeoutPeriod):]) if err2 != nil { return 0, err2 } i -= n2 i = encodeVarintTx(dAtA, i, uint64(n2)) i-- - dAtA[i] = 0x3a - n3, err3 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.UnbondingPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.UnbondingPeriod):]) + dAtA[i] = 0x42 + n3, err3 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.CcvTimeoutPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.CcvTimeoutPeriod):]) if err3 != nil { return 0, err3 } i -= n3 i = encodeVarintTx(dAtA, i, uint64(n3)) i-- - dAtA[i] = 0x32 - n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.SpawnTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.SpawnTime):]) + dAtA[i] = 0x3a + n4, err4 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.UnbondingPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.UnbondingPeriod):]) if err4 != nil { return 0, err4 } i -= n4 i = encodeVarintTx(dAtA, i, uint64(n4)) i-- + dAtA[i] = 0x32 + n5, err5 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.SpawnTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.SpawnTime):]) + if err5 != nil { + return 0, err5 + } + i -= n5 + i = encodeVarintTx(dAtA, i, uint64(n5)) + i-- dAtA[i] = 0x2a if len(m.BinaryHash) > 0 { i -= len(m.BinaryHash) @@ -1061,12 +1258,12 @@ func (m *MsgConsumerRemoval) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - n6, err6 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.StopTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StopTime):]) - if err6 != nil { - return 0, err6 + n7, err7 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.StopTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StopTime):]) + if err7 != nil { + return 0, err7 } - i -= n6 - i = encodeVarintTx(dAtA, i, uint64(n6)) + i -= n7 + i = encodeVarintTx(dAtA, i, uint64(n7)) i-- dAtA[i] = 0x12 if len(m.ChainId) > 0 { @@ -1184,6 +1381,30 @@ func encodeVarintTx(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *MsgAssignConsumerKey) Size() (n int) { if m == nil { return 0 @@ -1344,6 +1565,171 @@ func sovTx(x uint64) (n int) { func sozTx(x uint64) (n int) { return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *MsgAssignConsumerKey) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/ccv/types/params.go b/x/ccv/types/params.go index d44ec68c80..0891591403 100644 --- a/x/ccv/types/params.go +++ b/x/ccv/types/params.go @@ -43,6 +43,7 @@ const ( ) // Reflection based keys for params subspace +// [DEPRECATED] var ( KeyEnabled = []byte("Enabled") KeyBlocksPerDistributionTransmission = []byte("BlocksPerDistributionTransmission")