github.com/cosmos/cosmos-sdk@v0.50.10/x/consensus/types/query.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: cosmos/consensus/v1/query.proto 3 4 package types 5 6 import ( 7 context "context" 8 fmt "fmt" 9 types "github.com/cometbft/cometbft/proto/tendermint/types" 10 grpc1 "github.com/cosmos/gogoproto/grpc" 11 proto "github.com/cosmos/gogoproto/proto" 12 _ "google.golang.org/genproto/googleapis/api/annotations" 13 grpc "google.golang.org/grpc" 14 codes "google.golang.org/grpc/codes" 15 status "google.golang.org/grpc/status" 16 io "io" 17 math "math" 18 math_bits "math/bits" 19 ) 20 21 // Reference imports to suppress errors if they are not otherwise used. 22 var _ = proto.Marshal 23 var _ = fmt.Errorf 24 var _ = math.Inf 25 26 // This is a compile-time assertion to ensure that this generated file 27 // is compatible with the proto package it is being compiled against. 28 // A compilation error at this line likely means your copy of the 29 // proto package needs to be updated. 30 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 31 32 // QueryParamsRequest defines the request type for querying x/consensus parameters. 33 type QueryParamsRequest struct { 34 } 35 36 func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } 37 func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } 38 func (*QueryParamsRequest) ProtoMessage() {} 39 func (*QueryParamsRequest) Descriptor() ([]byte, []int) { 40 return fileDescriptor_bf54d1e5df04cee9, []int{0} 41 } 42 func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { 43 return m.Unmarshal(b) 44 } 45 func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 46 if deterministic { 47 return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) 48 } else { 49 b = b[:cap(b)] 50 n, err := m.MarshalToSizedBuffer(b) 51 if err != nil { 52 return nil, err 53 } 54 return b[:n], nil 55 } 56 } 57 func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { 58 xxx_messageInfo_QueryParamsRequest.Merge(m, src) 59 } 60 func (m *QueryParamsRequest) XXX_Size() int { 61 return m.Size() 62 } 63 func (m *QueryParamsRequest) XXX_DiscardUnknown() { 64 xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) 65 } 66 67 var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo 68 69 // QueryParamsResponse defines the response type for querying x/consensus parameters. 70 type QueryParamsResponse struct { 71 // params are the tendermint consensus params stored in the consensus module. 72 // Please note that `params.version` is not populated in this response, it is 73 // tracked separately in the x/upgrade module. 74 Params *types.ConsensusParams `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` 75 } 76 77 func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } 78 func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } 79 func (*QueryParamsResponse) ProtoMessage() {} 80 func (*QueryParamsResponse) Descriptor() ([]byte, []int) { 81 return fileDescriptor_bf54d1e5df04cee9, []int{1} 82 } 83 func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { 84 return m.Unmarshal(b) 85 } 86 func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 87 if deterministic { 88 return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) 89 } else { 90 b = b[:cap(b)] 91 n, err := m.MarshalToSizedBuffer(b) 92 if err != nil { 93 return nil, err 94 } 95 return b[:n], nil 96 } 97 } 98 func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { 99 xxx_messageInfo_QueryParamsResponse.Merge(m, src) 100 } 101 func (m *QueryParamsResponse) XXX_Size() int { 102 return m.Size() 103 } 104 func (m *QueryParamsResponse) XXX_DiscardUnknown() { 105 xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) 106 } 107 108 var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo 109 110 func (m *QueryParamsResponse) GetParams() *types.ConsensusParams { 111 if m != nil { 112 return m.Params 113 } 114 return nil 115 } 116 117 func init() { 118 proto.RegisterType((*QueryParamsRequest)(nil), "cosmos.consensus.v1.QueryParamsRequest") 119 proto.RegisterType((*QueryParamsResponse)(nil), "cosmos.consensus.v1.QueryParamsResponse") 120 } 121 122 func init() { proto.RegisterFile("cosmos/consensus/v1/query.proto", fileDescriptor_bf54d1e5df04cee9) } 123 124 var fileDescriptor_bf54d1e5df04cee9 = []byte{ 125 // 279 bytes of a gzipped FileDescriptorProto 126 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xce, 0x2f, 0xce, 127 0xcd, 0x2f, 0xd6, 0x4f, 0xce, 0xcf, 0x2b, 0x4e, 0xcd, 0x2b, 0x2e, 0x2d, 0xd6, 0x2f, 0x33, 0xd4, 128 0x2f, 0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x86, 0x28, 0xd0, 129 0x83, 0x2b, 0xd0, 0x2b, 0x33, 0x94, 0x92, 0x49, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0xd5, 0x4f, 0x2c, 130 0xc8, 0xd4, 0x4f, 0xcc, 0xcb, 0xcb, 0x2f, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0x86, 0x68, 0x91, 131 0x92, 0x2d, 0x49, 0xcd, 0x4b, 0x49, 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x2f, 0xa9, 0x2c, 0x48, 132 0x2d, 0xd6, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x85, 0x4a, 0x2b, 0x89, 0x70, 0x09, 0x05, 0x82, 0x2c, 133 0x08, 0x00, 0x0b, 0x06, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x28, 0x05, 0x70, 0x09, 0xa3, 0x88, 134 0x16, 0x17, 0x80, 0x2c, 0x14, 0xb2, 0xe4, 0x62, 0x83, 0x68, 0x96, 0x60, 0x54, 0x60, 0xd4, 0xe0, 135 0x36, 0x52, 0xd4, 0x43, 0x18, 0xae, 0x07, 0x36, 0x5c, 0xcf, 0x19, 0xe6, 0x32, 0xa8, 0x56, 0xa8, 136 0x06, 0xa3, 0x2e, 0x46, 0x2e, 0x56, 0xb0, 0x91, 0x42, 0x0d, 0x8c, 0x5c, 0x6c, 0x10, 0x49, 0x21, 137 0x75, 0x3d, 0x2c, 0xfe, 0xd1, 0xc3, 0x74, 0x8f, 0x94, 0x06, 0x61, 0x85, 0x10, 0x27, 0x2a, 0x29, 138 0x37, 0x5d, 0x7e, 0x32, 0x99, 0x49, 0x56, 0x48, 0x5a, 0x1f, 0x5b, 0x58, 0x42, 0x1c, 0xe3, 0xe4, 139 0x71, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 140 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x7a, 0xe9, 0x99, 0x25, 0x19, 141 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0x08, 0x03, 0x40, 0x94, 0x6e, 0x71, 0x4a, 0xb6, 0x7e, 0x05, 142 0x92, 0x69, 0x60, 0xef, 0x26, 0xb1, 0x81, 0x43, 0xd1, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x1b, 143 0xa2, 0x35, 0xa1, 0xba, 0x01, 0x00, 0x00, 144 } 145 146 // Reference imports to suppress errors if they are not otherwise used. 147 var _ context.Context 148 var _ grpc.ClientConn 149 150 // This is a compile-time assertion to ensure that this generated file 151 // is compatible with the grpc package it is being compiled against. 152 const _ = grpc.SupportPackageIsVersion4 153 154 // QueryClient is the client API for Query service. 155 // 156 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 157 type QueryClient interface { 158 // Params queries the parameters of x/consensus module. 159 Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) 160 } 161 162 type queryClient struct { 163 cc grpc1.ClientConn 164 } 165 166 func NewQueryClient(cc grpc1.ClientConn) QueryClient { 167 return &queryClient{cc} 168 } 169 170 func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { 171 out := new(QueryParamsResponse) 172 err := c.cc.Invoke(ctx, "/cosmos.consensus.v1.Query/Params", in, out, opts...) 173 if err != nil { 174 return nil, err 175 } 176 return out, nil 177 } 178 179 // QueryServer is the server API for Query service. 180 type QueryServer interface { 181 // Params queries the parameters of x/consensus module. 182 Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) 183 } 184 185 // UnimplementedQueryServer can be embedded to have forward compatible implementations. 186 type UnimplementedQueryServer struct { 187 } 188 189 func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { 190 return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") 191 } 192 193 func RegisterQueryServer(s grpc1.Server, srv QueryServer) { 194 s.RegisterService(&_Query_serviceDesc, srv) 195 } 196 197 func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 198 in := new(QueryParamsRequest) 199 if err := dec(in); err != nil { 200 return nil, err 201 } 202 if interceptor == nil { 203 return srv.(QueryServer).Params(ctx, in) 204 } 205 info := &grpc.UnaryServerInfo{ 206 Server: srv, 207 FullMethod: "/cosmos.consensus.v1.Query/Params", 208 } 209 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 210 return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) 211 } 212 return interceptor(ctx, in, info, handler) 213 } 214 215 var _Query_serviceDesc = grpc.ServiceDesc{ 216 ServiceName: "cosmos.consensus.v1.Query", 217 HandlerType: (*QueryServer)(nil), 218 Methods: []grpc.MethodDesc{ 219 { 220 MethodName: "Params", 221 Handler: _Query_Params_Handler, 222 }, 223 }, 224 Streams: []grpc.StreamDesc{}, 225 Metadata: "cosmos/consensus/v1/query.proto", 226 } 227 228 func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { 229 size := m.Size() 230 dAtA = make([]byte, size) 231 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 232 if err != nil { 233 return nil, err 234 } 235 return dAtA[:n], nil 236 } 237 238 func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { 239 size := m.Size() 240 return m.MarshalToSizedBuffer(dAtA[:size]) 241 } 242 243 func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 244 i := len(dAtA) 245 _ = i 246 var l int 247 _ = l 248 return len(dAtA) - i, nil 249 } 250 251 func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { 252 size := m.Size() 253 dAtA = make([]byte, size) 254 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 255 if err != nil { 256 return nil, err 257 } 258 return dAtA[:n], nil 259 } 260 261 func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { 262 size := m.Size() 263 return m.MarshalToSizedBuffer(dAtA[:size]) 264 } 265 266 func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 267 i := len(dAtA) 268 _ = i 269 var l int 270 _ = l 271 if m.Params != nil { 272 { 273 size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) 274 if err != nil { 275 return 0, err 276 } 277 i -= size 278 i = encodeVarintQuery(dAtA, i, uint64(size)) 279 } 280 i-- 281 dAtA[i] = 0xa 282 } 283 return len(dAtA) - i, nil 284 } 285 286 func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { 287 offset -= sovQuery(v) 288 base := offset 289 for v >= 1<<7 { 290 dAtA[offset] = uint8(v&0x7f | 0x80) 291 v >>= 7 292 offset++ 293 } 294 dAtA[offset] = uint8(v) 295 return base 296 } 297 func (m *QueryParamsRequest) Size() (n int) { 298 if m == nil { 299 return 0 300 } 301 var l int 302 _ = l 303 return n 304 } 305 306 func (m *QueryParamsResponse) Size() (n int) { 307 if m == nil { 308 return 0 309 } 310 var l int 311 _ = l 312 if m.Params != nil { 313 l = m.Params.Size() 314 n += 1 + l + sovQuery(uint64(l)) 315 } 316 return n 317 } 318 319 func sovQuery(x uint64) (n int) { 320 return (math_bits.Len64(x|1) + 6) / 7 321 } 322 func sozQuery(x uint64) (n int) { 323 return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 324 } 325 func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { 326 l := len(dAtA) 327 iNdEx := 0 328 for iNdEx < l { 329 preIndex := iNdEx 330 var wire uint64 331 for shift := uint(0); ; shift += 7 { 332 if shift >= 64 { 333 return ErrIntOverflowQuery 334 } 335 if iNdEx >= l { 336 return io.ErrUnexpectedEOF 337 } 338 b := dAtA[iNdEx] 339 iNdEx++ 340 wire |= uint64(b&0x7F) << shift 341 if b < 0x80 { 342 break 343 } 344 } 345 fieldNum := int32(wire >> 3) 346 wireType := int(wire & 0x7) 347 if wireType == 4 { 348 return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") 349 } 350 if fieldNum <= 0 { 351 return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) 352 } 353 switch fieldNum { 354 default: 355 iNdEx = preIndex 356 skippy, err := skipQuery(dAtA[iNdEx:]) 357 if err != nil { 358 return err 359 } 360 if (skippy < 0) || (iNdEx+skippy) < 0 { 361 return ErrInvalidLengthQuery 362 } 363 if (iNdEx + skippy) > l { 364 return io.ErrUnexpectedEOF 365 } 366 iNdEx += skippy 367 } 368 } 369 370 if iNdEx > l { 371 return io.ErrUnexpectedEOF 372 } 373 return nil 374 } 375 func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { 376 l := len(dAtA) 377 iNdEx := 0 378 for iNdEx < l { 379 preIndex := iNdEx 380 var wire uint64 381 for shift := uint(0); ; shift += 7 { 382 if shift >= 64 { 383 return ErrIntOverflowQuery 384 } 385 if iNdEx >= l { 386 return io.ErrUnexpectedEOF 387 } 388 b := dAtA[iNdEx] 389 iNdEx++ 390 wire |= uint64(b&0x7F) << shift 391 if b < 0x80 { 392 break 393 } 394 } 395 fieldNum := int32(wire >> 3) 396 wireType := int(wire & 0x7) 397 if wireType == 4 { 398 return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") 399 } 400 if fieldNum <= 0 { 401 return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) 402 } 403 switch fieldNum { 404 case 1: 405 if wireType != 2 { 406 return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) 407 } 408 var msglen int 409 for shift := uint(0); ; shift += 7 { 410 if shift >= 64 { 411 return ErrIntOverflowQuery 412 } 413 if iNdEx >= l { 414 return io.ErrUnexpectedEOF 415 } 416 b := dAtA[iNdEx] 417 iNdEx++ 418 msglen |= int(b&0x7F) << shift 419 if b < 0x80 { 420 break 421 } 422 } 423 if msglen < 0 { 424 return ErrInvalidLengthQuery 425 } 426 postIndex := iNdEx + msglen 427 if postIndex < 0 { 428 return ErrInvalidLengthQuery 429 } 430 if postIndex > l { 431 return io.ErrUnexpectedEOF 432 } 433 if m.Params == nil { 434 m.Params = &types.ConsensusParams{} 435 } 436 if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 437 return err 438 } 439 iNdEx = postIndex 440 default: 441 iNdEx = preIndex 442 skippy, err := skipQuery(dAtA[iNdEx:]) 443 if err != nil { 444 return err 445 } 446 if (skippy < 0) || (iNdEx+skippy) < 0 { 447 return ErrInvalidLengthQuery 448 } 449 if (iNdEx + skippy) > l { 450 return io.ErrUnexpectedEOF 451 } 452 iNdEx += skippy 453 } 454 } 455 456 if iNdEx > l { 457 return io.ErrUnexpectedEOF 458 } 459 return nil 460 } 461 func skipQuery(dAtA []byte) (n int, err error) { 462 l := len(dAtA) 463 iNdEx := 0 464 depth := 0 465 for iNdEx < l { 466 var wire uint64 467 for shift := uint(0); ; shift += 7 { 468 if shift >= 64 { 469 return 0, ErrIntOverflowQuery 470 } 471 if iNdEx >= l { 472 return 0, io.ErrUnexpectedEOF 473 } 474 b := dAtA[iNdEx] 475 iNdEx++ 476 wire |= (uint64(b) & 0x7F) << shift 477 if b < 0x80 { 478 break 479 } 480 } 481 wireType := int(wire & 0x7) 482 switch wireType { 483 case 0: 484 for shift := uint(0); ; shift += 7 { 485 if shift >= 64 { 486 return 0, ErrIntOverflowQuery 487 } 488 if iNdEx >= l { 489 return 0, io.ErrUnexpectedEOF 490 } 491 iNdEx++ 492 if dAtA[iNdEx-1] < 0x80 { 493 break 494 } 495 } 496 case 1: 497 iNdEx += 8 498 case 2: 499 var length int 500 for shift := uint(0); ; shift += 7 { 501 if shift >= 64 { 502 return 0, ErrIntOverflowQuery 503 } 504 if iNdEx >= l { 505 return 0, io.ErrUnexpectedEOF 506 } 507 b := dAtA[iNdEx] 508 iNdEx++ 509 length |= (int(b) & 0x7F) << shift 510 if b < 0x80 { 511 break 512 } 513 } 514 if length < 0 { 515 return 0, ErrInvalidLengthQuery 516 } 517 iNdEx += length 518 case 3: 519 depth++ 520 case 4: 521 if depth == 0 { 522 return 0, ErrUnexpectedEndOfGroupQuery 523 } 524 depth-- 525 case 5: 526 iNdEx += 4 527 default: 528 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 529 } 530 if iNdEx < 0 { 531 return 0, ErrInvalidLengthQuery 532 } 533 if depth == 0 { 534 return iNdEx, nil 535 } 536 } 537 return 0, io.ErrUnexpectedEOF 538 } 539 540 var ( 541 ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") 542 ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") 543 ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") 544 )