diff --git a/node/node.go b/node/node.go index ae8e4fc5d..e5f4f81f7 100644 --- a/node/node.go +++ b/node/node.go @@ -95,7 +95,7 @@ func NewNode(genDoc *genesis.Genesis, conf *config.Config, return nil, err } - grpcServer := grpc.NewServer(conf.GRPC, state, syn, net, consMgr, walletMgr) + grpcServer := grpc.NewServer(conf.GRPC, state, syn, net, consMgr, walletMgr, zeromqServer) httpServer := http.NewServer(conf.HTTP, enableHTTPAuth) jsonrpcServer := jsonrpc.NewServer(conf.JSONRPC) diff --git a/wallet/wallet_test.go b/wallet/wallet_test.go index 490347781..7b9ead923 100644 --- a/wallet/wallet_test.go +++ b/wallet/wallet_test.go @@ -47,7 +47,7 @@ func setup(t *testing.T) *testData { gRPCServer := grpc.NewServer( grpcConf, mockState, nil, nil, - nil, wallet.NewWalletManager(walletMgrConf), + nil, wallet.NewWalletManager(walletMgrConf), nil, ) assert.NoError(t, gRPCServer.StartServer()) diff --git a/www/grpc/gen/dart/network.pb.dart b/www/grpc/gen/dart/network.pb.dart index 4476be5b3..217b61507 100644 --- a/www/grpc/gen/dart/network.pb.dart +++ b/www/grpc/gen/dart/network.pb.dart @@ -185,6 +185,7 @@ class GetNodeInfoResponse extends $pb.GeneratedMessage { ..pPS(9, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'protocols') ..a<$core.double>(13, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'clockOffset', $pb.PbFieldType.OD) ..aOM(14, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'connectionInfo', subBuilder: ConnectionInfo.create) + ..pc(15, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'zmqPublishers', $pb.PbFieldType.PM, subBuilder: ZMQPublisherInfo.create) ..hasRequiredFields = false ; @@ -201,6 +202,7 @@ class GetNodeInfoResponse extends $pb.GeneratedMessage { $core.Iterable<$core.String>? protocols, $core.double? clockOffset, ConnectionInfo? connectionInfo, + $core.Iterable? zmqPublishers, }) { final _result = create(); if (moniker != null) { @@ -236,6 +238,9 @@ class GetNodeInfoResponse extends $pb.GeneratedMessage { if (connectionInfo != null) { _result.connectionInfo = connectionInfo; } + if (zmqPublishers != null) { + _result.zmqPublishers.addAll(zmqPublishers); + } return _result; } factory GetNodeInfoResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); @@ -347,6 +352,84 @@ class GetNodeInfoResponse extends $pb.GeneratedMessage { void clearConnectionInfo() => clearField(14); @$pb.TagNumber(14) ConnectionInfo ensureConnectionInfo() => $_ensure(10); + + @$pb.TagNumber(15) + $core.List get zmqPublishers => $_getList(11); +} + +class ZMQPublisherInfo extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ZMQPublisherInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'topic') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'address') + ..a<$core.int>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'hwm', $pb.PbFieldType.O3) + ..hasRequiredFields = false + ; + + ZMQPublisherInfo._() : super(); + factory ZMQPublisherInfo({ + $core.String? topic, + $core.String? address, + $core.int? hwm, + }) { + final _result = create(); + if (topic != null) { + _result.topic = topic; + } + if (address != null) { + _result.address = address; + } + if (hwm != null) { + _result.hwm = hwm; + } + return _result; + } + factory ZMQPublisherInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ZMQPublisherInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ZMQPublisherInfo clone() => ZMQPublisherInfo()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ZMQPublisherInfo copyWith(void Function(ZMQPublisherInfo) updates) => super.copyWith((message) => updates(message as ZMQPublisherInfo)) as ZMQPublisherInfo; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static ZMQPublisherInfo create() => ZMQPublisherInfo._(); + ZMQPublisherInfo createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ZMQPublisherInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ZMQPublisherInfo? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get topic => $_getSZ(0); + @$pb.TagNumber(1) + set topic($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasTopic() => $_has(0); + @$pb.TagNumber(1) + void clearTopic() => clearField(1); + + @$pb.TagNumber(2) + $core.String get address => $_getSZ(1); + @$pb.TagNumber(2) + set address($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasAddress() => $_has(1); + @$pb.TagNumber(2) + void clearAddress() => clearField(2); + + @$pb.TagNumber(3) + $core.int get hwm => $_getIZ(2); + @$pb.TagNumber(3) + set hwm($core.int v) { $_setSignedInt32(2, v); } + @$pb.TagNumber(3) + $core.bool hasHwm() => $_has(2); + @$pb.TagNumber(3) + void clearHwm() => clearField(3); } class PeerInfo extends $pb.GeneratedMessage { diff --git a/www/grpc/gen/dart/network.pbjson.dart b/www/grpc/gen/dart/network.pbjson.dart index 8b1b207a1..a663b7e6d 100644 --- a/www/grpc/gen/dart/network.pbjson.dart +++ b/www/grpc/gen/dart/network.pbjson.dart @@ -53,11 +53,24 @@ const GetNodeInfoResponse$json = const { const {'1': 'protocols', '3': 9, '4': 3, '5': 9, '10': 'protocols'}, const {'1': 'clock_offset', '3': 13, '4': 1, '5': 1, '10': 'clockOffset'}, const {'1': 'connection_info', '3': 14, '4': 1, '5': 11, '6': '.pactus.ConnectionInfo', '10': 'connectionInfo'}, + const {'1': 'zmq_publishers', '3': 15, '4': 3, '5': 11, '6': '.pactus.ZMQPublisherInfo', '10': 'zmqPublishers'}, ], }; /// Descriptor for `GetNodeInfoResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getNodeInfoResponseDescriptor = $convert.base64Decode('ChNHZXROb2RlSW5mb1Jlc3BvbnNlEhgKB21vbmlrZXIYASABKAlSB21vbmlrZXISFAoFYWdlbnQYAiABKAlSBWFnZW50EhcKB3BlZXJfaWQYAyABKAlSBnBlZXJJZBIdCgpzdGFydGVkX2F0GAQgASgEUglzdGFydGVkQXQSIgoMcmVhY2hhYmlsaXR5GAUgASgJUgxyZWFjaGFiaWxpdHkSGgoIc2VydmljZXMYBiABKAVSCHNlcnZpY2VzEiUKDnNlcnZpY2VzX25hbWVzGAcgASgJUg1zZXJ2aWNlc05hbWVzEh8KC2xvY2FsX2FkZHJzGAggAygJUgpsb2NhbEFkZHJzEhwKCXByb3RvY29scxgJIAMoCVIJcHJvdG9jb2xzEiEKDGNsb2NrX29mZnNldBgNIAEoAVILY2xvY2tPZmZzZXQSPwoPY29ubmVjdGlvbl9pbmZvGA4gASgLMhYucGFjdHVzLkNvbm5lY3Rpb25JbmZvUg5jb25uZWN0aW9uSW5mbw=='); +final $typed_data.Uint8List getNodeInfoResponseDescriptor = $convert.base64Decode('ChNHZXROb2RlSW5mb1Jlc3BvbnNlEhgKB21vbmlrZXIYASABKAlSB21vbmlrZXISFAoFYWdlbnQYAiABKAlSBWFnZW50EhcKB3BlZXJfaWQYAyABKAlSBnBlZXJJZBIdCgpzdGFydGVkX2F0GAQgASgEUglzdGFydGVkQXQSIgoMcmVhY2hhYmlsaXR5GAUgASgJUgxyZWFjaGFiaWxpdHkSGgoIc2VydmljZXMYBiABKAVSCHNlcnZpY2VzEiUKDnNlcnZpY2VzX25hbWVzGAcgASgJUg1zZXJ2aWNlc05hbWVzEh8KC2xvY2FsX2FkZHJzGAggAygJUgpsb2NhbEFkZHJzEhwKCXByb3RvY29scxgJIAMoCVIJcHJvdG9jb2xzEiEKDGNsb2NrX29mZnNldBgNIAEoAVILY2xvY2tPZmZzZXQSPwoPY29ubmVjdGlvbl9pbmZvGA4gASgLMhYucGFjdHVzLkNvbm5lY3Rpb25JbmZvUg5jb25uZWN0aW9uSW5mbxI/Cg56bXFfcHVibGlzaGVycxgPIAMoCzIYLnBhY3R1cy5aTVFQdWJsaXNoZXJJbmZvUg16bXFQdWJsaXNoZXJz'); +@$core.Deprecated('Use zMQPublisherInfoDescriptor instead') +const ZMQPublisherInfo$json = const { + '1': 'ZMQPublisherInfo', + '2': const [ + const {'1': 'topic', '3': 1, '4': 1, '5': 9, '10': 'topic'}, + const {'1': 'address', '3': 2, '4': 1, '5': 9, '10': 'address'}, + const {'1': 'hwm', '3': 3, '4': 1, '5': 5, '10': 'hwm'}, + ], +}; + +/// Descriptor for `ZMQPublisherInfo`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List zMQPublisherInfoDescriptor = $convert.base64Decode('ChBaTVFQdWJsaXNoZXJJbmZvEhQKBXRvcGljGAEgASgJUgV0b3BpYxIYCgdhZGRyZXNzGAIgASgJUgdhZGRyZXNzEhAKA2h3bRgDIAEoBVIDaHdt'); @$core.Deprecated('Use peerInfoDescriptor instead') const PeerInfo$json = const { '1': 'PeerInfo', @@ -162,6 +175,7 @@ const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> NetworkSer '.pactus.GetNodeInfoRequest': GetNodeInfoRequest$json, '.pactus.GetNodeInfoResponse': GetNodeInfoResponse$json, '.pactus.ConnectionInfo': ConnectionInfo$json, + '.pactus.ZMQPublisherInfo': ZMQPublisherInfo$json, }; /// Descriptor for `Network`. Decode as a `google.protobuf.ServiceDescriptorProto`. diff --git a/www/grpc/gen/docs/grpc.md b/www/grpc/gen/docs/grpc.md index e0f510061..61e43d6cb 100644 --- a/www/grpc/gen/docs/grpc.md +++ b/www/grpc/gen/docs/grpc.md @@ -2631,6 +2631,35 @@ Message has no fields. Number of outbound connections. + + + zmq_publishers + repeated ZMQPublisherInfo + + List of active ZeroMQ publishers. + + + + zmq_publishers[].topic + string + + The topic associated with the publisher. + + + + zmq_publishers[].address + string + + The address of the publisher. + + + + zmq_publishers[].hwm + int32 + + The high-water mark (HWM) for the publisher, indicating the +maximum number of messages to queue before dropping older ones. + diff --git a/www/grpc/gen/docs/json-rpc.md b/www/grpc/gen/docs/json-rpc.md index 42f2d6eba..fb47dae17 100644 --- a/www/grpc/gen/docs/json-rpc.md +++ b/www/grpc/gen/docs/json-rpc.md @@ -2682,6 +2682,35 @@ Parameters has no fields. Number of outbound connections. + + + zmq_publishers + repeated object + + List of active ZeroMQ publishers. + + + + zmq_publishers[].topic + string + + The topic associated with the publisher. + + + + zmq_publishers[].address + string + + The address of the publisher. + + + + zmq_publishers[].hwm + numeric + + The high-water mark (HWM) for the publisher, indicating the +maximum number of messages to queue before dropping older ones. + diff --git a/www/grpc/gen/go/blockchain.pb.go b/www/grpc/gen/go/blockchain.pb.go index a751b96f2..327e05d5b 100644 --- a/www/grpc/gen/go/blockchain.pb.go +++ b/www/grpc/gen/go/blockchain.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: blockchain.proto @@ -142,9 +142,11 @@ type GetAccountRequest struct { func (x *GetAccountRequest) Reset() { *x = GetAccountRequest{} - mi := &file_blockchain_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetAccountRequest) String() string { @@ -155,7 +157,7 @@ func (*GetAccountRequest) ProtoMessage() {} func (x *GetAccountRequest) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -189,9 +191,11 @@ type GetAccountResponse struct { func (x *GetAccountResponse) Reset() { *x = GetAccountResponse{} - mi := &file_blockchain_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetAccountResponse) String() string { @@ -202,7 +206,7 @@ func (*GetAccountResponse) ProtoMessage() {} func (x *GetAccountResponse) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -233,9 +237,11 @@ type GetValidatorAddressesRequest struct { func (x *GetValidatorAddressesRequest) Reset() { *x = GetValidatorAddressesRequest{} - mi := &file_blockchain_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetValidatorAddressesRequest) String() string { @@ -246,7 +252,7 @@ func (*GetValidatorAddressesRequest) ProtoMessage() {} func (x *GetValidatorAddressesRequest) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -273,9 +279,11 @@ type GetValidatorAddressesResponse struct { func (x *GetValidatorAddressesResponse) Reset() { *x = GetValidatorAddressesResponse{} - mi := &file_blockchain_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetValidatorAddressesResponse) String() string { @@ -286,7 +294,7 @@ func (*GetValidatorAddressesResponse) ProtoMessage() {} func (x *GetValidatorAddressesResponse) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -320,9 +328,11 @@ type GetValidatorRequest struct { func (x *GetValidatorRequest) Reset() { *x = GetValidatorRequest{} - mi := &file_blockchain_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetValidatorRequest) String() string { @@ -333,7 +343,7 @@ func (*GetValidatorRequest) ProtoMessage() {} func (x *GetValidatorRequest) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -367,9 +377,11 @@ type GetValidatorByNumberRequest struct { func (x *GetValidatorByNumberRequest) Reset() { *x = GetValidatorByNumberRequest{} - mi := &file_blockchain_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetValidatorByNumberRequest) String() string { @@ -380,7 +392,7 @@ func (*GetValidatorByNumberRequest) ProtoMessage() {} func (x *GetValidatorByNumberRequest) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -414,9 +426,11 @@ type GetValidatorResponse struct { func (x *GetValidatorResponse) Reset() { *x = GetValidatorResponse{} - mi := &file_blockchain_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetValidatorResponse) String() string { @@ -427,7 +441,7 @@ func (*GetValidatorResponse) ProtoMessage() {} func (x *GetValidatorResponse) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -461,9 +475,11 @@ type GetPublicKeyRequest struct { func (x *GetPublicKeyRequest) Reset() { *x = GetPublicKeyRequest{} - mi := &file_blockchain_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetPublicKeyRequest) String() string { @@ -474,7 +490,7 @@ func (*GetPublicKeyRequest) ProtoMessage() {} func (x *GetPublicKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -508,9 +524,11 @@ type GetPublicKeyResponse struct { func (x *GetPublicKeyResponse) Reset() { *x = GetPublicKeyResponse{} - mi := &file_blockchain_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetPublicKeyResponse) String() string { @@ -521,7 +539,7 @@ func (*GetPublicKeyResponse) ProtoMessage() {} func (x *GetPublicKeyResponse) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -557,9 +575,11 @@ type GetBlockRequest struct { func (x *GetBlockRequest) Reset() { *x = GetBlockRequest{} - mi := &file_blockchain_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetBlockRequest) String() string { @@ -570,7 +590,7 @@ func (*GetBlockRequest) ProtoMessage() {} func (x *GetBlockRequest) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[9] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -624,9 +644,11 @@ type GetBlockResponse struct { func (x *GetBlockResponse) Reset() { *x = GetBlockResponse{} - mi := &file_blockchain_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetBlockResponse) String() string { @@ -637,7 +659,7 @@ func (*GetBlockResponse) ProtoMessage() {} func (x *GetBlockResponse) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[10] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -713,9 +735,11 @@ type GetBlockHashRequest struct { func (x *GetBlockHashRequest) Reset() { *x = GetBlockHashRequest{} - mi := &file_blockchain_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetBlockHashRequest) String() string { @@ -726,7 +750,7 @@ func (*GetBlockHashRequest) ProtoMessage() {} func (x *GetBlockHashRequest) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[11] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -760,9 +784,11 @@ type GetBlockHashResponse struct { func (x *GetBlockHashResponse) Reset() { *x = GetBlockHashResponse{} - mi := &file_blockchain_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetBlockHashResponse) String() string { @@ -773,7 +799,7 @@ func (*GetBlockHashResponse) ProtoMessage() {} func (x *GetBlockHashResponse) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[12] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -807,9 +833,11 @@ type GetBlockHeightRequest struct { func (x *GetBlockHeightRequest) Reset() { *x = GetBlockHeightRequest{} - mi := &file_blockchain_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetBlockHeightRequest) String() string { @@ -820,7 +848,7 @@ func (*GetBlockHeightRequest) ProtoMessage() {} func (x *GetBlockHeightRequest) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[13] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -854,9 +882,11 @@ type GetBlockHeightResponse struct { func (x *GetBlockHeightResponse) Reset() { *x = GetBlockHeightResponse{} - mi := &file_blockchain_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetBlockHeightResponse) String() string { @@ -867,7 +897,7 @@ func (*GetBlockHeightResponse) ProtoMessage() {} func (x *GetBlockHeightResponse) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[14] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -898,9 +928,11 @@ type GetBlockchainInfoRequest struct { func (x *GetBlockchainInfoRequest) Reset() { *x = GetBlockchainInfoRequest{} - mi := &file_blockchain_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetBlockchainInfoRequest) String() string { @@ -911,7 +943,7 @@ func (*GetBlockchainInfoRequest) ProtoMessage() {} func (x *GetBlockchainInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[15] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -956,9 +988,11 @@ type GetBlockchainInfoResponse struct { func (x *GetBlockchainInfoResponse) Reset() { *x = GetBlockchainInfoResponse{} - mi := &file_blockchain_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetBlockchainInfoResponse) String() string { @@ -969,7 +1003,7 @@ func (*GetBlockchainInfoResponse) ProtoMessage() {} func (x *GetBlockchainInfoResponse) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[16] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1063,9 +1097,11 @@ type GetConsensusInfoRequest struct { func (x *GetConsensusInfoRequest) Reset() { *x = GetConsensusInfoRequest{} - mi := &file_blockchain_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetConsensusInfoRequest) String() string { @@ -1076,7 +1112,7 @@ func (*GetConsensusInfoRequest) ProtoMessage() {} func (x *GetConsensusInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[17] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1105,9 +1141,11 @@ type GetConsensusInfoResponse struct { func (x *GetConsensusInfoResponse) Reset() { *x = GetConsensusInfoResponse{} - mi := &file_blockchain_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetConsensusInfoResponse) String() string { @@ -1118,7 +1156,7 @@ func (*GetConsensusInfoResponse) ProtoMessage() {} func (x *GetConsensusInfoResponse) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[18] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1160,9 +1198,11 @@ type GetTxPoolContentRequest struct { func (x *GetTxPoolContentRequest) Reset() { *x = GetTxPoolContentRequest{} - mi := &file_blockchain_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetTxPoolContentRequest) String() string { @@ -1173,7 +1213,7 @@ func (*GetTxPoolContentRequest) ProtoMessage() {} func (x *GetTxPoolContentRequest) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[19] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1207,9 +1247,11 @@ type GetTxPoolContentResponse struct { func (x *GetTxPoolContentResponse) Reset() { *x = GetTxPoolContentResponse{} - mi := &file_blockchain_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetTxPoolContentResponse) String() string { @@ -1220,7 +1262,7 @@ func (*GetTxPoolContentResponse) ProtoMessage() {} func (x *GetTxPoolContentResponse) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[20] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1272,9 +1314,11 @@ type ValidatorInfo struct { func (x *ValidatorInfo) Reset() { *x = ValidatorInfo{} - mi := &file_blockchain_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ValidatorInfo) String() string { @@ -1285,7 +1329,7 @@ func (*ValidatorInfo) ProtoMessage() {} func (x *ValidatorInfo) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[21] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1390,9 +1434,11 @@ type AccountInfo struct { func (x *AccountInfo) Reset() { *x = AccountInfo{} - mi := &file_blockchain_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *AccountInfo) String() string { @@ -1403,7 +1449,7 @@ func (*AccountInfo) ProtoMessage() {} func (x *AccountInfo) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[22] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1473,9 +1519,11 @@ type BlockHeaderInfo struct { func (x *BlockHeaderInfo) Reset() { *x = BlockHeaderInfo{} - mi := &file_blockchain_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *BlockHeaderInfo) String() string { @@ -1486,7 +1534,7 @@ func (*BlockHeaderInfo) ProtoMessage() {} func (x *BlockHeaderInfo) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[23] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1556,9 +1604,11 @@ type CertificateInfo struct { func (x *CertificateInfo) Reset() { *x = CertificateInfo{} - mi := &file_blockchain_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CertificateInfo) String() string { @@ -1569,7 +1619,7 @@ func (*CertificateInfo) ProtoMessage() {} func (x *CertificateInfo) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[24] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1641,9 +1691,11 @@ type VoteInfo struct { func (x *VoteInfo) Reset() { *x = VoteInfo{} - mi := &file_blockchain_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *VoteInfo) String() string { @@ -1654,7 +1706,7 @@ func (*VoteInfo) ProtoMessage() {} func (x *VoteInfo) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[25] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1732,9 +1784,11 @@ type ConsensusInfo struct { func (x *ConsensusInfo) Reset() { *x = ConsensusInfo{} - mi := &file_blockchain_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ConsensusInfo) String() string { @@ -1745,7 +1799,7 @@ func (*ConsensusInfo) ProtoMessage() {} func (x *ConsensusInfo) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[26] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1813,9 +1867,11 @@ type ProposalInfo struct { func (x *ProposalInfo) Reset() { *x = ProposalInfo{} - mi := &file_blockchain_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProposalInfo) String() string { @@ -1826,7 +1882,7 @@ func (*ProposalInfo) ProtoMessage() {} func (x *ProposalInfo) ProtoReflect() protoreflect.Message { mi := &file_blockchain_proto_msgTypes[27] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2242,6 +2298,344 @@ func file_blockchain_proto_init() { return } file_transaction_proto_init() + if !protoimpl.UnsafeEnabled { + file_blockchain_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetAccountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetAccountResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*GetValidatorAddressesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*GetValidatorAddressesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*GetValidatorRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*GetValidatorByNumberRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*GetValidatorResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*GetPublicKeyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*GetPublicKeyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*GetBlockRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*GetBlockResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*GetBlockHashRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*GetBlockHashResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*GetBlockHeightRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*GetBlockHeightResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*GetBlockchainInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[16].Exporter = func(v any, i int) any { + switch v := v.(*GetBlockchainInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[17].Exporter = func(v any, i int) any { + switch v := v.(*GetConsensusInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[18].Exporter = func(v any, i int) any { + switch v := v.(*GetConsensusInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[19].Exporter = func(v any, i int) any { + switch v := v.(*GetTxPoolContentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[20].Exporter = func(v any, i int) any { + switch v := v.(*GetTxPoolContentResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[21].Exporter = func(v any, i int) any { + switch v := v.(*ValidatorInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[22].Exporter = func(v any, i int) any { + switch v := v.(*AccountInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[23].Exporter = func(v any, i int) any { + switch v := v.(*BlockHeaderInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[24].Exporter = func(v any, i int) any { + switch v := v.(*CertificateInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[25].Exporter = func(v any, i int) any { + switch v := v.(*VoteInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[26].Exporter = func(v any, i int) any { + switch v := v.(*ConsensusInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[27].Exporter = func(v any, i int) any { + switch v := v.(*ProposalInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/www/grpc/gen/go/blockchain_grpc.pb.go b/www/grpc/gen/go/blockchain_grpc.pb.go index e78ae8cba..115ac61a4 100644 --- a/www/grpc/gen/go/blockchain_grpc.pb.go +++ b/www/grpc/gen/go/blockchain_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 +// - protoc-gen-go-grpc v1.4.0 // - protoc (unknown) // source: blockchain.proto @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 const ( Blockchain_GetBlock_FullMethodName = "/pactus.Blockchain/GetBlock" @@ -187,7 +187,7 @@ func (c *blockchainClient) GetTxPoolContent(ctx context.Context, in *GetTxPoolCo // BlockchainServer is the server API for Blockchain service. // All implementations should embed UnimplementedBlockchainServer -// for forward compatibility. +// for forward compatibility // // Blockchain service defines RPC methods for interacting with the blockchain. type BlockchainServer interface { @@ -220,12 +220,9 @@ type BlockchainServer interface { GetTxPoolContent(context.Context, *GetTxPoolContentRequest) (*GetTxPoolContentResponse, error) } -// UnimplementedBlockchainServer should be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedBlockchainServer struct{} +// UnimplementedBlockchainServer should be embedded to have forward compatible implementations. +type UnimplementedBlockchainServer struct { +} func (UnimplementedBlockchainServer) GetBlock(context.Context, *GetBlockRequest) (*GetBlockResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetBlock not implemented") @@ -260,7 +257,6 @@ func (UnimplementedBlockchainServer) GetPublicKey(context.Context, *GetPublicKey func (UnimplementedBlockchainServer) GetTxPoolContent(context.Context, *GetTxPoolContentRequest) (*GetTxPoolContentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetTxPoolContent not implemented") } -func (UnimplementedBlockchainServer) testEmbeddedByValue() {} // UnsafeBlockchainServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to BlockchainServer will @@ -270,13 +266,6 @@ type UnsafeBlockchainServer interface { } func RegisterBlockchainServer(s grpc.ServiceRegistrar, srv BlockchainServer) { - // If the following call pancis, it indicates UnimplementedBlockchainServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } s.RegisterService(&Blockchain_ServiceDesc, srv) } diff --git a/www/grpc/gen/go/network.pb.go b/www/grpc/gen/go/network.pb.go index dcbb39f24..32b94d23d 100644 --- a/www/grpc/gen/go/network.pb.go +++ b/www/grpc/gen/go/network.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: network.proto @@ -32,9 +32,11 @@ type GetNetworkInfoRequest struct { func (x *GetNetworkInfoRequest) Reset() { *x = GetNetworkInfoRequest{} - mi := &file_network_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_network_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetNetworkInfoRequest) String() string { @@ -45,7 +47,7 @@ func (*GetNetworkInfoRequest) ProtoMessage() {} func (x *GetNetworkInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_network_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -85,9 +87,11 @@ type GetNetworkInfoResponse struct { func (x *GetNetworkInfoResponse) Reset() { *x = GetNetworkInfoResponse{} - mi := &file_network_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_network_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetNetworkInfoResponse) String() string { @@ -98,7 +102,7 @@ func (*GetNetworkInfoResponse) ProtoMessage() {} func (x *GetNetworkInfoResponse) ProtoReflect() protoreflect.Message { mi := &file_network_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -150,9 +154,11 @@ type GetNodeInfoRequest struct { func (x *GetNodeInfoRequest) Reset() { *x = GetNodeInfoRequest{} - mi := &file_network_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_network_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetNodeInfoRequest) String() string { @@ -163,7 +169,7 @@ func (*GetNodeInfoRequest) ProtoMessage() {} func (x *GetNodeInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_network_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -206,13 +212,17 @@ type GetNodeInfoResponse struct { ClockOffset float64 `protobuf:"fixed64,13,opt,name=clock_offset,json=clockOffset,proto3" json:"clock_offset,omitempty"` // Information about the node's connections. ConnectionInfo *ConnectionInfo `protobuf:"bytes,14,opt,name=connection_info,json=connectionInfo,proto3" json:"connection_info,omitempty"` + // List of active ZeroMQ publishers. + ZmqPublishers []*ZMQPublisherInfo `protobuf:"bytes,15,rep,name=zmq_publishers,json=zmqPublishers,proto3" json:"zmq_publishers,omitempty"` } func (x *GetNodeInfoResponse) Reset() { *x = GetNodeInfoResponse{} - mi := &file_network_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_network_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetNodeInfoResponse) String() string { @@ -223,7 +233,7 @@ func (*GetNodeInfoResponse) ProtoMessage() {} func (x *GetNodeInfoResponse) ProtoReflect() protoreflect.Message { mi := &file_network_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -315,6 +325,80 @@ func (x *GetNodeInfoResponse) GetConnectionInfo() *ConnectionInfo { return nil } +func (x *GetNodeInfoResponse) GetZmqPublishers() []*ZMQPublisherInfo { + if x != nil { + return x.ZmqPublishers + } + return nil +} + +type ZMQPublisherInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The topic associated with the publisher. + Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` + // The address of the publisher. + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // The high-water mark (HWM) for the publisher, indicating the + // maximum number of messages to queue before dropping older ones. + Hwm int32 `protobuf:"varint,3,opt,name=hwm,proto3" json:"hwm,omitempty"` +} + +func (x *ZMQPublisherInfo) Reset() { + *x = ZMQPublisherInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_network_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ZMQPublisherInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ZMQPublisherInfo) ProtoMessage() {} + +func (x *ZMQPublisherInfo) ProtoReflect() protoreflect.Message { + mi := &file_network_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ZMQPublisherInfo.ProtoReflect.Descriptor instead. +func (*ZMQPublisherInfo) Descriptor() ([]byte, []int) { + return file_network_proto_rawDescGZIP(), []int{4} +} + +func (x *ZMQPublisherInfo) GetTopic() string { + if x != nil { + return x.Topic + } + return "" +} + +func (x *ZMQPublisherInfo) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *ZMQPublisherInfo) GetHwm() int32 { + if x != nil { + return x.Hwm + } + return 0 +} + // Information about a peer in the network. type PeerInfo struct { state protoimpl.MessageState @@ -359,9 +443,11 @@ type PeerInfo struct { func (x *PeerInfo) Reset() { *x = PeerInfo{} - mi := &file_network_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_network_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PeerInfo) String() string { @@ -371,8 +457,8 @@ func (x *PeerInfo) String() string { func (*PeerInfo) ProtoMessage() {} func (x *PeerInfo) ProtoReflect() protoreflect.Message { - mi := &file_network_proto_msgTypes[4] - if x != nil { + mi := &file_network_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -384,7 +470,7 @@ func (x *PeerInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use PeerInfo.ProtoReflect.Descriptor instead. func (*PeerInfo) Descriptor() ([]byte, []int) { - return file_network_proto_rawDescGZIP(), []int{4} + return file_network_proto_rawDescGZIP(), []int{5} } func (x *PeerInfo) GetStatus() int32 { @@ -522,9 +608,11 @@ type ConnectionInfo struct { func (x *ConnectionInfo) Reset() { *x = ConnectionInfo{} - mi := &file_network_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_network_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ConnectionInfo) String() string { @@ -534,8 +622,8 @@ func (x *ConnectionInfo) String() string { func (*ConnectionInfo) ProtoMessage() {} func (x *ConnectionInfo) ProtoReflect() protoreflect.Message { - mi := &file_network_proto_msgTypes[5] - if x != nil { + mi := &file_network_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -547,7 +635,7 @@ func (x *ConnectionInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ConnectionInfo.ProtoReflect.Descriptor instead. func (*ConnectionInfo) Descriptor() ([]byte, []int) { - return file_network_proto_rawDescGZIP(), []int{5} + return file_network_proto_rawDescGZIP(), []int{6} } func (x *ConnectionInfo) GetConnections() uint64 { @@ -591,9 +679,11 @@ type MetricInfo struct { func (x *MetricInfo) Reset() { *x = MetricInfo{} - mi := &file_network_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_network_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *MetricInfo) String() string { @@ -603,8 +693,8 @@ func (x *MetricInfo) String() string { func (*MetricInfo) ProtoMessage() {} func (x *MetricInfo) ProtoReflect() protoreflect.Message { - mi := &file_network_proto_msgTypes[6] - if x != nil { + mi := &file_network_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -616,7 +706,7 @@ func (x *MetricInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use MetricInfo.ProtoReflect.Descriptor instead. func (*MetricInfo) Descriptor() ([]byte, []int) { - return file_network_proto_rawDescGZIP(), []int{6} + return file_network_proto_rawDescGZIP(), []int{7} } func (x *MetricInfo) GetTotalInvalid() *CounterInfo { @@ -668,9 +758,11 @@ type CounterInfo struct { func (x *CounterInfo) Reset() { *x = CounterInfo{} - mi := &file_network_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_network_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CounterInfo) String() string { @@ -680,8 +772,8 @@ func (x *CounterInfo) String() string { func (*CounterInfo) ProtoMessage() {} func (x *CounterInfo) ProtoReflect() protoreflect.Message { - mi := &file_network_proto_msgTypes[7] - if x != nil { + mi := &file_network_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -693,7 +785,7 @@ func (x *CounterInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use CounterInfo.ProtoReflect.Descriptor instead. func (*CounterInfo) Descriptor() ([]byte, []int) { - return file_network_proto_rawDescGZIP(), []int{7} + return file_network_proto_rawDescGZIP(), []int{8} } func (x *CounterInfo) GetBytes() uint64 { @@ -734,7 +826,7 @@ var file_network_proto_rawDesc = []byte{ 0x75, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, - 0x87, 0x03, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0xc8, 0x03, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, @@ -758,104 +850,113 @@ var file_network_proto_rawDesc = []byte{ 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xc2, 0x04, 0x0a, 0x08, 0x50, 0x65, - 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, - 0x0a, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x17, - 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x73, 0x65, - 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0d, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x2f, - 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x63, 0x6f, 0x6e, - 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, - 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6c, - 0x61, 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, - 0x61, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, - 0x61, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, - 0x6c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, - 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x12, 0x18, 0x0a, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x63, 0x6f, - 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, - 0x64, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x33, 0x0a, 0x0b, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x96, - 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x12, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x31, 0x0a, 0x14, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, - 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x13, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xfb, 0x03, 0x0a, 0x0a, 0x4d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x37, 0x0a, 0x0c, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x49, - 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, - 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x0c, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x12, - 0x31, 0x0a, 0x09, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, - 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x0d, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x65, 0x69, - 0x76, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, - 0x75, 0x73, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0d, - 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x12, 0x45, 0x0a, - 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, - 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x53, 0x65, 0x6e, 0x74, 0x12, 0x51, 0x0a, 0x0f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x49, 0x6e, 0x66, - 0x6f, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x1a, 0x53, 0x0a, 0x10, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x53, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3f, 0x0a, 0x0e, 0x7a, 0x6d, 0x71, + 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x5a, 0x4d, 0x51, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0d, 0x7a, 0x6d, 0x71, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x22, 0x54, 0x0a, 0x10, 0x5a, 0x4d, + 0x51, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, + 0x6f, 0x70, 0x69, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, + 0x0a, 0x03, 0x68, 0x77, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x68, 0x77, 0x6d, + 0x22, 0xc2, 0x04, 0x0a, 0x08, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x12, + 0x14, 0x0a, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, + 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x73, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, + 0x73, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, + 0x75, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6c, 0x61, 0x73, + 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x12, + 0x23, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1c, + 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0f, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x73, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x63, + 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x33, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x96, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x69, 0x6e, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x31, 0x0a, 0x14, 0x6f, + 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x6f, 0x75, 0x74, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xfb, + 0x03, 0x0a, 0x0a, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x37, 0x0a, + 0x0c, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x49, + 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x31, 0x0a, 0x09, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, + 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, + 0x75, 0x73, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, + 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x0d, 0x54, 0x6f, 0x74, + 0x61, 0x6c, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0d, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x12, 0x45, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, + 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70, 0x61, 0x63, 0x74, + 0x75, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x51, 0x0a, 0x0f, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x1a, 0x53, + 0x0a, 0x10, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x1a, 0x57, 0x0a, 0x14, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x57, 0x0a, 0x14, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3d, 0x0a, 0x0b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x05, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x42, 0x75, - 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x42, 0x75, 0x6e, - 0x64, 0x6c, 0x65, 0x73, 0x32, 0xa2, 0x01, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x12, 0x4f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, - 0x66, 0x6f, 0x12, 0x1d, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x1a, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, - 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x42, 0x0a, 0x0e, 0x70, 0x61, 0x63, - 0x74, 0x75, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5a, 0x30, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2d, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2f, 0x77, 0x77, - 0x77, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3d, 0x0a, 0x0b, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x42, + 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x42, 0x79, 0x74, 0x65, + 0x73, 0x12, 0x18, 0x0a, 0x07, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x07, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x32, 0xa2, 0x01, 0x0a, 0x07, + 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x4f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x2e, 0x70, 0x61, 0x63, 0x74, + 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, + 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4e, + 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, + 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, + 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x42, 0x42, 0x0a, 0x0e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, + 0x61, 0x63, 0x74, 0x75, 0x73, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x70, 0x61, + 0x63, 0x74, 0x75, 0x73, 0x2f, 0x77, 0x77, 0x77, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, + 0x63, 0x74, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -870,40 +971,42 @@ func file_network_proto_rawDescGZIP() []byte { return file_network_proto_rawDescData } -var file_network_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_network_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_network_proto_goTypes = []any{ (*GetNetworkInfoRequest)(nil), // 0: pactus.GetNetworkInfoRequest (*GetNetworkInfoResponse)(nil), // 1: pactus.GetNetworkInfoResponse (*GetNodeInfoRequest)(nil), // 2: pactus.GetNodeInfoRequest (*GetNodeInfoResponse)(nil), // 3: pactus.GetNodeInfoResponse - (*PeerInfo)(nil), // 4: pactus.PeerInfo - (*ConnectionInfo)(nil), // 5: pactus.ConnectionInfo - (*MetricInfo)(nil), // 6: pactus.MetricInfo - (*CounterInfo)(nil), // 7: pactus.CounterInfo - nil, // 8: pactus.MetricInfo.MessageSentEntry - nil, // 9: pactus.MetricInfo.MessageReceivedEntry + (*ZMQPublisherInfo)(nil), // 4: pactus.ZMQPublisherInfo + (*PeerInfo)(nil), // 5: pactus.PeerInfo + (*ConnectionInfo)(nil), // 6: pactus.ConnectionInfo + (*MetricInfo)(nil), // 7: pactus.MetricInfo + (*CounterInfo)(nil), // 8: pactus.CounterInfo + nil, // 9: pactus.MetricInfo.MessageSentEntry + nil, // 10: pactus.MetricInfo.MessageReceivedEntry } var file_network_proto_depIdxs = []int32{ - 4, // 0: pactus.GetNetworkInfoResponse.connected_peers:type_name -> pactus.PeerInfo - 6, // 1: pactus.GetNetworkInfoResponse.metric_info:type_name -> pactus.MetricInfo - 5, // 2: pactus.GetNodeInfoResponse.connection_info:type_name -> pactus.ConnectionInfo - 6, // 3: pactus.PeerInfo.metric_info:type_name -> pactus.MetricInfo - 7, // 4: pactus.MetricInfo.TotalInvalid:type_name -> pactus.CounterInfo - 7, // 5: pactus.MetricInfo.TotalSent:type_name -> pactus.CounterInfo - 7, // 6: pactus.MetricInfo.TotalReceived:type_name -> pactus.CounterInfo - 8, // 7: pactus.MetricInfo.MessageSent:type_name -> pactus.MetricInfo.MessageSentEntry - 9, // 8: pactus.MetricInfo.MessageReceived:type_name -> pactus.MetricInfo.MessageReceivedEntry - 7, // 9: pactus.MetricInfo.MessageSentEntry.value:type_name -> pactus.CounterInfo - 7, // 10: pactus.MetricInfo.MessageReceivedEntry.value:type_name -> pactus.CounterInfo - 0, // 11: pactus.Network.GetNetworkInfo:input_type -> pactus.GetNetworkInfoRequest - 2, // 12: pactus.Network.GetNodeInfo:input_type -> pactus.GetNodeInfoRequest - 1, // 13: pactus.Network.GetNetworkInfo:output_type -> pactus.GetNetworkInfoResponse - 3, // 14: pactus.Network.GetNodeInfo:output_type -> pactus.GetNodeInfoResponse - 13, // [13:15] is the sub-list for method output_type - 11, // [11:13] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name + 5, // 0: pactus.GetNetworkInfoResponse.connected_peers:type_name -> pactus.PeerInfo + 7, // 1: pactus.GetNetworkInfoResponse.metric_info:type_name -> pactus.MetricInfo + 6, // 2: pactus.GetNodeInfoResponse.connection_info:type_name -> pactus.ConnectionInfo + 4, // 3: pactus.GetNodeInfoResponse.zmq_publishers:type_name -> pactus.ZMQPublisherInfo + 7, // 4: pactus.PeerInfo.metric_info:type_name -> pactus.MetricInfo + 8, // 5: pactus.MetricInfo.TotalInvalid:type_name -> pactus.CounterInfo + 8, // 6: pactus.MetricInfo.TotalSent:type_name -> pactus.CounterInfo + 8, // 7: pactus.MetricInfo.TotalReceived:type_name -> pactus.CounterInfo + 9, // 8: pactus.MetricInfo.MessageSent:type_name -> pactus.MetricInfo.MessageSentEntry + 10, // 9: pactus.MetricInfo.MessageReceived:type_name -> pactus.MetricInfo.MessageReceivedEntry + 8, // 10: pactus.MetricInfo.MessageSentEntry.value:type_name -> pactus.CounterInfo + 8, // 11: pactus.MetricInfo.MessageReceivedEntry.value:type_name -> pactus.CounterInfo + 0, // 12: pactus.Network.GetNetworkInfo:input_type -> pactus.GetNetworkInfoRequest + 2, // 13: pactus.Network.GetNodeInfo:input_type -> pactus.GetNodeInfoRequest + 1, // 14: pactus.Network.GetNetworkInfo:output_type -> pactus.GetNetworkInfoResponse + 3, // 15: pactus.Network.GetNodeInfo:output_type -> pactus.GetNodeInfoResponse + 14, // [14:16] is the sub-list for method output_type + 12, // [12:14] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name } func init() { file_network_proto_init() } @@ -911,13 +1014,123 @@ func file_network_proto_init() { if File_network_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_network_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetNetworkInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_network_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetNetworkInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_network_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*GetNodeInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_network_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*GetNodeInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_network_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*ZMQPublisherInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_network_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*PeerInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_network_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*ConnectionInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_network_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*MetricInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_network_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*CounterInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_network_proto_rawDesc, NumEnums: 0, - NumMessages: 10, + NumMessages: 11, NumExtensions: 0, NumServices: 1, }, diff --git a/www/grpc/gen/go/network_grpc.pb.go b/www/grpc/gen/go/network_grpc.pb.go index 51cba8b78..19900a7dd 100644 --- a/www/grpc/gen/go/network_grpc.pb.go +++ b/www/grpc/gen/go/network_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 +// - protoc-gen-go-grpc v1.4.0 // - protoc (unknown) // source: network.proto @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 const ( Network_GetNetworkInfo_FullMethodName = "/pactus.Network/GetNetworkInfo" @@ -65,7 +65,7 @@ func (c *networkClient) GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, // NetworkServer is the server API for Network service. // All implementations should embed UnimplementedNetworkServer -// for forward compatibility. +// for forward compatibility // // Network service provides RPCs for retrieving information about the network. type NetworkServer interface { @@ -75,12 +75,9 @@ type NetworkServer interface { GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoResponse, error) } -// UnimplementedNetworkServer should be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedNetworkServer struct{} +// UnimplementedNetworkServer should be embedded to have forward compatible implementations. +type UnimplementedNetworkServer struct { +} func (UnimplementedNetworkServer) GetNetworkInfo(context.Context, *GetNetworkInfoRequest) (*GetNetworkInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetNetworkInfo not implemented") @@ -88,7 +85,6 @@ func (UnimplementedNetworkServer) GetNetworkInfo(context.Context, *GetNetworkInf func (UnimplementedNetworkServer) GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetNodeInfo not implemented") } -func (UnimplementedNetworkServer) testEmbeddedByValue() {} // UnsafeNetworkServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to NetworkServer will @@ -98,13 +94,6 @@ type UnsafeNetworkServer interface { } func RegisterNetworkServer(s grpc.ServiceRegistrar, srv NetworkServer) { - // If the following call pancis, it indicates UnimplementedNetworkServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } s.RegisterService(&Network_ServiceDesc, srv) } diff --git a/www/grpc/gen/go/transaction.pb.go b/www/grpc/gen/go/transaction.pb.go index a7105f43f..34e0717c3 100644 --- a/www/grpc/gen/go/transaction.pb.go +++ b/www/grpc/gen/go/transaction.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: transaction.proto @@ -148,9 +148,11 @@ type GetTransactionRequest struct { func (x *GetTransactionRequest) Reset() { *x = GetTransactionRequest{} - mi := &file_transaction_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetTransactionRequest) String() string { @@ -161,7 +163,7 @@ func (*GetTransactionRequest) ProtoMessage() {} func (x *GetTransactionRequest) ProtoReflect() protoreflect.Message { mi := &file_transaction_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -206,9 +208,11 @@ type GetTransactionResponse struct { func (x *GetTransactionResponse) Reset() { *x = GetTransactionResponse{} - mi := &file_transaction_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetTransactionResponse) String() string { @@ -219,7 +223,7 @@ func (*GetTransactionResponse) ProtoMessage() {} func (x *GetTransactionResponse) ProtoReflect() protoreflect.Message { mi := &file_transaction_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -271,9 +275,11 @@ type CalculateFeeRequest struct { func (x *CalculateFeeRequest) Reset() { *x = CalculateFeeRequest{} - mi := &file_transaction_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CalculateFeeRequest) String() string { @@ -284,7 +290,7 @@ func (*CalculateFeeRequest) ProtoMessage() {} func (x *CalculateFeeRequest) ProtoReflect() protoreflect.Message { mi := &file_transaction_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -334,9 +340,11 @@ type CalculateFeeResponse struct { func (x *CalculateFeeResponse) Reset() { *x = CalculateFeeResponse{} - mi := &file_transaction_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CalculateFeeResponse) String() string { @@ -347,7 +355,7 @@ func (*CalculateFeeResponse) ProtoMessage() {} func (x *CalculateFeeResponse) ProtoReflect() protoreflect.Message { mi := &file_transaction_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -388,9 +396,11 @@ type BroadcastTransactionRequest struct { func (x *BroadcastTransactionRequest) Reset() { *x = BroadcastTransactionRequest{} - mi := &file_transaction_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *BroadcastTransactionRequest) String() string { @@ -401,7 +411,7 @@ func (*BroadcastTransactionRequest) ProtoMessage() {} func (x *BroadcastTransactionRequest) ProtoReflect() protoreflect.Message { mi := &file_transaction_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -435,9 +445,11 @@ type BroadcastTransactionResponse struct { func (x *BroadcastTransactionResponse) Reset() { *x = BroadcastTransactionResponse{} - mi := &file_transaction_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *BroadcastTransactionResponse) String() string { @@ -448,7 +460,7 @@ func (*BroadcastTransactionResponse) ProtoMessage() {} func (x *BroadcastTransactionResponse) ProtoReflect() protoreflect.Message { mi := &file_transaction_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -493,9 +505,11 @@ type GetRawTransferTransactionRequest struct { func (x *GetRawTransferTransactionRequest) Reset() { *x = GetRawTransferTransactionRequest{} - mi := &file_transaction_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetRawTransferTransactionRequest) String() string { @@ -506,7 +520,7 @@ func (*GetRawTransferTransactionRequest) ProtoMessage() {} func (x *GetRawTransferTransactionRequest) ProtoReflect() protoreflect.Message { mi := &file_transaction_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -588,9 +602,11 @@ type GetRawBondTransactionRequest struct { func (x *GetRawBondTransactionRequest) Reset() { *x = GetRawBondTransactionRequest{} - mi := &file_transaction_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetRawBondTransactionRequest) String() string { @@ -601,7 +617,7 @@ func (*GetRawBondTransactionRequest) ProtoMessage() {} func (x *GetRawBondTransactionRequest) ProtoReflect() protoreflect.Message { mi := &file_transaction_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -682,9 +698,11 @@ type GetRawUnbondTransactionRequest struct { func (x *GetRawUnbondTransactionRequest) Reset() { *x = GetRawUnbondTransactionRequest{} - mi := &file_transaction_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetRawUnbondTransactionRequest) String() string { @@ -695,7 +713,7 @@ func (*GetRawUnbondTransactionRequest) ProtoMessage() {} func (x *GetRawUnbondTransactionRequest) ProtoReflect() protoreflect.Message { mi := &file_transaction_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -754,9 +772,11 @@ type GetRawWithdrawTransactionRequest struct { func (x *GetRawWithdrawTransactionRequest) Reset() { *x = GetRawWithdrawTransactionRequest{} - mi := &file_transaction_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetRawWithdrawTransactionRequest) String() string { @@ -767,7 +787,7 @@ func (*GetRawWithdrawTransactionRequest) ProtoMessage() {} func (x *GetRawWithdrawTransactionRequest) ProtoReflect() protoreflect.Message { mi := &file_transaction_proto_msgTypes[9] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -838,9 +858,11 @@ type GetRawTransactionResponse struct { func (x *GetRawTransactionResponse) Reset() { *x = GetRawTransactionResponse{} - mi := &file_transaction_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetRawTransactionResponse) String() string { @@ -851,7 +873,7 @@ func (*GetRawTransactionResponse) ProtoMessage() {} func (x *GetRawTransactionResponse) ProtoReflect() protoreflect.Message { mi := &file_transaction_proto_msgTypes[10] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -896,9 +918,11 @@ type PayloadTransfer struct { func (x *PayloadTransfer) Reset() { *x = PayloadTransfer{} - mi := &file_transaction_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PayloadTransfer) String() string { @@ -909,7 +933,7 @@ func (*PayloadTransfer) ProtoMessage() {} func (x *PayloadTransfer) ProtoReflect() protoreflect.Message { mi := &file_transaction_proto_msgTypes[11] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -963,9 +987,11 @@ type PayloadBond struct { func (x *PayloadBond) Reset() { *x = PayloadBond{} - mi := &file_transaction_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PayloadBond) String() string { @@ -976,7 +1002,7 @@ func (*PayloadBond) ProtoMessage() {} func (x *PayloadBond) ProtoReflect() protoreflect.Message { mi := &file_transaction_proto_msgTypes[12] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1033,9 +1059,11 @@ type PayloadSortition struct { func (x *PayloadSortition) Reset() { *x = PayloadSortition{} - mi := &file_transaction_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PayloadSortition) String() string { @@ -1046,7 +1074,7 @@ func (*PayloadSortition) ProtoMessage() {} func (x *PayloadSortition) ProtoReflect() protoreflect.Message { mi := &file_transaction_proto_msgTypes[13] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1087,9 +1115,11 @@ type PayloadUnbond struct { func (x *PayloadUnbond) Reset() { *x = PayloadUnbond{} - mi := &file_transaction_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PayloadUnbond) String() string { @@ -1100,7 +1130,7 @@ func (*PayloadUnbond) ProtoMessage() {} func (x *PayloadUnbond) ProtoReflect() protoreflect.Message { mi := &file_transaction_proto_msgTypes[14] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1138,9 +1168,11 @@ type PayloadWithdraw struct { func (x *PayloadWithdraw) Reset() { *x = PayloadWithdraw{} - mi := &file_transaction_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PayloadWithdraw) String() string { @@ -1151,7 +1183,7 @@ func (*PayloadWithdraw) ProtoMessage() {} func (x *PayloadWithdraw) ProtoReflect() protoreflect.Message { mi := &file_transaction_proto_msgTypes[15] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1225,9 +1257,11 @@ type TransactionInfo struct { func (x *TransactionInfo) Reset() { *x = TransactionInfo{} - mi := &file_transaction_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TransactionInfo) String() string { @@ -1238,7 +1272,7 @@ func (*TransactionInfo) ProtoMessage() {} func (x *TransactionInfo) ProtoReflect() protoreflect.Message { mi := &file_transaction_proto_msgTypes[16] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1694,6 +1728,212 @@ func file_transaction_proto_init() { if File_transaction_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_transaction_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetTransactionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetTransactionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*CalculateFeeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*CalculateFeeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*BroadcastTransactionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*BroadcastTransactionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*GetRawTransferTransactionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*GetRawBondTransactionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*GetRawUnbondTransactionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*GetRawWithdrawTransactionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*GetRawTransactionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*PayloadTransfer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*PayloadBond); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*PayloadSortition); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*PayloadUnbond); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*PayloadWithdraw); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[16].Exporter = func(v any, i int) any { + switch v := v.(*TransactionInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } file_transaction_proto_msgTypes[16].OneofWrappers = []any{ (*TransactionInfo_Transfer)(nil), (*TransactionInfo_Bond)(nil), diff --git a/www/grpc/gen/go/transaction_grpc.pb.go b/www/grpc/gen/go/transaction_grpc.pb.go index aa41869d6..a561a93da 100644 --- a/www/grpc/gen/go/transaction_grpc.pb.go +++ b/www/grpc/gen/go/transaction_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 +// - protoc-gen-go-grpc v1.4.0 // - protoc (unknown) // source: transaction.proto @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 const ( Transaction_GetTransaction_FullMethodName = "/pactus.Transaction/GetTransaction" @@ -133,7 +133,7 @@ func (c *transactionClient) GetRawWithdrawTransaction(ctx context.Context, in *G // TransactionServer is the server API for Transaction service. // All implementations should embed UnimplementedTransactionServer -// for forward compatibility. +// for forward compatibility // // Transaction service defines various RPC methods for interacting with // transactions. @@ -156,12 +156,9 @@ type TransactionServer interface { GetRawWithdrawTransaction(context.Context, *GetRawWithdrawTransactionRequest) (*GetRawTransactionResponse, error) } -// UnimplementedTransactionServer should be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedTransactionServer struct{} +// UnimplementedTransactionServer should be embedded to have forward compatible implementations. +type UnimplementedTransactionServer struct { +} func (UnimplementedTransactionServer) GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetTransaction not implemented") @@ -184,7 +181,6 @@ func (UnimplementedTransactionServer) GetRawUnbondTransaction(context.Context, * func (UnimplementedTransactionServer) GetRawWithdrawTransaction(context.Context, *GetRawWithdrawTransactionRequest) (*GetRawTransactionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetRawWithdrawTransaction not implemented") } -func (UnimplementedTransactionServer) testEmbeddedByValue() {} // UnsafeTransactionServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to TransactionServer will @@ -194,13 +190,6 @@ type UnsafeTransactionServer interface { } func RegisterTransactionServer(s grpc.ServiceRegistrar, srv TransactionServer) { - // If the following call pancis, it indicates UnimplementedTransactionServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } s.RegisterService(&Transaction_ServiceDesc, srv) } diff --git a/www/grpc/gen/go/utils.pb.go b/www/grpc/gen/go/utils.pb.go index 6af5a48b1..13bc1fde8 100644 --- a/www/grpc/gen/go/utils.pb.go +++ b/www/grpc/gen/go/utils.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: utils.proto @@ -34,9 +34,11 @@ type SignMessageWithPrivateKeyRequest struct { func (x *SignMessageWithPrivateKeyRequest) Reset() { *x = SignMessageWithPrivateKeyRequest{} - mi := &file_utils_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_utils_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SignMessageWithPrivateKeyRequest) String() string { @@ -47,7 +49,7 @@ func (*SignMessageWithPrivateKeyRequest) ProtoMessage() {} func (x *SignMessageWithPrivateKeyRequest) ProtoReflect() protoreflect.Message { mi := &file_utils_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -88,9 +90,11 @@ type SignMessageWithPrivateKeyResponse struct { func (x *SignMessageWithPrivateKeyResponse) Reset() { *x = SignMessageWithPrivateKeyResponse{} - mi := &file_utils_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_utils_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SignMessageWithPrivateKeyResponse) String() string { @@ -101,7 +105,7 @@ func (*SignMessageWithPrivateKeyResponse) ProtoMessage() {} func (x *SignMessageWithPrivateKeyResponse) ProtoReflect() protoreflect.Message { mi := &file_utils_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -139,9 +143,11 @@ type VerifyMessageRequest struct { func (x *VerifyMessageRequest) Reset() { *x = VerifyMessageRequest{} - mi := &file_utils_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_utils_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *VerifyMessageRequest) String() string { @@ -152,7 +158,7 @@ func (*VerifyMessageRequest) ProtoMessage() {} func (x *VerifyMessageRequest) ProtoReflect() protoreflect.Message { mi := &file_utils_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -200,9 +206,11 @@ type VerifyMessageResponse struct { func (x *VerifyMessageResponse) Reset() { *x = VerifyMessageResponse{} - mi := &file_utils_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_utils_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *VerifyMessageResponse) String() string { @@ -213,7 +221,7 @@ func (*VerifyMessageResponse) ProtoMessage() {} func (x *VerifyMessageResponse) ProtoReflect() protoreflect.Message { mi := &file_utils_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -247,9 +255,11 @@ type BLSPublicKeyAggregationRequest struct { func (x *BLSPublicKeyAggregationRequest) Reset() { *x = BLSPublicKeyAggregationRequest{} - mi := &file_utils_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_utils_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *BLSPublicKeyAggregationRequest) String() string { @@ -260,7 +270,7 @@ func (*BLSPublicKeyAggregationRequest) ProtoMessage() {} func (x *BLSPublicKeyAggregationRequest) ProtoReflect() protoreflect.Message { mi := &file_utils_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -296,9 +306,11 @@ type BLSPublicKeyAggregationResponse struct { func (x *BLSPublicKeyAggregationResponse) Reset() { *x = BLSPublicKeyAggregationResponse{} - mi := &file_utils_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_utils_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *BLSPublicKeyAggregationResponse) String() string { @@ -309,7 +321,7 @@ func (*BLSPublicKeyAggregationResponse) ProtoMessage() {} func (x *BLSPublicKeyAggregationResponse) ProtoReflect() protoreflect.Message { mi := &file_utils_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -350,9 +362,11 @@ type BLSSignatureAggregationRequest struct { func (x *BLSSignatureAggregationRequest) Reset() { *x = BLSSignatureAggregationRequest{} - mi := &file_utils_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_utils_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *BLSSignatureAggregationRequest) String() string { @@ -363,7 +377,7 @@ func (*BLSSignatureAggregationRequest) ProtoMessage() {} func (x *BLSSignatureAggregationRequest) ProtoReflect() protoreflect.Message { mi := &file_utils_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -397,9 +411,11 @@ type BLSSignatureAggregationResponse struct { func (x *BLSSignatureAggregationResponse) Reset() { *x = BLSSignatureAggregationResponse{} - mi := &file_utils_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_utils_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *BLSSignatureAggregationResponse) String() string { @@ -410,7 +426,7 @@ func (*BLSSignatureAggregationResponse) ProtoMessage() {} func (x *BLSSignatureAggregationResponse) ProtoReflect() protoreflect.Message { mi := &file_utils_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -552,6 +568,104 @@ func file_utils_proto_init() { if File_utils_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_utils_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*SignMessageWithPrivateKeyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utils_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*SignMessageWithPrivateKeyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utils_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*VerifyMessageRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utils_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*VerifyMessageResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utils_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*BLSPublicKeyAggregationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utils_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*BLSPublicKeyAggregationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utils_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*BLSSignatureAggregationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utils_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*BLSSignatureAggregationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/www/grpc/gen/go/utils_grpc.pb.go b/www/grpc/gen/go/utils_grpc.pb.go index 210089263..c5b424dd3 100644 --- a/www/grpc/gen/go/utils_grpc.pb.go +++ b/www/grpc/gen/go/utils_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 +// - protoc-gen-go-grpc v1.4.0 // - protoc (unknown) // source: utils.proto @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 const ( Utils_SignMessageWithPrivateKey_FullMethodName = "/pactus.Utils/SignMessageWithPrivateKey" @@ -92,7 +92,7 @@ func (c *utilsClient) BLSSignatureAggregation(ctx context.Context, in *BLSSignat // UtilsServer is the server API for Utils service. // All implementations should embed UnimplementedUtilsServer -// for forward compatibility. +// for forward compatibility // // Utils service defines RPC methods for utility functions such as message // signing and verification. @@ -107,12 +107,9 @@ type UtilsServer interface { BLSSignatureAggregation(context.Context, *BLSSignatureAggregationRequest) (*BLSSignatureAggregationResponse, error) } -// UnimplementedUtilsServer should be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedUtilsServer struct{} +// UnimplementedUtilsServer should be embedded to have forward compatible implementations. +type UnimplementedUtilsServer struct { +} func (UnimplementedUtilsServer) SignMessageWithPrivateKey(context.Context, *SignMessageWithPrivateKeyRequest) (*SignMessageWithPrivateKeyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SignMessageWithPrivateKey not implemented") @@ -126,7 +123,6 @@ func (UnimplementedUtilsServer) BLSPublicKeyAggregation(context.Context, *BLSPub func (UnimplementedUtilsServer) BLSSignatureAggregation(context.Context, *BLSSignatureAggregationRequest) (*BLSSignatureAggregationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method BLSSignatureAggregation not implemented") } -func (UnimplementedUtilsServer) testEmbeddedByValue() {} // UnsafeUtilsServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to UtilsServer will @@ -136,13 +132,6 @@ type UnsafeUtilsServer interface { } func RegisterUtilsServer(s grpc.ServiceRegistrar, srv UtilsServer) { - // If the following call pancis, it indicates UnimplementedUtilsServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } s.RegisterService(&Utils_ServiceDesc, srv) } diff --git a/www/grpc/gen/go/wallet.pb.go b/www/grpc/gen/go/wallet.pb.go index 0256b85d5..73e974b69 100644 --- a/www/grpc/gen/go/wallet.pb.go +++ b/www/grpc/gen/go/wallet.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: wallet.proto @@ -99,9 +99,11 @@ type AddressInfo struct { func (x *AddressInfo) Reset() { *x = AddressInfo{} - mi := &file_wallet_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *AddressInfo) String() string { @@ -112,7 +114,7 @@ func (*AddressInfo) ProtoMessage() {} func (x *AddressInfo) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -175,9 +177,11 @@ type HistoryInfo struct { func (x *HistoryInfo) Reset() { *x = HistoryInfo{} - mi := &file_wallet_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *HistoryInfo) String() string { @@ -188,7 +192,7 @@ func (*HistoryInfo) ProtoMessage() {} func (x *HistoryInfo) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -252,9 +256,11 @@ type GetAddressHistoryRequest struct { func (x *GetAddressHistoryRequest) Reset() { *x = GetAddressHistoryRequest{} - mi := &file_wallet_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetAddressHistoryRequest) String() string { @@ -265,7 +271,7 @@ func (*GetAddressHistoryRequest) ProtoMessage() {} func (x *GetAddressHistoryRequest) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -306,9 +312,11 @@ type GetAddressHistoryResponse struct { func (x *GetAddressHistoryResponse) Reset() { *x = GetAddressHistoryResponse{} - mi := &file_wallet_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetAddressHistoryResponse) String() string { @@ -319,7 +327,7 @@ func (*GetAddressHistoryResponse) ProtoMessage() {} func (x *GetAddressHistoryResponse) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -359,9 +367,11 @@ type GetNewAddressRequest struct { func (x *GetNewAddressRequest) Reset() { *x = GetNewAddressRequest{} - mi := &file_wallet_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetNewAddressRequest) String() string { @@ -372,7 +382,7 @@ func (*GetNewAddressRequest) ProtoMessage() {} func (x *GetNewAddressRequest) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -429,9 +439,11 @@ type GetNewAddressResponse struct { func (x *GetNewAddressResponse) Reset() { *x = GetNewAddressResponse{} - mi := &file_wallet_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetNewAddressResponse) String() string { @@ -442,7 +454,7 @@ func (*GetNewAddressResponse) ProtoMessage() {} func (x *GetNewAddressResponse) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -487,9 +499,11 @@ type RestoreWalletRequest struct { func (x *RestoreWalletRequest) Reset() { *x = RestoreWalletRequest{} - mi := &file_wallet_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RestoreWalletRequest) String() string { @@ -500,7 +514,7 @@ func (*RestoreWalletRequest) ProtoMessage() {} func (x *RestoreWalletRequest) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -548,9 +562,11 @@ type RestoreWalletResponse struct { func (x *RestoreWalletResponse) Reset() { *x = RestoreWalletResponse{} - mi := &file_wallet_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RestoreWalletResponse) String() string { @@ -561,7 +577,7 @@ func (*RestoreWalletResponse) ProtoMessage() {} func (x *RestoreWalletResponse) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -597,9 +613,11 @@ type CreateWalletRequest struct { func (x *CreateWalletRequest) Reset() { *x = CreateWalletRequest{} - mi := &file_wallet_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreateWalletRequest) String() string { @@ -610,7 +628,7 @@ func (*CreateWalletRequest) ProtoMessage() {} func (x *CreateWalletRequest) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -651,9 +669,11 @@ type CreateWalletResponse struct { func (x *CreateWalletResponse) Reset() { *x = CreateWalletResponse{} - mi := &file_wallet_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreateWalletResponse) String() string { @@ -664,7 +684,7 @@ func (*CreateWalletResponse) ProtoMessage() {} func (x *CreateWalletResponse) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[9] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -698,9 +718,11 @@ type LoadWalletRequest struct { func (x *LoadWalletRequest) Reset() { *x = LoadWalletRequest{} - mi := &file_wallet_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *LoadWalletRequest) String() string { @@ -711,7 +733,7 @@ func (*LoadWalletRequest) ProtoMessage() {} func (x *LoadWalletRequest) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[10] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -745,9 +767,11 @@ type LoadWalletResponse struct { func (x *LoadWalletResponse) Reset() { *x = LoadWalletResponse{} - mi := &file_wallet_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *LoadWalletResponse) String() string { @@ -758,7 +782,7 @@ func (*LoadWalletResponse) ProtoMessage() {} func (x *LoadWalletResponse) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[11] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -792,9 +816,11 @@ type UnloadWalletRequest struct { func (x *UnloadWalletRequest) Reset() { *x = UnloadWalletRequest{} - mi := &file_wallet_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UnloadWalletRequest) String() string { @@ -805,7 +831,7 @@ func (*UnloadWalletRequest) ProtoMessage() {} func (x *UnloadWalletRequest) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[12] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -839,9 +865,11 @@ type UnloadWalletResponse struct { func (x *UnloadWalletResponse) Reset() { *x = UnloadWalletResponse{} - mi := &file_wallet_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UnloadWalletResponse) String() string { @@ -852,7 +880,7 @@ func (*UnloadWalletResponse) ProtoMessage() {} func (x *UnloadWalletResponse) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[13] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -887,9 +915,11 @@ type GetValidatorAddressRequest struct { func (x *GetValidatorAddressRequest) Reset() { *x = GetValidatorAddressRequest{} - mi := &file_wallet_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetValidatorAddressRequest) String() string { @@ -900,7 +930,7 @@ func (*GetValidatorAddressRequest) ProtoMessage() {} func (x *GetValidatorAddressRequest) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[14] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -935,9 +965,11 @@ type GetValidatorAddressResponse struct { func (x *GetValidatorAddressResponse) Reset() { *x = GetValidatorAddressResponse{} - mi := &file_wallet_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetValidatorAddressResponse) String() string { @@ -948,7 +980,7 @@ func (*GetValidatorAddressResponse) ProtoMessage() {} func (x *GetValidatorAddressResponse) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[15] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -986,9 +1018,11 @@ type SignRawTransactionRequest struct { func (x *SignRawTransactionRequest) Reset() { *x = SignRawTransactionRequest{} - mi := &file_wallet_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SignRawTransactionRequest) String() string { @@ -999,7 +1033,7 @@ func (*SignRawTransactionRequest) ProtoMessage() {} func (x *SignRawTransactionRequest) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[16] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1049,9 +1083,11 @@ type SignRawTransactionResponse struct { func (x *SignRawTransactionResponse) Reset() { *x = SignRawTransactionResponse{} - mi := &file_wallet_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SignRawTransactionResponse) String() string { @@ -1062,7 +1098,7 @@ func (*SignRawTransactionResponse) ProtoMessage() {} func (x *SignRawTransactionResponse) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[17] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1103,9 +1139,11 @@ type GetTotalBalanceRequest struct { func (x *GetTotalBalanceRequest) Reset() { *x = GetTotalBalanceRequest{} - mi := &file_wallet_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetTotalBalanceRequest) String() string { @@ -1116,7 +1154,7 @@ func (*GetTotalBalanceRequest) ProtoMessage() {} func (x *GetTotalBalanceRequest) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[18] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1152,9 +1190,11 @@ type GetTotalBalanceResponse struct { func (x *GetTotalBalanceResponse) Reset() { *x = GetTotalBalanceResponse{} - mi := &file_wallet_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetTotalBalanceResponse) String() string { @@ -1165,7 +1205,7 @@ func (*GetTotalBalanceResponse) ProtoMessage() {} func (x *GetTotalBalanceResponse) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[19] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1212,9 +1252,11 @@ type SignMessageRequest struct { func (x *SignMessageRequest) Reset() { *x = SignMessageRequest{} - mi := &file_wallet_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SignMessageRequest) String() string { @@ -1225,7 +1267,7 @@ func (*SignMessageRequest) ProtoMessage() {} func (x *SignMessageRequest) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[20] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1280,9 +1322,11 @@ type SignMessageResponse struct { func (x *SignMessageResponse) Reset() { *x = SignMessageResponse{} - mi := &file_wallet_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SignMessageResponse) String() string { @@ -1293,7 +1337,7 @@ func (*SignMessageResponse) ProtoMessage() {} func (x *SignMessageResponse) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[21] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1327,9 +1371,11 @@ type GetTotalStakeRequest struct { func (x *GetTotalStakeRequest) Reset() { *x = GetTotalStakeRequest{} - mi := &file_wallet_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetTotalStakeRequest) String() string { @@ -1340,7 +1386,7 @@ func (*GetTotalStakeRequest) ProtoMessage() {} func (x *GetTotalStakeRequest) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[22] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1374,9 +1420,11 @@ type GetTotalStakeResponse struct { func (x *GetTotalStakeResponse) Reset() { *x = GetTotalStakeResponse{} - mi := &file_wallet_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetTotalStakeResponse) String() string { @@ -1387,7 +1435,7 @@ func (*GetTotalStakeResponse) ProtoMessage() {} func (x *GetTotalStakeResponse) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[23] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1429,9 +1477,11 @@ type GetAddressInfoRequest struct { func (x *GetAddressInfoRequest) Reset() { *x = GetAddressInfoRequest{} - mi := &file_wallet_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetAddressInfoRequest) String() string { @@ -1442,7 +1492,7 @@ func (*GetAddressInfoRequest) ProtoMessage() {} func (x *GetAddressInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[24] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1486,9 +1536,11 @@ type GetAddressInfoResponse struct { func (x *GetAddressInfoResponse) Reset() { *x = GetAddressInfoResponse{} - mi := &file_wallet_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetAddressInfoResponse) String() string { @@ -1499,7 +1551,7 @@ func (*GetAddressInfoResponse) ProtoMessage() {} func (x *GetAddressInfoResponse) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[25] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1565,9 +1617,11 @@ type SetLabelRequest struct { func (x *SetLabelRequest) Reset() { *x = SetLabelRequest{} - mi := &file_wallet_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetLabelRequest) String() string { @@ -1578,7 +1632,7 @@ func (*SetLabelRequest) ProtoMessage() {} func (x *SetLabelRequest) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[26] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1630,9 +1684,11 @@ type SetLabelResponse struct { func (x *SetLabelResponse) Reset() { *x = SetLabelResponse{} - mi := &file_wallet_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetLabelResponse) String() string { @@ -1643,7 +1699,7 @@ func (*SetLabelResponse) ProtoMessage() {} func (x *SetLabelResponse) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[27] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1666,9 +1722,11 @@ type ListWalletRequest struct { func (x *ListWalletRequest) Reset() { *x = ListWalletRequest{} - mi := &file_wallet_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListWalletRequest) String() string { @@ -1679,7 +1737,7 @@ func (*ListWalletRequest) ProtoMessage() {} func (x *ListWalletRequest) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[28] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1705,9 +1763,11 @@ type ListWalletResponse struct { func (x *ListWalletResponse) Reset() { *x = ListWalletResponse{} - mi := &file_wallet_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListWalletResponse) String() string { @@ -1718,7 +1778,7 @@ func (*ListWalletResponse) ProtoMessage() {} func (x *ListWalletResponse) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[29] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1751,9 +1811,11 @@ type GetWalletInfoRequest struct { func (x *GetWalletInfoRequest) Reset() { *x = GetWalletInfoRequest{} - mi := &file_wallet_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetWalletInfoRequest) String() string { @@ -1764,7 +1826,7 @@ func (*GetWalletInfoRequest) ProtoMessage() {} func (x *GetWalletInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[30] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1802,9 +1864,11 @@ type GetWalletInfoResponse struct { func (x *GetWalletInfoResponse) Reset() { *x = GetWalletInfoResponse{} - mi := &file_wallet_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetWalletInfoResponse) String() string { @@ -1815,7 +1879,7 @@ func (*GetWalletInfoResponse) ProtoMessage() {} func (x *GetWalletInfoResponse) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[31] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1883,9 +1947,11 @@ type ListAddressRequest struct { func (x *ListAddressRequest) Reset() { *x = ListAddressRequest{} - mi := &file_wallet_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListAddressRequest) String() string { @@ -1896,7 +1962,7 @@ func (*ListAddressRequest) ProtoMessage() {} func (x *ListAddressRequest) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[32] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1929,9 +1995,11 @@ type ListAddressResponse struct { func (x *ListAddressResponse) Reset() { *x = ListAddressResponse{} - mi := &file_wallet_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListAddressResponse) String() string { @@ -1942,7 +2010,7 @@ func (*ListAddressResponse) ProtoMessage() {} func (x *ListAddressResponse) ProtoReflect() protoreflect.Message { mi := &file_wallet_proto_msgTypes[33] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2350,6 +2418,416 @@ func file_wallet_proto_init() { return } file_transaction_proto_init() + if !protoimpl.UnsafeEnabled { + file_wallet_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*AddressInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*HistoryInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*GetAddressHistoryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*GetAddressHistoryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*GetNewAddressRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*GetNewAddressResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*RestoreWalletRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*RestoreWalletResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*CreateWalletRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*CreateWalletResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*LoadWalletRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*LoadWalletResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*UnloadWalletRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*UnloadWalletResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*GetValidatorAddressRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*GetValidatorAddressResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[16].Exporter = func(v any, i int) any { + switch v := v.(*SignRawTransactionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[17].Exporter = func(v any, i int) any { + switch v := v.(*SignRawTransactionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[18].Exporter = func(v any, i int) any { + switch v := v.(*GetTotalBalanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[19].Exporter = func(v any, i int) any { + switch v := v.(*GetTotalBalanceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[20].Exporter = func(v any, i int) any { + switch v := v.(*SignMessageRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[21].Exporter = func(v any, i int) any { + switch v := v.(*SignMessageResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[22].Exporter = func(v any, i int) any { + switch v := v.(*GetTotalStakeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[23].Exporter = func(v any, i int) any { + switch v := v.(*GetTotalStakeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[24].Exporter = func(v any, i int) any { + switch v := v.(*GetAddressInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[25].Exporter = func(v any, i int) any { + switch v := v.(*GetAddressInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[26].Exporter = func(v any, i int) any { + switch v := v.(*SetLabelRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[27].Exporter = func(v any, i int) any { + switch v := v.(*SetLabelResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[28].Exporter = func(v any, i int) any { + switch v := v.(*ListWalletRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[29].Exporter = func(v any, i int) any { + switch v := v.(*ListWalletResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[30].Exporter = func(v any, i int) any { + switch v := v.(*GetWalletInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[31].Exporter = func(v any, i int) any { + switch v := v.(*GetWalletInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[32].Exporter = func(v any, i int) any { + switch v := v.(*ListAddressRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[33].Exporter = func(v any, i int) any { + switch v := v.(*ListAddressResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/www/grpc/gen/go/wallet_grpc.pb.go b/www/grpc/gen/go/wallet_grpc.pb.go index d20da693a..1398c2d9e 100644 --- a/www/grpc/gen/go/wallet_grpc.pb.go +++ b/www/grpc/gen/go/wallet_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 +// - protoc-gen-go-grpc v1.4.0 // - protoc (unknown) // source: wallet.proto @@ -17,8 +17,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 const ( Wallet_CreateWallet_FullMethodName = "/pactus.Wallet/CreateWallet" @@ -250,7 +250,7 @@ func (c *walletClient) ListAddress(ctx context.Context, in *ListAddressRequest, // WalletServer is the server API for Wallet service. // All implementations should embed UnimplementedWalletServer -// for forward compatibility. +// for forward compatibility // // Define the Wallet service with various RPC methods for wallet management. type WalletServer interface { @@ -289,12 +289,9 @@ type WalletServer interface { ListAddress(context.Context, *ListAddressRequest) (*ListAddressResponse, error) } -// UnimplementedWalletServer should be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedWalletServer struct{} +// UnimplementedWalletServer should be embedded to have forward compatible implementations. +type UnimplementedWalletServer struct { +} func (UnimplementedWalletServer) CreateWallet(context.Context, *CreateWalletRequest) (*CreateWalletResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateWallet not implemented") @@ -344,7 +341,6 @@ func (UnimplementedWalletServer) GetWalletInfo(context.Context, *GetWalletInfoRe func (UnimplementedWalletServer) ListAddress(context.Context, *ListAddressRequest) (*ListAddressResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAddress not implemented") } -func (UnimplementedWalletServer) testEmbeddedByValue() {} // UnsafeWalletServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to WalletServer will @@ -354,13 +350,6 @@ type UnsafeWalletServer interface { } func RegisterWalletServer(s grpc.ServiceRegistrar, srv WalletServer) { - // If the following call pancis, it indicates UnimplementedWalletServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } s.RegisterService(&Wallet_ServiceDesc, srv) } diff --git a/www/grpc/gen/java/pactus/network/NetworkOuterClass.java b/www/grpc/gen/java/pactus/network/NetworkOuterClass.java index 673f4810b..490d86e01 100644 --- a/www/grpc/gen/java/pactus/network/NetworkOuterClass.java +++ b/www/grpc/gen/java/pactus/network/NetworkOuterClass.java @@ -2594,6 +2594,50 @@ public interface GetNodeInfoResponseOrBuilder extends * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; */ pactus.network.NetworkOuterClass.ConnectionInfoOrBuilder getConnectionInfoOrBuilder(); + + /** + *
+     * List of active ZeroMQ publishers.
+     * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + java.util.List + getZmqPublishersList(); + /** + *
+     * List of active ZeroMQ publishers.
+     * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + pactus.network.NetworkOuterClass.ZMQPublisherInfo getZmqPublishers(int index); + /** + *
+     * List of active ZeroMQ publishers.
+     * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + int getZmqPublishersCount(); + /** + *
+     * List of active ZeroMQ publishers.
+     * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + java.util.List + getZmqPublishersOrBuilderList(); + /** + *
+     * List of active ZeroMQ publishers.
+     * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + pactus.network.NetworkOuterClass.ZMQPublisherInfoOrBuilder getZmqPublishersOrBuilder( + int index); } /** *
@@ -2619,6 +2663,7 @@ private GetNodeInfoResponse() {
       servicesNames_ = "";
       localAddrs_ = com.google.protobuf.LazyStringArrayList.EMPTY;
       protocols_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+      zmqPublishers_ = java.util.Collections.emptyList();
     }
 
     @java.lang.Override
@@ -3061,6 +3106,66 @@ public pactus.network.NetworkOuterClass.ConnectionInfoOrBuilder getConnectionInf
       return getConnectionInfo();
     }
 
+    public static final int ZMQ_PUBLISHERS_FIELD_NUMBER = 15;
+    private java.util.List zmqPublishers_;
+    /**
+     * 
+     * List of active ZeroMQ publishers.
+     * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + @java.lang.Override + public java.util.List getZmqPublishersList() { + return zmqPublishers_; + } + /** + *
+     * List of active ZeroMQ publishers.
+     * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + @java.lang.Override + public java.util.List + getZmqPublishersOrBuilderList() { + return zmqPublishers_; + } + /** + *
+     * List of active ZeroMQ publishers.
+     * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + @java.lang.Override + public int getZmqPublishersCount() { + return zmqPublishers_.size(); + } + /** + *
+     * List of active ZeroMQ publishers.
+     * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + @java.lang.Override + public pactus.network.NetworkOuterClass.ZMQPublisherInfo getZmqPublishers(int index) { + return zmqPublishers_.get(index); + } + /** + *
+     * List of active ZeroMQ publishers.
+     * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + @java.lang.Override + public pactus.network.NetworkOuterClass.ZMQPublisherInfoOrBuilder getZmqPublishersOrBuilder( + int index) { + return zmqPublishers_.get(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -3108,6 +3213,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (connectionInfo_ != null) { output.writeMessage(14, getConnectionInfo()); } + for (int i = 0; i < zmqPublishers_.size(); i++) { + output.writeMessage(15, zmqPublishers_.get(i)); + } getUnknownFields().writeTo(output); } @@ -3164,6 +3272,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(14, getConnectionInfo()); } + for (int i = 0; i < zmqPublishers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, zmqPublishers_.get(i)); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -3205,6 +3317,8 @@ public boolean equals(final java.lang.Object obj) { if (!getConnectionInfo() .equals(other.getConnectionInfo())) return false; } + if (!getZmqPublishersList() + .equals(other.getZmqPublishersList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3246,6 +3360,10 @@ public int hashCode() { hash = (37 * hash) + CONNECTION_INFO_FIELD_NUMBER; hash = (53 * hash) + getConnectionInfo().hashCode(); } + if (getZmqPublishersCount() > 0) { + hash = (37 * hash) + ZMQ_PUBLISHERS_FIELD_NUMBER; + hash = (53 * hash) + getZmqPublishersList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -3404,6 +3522,13 @@ public Builder clear() { connectionInfo_ = null; connectionInfoBuilder_ = null; } + if (zmqPublishersBuilder_ == null) { + zmqPublishers_ = java.util.Collections.emptyList(); + } else { + zmqPublishers_ = null; + zmqPublishersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -3454,6 +3579,15 @@ public pactus.network.NetworkOuterClass.GetNodeInfoResponse buildPartial() { } else { result.connectionInfo_ = connectionInfoBuilder_.build(); } + if (zmqPublishersBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + zmqPublishers_ = java.util.Collections.unmodifiableList(zmqPublishers_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.zmqPublishers_ = zmqPublishers_; + } else { + result.zmqPublishers_ = zmqPublishersBuilder_.build(); + } onBuilt(); return result; } @@ -3554,6 +3688,32 @@ public Builder mergeFrom(pactus.network.NetworkOuterClass.GetNodeInfoResponse ot if (other.hasConnectionInfo()) { mergeConnectionInfo(other.getConnectionInfo()); } + if (zmqPublishersBuilder_ == null) { + if (!other.zmqPublishers_.isEmpty()) { + if (zmqPublishers_.isEmpty()) { + zmqPublishers_ = other.zmqPublishers_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureZmqPublishersIsMutable(); + zmqPublishers_.addAll(other.zmqPublishers_); + } + onChanged(); + } + } else { + if (!other.zmqPublishers_.isEmpty()) { + if (zmqPublishersBuilder_.isEmpty()) { + zmqPublishersBuilder_.dispose(); + zmqPublishersBuilder_ = null; + zmqPublishers_ = other.zmqPublishers_; + bitField0_ = (bitField0_ & ~0x00000004); + zmqPublishersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getZmqPublishersFieldBuilder() : null; + } else { + zmqPublishersBuilder_.addAllMessages(other.zmqPublishers_); + } + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -3639,6 +3799,19 @@ public Builder mergeFrom( break; } // case 114 + case 122: { + pactus.network.NetworkOuterClass.ZMQPublisherInfo m = + input.readMessage( + pactus.network.NetworkOuterClass.ZMQPublisherInfo.parser(), + extensionRegistry); + if (zmqPublishersBuilder_ == null) { + ensureZmqPublishersIsMutable(); + zmqPublishers_.add(m); + } else { + zmqPublishersBuilder_.addMessage(m); + } + break; + } // case 122 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -4464,252 +4637,1429 @@ public Builder addProtocols( } /** *
-       * List of protocols supported by the node.
+       * List of protocols supported by the node.
+       * 
+ * + * repeated string protocols = 9 [json_name = "protocols"]; + * @param values The protocols to add. + * @return This builder for chaining. + */ + public Builder addAllProtocols( + java.lang.Iterable values) { + ensureProtocolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, protocols_); + onChanged(); + return this; + } + /** + *
+       * List of protocols supported by the node.
+       * 
+ * + * repeated string protocols = 9 [json_name = "protocols"]; + * @return This builder for chaining. + */ + public Builder clearProtocols() { + protocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * List of protocols supported by the node.
+       * 
+ * + * repeated string protocols = 9 [json_name = "protocols"]; + * @param value The bytes of the protocols to add. + * @return This builder for chaining. + */ + public Builder addProtocolsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureProtocolsIsMutable(); + protocols_.add(value); + onChanged(); + return this; + } + + private double clockOffset_ ; + /** + *
+       * Offset between the node's clock and the network's clock (in seconds).
+       * 
+ * + * double clock_offset = 13 [json_name = "clockOffset"]; + * @return The clockOffset. + */ + @java.lang.Override + public double getClockOffset() { + return clockOffset_; + } + /** + *
+       * Offset between the node's clock and the network's clock (in seconds).
+       * 
+ * + * double clock_offset = 13 [json_name = "clockOffset"]; + * @param value The clockOffset to set. + * @return This builder for chaining. + */ + public Builder setClockOffset(double value) { + + clockOffset_ = value; + onChanged(); + return this; + } + /** + *
+       * Offset between the node's clock and the network's clock (in seconds).
+       * 
+ * + * double clock_offset = 13 [json_name = "clockOffset"]; + * @return This builder for chaining. + */ + public Builder clearClockOffset() { + + clockOffset_ = 0D; + onChanged(); + return this; + } + + private pactus.network.NetworkOuterClass.ConnectionInfo connectionInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + pactus.network.NetworkOuterClass.ConnectionInfo, pactus.network.NetworkOuterClass.ConnectionInfo.Builder, pactus.network.NetworkOuterClass.ConnectionInfoOrBuilder> connectionInfoBuilder_; + /** + *
+       * Information about the node's connections.
+       * 
+ * + * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + * @return Whether the connectionInfo field is set. + */ + public boolean hasConnectionInfo() { + return connectionInfoBuilder_ != null || connectionInfo_ != null; + } + /** + *
+       * Information about the node's connections.
+       * 
+ * + * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + * @return The connectionInfo. + */ + public pactus.network.NetworkOuterClass.ConnectionInfo getConnectionInfo() { + if (connectionInfoBuilder_ == null) { + return connectionInfo_ == null ? pactus.network.NetworkOuterClass.ConnectionInfo.getDefaultInstance() : connectionInfo_; + } else { + return connectionInfoBuilder_.getMessage(); + } + } + /** + *
+       * Information about the node's connections.
+       * 
+ * + * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + */ + public Builder setConnectionInfo(pactus.network.NetworkOuterClass.ConnectionInfo value) { + if (connectionInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + connectionInfo_ = value; + onChanged(); + } else { + connectionInfoBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Information about the node's connections.
+       * 
+ * + * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + */ + public Builder setConnectionInfo( + pactus.network.NetworkOuterClass.ConnectionInfo.Builder builderForValue) { + if (connectionInfoBuilder_ == null) { + connectionInfo_ = builderForValue.build(); + onChanged(); + } else { + connectionInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Information about the node's connections.
+       * 
+ * + * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + */ + public Builder mergeConnectionInfo(pactus.network.NetworkOuterClass.ConnectionInfo value) { + if (connectionInfoBuilder_ == null) { + if (connectionInfo_ != null) { + connectionInfo_ = + pactus.network.NetworkOuterClass.ConnectionInfo.newBuilder(connectionInfo_).mergeFrom(value).buildPartial(); + } else { + connectionInfo_ = value; + } + onChanged(); + } else { + connectionInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Information about the node's connections.
+       * 
+ * + * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + */ + public Builder clearConnectionInfo() { + if (connectionInfoBuilder_ == null) { + connectionInfo_ = null; + onChanged(); + } else { + connectionInfo_ = null; + connectionInfoBuilder_ = null; + } + + return this; + } + /** + *
+       * Information about the node's connections.
+       * 
+ * + * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + */ + public pactus.network.NetworkOuterClass.ConnectionInfo.Builder getConnectionInfoBuilder() { + + onChanged(); + return getConnectionInfoFieldBuilder().getBuilder(); + } + /** + *
+       * Information about the node's connections.
+       * 
+ * + * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + */ + public pactus.network.NetworkOuterClass.ConnectionInfoOrBuilder getConnectionInfoOrBuilder() { + if (connectionInfoBuilder_ != null) { + return connectionInfoBuilder_.getMessageOrBuilder(); + } else { + return connectionInfo_ == null ? + pactus.network.NetworkOuterClass.ConnectionInfo.getDefaultInstance() : connectionInfo_; + } + } + /** + *
+       * Information about the node's connections.
+       * 
+ * + * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pactus.network.NetworkOuterClass.ConnectionInfo, pactus.network.NetworkOuterClass.ConnectionInfo.Builder, pactus.network.NetworkOuterClass.ConnectionInfoOrBuilder> + getConnectionInfoFieldBuilder() { + if (connectionInfoBuilder_ == null) { + connectionInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pactus.network.NetworkOuterClass.ConnectionInfo, pactus.network.NetworkOuterClass.ConnectionInfo.Builder, pactus.network.NetworkOuterClass.ConnectionInfoOrBuilder>( + getConnectionInfo(), + getParentForChildren(), + isClean()); + connectionInfo_ = null; + } + return connectionInfoBuilder_; + } + + private java.util.List zmqPublishers_ = + java.util.Collections.emptyList(); + private void ensureZmqPublishersIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + zmqPublishers_ = new java.util.ArrayList(zmqPublishers_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + pactus.network.NetworkOuterClass.ZMQPublisherInfo, pactus.network.NetworkOuterClass.ZMQPublisherInfo.Builder, pactus.network.NetworkOuterClass.ZMQPublisherInfoOrBuilder> zmqPublishersBuilder_; + + /** + *
+       * List of active ZeroMQ publishers.
+       * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + public java.util.List getZmqPublishersList() { + if (zmqPublishersBuilder_ == null) { + return java.util.Collections.unmodifiableList(zmqPublishers_); + } else { + return zmqPublishersBuilder_.getMessageList(); + } + } + /** + *
+       * List of active ZeroMQ publishers.
+       * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + public int getZmqPublishersCount() { + if (zmqPublishersBuilder_ == null) { + return zmqPublishers_.size(); + } else { + return zmqPublishersBuilder_.getCount(); + } + } + /** + *
+       * List of active ZeroMQ publishers.
+       * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + public pactus.network.NetworkOuterClass.ZMQPublisherInfo getZmqPublishers(int index) { + if (zmqPublishersBuilder_ == null) { + return zmqPublishers_.get(index); + } else { + return zmqPublishersBuilder_.getMessage(index); + } + } + /** + *
+       * List of active ZeroMQ publishers.
+       * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + public Builder setZmqPublishers( + int index, pactus.network.NetworkOuterClass.ZMQPublisherInfo value) { + if (zmqPublishersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureZmqPublishersIsMutable(); + zmqPublishers_.set(index, value); + onChanged(); + } else { + zmqPublishersBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * List of active ZeroMQ publishers.
+       * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + public Builder setZmqPublishers( + int index, pactus.network.NetworkOuterClass.ZMQPublisherInfo.Builder builderForValue) { + if (zmqPublishersBuilder_ == null) { + ensureZmqPublishersIsMutable(); + zmqPublishers_.set(index, builderForValue.build()); + onChanged(); + } else { + zmqPublishersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of active ZeroMQ publishers.
+       * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + public Builder addZmqPublishers(pactus.network.NetworkOuterClass.ZMQPublisherInfo value) { + if (zmqPublishersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureZmqPublishersIsMutable(); + zmqPublishers_.add(value); + onChanged(); + } else { + zmqPublishersBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * List of active ZeroMQ publishers.
+       * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + public Builder addZmqPublishers( + int index, pactus.network.NetworkOuterClass.ZMQPublisherInfo value) { + if (zmqPublishersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureZmqPublishersIsMutable(); + zmqPublishers_.add(index, value); + onChanged(); + } else { + zmqPublishersBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * List of active ZeroMQ publishers.
+       * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + public Builder addZmqPublishers( + pactus.network.NetworkOuterClass.ZMQPublisherInfo.Builder builderForValue) { + if (zmqPublishersBuilder_ == null) { + ensureZmqPublishersIsMutable(); + zmqPublishers_.add(builderForValue.build()); + onChanged(); + } else { + zmqPublishersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * List of active ZeroMQ publishers.
+       * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + public Builder addZmqPublishers( + int index, pactus.network.NetworkOuterClass.ZMQPublisherInfo.Builder builderForValue) { + if (zmqPublishersBuilder_ == null) { + ensureZmqPublishersIsMutable(); + zmqPublishers_.add(index, builderForValue.build()); + onChanged(); + } else { + zmqPublishersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of active ZeroMQ publishers.
+       * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + public Builder addAllZmqPublishers( + java.lang.Iterable values) { + if (zmqPublishersBuilder_ == null) { + ensureZmqPublishersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, zmqPublishers_); + onChanged(); + } else { + zmqPublishersBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * List of active ZeroMQ publishers.
+       * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + public Builder clearZmqPublishers() { + if (zmqPublishersBuilder_ == null) { + zmqPublishers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + zmqPublishersBuilder_.clear(); + } + return this; + } + /** + *
+       * List of active ZeroMQ publishers.
+       * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + public Builder removeZmqPublishers(int index) { + if (zmqPublishersBuilder_ == null) { + ensureZmqPublishersIsMutable(); + zmqPublishers_.remove(index); + onChanged(); + } else { + zmqPublishersBuilder_.remove(index); + } + return this; + } + /** + *
+       * List of active ZeroMQ publishers.
+       * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + public pactus.network.NetworkOuterClass.ZMQPublisherInfo.Builder getZmqPublishersBuilder( + int index) { + return getZmqPublishersFieldBuilder().getBuilder(index); + } + /** + *
+       * List of active ZeroMQ publishers.
+       * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + public pactus.network.NetworkOuterClass.ZMQPublisherInfoOrBuilder getZmqPublishersOrBuilder( + int index) { + if (zmqPublishersBuilder_ == null) { + return zmqPublishers_.get(index); } else { + return zmqPublishersBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * List of active ZeroMQ publishers.
+       * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + public java.util.List + getZmqPublishersOrBuilderList() { + if (zmqPublishersBuilder_ != null) { + return zmqPublishersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(zmqPublishers_); + } + } + /** + *
+       * List of active ZeroMQ publishers.
+       * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + public pactus.network.NetworkOuterClass.ZMQPublisherInfo.Builder addZmqPublishersBuilder() { + return getZmqPublishersFieldBuilder().addBuilder( + pactus.network.NetworkOuterClass.ZMQPublisherInfo.getDefaultInstance()); + } + /** + *
+       * List of active ZeroMQ publishers.
+       * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + public pactus.network.NetworkOuterClass.ZMQPublisherInfo.Builder addZmqPublishersBuilder( + int index) { + return getZmqPublishersFieldBuilder().addBuilder( + index, pactus.network.NetworkOuterClass.ZMQPublisherInfo.getDefaultInstance()); + } + /** + *
+       * List of active ZeroMQ publishers.
+       * 
+ * + * repeated .pactus.ZMQPublisherInfo zmq_publishers = 15 [json_name = "zmqPublishers"]; + */ + public java.util.List + getZmqPublishersBuilderList() { + return getZmqPublishersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + pactus.network.NetworkOuterClass.ZMQPublisherInfo, pactus.network.NetworkOuterClass.ZMQPublisherInfo.Builder, pactus.network.NetworkOuterClass.ZMQPublisherInfoOrBuilder> + getZmqPublishersFieldBuilder() { + if (zmqPublishersBuilder_ == null) { + zmqPublishersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + pactus.network.NetworkOuterClass.ZMQPublisherInfo, pactus.network.NetworkOuterClass.ZMQPublisherInfo.Builder, pactus.network.NetworkOuterClass.ZMQPublisherInfoOrBuilder>( + zmqPublishers_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + zmqPublishers_ = null; + } + return zmqPublishersBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetNodeInfoResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.GetNodeInfoResponse) + private static final pactus.network.NetworkOuterClass.GetNodeInfoResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.network.NetworkOuterClass.GetNodeInfoResponse(); + } + + public static pactus.network.NetworkOuterClass.GetNodeInfoResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNodeInfoResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.GetNodeInfoResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ZMQPublisherInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.ZMQPublisherInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The topic associated with the publisher.
+     * 
+ * + * string topic = 1 [json_name = "topic"]; + * @return The topic. + */ + java.lang.String getTopic(); + /** + *
+     * The topic associated with the publisher.
+     * 
+ * + * string topic = 1 [json_name = "topic"]; + * @return The bytes for topic. + */ + com.google.protobuf.ByteString + getTopicBytes(); + + /** + *
+     * The address of the publisher.
+     * 
+ * + * string address = 2 [json_name = "address"]; + * @return The address. + */ + java.lang.String getAddress(); + /** + *
+     * The address of the publisher.
+     * 
+ * + * string address = 2 [json_name = "address"]; + * @return The bytes for address. + */ + com.google.protobuf.ByteString + getAddressBytes(); + + /** + *
+     * The high-water mark (HWM) for the publisher, indicating the
+     * maximum number of messages to queue before dropping older ones.
+     * 
+ * + * int32 hwm = 3 [json_name = "hwm"]; + * @return The hwm. + */ + int getHwm(); + } + /** + * Protobuf type {@code pactus.ZMQPublisherInfo} + */ + public static final class ZMQPublisherInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.ZMQPublisherInfo) + ZMQPublisherInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ZMQPublisherInfo.newBuilder() to construct. + private ZMQPublisherInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ZMQPublisherInfo() { + topic_ = ""; + address_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ZMQPublisherInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.network.NetworkOuterClass.internal_static_pactus_ZMQPublisherInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.network.NetworkOuterClass.internal_static_pactus_ZMQPublisherInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.network.NetworkOuterClass.ZMQPublisherInfo.class, pactus.network.NetworkOuterClass.ZMQPublisherInfo.Builder.class); + } + + public static final int TOPIC_FIELD_NUMBER = 1; + private volatile java.lang.Object topic_; + /** + *
+     * The topic associated with the publisher.
+     * 
+ * + * string topic = 1 [json_name = "topic"]; + * @return The topic. + */ + @java.lang.Override + public java.lang.String getTopic() { + java.lang.Object ref = topic_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + topic_ = s; + return s; + } + } + /** + *
+     * The topic associated with the publisher.
+     * 
+ * + * string topic = 1 [json_name = "topic"]; + * @return The bytes for topic. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTopicBytes() { + java.lang.Object ref = topic_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + topic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ADDRESS_FIELD_NUMBER = 2; + private volatile java.lang.Object address_; + /** + *
+     * The address of the publisher.
+     * 
+ * + * string address = 2 [json_name = "address"]; + * @return The address. + */ + @java.lang.Override + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } + } + /** + *
+     * The address of the publisher.
+     * 
+ * + * string address = 2 [json_name = "address"]; + * @return The bytes for address. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HWM_FIELD_NUMBER = 3; + private int hwm_; + /** + *
+     * The high-water mark (HWM) for the publisher, indicating the
+     * maximum number of messages to queue before dropping older ones.
+     * 
+ * + * int32 hwm = 3 [json_name = "hwm"]; + * @return The hwm. + */ + @java.lang.Override + public int getHwm() { + return hwm_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, address_); + } + if (hwm_ != 0) { + output.writeInt32(3, hwm_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, address_); + } + if (hwm_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, hwm_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.network.NetworkOuterClass.ZMQPublisherInfo)) { + return super.equals(obj); + } + pactus.network.NetworkOuterClass.ZMQPublisherInfo other = (pactus.network.NetworkOuterClass.ZMQPublisherInfo) obj; + + if (!getTopic() + .equals(other.getTopic())) return false; + if (!getAddress() + .equals(other.getAddress())) return false; + if (getHwm() + != other.getHwm()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOPIC_FIELD_NUMBER; + hash = (53 * hash) + getTopic().hashCode(); + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + hash = (37 * hash) + HWM_FIELD_NUMBER; + hash = (53 * hash) + getHwm(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.network.NetworkOuterClass.ZMQPublisherInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.network.NetworkOuterClass.ZMQPublisherInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.ZMQPublisherInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.network.NetworkOuterClass.ZMQPublisherInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.ZMQPublisherInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.network.NetworkOuterClass.ZMQPublisherInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.ZMQPublisherInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.network.NetworkOuterClass.ZMQPublisherInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.ZMQPublisherInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.network.NetworkOuterClass.ZMQPublisherInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.ZMQPublisherInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.network.NetworkOuterClass.ZMQPublisherInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.network.NetworkOuterClass.ZMQPublisherInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code pactus.ZMQPublisherInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.ZMQPublisherInfo) + pactus.network.NetworkOuterClass.ZMQPublisherInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.network.NetworkOuterClass.internal_static_pactus_ZMQPublisherInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.network.NetworkOuterClass.internal_static_pactus_ZMQPublisherInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.network.NetworkOuterClass.ZMQPublisherInfo.class, pactus.network.NetworkOuterClass.ZMQPublisherInfo.Builder.class); + } + + // Construct using pactus.network.NetworkOuterClass.ZMQPublisherInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + topic_ = ""; + + address_ = ""; + + hwm_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.network.NetworkOuterClass.internal_static_pactus_ZMQPublisherInfo_descriptor; + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.ZMQPublisherInfo getDefaultInstanceForType() { + return pactus.network.NetworkOuterClass.ZMQPublisherInfo.getDefaultInstance(); + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.ZMQPublisherInfo build() { + pactus.network.NetworkOuterClass.ZMQPublisherInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.ZMQPublisherInfo buildPartial() { + pactus.network.NetworkOuterClass.ZMQPublisherInfo result = new pactus.network.NetworkOuterClass.ZMQPublisherInfo(this); + result.topic_ = topic_; + result.address_ = address_; + result.hwm_ = hwm_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.network.NetworkOuterClass.ZMQPublisherInfo) { + return mergeFrom((pactus.network.NetworkOuterClass.ZMQPublisherInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.network.NetworkOuterClass.ZMQPublisherInfo other) { + if (other == pactus.network.NetworkOuterClass.ZMQPublisherInfo.getDefaultInstance()) return this; + if (!other.getTopic().isEmpty()) { + topic_ = other.topic_; + onChanged(); + } + if (!other.getAddress().isEmpty()) { + address_ = other.address_; + onChanged(); + } + if (other.getHwm() != 0) { + setHwm(other.getHwm()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + topic_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + address_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: { + hwm_ = input.readInt32(); + + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object topic_ = ""; + /** + *
+       * The topic associated with the publisher.
        * 
* - * repeated string protocols = 9 [json_name = "protocols"]; - * @param values The protocols to add. - * @return This builder for chaining. + * string topic = 1 [json_name = "topic"]; + * @return The topic. */ - public Builder addAllProtocols( - java.lang.Iterable values) { - ensureProtocolsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, protocols_); - onChanged(); - return this; + public java.lang.String getTopic() { + java.lang.Object ref = topic_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + topic_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** *
-       * List of protocols supported by the node.
+       * The topic associated with the publisher.
        * 
* - * repeated string protocols = 9 [json_name = "protocols"]; - * @return This builder for chaining. + * string topic = 1 [json_name = "topic"]; + * @return The bytes for topic. */ - public Builder clearProtocols() { - protocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; + public com.google.protobuf.ByteString + getTopicBytes() { + java.lang.Object ref = topic_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + topic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } /** *
-       * List of protocols supported by the node.
+       * The topic associated with the publisher.
        * 
* - * repeated string protocols = 9 [json_name = "protocols"]; - * @param value The bytes of the protocols to add. + * string topic = 1 [json_name = "topic"]; + * @param value The topic to set. * @return This builder for chaining. */ - public Builder addProtocolsBytes( - com.google.protobuf.ByteString value) { + public Builder setTopic( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureProtocolsIsMutable(); - protocols_.add(value); + + topic_ = value; onChanged(); return this; } - - private double clockOffset_ ; - /** - *
-       * Offset between the node's clock and the network's clock (in seconds).
-       * 
- * - * double clock_offset = 13 [json_name = "clockOffset"]; - * @return The clockOffset. - */ - @java.lang.Override - public double getClockOffset() { - return clockOffset_; - } /** *
-       * Offset between the node's clock and the network's clock (in seconds).
+       * The topic associated with the publisher.
        * 
* - * double clock_offset = 13 [json_name = "clockOffset"]; - * @param value The clockOffset to set. + * string topic = 1 [json_name = "topic"]; * @return This builder for chaining. */ - public Builder setClockOffset(double value) { + public Builder clearTopic() { - clockOffset_ = value; + topic_ = getDefaultInstance().getTopic(); onChanged(); return this; } /** *
-       * Offset between the node's clock and the network's clock (in seconds).
+       * The topic associated with the publisher.
        * 
* - * double clock_offset = 13 [json_name = "clockOffset"]; + * string topic = 1 [json_name = "topic"]; + * @param value The bytes for topic to set. * @return This builder for chaining. */ - public Builder clearClockOffset() { + public Builder setTopicBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); - clockOffset_ = 0D; + topic_ = value; onChanged(); return this; } - private pactus.network.NetworkOuterClass.ConnectionInfo connectionInfo_; - private com.google.protobuf.SingleFieldBuilderV3< - pactus.network.NetworkOuterClass.ConnectionInfo, pactus.network.NetworkOuterClass.ConnectionInfo.Builder, pactus.network.NetworkOuterClass.ConnectionInfoOrBuilder> connectionInfoBuilder_; - /** - *
-       * Information about the node's connections.
-       * 
- * - * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; - * @return Whether the connectionInfo field is set. - */ - public boolean hasConnectionInfo() { - return connectionInfoBuilder_ != null || connectionInfo_ != null; - } + private java.lang.Object address_ = ""; /** *
-       * Information about the node's connections.
+       * The address of the publisher.
        * 
* - * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; - * @return The connectionInfo. + * string address = 2 [json_name = "address"]; + * @return The address. */ - public pactus.network.NetworkOuterClass.ConnectionInfo getConnectionInfo() { - if (connectionInfoBuilder_ == null) { - return connectionInfo_ == null ? pactus.network.NetworkOuterClass.ConnectionInfo.getDefaultInstance() : connectionInfo_; + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; } else { - return connectionInfoBuilder_.getMessage(); + return (java.lang.String) ref; } } /** *
-       * Information about the node's connections.
+       * The address of the publisher.
        * 
* - * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + * string address = 2 [json_name = "address"]; + * @return The bytes for address. */ - public Builder setConnectionInfo(pactus.network.NetworkOuterClass.ConnectionInfo value) { - if (connectionInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - connectionInfo_ = value; - onChanged(); + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; } else { - connectionInfoBuilder_.setMessage(value); + return (com.google.protobuf.ByteString) ref; } - - return this; } /** *
-       * Information about the node's connections.
+       * The address of the publisher.
        * 
* - * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + * string address = 2 [json_name = "address"]; + * @param value The address to set. + * @return This builder for chaining. */ - public Builder setConnectionInfo( - pactus.network.NetworkOuterClass.ConnectionInfo.Builder builderForValue) { - if (connectionInfoBuilder_ == null) { - connectionInfo_ = builderForValue.build(); - onChanged(); - } else { - connectionInfoBuilder_.setMessage(builderForValue.build()); - } - + public Builder setAddress( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + address_ = value; + onChanged(); return this; } /** *
-       * Information about the node's connections.
+       * The address of the publisher.
        * 
* - * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + * string address = 2 [json_name = "address"]; + * @return This builder for chaining. */ - public Builder mergeConnectionInfo(pactus.network.NetworkOuterClass.ConnectionInfo value) { - if (connectionInfoBuilder_ == null) { - if (connectionInfo_ != null) { - connectionInfo_ = - pactus.network.NetworkOuterClass.ConnectionInfo.newBuilder(connectionInfo_).mergeFrom(value).buildPartial(); - } else { - connectionInfo_ = value; - } - onChanged(); - } else { - connectionInfoBuilder_.mergeFrom(value); - } - + public Builder clearAddress() { + + address_ = getDefaultInstance().getAddress(); + onChanged(); return this; } /** *
-       * Information about the node's connections.
+       * The address of the publisher.
        * 
* - * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + * string address = 2 [json_name = "address"]; + * @param value The bytes for address to set. + * @return This builder for chaining. */ - public Builder clearConnectionInfo() { - if (connectionInfoBuilder_ == null) { - connectionInfo_ = null; - onChanged(); - } else { - connectionInfo_ = null; - connectionInfoBuilder_ = null; - } - + public Builder setAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + address_ = value; + onChanged(); return this; } + + private int hwm_ ; /** *
-       * Information about the node's connections.
+       * The high-water mark (HWM) for the publisher, indicating the
+       * maximum number of messages to queue before dropping older ones.
        * 
* - * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + * int32 hwm = 3 [json_name = "hwm"]; + * @return The hwm. */ - public pactus.network.NetworkOuterClass.ConnectionInfo.Builder getConnectionInfoBuilder() { - - onChanged(); - return getConnectionInfoFieldBuilder().getBuilder(); + @java.lang.Override + public int getHwm() { + return hwm_; } /** *
-       * Information about the node's connections.
+       * The high-water mark (HWM) for the publisher, indicating the
+       * maximum number of messages to queue before dropping older ones.
        * 
* - * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + * int32 hwm = 3 [json_name = "hwm"]; + * @param value The hwm to set. + * @return This builder for chaining. */ - public pactus.network.NetworkOuterClass.ConnectionInfoOrBuilder getConnectionInfoOrBuilder() { - if (connectionInfoBuilder_ != null) { - return connectionInfoBuilder_.getMessageOrBuilder(); - } else { - return connectionInfo_ == null ? - pactus.network.NetworkOuterClass.ConnectionInfo.getDefaultInstance() : connectionInfo_; - } + public Builder setHwm(int value) { + + hwm_ = value; + onChanged(); + return this; } /** *
-       * Information about the node's connections.
+       * The high-water mark (HWM) for the publisher, indicating the
+       * maximum number of messages to queue before dropping older ones.
        * 
* - * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + * int32 hwm = 3 [json_name = "hwm"]; + * @return This builder for chaining. */ - private com.google.protobuf.SingleFieldBuilderV3< - pactus.network.NetworkOuterClass.ConnectionInfo, pactus.network.NetworkOuterClass.ConnectionInfo.Builder, pactus.network.NetworkOuterClass.ConnectionInfoOrBuilder> - getConnectionInfoFieldBuilder() { - if (connectionInfoBuilder_ == null) { - connectionInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - pactus.network.NetworkOuterClass.ConnectionInfo, pactus.network.NetworkOuterClass.ConnectionInfo.Builder, pactus.network.NetworkOuterClass.ConnectionInfoOrBuilder>( - getConnectionInfo(), - getParentForChildren(), - isClean()); - connectionInfo_ = null; - } - return connectionInfoBuilder_; + public Builder clearHwm() { + + hwm_ = 0; + onChanged(); + return this; } @java.lang.Override public final Builder setUnknownFields( @@ -4724,23 +6074,23 @@ public final Builder mergeUnknownFields( } - // @@protoc_insertion_point(builder_scope:pactus.GetNodeInfoResponse) + // @@protoc_insertion_point(builder_scope:pactus.ZMQPublisherInfo) } - // @@protoc_insertion_point(class_scope:pactus.GetNodeInfoResponse) - private static final pactus.network.NetworkOuterClass.GetNodeInfoResponse DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:pactus.ZMQPublisherInfo) + private static final pactus.network.NetworkOuterClass.ZMQPublisherInfo DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new pactus.network.NetworkOuterClass.GetNodeInfoResponse(); + DEFAULT_INSTANCE = new pactus.network.NetworkOuterClass.ZMQPublisherInfo(); } - public static pactus.network.NetworkOuterClass.GetNodeInfoResponse getDefaultInstance() { + public static pactus.network.NetworkOuterClass.ZMQPublisherInfo getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public GetNodeInfoResponse parsePartialFrom( + public ZMQPublisherInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -4759,17 +6109,17 @@ public GetNodeInfoResponse parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public pactus.network.NetworkOuterClass.GetNodeInfoResponse getDefaultInstanceForType() { + public pactus.network.NetworkOuterClass.ZMQPublisherInfo getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -11227,6 +12577,11 @@ public pactus.network.NetworkOuterClass.CounterInfo getDefaultInstanceForType() private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_pactus_GetNodeInfoResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_ZMQPublisherInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_ZMQPublisherInfo_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_pactus_PeerInfo_descriptor; private static final @@ -11274,7 +12629,7 @@ public pactus.network.NetworkOuterClass.CounterInfo getDefaultInstanceForType() "t\0229\n\017connected_peers\030\003 \003(\0132\020.pactus.Peer" + "InfoR\016connectedPeers\0223\n\013metric_info\030\004 \001(" + "\0132\022.pactus.MetricInfoR\nmetricInfo\"\024\n\022Get" + - "NodeInfoRequest\"\207\003\n\023GetNodeInfoResponse\022" + + "NodeInfoRequest\"\310\003\n\023GetNodeInfoResponse\022" + "\030\n\007moniker\030\001 \001(\tR\007moniker\022\024\n\005agent\030\002 \001(\t" + "R\005agent\022\027\n\007peer_id\030\003 \001(\tR\006peerId\022\035\n\nstar" + "ted_at\030\004 \001(\004R\tstartedAt\022\"\n\014reachability\030" + @@ -11284,45 +12639,49 @@ public pactus.network.NetworkOuterClass.CounterInfo getDefaultInstanceForType() "\034\n\tprotocols\030\t \003(\tR\tprotocols\022!\n\014clock_o" + "ffset\030\r \001(\001R\013clockOffset\022?\n\017connection_i" + "nfo\030\016 \001(\0132\026.pactus.ConnectionInfoR\016conne" + - "ctionInfo\"\302\004\n\010PeerInfo\022\026\n\006status\030\001 \001(\005R\006" + - "status\022\030\n\007moniker\030\002 \001(\tR\007moniker\022\024\n\005agen" + - "t\030\003 \001(\tR\005agent\022\027\n\007peer_id\030\004 \001(\tR\006peerId\022" + - "%\n\016consensus_keys\030\005 \003(\tR\rconsensusKeys\022/" + - "\n\023consensus_addresses\030\006 \003(\tR\022consensusAd" + - "dresses\022\032\n\010services\030\007 \001(\rR\010services\022&\n\017l" + - "ast_block_hash\030\010 \001(\tR\rlastBlockHash\022\026\n\006h" + - "eight\030\t \001(\rR\006height\022\033\n\tlast_sent\030\n \001(\003R\010" + - "lastSent\022#\n\rlast_received\030\013 \001(\003R\014lastRec" + - "eived\022\030\n\007address\030\014 \001(\tR\007address\022\034\n\tdirec" + - "tion\030\r \001(\tR\tdirection\022\034\n\tprotocols\030\016 \003(\t" + - "R\tprotocols\022%\n\016total_sessions\030\017 \001(\005R\rtot" + - "alSessions\022-\n\022completed_sessions\030\020 \001(\005R\021" + - "completedSessions\0223\n\013metric_info\030\021 \001(\0132\022" + - ".pactus.MetricInfoR\nmetricInfo\"\226\001\n\016Conne" + - "ctionInfo\022 \n\013connections\030\001 \001(\004R\013connecti" + - "ons\022/\n\023inbound_connections\030\002 \001(\004R\022inboun" + - "dConnections\0221\n\024outbound_connections\030\003 \001" + - "(\004R\023outboundConnections\"\373\003\n\nMetricInfo\0227" + - "\n\014TotalInvalid\030\001 \001(\0132\023.pactus.CounterInf" + - "oR\014TotalInvalid\0221\n\tTotalSent\030\002 \001(\0132\023.pac" + - "tus.CounterInfoR\tTotalSent\0229\n\rTotalRecei" + - "ved\030\003 \001(\0132\023.pactus.CounterInfoR\rTotalRec" + - "eived\022E\n\013MessageSent\030\004 \003(\0132#.pactus.Metr" + - "icInfo.MessageSentEntryR\013MessageSent\022Q\n\017" + - "MessageReceived\030\005 \003(\0132\'.pactus.MetricInf" + - "o.MessageReceivedEntryR\017MessageReceived\032" + - "S\n\020MessageSentEntry\022\020\n\003key\030\001 \001(\005R\003key\022)\n" + + "ctionInfo\022?\n\016zmq_publishers\030\017 \003(\0132\030.pact" + + "us.ZMQPublisherInfoR\rzmqPublishers\"T\n\020ZM" + + "QPublisherInfo\022\024\n\005topic\030\001 \001(\tR\005topic\022\030\n\007" + + "address\030\002 \001(\tR\007address\022\020\n\003hwm\030\003 \001(\005R\003hwm" + + "\"\302\004\n\010PeerInfo\022\026\n\006status\030\001 \001(\005R\006status\022\030\n" + + "\007moniker\030\002 \001(\tR\007moniker\022\024\n\005agent\030\003 \001(\tR\005" + + "agent\022\027\n\007peer_id\030\004 \001(\tR\006peerId\022%\n\016consen" + + "sus_keys\030\005 \003(\tR\rconsensusKeys\022/\n\023consens" + + "us_addresses\030\006 \003(\tR\022consensusAddresses\022\032" + + "\n\010services\030\007 \001(\rR\010services\022&\n\017last_block" + + "_hash\030\010 \001(\tR\rlastBlockHash\022\026\n\006height\030\t \001" + + "(\rR\006height\022\033\n\tlast_sent\030\n \001(\003R\010lastSent\022" + + "#\n\rlast_received\030\013 \001(\003R\014lastReceived\022\030\n\007" + + "address\030\014 \001(\tR\007address\022\034\n\tdirection\030\r \001(" + + "\tR\tdirection\022\034\n\tprotocols\030\016 \003(\tR\tprotoco" + + "ls\022%\n\016total_sessions\030\017 \001(\005R\rtotalSession" + + "s\022-\n\022completed_sessions\030\020 \001(\005R\021completed" + + "Sessions\0223\n\013metric_info\030\021 \001(\0132\022.pactus.M" + + "etricInfoR\nmetricInfo\"\226\001\n\016ConnectionInfo" + + "\022 \n\013connections\030\001 \001(\004R\013connections\022/\n\023in" + + "bound_connections\030\002 \001(\004R\022inboundConnecti" + + "ons\0221\n\024outbound_connections\030\003 \001(\004R\023outbo" + + "undConnections\"\373\003\n\nMetricInfo\0227\n\014TotalIn" + + "valid\030\001 \001(\0132\023.pactus.CounterInfoR\014TotalI" + + "nvalid\0221\n\tTotalSent\030\002 \001(\0132\023.pactus.Count" + + "erInfoR\tTotalSent\0229\n\rTotalReceived\030\003 \001(\013" + + "2\023.pactus.CounterInfoR\rTotalReceived\022E\n\013" + + "MessageSent\030\004 \003(\0132#.pactus.MetricInfo.Me" + + "ssageSentEntryR\013MessageSent\022Q\n\017MessageRe" + + "ceived\030\005 \003(\0132\'.pactus.MetricInfo.Message" + + "ReceivedEntryR\017MessageReceived\032S\n\020Messag" + + "eSentEntry\022\020\n\003key\030\001 \001(\005R\003key\022)\n\005value\030\002 " + + "\001(\0132\023.pactus.CounterInfoR\005value:\0028\001\032W\n\024M" + + "essageReceivedEntry\022\020\n\003key\030\001 \001(\005R\003key\022)\n" + "\005value\030\002 \001(\0132\023.pactus.CounterInfoR\005value" + - ":\0028\001\032W\n\024MessageReceivedEntry\022\020\n\003key\030\001 \001(" + - "\005R\003key\022)\n\005value\030\002 \001(\0132\023.pactus.CounterIn" + - "foR\005value:\0028\001\"=\n\013CounterInfo\022\024\n\005Bytes\030\001 " + - "\001(\004R\005Bytes\022\030\n\007Bundles\030\002 \001(\004R\007Bundles2\242\001\n" + - "\007Network\022O\n\016GetNetworkInfo\022\035.pactus.GetN" + - "etworkInfoRequest\032\036.pactus.GetNetworkInf" + - "oResponse\022F\n\013GetNodeInfo\022\032.pactus.GetNod" + - "eInfoRequest\032\033.pactus.GetNodeInfoRespons" + - "eBB\n\016pactus.networkZ0github.com/pactus-p" + - "roject/pactus/www/grpc/pactusb\006proto3" + ":\0028\001\"=\n\013CounterInfo\022\024\n\005Bytes\030\001 \001(\004R\005Byte" + + "s\022\030\n\007Bundles\030\002 \001(\004R\007Bundles2\242\001\n\007Network\022" + + "O\n\016GetNetworkInfo\022\035.pactus.GetNetworkInf" + + "oRequest\032\036.pactus.GetNetworkInfoResponse" + + "\022F\n\013GetNodeInfo\022\032.pactus.GetNodeInfoRequ" + + "est\032\033.pactus.GetNodeInfoResponseBB\n\016pact" + + "us.networkZ0github.com/pactus-project/pa" + + "ctus/www/grpc/pactusb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -11351,21 +12710,27 @@ public pactus.network.NetworkOuterClass.CounterInfo getDefaultInstanceForType() internal_static_pactus_GetNodeInfoResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_GetNodeInfoResponse_descriptor, - new java.lang.String[] { "Moniker", "Agent", "PeerId", "StartedAt", "Reachability", "Services", "ServicesNames", "LocalAddrs", "Protocols", "ClockOffset", "ConnectionInfo", }); - internal_static_pactus_PeerInfo_descriptor = + new java.lang.String[] { "Moniker", "Agent", "PeerId", "StartedAt", "Reachability", "Services", "ServicesNames", "LocalAddrs", "Protocols", "ClockOffset", "ConnectionInfo", "ZmqPublishers", }); + internal_static_pactus_ZMQPublisherInfo_descriptor = getDescriptor().getMessageTypes().get(4); + internal_static_pactus_ZMQPublisherInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_ZMQPublisherInfo_descriptor, + new java.lang.String[] { "Topic", "Address", "Hwm", }); + internal_static_pactus_PeerInfo_descriptor = + getDescriptor().getMessageTypes().get(5); internal_static_pactus_PeerInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_PeerInfo_descriptor, new java.lang.String[] { "Status", "Moniker", "Agent", "PeerId", "ConsensusKeys", "ConsensusAddresses", "Services", "LastBlockHash", "Height", "LastSent", "LastReceived", "Address", "Direction", "Protocols", "TotalSessions", "CompletedSessions", "MetricInfo", }); internal_static_pactus_ConnectionInfo_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(6); internal_static_pactus_ConnectionInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_ConnectionInfo_descriptor, new java.lang.String[] { "Connections", "InboundConnections", "OutboundConnections", }); internal_static_pactus_MetricInfo_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(7); internal_static_pactus_MetricInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_MetricInfo_descriptor, @@ -11383,7 +12748,7 @@ public pactus.network.NetworkOuterClass.CounterInfo getDefaultInstanceForType() internal_static_pactus_MetricInfo_MessageReceivedEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_pactus_CounterInfo_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(8); internal_static_pactus_CounterInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_CounterInfo_descriptor, diff --git a/www/grpc/gen/js/network_pb.js b/www/grpc/gen/js/network_pb.js index 8e7c75d3b..e5de5ed51 100644 --- a/www/grpc/gen/js/network_pb.js +++ b/www/grpc/gen/js/network_pb.js @@ -29,6 +29,7 @@ goog.exportSymbol('proto.pactus.GetNodeInfoRequest', null, global); goog.exportSymbol('proto.pactus.GetNodeInfoResponse', null, global); goog.exportSymbol('proto.pactus.MetricInfo', null, global); goog.exportSymbol('proto.pactus.PeerInfo', null, global); +goog.exportSymbol('proto.pactus.ZMQPublisherInfo', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -113,6 +114,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.pactus.GetNodeInfoResponse.displayName = 'proto.pactus.GetNodeInfoResponse'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.ZMQPublisherInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.ZMQPublisherInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.ZMQPublisherInfo.displayName = 'proto.pactus.ZMQPublisherInfo'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -705,7 +727,7 @@ proto.pactus.GetNodeInfoRequest.serializeBinaryToWriter = function(message, writ * @private {!Array} * @const */ -proto.pactus.GetNodeInfoResponse.repeatedFields_ = [8,9]; +proto.pactus.GetNodeInfoResponse.repeatedFields_ = [8,9,15]; @@ -748,7 +770,9 @@ proto.pactus.GetNodeInfoResponse.toObject = function(includeInstance, msg) { localAddrsList: (f = jspb.Message.getRepeatedField(msg, 8)) == null ? undefined : f, protocolsList: (f = jspb.Message.getRepeatedField(msg, 9)) == null ? undefined : f, clockOffset: jspb.Message.getFloatingPointFieldWithDefault(msg, 13, 0.0), - connectionInfo: (f = msg.getConnectionInfo()) && proto.pactus.ConnectionInfo.toObject(includeInstance, f) + connectionInfo: (f = msg.getConnectionInfo()) && proto.pactus.ConnectionInfo.toObject(includeInstance, f), + zmqPublishersList: jspb.Message.toObjectList(msg.getZmqPublishersList(), + proto.pactus.ZMQPublisherInfo.toObject, includeInstance) }; if (includeInstance) { @@ -830,6 +854,11 @@ proto.pactus.GetNodeInfoResponse.deserializeBinaryFromReader = function(msg, rea reader.readMessage(value,proto.pactus.ConnectionInfo.deserializeBinaryFromReader); msg.setConnectionInfo(value); break; + case 15: + var value = new proto.pactus.ZMQPublisherInfo; + reader.readMessage(value,proto.pactus.ZMQPublisherInfo.deserializeBinaryFromReader); + msg.addZmqPublishers(value); + break; default: reader.skipField(); break; @@ -937,6 +966,14 @@ proto.pactus.GetNodeInfoResponse.serializeBinaryToWriter = function(message, wri proto.pactus.ConnectionInfo.serializeBinaryToWriter ); } + f = message.getZmqPublishersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 15, + f, + proto.pactus.ZMQPublisherInfo.serializeBinaryToWriter + ); + } }; @@ -1195,6 +1232,234 @@ proto.pactus.GetNodeInfoResponse.prototype.hasConnectionInfo = function() { }; +/** + * repeated ZMQPublisherInfo zmq_publishers = 15; + * @return {!Array} + */ +proto.pactus.GetNodeInfoResponse.prototype.getZmqPublishersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.pactus.ZMQPublisherInfo, 15)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pactus.GetNodeInfoResponse} returns this +*/ +proto.pactus.GetNodeInfoResponse.prototype.setZmqPublishersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 15, value); +}; + + +/** + * @param {!proto.pactus.ZMQPublisherInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.pactus.ZMQPublisherInfo} + */ +proto.pactus.GetNodeInfoResponse.prototype.addZmqPublishers = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 15, opt_value, proto.pactus.ZMQPublisherInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.pactus.GetNodeInfoResponse} returns this + */ +proto.pactus.GetNodeInfoResponse.prototype.clearZmqPublishersList = function() { + return this.setZmqPublishersList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.ZMQPublisherInfo.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.ZMQPublisherInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.ZMQPublisherInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.ZMQPublisherInfo.toObject = function(includeInstance, msg) { + var f, obj = { + topic: jspb.Message.getFieldWithDefault(msg, 1, ""), + address: jspb.Message.getFieldWithDefault(msg, 2, ""), + hwm: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.ZMQPublisherInfo} + */ +proto.pactus.ZMQPublisherInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.ZMQPublisherInfo; + return proto.pactus.ZMQPublisherInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.ZMQPublisherInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.ZMQPublisherInfo} + */ +proto.pactus.ZMQPublisherInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setTopic(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setHwm(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.ZMQPublisherInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.ZMQPublisherInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.ZMQPublisherInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.ZMQPublisherInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTopic(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getHwm(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } +}; + + +/** + * optional string topic = 1; + * @return {string} + */ +proto.pactus.ZMQPublisherInfo.prototype.getTopic = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.ZMQPublisherInfo} returns this + */ +proto.pactus.ZMQPublisherInfo.prototype.setTopic = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string address = 2; + * @return {string} + */ +proto.pactus.ZMQPublisherInfo.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.ZMQPublisherInfo} returns this + */ +proto.pactus.ZMQPublisherInfo.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int32 hwm = 3; + * @return {number} + */ +proto.pactus.ZMQPublisherInfo.prototype.getHwm = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.ZMQPublisherInfo} returns this + */ +proto.pactus.ZMQPublisherInfo.prototype.setHwm = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + /** * List of repeated fields within this message type. diff --git a/www/grpc/gen/python/network_pb2.py b/www/grpc/gen/python/network_pb2.py index 656347c0a..50dfd8a35 100644 --- a/www/grpc/gen/python/network_pb2.py +++ b/www/grpc/gen/python/network_pb2.py @@ -13,7 +13,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rnetwork.proto\x12\x06pactus\">\n\x15GetNetworkInfoRequest\x12%\n\x0eonly_connected\x18\x01 \x01(\x08R\ronlyConnected\"\xdf\x01\n\x16GetNetworkInfoResponse\x12!\n\x0cnetwork_name\x18\x01 \x01(\tR\x0bnetworkName\x12\x32\n\x15\x63onnected_peers_count\x18\x02 \x01(\rR\x13\x63onnectedPeersCount\x12\x39\n\x0f\x63onnected_peers\x18\x03 \x03(\x0b\x32\x10.pactus.PeerInfoR\x0e\x63onnectedPeers\x12\x33\n\x0bmetric_info\x18\x04 \x01(\x0b\x32\x12.pactus.MetricInfoR\nmetricInfo\"\x14\n\x12GetNodeInfoRequest\"\x87\x03\n\x13GetNodeInfoResponse\x12\x18\n\x07moniker\x18\x01 \x01(\tR\x07moniker\x12\x14\n\x05\x61gent\x18\x02 \x01(\tR\x05\x61gent\x12\x17\n\x07peer_id\x18\x03 \x01(\tR\x06peerId\x12\x1d\n\nstarted_at\x18\x04 \x01(\x04R\tstartedAt\x12\"\n\x0creachability\x18\x05 \x01(\tR\x0creachability\x12\x1a\n\x08services\x18\x06 \x01(\x05R\x08services\x12%\n\x0eservices_names\x18\x07 \x01(\tR\rservicesNames\x12\x1f\n\x0blocal_addrs\x18\x08 \x03(\tR\nlocalAddrs\x12\x1c\n\tprotocols\x18\t \x03(\tR\tprotocols\x12!\n\x0c\x63lock_offset\x18\r \x01(\x01R\x0b\x63lockOffset\x12?\n\x0f\x63onnection_info\x18\x0e \x01(\x0b\x32\x16.pactus.ConnectionInfoR\x0e\x63onnectionInfo\"\xc2\x04\n\x08PeerInfo\x12\x16\n\x06status\x18\x01 \x01(\x05R\x06status\x12\x18\n\x07moniker\x18\x02 \x01(\tR\x07moniker\x12\x14\n\x05\x61gent\x18\x03 \x01(\tR\x05\x61gent\x12\x17\n\x07peer_id\x18\x04 \x01(\tR\x06peerId\x12%\n\x0e\x63onsensus_keys\x18\x05 \x03(\tR\rconsensusKeys\x12/\n\x13\x63onsensus_addresses\x18\x06 \x03(\tR\x12\x63onsensusAddresses\x12\x1a\n\x08services\x18\x07 \x01(\rR\x08services\x12&\n\x0flast_block_hash\x18\x08 \x01(\tR\rlastBlockHash\x12\x16\n\x06height\x18\t \x01(\rR\x06height\x12\x1b\n\tlast_sent\x18\n \x01(\x03R\x08lastSent\x12#\n\rlast_received\x18\x0b \x01(\x03R\x0clastReceived\x12\x18\n\x07\x61\x64\x64ress\x18\x0c \x01(\tR\x07\x61\x64\x64ress\x12\x1c\n\tdirection\x18\r \x01(\tR\tdirection\x12\x1c\n\tprotocols\x18\x0e \x03(\tR\tprotocols\x12%\n\x0etotal_sessions\x18\x0f \x01(\x05R\rtotalSessions\x12-\n\x12\x63ompleted_sessions\x18\x10 \x01(\x05R\x11\x63ompletedSessions\x12\x33\n\x0bmetric_info\x18\x11 \x01(\x0b\x32\x12.pactus.MetricInfoR\nmetricInfo\"\x96\x01\n\x0e\x43onnectionInfo\x12 \n\x0b\x63onnections\x18\x01 \x01(\x04R\x0b\x63onnections\x12/\n\x13inbound_connections\x18\x02 \x01(\x04R\x12inboundConnections\x12\x31\n\x14outbound_connections\x18\x03 \x01(\x04R\x13outboundConnections\"\xfb\x03\n\nMetricInfo\x12\x37\n\x0cTotalInvalid\x18\x01 \x01(\x0b\x32\x13.pactus.CounterInfoR\x0cTotalInvalid\x12\x31\n\tTotalSent\x18\x02 \x01(\x0b\x32\x13.pactus.CounterInfoR\tTotalSent\x12\x39\n\rTotalReceived\x18\x03 \x01(\x0b\x32\x13.pactus.CounterInfoR\rTotalReceived\x12\x45\n\x0bMessageSent\x18\x04 \x03(\x0b\x32#.pactus.MetricInfo.MessageSentEntryR\x0bMessageSent\x12Q\n\x0fMessageReceived\x18\x05 \x03(\x0b\x32\'.pactus.MetricInfo.MessageReceivedEntryR\x0fMessageReceived\x1aS\n\x10MessageSentEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x13.pactus.CounterInfoR\x05value:\x02\x38\x01\x1aW\n\x14MessageReceivedEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x13.pactus.CounterInfoR\x05value:\x02\x38\x01\"=\n\x0b\x43ounterInfo\x12\x14\n\x05\x42ytes\x18\x01 \x01(\x04R\x05\x42ytes\x12\x18\n\x07\x42undles\x18\x02 \x01(\x04R\x07\x42undles2\xa2\x01\n\x07Network\x12O\n\x0eGetNetworkInfo\x12\x1d.pactus.GetNetworkInfoRequest\x1a\x1e.pactus.GetNetworkInfoResponse\x12\x46\n\x0bGetNodeInfo\x12\x1a.pactus.GetNodeInfoRequest\x1a\x1b.pactus.GetNodeInfoResponseBB\n\x0epactus.networkZ0github.com/pactus-project/pactus/www/grpc/pactusb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rnetwork.proto\x12\x06pactus\">\n\x15GetNetworkInfoRequest\x12%\n\x0eonly_connected\x18\x01 \x01(\x08R\ronlyConnected\"\xdf\x01\n\x16GetNetworkInfoResponse\x12!\n\x0cnetwork_name\x18\x01 \x01(\tR\x0bnetworkName\x12\x32\n\x15\x63onnected_peers_count\x18\x02 \x01(\rR\x13\x63onnectedPeersCount\x12\x39\n\x0f\x63onnected_peers\x18\x03 \x03(\x0b\x32\x10.pactus.PeerInfoR\x0e\x63onnectedPeers\x12\x33\n\x0bmetric_info\x18\x04 \x01(\x0b\x32\x12.pactus.MetricInfoR\nmetricInfo\"\x14\n\x12GetNodeInfoRequest\"\xc8\x03\n\x13GetNodeInfoResponse\x12\x18\n\x07moniker\x18\x01 \x01(\tR\x07moniker\x12\x14\n\x05\x61gent\x18\x02 \x01(\tR\x05\x61gent\x12\x17\n\x07peer_id\x18\x03 \x01(\tR\x06peerId\x12\x1d\n\nstarted_at\x18\x04 \x01(\x04R\tstartedAt\x12\"\n\x0creachability\x18\x05 \x01(\tR\x0creachability\x12\x1a\n\x08services\x18\x06 \x01(\x05R\x08services\x12%\n\x0eservices_names\x18\x07 \x01(\tR\rservicesNames\x12\x1f\n\x0blocal_addrs\x18\x08 \x03(\tR\nlocalAddrs\x12\x1c\n\tprotocols\x18\t \x03(\tR\tprotocols\x12!\n\x0c\x63lock_offset\x18\r \x01(\x01R\x0b\x63lockOffset\x12?\n\x0f\x63onnection_info\x18\x0e \x01(\x0b\x32\x16.pactus.ConnectionInfoR\x0e\x63onnectionInfo\x12?\n\x0ezmq_publishers\x18\x0f \x03(\x0b\x32\x18.pactus.ZMQPublisherInfoR\rzmqPublishers\"T\n\x10ZMQPublisherInfo\x12\x14\n\x05topic\x18\x01 \x01(\tR\x05topic\x12\x18\n\x07\x61\x64\x64ress\x18\x02 \x01(\tR\x07\x61\x64\x64ress\x12\x10\n\x03hwm\x18\x03 \x01(\x05R\x03hwm\"\xc2\x04\n\x08PeerInfo\x12\x16\n\x06status\x18\x01 \x01(\x05R\x06status\x12\x18\n\x07moniker\x18\x02 \x01(\tR\x07moniker\x12\x14\n\x05\x61gent\x18\x03 \x01(\tR\x05\x61gent\x12\x17\n\x07peer_id\x18\x04 \x01(\tR\x06peerId\x12%\n\x0e\x63onsensus_keys\x18\x05 \x03(\tR\rconsensusKeys\x12/\n\x13\x63onsensus_addresses\x18\x06 \x03(\tR\x12\x63onsensusAddresses\x12\x1a\n\x08services\x18\x07 \x01(\rR\x08services\x12&\n\x0flast_block_hash\x18\x08 \x01(\tR\rlastBlockHash\x12\x16\n\x06height\x18\t \x01(\rR\x06height\x12\x1b\n\tlast_sent\x18\n \x01(\x03R\x08lastSent\x12#\n\rlast_received\x18\x0b \x01(\x03R\x0clastReceived\x12\x18\n\x07\x61\x64\x64ress\x18\x0c \x01(\tR\x07\x61\x64\x64ress\x12\x1c\n\tdirection\x18\r \x01(\tR\tdirection\x12\x1c\n\tprotocols\x18\x0e \x03(\tR\tprotocols\x12%\n\x0etotal_sessions\x18\x0f \x01(\x05R\rtotalSessions\x12-\n\x12\x63ompleted_sessions\x18\x10 \x01(\x05R\x11\x63ompletedSessions\x12\x33\n\x0bmetric_info\x18\x11 \x01(\x0b\x32\x12.pactus.MetricInfoR\nmetricInfo\"\x96\x01\n\x0e\x43onnectionInfo\x12 \n\x0b\x63onnections\x18\x01 \x01(\x04R\x0b\x63onnections\x12/\n\x13inbound_connections\x18\x02 \x01(\x04R\x12inboundConnections\x12\x31\n\x14outbound_connections\x18\x03 \x01(\x04R\x13outboundConnections\"\xfb\x03\n\nMetricInfo\x12\x37\n\x0cTotalInvalid\x18\x01 \x01(\x0b\x32\x13.pactus.CounterInfoR\x0cTotalInvalid\x12\x31\n\tTotalSent\x18\x02 \x01(\x0b\x32\x13.pactus.CounterInfoR\tTotalSent\x12\x39\n\rTotalReceived\x18\x03 \x01(\x0b\x32\x13.pactus.CounterInfoR\rTotalReceived\x12\x45\n\x0bMessageSent\x18\x04 \x03(\x0b\x32#.pactus.MetricInfo.MessageSentEntryR\x0bMessageSent\x12Q\n\x0fMessageReceived\x18\x05 \x03(\x0b\x32\'.pactus.MetricInfo.MessageReceivedEntryR\x0fMessageReceived\x1aS\n\x10MessageSentEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x13.pactus.CounterInfoR\x05value:\x02\x38\x01\x1aW\n\x14MessageReceivedEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x13.pactus.CounterInfoR\x05value:\x02\x38\x01\"=\n\x0b\x43ounterInfo\x12\x14\n\x05\x42ytes\x18\x01 \x01(\x04R\x05\x42ytes\x12\x18\n\x07\x42undles\x18\x02 \x01(\x04R\x07\x42undles2\xa2\x01\n\x07Network\x12O\n\x0eGetNetworkInfo\x12\x1d.pactus.GetNetworkInfoRequest\x1a\x1e.pactus.GetNetworkInfoResponse\x12\x46\n\x0bGetNodeInfo\x12\x1a.pactus.GetNodeInfoRequest\x1a\x1b.pactus.GetNodeInfoResponseBB\n\x0epactus.networkZ0github.com/pactus-project/pactus/www/grpc/pactusb\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'network_pb2', globals()) @@ -32,19 +32,21 @@ _GETNODEINFOREQUEST._serialized_start=315 _GETNODEINFOREQUEST._serialized_end=335 _GETNODEINFORESPONSE._serialized_start=338 - _GETNODEINFORESPONSE._serialized_end=729 - _PEERINFO._serialized_start=732 - _PEERINFO._serialized_end=1310 - _CONNECTIONINFO._serialized_start=1313 - _CONNECTIONINFO._serialized_end=1463 - _METRICINFO._serialized_start=1466 - _METRICINFO._serialized_end=1973 - _METRICINFO_MESSAGESENTENTRY._serialized_start=1801 - _METRICINFO_MESSAGESENTENTRY._serialized_end=1884 - _METRICINFO_MESSAGERECEIVEDENTRY._serialized_start=1886 - _METRICINFO_MESSAGERECEIVEDENTRY._serialized_end=1973 - _COUNTERINFO._serialized_start=1975 - _COUNTERINFO._serialized_end=2036 - _NETWORK._serialized_start=2039 - _NETWORK._serialized_end=2201 + _GETNODEINFORESPONSE._serialized_end=794 + _ZMQPUBLISHERINFO._serialized_start=796 + _ZMQPUBLISHERINFO._serialized_end=880 + _PEERINFO._serialized_start=883 + _PEERINFO._serialized_end=1461 + _CONNECTIONINFO._serialized_start=1464 + _CONNECTIONINFO._serialized_end=1614 + _METRICINFO._serialized_start=1617 + _METRICINFO._serialized_end=2124 + _METRICINFO_MESSAGESENTENTRY._serialized_start=1952 + _METRICINFO_MESSAGESENTENTRY._serialized_end=2035 + _METRICINFO_MESSAGERECEIVEDENTRY._serialized_start=2037 + _METRICINFO_MESSAGERECEIVEDENTRY._serialized_end=2124 + _COUNTERINFO._serialized_start=2126 + _COUNTERINFO._serialized_end=2187 + _NETWORK._serialized_start=2190 + _NETWORK._serialized_end=2352 # @@protoc_insertion_point(module_scope) diff --git a/www/grpc/gen/python/network_pb2.pyi b/www/grpc/gen/python/network_pb2.pyi index 1d199a6d5..2c15c28c9 100644 --- a/www/grpc/gen/python/network_pb2.pyi +++ b/www/grpc/gen/python/network_pb2.pyi @@ -28,7 +28,7 @@ class GetNodeInfoRequest(_message.Message): def __init__(self) -> None: ... class GetNodeInfoResponse(_message.Message): - __slots__ = ("moniker", "agent", "peer_id", "started_at", "reachability", "services", "services_names", "local_addrs", "protocols", "clock_offset", "connection_info") + __slots__ = ("moniker", "agent", "peer_id", "started_at", "reachability", "services", "services_names", "local_addrs", "protocols", "clock_offset", "connection_info", "zmq_publishers") MONIKER_FIELD_NUMBER: _ClassVar[int] AGENT_FIELD_NUMBER: _ClassVar[int] PEER_ID_FIELD_NUMBER: _ClassVar[int] @@ -40,6 +40,7 @@ class GetNodeInfoResponse(_message.Message): PROTOCOLS_FIELD_NUMBER: _ClassVar[int] CLOCK_OFFSET_FIELD_NUMBER: _ClassVar[int] CONNECTION_INFO_FIELD_NUMBER: _ClassVar[int] + ZMQ_PUBLISHERS_FIELD_NUMBER: _ClassVar[int] moniker: str agent: str peer_id: str @@ -51,7 +52,18 @@ class GetNodeInfoResponse(_message.Message): protocols: _containers.RepeatedScalarFieldContainer[str] clock_offset: float connection_info: ConnectionInfo - def __init__(self, moniker: _Optional[str] = ..., agent: _Optional[str] = ..., peer_id: _Optional[str] = ..., started_at: _Optional[int] = ..., reachability: _Optional[str] = ..., services: _Optional[int] = ..., services_names: _Optional[str] = ..., local_addrs: _Optional[_Iterable[str]] = ..., protocols: _Optional[_Iterable[str]] = ..., clock_offset: _Optional[float] = ..., connection_info: _Optional[_Union[ConnectionInfo, _Mapping]] = ...) -> None: ... + zmq_publishers: _containers.RepeatedCompositeFieldContainer[ZMQPublisherInfo] + def __init__(self, moniker: _Optional[str] = ..., agent: _Optional[str] = ..., peer_id: _Optional[str] = ..., started_at: _Optional[int] = ..., reachability: _Optional[str] = ..., services: _Optional[int] = ..., services_names: _Optional[str] = ..., local_addrs: _Optional[_Iterable[str]] = ..., protocols: _Optional[_Iterable[str]] = ..., clock_offset: _Optional[float] = ..., connection_info: _Optional[_Union[ConnectionInfo, _Mapping]] = ..., zmq_publishers: _Optional[_Iterable[_Union[ZMQPublisherInfo, _Mapping]]] = ...) -> None: ... + +class ZMQPublisherInfo(_message.Message): + __slots__ = ("topic", "address", "hwm") + TOPIC_FIELD_NUMBER: _ClassVar[int] + ADDRESS_FIELD_NUMBER: _ClassVar[int] + HWM_FIELD_NUMBER: _ClassVar[int] + topic: str + address: str + hwm: int + def __init__(self, topic: _Optional[str] = ..., address: _Optional[str] = ..., hwm: _Optional[int] = ...) -> None: ... class PeerInfo(_message.Message): __slots__ = ("status", "moniker", "agent", "peer_id", "consensus_keys", "consensus_addresses", "services", "last_block_hash", "height", "last_sent", "last_received", "address", "direction", "protocols", "total_sessions", "completed_sessions", "metric_info") diff --git a/www/grpc/gen/rust/pactus.rs b/www/grpc/gen/rust/pactus.rs index 1c54e12f0..889d9d748 100644 --- a/www/grpc/gen/rust/pactus.rs +++ b/www/grpc/gen/rust/pactus.rs @@ -868,6 +868,23 @@ pub struct GetNodeInfoResponse { /// Information about the node's connections. #[prost(message, optional, tag="14")] pub connection_info: ::core::option::Option, + /// List of active ZeroMQ publishers. + #[prost(message, repeated, tag="15")] + pub zmq_publishers: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ZmqPublisherInfo { + /// The topic associated with the publisher. + #[prost(string, tag="1")] + pub topic: ::prost::alloc::string::String, + /// The address of the publisher. + #[prost(string, tag="2")] + pub address: ::prost::alloc::string::String, + /// The high-water mark (HWM) for the publisher, indicating the + /// maximum number of messages to queue before dropping older ones. + #[prost(int32, tag="3")] + pub hwm: i32, } /// Information about a peer in the network. #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/www/grpc/gen/rust/pactus.serde.rs b/www/grpc/gen/rust/pactus.serde.rs index 33600489c..942719026 100644 --- a/www/grpc/gen/rust/pactus.serde.rs +++ b/www/grpc/gen/rust/pactus.serde.rs @@ -4667,6 +4667,9 @@ impl serde::Serialize for GetNodeInfoResponse { if self.connection_info.is_some() { len += 1; } + if !self.zmq_publishers.is_empty() { + len += 1; + } let mut struct_ser = serializer.serialize_struct("pactus.GetNodeInfoResponse", len)?; if !self.moniker.is_empty() { struct_ser.serialize_field("moniker", &self.moniker)?; @@ -4701,6 +4704,9 @@ impl serde::Serialize for GetNodeInfoResponse { if let Some(v) = self.connection_info.as_ref() { struct_ser.serialize_field("connectionInfo", v)?; } + if !self.zmq_publishers.is_empty() { + struct_ser.serialize_field("zmqPublishers", &self.zmq_publishers)?; + } struct_ser.end() } } @@ -4728,6 +4734,8 @@ impl<'de> serde::Deserialize<'de> for GetNodeInfoResponse { "clockOffset", "connection_info", "connectionInfo", + "zmq_publishers", + "zmqPublishers", ]; #[allow(clippy::enum_variant_names)] @@ -4743,6 +4751,7 @@ impl<'de> serde::Deserialize<'de> for GetNodeInfoResponse { Protocols, ClockOffset, ConnectionInfo, + ZmqPublishers, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -4775,6 +4784,7 @@ impl<'de> serde::Deserialize<'de> for GetNodeInfoResponse { "protocols" => Ok(GeneratedField::Protocols), "clockOffset" | "clock_offset" => Ok(GeneratedField::ClockOffset), "connectionInfo" | "connection_info" => Ok(GeneratedField::ConnectionInfo), + "zmqPublishers" | "zmq_publishers" => Ok(GeneratedField::ZmqPublishers), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -4805,6 +4815,7 @@ impl<'de> serde::Deserialize<'de> for GetNodeInfoResponse { let mut protocols__ = None; let mut clock_offset__ = None; let mut connection_info__ = None; + let mut zmq_publishers__ = None; while let Some(k) = map.next_key()? { match k { GeneratedField::Moniker => { @@ -4879,6 +4890,12 @@ impl<'de> serde::Deserialize<'de> for GetNodeInfoResponse { } connection_info__ = map.next_value()?; } + GeneratedField::ZmqPublishers => { + if zmq_publishers__.is_some() { + return Err(serde::de::Error::duplicate_field("zmqPublishers")); + } + zmq_publishers__ = Some(map.next_value()?); + } } } Ok(GetNodeInfoResponse { @@ -4893,6 +4910,7 @@ impl<'de> serde::Deserialize<'de> for GetNodeInfoResponse { protocols: protocols__.unwrap_or_default(), clock_offset: clock_offset__.unwrap_or_default(), connection_info: connection_info__, + zmq_publishers: zmq_publishers__.unwrap_or_default(), }) } } @@ -12130,3 +12148,130 @@ impl<'de> serde::Deserialize<'de> for VoteType { deserializer.deserialize_any(GeneratedVisitor) } } +impl serde::Serialize for ZmqPublisherInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.topic.is_empty() { + len += 1; + } + if !self.address.is_empty() { + len += 1; + } + if self.hwm != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.ZMQPublisherInfo", len)?; + if !self.topic.is_empty() { + struct_ser.serialize_field("topic", &self.topic)?; + } + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if self.hwm != 0 { + struct_ser.serialize_field("hwm", &self.hwm)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ZmqPublisherInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "topic", + "address", + "hwm", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Topic, + Address, + Hwm, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "topic" => Ok(GeneratedField::Topic), + "address" => Ok(GeneratedField::Address), + "hwm" => Ok(GeneratedField::Hwm), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ZmqPublisherInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.ZMQPublisherInfo") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut topic__ = None; + let mut address__ = None; + let mut hwm__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Topic => { + if topic__.is_some() { + return Err(serde::de::Error::duplicate_field("topic")); + } + topic__ = Some(map.next_value()?); + } + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + GeneratedField::Hwm => { + if hwm__.is_some() { + return Err(serde::de::Error::duplicate_field("hwm")); + } + hwm__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + } + } + Ok(ZmqPublisherInfo { + topic: topic__.unwrap_or_default(), + address: address__.unwrap_or_default(), + hwm: hwm__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.ZMQPublisherInfo", FIELDS, GeneratedVisitor) + } +} diff --git a/www/grpc/network.go b/www/grpc/network.go index 484ff8dad..f1b62fe9e 100644 --- a/www/grpc/network.go +++ b/www/grpc/network.go @@ -31,7 +31,7 @@ func (s *networkServer) GetNodeInfo(_ context.Context, s.logger.Warn("failed to get clock offset", "err", err) } - return &pactus.GetNodeInfoResponse{ + resp := &pactus.GetNodeInfoResponse{ Moniker: s.sync.Moniker(), Agent: version.NodeAgent.String(), PeerId: hex.EncodeToString([]byte(s.sync.SelfID())), @@ -47,7 +47,21 @@ func (s *networkServer) GetNodeInfo(_ context.Context, InboundConnections: uint64(s.net.NumInbound()), OutboundConnections: uint64(s.net.NumOutbound()), }, - }, nil + ZmqPublishers: make([]*pactus.ZMQPublisherInfo, 0), + } + + publishers := s.zmq.Publishers() + if len(publishers) > 0 { + for _, publisher := range publishers { + resp.ZmqPublishers = append(resp.ZmqPublishers, &pactus.ZMQPublisherInfo{ + Topic: publisher.TopicName(), + Address: publisher.Address(), + Hwm: int32(publisher.HWM()), + }) + } + } + + return resp, nil } func (s *networkServer) GetNetworkInfo(_ context.Context, diff --git a/www/grpc/network_test.go b/www/grpc/network_test.go index e707db042..28f031991 100644 --- a/www/grpc/network_test.go +++ b/www/grpc/network_test.go @@ -60,6 +60,7 @@ func TestGetNodeInfo(t *testing.T) { assert.Equal(t, version.NodeAgent.String(), res.Agent) assert.Equal(t, hex.EncodeToString([]byte(td.mockSync.SelfID())), res.PeerId) assert.Equal(t, "test-moniker", res.Moniker) + assert.Contains(t, res.ZmqPublishers[0].Topic, "transaction_info") assert.Nil(t, conn.Close(), "Error closing connection") td.StopServer() diff --git a/www/grpc/proto/network.proto b/www/grpc/proto/network.proto index 61a803eb4..b3d4736a1 100644 --- a/www/grpc/proto/network.proto +++ b/www/grpc/proto/network.proto @@ -58,6 +58,20 @@ message GetNodeInfoResponse { double clock_offset = 13; // Information about the node's connections. ConnectionInfo connection_info = 14; + // List of active ZeroMQ publishers. + repeated ZMQPublisherInfo zmq_publishers = 15; +} + +message ZMQPublisherInfo { + // The topic associated with the publisher. + string topic = 1; + + // The address of the publisher. + string address = 2; + + // The high-water mark (HWM) for the publisher, indicating the + // maximum number of messages to queue before dropping older ones. + int32 hwm = 3; } // Information about a peer in the network. diff --git a/www/grpc/server.go b/www/grpc/server.go index 76f709f1c..9154733a8 100644 --- a/www/grpc/server.go +++ b/www/grpc/server.go @@ -11,6 +11,7 @@ import ( "github.com/pactus-project/pactus/util/logger" "github.com/pactus-project/pactus/wallet" pactus "github.com/pactus-project/pactus/www/grpc/gen/go" + "github.com/pactus-project/pactus/www/zmq" "google.golang.org/grpc" ) @@ -26,12 +27,14 @@ type Server struct { sync sync.Synchronizer consMgr consensus.ManagerReader walletMgr *wallet.Manager + zmq *zmq.Server logger *logger.SubLogger } func NewServer(conf *Config, state state.Facade, sync sync.Synchronizer, network network.Network, consMgr consensus.ManagerReader, walletMgr *wallet.Manager, + zmq *zmq.Server, ) *Server { ctx, cancel := context.WithCancel(context.Background()) @@ -44,6 +47,7 @@ func NewServer(conf *Config, state state.Facade, sync sync.Synchronizer, net: network, consMgr: consMgr, walletMgr: walletMgr, + zmq: zmq, logger: logger.NewSubLogger("_grpc", nil), } } diff --git a/www/grpc/server_test.go b/www/grpc/server_test.go index 721e8238b..ca5d28a22 100644 --- a/www/grpc/server_test.go +++ b/www/grpc/server_test.go @@ -2,6 +2,7 @@ package grpc import ( "context" + "fmt" "net" "os" "path/filepath" @@ -17,6 +18,7 @@ import ( "github.com/pactus-project/pactus/util/testsuite" "github.com/pactus-project/pactus/wallet" pactus "github.com/pactus-project/pactus/www/grpc/gen/go" + "github.com/pactus-project/pactus/www/zmq" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/grpc" @@ -79,10 +81,15 @@ func setup(t *testing.T, conf *Config) *testData { mockWalletMgrConf.WalletsDir = conf.WalletsDir mockWalletMgrConf.ChainType = mockState.Genesis().ChainType() + zmqServer, err := zmq.New(context.TODO(), &zmq.Config{ + ZmqPubTxInfo: fmt.Sprintf("tcp://localhost:%d", testsuite.FindFreePort()), + }, nil) + require.NoError(t, err) + server := NewServer( conf, mockState, mockSync, mockNet, - mockConsMgr, wallet.NewWalletManager(mockWalletMgrConf), + mockConsMgr, wallet.NewWalletManager(mockWalletMgrConf), zmqServer, ) err = server.startListening(listener) assert.NoError(t, err) diff --git a/www/grpc/swagger-ui/pactus.swagger.json b/www/grpc/swagger-ui/pactus.swagger.json index 73bab2b83..3d3bfdc0b 100644 --- a/www/grpc/swagger-ui/pactus.swagger.json +++ b/www/grpc/swagger-ui/pactus.swagger.json @@ -2134,6 +2134,14 @@ "connectionInfo": { "$ref": "#/definitions/pactusConnectionInfo", "description": "Information about the node's connections." + }, + "zmqPublishers": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/pactusZMQPublisherInfo" + }, + "description": "List of active ZeroMQ publishers." } }, "description": "Response message containing information about a specific node in the network." @@ -2833,6 +2841,24 @@ "default": "VOTE_UNKNOWN", "description": "Enumeration for types of votes.\n\n - VOTE_UNKNOWN: Unknown vote type.\n - VOTE_PREPARE: Prepare vote type.\n - VOTE_PRECOMMIT: Precommit vote type.\n - VOTE_CHANGE_PROPOSER: Change proposer vote type." }, + "pactusZMQPublisherInfo": { + "type": "object", + "properties": { + "topic": { + "type": "string", + "description": "The topic associated with the publisher." + }, + "address": { + "type": "string", + "description": "The address of the publisher." + }, + "hwm": { + "type": "integer", + "format": "int32", + "description": "The high-water mark (HWM) for the publisher, indicating the\nmaximum number of messages to queue before dropping older ones." + } + } + }, "protobufAny": { "type": "object", "properties": { diff --git a/www/http/http_test.go b/www/http/http_test.go index 4cba5e117..2758b0bb6 100644 --- a/www/http/http_test.go +++ b/www/http/http_test.go @@ -1,6 +1,7 @@ package http import ( + "context" "fmt" "net/http" "net/http/httptest" @@ -15,7 +16,9 @@ import ( "github.com/pactus-project/pactus/util/testsuite" "github.com/pactus-project/pactus/wallet" "github.com/pactus-project/pactus/www/grpc" + "github.com/pactus-project/pactus/www/zmq" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) type testData struct { @@ -65,10 +68,15 @@ func setup(t *testing.T) *testData { ChainType: mockState.Genesis().ChainType(), } + zmqServer, err := zmq.New(context.TODO(), &zmq.Config{ + ZmqPubTxInfo: fmt.Sprintf("tcp://localhost:%d", testsuite.FindFreePort()), + }, nil) + require.NoError(t, err) + gRPCServer := grpc.NewServer( grpcConf, mockState, mockSync, mockNet, - mockConsMgr, wallet.NewWalletManager(walletMgrConf), + mockConsMgr, wallet.NewWalletManager(walletMgrConf), zmqServer, ) assert.NoError(t, gRPCServer.StartServer()) diff --git a/www/http/network.go b/www/http/network.go index ca80c1264..6153c142c 100644 --- a/www/http/network.go +++ b/www/http/network.go @@ -109,6 +109,11 @@ func (s *Server) NodeHandler(w http.ResponseWriter, r *http.Request) { tmk.addRowString(fmt.Sprint(i), p) } + tmk.addRowString("ZeroMQ Publishers", "---") + for i, p := range res.ZmqPublishers { + tmk.addRowString(fmt.Sprint(i), fmt.Sprintf("%s, %s, %d", p.Topic, p.Address, p.Hwm)) + } + tmk.addRowString("Local Addresses", "---") for i, la := range res.LocalAddrs { tmk.addRowString(fmt.Sprint(i), la) diff --git a/www/http/network_test.go b/www/http/network_test.go index 31a04cb42..bc7155a51 100644 --- a/www/http/network_test.go +++ b/www/http/network_test.go @@ -20,6 +20,7 @@ func TestNodeInfo(t *testing.T) { assert.Equal(t, 200, w.Code) assert.Contains(t, w.Body.String(), version.NodeAgent.String()) + assert.Contains(t, w.Body.String(), "transaction_info") // For ZMQ td.StopServers() }