diff --git a/proto/quicksilver/interchainstaking/v1/genesis.proto b/proto/quicksilver/interchainstaking/v1/genesis.proto index d388e6af8..a710aa5d8 100644 --- a/proto/quicksilver/interchainstaking/v1/genesis.proto +++ b/proto/quicksilver/interchainstaking/v1/genesis.proto @@ -4,36 +4,10 @@ package quicksilver.interchainstaking.v1; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "quicksilver/interchainstaking/v1/interchainstaking.proto"; +import "quicksilver/interchainstaking/v1/params.proto"; option go_package = "github.com/ingenuity-build/quicksilver/x/interchainstaking/types"; -message Params_v1 { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - uint64 deposit_interval = 1; - uint64 validatorset_interval = 2; - string commission_rate = 3 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -message Params { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - uint64 deposit_interval = 1; - uint64 validatorset_interval = 2; - string commission_rate = 3 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - bool unbonding_enabled = 4; -} - message DelegationsForZone { string chain_id = 1; repeated Delegation delegations = 2; diff --git a/proto/quicksilver/interchainstaking/v1/messages.proto b/proto/quicksilver/interchainstaking/v1/messages.proto index 09627b1c6..d191639cb 100644 --- a/proto/quicksilver/interchainstaking/v1/messages.proto +++ b/proto/quicksilver/interchainstaking/v1/messages.proto @@ -7,6 +7,7 @@ import "cosmos/msg/v1/msg.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "quicksilver/interchainstaking/v1/proposals.proto"; +import "quicksilver/interchainstaking/v1/params.proto"; option go_package = "github.com/ingenuity-build/quicksilver/x/interchainstaking/types"; @@ -60,8 +61,17 @@ service Msg { body : "*" }; } + + // Update the params of the module through gov v1 type. + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse) { + option (google.api.http) = { + post : "/quicksilver/tx/v1/interchainstaking/update_params" + body : "*" + }; + } } + // MsgRequestRedemption represents a message type to request a burn of qAssets // for native assets. message MsgRequestRedemption { @@ -93,3 +103,25 @@ message MsgRequestRedemptionResponse {} // MsgSignalIntentResponse defines the MsgSignalIntent response type. message MsgSignalIntentResponse {} + +// MsgUpdateParams is the Msg/UpdateParams request type. +// +// Since: cosmos-sdk 0.47 +message MsgUpdateParams { + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address that controls the module (defaults to x/gov + // unless overwritten). + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + + // params defines the x/interchainstaking parameters to update. + // + // NOTE: All parameters must be supplied. + Params params = 2 [ (gogoproto.nullable) = false ]; +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// +// Since: cosmos-sdk 0.47 +message MsgUpdateParamsResponse {} diff --git a/proto/quicksilver/interchainstaking/v1/params.proto b/proto/quicksilver/interchainstaking/v1/params.proto new file mode 100644 index 000000000..86e95f277 --- /dev/null +++ b/proto/quicksilver/interchainstaking/v1/params.proto @@ -0,0 +1,34 @@ +syntax = "proto3"; +package quicksilver.interchainstaking.v1; + +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/ingenuity-build/quicksilver/x/interchainstaking/types"; + +message Params_v1 { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + uint64 deposit_interval = 1; + uint64 validatorset_interval = 2; + string commission_rate = 3 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} + +message Params { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + uint64 deposit_interval = 1; + uint64 validatorset_interval = 2; + string commission_rate = 3 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + bool unbonding_enabled = 4; +} \ No newline at end of file diff --git a/x/airdrop/types/params.go b/x/airdrop/types/params_legacy.go similarity index 100% rename from x/airdrop/types/params.go rename to x/airdrop/types/params_legacy.go diff --git a/x/claimsmanager/types/params.go b/x/claimsmanager/types/params_legacy.go similarity index 100% rename from x/claimsmanager/types/params.go rename to x/claimsmanager/types/params_legacy.go diff --git a/x/claimsmanager/types/params_test.go b/x/claimsmanager/types/params_legacy_test.go similarity index 100% rename from x/claimsmanager/types/params_test.go rename to x/claimsmanager/types/params_legacy_test.go diff --git a/x/interchainstaking/genesis.go b/x/interchainstaking/genesis.go index 5287bf306..07e5450c8 100644 --- a/x/interchainstaking/genesis.go +++ b/x/interchainstaking/genesis.go @@ -10,7 +10,9 @@ import ( // InitGenesis initializes the interchainstaking module's state from a provided genesis // state. func InitGenesis(ctx sdk.Context, k *keeper.Keeper, genState types.GenesisState) { - k.SetParams(ctx, genState.Params) + if err := k.SetParams(ctx, genState.Params); err != nil { + panic(err) + } // set registered zones info from genesis for _, zone := range genState.Zones { diff --git a/x/interchainstaking/keeper/abci.go b/x/interchainstaking/keeper/abci.go index a51b914d6..e3b5a0959 100644 --- a/x/interchainstaking/keeper/abci.go +++ b/x/interchainstaking/keeper/abci.go @@ -54,7 +54,8 @@ func (k *Keeper) BeginBlocker(ctx sdk.Context) { if len(zone.IbcNextValidatorsHash) == 0 || !bytes.Equal(zone.IbcNextValidatorsHash, tmConsState.NextValidatorsHash.Bytes()) { k.Logger(ctx).Info("IBC ValSet has changed; requerying valset") // trigger valset update. - period := int64(k.GetParam(ctx, types.KeyValidatorSetInterval)) + params := k.GetParams(ctx) + period := int64(params.ValidatorsetInterval) query := stakingTypes.QueryValidatorsRequest{} err := k.EmitValSetQuery(ctx, zone.ConnectionId, zone, query, sdkmath.NewInt(period)) if err != nil { diff --git a/x/interchainstaking/keeper/ibc_channel_handlers.go b/x/interchainstaking/keeper/ibc_channel_handlers.go index 08b557587..1f1b00d87 100644 --- a/x/interchainstaking/keeper/ibc_channel_handlers.go +++ b/x/interchainstaking/keeper/ibc_channel_handlers.go @@ -58,13 +58,16 @@ func (k *Keeper) HandleChannelOpenAck(ctx sdk.Context, portID, connectionID stri return err } + params := k.GetParams(ctx) + period := int64(params.ValidatorsetInterval) + k.ICQKeeper.MakeRequest( ctx, connectionID, zone.ZoneID(), "cosmos.bank.v1beta1.Query/AllBalances", bz, - sdk.NewInt(int64(k.GetParam(ctx, types.KeyDepositInterval))), + sdk.NewInt(period), types.ModuleName, "allbalances", 0, diff --git a/x/interchainstaking/keeper/ibc_packet_handlers.go b/x/interchainstaking/keeper/ibc_packet_handlers.go index b2c693a6d..839f14571 100644 --- a/x/interchainstaking/keeper/ibc_packet_handlers.go +++ b/x/interchainstaking/keeper/ibc_packet_handlers.go @@ -338,7 +338,8 @@ func (k *Keeper) HandleMsgTransfer(ctx sdk.Context, msg sdk.Msg) error { if found && denomTrace.BaseDenom != zone.BaseDenom { // k.Logger(ctx).Error("got withdrawal account and NOT staking denom", "rx", receivedCoin.Denom, "trace_base_denom", denomTrace.BaseDenom, "zone_base_denom", zone.BaseDenom) - feeAmount := sdk.NewDecFromInt(receivedCoin.Amount).Mul(k.GetCommissionRate(ctx)).TruncateInt() + params := k.GetParams(ctx) + feeAmount := sdk.NewDecFromInt(receivedCoin.Amount).Mul(params.CommissionRate).TruncateInt() rewardCoin := receivedCoin.SubAmount(feeAmount) zoneAddress, err := addressutils.AccAddressFromBech32(zone.WithdrawalAddress.Address, "") if err != nil { @@ -479,7 +480,8 @@ func (k *Keeper) HandleWithdrawForUser(ctx sdk.Context, zone *types.Zone, msg *b } } - period := int64(k.GetParam(ctx, types.KeyValidatorSetInterval)) + params := k.GetParams(ctx) + period := int64(params.ValidatorsetInterval) query := stakingtypes.QueryValidatorsRequest{} return k.EmitValSetQuery(ctx, zone.ConnectionId, zone, query, sdkmath.NewInt(period)) @@ -1099,7 +1101,8 @@ func (k *Keeper) UpdateDelegationRecordForAddress( } k.SetDelegation(ctx, zone, delegation) - period := int64(k.GetParam(ctx, types.KeyValidatorSetInterval)) + params := k.GetParams(ctx) + period := int64(params.ValidatorsetInterval) query := stakingtypes.QueryValidatorsRequest{} err := k.EmitValSetQuery(ctx, zone.ConnectionId, zone, query, sdkmath.NewInt(period)) if err != nil { @@ -1181,8 +1184,9 @@ func DistributeRewardsFromWithdrawAccount(k *Keeper, ctx sdk.Context, args []byt baseDenomAmount := withdrawBalance.Balances.AmountOf(zone.BaseDenom) // calculate fee (fee = amount * rate) + params := k.GetParams(ctx) baseDenomFee := sdk.NewDecFromInt(baseDenomAmount). - Mul(k.GetCommissionRate(ctx)). + Mul(params.CommissionRate). TruncateInt() // prepare rewards distribution diff --git a/x/interchainstaking/keeper/keeper.go b/x/interchainstaking/keeper/keeper.go index f343795c8..6aa24c440 100644 --- a/x/interchainstaking/keeper/keeper.go +++ b/x/interchainstaking/keeper/keeper.go @@ -384,45 +384,6 @@ func (k *Keeper) depositInterval(ctx sdk.Context) zoneItrFn { } } -func (k *Keeper) GetParam(ctx sdk.Context, key []byte) uint64 { - var out uint64 - k.paramStore.Get(ctx, key, &out) - return out -} - -func (k *Keeper) GetUnbondingEnabled(ctx sdk.Context) bool { - var out bool - k.paramStore.Get(ctx, types.KeyUnbondingEnabled, &out) - return out -} - -func (k *Keeper) GetCommissionRate(ctx sdk.Context) sdk.Dec { - var out sdk.Dec - k.paramStore.Get(ctx, types.KeyCommissionRate, &out) - return out -} - -// MigrateParams fetches params, adds ClaimsEnabled field and re-sets params. -func (k *Keeper) MigrateParams(ctx sdk.Context) { - params := types.Params{} - params.DepositInterval = k.GetParam(ctx, types.KeyDepositInterval) - params.CommissionRate = k.GetCommissionRate(ctx) - params.ValidatorsetInterval = k.GetParam(ctx, types.KeyValidatorSetInterval) - params.UnbondingEnabled = false - - k.paramStore.SetParamSet(ctx, ¶ms) -} - -func (k *Keeper) GetParams(clientCtx sdk.Context) (params types.Params) { - k.paramStore.GetParamSet(clientCtx, ¶ms) - return params -} - -// SetParams sets the distribution parameters to the param space. -func (k *Keeper) SetParams(ctx sdk.Context, params types.Params) { - k.paramStore.SetParamSet(ctx, ¶ms) -} - func (k *Keeper) SetZoneIDForPortConnection(ctx sdk.Context, portID, connectionID, zoneID string) { key := fmt.Sprintf("%s-%s", portID, connectionID) store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixPortConnectionZone) diff --git a/x/interchainstaking/keeper/msg_server.go b/x/interchainstaking/keeper/msg_server.go index 9e4ac1daf..3b20cee2a 100644 --- a/x/interchainstaking/keeper/msg_server.go +++ b/x/interchainstaking/keeper/msg_server.go @@ -10,6 +10,8 @@ import ( "strconv" "strings" + sdkioerrors "cosmossdk.io/errors" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" @@ -146,7 +148,8 @@ func (k msgServer) RegisterZone(goCtx context.Context, msg *types.MsgRegisterZon // query val set for base zone if !zone.IsSubzone() { - period := int64(k.GetParam(ctx, types.KeyValidatorSetInterval)) + params := k.GetParams(ctx) + period := int64(params.ValidatorsetInterval) query := stakingTypes.QueryValidatorsRequest{} err = k.EmitValSetQuery(ctx, zone.ConnectionId, zone, query, sdkmath.NewInt(period)) if err != nil { @@ -316,7 +319,8 @@ func (k msgServer) UpdateZone(goCtx context.Context, msg *types.MsgUpdateZone) ( return &types.MsgUpdateZoneResponse{}, err } - period := int64(k.GetParam(ctx, types.KeyValidatorSetInterval)) + params := k.GetParams(ctx) + period := int64(params.ValidatorsetInterval) query := stakingTypes.QueryValidatorsRequest{} err := k.EmitValSetQuery(ctx, zone.ConnectionId, &zone, query, sdkmath.NewInt(period)) if err != nil { @@ -338,7 +342,7 @@ func (k msgServer) UpdateZone(goCtx context.Context, msg *types.MsgUpdateZone) ( func (k msgServer) RequestRedemption(goCtx context.Context, msg *types.MsgRequestRedemption) (*types.MsgRequestRedemptionResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - if !k.Keeper.GetUnbondingEnabled(ctx) { + if !k.GetParams(ctx).UnbondingEnabled { return nil, fmt.Errorf("unbonding is currently disabled") } @@ -553,3 +557,16 @@ func (k msgServer) GovCloseChannel(goCtx context.Context, msg *types.MsgGovClose return &types.MsgGovCloseChannelResponse{}, nil } + +func (k msgServer) UpdateParams(goCtx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { + if k.authority != req.Authority { + return nil, sdkioerrors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", k.authority, req.Authority) + } + + ctx := sdk.UnwrapSDKContext(goCtx) + if err := k.SetParams(ctx, req.Params); err != nil { + return nil, err + } + + return &types.MsgUpdateParamsResponse{}, nil +} diff --git a/x/interchainstaking/keeper/params.go b/x/interchainstaking/keeper/params.go new file mode 100644 index 000000000..76b5a99b5 --- /dev/null +++ b/x/interchainstaking/keeper/params.go @@ -0,0 +1,32 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/ingenuity-build/quicksilver/x/interchainstaking/types" +) + +// GetParams returns the total set of x/airdrop parameters. +func (k *Keeper) GetParams(ctx sdk.Context) (p types.Params) { + store := ctx.KVStore(k.storeKey) + bz := store.Get(types.KeyPrefixParams) + if bz == nil { + return p + } + + k.cdc.MustUnmarshal(bz, &p) + return p +} + +// SetParams sets the x/airdrop parameters to the param space. +func (k *Keeper) SetParams(ctx sdk.Context, p types.Params) error { + if err := p.Validate(); err != nil { + return err + } + + store := ctx.KVStore(k.storeKey) + bz := k.cdc.MustMarshal(&p) + store.Set(types.KeyPrefixParams, bz) + + return nil +} diff --git a/x/interchainstaking/keeper/params_legacy.go b/x/interchainstaking/keeper/params_legacy.go new file mode 100644 index 000000000..0c8634f47 --- /dev/null +++ b/x/interchainstaking/keeper/params_legacy.go @@ -0,0 +1,36 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/ingenuity-build/quicksilver/x/interchainstaking/types" +) + +func (k *Keeper) GetParamLegacy(ctx sdk.Context, key []byte) uint64 { + var out uint64 + k.paramStore.Get(ctx, key, &out) + return out +} + +func (k *Keeper) GetUnbondingEnabledLegacy(ctx sdk.Context) bool { + var out bool + k.paramStore.Get(ctx, types.KeyUnbondingEnabled, &out) + return out +} + +func (k *Keeper) GetCommissionRateLegacy(ctx sdk.Context) sdk.Dec { + var out sdk.Dec + k.paramStore.Get(ctx, types.KeyCommissionRate, &out) + return out +} + +// MigrateParams fetches params, adds ClaimsEnabled field and re-sets params. +func (k *Keeper) MigrateParams(ctx sdk.Context) { + params := types.Params{} + params.DepositInterval = k.GetParamLegacy(ctx, types.KeyDepositInterval) + params.CommissionRate = k.GetCommissionRateLegacy(ctx) + params.ValidatorsetInterval = k.GetParamLegacy(ctx, types.KeyValidatorSetInterval) + params.UnbondingEnabled = false + + k.paramStore.SetParamSet(ctx, ¶ms) +} diff --git a/x/interchainstaking/keeper/proposal_handler.go b/x/interchainstaking/keeper/proposal_handler.go index d18fc09e2..97e70726d 100644 --- a/x/interchainstaking/keeper/proposal_handler.go +++ b/x/interchainstaking/keeper/proposal_handler.go @@ -121,7 +121,8 @@ func (k *Keeper) HandleRegisterZoneProposal(ctx sdk.Context, p *types.RegisterZo // query val set for base zone if !zone.IsSubzone() { - period := int64(k.GetParam(ctx, types.KeyValidatorSetInterval)) + params := k.GetParams(ctx) + period := int64(params.ValidatorsetInterval) query := stakingTypes.QueryValidatorsRequest{} err = k.EmitValSetQuery(ctx, zone.ConnectionId, zone, query, sdkmath.NewInt(period)) if err != nil { @@ -281,7 +282,8 @@ func (k *Keeper) HandleUpdateZoneProposal(ctx sdk.Context, p *types.UpdateZonePr return err } - period := int64(k.GetParam(ctx, types.KeyValidatorSetInterval)) + params := k.GetParams(ctx) + period := int64(params.ValidatorsetInterval) query := stakingTypes.QueryValidatorsRequest{} err := k.EmitValSetQuery(ctx, zone.ConnectionId, &zone, query, sdkmath.NewInt(period)) if err != nil { diff --git a/x/interchainstaking/types/genesis.pb.go b/x/interchainstaking/types/genesis.pb.go index fe4a29f61..9465e3408 100644 --- a/x/interchainstaking/types/genesis.pb.go +++ b/x/interchainstaking/types/genesis.pb.go @@ -6,7 +6,6 @@ package types import ( fmt "fmt" _ "github.com/cosmos/cosmos-proto" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -25,118 +24,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type ParamsV1 struct { - DepositInterval uint64 `protobuf:"varint,1,opt,name=deposit_interval,json=depositInterval,proto3" json:"deposit_interval,omitempty"` - ValidatorsetInterval uint64 `protobuf:"varint,2,opt,name=validatorset_interval,json=validatorsetInterval,proto3" json:"validatorset_interval,omitempty"` - CommissionRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=commission_rate,json=commissionRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"commission_rate"` -} - -func (m *ParamsV1) Reset() { *m = ParamsV1{} } -func (*ParamsV1) ProtoMessage() {} -func (*ParamsV1) Descriptor() ([]byte, []int) { - return fileDescriptor_196cdf77e041fc72, []int{0} -} -func (m *ParamsV1) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ParamsV1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ParamsV1.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 *ParamsV1) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParamsV1.Merge(m, src) -} -func (m *ParamsV1) XXX_Size() int { - return m.Size() -} -func (m *ParamsV1) XXX_DiscardUnknown() { - xxx_messageInfo_ParamsV1.DiscardUnknown(m) -} - -var xxx_messageInfo_ParamsV1 proto.InternalMessageInfo - -func (m *ParamsV1) GetDepositInterval() uint64 { - if m != nil { - return m.DepositInterval - } - return 0 -} - -func (m *ParamsV1) GetValidatorsetInterval() uint64 { - if m != nil { - return m.ValidatorsetInterval - } - return 0 -} - -type Params struct { - DepositInterval uint64 `protobuf:"varint,1,opt,name=deposit_interval,json=depositInterval,proto3" json:"deposit_interval,omitempty"` - ValidatorsetInterval uint64 `protobuf:"varint,2,opt,name=validatorset_interval,json=validatorsetInterval,proto3" json:"validatorset_interval,omitempty"` - CommissionRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=commission_rate,json=commissionRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"commission_rate"` - UnbondingEnabled bool `protobuf:"varint,4,opt,name=unbonding_enabled,json=unbondingEnabled,proto3" json:"unbonding_enabled,omitempty"` -} - -func (m *Params) Reset() { *m = Params{} } -func (*Params) ProtoMessage() {} -func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_196cdf77e041fc72, []int{1} -} -func (m *Params) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { - xxx_messageInfo_Params.Merge(m, src) -} -func (m *Params) XXX_Size() int { - return m.Size() -} -func (m *Params) XXX_DiscardUnknown() { - xxx_messageInfo_Params.DiscardUnknown(m) -} - -var xxx_messageInfo_Params proto.InternalMessageInfo - -func (m *Params) GetDepositInterval() uint64 { - if m != nil { - return m.DepositInterval - } - return 0 -} - -func (m *Params) GetValidatorsetInterval() uint64 { - if m != nil { - return m.ValidatorsetInterval - } - return 0 -} - -func (m *Params) GetUnbondingEnabled() bool { - if m != nil { - return m.UnbondingEnabled - } - return false -} - type DelegationsForZone struct { ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` Delegations []*Delegation `protobuf:"bytes,2,rep,name=delegations,proto3" json:"delegations,omitempty"` @@ -146,7 +33,7 @@ func (m *DelegationsForZone) Reset() { *m = DelegationsForZone{} } func (m *DelegationsForZone) String() string { return proto.CompactTextString(m) } func (*DelegationsForZone) ProtoMessage() {} func (*DelegationsForZone) Descriptor() ([]byte, []int) { - return fileDescriptor_196cdf77e041fc72, []int{2} + return fileDescriptor_196cdf77e041fc72, []int{0} } func (m *DelegationsForZone) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -199,7 +86,7 @@ func (m *DelegatorIntentsForZone) Reset() { *m = DelegatorIntentsForZone func (m *DelegatorIntentsForZone) String() string { return proto.CompactTextString(m) } func (*DelegatorIntentsForZone) ProtoMessage() {} func (*DelegatorIntentsForZone) Descriptor() ([]byte, []int) { - return fileDescriptor_196cdf77e041fc72, []int{3} + return fileDescriptor_196cdf77e041fc72, []int{1} } func (m *DelegatorIntentsForZone) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -265,7 +152,7 @@ func (m *GenesisState) Reset() { *m = GenesisState{} } func (m *GenesisState) String() string { return proto.CompactTextString(m) } func (*GenesisState) ProtoMessage() {} func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_196cdf77e041fc72, []int{4} + return fileDescriptor_196cdf77e041fc72, []int{2} } func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -351,8 +238,6 @@ func (m *GenesisState) GetWithdrawalRecords() []WithdrawalRecord { } func init() { - proto.RegisterType((*ParamsV1)(nil), "quicksilver.interchainstaking.v1.Params_v1") - proto.RegisterType((*Params)(nil), "quicksilver.interchainstaking.v1.Params") proto.RegisterType((*DelegationsForZone)(nil), "quicksilver.interchainstaking.v1.DelegationsForZone") proto.RegisterType((*DelegatorIntentsForZone)(nil), "quicksilver.interchainstaking.v1.DelegatorIntentsForZone") proto.RegisterType((*GenesisState)(nil), "quicksilver.interchainstaking.v1.GenesisState") @@ -363,210 +248,41 @@ func init() { } var fileDescriptor_196cdf77e041fc72 = []byte{ - // 700 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x55, 0x41, 0x4f, 0x13, 0x41, - 0x14, 0xee, 0x42, 0x29, 0xcb, 0x60, 0xa4, 0x4c, 0x50, 0x16, 0x0e, 0x6d, 0xd3, 0x03, 0x29, 0x51, - 0xb6, 0x29, 0x68, 0xa2, 0xc6, 0x83, 0xa9, 0x88, 0x21, 0x26, 0xc6, 0xac, 0x26, 0x26, 0xc4, 0xb8, - 0x99, 0xee, 0x0c, 0xdb, 0x09, 0xdb, 0x99, 0x75, 0x66, 0x5a, 0xc4, 0x8b, 0x37, 0xcf, 0x1e, 0x3d, - 0xf2, 0x13, 0x3c, 0xf8, 0x23, 0x38, 0x12, 0x4f, 0xc6, 0x18, 0x62, 0xe0, 0xe2, 0x5f, 0xf0, 0x66, - 0x3a, 0x3b, 0xdd, 0x2e, 0x60, 0x52, 0x88, 0x37, 0x4f, 0x30, 0xef, 0xbd, 0xef, 0xfb, 0xde, 0xbc, - 0xf7, 0x75, 0x07, 0xb8, 0x6f, 0xba, 0x34, 0xd8, 0x91, 0x34, 0xea, 0x11, 0x51, 0xa7, 0x4c, 0x11, - 0x11, 0xb4, 0x11, 0x65, 0x52, 0xa1, 0x1d, 0xca, 0xc2, 0x7a, 0xaf, 0x51, 0x0f, 0x09, 0x23, 0x92, - 0x4a, 0x37, 0x16, 0x5c, 0x71, 0x58, 0xc9, 0xd4, 0xbb, 0xe7, 0xea, 0xdd, 0x5e, 0x63, 0x71, 0x21, - 0xe0, 0xb2, 0xc3, 0xa5, 0xaf, 0xeb, 0xeb, 0xc9, 0x21, 0x01, 0x2f, 0xce, 0x85, 0x3c, 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 0x1d, 0x94, 0x60, 0x3e, 0x26, 0x62, - 0x9b, 0x8b, 0x0e, 0x62, 0x01, 0xf1, 0xb3, 0x4a, 0x13, 0xff, 0xac, 0x74, 0x3d, 0x43, 0x9d, 0x29, - 0x82, 0x51, 0x6a, 0x1c, 0x2e, 0x8c, 0x6f, 0xa4, 0x53, 0xd0, 0x72, 0x77, 0x2f, 0x6d, 0x9c, 0x33, - 0x9a, 0x45, 0x7c, 0x26, 0x0d, 0xb7, 0x41, 0x31, 0xe6, 0x42, 0xf9, 0x01, 0x67, 0x8c, 0x04, 0xc9, - 0xdd, 0x26, 0xb5, 0xd8, 0xed, 0x0b, 0x78, 0x84, 0x0b, 0xf5, 0x30, 0x05, 0xbe, 0xe8, 0xc6, 0xd1, - 0x40, 0x68, 0x26, 0x3e, 0x95, 0x92, 0x30, 0x04, 0x70, 0x97, 0xaa, 0x36, 0x16, 0x68, 0x17, 0x45, - 0xbe, 0x20, 0x01, 0x17, 0x58, 0x3a, 0xb6, 0x56, 0x5a, 0x1d, 0xad, 0xf4, 0x32, 0xc5, 0x7a, 0x1a, - 0x6a, 0x64, 0x66, 0x77, 0xcf, 0xc4, 0x65, 0x73, 0xeb, 0xe0, 0xb8, 0x64, 0x1d, 0x1e, 0x97, 0xac, - 0x9f, 0xc7, 0x25, 0xeb, 0xe3, 0x49, 0x29, 0x77, 0x78, 0x52, 0xca, 0x7d, 0x3b, 0x29, 0xe5, 0xb6, - 0x1e, 0x64, 0x3e, 0x63, 0x94, 0x85, 0x84, 0x75, 0xa9, 0xda, 0x5b, 0x69, 0x75, 0x69, 0x84, 0xeb, - 0xd9, 0x67, 0xe8, 0xed, 0x5f, 0x1e, 0x22, 0xfd, 0x91, 0x6b, 0x15, 0xf4, 0xd3, 0xb3, 0xf6, 0x27, - 0x00, 0x00, 0xff, 0xff, 0x43, 0x97, 0xee, 0x25, 0x39, 0x07, 0x00, 0x00, -} - -func (this *ParamsV1) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ParamsV1) - if !ok { - that2, ok := that.(ParamsV1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.DepositInterval != that1.DepositInterval { - return false - } - if this.ValidatorsetInterval != that1.ValidatorsetInterval { - return false - } - if !this.CommissionRate.Equal(that1.CommissionRate) { - return false - } - return true -} -func (this *Params) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Params) - if !ok { - that2, ok := that.(Params) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.DepositInterval != that1.DepositInterval { - return false - } - if this.ValidatorsetInterval != that1.ValidatorsetInterval { - return false - } - if !this.CommissionRate.Equal(that1.CommissionRate) { - return false - } - if this.UnbondingEnabled != that1.UnbondingEnabled { - return false - } - return true -} -func (m *ParamsV1) 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 *ParamsV1) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ParamsV1) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.CommissionRate.Size() - i -= size - if _, err := m.CommissionRate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if m.ValidatorsetInterval != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.ValidatorsetInterval)) - i-- - dAtA[i] = 0x10 - } - if m.DepositInterval != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.DepositInterval)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.UnbondingEnabled { - i-- - if m.UnbondingEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - { - size := m.CommissionRate.Size() - i -= size - if _, err := m.CommissionRate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if m.ValidatorsetInterval != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.ValidatorsetInterval)) - i-- - dAtA[i] = 0x10 - } - if m.DepositInterval != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.DepositInterval)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil + // 543 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0x41, 0x6b, 0x13, 0x41, + 0x14, 0xc7, 0xb3, 0xb6, 0x49, 0xe3, 0x44, 0x30, 0x1d, 0xc4, 0x6e, 0x73, 0x58, 0x43, 0x0e, 0x12, + 0xc1, 0xee, 0x92, 0xa8, 0xa0, 0x37, 0x89, 0x52, 0x29, 0x82, 0xc8, 0x2a, 0x08, 0x41, 0x5c, 0x26, + 0xbb, 0xd3, 0xcd, 0xd0, 0xcd, 0xcc, 0x3a, 0x33, 0x9b, 0x58, 0x2f, 0x7e, 0x05, 0x3f, 0x8a, 0x1f, + 0xa3, 0xc7, 0x1e, 0x3d, 0x89, 0x24, 0x9f, 0xc2, 0x9b, 0x74, 0x66, 0xb2, 0xd9, 0xa6, 0xc2, 0xa6, + 0x78, 0xdb, 0x79, 0xf3, 0xfe, 0xff, 0xdf, 0xdb, 0x37, 0x8f, 0x07, 0xdc, 0xcf, 0x19, 0x09, 0x4f, + 0x04, 0x49, 0xa6, 0x98, 0x7b, 0x84, 0x4a, 0xcc, 0xc3, 0x31, 0x22, 0x54, 0x48, 0x74, 0x42, 0x68, + 0xec, 0x4d, 0x7b, 0x5e, 0x8c, 0x29, 0x16, 0x44, 0xb8, 0x29, 0x67, 0x92, 0xc1, 0x76, 0x21, 0xdf, + 0xbd, 0x92, 0xef, 0x4e, 0x7b, 0xad, 0xfd, 0x90, 0x89, 0x09, 0x13, 0x81, 0xca, 0xf7, 0xf4, 0x41, + 0x8b, 0x5b, 0x77, 0x62, 0x16, 0x33, 0x1d, 0xbf, 0xf8, 0x32, 0xd1, 0xa7, 0xa5, 0x25, 0x5c, 0xe5, + 0x68, 0xe5, 0x41, 0xa9, 0x32, 0x45, 0x1c, 0x4d, 0x0c, 0xbe, 0xf3, 0x0d, 0xc0, 0x97, 0x38, 0xc1, + 0x31, 0x92, 0x84, 0x51, 0x71, 0xc8, 0xf8, 0x90, 0x51, 0x0c, 0xf7, 0x41, 0x5d, 0xa9, 0x02, 0x12, + 0xd9, 0x56, 0xdb, 0xea, 0xde, 0xf4, 0x77, 0xd4, 0xf9, 0x28, 0x82, 0x6f, 0x40, 0x23, 0x5a, 0x09, + 0xec, 0x1b, 0xed, 0xad, 0x6e, 0xa3, 0xff, 0xd0, 0x2d, 0x6b, 0x81, 0xbb, 0xa2, 0xf8, 0x45, 0x83, + 0xce, 0x0f, 0x0b, 0xec, 0x99, 0x3b, 0xc6, 0x8f, 0xa8, 0xc4, 0x54, 0x6e, 0x52, 0xc6, 0x27, 0xb0, + 0xbb, 0x72, 0x09, 0x88, 0xd2, 0x99, 0x62, 0x7a, 0x1b, 0x17, 0xb3, 0x04, 0xfa, 0xcd, 0x95, 0x97, + 0x8e, 0xc0, 0x16, 0xa8, 0x0b, 0x8a, 0x52, 0x31, 0x66, 0xd2, 0xde, 0x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64, 0x3c, 0x12, 0x76, 0x5d, 0x91, 0xfa, 0xe5, 0xa4, 0x0f, 0xb9, 0xd6, 0x57, 0x52, 0x83, + 0xd9, 0x9d, 0xad, 0xc5, 0xc5, 0x60, 0x78, 0x36, 0x77, 0xac, 0xf3, 0xb9, 0x63, 0xfd, 0x9e, 0x3b, + 0xd6, 0xf7, 0x85, 0x53, 0x39, 0x5f, 0x38, 0x95, 0x9f, 0x0b, 0xa7, 0x32, 0x7c, 0x1e, 0x13, 0x39, + 0xce, 0x46, 0x6e, 0xc8, 0x26, 0x1e, 0xa1, 0x31, 0xa6, 0x19, 0x91, 0xa7, 0x07, 0xa3, 0x8c, 0x24, + 0x91, 0x57, 0xdc, 0x49, 0x5f, 0xfe, 0xb1, 0x95, 0xe4, 0x69, 0x8a, 0xc5, 0xa8, 0xa6, 0x56, 0xd2, + 0xa3, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x40, 0x94, 0x5e, 0xb9, 0x80, 0x05, 0x00, 0x00, } func (m *DelegationsForZone) Marshal() (dAtA []byte, err error) { @@ -809,43 +525,6 @@ func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *ParamsV1) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DepositInterval != 0 { - n += 1 + sovGenesis(uint64(m.DepositInterval)) - } - if m.ValidatorsetInterval != 0 { - n += 1 + sovGenesis(uint64(m.ValidatorsetInterval)) - } - l = m.CommissionRate.Size() - n += 1 + l + sovGenesis(uint64(l)) - return n -} - -func (m *Params) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DepositInterval != 0 { - n += 1 + sovGenesis(uint64(m.DepositInterval)) - } - if m.ValidatorsetInterval != 0 { - n += 1 + sovGenesis(uint64(m.ValidatorsetInterval)) - } - l = m.CommissionRate.Size() - n += 1 + l + sovGenesis(uint64(l)) - if m.UnbondingEnabled { - n += 2 - } - return n -} - func (m *DelegationsForZone) Size() (n int) { if m == nil { return 0 @@ -946,270 +625,6 @@ func sovGenesis(x uint64) (n int) { func sozGenesis(x uint64) (n int) { return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *ParamsV1) 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 ErrIntOverflowGenesis - } - 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: Params_v1: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Params_v1: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositInterval", wireType) - } - m.DepositInterval = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DepositInterval |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorsetInterval", wireType) - } - m.ValidatorsetInterval = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ValidatorsetInterval |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommissionRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.CommissionRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Params) 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 ErrIntOverflowGenesis - } - 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: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositInterval", wireType) - } - m.DepositInterval = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DepositInterval |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorsetInterval", wireType) - } - m.ValidatorsetInterval = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ValidatorsetInterval |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommissionRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.CommissionRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.UnbondingEnabled = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *DelegationsForZone) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/interchainstaking/types/keys.go b/x/interchainstaking/types/keys.go index d24f55176..8d78c3c61 100644 --- a/x/interchainstaking/types/keys.go +++ b/x/interchainstaking/types/keys.go @@ -60,9 +60,8 @@ var ( KeyPrefixRemoteAddress = []byte{0x0d} KeyPrefixLocalAddress = []byte{0x0e} KeyPrefixPortConnectionZone = []byte{0x0f} - - // fill in missing 0d - 0f before adding 0x11! - KeyPrefixRedelegationRecord = []byte{0x10} + KeyPrefixRedelegationRecord = []byte{0x10} + KeyPrefixParams = []byte{0x11} ) // ParseStakingDelegationKey parses the KV store key for a delegation from Cosmos x/staking module, diff --git a/x/interchainstaking/types/messages.pb.go b/x/interchainstaking/types/messages.pb.go index 3be8dcd69..a0e4ad152 100644 --- a/x/interchainstaking/types/messages.pb.go +++ b/x/interchainstaking/types/messages.pb.go @@ -188,11 +188,113 @@ func (m *MsgSignalIntentResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSignalIntentResponse proto.InternalMessageInfo +// MsgUpdateParams is the Msg/UpdateParams request type. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParams struct { + // authority is the address that controls the module (defaults to x/gov + // unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/interchainstaking parameters to update. + // + // NOTE: All parameters must be supplied. + 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_ee484030fa140a82, []int{4} +} +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) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// +// Since: cosmos-sdk 0.47 +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_ee484030fa140a82, []int{5} +} +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 + func init() { proto.RegisterType((*MsgRequestRedemption)(nil), "quicksilver.interchainstaking.v1.MsgRequestRedemption") proto.RegisterType((*MsgSignalIntent)(nil), "quicksilver.interchainstaking.v1.MsgSignalIntent") proto.RegisterType((*MsgRequestRedemptionResponse)(nil), "quicksilver.interchainstaking.v1.MsgRequestRedemptionResponse") proto.RegisterType((*MsgSignalIntentResponse)(nil), "quicksilver.interchainstaking.v1.MsgSignalIntentResponse") + proto.RegisterType((*MsgUpdateParams)(nil), "quicksilver.interchainstaking.v1.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "quicksilver.interchainstaking.v1.MsgUpdateParamsResponse") } func init() { @@ -200,53 +302,59 @@ func init() { } var fileDescriptor_ee484030fa140a82 = []byte{ - // 726 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x95, 0x4f, 0x4f, 0xdb, 0x48, - 0x18, 0xc6, 0x33, 0x20, 0x96, 0x65, 0x40, 0xcb, 0xae, 0x41, 0x82, 0x58, 0xc8, 0x41, 0x3e, 0x21, - 0x76, 0xb1, 0x09, 0x2c, 0xb0, 0x0b, 0x0b, 0xda, 0x0d, 0x2b, 0x21, 0x0e, 0x5c, 0x8c, 0x7a, 0xe1, - 0x12, 0x4d, 0xe2, 0xb7, 0xc3, 0x08, 0x7b, 0xc6, 0x78, 0x26, 0x11, 0xf4, 0x54, 0x71, 0xea, 0xad, - 0x95, 0xfa, 0x05, 0xf8, 0x08, 0x48, 0xe5, 0xd6, 0x63, 0x2b, 0x95, 0x23, 0x6a, 0x2f, 0x3d, 0x45, - 0x15, 0x54, 0xa2, 0x67, 0xbe, 0x40, 0x2b, 0xff, 0x49, 0x9a, 0x00, 0x12, 0x26, 0x52, 0x6f, 0xb1, - 0x5f, 0xff, 0x9e, 0xf9, 0x3d, 0xe3, 0xb1, 0x82, 0xed, 0xfd, 0x1a, 0xab, 0xee, 0x49, 0xe6, 0xd5, - 0x21, 0xb4, 0x19, 0x57, 0x10, 0x56, 0x77, 0x09, 0xe3, 0x52, 0x91, 0x3d, 0xc6, 0xa9, 0x5d, 0x2f, - 0xda, 0x3e, 0x48, 0x49, 0x28, 0x48, 0x2b, 0x08, 0x85, 0x12, 0xda, 0x64, 0x1b, 0x60, 0xdd, 0x02, - 0xac, 0x7a, 0x51, 0x37, 0xaa, 0x42, 0xfa, 0x42, 0xda, 0x15, 0x22, 0xc1, 0xae, 0x17, 0x2b, 0xa0, - 0x48, 0xd1, 0xae, 0x0a, 0xc6, 0x93, 0x04, 0x3d, 0x9f, 0xcc, 0xcb, 0xf1, 0x95, 0x9d, 0x5c, 0xa4, - 0xa3, 0xb1, 0x14, 0xf5, 0x65, 0xb2, 0xb4, 0xa4, 0xe9, 0x60, 0x94, 0x0a, 0x2a, 0x12, 0x20, 0xfa, - 0x95, 0xde, 0x9d, 0xa0, 0x42, 0x50, 0x0f, 0x6c, 0x12, 0x30, 0x9b, 0x70, 0x2e, 0x14, 0x51, 0x4c, - 0xf0, 0x66, 0xd8, 0xec, 0xbd, 0xd5, 0x82, 0x50, 0x04, 0x42, 0x12, 0x2f, 0x25, 0xcc, 0xaf, 0x08, - 0x8f, 0x6e, 0x49, 0xea, 0xc0, 0x7e, 0x0d, 0xa4, 0x72, 0xc0, 0x05, 0x3f, 0x88, 0x12, 0xb5, 0xff, - 0x71, 0x5f, 0x9d, 0x78, 0x35, 0x18, 0x47, 0x93, 0x68, 0x6a, 0x70, 0x2e, 0x6f, 0xa5, 0xd6, 0x51, - 0x45, 0x2b, 0xad, 0x68, 0xad, 0x0b, 0xc6, 0x4b, 0x23, 0x67, 0x8d, 0x42, 0xee, 0xba, 0x51, 0x18, - 0x3c, 0x24, 0xbe, 0xb7, 0x6c, 0x46, 0xb5, 0x4d, 0x27, 0x81, 0xb5, 0x4d, 0x3c, 0xe2, 0x82, 0x54, - 0x8c, 0xc7, 0x9a, 0x65, 0xe2, 0xba, 0x21, 0x48, 0x39, 0xde, 0x33, 0x89, 0xa6, 0x06, 0x4a, 0xe3, - 0xef, 0x4f, 0x67, 0x46, 0xd3, 0xd8, 0xff,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0x97, 0x46, 0x6e, 0xe7, 0x5f, 0xca, 0xd4, 0x6e, 0xad, 0x62, 0x55, 0x85, 0x6f, 0x33, 0x4e, - 0x81, 0xd7, 0x98, 0x3a, 0x9c, 0xa9, 0xd4, 0x98, 0xe7, 0x76, 0xac, 0x77, 0x70, 0xc7, 0x5a, 0xea, - 0x30, 0x00, 0x59, 0xf9, 0x29, 0xfe, 0xef, 0x9b, 0xff, 0x16, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x1c, - 0x6b, 0xbd, 0x0a, 0x08, 0x00, 0x00, + // 824 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x96, 0x41, 0x4f, 0xe3, 0x46, + 0x18, 0x86, 0x33, 0xbb, 0xdd, 0xdd, 0x32, 0x41, 0x4b, 0x6b, 0x90, 0x96, 0x58, 0x2b, 0x07, 0xf9, + 0x84, 0x68, 0xb1, 0x49, 0x28, 0xd0, 0x86, 0x82, 0xda, 0x50, 0x15, 0x71, 0x40, 0xaa, 0x8c, 0x7a, + 0xe1, 0x12, 0x4d, 0xe2, 0xa9, 0x33, 0xc2, 0x9e, 0x31, 0x9e, 0x71, 0x44, 0x7a, 0xaa, 0x38, 0xf5, + 0x58, 0xa9, 0x7f, 0x80, 0xfe, 0x03, 0xa4, 0x72, 0xeb, 0xb1, 0x95, 0xca, 0xa5, 0x12, 0x6a, 0x2f, + 0x3d, 0x45, 0x15, 0x54, 0xa2, 0x67, 0xfe, 0x40, 0x2b, 0x7b, 0x26, 0x21, 0x81, 0x54, 0x71, 0x22, + 0xed, 0x2d, 0xf6, 0x37, 0xef, 0x37, 0xcf, 0xfb, 0xfa, 0x9b, 0x51, 0xa0, 0x7d, 0x1c, 0x93, 0xc6, + 0x11, 0x27, 0x7e, 0x0b, 0x47, 0x36, 0xa1, 0x02, 0x47, 0x8d, 0x26, 0x22, 0x94, 0x0b, 0x74, 0x44, + 0xa8,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, 0x1b, 0x49, 0x97, 0x5a, 0x43, 0x21, 0x5f, 0x02, 0xf8, 0xce, 0x2e, + 0x6b, 0x39, 0x98, 0x85, 0x98, 0x76, 0x7d, 0xac, 0x65, 0x25, 0x1a, 0x90, 0xe9, 0x5b, 0x13, 0xc9, + 0x7a, 0x4e, 0xb6, 0x53, 0x27, 0x1f, 0x26, 0x4e, 0x56, 0x33, 0x8e, 0x51, 0xd2, 0xa6, 0x67, 0x25, + 0x39, 0x05, 0x03, 0xd7, 0x68, 0x69, 0x8c, 0xc1, 0x90, 0x92, 0x8c, 0xa7, 0x60, 0xd8, 0x4d, 0x38, + 0xfe, 0x87, 0x50, 0xd3, 0x24, 0xef, 0x5c, 0xfd, 0xd9, 0x37, 0xb7, 0xe7, 0x4b, 0xa0, 0x7a, 0x78, + 0x79, 0x6d, 0x80, 0xab, 0x6b, 0x03, 0xfc, 0x75, 0x6d, 0x80, 0xef, 0x6e, 0x8c, 0xdc, 0xd5, 0x8d, + 0x91, 0xfb, 0xf3, 0xc6, 0xc8, 0x1d, 0x7e, 0xe2, 0x11, 0xd1, 0x8c, 0xeb, 0x56, 0x83, 0x05, 0x36, + 0xa1, 0x1e, 0xa6, 0x31, 0x11, 0xed, 0xe5, 0x7a, 0x4c, 0x7c, 0x77, 0x60, 0xbb, 0x93, 0x21, 0x5b, + 0x89, 0x76, 0x88, 0x79, 0xfd, 0x79, 0xfa, 0xc7, 0x63, 0xf5, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xfd, 0xfe, 0x83, 0xfb, 0xb6, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -271,6 +379,8 @@ type MsgClient interface { UpdateZone(ctx context.Context, in *MsgUpdateZone, opts ...grpc.CallOption) (*MsgUpdateZoneResponse, error) GovCloseChannel(ctx context.Context, in *MsgGovCloseChannel, opts ...grpc.CallOption) (*MsgGovCloseChannelResponse, error) GovReopenChannel(ctx context.Context, in *MsgGovReopenChannel, opts ...grpc.CallOption) (*MsgGovReopenChannelResponse, error) + // Update the params of the module through gov v1 type. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) } type msgClient struct { @@ -335,6 +445,15 @@ func (c *msgClient) GovReopenChannel(ctx context.Context, in *MsgGovReopenChanne 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, "/quicksilver.interchainstaking.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 { // RequestRedemption defines a method for requesting burning of qAssets for @@ -347,6 +466,8 @@ type MsgServer interface { UpdateZone(context.Context, *MsgUpdateZone) (*MsgUpdateZoneResponse, error) GovCloseChannel(context.Context, *MsgGovCloseChannel) (*MsgGovCloseChannelResponse, error) GovReopenChannel(context.Context, *MsgGovReopenChannel) (*MsgGovReopenChannelResponse, error) + // Update the params of the module through gov v1 type. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -371,6 +492,9 @@ func (*UnimplementedMsgServer) GovCloseChannel(ctx context.Context, req *MsgGovC func (*UnimplementedMsgServer) GovReopenChannel(ctx context.Context, req *MsgGovReopenChannel) (*MsgGovReopenChannelResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GovReopenChannel 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) @@ -484,6 +608,24 @@ func _Msg_GovReopenChannel_Handler(srv interface{}, ctx context.Context, dec fun 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: "/quicksilver.interchainstaking.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: "quicksilver.interchainstaking.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -512,6 +654,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "GovReopenChannel", Handler: _Msg_GovReopenChannel_Handler, }, + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "quicksilver/interchainstaking/v1/messages.proto", @@ -654,6 +800,69 @@ func (m *MsgSignalIntentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +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 = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintMessages(dAtA, i, uint64(len(m.Authority))) + 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 encodeVarintMessages(dAtA []byte, offset int, v uint64) int { offset -= sovMessages(v) base := offset @@ -723,6 +932,30 @@ func (m *MsgSignalIntentResponse) Size() (n int) { return n } +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovMessages(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovMessages(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func sovMessages(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1122,6 +1355,171 @@ func (m *MsgSignalIntentResponse) Unmarshal(dAtA []byte) error { } return nil } +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 ErrIntOverflowMessages + } + 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 Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + 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 ErrInvalidLengthMessages + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = 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 ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + 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 := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMessages + } + 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 ErrIntOverflowMessages + } + 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 := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipMessages(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/interchainstaking/types/messages.pb.gw.go b/x/interchainstaking/types/messages.pb.gw.go index 35e9ac67b..bd389fed9 100644 --- a/x/interchainstaking/types/messages.pb.gw.go +++ b/x/interchainstaking/types/messages.pb.gw.go @@ -237,6 +237,40 @@ func local_request_Msg_GovReopenChannel_0(ctx context.Context, marshaler runtime } +func request_Msg_UpdateParams_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgUpdateParams + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UpdateParams(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Msg_UpdateParams_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgUpdateParams + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.UpdateParams(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". // UnaryRPC :call MsgServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -381,6 +415,29 @@ func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server }) + mux.Handle("POST", pattern_Msg_UpdateParams_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_Msg_UpdateParams_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_Msg_UpdateParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -542,6 +599,26 @@ func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client }) + mux.Handle("POST", pattern_Msg_UpdateParams_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_Msg_UpdateParams_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_UpdateParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -557,6 +634,8 @@ var ( pattern_Msg_GovCloseChannel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"quicksilver", "tx", "v1", "interchainstaking", "close_channel"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Msg_GovReopenChannel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"quicksilver", "tx", "v1", "interchainstaking", "reopen_channel"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Msg_UpdateParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"quicksilver", "tx", "v1", "interchainstaking", "update_params"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -571,4 +650,6 @@ var ( forward_Msg_GovCloseChannel_0 = runtime.ForwardResponseMessage forward_Msg_GovReopenChannel_0 = runtime.ForwardResponseMessage + + forward_Msg_UpdateParams_0 = runtime.ForwardResponseMessage ) diff --git a/x/interchainstaking/types/msgs.go b/x/interchainstaking/types/msgs.go index b05c1a763..349496d51 100644 --- a/x/interchainstaking/types/msgs.go +++ b/x/interchainstaking/types/msgs.go @@ -6,6 +6,8 @@ import ( "regexp" "strings" + sdkioerrors "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/bech32" "github.com/ingenuity-build/multierror" @@ -18,6 +20,7 @@ var ( _ sdk.Msg = &MsgSignalIntent{} _ sdk.Msg = &MsgGovCloseChannel{} _ sdk.Msg = &MsgGovReopenChannel{} + _ sdk.Msg = &MsgUpdateParams{} ) const ( @@ -355,3 +358,25 @@ func (msg MsgGovReopenChannel) GetSignBytes() []byte { func (msg MsgGovCloseChannel) GetSignBytes() []byte { return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) } + +////////////////////////////////////////////////////////////////////////////////////////////////////// + +// GetSignBytes implements the LegacyMsg interface. +func (m *MsgUpdateParams) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(m)) +} + +// GetSigners returns the expected signers for a MsgUpdateParams message. +func (m *MsgUpdateParams) GetSigners() []sdk.AccAddress { + addr, _ := sdk.AccAddressFromBech32(m.Authority) + return []sdk.AccAddress{addr} +} + +// ValidateBasic does a sanity check on the provided data. +func (m *MsgUpdateParams) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { + return sdkioerrors.Wrap(err, "invalid authority address") + } + + return m.Params.Validate() +} diff --git a/x/interchainstaking/types/params.pb.go b/x/interchainstaking/types/params.pb.go new file mode 100644 index 000000000..eabc7aaf8 --- /dev/null +++ b/x/interchainstaking/types/params.pb.go @@ -0,0 +1,737 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: quicksilver/interchainstaking/v1/params.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type ParamsV1 struct { + DepositInterval uint64 `protobuf:"varint,1,opt,name=deposit_interval,json=depositInterval,proto3" json:"deposit_interval,omitempty"` + ValidatorsetInterval uint64 `protobuf:"varint,2,opt,name=validatorset_interval,json=validatorsetInterval,proto3" json:"validatorset_interval,omitempty"` + CommissionRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=commission_rate,json=commissionRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"commission_rate"` +} + +func (m *ParamsV1) Reset() { *m = ParamsV1{} } +func (*ParamsV1) ProtoMessage() {} +func (*ParamsV1) Descriptor() ([]byte, []int) { + return fileDescriptor_ac720c998cab99fb, []int{0} +} +func (m *ParamsV1) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ParamsV1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ParamsV1.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 *ParamsV1) XXX_Merge(src proto.Message) { + xxx_messageInfo_ParamsV1.Merge(m, src) +} +func (m *ParamsV1) XXX_Size() int { + return m.Size() +} +func (m *ParamsV1) XXX_DiscardUnknown() { + xxx_messageInfo_ParamsV1.DiscardUnknown(m) +} + +var xxx_messageInfo_ParamsV1 proto.InternalMessageInfo + +func (m *ParamsV1) GetDepositInterval() uint64 { + if m != nil { + return m.DepositInterval + } + return 0 +} + +func (m *ParamsV1) GetValidatorsetInterval() uint64 { + if m != nil { + return m.ValidatorsetInterval + } + return 0 +} + +type Params struct { + DepositInterval uint64 `protobuf:"varint,1,opt,name=deposit_interval,json=depositInterval,proto3" json:"deposit_interval,omitempty"` + ValidatorsetInterval uint64 `protobuf:"varint,2,opt,name=validatorset_interval,json=validatorsetInterval,proto3" json:"validatorset_interval,omitempty"` + CommissionRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=commission_rate,json=commissionRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"commission_rate"` + UnbondingEnabled bool `protobuf:"varint,4,opt,name=unbonding_enabled,json=unbondingEnabled,proto3" json:"unbonding_enabled,omitempty"` +} + +func (m *Params) Reset() { *m = Params{} } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_ac720c998cab99fb, []int{1} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetDepositInterval() uint64 { + if m != nil { + return m.DepositInterval + } + return 0 +} + +func (m *Params) GetValidatorsetInterval() uint64 { + if m != nil { + return m.ValidatorsetInterval + } + return 0 +} + +func (m *Params) GetUnbondingEnabled() bool { + if m != nil { + return m.UnbondingEnabled + } + return false +} + +func init() { + proto.RegisterType((*ParamsV1)(nil), "quicksilver.interchainstaking.v1.Params_v1") + proto.RegisterType((*Params)(nil), "quicksilver.interchainstaking.v1.Params") +} + +func init() { + proto.RegisterFile("quicksilver/interchainstaking/v1/params.proto", fileDescriptor_ac720c998cab99fb) +} + +var fileDescriptor_ac720c998cab99fb = []byte{ + // 371 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x52, 0xb1, 0x6a, 0xeb, 0x30, + 0x14, 0xb5, 0xf2, 0x42, 0x48, 0x34, 0xbc, 0xe4, 0x99, 0x3c, 0xc8, 0xcb, 0x60, 0x9b, 0x0c, 0x8f, + 0x94, 0x62, 0x9b, 0x90, 0xad, 0x74, 0x28, 0x21, 0x1d, 0xba, 0x15, 0x8f, 0x59, 0x8c, 0x2c, 0x0b, + 0x47, 0xc4, 0x96, 0x5c, 0x4b, 0x36, 0xcd, 0x0f, 0x74, 0xee, 0xd8, 0x31, 0x1f, 0xd1, 0x8f, 0xc8, + 0x18, 0x3a, 0x95, 0x52, 0x42, 0x49, 0x96, 0x7e, 0x46, 0xa9, 0x6d, 0x12, 0x43, 0xfb, 0x05, 0x9d, + 0x24, 0x9d, 0x7b, 0xee, 0xd5, 0x39, 0x97, 0x03, 0xcd, 0x9b, 0x94, 0xe2, 0x85, 0xa0, 0x61, 0x46, + 0x12, 0x9b, 0x32, 0x49, 0x12, 0x3c, 0x47, 0x94, 0x09, 0x89, 0x16, 0x94, 0x05, 0x76, 0x36, 0xb2, + 0x63, 0x94, 0xa0, 0x48, 0x58, 0x71, 0xc2, 0x25, 0x57, 0x8d, 0x0a, 0xdd, 0xfa, 0x42, 0xb7, 0xb2, + 0x51, 0xff, 0x1f, 0xe6, 0x22, 0xe2, 0xc2, 0xcd, 0xf9, 0x76, 0xf1, 0x28, 0x9a, 0xfb, 0xdd, 0x80, + 0x07, 0xbc, 0xc0, 0x3f, 0x6f, 0x05, 0x3a, 0x78, 0x05, 0xb0, 0x75, 0x9d, 0xff, 0xe1, 0x66, 0x23, + 0xf5, 0x04, 0x76, 0x7c, 0x12, 0x73, 0x41, 0xa5, 0x9b, 0x8f, 0xcf, 0x50, 0xd8, 0x03, 0x06, 0x18, + 0xd6, 0x9d, 0x76, 0x89, 0x5f, 0x95, 0xb0, 0x3a, 0x86, 0x7f, 0x33, 0x14, 0x52, 0x1f, 0x49, 0x9e, + 0x08, 0x52, 0xe1, 0xd7, 0x72, 0x7e, 0xb7, 0x5a, 0x3c, 0x34, 0x11, 0xd8, 0xc6, 0x3c, 0x8a, 0xa8, + 0x10, 0x94, 0x33, 0x37, 0x41, 0x92, 0xf4, 0x7e, 0x19, 0x60, 0xd8, 0x9a, 0x9c, 0xaf, 0xb7, 0xba, + 0xf2, 0xb2, 0xd5, 0xff, 0x07, 0x54, 0xce, 0x53, 0xcf, 0xc2, 0x3c, 0x2a, 0xd5, 0x97, 0x87, 0x29, + 0xfc, 0x85, 0x2d, 0x97, 0x31, 0x11, 0xd6, 0x94, 0xe0, 0xa7, 0x47, 0x13, 0x96, 0xe6, 0xa6, 0x04, + 0x3b, 0xbf, 0x8f, 0x43, 0x1d, 0x24, 0xc9, 0x59, 0xf3, 0x61, 0xa5, 0x2b, 0xef, 0x2b, 0x1d, 0x0c, + 0xee, 0x6a, 0xb0, 0x51, 0xd8, 0xfb, 0x21, 0xde, 0xd4, 0x53, 0xf8, 0x27, 0x65, 0x1e, 0x67, 0x3e, + 0x65, 0x81, 0x4b, 0x18, 0xf2, 0x42, 0xe2, 0xf7, 0xea, 0x06, 0x18, 0x36, 0x9d, 0xce, 0xa1, 0x70, + 0x59, 0xe0, 0xc7, 0x45, 0x4c, 0x66, 0xeb, 0x9d, 0x06, 0x36, 0x3b, 0x0d, 0xbc, 0xed, 0x34, 0x70, + 0xbf, 0xd7, 0x94, 0xcd, 0x5e, 0x53, 0x9e, 0xf7, 0x9a, 0x32, 0xbb, 0xa8, 0xc8, 0xa2, 0x2c, 0x20, + 0x2c, 0xa5, 0x72, 0x69, 0x7a, 0x29, 0x0d, 0x7d, 0xbb, 0x1a, 0xcf, 0xdb, 0x6f, 0x02, 0x9a, 0x8b, + 0xf6, 0x1a, 0x79, 0x94, 0xc6, 0x1f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xab, 0x25, 0xd9, 0xc3, 0xce, + 0x02, 0x00, 0x00, +} + +func (this *ParamsV1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ParamsV1) + if !ok { + that2, ok := that.(ParamsV1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.DepositInterval != that1.DepositInterval { + return false + } + if this.ValidatorsetInterval != that1.ValidatorsetInterval { + return false + } + if !this.CommissionRate.Equal(that1.CommissionRate) { + return false + } + return true +} +func (this *Params) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.DepositInterval != that1.DepositInterval { + return false + } + if this.ValidatorsetInterval != that1.ValidatorsetInterval { + return false + } + if !this.CommissionRate.Equal(that1.CommissionRate) { + return false + } + if this.UnbondingEnabled != that1.UnbondingEnabled { + return false + } + return true +} +func (m *ParamsV1) 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 *ParamsV1) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ParamsV1) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.CommissionRate.Size() + i -= size + if _, err := m.CommissionRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.ValidatorsetInterval != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.ValidatorsetInterval)) + i-- + dAtA[i] = 0x10 + } + if m.DepositInterval != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.DepositInterval)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.UnbondingEnabled { + i-- + if m.UnbondingEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + { + size := m.CommissionRate.Size() + i -= size + if _, err := m.CommissionRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.ValidatorsetInterval != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.ValidatorsetInterval)) + i-- + dAtA[i] = 0x10 + } + if m.DepositInterval != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.DepositInterval)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ParamsV1) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.DepositInterval != 0 { + n += 1 + sovParams(uint64(m.DepositInterval)) + } + if m.ValidatorsetInterval != 0 { + n += 1 + sovParams(uint64(m.ValidatorsetInterval)) + } + l = m.CommissionRate.Size() + n += 1 + l + sovParams(uint64(l)) + return n +} + +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.DepositInterval != 0 { + n += 1 + sovParams(uint64(m.DepositInterval)) + } + if m.ValidatorsetInterval != 0 { + n += 1 + sovParams(uint64(m.ValidatorsetInterval)) + } + l = m.CommissionRate.Size() + n += 1 + l + sovParams(uint64(l)) + if m.UnbondingEnabled { + n += 2 + } + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ParamsV1) 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 ErrIntOverflowParams + } + 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: Params_v1: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params_v1: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DepositInterval", wireType) + } + m.DepositInterval = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DepositInterval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorsetInterval", wireType) + } + m.ValidatorsetInterval = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ValidatorsetInterval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CommissionRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CommissionRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Params) 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 ErrIntOverflowParams + } + 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DepositInterval", wireType) + } + m.DepositInterval = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DepositInterval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorsetInterval", wireType) + } + m.ValidatorsetInterval = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ValidatorsetInterval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CommissionRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CommissionRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.UnbondingEnabled = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/interchainstaking/types/params.go b/x/interchainstaking/types/params_legacy.go similarity index 100% rename from x/interchainstaking/types/params.go rename to x/interchainstaking/types/params_legacy.go diff --git a/x/interchainstaking/types/params_test.go b/x/interchainstaking/types/params_legacy_test.go similarity index 100% rename from x/interchainstaking/types/params_test.go rename to x/interchainstaking/types/params_legacy_test.go diff --git a/x/mint/types/params.go b/x/mint/types/params_legacy.go similarity index 100% rename from x/mint/types/params.go rename to x/mint/types/params_legacy.go diff --git a/x/mint/types/params_test.go b/x/mint/types/params_legacy_test.go similarity index 100% rename from x/mint/types/params_test.go rename to x/mint/types/params_legacy_test.go diff --git a/x/participationrewards/types/params.go b/x/participationrewards/types/params_legacy.go similarity index 100% rename from x/participationrewards/types/params.go rename to x/participationrewards/types/params_legacy.go diff --git a/x/participationrewards/types/params_test.go b/x/participationrewards/types/params_legacy_test.go similarity index 100% rename from x/participationrewards/types/params_test.go rename to x/participationrewards/types/params_legacy_test.go diff --git a/x/tokenfactory/types/params.go b/x/tokenfactory/types/params_legacy.go similarity index 100% rename from x/tokenfactory/types/params.go rename to x/tokenfactory/types/params_legacy.go