From 037698631d8ec9992b605df4ed02428dfe259ccf Mon Sep 17 00:00:00 2001 From: Bryan White Date: Mon, 9 Dec 2024 10:55:18 +0100 Subject: [PATCH] [Code Health] Ensure tokenomics module msg responses are non-empty (#975) ## Summary Ensure all supplier module msg responses are non-empty. This adds a `Params` field to the following protobuf type(s), and updates the unit tests to assert for presence and correctness. - `MsgUpdateParamsResponse` ## Issue - #663 ## Type of change Select one or more from the following: - [ ] New feature, functionality or library - [ ] Consensus breaking; add the `consensus-breaking` label if so. See #791 for details - [ ] Bug fix - [x] Code health or cleanup - [ ] Documentation - [ ] Other (specify) ## Testing - [ ] **Documentation**: `make docusaurus_start`; only needed if you make doc changes - [ ] **Unit Tests**: `make go_develop_and_test` - [ ] **LocalNet E2E Tests**: `make test_e2e` - [ ] **DevNet E2E Tests**: Add the `devnet-test-e2e` label to the PR. ## Sanity Checklist - [x] I have tested my changes using the available tooling - [ ] I have commented my code - [x] I have performed a self-review of my own code; both comments & source code - [ ] I create and reference any new tickets, if applicable - [ ] I have left TODOs throughout the codebase, if applicable --- api/poktroll/application/query.pulsar.go | 6 +- api/poktroll/tokenomics/tx.pulsar.go | 230 ++++++++++++------ proto/poktroll/tokenomics/tx.proto | 4 +- x/application/types/query.pb.go | 6 +- x/tokenomics/keeper/msg_update_params.go | 4 +- x/tokenomics/keeper/msg_update_params_test.go | 3 +- x/tokenomics/types/tx.pb.go | 134 +++++++--- 7 files changed, 274 insertions(+), 113 deletions(-) diff --git a/api/poktroll/application/query.pulsar.go b/api/poktroll/application/query.pulsar.go index 5349bbc49..85eae4e9f 100644 --- a/api/poktroll/application/query.pulsar.go +++ b/api/poktroll/application/query.pulsar.go @@ -2887,8 +2887,10 @@ type QueryAllApplicationsRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` - DelegateeGatewayAddress string `protobuf:"bytes,2,opt,name=delegatee_gateway_address,json=delegateeGatewayAddress,proto3" json:"delegatee_gateway_address,omitempty"` + Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` + // TODO_MAINNET(@adshmh): rename this field to `gateway_address_delegated_to` + // delegatee_gateway_address, if specified, filters the application list to only include those with delegation to the specified gateway address. + DelegateeGatewayAddress string `protobuf:"bytes,2,opt,name=delegatee_gateway_address,json=delegateeGatewayAddress,proto3" json:"delegatee_gateway_address,omitempty"` } func (x *QueryAllApplicationsRequest) Reset() { diff --git a/api/poktroll/tokenomics/tx.pulsar.go b/api/poktroll/tokenomics/tx.pulsar.go index 516d78e90..d7508f038 100644 --- a/api/poktroll/tokenomics/tx.pulsar.go +++ b/api/poktroll/tokenomics/tx.pulsar.go @@ -518,12 +518,14 @@ func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { } var ( - md_MsgUpdateParamsResponse protoreflect.MessageDescriptor + md_MsgUpdateParamsResponse protoreflect.MessageDescriptor + fd_MsgUpdateParamsResponse_params protoreflect.FieldDescriptor ) func init() { file_poktroll_tokenomics_tx_proto_init() md_MsgUpdateParamsResponse = File_poktroll_tokenomics_tx_proto.Messages().ByName("MsgUpdateParamsResponse") + fd_MsgUpdateParamsResponse_params = md_MsgUpdateParamsResponse.Fields().ByName("params") } var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil) @@ -591,6 +593,12 @@ func (x *fastReflection_MsgUpdateParamsResponse) Interface() protoreflect.ProtoM // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgUpdateParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_MsgUpdateParamsResponse_params, value) { + return + } + } } // Has reports whether a field is populated. @@ -606,6 +614,8 @@ func (x *fastReflection_MsgUpdateParamsResponse) Range(f func(protoreflect.Field // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "poktroll.tokenomics.MsgUpdateParamsResponse.params": + return x.Params != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.tokenomics.MsgUpdateParamsResponse")) @@ -622,6 +632,8 @@ func (x *fastReflection_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescri // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "poktroll.tokenomics.MsgUpdateParamsResponse.params": + x.Params = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.tokenomics.MsgUpdateParamsResponse")) @@ -638,6 +650,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDesc // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgUpdateParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "poktroll.tokenomics.MsgUpdateParamsResponse.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.tokenomics.MsgUpdateParamsResponse")) @@ -658,6 +673,8 @@ func (x *fastReflection_MsgUpdateParamsResponse) Get(descriptor protoreflect.Fie // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "poktroll.tokenomics.MsgUpdateParamsResponse.params": + x.Params = value.Message().Interface().(*Params) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.tokenomics.MsgUpdateParamsResponse")) @@ -678,6 +695,11 @@ func (x *fastReflection_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescri // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "poktroll.tokenomics.MsgUpdateParamsResponse.params": + 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.tokenomics.MsgUpdateParamsResponse")) @@ -691,6 +713,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDe // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "poktroll.tokenomics.MsgUpdateParamsResponse.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.tokenomics.MsgUpdateParamsResponse")) @@ -760,6 +785,10 @@ func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Meth var n int var l int _ = l + if x.Params != nil { + l = options.Size(x.Params) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -789,6 +818,20 @@ func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Meth i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + 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 + } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -838,6 +881,42 @@ func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Meth return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", 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.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 skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2111,6 +2190,8 @@ type MsgUpdateParamsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` } func (x *MsgUpdateParamsResponse) Reset() { @@ -2133,6 +2214,13 @@ func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { return file_poktroll_tokenomics_tx_proto_rawDescGZIP(), []int{1} } +func (x *MsgUpdateParamsResponse) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + // MsgUpdateParam is the Msg/UpdateParam request type to update a single param. type MsgUpdateParam struct { state protoimpl.MessageState @@ -2299,65 +2387,68 @@ var file_poktroll_tokenomics_tx_proto_rawDesc = []byte{ 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x25, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2f, 0x78, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x63, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x4e, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x95, 0x03, 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, 0xc2, 0x01, 0x0a, 0x1e, 0x61, 0x73, 0x5f, 0x6d, 0x69, 0x6e, 0x74, 0x5f, 0x61, - 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, - 0x74, 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x70, 0x6f, - 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x63, - 0x73, 0x2e, 0x4d, 0x69, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x73, 0x42, 0x4b, 0xea, 0xde, 0x1f, - 0x1e, 0x61, 0x73, 0x5f, 0x6d, 0x69, 0x6e, 0x74, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x73, 0xf2, - 0xde, 0x1f, 0x25, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x73, 0x5f, 0x6d, 0x69, 0x6e, 0x74, - 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x63, - 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x73, 0x22, 0x48, 0x00, 0x52, 0x1b, 0x61, 0x73, 0x4d, 0x69, - 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x63, - 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x09, 0x61, 0x73, 0x5f, 0x73, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xea, 0xde, 0x1f, 0x09, - 0x61, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x08, 0x61, 0x73, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x29, 0x0a, 0x08, 0x61, 0x73, 0x5f, 0x66, 0x6c, 0x6f, 0x61, - 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0c, 0xea, 0xde, 0x1f, 0x08, 0x61, 0x73, 0x5f, - 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x48, 0x00, 0x52, 0x07, 0x61, 0x73, 0x46, 0x6c, 0x6f, 0x61, 0x74, - 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x42, 0x09, 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x4d, 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, 0x33, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x63, 0x73, 0x2e, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x32, 0xd1, 0x01, 0x0a, 0x03, 0x4d, - 0x73, 0x67, 0x12, 0x62, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x24, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x63, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2c, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, - 0x6f, 0x6c, 0x6c, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x63, 0x73, 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, 0x5f, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x23, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x63, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x1a, 0x2b, 0x2e, 0x70, 0x6f, 0x6b, + 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x63, 0x73, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x95, 0x03, 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, 0xc2, 0x01, 0x0a, 0x1e, 0x61, 0x73, 0x5f, 0x6d, + 0x69, 0x6e, 0x74, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, + 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2e, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x6f, 0x6d, 0x69, 0x63, 0x73, 0x2e, 0x4d, 0x69, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x73, + 0x42, 0x4b, 0xea, 0xde, 0x1f, 0x1e, 0x61, 0x73, 0x5f, 0x6d, 0x69, 0x6e, 0x74, 0x5f, 0x61, 0x6c, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, + 0x61, 0x67, 0x65, 0x73, 0xf2, 0xde, 0x1f, 0x25, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x73, + 0x5f, 0x6d, 0x69, 0x6e, 0x74, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x73, 0x22, 0x48, 0x00, 0x52, + 0x1b, 0x61, 0x73, 0x4d, 0x69, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x09, + 0x61, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x0d, 0xea, 0xde, 0x1f, 0x09, 0x61, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x48, 0x00, + 0x52, 0x08, 0x61, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x29, 0x0a, 0x08, 0x61, 0x73, + 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0c, 0xea, 0xde, + 0x1f, 0x08, 0x61, 0x73, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x48, 0x00, 0x52, 0x07, 0x61, 0x73, + 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x09, 0x0a, 0x07, 0x61, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x22, 0x4d, 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, 0x33, 0x0a, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x63, 0x73, - 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, 0xb9, - 0x01, 0xd8, 0xe2, 0x1e, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, - 0x6f, 0x6c, 0x6c, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x63, 0x73, 0x42, 0x07, - 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24, 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, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x63, 0x73, 0xa2, - 0x02, 0x03, 0x50, 0x54, 0x58, 0xaa, 0x02, 0x13, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x63, 0x73, 0xca, 0x02, 0x13, 0x50, 0x6f, - 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x5c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x63, - 0x73, 0xe2, 0x02, 0x1f, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x5c, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x63, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x3a, 0x3a, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x63, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x32, + 0xd1, 0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x62, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x24, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x63, 0x73, 0x2e, 0x4d, 0x73, + 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2c, 0x2e, + 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x6f, 0x6d, + 0x69, 0x63, 0x73, 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, 0x5f, 0x0a, 0x0b, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x23, 0x2e, 0x70, 0x6f, 0x6b, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x63, 0x73, + 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x1a, + 0x2b, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x6f, 0x6d, 0x69, 0x63, 0x73, 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, 0xb9, 0x01, 0xd8, 0xe2, 0x1e, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, + 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x6f, 0x6d, + 0x69, 0x63, 0x73, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24, + 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, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x6f, + 0x6d, 0x69, 0x63, 0x73, 0xa2, 0x02, 0x03, 0x50, 0x54, 0x58, 0xaa, 0x02, 0x13, 0x50, 0x6f, 0x6b, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x63, 0x73, + 0xca, 0x02, 0x13, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x5c, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x6f, 0x6d, 0x69, 0x63, 0x73, 0xe2, 0x02, 0x1f, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x5c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x63, 0x73, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x50, 0x6f, 0x6b, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x3a, 0x3a, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x63, 0x73, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2383,17 +2474,18 @@ var file_poktroll_tokenomics_tx_proto_goTypes = []interface{}{ } var file_poktroll_tokenomics_tx_proto_depIdxs = []int32{ 4, // 0: poktroll.tokenomics.MsgUpdateParams.params:type_name -> poktroll.tokenomics.Params - 5, // 1: poktroll.tokenomics.MsgUpdateParam.as_mint_allocation_percentages:type_name -> poktroll.tokenomics.MintAllocationPercentages - 4, // 2: poktroll.tokenomics.MsgUpdateParamResponse.params:type_name -> poktroll.tokenomics.Params - 0, // 3: poktroll.tokenomics.Msg.UpdateParams:input_type -> poktroll.tokenomics.MsgUpdateParams - 2, // 4: poktroll.tokenomics.Msg.UpdateParam:input_type -> poktroll.tokenomics.MsgUpdateParam - 1, // 5: poktroll.tokenomics.Msg.UpdateParams:output_type -> poktroll.tokenomics.MsgUpdateParamsResponse - 3, // 6: poktroll.tokenomics.Msg.UpdateParam:output_type -> poktroll.tokenomics.MsgUpdateParamResponse - 5, // [5:7] is the sub-list for method output_type - 3, // [3:5] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 4, // 1: poktroll.tokenomics.MsgUpdateParamsResponse.params:type_name -> poktroll.tokenomics.Params + 5, // 2: poktroll.tokenomics.MsgUpdateParam.as_mint_allocation_percentages:type_name -> poktroll.tokenomics.MintAllocationPercentages + 4, // 3: poktroll.tokenomics.MsgUpdateParamResponse.params:type_name -> poktroll.tokenomics.Params + 0, // 4: poktroll.tokenomics.Msg.UpdateParams:input_type -> poktroll.tokenomics.MsgUpdateParams + 2, // 5: poktroll.tokenomics.Msg.UpdateParam:input_type -> poktroll.tokenomics.MsgUpdateParam + 1, // 6: poktroll.tokenomics.Msg.UpdateParams:output_type -> poktroll.tokenomics.MsgUpdateParamsResponse + 3, // 7: poktroll.tokenomics.Msg.UpdateParam:output_type -> poktroll.tokenomics.MsgUpdateParamResponse + 6, // [6:8] is the sub-list for method output_type + 4, // [4:6] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_poktroll_tokenomics_tx_proto_init() } diff --git a/proto/poktroll/tokenomics/tx.proto b/proto/poktroll/tokenomics/tx.proto index b20145c15..344856a51 100644 --- a/proto/poktroll/tokenomics/tx.proto +++ b/proto/poktroll/tokenomics/tx.proto @@ -40,7 +40,9 @@ message MsgUpdateParams { // MsgUpdateParamsResponse defines the response structure for executing a // MsgUpdateParams message. -message MsgUpdateParamsResponse {} +message MsgUpdateParamsResponse { + Params params = 1; +} // MsgUpdateParam is the Msg/UpdateParam request type to update a single param. message MsgUpdateParam { diff --git a/x/application/types/query.pb.go b/x/application/types/query.pb.go index 61dddd8e2..e0377020a 100644 --- a/x/application/types/query.pb.go +++ b/x/application/types/query.pb.go @@ -188,8 +188,10 @@ func (m *QueryGetApplicationResponse) GetApplication() Application { } type QueryAllApplicationsRequest struct { - Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` - DelegateeGatewayAddress string `protobuf:"bytes,2,opt,name=delegatee_gateway_address,json=delegateeGatewayAddress,proto3" json:"delegatee_gateway_address,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` + // TODO_MAINNET(@adshmh): rename this field to `gateway_address_delegated_to` + // delegatee_gateway_address, if specified, filters the application list to only include those with delegation to the specified gateway address. + DelegateeGatewayAddress string `protobuf:"bytes,2,opt,name=delegatee_gateway_address,json=delegateeGatewayAddress,proto3" json:"delegatee_gateway_address,omitempty"` } func (m *QueryAllApplicationsRequest) Reset() { *m = QueryAllApplicationsRequest{} } diff --git a/x/tokenomics/keeper/msg_update_params.go b/x/tokenomics/keeper/msg_update_params.go index 16e1bfe95..afa981dfb 100644 --- a/x/tokenomics/keeper/msg_update_params.go +++ b/x/tokenomics/keeper/msg_update_params.go @@ -38,5 +38,7 @@ func (k msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) logger.Info("Done updating params") - return &types.MsgUpdateParamsResponse{}, nil + return &types.MsgUpdateParamsResponse{ + Params: &msg.Params, + }, nil } diff --git a/x/tokenomics/keeper/msg_update_params_test.go b/x/tokenomics/keeper/msg_update_params_test.go index 163cb10fb..71375b179 100644 --- a/x/tokenomics/keeper/msg_update_params_test.go +++ b/x/tokenomics/keeper/msg_update_params_test.go @@ -120,11 +120,12 @@ func TestMsgUpdateParams(t *testing.T) { for _, test := range tests { t.Run(test.desc, func(t *testing.T) { - _, err := srv.UpdateParams(ctx, test.req) + updateRes, err := srv.UpdateParams(ctx, test.req) if test.shouldError { require.Error(t, err) require.ErrorContains(t, err, test.expectedErrMsg) } else { + require.Equal(t, &test.req.Params, updateRes.GetParams()) require.Nil(t, err) } }) diff --git a/x/tokenomics/types/tx.pb.go b/x/tokenomics/types/tx.pb.go index a08ce9be9..eb33636b4 100644 --- a/x/tokenomics/types/tx.pb.go +++ b/x/tokenomics/types/tx.pb.go @@ -87,6 +87,7 @@ func (m *MsgUpdateParams) GetParams() Params { // MsgUpdateParamsResponse defines the response structure for executing a // MsgUpdateParams message. type MsgUpdateParamsResponse struct { + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` } func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } @@ -118,6 +119,13 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo +func (m *MsgUpdateParamsResponse) GetParams() *Params { + if m != nil { + return m.Params + } + return nil +} + // MsgUpdateParam is the Msg/UpdateParam request type to update a single param. type MsgUpdateParam struct { // authority is the address that controls the module (defaults to x/gov unless overwritten). @@ -284,43 +292,43 @@ func init() { func init() { proto.RegisterFile("poktroll/tokenomics/tx.proto", fileDescriptor_aa0f2fdbd9b6d7eb) } var fileDescriptor_aa0f2fdbd9b6d7eb = []byte{ - // 561 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0x3d, 0x6f, 0xd3, 0x40, - 0x18, 0xf6, 0x91, 0x7e, 0xf9, 0x5a, 0x8a, 0x30, 0x15, 0x75, 0x53, 0xe4, 0x44, 0x86, 0x4a, 0x21, - 0xb4, 0xb6, 0x68, 0x24, 0x84, 0x32, 0x20, 0xd5, 0x03, 0x8a, 0x84, 0x22, 0x15, 0x23, 0x16, 0x16, - 0xeb, 0x92, 0x1c, 0xae, 0x15, 0xfb, 0xce, 0xf2, 0x5d, 0xa1, 0xd9, 0x10, 0x23, 0x13, 0x0b, 0xff, - 0x81, 0x31, 0x03, 0xbf, 0x00, 0x96, 0x8e, 0x85, 0xa9, 0x53, 0x84, 0x92, 0x21, 0x52, 0x46, 0x7e, - 0x01, 0xf2, 0x47, 0xe2, 0xba, 0x32, 0x34, 0xea, 0x62, 0xdf, 0xbd, 0xcf, 0xfb, 0x71, 0xcf, 0x73, - 0xcf, 0xc1, 0x7b, 0x3e, 0xed, 0xf2, 0x80, 0xba, 0xae, 0xce, 0x69, 0x17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0x5c, 0xbd, 0x68, 0xa7, 0xfb, 0x73, 0x14, - 0x17, 0x1f, 0xcd, 0x91, 0x34, 0x1d, 0x50, 0x5c, 0xfc, 0x10, 0xbe, 0x0b, 0xe3, 0xe5, 0xe9, 0x50, - 0x01, 0x67, 0x43, 0x05, 0x9c, 0x0f, 0x15, 0xf0, 0x7b, 0xa8, 0x80, 0xcf, 0x23, 0x45, 0x38, 0x1b, - 0x29, 0xc2, 0xf9, 0x48, 0x11, 0xde, 0xd4, 0x6c, 0x87, 0x1f, 0x1d, 0xb7, 0xb4, 0x36, 0xf5, 0xf4, - 0xb0, 0xf7, 0x1e, 0xc1, 0xfc, 0x3d, 0x0d, 0xba, 0x7a, 0xfe, 0x93, 0x09, 0x45, 0x67, 0xad, 0xa5, - 0xe8, 0xd5, 0xd7, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff, 0x4c, 0x0c, 0x38, 0xd8, 0xa9, 0x04, 0x00, - 0x00, + // 563 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x3d, 0x6f, 0xd3, 0x40, + 0x18, 0xf6, 0x91, 0x7e, 0xf9, 0x5a, 0x8a, 0x30, 0x15, 0x35, 0x29, 0x72, 0x22, 0x43, 0xa5, 0x10, + 0x5a, 0x5b, 0x34, 0x12, 0x42, 0x19, 0x90, 0xea, 0x01, 0x45, 0x42, 0x41, 0xc5, 0x88, 0x85, 0xc5, + 0xba, 0x24, 0x87, 0x6b, 0xc5, 0xbe, 0xb3, 0x7c, 0x57, 0x68, 0x36, 0xc4, 0xc8, 0xc4, 0xc2, 0x7f, + 0x60, 0xcc, 0xc0, 0x2f, 0x80, 0xa5, 0x63, 0x61, 0xea, 0x14, 0xa1, 0x64, 0x88, 0x94, 0x91, 0x5f, + 0x80, 0xfc, 0x91, 0xb8, 0xae, 0x0c, 0x8d, 0x60, 0x49, 0xee, 0xde, 0xe7, 0xf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0xb8, 0xc0, 0x58, 0x7d, 0x06, 0x37, 0x2f, 0x98, 0x4c, 0xcc, 0x7c, 0x4a, 0x18, 0x96, 0x6a, 0x33, + 0x52, 0xe0, 0x52, 0x52, 0x53, 0x26, 0xea, 0xa7, 0x02, 0x5c, 0xcf, 0x26, 0xfc, 0x67, 0x51, 0x24, + 0xb8, 0x40, 0x90, 0x87, 0x23, 0x49, 0x44, 0x33, 0x3a, 0x4b, 0x5f, 0x01, 0x54, 0x10, 0xb3, 0x3c, + 0x87, 0x70, 0x0b, 0xb9, 0x2e, 0x6d, 0x23, 0xee, 0x50, 0x62, 0xf9, 0x38, 0x68, 0x63, 0xc2, 0x91, + 0x8d, 0x99, 0x5c, 0x88, 0xc8, 0x6a, 0xb9, 0x64, 0x9b, 0x0e, 0xe1, 0xfb, 0xb3, 0xb0, 0x83, 0x34, + 0xca, 0x78, 0x3a, 0x19, 0x94, 0x2e, 0xc9, 0xfc, 0x6b, 0x50, 0xda, 0xee, 0x21, 0xcf, 0xad, 0xab, + 0x7f, 0xf7, 0x53, 0x1b, 0x82, 0xb9, 0x85, 0xd8, 0x1f, 0x6b, 0x49, 0x3b, 0x50, 0x44, 0xcc, 0x62, + 0x51, 0xc3, 0xf2, 0x42, 0x24, 0xc8, 0xd5, 0xc9, 0xa0, 0x94, 0x1a, 0x1b, 0x82, 0xb9, 0x82, 0x12, + 0x45, 0xa4, 0x7b, 0x70, 0x05, 0x31, 0xeb, 0xb5, 0x4b, 0x11, 0x97, 0x17, 0xcb, 0xa0, 0x02, 0x8c, + 0xb5, 0xc9, 0xa0, 0x34, 0xb3, 0x35, 0x04, 0x73, 0x19, 0xb1, 0x27, 0xe1, 0xb1, 0xbe, 0x9e, 0x1d, + 0x03, 0x43, 0x84, 0xcb, 0x88, 0x59, 0xbc, 0xe7, 0x63, 0xb5, 0x09, 0x6f, 0x66, 0x9f, 0xe5, 0xbf, + 0x9e, 0x79, 0xef, 0x3b, 0x80, 0x85, 0x26, 0xb3, 0xa5, 0x16, 0x5c, 0xcb, 0x2c, 0xc0, 0xdd, 0x7c, + 0xd9, 0xb3, 0x13, 0x56, 0xdc, 0x99, 0xc7, 0x6b, 0x46, 0xd0, 0x82, 0xab, 0xe7, 0xc7, 0xe9, 0xce, + 0x1c, 0xc1, 0xc5, 0xfb, 0x73, 0x38, 0x4d, 0x0b, 0x14, 0x17, 0xdf, 0x85, 0xcb, 0x64, 0x3c, 0x3f, + 0x19, 0x2a, 0xe0, 0x74, 0xa8, 0x80, 0xb3, 0xa1, 0x02, 0x7e, 0x0e, 0x15, 0xf0, 0x71, 0xa4, 0x08, + 0xa7, 0x23, 0x45, 0x38, 0x1b, 0x29, 0xc2, 0xab, 0x9a, 0xed, 0xf0, 0xc3, 0xa3, 0x96, 0xd6, 0xa6, + 0x9e, 0x1e, 0xe6, 0xde, 0x25, 0x98, 0xbf, 0xa5, 0x41, 0x57, 0xcf, 0xdf, 0xb3, 0x50, 0x74, 0xd6, + 0x5a, 0x8a, 0x3e, 0x15, 0xb5, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x3e, 0x0d, 0x78, 0xc9, 0xde, + 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -503,6 +511,18 @@ func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + 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 + } return len(dAtA) - i, nil } @@ -667,6 +687,10 @@ func (m *MsgUpdateParamsResponse) Size() (n int) { } var l int _ = l + if m.Params != nil { + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -884,6 +908,42 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Params == nil { + m.Params = &Params{} + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:])