diff --git a/api/poktroll/application/params.pulsar.go b/api/poktroll/application/params.pulsar.go index 0b6923014..10688a83b 100644 --- a/api/poktroll/application/params.pulsar.go +++ b/api/poktroll/application/params.pulsar.go @@ -3,6 +3,7 @@ package application import ( _ "cosmossdk.io/api/amino" + v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" @@ -17,12 +18,14 @@ import ( var ( md_Params protoreflect.MessageDescriptor fd_Params_max_delegated_gateways protoreflect.FieldDescriptor + fd_Params_min_stake protoreflect.FieldDescriptor ) func init() { file_poktroll_application_params_proto_init() md_Params = File_poktroll_application_params_proto.Messages().ByName("Params") fd_Params_max_delegated_gateways = md_Params.Fields().ByName("max_delegated_gateways") + fd_Params_min_stake = md_Params.Fields().ByName("min_stake") } var _ protoreflect.Message = (*fastReflection_Params)(nil) @@ -96,6 +99,12 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto return } } + if x.MinStake != nil { + value := protoreflect.ValueOfMessage(x.MinStake.ProtoReflect()) + if !f(fd_Params_min_stake, value) { + return + } + } } // Has reports whether a field is populated. @@ -113,6 +122,8 @@ func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "poktroll.application.Params.max_delegated_gateways": return x.MaxDelegatedGateways != uint64(0) + case "poktroll.application.Params.min_stake": + return x.MinStake != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.application.Params")) @@ -131,6 +142,8 @@ func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "poktroll.application.Params.max_delegated_gateways": x.MaxDelegatedGateways = uint64(0) + case "poktroll.application.Params.min_stake": + x.MinStake = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.application.Params")) @@ -150,6 +163,9 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro case "poktroll.application.Params.max_delegated_gateways": value := x.MaxDelegatedGateways return protoreflect.ValueOfUint64(value) + case "poktroll.application.Params.min_stake": + value := x.MinStake + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.application.Params")) @@ -172,6 +188,8 @@ func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value proto switch fd.FullName() { case "poktroll.application.Params.max_delegated_gateways": x.MaxDelegatedGateways = value.Uint() + case "poktroll.application.Params.min_stake": + x.MinStake = value.Message().Interface().(*v1beta1.Coin) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.application.Params")) @@ -192,6 +210,11 @@ func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value proto // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "poktroll.application.Params.min_stake": + if x.MinStake == nil { + x.MinStake = new(v1beta1.Coin) + } + return protoreflect.ValueOfMessage(x.MinStake.ProtoReflect()) case "poktroll.application.Params.max_delegated_gateways": panic(fmt.Errorf("field max_delegated_gateways of message poktroll.application.Params is not mutable")) default: @@ -209,6 +232,9 @@ func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protor switch fd.FullName() { case "poktroll.application.Params.max_delegated_gateways": return protoreflect.ValueOfUint64(uint64(0)) + case "poktroll.application.Params.min_stake": + m := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.application.Params")) @@ -281,6 +307,10 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { if x.MaxDelegatedGateways != 0 { n += 1 + runtime.Sov(uint64(x.MaxDelegatedGateways)) } + if x.MinStake != nil { + l = options.Size(x.MinStake) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -310,6 +340,20 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.MinStake != nil { + encoded, err := options.Marshal(x.MinStake) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } if x.MaxDelegatedGateways != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.MaxDelegatedGateways)) i-- @@ -383,6 +427,42 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { break } } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinStake", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.MinStake == nil { + x.MinStake = &v1beta1.Coin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MinStake); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -441,6 +521,8 @@ type Params struct { // application can delegate to. This is used to prevent performance issues // in case the relay ring signature becomes too large. MaxDelegatedGateways uint64 `protobuf:"varint,1,opt,name=max_delegated_gateways,json=maxDelegatedGateways,proto3" json:"max_delegated_gateways,omitempty"` + // min_stake is the minimum stake in upokt that an application must have to remain staked. + MinStake *v1beta1.Coin `protobuf:"bytes,2,opt,name=min_stake,json=minStake,proto3" json:"min_stake,omitempty"` } func (x *Params) Reset() { @@ -470,6 +552,13 @@ func (x *Params) GetMaxDelegatedGateways() uint64 { return 0 } +func (x *Params) GetMinStake() *v1beta1.Coin { + if x != nil { + return x.MinStake + } + return nil +} + var File_poktroll_application_params_proto protoreflect.FileDescriptor var file_poktroll_application_params_proto_rawDesc = []byte{ @@ -479,7 +568,9 @@ var file_poktroll_application_params_proto_rawDesc = []byte{ 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xa3, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x71, 0x0a, + 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0xfe, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x71, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x3b, 0xea, 0xde, 0x1f, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, @@ -487,22 +578,28 @@ var file_poktroll_application_params_proto_rawDesc = []byte{ 0x6c, 0x3a, 0x22, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, 0x22, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, - 0x3a, 0x26, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1d, 0x70, 0x6f, 0x6b, 0x74, 0x72, - 0x6f, 0x6c, 0x6c, 0x2f, 0x78, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xc3, 0x01, 0xd8, 0xe2, 0x1e, 0x01, 0x0a, - 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6f, 0x6b, 0x74, 0x72, - 0x6f, 0x6c, 0x6c, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, - 0x02, 0x03, 0x50, 0x41, 0x58, 0xaa, 0x02, 0x14, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca, 0x02, 0x14, 0x50, - 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x5c, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0xe2, 0x02, 0x20, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x5c, 0x41, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x3a, 0x3a, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x59, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x21, + 0xea, 0xde, 0x1f, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0xf2, 0xde, 0x1f, + 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, + 0x22, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x3a, 0x26, 0xe8, 0xa0, 0x1f, + 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1d, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2f, 0x78, + 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x42, 0xc3, 0x01, 0xd8, 0xe2, 0x1e, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, + 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, + 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2f, 0x61, + 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x50, 0x41, 0x58, + 0xaa, 0x02, 0x14, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x41, 0x70, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca, 0x02, 0x14, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x5c, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xe2, 0x02, + 0x20, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x5c, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x15, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x3a, 0x3a, 0x41, 0x70, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -519,14 +616,16 @@ func file_poktroll_application_params_proto_rawDescGZIP() []byte { var file_poktroll_application_params_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_poktroll_application_params_proto_goTypes = []interface{}{ - (*Params)(nil), // 0: poktroll.application.Params + (*Params)(nil), // 0: poktroll.application.Params + (*v1beta1.Coin)(nil), // 1: cosmos.base.v1beta1.Coin } var file_poktroll_application_params_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 1, // 0: poktroll.application.Params.min_stake:type_name -> cosmos.base.v1beta1.Coin + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_poktroll_application_params_proto_init() } diff --git a/api/poktroll/application/tx.pulsar.go b/api/poktroll/application/tx.pulsar.go index 3fe29cb68..866f5acf4 100644 --- a/api/poktroll/application/tx.pulsar.go +++ b/api/poktroll/application/tx.pulsar.go @@ -5403,6 +5403,7 @@ var ( md_MsgUpdateParam protoreflect.MessageDescriptor fd_MsgUpdateParam_authority protoreflect.FieldDescriptor fd_MsgUpdateParam_name protoreflect.FieldDescriptor + fd_MsgUpdateParam_as_int64 protoreflect.FieldDescriptor fd_MsgUpdateParam_as_coin protoreflect.FieldDescriptor ) @@ -5411,6 +5412,7 @@ func init() { md_MsgUpdateParam = File_poktroll_application_tx_proto.Messages().ByName("MsgUpdateParam") fd_MsgUpdateParam_authority = md_MsgUpdateParam.Fields().ByName("authority") fd_MsgUpdateParam_name = md_MsgUpdateParam.Fields().ByName("name") + fd_MsgUpdateParam_as_int64 = md_MsgUpdateParam.Fields().ByName("as_int64") fd_MsgUpdateParam_as_coin = md_MsgUpdateParam.Fields().ByName("as_coin") } @@ -5493,6 +5495,12 @@ func (x *fastReflection_MsgUpdateParam) Range(f func(protoreflect.FieldDescripto } if x.AsType != nil { switch o := x.AsType.(type) { + case *MsgUpdateParam_AsInt64: + v := o.AsInt64 + value := protoreflect.ValueOfInt64(v) + if !f(fd_MsgUpdateParam_as_int64, value) { + return + } case *MsgUpdateParam_AsCoin: v := o.AsCoin value := protoreflect.ValueOfMessage(v.ProtoReflect()) @@ -5520,6 +5528,14 @@ func (x *fastReflection_MsgUpdateParam) Has(fd protoreflect.FieldDescriptor) boo return x.Authority != "" case "poktroll.application.MsgUpdateParam.name": return x.Name != "" + case "poktroll.application.MsgUpdateParam.as_int64": + if x.AsType == nil { + return false + } else if _, ok := x.AsType.(*MsgUpdateParam_AsInt64); ok { + return true + } else { + return false + } case "poktroll.application.MsgUpdateParam.as_coin": if x.AsType == nil { return false @@ -5548,6 +5564,8 @@ func (x *fastReflection_MsgUpdateParam) Clear(fd protoreflect.FieldDescriptor) { x.Authority = "" case "poktroll.application.MsgUpdateParam.name": x.Name = "" + case "poktroll.application.MsgUpdateParam.as_int64": + x.AsType = nil case "poktroll.application.MsgUpdateParam.as_coin": x.AsType = nil default: @@ -5572,6 +5590,14 @@ func (x *fastReflection_MsgUpdateParam) Get(descriptor protoreflect.FieldDescrip case "poktroll.application.MsgUpdateParam.name": value := x.Name return protoreflect.ValueOfString(value) + case "poktroll.application.MsgUpdateParam.as_int64": + if x.AsType == nil { + return protoreflect.ValueOfInt64(int64(0)) + } else if v, ok := x.AsType.(*MsgUpdateParam_AsInt64); ok { + return protoreflect.ValueOfInt64(v.AsInt64) + } else { + return protoreflect.ValueOfInt64(int64(0)) + } case "poktroll.application.MsgUpdateParam.as_coin": if x.AsType == nil { return protoreflect.ValueOfMessage((*v1beta1.Coin)(nil).ProtoReflect()) @@ -5604,6 +5630,9 @@ func (x *fastReflection_MsgUpdateParam) Set(fd protoreflect.FieldDescriptor, val x.Authority = value.Interface().(string) case "poktroll.application.MsgUpdateParam.name": x.Name = value.Interface().(string) + case "poktroll.application.MsgUpdateParam.as_int64": + cv := value.Int() + x.AsType = &MsgUpdateParam_AsInt64{AsInt64: cv} case "poktroll.application.MsgUpdateParam.as_coin": cv := value.Message().Interface().(*v1beta1.Coin) x.AsType = &MsgUpdateParam_AsCoin{AsCoin: cv} @@ -5647,6 +5676,8 @@ func (x *fastReflection_MsgUpdateParam) Mutable(fd protoreflect.FieldDescriptor) panic(fmt.Errorf("field authority of message poktroll.application.MsgUpdateParam is not mutable")) case "poktroll.application.MsgUpdateParam.name": panic(fmt.Errorf("field name of message poktroll.application.MsgUpdateParam is not mutable")) + case "poktroll.application.MsgUpdateParam.as_int64": + panic(fmt.Errorf("field as_int64 of message poktroll.application.MsgUpdateParam is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.application.MsgUpdateParam")) @@ -5664,6 +5695,8 @@ func (x *fastReflection_MsgUpdateParam) NewField(fd protoreflect.FieldDescriptor return protoreflect.ValueOfString("") case "poktroll.application.MsgUpdateParam.name": return protoreflect.ValueOfString("") + case "poktroll.application.MsgUpdateParam.as_int64": + return protoreflect.ValueOfInt64(int64(0)) case "poktroll.application.MsgUpdateParam.as_coin": value := &v1beta1.Coin{} return protoreflect.ValueOfMessage(value.ProtoReflect()) @@ -5685,6 +5718,8 @@ func (x *fastReflection_MsgUpdateParam) WhichOneof(d protoreflect.OneofDescripto return nil } switch x.AsType.(type) { + case *MsgUpdateParam_AsInt64: + return x.Descriptor().Fields().ByName("as_int64") case *MsgUpdateParam_AsCoin: return x.Descriptor().Fields().ByName("as_coin") } @@ -5753,6 +5788,11 @@ func (x *fastReflection_MsgUpdateParam) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } switch x := x.AsType.(type) { + case *MsgUpdateParam_AsInt64: + if x == nil { + break + } + n += 1 + runtime.Sov(uint64(x.AsInt64)) case *MsgUpdateParam_AsCoin: if x == nil { break @@ -5790,6 +5830,10 @@ func (x *fastReflection_MsgUpdateParam) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], x.unknownFields) } switch x := x.AsType.(type) { + case *MsgUpdateParam_AsInt64: + i = runtime.EncodeVarint(dAtA, i, uint64(x.AsInt64)) + i-- + dAtA[i] = 0x18 case *MsgUpdateParam_AsCoin: encoded, err := options.Marshal(x.AsCoin) if err != nil { @@ -5802,7 +5846,7 @@ func (x *fastReflection_MsgUpdateParam) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 } if len(x.Name) > 0 { i -= len(x.Name) @@ -5932,6 +5976,26 @@ func (x *fastReflection_MsgUpdateParam) ProtoMethods() *protoiface.Methods { x.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AsInt64", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.AsType = &MsgUpdateParam_AsInt64{v} + case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AsCoin", wireType) } @@ -6077,8 +6141,8 @@ func (x *fastReflection_MsgUpdateParamResponse) Interface() protoreflect.ProtoMe // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgUpdateParamResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Params != "" { - value := protoreflect.ValueOfString(x.Params) + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) if !f(fd_MsgUpdateParamResponse_params, value) { return } @@ -6099,7 +6163,7 @@ func (x *fastReflection_MsgUpdateParamResponse) Range(f func(protoreflect.FieldD func (x *fastReflection_MsgUpdateParamResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "poktroll.application.MsgUpdateParamResponse.params": - return x.Params != "" + return x.Params != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.application.MsgUpdateParamResponse")) @@ -6117,7 +6181,7 @@ func (x *fastReflection_MsgUpdateParamResponse) Has(fd protoreflect.FieldDescrip func (x *fastReflection_MsgUpdateParamResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "poktroll.application.MsgUpdateParamResponse.params": - x.Params = "" + x.Params = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.application.MsgUpdateParamResponse")) @@ -6136,7 +6200,7 @@ func (x *fastReflection_MsgUpdateParamResponse) Get(descriptor protoreflect.Fiel switch descriptor.FullName() { case "poktroll.application.MsgUpdateParamResponse.params": value := x.Params - return protoreflect.ValueOfString(value) + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.application.MsgUpdateParamResponse")) @@ -6158,7 +6222,7 @@ func (x *fastReflection_MsgUpdateParamResponse) Get(descriptor protoreflect.Fiel func (x *fastReflection_MsgUpdateParamResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "poktroll.application.MsgUpdateParamResponse.params": - x.Params = value.Interface().(string) + x.Params = value.Message().Interface().(*Params) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.application.MsgUpdateParamResponse")) @@ -6180,7 +6244,10 @@ func (x *fastReflection_MsgUpdateParamResponse) Set(fd protoreflect.FieldDescrip func (x *fastReflection_MsgUpdateParamResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "poktroll.application.MsgUpdateParamResponse.params": - panic(fmt.Errorf("field params of message poktroll.application.MsgUpdateParamResponse is not mutable")) + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.application.MsgUpdateParamResponse")) @@ -6195,7 +6262,8 @@ func (x *fastReflection_MsgUpdateParamResponse) Mutable(fd protoreflect.FieldDes func (x *fastReflection_MsgUpdateParamResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "poktroll.application.MsgUpdateParamResponse.params": - return protoreflect.ValueOfString("") + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.application.MsgUpdateParamResponse")) @@ -6265,8 +6333,8 @@ func (x *fastReflection_MsgUpdateParamResponse) ProtoMethods() *protoiface.Metho var n int var l int _ = l - l = len(x.Params) - if l > 0 { + if x.Params != nil { + l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { @@ -6298,10 +6366,17 @@ func (x *fastReflection_MsgUpdateParamResponse) ProtoMethods() *protoiface.Metho i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Params) > 0 { - i -= len(x.Params) - copy(dAtA[i:], x.Params) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Params))) + if x.Params != nil { + encoded, err := options.Marshal(x.Params) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } @@ -6358,7 +6433,7 @@ func (x *fastReflection_MsgUpdateParamResponse) ProtoMethods() *protoiface.Metho if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -6368,23 +6443,27 @@ func (x *fastReflection_MsgUpdateParamResponse) ProtoMethods() *protoiface.Metho } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Params = string(dAtA[iNdEx:postIndex]) + if x.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } iNdEx = postIndex default: iNdEx = preIndex @@ -6891,6 +6970,7 @@ type MsgUpdateParam struct { Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Types that are assignable to AsType: // + // *MsgUpdateParam_AsInt64 // *MsgUpdateParam_AsCoin AsType isMsgUpdateParam_AsType `protobuf_oneof:"asType"` } @@ -6936,6 +7016,13 @@ func (x *MsgUpdateParam) GetAsType() isMsgUpdateParam_AsType { return nil } +func (x *MsgUpdateParam) GetAsInt64() int64 { + if x, ok := x.GetAsType().(*MsgUpdateParam_AsInt64); ok { + return x.AsInt64 + } + return 0 +} + func (x *MsgUpdateParam) GetAsCoin() *v1beta1.Coin { if x, ok := x.GetAsType().(*MsgUpdateParam_AsCoin); ok { return x.AsCoin @@ -6947,10 +7034,16 @@ type isMsgUpdateParam_AsType interface { isMsgUpdateParam_AsType() } +type MsgUpdateParam_AsInt64 struct { + AsInt64 int64 `protobuf:"varint,3,opt,name=as_int64,json=asInt64,proto3,oneof"` +} + type MsgUpdateParam_AsCoin struct { - AsCoin *v1beta1.Coin `protobuf:"bytes,3,opt,name=as_coin,json=asCoin,proto3,oneof"` + AsCoin *v1beta1.Coin `protobuf:"bytes,4,opt,name=as_coin,json=asCoin,proto3,oneof"` } +func (*MsgUpdateParam_AsInt64) isMsgUpdateParam_AsType() {} + func (*MsgUpdateParam_AsCoin) isMsgUpdateParam_AsType() {} type MsgUpdateParamResponse struct { @@ -6958,7 +7051,7 @@ type MsgUpdateParamResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Params string `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` } func (x *MsgUpdateParamResponse) Reset() { @@ -6981,11 +7074,11 @@ func (*MsgUpdateParamResponse) Descriptor() ([]byte, []int) { return file_poktroll_application_tx_proto_rawDescGZIP(), []int{13} } -func (x *MsgUpdateParamResponse) GetParams() string { +func (x *MsgUpdateParamResponse) GetParams() *Params { if x != nil { return x.Params } - return "" + return nil } var File_poktroll_application_tx_proto protoreflect.FileDescriptor @@ -7096,85 +7189,88 @@ var file_poktroll_application_tx_proto_rawDesc = []byte{ 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0xac, 0x01, 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0xc9, 0x01, 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x48, 0x00, - 0x52, 0x06, 0x61, 0x73, 0x43, 0x6f, 0x69, 0x6e, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x08, 0x0a, 0x06, 0x61, 0x73, 0x54, 0x79, - 0x70, 0x65, 0x22, 0x30, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x32, 0xb0, 0x06, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x64, 0x0a, 0x0c, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x25, 0x2e, 0x70, - 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x1a, 0x2d, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x70, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, - 0x67, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x1a, 0x31, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, + 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x08, 0x61, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x07, 0x61, 0x73, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, + 0x34, 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x48, 0x00, 0x52, 0x06, 0x61, + 0x73, 0x43, 0x6f, 0x69, 0x6e, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x08, 0x0a, 0x06, 0x61, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, + 0x4e, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x6f, 0x6b, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x32, + 0xb0, 0x06, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x64, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x25, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2d, + 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, + 0x10, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x29, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x61, 0x6b, - 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x12, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x41, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x2e, 0x70, 0x6f, 0x6b, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x70, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x33, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, + 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x31, 0x2e, 0x70, + 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x70, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x76, 0x0a, 0x12, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, + 0x55, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x1a, 0x33, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x73, + 0x74, 0x61, 0x6b, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x54, 0x6f, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x2a, 0x2e, 0x70, + 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x54, + 0x6f, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x1a, 0x32, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x47, 0x61, 0x74, + 0x65, 0x77, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x15, + 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x47, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x2e, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, + 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x47, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x1a, 0x36, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, + 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x47, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x79, 0x0a, + 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, + 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x1a, 0x34, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x65, 0x72, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x24, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, - 0x73, 0x67, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x11, - 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, - 0x79, 0x12, 0x2a, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x1a, 0x32, 0x2e, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x1a, 0x2c, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, - 0x54, 0x6f, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x7f, 0x0a, 0x15, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x46, - 0x72, 0x6f, 0x6d, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x2e, 0x2e, 0x70, 0x6f, 0x6b, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x46, - 0x72, 0x6f, 0x6d, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x1a, 0x36, 0x2e, 0x70, 0x6f, 0x6b, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x46, - 0x72, 0x6f, 0x6d, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x79, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x41, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x2e, 0x70, 0x6f, 0x6b, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x41, 0x70, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x34, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, - 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, - 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x24, 0x2e, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, + 0x2a, 0x01, 0x42, 0xbf, 0x01, 0xd8, 0xe2, 0x1e, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x1a, 0x2c, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xbf, 0x01, 0xd8, 0xe2, 0x1e, 0x01, 0x0a, 0x18, - 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, - 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2f, 0x61, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x50, 0x41, 0x58, - 0xaa, 0x02, 0x14, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x41, 0x70, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca, 0x02, 0x14, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x5c, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xe2, 0x02, - 0x20, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x5c, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x15, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x3a, 0x3a, 0x41, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x25, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x50, 0x41, 0x58, 0xaa, 0x02, 0x14, 0x50, 0x6f, + 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0xca, 0x02, 0x14, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x5c, 0x41, 0x70, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xe2, 0x02, 0x20, 0x50, 0x6f, 0x6b, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x5c, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x50, + 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x3a, 0x3a, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -7218,25 +7314,26 @@ var file_poktroll_application_tx_proto_depIdxs = []int32{ 17, // 4: poktroll.application.MsgDelegateToGatewayResponse.application:type_name -> poktroll.application.Application 17, // 5: poktroll.application.MsgTransferApplicationResponse.application:type_name -> poktroll.application.Application 15, // 6: poktroll.application.MsgUpdateParam.as_coin:type_name -> cosmos.base.v1beta1.Coin - 0, // 7: poktroll.application.Msg.UpdateParams:input_type -> poktroll.application.MsgUpdateParams - 2, // 8: poktroll.application.Msg.StakeApplication:input_type -> poktroll.application.MsgStakeApplication - 4, // 9: poktroll.application.Msg.UnstakeApplication:input_type -> poktroll.application.MsgUnstakeApplication - 6, // 10: poktroll.application.Msg.DelegateToGateway:input_type -> poktroll.application.MsgDelegateToGateway - 8, // 11: poktroll.application.Msg.UndelegateFromGateway:input_type -> poktroll.application.MsgUndelegateFromGateway - 10, // 12: poktroll.application.Msg.TransferApplication:input_type -> poktroll.application.MsgTransferApplication - 12, // 13: poktroll.application.Msg.UpdateParam:input_type -> poktroll.application.MsgUpdateParam - 1, // 14: poktroll.application.Msg.UpdateParams:output_type -> poktroll.application.MsgUpdateParamsResponse - 3, // 15: poktroll.application.Msg.StakeApplication:output_type -> poktroll.application.MsgStakeApplicationResponse - 5, // 16: poktroll.application.Msg.UnstakeApplication:output_type -> poktroll.application.MsgUnstakeApplicationResponse - 7, // 17: poktroll.application.Msg.DelegateToGateway:output_type -> poktroll.application.MsgDelegateToGatewayResponse - 9, // 18: poktroll.application.Msg.UndelegateFromGateway:output_type -> poktroll.application.MsgUndelegateFromGatewayResponse - 11, // 19: poktroll.application.Msg.TransferApplication:output_type -> poktroll.application.MsgTransferApplicationResponse - 13, // 20: poktroll.application.Msg.UpdateParam:output_type -> poktroll.application.MsgUpdateParamResponse - 14, // [14:21] is the sub-list for method output_type - 7, // [7:14] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 14, // 7: poktroll.application.MsgUpdateParamResponse.params:type_name -> poktroll.application.Params + 0, // 8: poktroll.application.Msg.UpdateParams:input_type -> poktroll.application.MsgUpdateParams + 2, // 9: poktroll.application.Msg.StakeApplication:input_type -> poktroll.application.MsgStakeApplication + 4, // 10: poktroll.application.Msg.UnstakeApplication:input_type -> poktroll.application.MsgUnstakeApplication + 6, // 11: poktroll.application.Msg.DelegateToGateway:input_type -> poktroll.application.MsgDelegateToGateway + 8, // 12: poktroll.application.Msg.UndelegateFromGateway:input_type -> poktroll.application.MsgUndelegateFromGateway + 10, // 13: poktroll.application.Msg.TransferApplication:input_type -> poktroll.application.MsgTransferApplication + 12, // 14: poktroll.application.Msg.UpdateParam:input_type -> poktroll.application.MsgUpdateParam + 1, // 15: poktroll.application.Msg.UpdateParams:output_type -> poktroll.application.MsgUpdateParamsResponse + 3, // 16: poktroll.application.Msg.StakeApplication:output_type -> poktroll.application.MsgStakeApplicationResponse + 5, // 17: poktroll.application.Msg.UnstakeApplication:output_type -> poktroll.application.MsgUnstakeApplicationResponse + 7, // 18: poktroll.application.Msg.DelegateToGateway:output_type -> poktroll.application.MsgDelegateToGatewayResponse + 9, // 19: poktroll.application.Msg.UndelegateFromGateway:output_type -> poktroll.application.MsgUndelegateFromGatewayResponse + 11, // 20: poktroll.application.Msg.TransferApplication:output_type -> poktroll.application.MsgTransferApplicationResponse + 13, // 21: poktroll.application.Msg.UpdateParam:output_type -> poktroll.application.MsgUpdateParamResponse + 15, // [15:22] is the sub-list for method output_type + 8, // [8:15] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_poktroll_application_tx_proto_init() } @@ -7417,6 +7514,7 @@ func file_poktroll_application_tx_proto_init() { } } file_poktroll_application_tx_proto_msgTypes[12].OneofWrappers = []interface{}{ + (*MsgUpdateParam_AsInt64)(nil), (*MsgUpdateParam_AsCoin)(nil), } type x struct{} diff --git a/config.yml b/config.yml index 4ec9a33e0..b8c9aed5c 100644 --- a/config.yml +++ b/config.yml @@ -165,6 +165,10 @@ genesis: application: params: max_delegated_gateways: "7" + min_stake: + # TODO_MAINNET: Determine realistic amount for minimum application stake amount. + amount: "1000000" # 1 POKT + denom: upokt applicationList: - address: pokt1mrqt5f7qh8uxs27cjm9t7v9e74a9vvdnq5jva4 delegatee_gateway_addresses: [] diff --git a/go.mod b/go.mod index 0d0979bb8..91de15f1d 100644 --- a/go.mod +++ b/go.mod @@ -72,7 +72,7 @@ require ( golang.org/x/sync v0.7.0 golang.org/x/text v0.16.0 golang.org/x/tools v0.23.0 - google.golang.org/genproto/googleapis/api v0.0.0-20240709173604-40e1e62336c5 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240709173604-40e1e62336c5 google.golang.org/grpc v1.65.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.4.0 google.golang.org/protobuf v1.34.2 diff --git a/makefiles/params.mk b/makefiles/params.mk index 03d237e13..17faca295 100644 --- a/makefiles/params.mk +++ b/makefiles/params.mk @@ -118,6 +118,23 @@ params_update_gateway_all: ## Update the session module params params_update_gateway_min_stake: ## Update the gateway module min_stake param poktrolld tx authz exec ./tools/scripts/params/gateway_min_stake.json $(PARAM_FLAGS) +### Application Module Params ### +.PHONY: params_get_application +params_get_application: ## Get the application module params + poktrolld query application params --node $(POCKET_NODE) + +.PHONY: params_update_application_all +params_update_application_all: ## Update the application module params + poktrolld tx authz exec ./tools/scripts/params/application_all.json $(PARAM_FLAGS) + +.PHONY: params_update_application_max_delegated_gateways +params_update_application_max_delegated_gateways: ## Update the application module max_delegated_gateways param + poktrolld tx authz exec ./tools/scripts/params/application_max_delegated_gateways.json $(PARAM_FLAGS) + +.PHONY: params_update_application_min_stake +params_update_application_min_stake: ## Update the application module min_stake param + poktrolld tx authz exec ./tools/scripts/params/application_min_stake.json $(PARAM_FLAGS) + .PHONY: params_query_all params_query_all: check_jq ## Query the params from all available modules @for module in $(MODULES); do \ diff --git a/proto/poktroll/application/params.proto b/proto/poktroll/application/params.proto index 74811d61c..08c85159a 100644 --- a/proto/poktroll/application/params.proto +++ b/proto/poktroll/application/params.proto @@ -6,13 +6,18 @@ option (gogoproto.stable_marshaler_all) = true; import "amino/amino.proto"; import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; // Params defines the parameters for the module. message Params { option (amino.name) = "poktroll/x/application/Params"; option (gogoproto.equal) = true; + // max_delegated_gateways defines the maximum number of gateways that a single // application can delegate to. This is used to prevent performance issues // in case the relay ring signature becomes too large. uint64 max_delegated_gateways = 1 [(gogoproto.jsontag) = "max_delegated_gateways", (gogoproto.moretags) = "yaml:\"max_delegated_gateways\""]; + + // min_stake is the minimum stake in upokt that an application must have to remain staked. + cosmos.base.v1beta1.Coin min_stake = 2 [(gogoproto.jsontag) = "min_stake", (gogoproto.moretags) = "yaml:\"min_stake\""]; } diff --git a/proto/poktroll/application/tx.proto b/proto/poktroll/application/tx.proto index 471bb2fb3..229f03808 100644 --- a/proto/poktroll/application/tx.proto +++ b/proto/poktroll/application/tx.proto @@ -107,11 +107,12 @@ message MsgUpdateParam { string name = 2; oneof asType { - cosmos.base.v1beta1.Coin as_coin = 3; + int64 as_int64 = 3; + cosmos.base.v1beta1.Coin as_coin = 4; }; } message MsgUpdateParamResponse { - string params = 1; + Params params = 1; } diff --git a/testutil/integration/suites/param_configs.go b/testutil/integration/suites/param_configs.go index 5141554d2..ca8354fe7 100644 --- a/testutil/integration/suites/param_configs.go +++ b/testutil/integration/suites/param_configs.go @@ -81,6 +81,7 @@ var ( QueryParamsResponse: sharedtypes.QueryParamsResponse{}, }, ParamTypes: map[ParamType]any{ + // TODO_IMPROVE: Add a Uint64 asType instead of using int64 for uint64 params. ParamTypeUint64: sharedtypes.MsgUpdateParam_AsInt64{}, ParamTypeInt64: sharedtypes.MsgUpdateParam_AsInt64{}, ParamTypeString: sharedtypes.MsgUpdateParam_AsString{}, @@ -136,11 +137,19 @@ var ( ParamsMsgs: ModuleParamsMessages{ MsgUpdateParams: apptypes.MsgUpdateParams{}, MsgUpdateParamsResponse: apptypes.MsgUpdateParamsResponse{}, + MsgUpdateParam: apptypes.MsgUpdateParam{}, + MsgUpdateParamResponse: apptypes.MsgUpdateParamResponse{}, QueryParamsRequest: apptypes.QueryParamsRequest{}, QueryParamsResponse: apptypes.QueryParamsResponse{}, }, ValidParams: apptypes.Params{ MaxDelegatedGateways: 999, + MinStake: &ValidActorMinStake, + }, + ParamTypes: map[ParamType]any{ + // TODO_IMPROVE: Add a Uint64 asType instead of using int64 for uint64 params. + ParamTypeUint64: apptypes.MsgUpdateParam_AsInt64{}, + ParamTypeCoin: apptypes.MsgUpdateParam_AsCoin{}, }, DefaultParams: apptypes.DefaultParams(), NewParamClientFn: apptypes.NewQueryClient, diff --git a/tools/scripts/params/application_all.json b/tools/scripts/params/application_all.json new file mode 100644 index 000000000..acbeb3c86 --- /dev/null +++ b/tools/scripts/params/application_all.json @@ -0,0 +1,17 @@ +{ + "body": { + "messages": [ + { + "@type": "/poktroll.application.MsgUpdateParams", + "authority": "pokt10d07y265gmmuvt4z0w9aw880jnsr700j8yv32t", + "params": { + "max_delegated_gateways": "7", + "min_stake": { + "denom": "upokt", + "amount": "1000000" + } + } + } + ] + } +} \ No newline at end of file diff --git a/tools/scripts/params/application_min_stake.json b/tools/scripts/params/application_min_stake.json new file mode 100644 index 000000000..7b21a6f29 --- /dev/null +++ b/tools/scripts/params/application_min_stake.json @@ -0,0 +1,15 @@ +{ + "body": { + "messages": [ + { + "@type": "/poktroll.application.MsgUpdateParam", + "authority": "pokt10d07y265gmmuvt4z0w9aw880jnsr700j8yv32t", + "name": "min_stake", + "as_coin": { + "denom": "upokt", + "amount": "1000000" + } + } + ] + } +} diff --git a/x/application/keeper/msg_server_update_param.go b/x/application/keeper/msg_server_update_param.go index 8a4781f08..1968b774f 100644 --- a/x/application/keeper/msg_server_update_param.go +++ b/x/application/keeper/msg_server_update_param.go @@ -2,17 +2,67 @@ package keeper import ( "context" + "fmt" - sdk "github.com/cosmos/cosmos-sdk/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" - "github.com/pokt-network/poktroll/x/application/types" + apptypes "github.com/pokt-network/poktroll/x/application/types" ) -func (k msgServer) UpdateParam(goCtx context.Context, msg *types.MsgUpdateParam) (*types.MsgUpdateParamResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) +func (k msgServer) UpdateParam(ctx context.Context, msg *apptypes.MsgUpdateParam) (*apptypes.MsgUpdateParamResponse, error) { + logger := k.logger.With( + "method", "UpdateParam", + "param_name", msg.Name, + ) - // TODO: Handling the message - _ = ctx + if err := msg.ValidateBasic(); err != nil { + return nil, err + } - return &types.MsgUpdateParamResponse{}, nil + if k.GetAuthority() != msg.Authority { + return nil, status.Error( + codes.InvalidArgument, + apptypes.ErrAppInvalidSigner.Wrapf( + "invalid authority; expected %s, got %s", + k.GetAuthority(), msg.Authority, + ).Error(), + ) + } + + params := k.GetParams(ctx) + + switch msg.Name { + // TODO_IMPROVE: Add a Uint64 asType instead of using int64 for uint64 params. + case apptypes.ParamMaxDelegatedGateways: + logger = logger.With("param_value", msg.GetAsInt64()) + params.MaxDelegatedGateways = uint64(msg.GetAsInt64()) + case apptypes.ParamMinStake: + logger = logger.With("param_value", msg.GetAsCoin()) + params.MinStake = msg.GetAsCoin() + default: + return nil, status.Error( + codes.InvalidArgument, + apptypes.ErrAppParamInvalid.Wrapf("unsupported param %q", msg.Name).Error(), + ) + } + + // Perform a global validation on all params, which includes the updated param. + // This is needed to ensure that the updated param is valid in the context of all other params. + if err := params.Validate(); err != nil { + return nil, status.Error(codes.InvalidArgument, err.Error()) + + } + + if err := k.SetParams(ctx, params); err != nil { + err = fmt.Errorf("unable to set params: %w", err) + logger.Error(err.Error()) + return nil, status.Error(codes.Internal, err.Error()) + } + + updatedParams := k.GetParams(ctx) + + return &apptypes.MsgUpdateParamResponse{ + Params: &updatedParams, + }, nil } diff --git a/x/application/keeper/msg_server_update_param_test.go b/x/application/keeper/msg_server_update_param_test.go new file mode 100644 index 000000000..8f8b5ab03 --- /dev/null +++ b/x/application/keeper/msg_server_update_param_test.go @@ -0,0 +1,68 @@ +package keeper_test + +import ( + "testing" + + cosmostypes "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/stretchr/testify/require" + + "github.com/pokt-network/poktroll/app/volatile" + testkeeper "github.com/pokt-network/poktroll/testutil/keeper" + apptypes "github.com/pokt-network/poktroll/x/application/types" +) + +func TestMsgUpdateParam_UpdateMaxDelegatedGatewaysOnly(t *testing.T) { + expectedMaxDelegatedGateways := uint64(999) + + // Set the parameters to their default values + k, msgSrv, ctx := setupMsgServer(t) + defaultParams := apptypes.DefaultParams() + require.NoError(t, k.SetParams(ctx, defaultParams)) + + // Ensure the default values are different from the new values we want to set + require.NotEqual(t, expectedMaxDelegatedGateways, defaultParams.MaxDelegatedGateways) + + // Update the max delegated gateways + updateParamMsg := &apptypes.MsgUpdateParam{ + Authority: authtypes.NewModuleAddress(govtypes.ModuleName).String(), + Name: apptypes.ParamMaxDelegatedGateways, + AsType: &apptypes.MsgUpdateParam_AsInt64{AsInt64: int64(expectedMaxDelegatedGateways)}, + } + res, err := msgSrv.UpdateParam(ctx, updateParamMsg) + require.NoError(t, err) + + require.NotEqual(t, defaultParams.MaxDelegatedGateways, res.Params.MaxDelegatedGateways) + require.Equal(t, expectedMaxDelegatedGateways, res.Params.MaxDelegatedGateways) + + // Ensure the other parameters are unchanged + testkeeper.AssertDefaultParamsEqualExceptFields(t, &defaultParams, res.Params, string(apptypes.KeyMaxDelegatedGateways)) +} + +func TestMsgUpdateParam_UpdateMinStakeOnly(t *testing.T) { + expectedMinStake := cosmostypes.NewInt64Coin(volatile.DenomuPOKT, 420) + + // Set the parameters to their default values + k, msgSrv, ctx := setupMsgServer(t) + defaultParams := apptypes.DefaultParams() + require.NoError(t, k.SetParams(ctx, defaultParams)) + + // Ensure the default values are different from the new values we want to set + require.NotEqual(t, expectedMinStake, defaultParams.MinStake) + + // Update the min relay difficulty bits + updateParamMsg := &apptypes.MsgUpdateParam{ + Authority: authtypes.NewModuleAddress(govtypes.ModuleName).String(), + Name: apptypes.ParamMinStake, + AsType: &apptypes.MsgUpdateParam_AsCoin{AsCoin: &expectedMinStake}, + } + res, err := msgSrv.UpdateParam(ctx, updateParamMsg) + require.NoError(t, err) + + require.NotEqual(t, defaultParams.MinStake, res.Params.MinStake) + require.Equal(t, expectedMinStake.Amount, res.Params.MinStake.Amount) + + // Ensure the other parameters are unchanged + testkeeper.AssertDefaultParamsEqualExceptFields(t, &defaultParams, res.Params, string(apptypes.KeyMinStake)) +} diff --git a/x/application/keeper/msg_update_params_test.go b/x/application/keeper/msg_update_params_test.go index ee7fb3879..0580c988e 100644 --- a/x/application/keeper/msg_update_params_test.go +++ b/x/application/keeper/msg_update_params_test.go @@ -31,14 +31,14 @@ func TestMsgUpdateParams(t *testing.T) { expectedErrMsg: "invalid authority", }, { - desc: "send empty params", + desc: "invalid: send empty params", input: &types.MsgUpdateParams{ Authority: k.GetAuthority(), Params: types.Params{}, }, shouldError: true, - expectedErrMsg: "invalid MaxDelegatedGateways parameter", + expectedErrMsg: "max_delegated_gateways must be greater than 0", }, { desc: "valid: send default params", diff --git a/x/application/keeper/params_test.go b/x/application/keeper/params_test.go index ae438b984..d5f7b5f43 100644 --- a/x/application/keeper/params_test.go +++ b/x/application/keeper/params_test.go @@ -3,8 +3,11 @@ package keeper_test import ( "testing" + "cosmossdk.io/math" + cosmostypes "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" + "github.com/pokt-network/poktroll/app/volatile" keepertest "github.com/pokt-network/poktroll/testutil/keeper" "github.com/pokt-network/poktroll/x/application/types" ) @@ -16,3 +19,86 @@ func TestGetParams(t *testing.T) { require.NoError(t, k.SetParams(ctx, params)) require.EqualValues(t, params, k.GetParams(ctx)) } + +func TestParams_ValidateMaxDelegatedGateways(t *testing.T) { + tests := []struct { + desc string + maxDelegatedGateways any + expectedErr error + }{ + { + desc: "invalid type", + maxDelegatedGateways: "0", + expectedErr: types.ErrAppParamInvalid.Wrap("invalid parameter type: string"), + }, + { + desc: "MaxDelegatedGateways less than 1", + maxDelegatedGateways: uint64(0), + expectedErr: types.ErrAppParamInvalid.Wrapf("max_delegated_gateways must be greater than 0: got %d", 0), + }, + { + desc: "valid MaxDelegatedGateways", + maxDelegatedGateways: types.DefaultMaxDelegatedGateways, + }, + } + + for _, test := range tests { + t.Run(test.desc, func(t *testing.T) { + err := types.ValidateMaxDelegatedGateways(test.maxDelegatedGateways) + if test.expectedErr != nil { + require.ErrorContains(t, err, test.expectedErr.Error()) + } else { + require.NoError(t, err) + } + }) + } +} + +func TestParams_ValidateMinStake(t *testing.T) { + tests := []struct { + desc string + minStake any + expectedErr error + }{ + { + desc: "invalid type", + minStake: "0", + expectedErr: types.ErrAppParamInvalid.Wrapf("invalid parameter type: string"), + }, + { + desc: "MinStake with invalid denom", + minStake: &cosmostypes.Coin{ + Denom: "💩coin", + Amount: math.NewInt(1), + }, + expectedErr: types.ErrAppParamInvalid.Wrapf( + "invalid min_stake denom %q; expected %q", + "💩coin", volatile.DenomuPOKT, + ), + }, + { + desc: "MinStake less than zero", + minStake: &cosmostypes.Coin{ + Denom: volatile.DenomuPOKT, + Amount: math.NewInt(-1), + }, + expectedErr: types.ErrAppParamInvalid.Wrapf("invalid min_stake amount: -1%s <= 0", volatile.DenomuPOKT), + }, + { + desc: "valid MinStake", + minStake: &types.DefaultMinStake, + expectedErr: nil, + }, + } + + for _, test := range tests { + t.Run(test.desc, func(t *testing.T) { + err := types.ValidateMinStake(test.minStake) + if test.expectedErr != nil { + require.ErrorContains(t, err, test.expectedErr.Error()) + } else { + require.NoError(t, err) + } + }) + } +} diff --git a/x/application/types/errors.go b/x/application/types/errors.go index f2f383440..46bafde4f 100644 --- a/x/application/types/errors.go +++ b/x/application/types/errors.go @@ -6,19 +6,19 @@ import sdkerrors "cosmossdk.io/errors" // x/application module sentinel errors var ( - ErrAppInvalidSigner = sdkerrors.Register(ModuleName, 1100, "expected gov account as only signer for proposal message") - ErrAppInvalidStake = sdkerrors.Register(ModuleName, 1101, "invalid application stake") - ErrAppInvalidAddress = sdkerrors.Register(ModuleName, 1102, "invalid application address") - ErrAppUnauthorized = sdkerrors.Register(ModuleName, 1103, "unauthorized application signer") - ErrAppNotFound = sdkerrors.Register(ModuleName, 1104, "application not found") - ErrAppInvalidServiceConfigs = sdkerrors.Register(ModuleName, 1106, "invalid service configs") - ErrAppGatewayNotFound = sdkerrors.Register(ModuleName, 1107, "gateway not found") - ErrAppInvalidGatewayAddress = sdkerrors.Register(ModuleName, 1108, "invalid gateway address") - ErrAppAlreadyDelegated = sdkerrors.Register(ModuleName, 1109, "application already delegated to gateway") - ErrAppMaxDelegatedGateways = sdkerrors.Register(ModuleName, 1110, "maximum number of delegated gateways reached") - ErrAppInvalidMaxDelegatedGateways = sdkerrors.Register(ModuleName, 1111, "invalid MaxDelegatedGateways parameter") - ErrAppNotDelegated = sdkerrors.Register(ModuleName, 1112, "application not delegated to gateway") - ErrAppIsUnstaking = sdkerrors.Register(ModuleName, 1113, "application is in unbonding period") - ErrAppDuplicateAddress = sdkerrors.Register(ModuleName, 1114, "duplicate application address") - ErrAppHasPendingTransfer = sdkerrors.Register(ModuleName, 1115, "application is in transfer period") + ErrAppInvalidSigner = sdkerrors.Register(ModuleName, 1100, "expected gov account as only signer for proposal message") + ErrAppInvalidStake = sdkerrors.Register(ModuleName, 1101, "invalid application stake") + ErrAppInvalidAddress = sdkerrors.Register(ModuleName, 1102, "invalid application address") + ErrAppUnauthorized = sdkerrors.Register(ModuleName, 1103, "unauthorized application signer") + ErrAppNotFound = sdkerrors.Register(ModuleName, 1104, "application not found") + ErrAppInvalidServiceConfigs = sdkerrors.Register(ModuleName, 1106, "invalid service configs") + ErrAppGatewayNotFound = sdkerrors.Register(ModuleName, 1107, "gateway not found") + ErrAppInvalidGatewayAddress = sdkerrors.Register(ModuleName, 1108, "invalid gateway address") + ErrAppAlreadyDelegated = sdkerrors.Register(ModuleName, 1109, "application already delegated to gateway") + ErrAppMaxDelegatedGateways = sdkerrors.Register(ModuleName, 1110, "maximum number of delegated gateways reached") + ErrAppNotDelegated = sdkerrors.Register(ModuleName, 1111, "application not delegated to gateway") + ErrAppIsUnstaking = sdkerrors.Register(ModuleName, 1112, "application is in unbonding period") + ErrAppDuplicateAddress = sdkerrors.Register(ModuleName, 1113, "duplicate application address") + ErrAppHasPendingTransfer = sdkerrors.Register(ModuleName, 1114, "application is in transfer period") + ErrAppParamInvalid = sdkerrors.Register(ModuleName, 1115, "the provided param is invalid") ) diff --git a/x/application/types/genesis_test.go b/x/application/types/genesis_test.go index 36d0f4e4f..8c7214747 100644 --- a/x/application/types/genesis_test.go +++ b/x/application/types/genesis_test.go @@ -38,9 +38,7 @@ func TestGenesisState_Validate(t *testing.T) { { desc: "valid genesis state", genState: &types.GenesisState{ - Params: types.Params{ - MaxDelegatedGateways: 7, - }, + Params: types.DefaultParams(), ApplicationList: []types.Application{ { Address: addr1, @@ -62,9 +60,7 @@ func TestGenesisState_Validate(t *testing.T) { { desc: "invalid - zero app stake", genState: &types.GenesisState{ - Params: types.Params{ - MaxDelegatedGateways: 7, - }, + Params: types.DefaultParams(), ApplicationList: []types.Application{ { Address: addr1, @@ -108,9 +104,7 @@ func TestGenesisState_Validate(t *testing.T) { { desc: "invalid - wrong stake denom", genState: &types.GenesisState{ - Params: types.Params{ - MaxDelegatedGateways: 7, - }, + Params: types.DefaultParams(), ApplicationList: []types.Application{ { Address: addr1, @@ -131,9 +125,7 @@ func TestGenesisState_Validate(t *testing.T) { { desc: "invalid - missing denom", genState: &types.GenesisState{ - Params: types.Params{ - MaxDelegatedGateways: 7, - }, + Params: types.DefaultParams(), ApplicationList: []types.Application{ { Address: addr1, @@ -154,9 +146,7 @@ func TestGenesisState_Validate(t *testing.T) { { desc: "invalid - due to duplicated app address", genState: &types.GenesisState{ - Params: types.Params{ - MaxDelegatedGateways: 7, - }, + Params: types.DefaultParams(), ApplicationList: []types.Application{ { Address: addr1, @@ -177,9 +167,7 @@ func TestGenesisState_Validate(t *testing.T) { { desc: "invalid - due to nil app stake", genState: &types.GenesisState{ - Params: types.Params{ - MaxDelegatedGateways: 7, - }, + Params: types.DefaultParams(), ApplicationList: []types.Application{ { Address: addr1, @@ -200,9 +188,7 @@ func TestGenesisState_Validate(t *testing.T) { { desc: "invalid - due to missing app stake", genState: &types.GenesisState{ - Params: types.Params{ - MaxDelegatedGateways: 7, - }, + Params: types.DefaultParams(), ApplicationList: []types.Application{ { Address: addr1, @@ -223,9 +209,7 @@ func TestGenesisState_Validate(t *testing.T) { { desc: "invalid - due to invalid delegatee pub key", genState: &types.GenesisState{ - Params: types.Params{ - MaxDelegatedGateways: 7, - }, + Params: types.DefaultParams(), ApplicationList: []types.Application{ { Address: addr1, @@ -246,9 +230,7 @@ func TestGenesisState_Validate(t *testing.T) { { desc: "invalid - due to invalid delegatee pub keys", genState: &types.GenesisState{ - Params: types.Params{ - MaxDelegatedGateways: 7, - }, + Params: types.DefaultParams(), ApplicationList: []types.Application{ { Address: addr1, @@ -269,9 +251,7 @@ func TestGenesisState_Validate(t *testing.T) { { desc: "invalid - service config not present", genState: &types.GenesisState{ - Params: types.Params{ - MaxDelegatedGateways: 7, - }, + Params: types.DefaultParams(), ApplicationList: []types.Application{ { Address: addr1, @@ -286,9 +266,7 @@ func TestGenesisState_Validate(t *testing.T) { { desc: "invalid - empty service config", genState: &types.GenesisState{ - Params: types.Params{ - MaxDelegatedGateways: 7, - }, + Params: types.DefaultParams(), ApplicationList: []types.Application{ { Address: addr1, @@ -303,9 +281,7 @@ func TestGenesisState_Validate(t *testing.T) { { desc: "invalid - service ID too long", genState: &types.GenesisState{ - Params: types.Params{ - MaxDelegatedGateways: 7, - }, + Params: types.DefaultParams(), ApplicationList: []types.Application{ { Address: addr1, @@ -322,9 +298,7 @@ func TestGenesisState_Validate(t *testing.T) { { desc: "invalid - service ID with invalid characters", genState: &types.GenesisState{ - Params: types.Params{ - MaxDelegatedGateways: 7, - }, + Params: types.DefaultParams(), ApplicationList: []types.Application{ { Address: addr1, @@ -350,6 +324,7 @@ func TestGenesisState_Validate(t *testing.T) { { desc: "duplicated application", genState: &types.GenesisState{ + Params: types.DefaultParams(), ApplicationList: []types.Application{ { Address: addr1, diff --git a/x/application/types/message_update_param.go b/x/application/types/message_update_param.go index df4e1cb5f..2f71cdac0 100644 --- a/x/application/types/message_update_param.go +++ b/x/application/types/message_update_param.go @@ -14,6 +14,8 @@ func NewMsgUpdateParam(authority string, name string, asType any) *MsgUpdatePara var asTypeIface isMsgUpdateParam_AsType switch t := asType.(type) { + case uint64: + asTypeIface = &MsgUpdateParam_AsInt64{AsInt64: int64(t)} case *cosmostypes.Coin: asTypeIface = &MsgUpdateParam_AsCoin{AsCoin: t} default: @@ -32,5 +34,45 @@ func (msg *MsgUpdateParam) ValidateBasic() error { if err != nil { return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid authority address (%s)", err) } + + // Parameter value MUST NOT be nil. + if msg.AsType == nil { + return ErrAppParamInvalid.Wrapf("missing param AsType for parameter %q", msg.Name) + } + + // Parameter name MUST be supported by this module. + switch msg.Name { + case ParamMaxDelegatedGateways: + if err := msg.paramTypeIsUint64(); err != nil { + return err + } + return ValidateMaxDelegatedGateways(uint64(msg.GetAsInt64())) + case ParamMinStake: + if err := msg.paramTypeIsCoin(); err != nil { + return err + } + return ValidateMinStake(msg.GetAsCoin()) + default: + return ErrAppParamInvalid.Wrapf("unsupported param %q", msg.Name) + } +} + +func (msg *MsgUpdateParam) paramTypeIsUint64() error { + if _, ok := msg.AsType.(*MsgUpdateParam_AsInt64); !ok { + return ErrAppParamInvalid.Wrapf(""+ + "invalid type for param %q; expected %T, got %T", + msg.Name, &MsgUpdateParam_AsInt64{}, msg.AsType, + ) + } + return nil +} + +func (msg *MsgUpdateParam) paramTypeIsCoin() error { + if _, ok := msg.AsType.(*MsgUpdateParam_AsCoin); !ok { + return ErrAppParamInvalid.Wrapf(""+ + "invalid type for param %q; expected %T, got %T", + msg.Name, &MsgUpdateParam_AsCoin{}, msg.AsType, + ) + } return nil } diff --git a/x/application/types/message_update_param_test.go b/x/application/types/message_update_param_test.go index b72a6147b..9c4e45596 100644 --- a/x/application/types/message_update_param_test.go +++ b/x/application/types/message_update_param_test.go @@ -16,15 +16,27 @@ func TestMsgUpdateParam_ValidateBasic(t *testing.T) { err error }{ { - name: "invalid address", + name: "invalid: authority address invalid", msg: MsgUpdateParam{ Authority: "invalid_address", + Name: "", + AsType: &MsgUpdateParam_AsCoin{AsCoin: &DefaultMinStake}, }, err: sdkerrors.ErrInvalidAddress, }, { - name: "valid address", + name: "invalid: param name incorrect (non-existent)", msg: MsgUpdateParam{ Authority: sample.AccAddress(), + Name: "non_existent", + AsType: &MsgUpdateParam_AsCoin{AsCoin: nil}, + }, + err: ErrAppParamInvalid, + }, { + name: "valid: correct authority, param name, and type", + msg: MsgUpdateParam{ + Authority: sample.AccAddress(), + Name: ParamMinStake, + AsType: &MsgUpdateParam_AsCoin{AsCoin: &DefaultMinStake}, }, }, } diff --git a/x/application/types/params.go b/x/application/types/params.go index fc990971b..240c7ecd2 100644 --- a/x/application/types/params.go +++ b/x/application/types/params.go @@ -1,19 +1,23 @@ package types import ( - "fmt" - + cosmostypes "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" -) -const ParamMaxDelegatedGateways = "max_delegated_gateways" + "github.com/pokt-network/poktroll/app/volatile" +) var ( _ paramtypes.ParamSet = (*Params)(nil) - KeyMaxDelegatedGateways = []byte("MaxDelegatedGateways") + KeyMaxDelegatedGateways = []byte("MaxDelegatedGateways") + ParamMaxDelegatedGateways = "max_delegated_gateways" // TODO_MAINNET: Determine the default value DefaultMaxDelegatedGateways uint64 = 7 + KeyMinStake = []byte("MinStake") + ParamMinStake = "min_stake" + // TODO_MAINNET: Determine the default value + DefaultMinStake = cosmostypes.NewInt64Coin(volatile.DenomuPOKT, 1000000) // 1 POKT ) // ParamKeyTable the param key table for launch module @@ -22,44 +26,75 @@ func ParamKeyTable() paramtypes.KeyTable { } // NewParams creates a new Params instance -func NewParams(maxDelegatedGateways uint64) Params { +func NewParams(maxDelegatedGateways uint64, minStake *cosmostypes.Coin) Params { return Params{ MaxDelegatedGateways: maxDelegatedGateways, + MinStake: minStake, } } // DefaultParams returns a default set of parameters func DefaultParams() Params { - return NewParams(DefaultMaxDelegatedGateways) + return NewParams(DefaultMaxDelegatedGateways, &DefaultMinStake) } // ParamSetPairs get the params.ParamSet func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { return paramtypes.ParamSetPairs{ - paramtypes.NewParamSetPair(KeyMaxDelegatedGateways, &p.MaxDelegatedGateways, validateMaxDelegatedGateways), + paramtypes.NewParamSetPair(KeyMaxDelegatedGateways, &p.MaxDelegatedGateways, ValidateMaxDelegatedGateways), + paramtypes.NewParamSetPair(KeyMinStake, &p.MinStake, ValidateMinStake), } } // Validate validates the set of params func (p Params) Validate() error { - if err := validateMaxDelegatedGateways(p.MaxDelegatedGateways); err != nil { + if err := ValidateMaxDelegatedGateways(p.MaxDelegatedGateways); err != nil { + return err + } + + if err := ValidateMinStake(p.MinStake); err != nil { return err } return nil } -// validateMaxDelegatedGateways validates the MaxDelegatedGateways param -func validateMaxDelegatedGateways(v interface{}) error { - maxDelegatedGateways, ok := v.(uint64) +// ValidateMaxDelegatedGateways validates the MaxDelegatedGateways param +func ValidateMaxDelegatedGateways(maxDelegatedGatewaysAny any) error { + maxDelegatedGateways, ok := maxDelegatedGatewaysAny.(uint64) if !ok { - return fmt.Errorf("invalid parameter type: %T", v) + return ErrAppParamInvalid.Wrapf("invalid parameter type: %T", maxDelegatedGatewaysAny) } // Hard-coding a value of 1 because we never expect this to change. - // If an application choses to delegate, at least one is required. + // If an application chooses to delegate, at least one is required. if maxDelegatedGateways < 1 { - return ErrAppInvalidMaxDelegatedGateways.Wrapf("MaxDelegatedGateways param < 1: got %d", maxDelegatedGateways) + return ErrAppParamInvalid.Wrapf("max_delegated_gateways must be greater than 0: got %d", maxDelegatedGateways) + } + + return nil +} + +// ValidateMinStake validates the MinStake param +func ValidateMinStake(minStakeAny any) error { + minStakeCoin, ok := minStakeAny.(*cosmostypes.Coin) + if !ok { + return ErrAppParamInvalid.Wrapf("invalid parameter type: %T", minStakeAny) + } + + if minStakeCoin == nil { + return ErrAppParamInvalid.Wrapf("missing min_stake") + } + + if minStakeCoin.Denom != volatile.DenomuPOKT { + return ErrAppParamInvalid.Wrapf( + "invalid min_stake denom %q; expected %q", + minStakeCoin.Denom, volatile.DenomuPOKT, + ) + } + + if minStakeCoin.IsZero() || minStakeCoin.IsNegative() { + return ErrAppParamInvalid.Wrapf("invalid min_stake amount: %s <= 0", minStakeCoin) } return nil diff --git a/x/application/types/params.pb.go b/x/application/types/params.pb.go index 83ea72845..c1296fd8b 100644 --- a/x/application/types/params.pb.go +++ b/x/application/types/params.pb.go @@ -5,6 +5,7 @@ package types import ( fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" @@ -30,6 +31,8 @@ type Params struct { // application can delegate to. This is used to prevent performance issues // in case the relay ring signature becomes too large. MaxDelegatedGateways uint64 `protobuf:"varint,1,opt,name=max_delegated_gateways,json=maxDelegatedGateways,proto3" json:"max_delegated_gateways" yaml:"max_delegated_gateways"` + // min_stake is the minimum stake in upokt that an application must have to remain staked. + MinStake *types.Coin `protobuf:"bytes,2,opt,name=min_stake,json=minStake,proto3" json:"min_stake" yaml:"min_stake"` } func (m *Params) Reset() { *m = Params{} } @@ -68,6 +71,13 @@ func (m *Params) GetMaxDelegatedGateways() uint64 { return 0 } +func (m *Params) GetMinStake() *types.Coin { + if m != nil { + return m.MinStake + } + return nil +} + func init() { proto.RegisterType((*Params)(nil), "poktroll.application.Params") } @@ -75,23 +85,28 @@ func init() { func init() { proto.RegisterFile("poktroll/application/params.proto", fileDescriptor_16533d77d399ef60) } var fileDescriptor_16533d77d399ef60 = []byte{ - // 248 bytes of a gzipped FileDescriptorProto + // 335 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2c, 0xc8, 0xcf, 0x2e, 0x29, 0xca, 0xcf, 0xc9, 0xd1, 0x4f, 0x2c, 0x28, 0xc8, 0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, 0x33, + 0xcf, 0x49, 0xf1, 0xd5, 0x3d, 0x79, 0x84, 0xfa, 0x4f, 0xf7, 0xe4, 0x05, 0xa0, 0x76, 0xc2, 0x84, + 0x94, 0x82, 0x38, 0x72, 0x33, 0xf3, 0x82, 0x41, 0x4c, 0x2b, 0xb5, 0x17, 0x0b, 0xe4, 0x19, 0xbb, + 0x9e, 0x6f, 0xd0, 0x92, 0x85, 0x87, 0x71, 0x05, 0x4a, 0x28, 0x43, 0x7c, 0xed, 0x14, 0x74, 0xe2, + 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x37, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, + 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x99, 0xa4, 0x67, + 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x83, 0xcc, 0xd1, 0xcd, 0x4b, 0x2d, 0x29, + 0xcf, 0x2f, 0xca, 0xd6, 0xc7, 0x61, 0x68, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0x38, 0x6c, + 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x81, 0x50, 0x13, 0x0c, 0xdf, 0x01, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -116,6 +131,9 @@ func (this *Params) Equal(that interface{}) bool { if this.MaxDelegatedGateways != that1.MaxDelegatedGateways { return false } + if !this.MinStake.Equal(that1.MinStake) { + return false + } return true } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -138,6 +156,18 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.MinStake != nil { + { + size, err := m.MinStake.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } if m.MaxDelegatedGateways != 0 { i = encodeVarintParams(dAtA, i, uint64(m.MaxDelegatedGateways)) i-- @@ -166,6 +196,10 @@ func (m *Params) Size() (n int) { if m.MaxDelegatedGateways != 0 { n += 1 + sovParams(uint64(m.MaxDelegatedGateways)) } + if m.MinStake != nil { + l = m.MinStake.Size() + n += 1 + l + sovParams(uint64(l)) + } return n } @@ -223,6 +257,42 @@ func (m *Params) Unmarshal(dAtA []byte) error { break } } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinStake", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MinStake == nil { + m.MinStake = &types.Coin{} + } + if err := m.MinStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) diff --git a/x/application/types/tx.pb.go b/x/application/types/tx.pb.go index 0b8e05b5d..557ef57a4 100644 --- a/x/application/types/tx.pb.go +++ b/x/application/types/tx.pb.go @@ -549,6 +549,7 @@ type MsgUpdateParam struct { Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Types that are valid to be assigned to AsType: // + // *MsgUpdateParam_AsInt64 // *MsgUpdateParam_AsCoin AsType isMsgUpdateParam_AsType `protobuf_oneof:"asType"` } @@ -588,11 +589,15 @@ type isMsgUpdateParam_AsType interface { Size() int } +type MsgUpdateParam_AsInt64 struct { + AsInt64 int64 `protobuf:"varint,3,opt,name=as_int64,json=asInt64,proto3,oneof" json:"as_int64,omitempty"` +} type MsgUpdateParam_AsCoin struct { - AsCoin *types.Coin `protobuf:"bytes,3,opt,name=as_coin,json=asCoin,proto3,oneof" json:"as_coin,omitempty"` + AsCoin *types.Coin `protobuf:"bytes,4,opt,name=as_coin,json=asCoin,proto3,oneof" json:"as_coin,omitempty"` } -func (*MsgUpdateParam_AsCoin) isMsgUpdateParam_AsType() {} +func (*MsgUpdateParam_AsInt64) isMsgUpdateParam_AsType() {} +func (*MsgUpdateParam_AsCoin) isMsgUpdateParam_AsType() {} func (m *MsgUpdateParam) GetAsType() isMsgUpdateParam_AsType { if m != nil { @@ -615,6 +620,13 @@ func (m *MsgUpdateParam) GetName() string { return "" } +func (m *MsgUpdateParam) GetAsInt64() int64 { + if x, ok := m.GetAsType().(*MsgUpdateParam_AsInt64); ok { + return x.AsInt64 + } + return 0 +} + func (m *MsgUpdateParam) GetAsCoin() *types.Coin { if x, ok := m.GetAsType().(*MsgUpdateParam_AsCoin); ok { return x.AsCoin @@ -625,12 +637,13 @@ func (m *MsgUpdateParam) GetAsCoin() *types.Coin { // XXX_OneofWrappers is for the internal use of the proto package. func (*MsgUpdateParam) XXX_OneofWrappers() []interface{} { return []interface{}{ + (*MsgUpdateParam_AsInt64)(nil), (*MsgUpdateParam_AsCoin)(nil), } } type MsgUpdateParamResponse struct { - Params string `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` } func (m *MsgUpdateParamResponse) Reset() { *m = MsgUpdateParamResponse{} } @@ -662,11 +675,11 @@ func (m *MsgUpdateParamResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParamResponse proto.InternalMessageInfo -func (m *MsgUpdateParamResponse) GetParams() string { +func (m *MsgUpdateParamResponse) GetParams() *Params { if m != nil { return m.Params } - return "" + return nil } func init() { @@ -689,61 +702,63 @@ func init() { func init() { proto.RegisterFile("poktroll/application/tx.proto", fileDescriptor_bed224e38ab1cc6d) } var fileDescriptor_bed224e38ab1cc6d = []byte{ - // 861 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcf, 0x4f, 0xe3, 0x46, - 0x14, 0x8e, 0x37, 0xdd, 0xec, 0xe6, 0x65, 0x9b, 0x5d, 0x9c, 0x00, 0xc1, 0x05, 0x13, 0xac, 0xb6, - 0x82, 0x14, 0xec, 0x26, 0x20, 0x24, 0x72, 0x41, 0x84, 0xfe, 0x3c, 0x44, 0xaa, 0x0c, 0xbd, 0xf4, - 0x82, 0x26, 0xc9, 0x60, 0x2c, 0x12, 0x8f, 0xe5, 0x31, 0x81, 0x9c, 0x5a, 0xf5, 0xd8, 0x53, 0xff, - 0x8a, 0xaa, 0xaa, 0x7a, 0xc8, 0xa1, 0x97, 0xfe, 0x01, 0x95, 0xb8, 0x15, 0xf5, 0xc4, 0xa9, 0xaa, - 0xc2, 0x81, 0x7f, 0xa3, 0xb2, 0x3d, 0x76, 0x1c, 0xc7, 0x29, 0xa6, 0xe2, 0xb0, 0x17, 0xf0, 0xcc, - 0x7c, 0xef, 0xbd, 0xef, 0xfb, 0x9e, 0xf3, 0x3c, 0xb0, 0x62, 0x92, 0x73, 0xdb, 0x22, 0xdd, 0xae, - 0x82, 0x4c, 0xb3, 0xab, 0xb7, 0x91, 0xad, 0x13, 0x43, 0xb1, 0xaf, 0x64, 0xd3, 0x22, 0x36, 0xe1, - 0x8b, 0xfe, 0xb1, 0x1c, 0x3a, 0x16, 0xe6, 0x50, 0x4f, 0x37, 0x88, 0xe2, 0xfe, 0xf5, 0x80, 0xc2, - 0x52, 0x9b, 0xd0, 0x1e, 0xa1, 0x27, 0xee, 0x4a, 0xf1, 0x16, 0xec, 0x48, 0xf4, 0x56, 0x4a, 0x0b, - 0x51, 0xac, 0xf4, 0xab, 0x2d, 0x6c, 0xa3, 0xaa, 0xd2, 0x26, 0xba, 0xc1, 0xce, 0x17, 0xd9, 0x79, - 0x8f, 0x6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 0xb9, 0xe9, 0xb1, 0x59, 0x99, 0x99, 0x69, 0x0a, 0x2b, 0xd4, 0x92, 0x63, 0x83, 0xa2, - 0xdf, 0xc2, 0x7c, 0xfc, 0x74, 0x92, 0xff, 0x43, 0x42, 0x0c, 0x5e, 0xd8, 0x7d, 0x1c, 0x3e, 0x20, - 0x30, 0x80, 0x42, 0xdc, 0x34, 0xd9, 0x9c, 0x99, 0x2e, 0x06, 0x2d, 0xec, 0x3c, 0x06, 0x1d, 0x94, - 0x46, 0x90, 0x0b, 0xff, 0x4a, 0xdf, 0x4f, 0xf2, 0x62, 0x0a, 0x9b, 0x49, 0x50, 0x7e, 0x09, 0xe1, - 0xf9, 0x77, 0xce, 0x5d, 0xa8, 0xa1, 0x5e, 0x8f, 0x44, 0xee, 0x66, 0x24, 0x72, 0xb7, 0x23, 0x91, - 0xfb, 0x67, 0x24, 0x72, 0x3f, 0xde, 0x89, 0xa9, 0x9b, 0x3b, 0x31, 0x75, 0x7b, 0x27, 0xa6, 0xbe, - 0xd9, 0xd1, 0x74, 0xfb, 0xec, 0xa2, 0x25, 0xb7, 0x49, 0x4f, 0x71, 0x92, 0x6f, 0x19, 0xd8, 0xbe, - 0x24, 0xd6, 0xb9, 0x32, 0xe3, 0x9a, 0xe4, 0x5e, 0x16, 0x5b, 0x19, 0xf7, 0xae, 0xb7, 0xfd, 0x6f, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x39, 0xbb, 0x7b, 0x83, 0x03, 0x0b, 0x00, 0x00, + // 888 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xbf, 0x6f, 0xdb, 0x46, + 0x14, 0xd6, 0x45, 0x89, 0x6c, 0x3f, 0xa5, 0x4e, 0x42, 0x29, 0x0d, 0xcd, 0x24, 0x8c, 0x42, 0xb4, + 0x85, 0xa2, 0xc6, 0x24, 0xa4, 0x08, 0x06, 0xa2, 0xc5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ff, 0x22, 0x21, 0x05, 0x2f, 0xed, 0x5d, 0x0e, 0x1f, 0x11, 0x98, 0x40, 0x29, 0x6d, 0x10, + 0x3d, 0x5e, 0x99, 0x2e, 0x05, 0x2d, 0x35, 0x2f, 0x83, 0x8e, 0x4a, 0x63, 0x28, 0xc6, 0x7f, 0xe0, + 0x1f, 0x64, 0xf9, 0x30, 0xa5, 0xc7, 0x59, 0x50, 0x61, 0x09, 0xe9, 0xda, 0xb7, 0xee, 0x35, 0xaa, + 0xad, 0xbf, 0x9e, 0xc9, 0xe8, 0xcd, 0x4c, 0x46, 0x6f, 0x67, 0x32, 0xfa, 0x7b, 0x26, 0xa3, 0x1f, + 0xce, 0xe5, 0xdc, 0x9b, 0x73, 0x39, 0xf7, 0xf6, 0x5c, 0xce, 0x7d, 0xdd, 0x34, 0x4c, 0x7e, 0x72, + 0xd6, 0x53, 0xfb, 0x74, 0xa4, 0xb9, 0xc9, 0x77, 0x2d, 0xc2, 0x5f, 0x52, 0xe7, 0x54, 0x5b, 0x71, + 0xc3, 0xf2, 0xee, 0x99, 0xbd, 0x82, 0x77, 0x4d, 0x7c, 0xf2, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x3f, 0xdc, 0xac, 0x04, 0x3e, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1503,6 +1518,18 @@ func (m *MsgUpdateParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *MsgUpdateParam_AsInt64) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParam_AsInt64) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintTx(dAtA, i, uint64(m.AsInt64)) + i-- + dAtA[i] = 0x18 + return len(dAtA) - i, nil +} func (m *MsgUpdateParam_AsCoin) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) @@ -1520,7 +1547,7 @@ func (m *MsgUpdateParam_AsCoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 } return len(dAtA) - i, nil } @@ -1544,10 +1571,15 @@ func (m *MsgUpdateParamResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l - if len(m.Params) > 0 { - i -= len(m.Params) - copy(dAtA[i:], m.Params) - i = encodeVarintTx(dAtA, i, uint64(len(m.Params))) + if m.Params != nil { + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0xa } @@ -1753,6 +1785,15 @@ func (m *MsgUpdateParam) Size() (n int) { return n } +func (m *MsgUpdateParam_AsInt64) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovTx(uint64(m.AsInt64)) + return n +} func (m *MsgUpdateParam_AsCoin) Size() (n int) { if m == nil { return 0 @@ -1771,8 +1812,8 @@ func (m *MsgUpdateParamResponse) Size() (n int) { } var l int _ = l - l = len(m.Params) - if l > 0 { + if m.Params != nil { + l = m.Params.Size() n += 1 + l + sovTx(uint64(l)) } return n @@ -2977,6 +3018,26 @@ func (m *MsgUpdateParam) Unmarshal(dAtA []byte) error { m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AsInt64", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.AsType = &MsgUpdateParam_AsInt64{v} + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AsCoin", wireType) } @@ -3065,7 +3126,7 @@ func (m *MsgUpdateParamResponse) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -3075,23 +3136,27 @@ func (m *MsgUpdateParamResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.Params = string(dAtA[iNdEx:postIndex]) + if m.Params == nil { + m.Params = &Params{} + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/shared/types/message_update_param.go b/x/shared/types/message_update_param.go index 9ba5f4ac5..f609b0fd8 100644 --- a/x/shared/types/message_update_param.go +++ b/x/shared/types/message_update_param.go @@ -47,6 +47,7 @@ func (msg *MsgUpdateParam) ValidateBasic() error { // Parameter name must be supported by this module. switch msg.Name { + // TODO_IMPROVE: Add a Uint64 asType instead of using int64 for uint64 params. case ParamNumBlocksPerSession, ParamGracePeriodEndOffsetBlocks, ParamClaimWindowOpenOffsetBlocks,