From 4e7052d53cff6174854ee0dd8e851ce0749d9197 Mon Sep 17 00:00:00 2001 From: Maxi Date: Fri, 23 Aug 2024 18:25:42 +0200 Subject: [PATCH] feat(grpc): add `Proposal` to `ConsensusInfo` API (#1469) --- www/grpc/blockchain.go | 26 +- www/grpc/gen/dart/blockchain.pb.dart | 105 ++ www/grpc/gen/dart/blockchain.pbjson.dart | 17 +- www/grpc/gen/docs/grpc.md | 37 +- www/grpc/gen/docs/json-rpc.md | 37 +- www/grpc/gen/go/blockchain.pb.go | 490 +++-- .../blockchain/BlockchainOuterClass.java | 1583 +++++++++++++++-- www/grpc/gen/js/blockchain_pb.js | 295 ++- www/grpc/gen/python/blockchain_pb2.py | 50 +- www/grpc/gen/rust/pactus.rs | 20 + www/grpc/gen/rust/pactus.serde.rs | 165 ++ www/grpc/proto/blockchain.proto | 18 +- www/grpc/swagger-ui/pactus.swagger.json | 28 + www/http/blockchain.go | 9 + 14 files changed, 2484 insertions(+), 396 deletions(-) diff --git a/www/grpc/blockchain.go b/www/grpc/blockchain.go index c01736c73..a422abc15 100644 --- a/www/grpc/blockchain.go +++ b/www/grpc/blockchain.go @@ -51,6 +51,8 @@ func (s *blockchainServer) GetConsensusInfo(_ context.Context, _ *pactus.GetConsensusInfoRequest, ) (*pactus.GetConsensusInfoResponse, error) { instances := make([]*pactus.ConsensusInfo, 0) + var proposal *pactus.Proposal + for _, cons := range s.consMgr.Instances() { height, round := cons.HeightRound() votes := cons.AllVotes() @@ -67,9 +69,31 @@ func (s *blockchainServer) GetConsensusInfo(_ context.Context, Round: int32(round), Votes: voteInfos, }) + + if proposal == nil && cons.Proposal() != nil { + // All instances have the same proposal, so we just need to fill proposal once. + p := cons.Proposal() + + var blockData string + if p.Block() != nil { + data, err := p.Block().Bytes() + if err != nil { + return nil, status.Errorf(codes.Internal, err.Error()) + } + + blockData = string(data) + } + + proposal = &pactus.Proposal{ + Height: p.Height(), + Round: int32(p.Round()), + BlockData: blockData, + SignatureData: string(p.Signature().Bytes()), + } + } } - return &pactus.GetConsensusInfoResponse{Instances: instances}, nil + return &pactus.GetConsensusInfoResponse{Instances: instances, Proposal: proposal}, nil } func (s *blockchainServer) GetBlockHash(_ context.Context, diff --git a/www/grpc/gen/dart/blockchain.pb.dart b/www/grpc/gen/dart/blockchain.pb.dart index 34e41f776..8ecf905fb 100644 --- a/www/grpc/gen/dart/blockchain.pb.dart +++ b/www/grpc/gen/dart/blockchain.pb.dart @@ -1027,17 +1027,22 @@ class GetConsensusInfoRequest extends $pb.GeneratedMessage { class GetConsensusInfoResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetConsensusInfoResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) ..pc(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'instances', $pb.PbFieldType.PM, subBuilder: ConsensusInfo.create) + ..aOM(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'proposal', subBuilder: Proposal.create) ..hasRequiredFields = false ; GetConsensusInfoResponse._() : super(); factory GetConsensusInfoResponse({ $core.Iterable? instances, + Proposal? proposal, }) { final _result = create(); if (instances != null) { _result.instances.addAll(instances); } + if (proposal != null) { + _result.proposal = proposal; + } return _result; } factory GetConsensusInfoResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); @@ -1063,6 +1068,17 @@ class GetConsensusInfoResponse extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.List get instances => $_getList(0); + + @$pb.TagNumber(6) + Proposal get proposal => $_getN(1); + @$pb.TagNumber(6) + set proposal(Proposal v) { setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasProposal() => $_has(1); + @$pb.TagNumber(6) + void clearProposal() => clearField(6); + @$pb.TagNumber(6) + Proposal ensureProposal() => $_ensure(1); } class GetTxPoolContentRequest extends $pb.GeneratedMessage { @@ -1837,6 +1853,95 @@ class ConsensusInfo extends $pb.GeneratedMessage { $core.List get votes => $_getList(4); } +class Proposal extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Proposal', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'height', $pb.PbFieldType.OU3) + ..a<$core.int>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'round', $pb.PbFieldType.O3) + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'blockData') + ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'signatureData') + ..hasRequiredFields = false + ; + + Proposal._() : super(); + factory Proposal({ + $core.int? height, + $core.int? round, + $core.String? blockData, + $core.String? signatureData, + }) { + final _result = create(); + if (height != null) { + _result.height = height; + } + if (round != null) { + _result.round = round; + } + if (blockData != null) { + _result.blockData = blockData; + } + if (signatureData != null) { + _result.signatureData = signatureData; + } + return _result; + } + factory Proposal.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Proposal.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') + Proposal clone() => Proposal()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Proposal copyWith(void Function(Proposal) updates) => super.copyWith((message) => updates(message as Proposal)) as Proposal; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static Proposal create() => Proposal._(); + Proposal createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Proposal getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Proposal? _defaultInstance; + + @$pb.TagNumber(1) + $core.int get height => $_getIZ(0); + @$pb.TagNumber(1) + set height($core.int v) { $_setUnsignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasHeight() => $_has(0); + @$pb.TagNumber(1) + void clearHeight() => clearField(1); + + @$pb.TagNumber(2) + $core.int get round => $_getIZ(1); + @$pb.TagNumber(2) + set round($core.int v) { $_setSignedInt32(1, v); } + @$pb.TagNumber(2) + $core.bool hasRound() => $_has(1); + @$pb.TagNumber(2) + void clearRound() => clearField(2); + + @$pb.TagNumber(3) + $core.String get blockData => $_getSZ(2); + @$pb.TagNumber(3) + set blockData($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasBlockData() => $_has(2); + @$pb.TagNumber(3) + void clearBlockData() => clearField(3); + + @$pb.TagNumber(4) + $core.String get signatureData => $_getSZ(3); + @$pb.TagNumber(4) + set signatureData($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasSignatureData() => $_has(3); + @$pb.TagNumber(4) + void clearSignatureData() => clearField(4); +} + class BlockchainApi { $pb.RpcClient _client; BlockchainApi(this._client); diff --git a/www/grpc/gen/dart/blockchain.pbjson.dart b/www/grpc/gen/dart/blockchain.pbjson.dart index ee97ec9d3..efffe6152 100644 --- a/www/grpc/gen/dart/blockchain.pbjson.dart +++ b/www/grpc/gen/dart/blockchain.pbjson.dart @@ -227,11 +227,12 @@ const GetConsensusInfoResponse$json = const { '1': 'GetConsensusInfoResponse', '2': const [ const {'1': 'instances', '3': 1, '4': 3, '5': 11, '6': '.pactus.ConsensusInfo', '10': 'instances'}, + const {'1': 'proposal', '3': 6, '4': 1, '5': 11, '6': '.pactus.Proposal', '10': 'proposal'}, ], }; /// Descriptor for `GetConsensusInfoResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getConsensusInfoResponseDescriptor = $convert.base64Decode('ChhHZXRDb25zZW5zdXNJbmZvUmVzcG9uc2USMwoJaW5zdGFuY2VzGAEgAygLMhUucGFjdHVzLkNvbnNlbnN1c0luZm9SCWluc3RhbmNlcw=='); +final $typed_data.Uint8List getConsensusInfoResponseDescriptor = $convert.base64Decode('ChhHZXRDb25zZW5zdXNJbmZvUmVzcG9uc2USMwoJaW5zdGFuY2VzGAEgAygLMhUucGFjdHVzLkNvbnNlbnN1c0luZm9SCWluc3RhbmNlcxIsCghwcm9wb3NhbBgGIAEoCzIQLnBhY3R1cy5Qcm9wb3NhbFIIcHJvcG9zYWw='); @$core.Deprecated('Use getTxPoolContentRequestDescriptor instead') const GetTxPoolContentRequest$json = const { '1': 'GetTxPoolContentRequest', @@ -342,6 +343,19 @@ const ConsensusInfo$json = const { /// Descriptor for `ConsensusInfo`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List consensusInfoDescriptor = $convert.base64Decode('Cg1Db25zZW5zdXNJbmZvEhgKB2FkZHJlc3MYASABKAlSB2FkZHJlc3MSFgoGYWN0aXZlGAIgASgIUgZhY3RpdmUSFgoGaGVpZ2h0GAMgASgNUgZoZWlnaHQSFAoFcm91bmQYBCABKAVSBXJvdW5kEiYKBXZvdGVzGAUgAygLMhAucGFjdHVzLlZvdGVJbmZvUgV2b3Rlcw=='); +@$core.Deprecated('Use proposalDescriptor instead') +const Proposal$json = const { + '1': 'Proposal', + '2': const [ + const {'1': 'height', '3': 1, '4': 1, '5': 13, '10': 'height'}, + const {'1': 'round', '3': 2, '4': 1, '5': 5, '10': 'round'}, + const {'1': 'block_data', '3': 3, '4': 1, '5': 9, '10': 'blockData'}, + const {'1': 'signature_data', '3': 4, '4': 1, '5': 9, '10': 'signatureData'}, + ], +}; + +/// Descriptor for `Proposal`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List proposalDescriptor = $convert.base64Decode('CghQcm9wb3NhbBIWCgZoZWlnaHQYASABKA1SBmhlaWdodBIUCgVyb3VuZBgCIAEoBVIFcm91bmQSHQoKYmxvY2tfZGF0YRgDIAEoCVIJYmxvY2tEYXRhEiUKDnNpZ25hdHVyZV9kYXRhGAQgASgJUg1zaWduYXR1cmVEYXRh'); const $core.Map<$core.String, $core.dynamic> BlockchainServiceBase$json = const { '1': 'Blockchain', '2': const [ @@ -382,6 +396,7 @@ const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> Blockchain '.pactus.GetConsensusInfoResponse': GetConsensusInfoResponse$json, '.pactus.ConsensusInfo': ConsensusInfo$json, '.pactus.VoteInfo': VoteInfo$json, + '.pactus.Proposal': Proposal$json, '.pactus.GetAccountRequest': GetAccountRequest$json, '.pactus.GetAccountResponse': GetAccountResponse$json, '.pactus.AccountInfo': AccountInfo$json, diff --git a/www/grpc/gen/docs/grpc.md b/www/grpc/gen/docs/grpc.md index 583f0ef30..f7c5ca49f 100644 --- a/www/grpc/gen/docs/grpc.md +++ b/www/grpc/gen/docs/grpc.md @@ -1513,7 +1513,42 @@ committee. The change-proposer value of the vote. - + + proposal + Proposal + + The proposal of the consensus info. + + + + proposal.height + uint32 + + The height of the proposal. + + + + proposal.round + int32 + + The round of the proposal. + + + + proposal.block_data + string + + The block data of the proposal. + + + + proposal.signature_data + string + + The signature data of the proposal. + + + ### GetAccount diff --git a/www/grpc/gen/docs/json-rpc.md b/www/grpc/gen/docs/json-rpc.md index 800aa3dc7..a28e42013 100644 --- a/www/grpc/gen/docs/json-rpc.md +++ b/www/grpc/gen/docs/json-rpc.md @@ -1564,7 +1564,42 @@ committee. The change-proposer value of the vote. - + + proposal + object + + The proposal of the consensus info. + + + + proposal.height + numeric + + The height of the proposal. + + + + proposal.round + numeric + + The round of the proposal. + + + + proposal.block_data + string + + The block data of the proposal. + + + + proposal.signature_data + string + + The signature data of the proposal. + + + ### pactus.blockchain.get_account diff --git a/www/grpc/gen/go/blockchain.pb.go b/www/grpc/gen/go/blockchain.pb.go index 54adbf252..57b401540 100644 --- a/www/grpc/gen/go/blockchain.pb.go +++ b/www/grpc/gen/go/blockchain.pb.go @@ -1135,6 +1135,8 @@ type GetConsensusInfoResponse struct { // List of consensus instances. Instances []*ConsensusInfo `protobuf:"bytes,1,rep,name=instances,proto3" json:"instances,omitempty"` + // The proposal of the consensus info. + Proposal *Proposal `protobuf:"bytes,6,opt,name=proposal,proto3" json:"proposal,omitempty"` } func (x *GetConsensusInfoResponse) Reset() { @@ -1176,6 +1178,13 @@ func (x *GetConsensusInfoResponse) GetInstances() []*ConsensusInfo { return nil } +func (x *GetConsensusInfoResponse) GetProposal() *Proposal { + if x != nil { + return x.Proposal + } + return nil +} + // Request message to retrieve transactions in the transaction pool. type GetTxPoolContentRequest struct { state protoimpl.MessageState @@ -1840,6 +1849,82 @@ func (x *ConsensusInfo) GetVotes() []*VoteInfo { return nil } +// Message containing information about a proposal. +type Proposal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The height of the proposal. + Height uint32 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + // The round of the proposal. + Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` + // The block data of the proposal. + BlockData string `protobuf:"bytes,3,opt,name=block_data,json=blockData,proto3" json:"block_data,omitempty"` + // The signature data of the proposal. + SignatureData string `protobuf:"bytes,4,opt,name=signature_data,json=signatureData,proto3" json:"signature_data,omitempty"` +} + +func (x *Proposal) Reset() { + *x = Proposal{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Proposal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Proposal) ProtoMessage() {} + +func (x *Proposal) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[27] + 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 Proposal.ProtoReflect.Descriptor instead. +func (*Proposal) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{27} +} + +func (x *Proposal) GetHeight() uint32 { + if x != nil { + return x.Height + } + return 0 +} + +func (x *Proposal) GetRound() int32 { + if x != nil { + return x.Round + } + return 0 +} + +func (x *Proposal) GetBlockData() string { + if x != nil { + return x.BlockData + } + return "" +} + +func (x *Proposal) GetSignatureData() string { + if x != nil { + return x.SignatureData + } + return "" +} + var File_blockchain_proto protoreflect.FileDescriptor var file_blockchain_proto_rawDesc = []byte{ @@ -1942,167 +2027,178 @@ var file_blockchain_proto_rawDesc = []byte{ 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4f, 0x0a, 0x18, 0x47, 0x65, 0x74, + 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x7d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x51, 0x0a, 0x17, 0x47, 0x65, - 0x74, 0x54, 0x78, 0x50, 0x6f, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x70, 0x61, - 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x22, 0x45, 0x0a, - 0x18, 0x47, 0x65, 0x74, 0x54, 0x78, 0x50, 0x6f, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x74, 0x78, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x03, 0x74, 0x78, 0x73, 0x22, 0xdc, 0x02, 0x0a, 0x0d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, - 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x0a, - 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x6c, - 0x61, 0x73, 0x74, 0x5f, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6f, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x6c, - 0x61, 0x73, 0x74, 0x5f, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x13, 0x6c, 0x61, 0x73, 0x74, - 0x53, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, - 0x29, 0x0a, 0x10, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x75, 0x6e, 0x62, 0x6f, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x01, - 0x52, 0x11, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x63, - 0x6f, 0x72, 0x65, 0x22, 0x81, 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xc4, 0x01, 0x0a, 0x0f, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x76, 0x5f, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x70, 0x72, 0x65, 0x76, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, - 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0e, - 0x73, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x65, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x65, 0x65, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x97, - 0x01, 0x0a, 0x0f, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1e, 0x0a, 0x0a, - 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, - 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1c, 0x0a, 0x09, - 0x61, 0x62, 0x73, 0x65, 0x6e, 0x74, 0x65, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, - 0x09, 0x61, 0x62, 0x73, 0x65, 0x6e, 0x74, 0x65, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xb1, 0x01, 0x0a, 0x08, 0x56, 0x6f, 0x74, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x24, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x56, 0x6f, 0x74, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x6f, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, - 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, - 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x70, 0x5f, 0x72, 0x6f, 0x75, - 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x70, 0x52, 0x6f, 0x75, 0x6e, - 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x97, 0x01, 0x0a, - 0x0d, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, - 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x08, 0x70, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, + 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x08, + 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x22, 0x51, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x54, + 0x78, 0x50, 0x6f, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, + 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x22, 0x45, 0x0a, 0x18, 0x47, + 0x65, 0x74, 0x54, 0x78, 0x50, 0x6f, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x03, 0x74, + 0x78, 0x73, 0x22, 0xdc, 0x02, 0x0a, 0x0d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x6c, 0x61, 0x73, + 0x74, 0x5f, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6f, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x6c, 0x61, 0x73, + 0x74, 0x5f, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x6f, + 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x29, 0x0a, + 0x10, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x01, 0x52, 0x11, + 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x63, 0x6f, 0x72, + 0x65, 0x22, 0x81, 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xc4, 0x01, 0x0a, 0x0f, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x76, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x72, + 0x65, 0x76, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x6f, + 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x65, + 0x64, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x97, 0x01, 0x0a, + 0x0f, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x68, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0a, + 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x62, + 0x73, 0x65, 0x6e, 0x74, 0x65, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x09, 0x61, + 0x62, 0x73, 0x65, 0x6e, 0x74, 0x65, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xb1, 0x01, 0x0a, 0x08, 0x56, 0x6f, 0x74, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x24, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x10, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x6f, 0x74, + 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x12, + 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, + 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, + 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x6e, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x70, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12, + 0x19, 0x0a, 0x08, 0x63, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x07, 0x63, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x97, 0x01, 0x0a, 0x0d, 0x43, + 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x26, 0x0a, 0x05, + 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x61, + 0x63, 0x74, 0x75, 0x73, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x76, + 0x6f, 0x74, 0x65, 0x73, 0x22, 0x7e, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, - 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x26, - 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, - 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x2a, 0x48, 0x0a, 0x0e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, - 0x65, 0x72, 0x62, 0x6f, 0x73, 0x69, 0x74, 0x79, 0x12, 0x0e, 0x0a, 0x0a, 0x42, 0x4c, 0x4f, 0x43, - 0x4b, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x42, 0x4c, 0x4f, 0x43, - 0x4b, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x42, 0x4c, 0x4f, 0x43, - 0x4b, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x02, - 0x2a, 0x5c, 0x0a, 0x08, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, - 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x10, - 0x0a, 0x0c, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x45, 0x10, 0x01, - 0x12, 0x12, 0x0a, 0x0e, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x4d, - 0x49, 0x54, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x43, 0x48, 0x41, - 0x4e, 0x47, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x45, 0x52, 0x10, 0x03, 0x32, 0x8b, - 0x07, 0x0a, 0x0a, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x3d, 0x0a, - 0x08, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, - 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, - 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1b, 0x2e, 0x70, - 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, - 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, - 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x2e, 0x70, 0x61, 0x63, 0x74, - 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, - 0x73, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x2e, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1d, + 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x25, 0x0a, + 0x0e, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x44, 0x61, 0x74, 0x61, 0x2a, 0x48, 0x0a, 0x0e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, + 0x62, 0x6f, 0x73, 0x69, 0x74, 0x79, 0x12, 0x0e, 0x0a, 0x0a, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, + 0x44, 0x41, 0x54, 0x41, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, + 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, + 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x02, 0x2a, 0x5c, + 0x0a, 0x08, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x56, 0x4f, + 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, + 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x45, 0x10, 0x01, 0x12, 0x12, + 0x0a, 0x0e, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, + 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, + 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x45, 0x52, 0x10, 0x03, 0x32, 0x8b, 0x07, 0x0a, + 0x0a, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x3d, 0x0a, 0x08, 0x47, + 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, + 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x18, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65, + 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1b, 0x2e, 0x70, 0x61, 0x63, + 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, + 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, + 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, + 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x2e, 0x70, 0x61, + 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, - 0x75, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1f, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, - 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, - 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x0a, 0x47, 0x65, 0x74, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, - 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, - 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1b, - 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, + 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1f, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, + 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, + 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, + 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1a, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, + 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x2e, 0x70, + 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, + 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x79, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, + 0x23, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x79, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, + 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x64, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x14, 0x47, 0x65, 0x74, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x79, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x12, 0x23, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x79, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, - 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x24, 0x2e, - 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65, - 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1b, 0x2e, 0x70, 0x61, 0x63, - 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, - 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x54, 0x78, 0x50, 0x6f, - 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x70, 0x61, 0x63, 0x74, - 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x50, 0x6f, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x61, 0x63, - 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x50, 0x6f, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x45, 0x0a, 0x11, - 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, - 0x6e, 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, + 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1b, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, + 0x73, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, + 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x54, 0x78, 0x50, 0x6f, 0x6f, 0x6c, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, + 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x50, 0x6f, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, + 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x50, 0x6f, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x45, 0x0a, 0x11, 0x70, 0x61, + 0x63, 0x74, 0x75, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 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 ( @@ -2118,7 +2214,7 @@ func file_blockchain_proto_rawDescGZIP() []byte { } var file_blockchain_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_blockchain_proto_msgTypes = make([]protoimpl.MessageInfo, 27) +var file_blockchain_proto_msgTypes = make([]protoimpl.MessageInfo, 28) var file_blockchain_proto_goTypes = []any{ (BlockVerbosity)(0), // 0: pactus.BlockVerbosity (VoteType)(0), // 1: pactus.VoteType @@ -2149,8 +2245,9 @@ var file_blockchain_proto_goTypes = []any{ (*CertificateInfo)(nil), // 26: pactus.CertificateInfo (*VoteInfo)(nil), // 27: pactus.VoteInfo (*ConsensusInfo)(nil), // 28: pactus.ConsensusInfo - (*TransactionInfo)(nil), // 29: pactus.TransactionInfo - (PayloadType)(0), // 30: pactus.PayloadType + (*Proposal)(nil), // 29: pactus.Proposal + (*TransactionInfo)(nil), // 30: pactus.TransactionInfo + (PayloadType)(0), // 31: pactus.PayloadType } var file_blockchain_proto_depIdxs = []int32{ 24, // 0: pactus.GetAccountResponse.account:type_name -> pactus.AccountInfo @@ -2158,40 +2255,41 @@ var file_blockchain_proto_depIdxs = []int32{ 0, // 2: pactus.GetBlockRequest.verbosity:type_name -> pactus.BlockVerbosity 25, // 3: pactus.GetBlockResponse.header:type_name -> pactus.BlockHeaderInfo 26, // 4: pactus.GetBlockResponse.prev_cert:type_name -> pactus.CertificateInfo - 29, // 5: pactus.GetBlockResponse.txs:type_name -> pactus.TransactionInfo + 30, // 5: pactus.GetBlockResponse.txs:type_name -> pactus.TransactionInfo 23, // 6: pactus.GetBlockchainInfoResponse.committee_validators:type_name -> pactus.ValidatorInfo 28, // 7: pactus.GetConsensusInfoResponse.instances:type_name -> pactus.ConsensusInfo - 30, // 8: pactus.GetTxPoolContentRequest.payload_type:type_name -> pactus.PayloadType - 29, // 9: pactus.GetTxPoolContentResponse.txs:type_name -> pactus.TransactionInfo - 1, // 10: pactus.VoteInfo.type:type_name -> pactus.VoteType - 27, // 11: pactus.ConsensusInfo.votes:type_name -> pactus.VoteInfo - 11, // 12: pactus.Blockchain.GetBlock:input_type -> pactus.GetBlockRequest - 13, // 13: pactus.Blockchain.GetBlockHash:input_type -> pactus.GetBlockHashRequest - 15, // 14: pactus.Blockchain.GetBlockHeight:input_type -> pactus.GetBlockHeightRequest - 17, // 15: pactus.Blockchain.GetBlockchainInfo:input_type -> pactus.GetBlockchainInfoRequest - 19, // 16: pactus.Blockchain.GetConsensusInfo:input_type -> pactus.GetConsensusInfoRequest - 2, // 17: pactus.Blockchain.GetAccount:input_type -> pactus.GetAccountRequest - 6, // 18: pactus.Blockchain.GetValidator:input_type -> pactus.GetValidatorRequest - 7, // 19: pactus.Blockchain.GetValidatorByNumber:input_type -> pactus.GetValidatorByNumberRequest - 4, // 20: pactus.Blockchain.GetValidatorAddresses:input_type -> pactus.GetValidatorAddressesRequest - 9, // 21: pactus.Blockchain.GetPublicKey:input_type -> pactus.GetPublicKeyRequest - 21, // 22: pactus.Blockchain.GetTxPoolContent:input_type -> pactus.GetTxPoolContentRequest - 12, // 23: pactus.Blockchain.GetBlock:output_type -> pactus.GetBlockResponse - 14, // 24: pactus.Blockchain.GetBlockHash:output_type -> pactus.GetBlockHashResponse - 16, // 25: pactus.Blockchain.GetBlockHeight:output_type -> pactus.GetBlockHeightResponse - 18, // 26: pactus.Blockchain.GetBlockchainInfo:output_type -> pactus.GetBlockchainInfoResponse - 20, // 27: pactus.Blockchain.GetConsensusInfo:output_type -> pactus.GetConsensusInfoResponse - 3, // 28: pactus.Blockchain.GetAccount:output_type -> pactus.GetAccountResponse - 8, // 29: pactus.Blockchain.GetValidator:output_type -> pactus.GetValidatorResponse - 8, // 30: pactus.Blockchain.GetValidatorByNumber:output_type -> pactus.GetValidatorResponse - 5, // 31: pactus.Blockchain.GetValidatorAddresses:output_type -> pactus.GetValidatorAddressesResponse - 10, // 32: pactus.Blockchain.GetPublicKey:output_type -> pactus.GetPublicKeyResponse - 22, // 33: pactus.Blockchain.GetTxPoolContent:output_type -> pactus.GetTxPoolContentResponse - 23, // [23:34] is the sub-list for method output_type - 12, // [12:23] 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 + 29, // 8: pactus.GetConsensusInfoResponse.proposal:type_name -> pactus.Proposal + 31, // 9: pactus.GetTxPoolContentRequest.payload_type:type_name -> pactus.PayloadType + 30, // 10: pactus.GetTxPoolContentResponse.txs:type_name -> pactus.TransactionInfo + 1, // 11: pactus.VoteInfo.type:type_name -> pactus.VoteType + 27, // 12: pactus.ConsensusInfo.votes:type_name -> pactus.VoteInfo + 11, // 13: pactus.Blockchain.GetBlock:input_type -> pactus.GetBlockRequest + 13, // 14: pactus.Blockchain.GetBlockHash:input_type -> pactus.GetBlockHashRequest + 15, // 15: pactus.Blockchain.GetBlockHeight:input_type -> pactus.GetBlockHeightRequest + 17, // 16: pactus.Blockchain.GetBlockchainInfo:input_type -> pactus.GetBlockchainInfoRequest + 19, // 17: pactus.Blockchain.GetConsensusInfo:input_type -> pactus.GetConsensusInfoRequest + 2, // 18: pactus.Blockchain.GetAccount:input_type -> pactus.GetAccountRequest + 6, // 19: pactus.Blockchain.GetValidator:input_type -> pactus.GetValidatorRequest + 7, // 20: pactus.Blockchain.GetValidatorByNumber:input_type -> pactus.GetValidatorByNumberRequest + 4, // 21: pactus.Blockchain.GetValidatorAddresses:input_type -> pactus.GetValidatorAddressesRequest + 9, // 22: pactus.Blockchain.GetPublicKey:input_type -> pactus.GetPublicKeyRequest + 21, // 23: pactus.Blockchain.GetTxPoolContent:input_type -> pactus.GetTxPoolContentRequest + 12, // 24: pactus.Blockchain.GetBlock:output_type -> pactus.GetBlockResponse + 14, // 25: pactus.Blockchain.GetBlockHash:output_type -> pactus.GetBlockHashResponse + 16, // 26: pactus.Blockchain.GetBlockHeight:output_type -> pactus.GetBlockHeightResponse + 18, // 27: pactus.Blockchain.GetBlockchainInfo:output_type -> pactus.GetBlockchainInfoResponse + 20, // 28: pactus.Blockchain.GetConsensusInfo:output_type -> pactus.GetConsensusInfoResponse + 3, // 29: pactus.Blockchain.GetAccount:output_type -> pactus.GetAccountResponse + 8, // 30: pactus.Blockchain.GetValidator:output_type -> pactus.GetValidatorResponse + 8, // 31: pactus.Blockchain.GetValidatorByNumber:output_type -> pactus.GetValidatorResponse + 5, // 32: pactus.Blockchain.GetValidatorAddresses:output_type -> pactus.GetValidatorAddressesResponse + 10, // 33: pactus.Blockchain.GetPublicKey:output_type -> pactus.GetPublicKeyResponse + 22, // 34: pactus.Blockchain.GetTxPoolContent:output_type -> pactus.GetTxPoolContentResponse + 24, // [24:35] is the sub-list for method output_type + 13, // [13:24] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name } func init() { file_blockchain_proto_init() } @@ -2525,6 +2623,18 @@ func file_blockchain_proto_init() { return nil } } + file_blockchain_proto_msgTypes[27].Exporter = func(v any, i int) any { + switch v := v.(*Proposal); 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{ @@ -2532,7 +2642,7 @@ func file_blockchain_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_blockchain_proto_rawDesc, NumEnums: 2, - NumMessages: 27, + NumMessages: 28, NumExtensions: 0, NumServices: 1, }, diff --git a/www/grpc/gen/java/pactus/blockchain/BlockchainOuterClass.java b/www/grpc/gen/java/pactus/blockchain/BlockchainOuterClass.java index efb543008..3241713b1 100644 --- a/www/grpc/gen/java/pactus/blockchain/BlockchainOuterClass.java +++ b/www/grpc/gen/java/pactus/blockchain/BlockchainOuterClass.java @@ -13094,6 +13094,33 @@ public interface GetConsensusInfoResponseOrBuilder extends */ pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder getInstancesOrBuilder( int index); + + /** + *
+     * The proposal of the consensus info.
+     * 
+ * + * .pactus.Proposal proposal = 6 [json_name = "proposal"]; + * @return Whether the proposal field is set. + */ + boolean hasProposal(); + /** + *
+     * The proposal of the consensus info.
+     * 
+ * + * .pactus.Proposal proposal = 6 [json_name = "proposal"]; + * @return The proposal. + */ + pactus.blockchain.BlockchainOuterClass.Proposal getProposal(); + /** + *
+     * The proposal of the consensus info.
+     * 
+ * + * .pactus.Proposal proposal = 6 [json_name = "proposal"]; + */ + pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder getProposalOrBuilder(); } /** *
@@ -13200,6 +13227,44 @@ public pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder getInstance
       return instances_.get(index);
     }
 
+    public static final int PROPOSAL_FIELD_NUMBER = 6;
+    private pactus.blockchain.BlockchainOuterClass.Proposal proposal_;
+    /**
+     * 
+     * The proposal of the consensus info.
+     * 
+ * + * .pactus.Proposal proposal = 6 [json_name = "proposal"]; + * @return Whether the proposal field is set. + */ + @java.lang.Override + public boolean hasProposal() { + return proposal_ != null; + } + /** + *
+     * The proposal of the consensus info.
+     * 
+ * + * .pactus.Proposal proposal = 6 [json_name = "proposal"]; + * @return The proposal. + */ + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.Proposal getProposal() { + return proposal_ == null ? pactus.blockchain.BlockchainOuterClass.Proposal.getDefaultInstance() : proposal_; + } + /** + *
+     * The proposal of the consensus info.
+     * 
+ * + * .pactus.Proposal proposal = 6 [json_name = "proposal"]; + */ + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder getProposalOrBuilder() { + return getProposal(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -13217,6 +13282,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < instances_.size(); i++) { output.writeMessage(1, instances_.get(i)); } + if (proposal_ != null) { + output.writeMessage(6, getProposal()); + } getUnknownFields().writeTo(output); } @@ -13230,6 +13298,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, instances_.get(i)); } + if (proposal_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getProposal()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -13247,6 +13319,11 @@ public boolean equals(final java.lang.Object obj) { if (!getInstancesList() .equals(other.getInstancesList())) return false; + if (hasProposal() != other.hasProposal()) return false; + if (hasProposal()) { + if (!getProposal() + .equals(other.getProposal())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -13262,6 +13339,10 @@ public int hashCode() { hash = (37 * hash) + INSTANCES_FIELD_NUMBER; hash = (53 * hash) + getInstancesList().hashCode(); } + if (hasProposal()) { + hash = (37 * hash) + PROPOSAL_FIELD_NUMBER; + hash = (53 * hash) + getProposal().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -13401,6 +13482,12 @@ public Builder clear() { instancesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); + if (proposalBuilder_ == null) { + proposal_ = null; + } else { + proposal_ = null; + proposalBuilder_ = null; + } return this; } @@ -13437,6 +13524,11 @@ public pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse buildPart } else { result.instances_ = instancesBuilder_.build(); } + if (proposalBuilder_ == null) { + result.proposal_ = proposal_; + } else { + result.proposal_ = proposalBuilder_.build(); + } onBuilt(); return result; } @@ -13511,6 +13603,9 @@ public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetConsensusInfo } } } + if (other.hasProposal()) { + mergeProposal(other.getProposal()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -13550,6 +13645,13 @@ public Builder mergeFrom( } break; } // case 10 + case 50: { + input.readMessage( + getProposalFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -13878,6 +13980,161 @@ public pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder addInstances } return instancesBuilder_; } + + private pactus.blockchain.BlockchainOuterClass.Proposal proposal_; + private com.google.protobuf.SingleFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.Proposal, pactus.blockchain.BlockchainOuterClass.Proposal.Builder, pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder> proposalBuilder_; + /** + *
+       * The proposal of the consensus info.
+       * 
+ * + * .pactus.Proposal proposal = 6 [json_name = "proposal"]; + * @return Whether the proposal field is set. + */ + public boolean hasProposal() { + return proposalBuilder_ != null || proposal_ != null; + } + /** + *
+       * The proposal of the consensus info.
+       * 
+ * + * .pactus.Proposal proposal = 6 [json_name = "proposal"]; + * @return The proposal. + */ + public pactus.blockchain.BlockchainOuterClass.Proposal getProposal() { + if (proposalBuilder_ == null) { + return proposal_ == null ? pactus.blockchain.BlockchainOuterClass.Proposal.getDefaultInstance() : proposal_; + } else { + return proposalBuilder_.getMessage(); + } + } + /** + *
+       * The proposal of the consensus info.
+       * 
+ * + * .pactus.Proposal proposal = 6 [json_name = "proposal"]; + */ + public Builder setProposal(pactus.blockchain.BlockchainOuterClass.Proposal value) { + if (proposalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + proposal_ = value; + onChanged(); + } else { + proposalBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The proposal of the consensus info.
+       * 
+ * + * .pactus.Proposal proposal = 6 [json_name = "proposal"]; + */ + public Builder setProposal( + pactus.blockchain.BlockchainOuterClass.Proposal.Builder builderForValue) { + if (proposalBuilder_ == null) { + proposal_ = builderForValue.build(); + onChanged(); + } else { + proposalBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The proposal of the consensus info.
+       * 
+ * + * .pactus.Proposal proposal = 6 [json_name = "proposal"]; + */ + public Builder mergeProposal(pactus.blockchain.BlockchainOuterClass.Proposal value) { + if (proposalBuilder_ == null) { + if (proposal_ != null) { + proposal_ = + pactus.blockchain.BlockchainOuterClass.Proposal.newBuilder(proposal_).mergeFrom(value).buildPartial(); + } else { + proposal_ = value; + } + onChanged(); + } else { + proposalBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The proposal of the consensus info.
+       * 
+ * + * .pactus.Proposal proposal = 6 [json_name = "proposal"]; + */ + public Builder clearProposal() { + if (proposalBuilder_ == null) { + proposal_ = null; + onChanged(); + } else { + proposal_ = null; + proposalBuilder_ = null; + } + + return this; + } + /** + *
+       * The proposal of the consensus info.
+       * 
+ * + * .pactus.Proposal proposal = 6 [json_name = "proposal"]; + */ + public pactus.blockchain.BlockchainOuterClass.Proposal.Builder getProposalBuilder() { + + onChanged(); + return getProposalFieldBuilder().getBuilder(); + } + /** + *
+       * The proposal of the consensus info.
+       * 
+ * + * .pactus.Proposal proposal = 6 [json_name = "proposal"]; + */ + public pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder getProposalOrBuilder() { + if (proposalBuilder_ != null) { + return proposalBuilder_.getMessageOrBuilder(); + } else { + return proposal_ == null ? + pactus.blockchain.BlockchainOuterClass.Proposal.getDefaultInstance() : proposal_; + } + } + /** + *
+       * The proposal of the consensus info.
+       * 
+ * + * .pactus.Proposal proposal = 6 [json_name = "proposal"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.Proposal, pactus.blockchain.BlockchainOuterClass.Proposal.Builder, pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder> + getProposalFieldBuilder() { + if (proposalBuilder_ == null) { + proposalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.Proposal, pactus.blockchain.BlockchainOuterClass.Proposal.Builder, pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder>( + getProposal(), + getParentForChildren(), + isClean()); + proposal_ = null; + } + return proposalBuilder_; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -23360,117 +23617,1075 @@ public pactus.blockchain.BlockchainOuterClass.ConsensusInfo getDefaultInstanceFo } - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetAccountRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetAccountRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetAccountResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetAccountResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetValidatorAddressesRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetValidatorAddressesRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetValidatorAddressesResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetValidatorAddressesResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetValidatorRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetValidatorRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetValidatorByNumberRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetValidatorByNumberRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetValidatorResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetValidatorResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetPublicKeyRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetPublicKeyRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetPublicKeyResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetPublicKeyResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetBlockRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetBlockRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetBlockResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetBlockResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetBlockHashRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetBlockHashRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetBlockHashResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetBlockHashResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetBlockHeightRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetBlockHeightRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetBlockHeightResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetBlockHeightResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetBlockchainInfoRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetBlockchainInfoRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetBlockchainInfoResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetBlockchainInfoResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetConsensusInfoRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetConsensusInfoRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetConsensusInfoResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetConsensusInfoResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetTxPoolContentRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetTxPoolContentRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetTxPoolContentResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetTxPoolContentResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_ValidatorInfo_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_ValidatorInfo_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor + public interface ProposalOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.Proposal) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The height of the proposal.
+     * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @return The height. + */ + int getHeight(); + + /** + *
+     * The round of the proposal.
+     * 
+ * + * int32 round = 2 [json_name = "round"]; + * @return The round. + */ + int getRound(); + + /** + *
+     * The block data of the proposal.
+     * 
+ * + * string block_data = 3 [json_name = "blockData"]; + * @return The blockData. + */ + java.lang.String getBlockData(); + /** + *
+     * The block data of the proposal.
+     * 
+ * + * string block_data = 3 [json_name = "blockData"]; + * @return The bytes for blockData. + */ + com.google.protobuf.ByteString + getBlockDataBytes(); + + /** + *
+     * The signature data of the proposal.
+     * 
+ * + * string signature_data = 4 [json_name = "signatureData"]; + * @return The signatureData. + */ + java.lang.String getSignatureData(); + /** + *
+     * The signature data of the proposal.
+     * 
+ * + * string signature_data = 4 [json_name = "signatureData"]; + * @return The bytes for signatureData. + */ + com.google.protobuf.ByteString + getSignatureDataBytes(); + } + /** + *
+   * Message containing information about a proposal.
+   * 
+ * + * Protobuf type {@code pactus.Proposal} + */ + public static final class Proposal extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.Proposal) + ProposalOrBuilder { + private static final long serialVersionUID = 0L; + // Use Proposal.newBuilder() to construct. + private Proposal(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Proposal() { + blockData_ = ""; + signatureData_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Proposal(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_Proposal_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_Proposal_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.Proposal.class, pactus.blockchain.BlockchainOuterClass.Proposal.Builder.class); + } + + public static final int HEIGHT_FIELD_NUMBER = 1; + private int height_; + /** + *
+     * The height of the proposal.
+     * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + + public static final int ROUND_FIELD_NUMBER = 2; + private int round_; + /** + *
+     * The round of the proposal.
+     * 
+ * + * int32 round = 2 [json_name = "round"]; + * @return The round. + */ + @java.lang.Override + public int getRound() { + return round_; + } + + public static final int BLOCK_DATA_FIELD_NUMBER = 3; + private volatile java.lang.Object blockData_; + /** + *
+     * The block data of the proposal.
+     * 
+ * + * string block_data = 3 [json_name = "blockData"]; + * @return The blockData. + */ + @java.lang.Override + public java.lang.String getBlockData() { + java.lang.Object ref = blockData_; + 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(); + blockData_ = s; + return s; + } + } + /** + *
+     * The block data of the proposal.
+     * 
+ * + * string block_data = 3 [json_name = "blockData"]; + * @return The bytes for blockData. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBlockDataBytes() { + java.lang.Object ref = blockData_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + blockData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SIGNATURE_DATA_FIELD_NUMBER = 4; + private volatile java.lang.Object signatureData_; + /** + *
+     * The signature data of the proposal.
+     * 
+ * + * string signature_data = 4 [json_name = "signatureData"]; + * @return The signatureData. + */ + @java.lang.Override + public java.lang.String getSignatureData() { + java.lang.Object ref = signatureData_; + 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(); + signatureData_ = s; + return s; + } + } + /** + *
+     * The signature data of the proposal.
+     * 
+ * + * string signature_data = 4 [json_name = "signatureData"]; + * @return The bytes for signatureData. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSignatureDataBytes() { + java.lang.Object ref = signatureData_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signatureData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (height_ != 0) { + output.writeUInt32(1, height_); + } + if (round_ != 0) { + output.writeInt32(2, round_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(blockData_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, blockData_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signatureData_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, signatureData_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, height_); + } + if (round_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, round_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(blockData_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, blockData_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signatureData_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, signatureData_); + } + 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.blockchain.BlockchainOuterClass.Proposal)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.Proposal other = (pactus.blockchain.BlockchainOuterClass.Proposal) obj; + + if (getHeight() + != other.getHeight()) return false; + if (getRound() + != other.getRound()) return false; + if (!getBlockData() + .equals(other.getBlockData())) return false; + if (!getSignatureData() + .equals(other.getSignatureData())) 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) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + hash = (37 * hash) + ROUND_FIELD_NUMBER; + hash = (53 * hash) + getRound(); + hash = (37 * hash) + BLOCK_DATA_FIELD_NUMBER; + hash = (53 * hash) + getBlockData().hashCode(); + hash = (37 * hash) + SIGNATURE_DATA_FIELD_NUMBER; + hash = (53 * hash) + getSignatureData().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.Proposal parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.Proposal parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.Proposal parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.Proposal parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.Proposal parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.Proposal parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.Proposal parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.Proposal 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.blockchain.BlockchainOuterClass.Proposal parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.Proposal 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.blockchain.BlockchainOuterClass.Proposal parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.Proposal 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.blockchain.BlockchainOuterClass.Proposal 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; + } + /** + *
+     * Message containing information about a proposal.
+     * 
+ * + * Protobuf type {@code pactus.Proposal} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.Proposal) + pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_Proposal_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_Proposal_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.Proposal.class, pactus.blockchain.BlockchainOuterClass.Proposal.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.Proposal.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + height_ = 0; + + round_ = 0; + + blockData_ = ""; + + signatureData_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_Proposal_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.Proposal getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.Proposal.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.Proposal build() { + pactus.blockchain.BlockchainOuterClass.Proposal result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.Proposal buildPartial() { + pactus.blockchain.BlockchainOuterClass.Proposal result = new pactus.blockchain.BlockchainOuterClass.Proposal(this); + result.height_ = height_; + result.round_ = round_; + result.blockData_ = blockData_; + result.signatureData_ = signatureData_; + 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.blockchain.BlockchainOuterClass.Proposal) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.Proposal)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.Proposal other) { + if (other == pactus.blockchain.BlockchainOuterClass.Proposal.getDefaultInstance()) return this; + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + if (other.getRound() != 0) { + setRound(other.getRound()); + } + if (!other.getBlockData().isEmpty()) { + blockData_ = other.blockData_; + onChanged(); + } + if (!other.getSignatureData().isEmpty()) { + signatureData_ = other.signatureData_; + onChanged(); + } + 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 8: { + height_ = input.readUInt32(); + + break; + } // case 8 + case 16: { + round_ = input.readInt32(); + + break; + } // case 16 + case 26: { + blockData_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: { + signatureData_ = input.readStringRequireUtf8(); + + break; + } // case 34 + 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 int height_ ; + /** + *
+       * The height of the proposal.
+       * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + /** + *
+       * The height of the proposal.
+       * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(int value) { + + height_ = value; + onChanged(); + return this; + } + /** + *
+       * The height of the proposal.
+       * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @return This builder for chaining. + */ + public Builder clearHeight() { + + height_ = 0; + onChanged(); + return this; + } + + private int round_ ; + /** + *
+       * The round of the proposal.
+       * 
+ * + * int32 round = 2 [json_name = "round"]; + * @return The round. + */ + @java.lang.Override + public int getRound() { + return round_; + } + /** + *
+       * The round of the proposal.
+       * 
+ * + * int32 round = 2 [json_name = "round"]; + * @param value The round to set. + * @return This builder for chaining. + */ + public Builder setRound(int value) { + + round_ = value; + onChanged(); + return this; + } + /** + *
+       * The round of the proposal.
+       * 
+ * + * int32 round = 2 [json_name = "round"]; + * @return This builder for chaining. + */ + public Builder clearRound() { + + round_ = 0; + onChanged(); + return this; + } + + private java.lang.Object blockData_ = ""; + /** + *
+       * The block data of the proposal.
+       * 
+ * + * string block_data = 3 [json_name = "blockData"]; + * @return The blockData. + */ + public java.lang.String getBlockData() { + java.lang.Object ref = blockData_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + blockData_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The block data of the proposal.
+       * 
+ * + * string block_data = 3 [json_name = "blockData"]; + * @return The bytes for blockData. + */ + public com.google.protobuf.ByteString + getBlockDataBytes() { + java.lang.Object ref = blockData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + blockData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The block data of the proposal.
+       * 
+ * + * string block_data = 3 [json_name = "blockData"]; + * @param value The blockData to set. + * @return This builder for chaining. + */ + public Builder setBlockData( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + blockData_ = value; + onChanged(); + return this; + } + /** + *
+       * The block data of the proposal.
+       * 
+ * + * string block_data = 3 [json_name = "blockData"]; + * @return This builder for chaining. + */ + public Builder clearBlockData() { + + blockData_ = getDefaultInstance().getBlockData(); + onChanged(); + return this; + } + /** + *
+       * The block data of the proposal.
+       * 
+ * + * string block_data = 3 [json_name = "blockData"]; + * @param value The bytes for blockData to set. + * @return This builder for chaining. + */ + public Builder setBlockDataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + blockData_ = value; + onChanged(); + return this; + } + + private java.lang.Object signatureData_ = ""; + /** + *
+       * The signature data of the proposal.
+       * 
+ * + * string signature_data = 4 [json_name = "signatureData"]; + * @return The signatureData. + */ + public java.lang.String getSignatureData() { + java.lang.Object ref = signatureData_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signatureData_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The signature data of the proposal.
+       * 
+ * + * string signature_data = 4 [json_name = "signatureData"]; + * @return The bytes for signatureData. + */ + public com.google.protobuf.ByteString + getSignatureDataBytes() { + java.lang.Object ref = signatureData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signatureData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The signature data of the proposal.
+       * 
+ * + * string signature_data = 4 [json_name = "signatureData"]; + * @param value The signatureData to set. + * @return This builder for chaining. + */ + public Builder setSignatureData( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + signatureData_ = value; + onChanged(); + return this; + } + /** + *
+       * The signature data of the proposal.
+       * 
+ * + * string signature_data = 4 [json_name = "signatureData"]; + * @return This builder for chaining. + */ + public Builder clearSignatureData() { + + signatureData_ = getDefaultInstance().getSignatureData(); + onChanged(); + return this; + } + /** + *
+       * The signature data of the proposal.
+       * 
+ * + * string signature_data = 4 [json_name = "signatureData"]; + * @param value The bytes for signatureData to set. + * @return This builder for chaining. + */ + public Builder setSignatureDataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + signatureData_ = value; + onChanged(); + return this; + } + @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.Proposal) + } + + // @@protoc_insertion_point(class_scope:pactus.Proposal) + private static final pactus.blockchain.BlockchainOuterClass.Proposal DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.Proposal(); + } + + public static pactus.blockchain.BlockchainOuterClass.Proposal getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Proposal 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.blockchain.BlockchainOuterClass.Proposal getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetAccountRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetAccountRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetAccountResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetAccountResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetValidatorAddressesRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetValidatorAddressesRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetValidatorAddressesResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetValidatorAddressesResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetValidatorRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetValidatorRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetValidatorByNumberRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetValidatorByNumberRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetValidatorResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetValidatorResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetPublicKeyRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetPublicKeyRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetPublicKeyResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetPublicKeyResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetBlockRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetBlockRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetBlockResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetBlockResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetBlockHashRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetBlockHashRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetBlockHashResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetBlockHashResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetBlockHeightRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetBlockHeightRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetBlockHeightResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetBlockHeightResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetBlockchainInfoRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetBlockchainInfoRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetBlockchainInfoResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetBlockchainInfoResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetConsensusInfoRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetConsensusInfoRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetConsensusInfoResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetConsensusInfoResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetTxPoolContentRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetTxPoolContentRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetTxPoolContentResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetTxPoolContentResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_ValidatorInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_ValidatorInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor internal_static_pactus_AccountInfo_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -23495,6 +24710,11 @@ public pactus.blockchain.BlockchainOuterClass.ConsensusInfo getDefaultInstanceFo private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_pactus_ConsensusInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_Proposal_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_Proposal_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -23543,71 +24763,76 @@ public pactus.blockchain.BlockchainOuterClass.ConsensusInfo getDefaultInstanceFo "ommitteeValidators\022\033\n\tis_pruned\030\010 \001(\010R\010i" + "sPruned\022%\n\016pruning_height\030\t \001(\rR\rpruning" + "Height\022&\n\017last_block_time\030\n \001(\003R\rlastBlo" + - "ckTime\"\031\n\027GetConsensusInfoRequest\"O\n\030Get" + + "ckTime\"\031\n\027GetConsensusInfoRequest\"}\n\030Get" + "ConsensusInfoResponse\0223\n\tinstances\030\001 \003(\013" + - "2\025.pactus.ConsensusInfoR\tinstances\"Q\n\027Ge" + - "tTxPoolContentRequest\0226\n\014payload_type\030\001 " + - "\001(\0162\023.pactus.PayloadTypeR\013payloadType\"E\n" + - "\030GetTxPoolContentResponse\022)\n\003txs\030\001 \003(\0132\027" + - ".pactus.TransactionInfoR\003txs\"\334\002\n\rValidat" + - "orInfo\022\022\n\004hash\030\001 \001(\tR\004hash\022\022\n\004data\030\002 \001(\t" + - "R\004data\022\035\n\npublic_key\030\003 \001(\tR\tpublicKey\022\026\n" + - "\006number\030\004 \001(\005R\006number\022\024\n\005stake\030\005 \001(\003R\005st" + - "ake\022.\n\023last_bonding_height\030\006 \001(\rR\021lastBo" + - "ndingHeight\0222\n\025last_sortition_height\030\007 \001" + - "(\rR\023lastSortitionHeight\022)\n\020unbonding_hei" + - "ght\030\010 \001(\rR\017unbondingHeight\022\030\n\007address\030\t " + - "\001(\tR\007address\022-\n\022availability_score\030\n \001(\001" + - "R\021availabilityScore\"\201\001\n\013AccountInfo\022\022\n\004h" + - "ash\030\001 \001(\tR\004hash\022\022\n\004data\030\002 \001(\tR\004data\022\026\n\006n" + - "umber\030\003 \001(\005R\006number\022\030\n\007balance\030\004 \001(\003R\007ba" + - "lance\022\030\n\007address\030\005 \001(\tR\007address\"\304\001\n\017Bloc" + - "kHeaderInfo\022\030\n\007version\030\001 \001(\005R\007version\022&\n" + - "\017prev_block_hash\030\002 \001(\tR\rprevBlockHash\022\035\n" + - "\nstate_root\030\003 \001(\tR\tstateRoot\022%\n\016sortitio" + - "n_seed\030\004 \001(\tR\rsortitionSeed\022)\n\020proposer_" + - "address\030\005 \001(\tR\017proposerAddress\"\227\001\n\017Certi" + - "ficateInfo\022\022\n\004hash\030\001 \001(\tR\004hash\022\024\n\005round\030" + - "\002 \001(\005R\005round\022\036\n\ncommitters\030\003 \003(\005R\ncommit" + - "ters\022\034\n\tabsentees\030\004 \003(\005R\tabsentees\022\034\n\tsi" + - "gnature\030\005 \001(\tR\tsignature\"\261\001\n\010VoteInfo\022$\n" + - "\004type\030\001 \001(\0162\020.pactus.VoteTypeR\004type\022\024\n\005v" + - "oter\030\002 \001(\tR\005voter\022\035\n\nblock_hash\030\003 \001(\tR\tb" + - "lockHash\022\024\n\005round\030\004 \001(\005R\005round\022\031\n\010cp_rou" + - "nd\030\005 \001(\005R\007cpRound\022\031\n\010cp_value\030\006 \001(\005R\007cpV" + - "alue\"\227\001\n\rConsensusInfo\022\030\n\007address\030\001 \001(\tR" + - "\007address\022\026\n\006active\030\002 \001(\010R\006active\022\026\n\006heig" + - "ht\030\003 \001(\rR\006height\022\024\n\005round\030\004 \001(\005R\005round\022&" + - "\n\005votes\030\005 \003(\0132\020.pactus.VoteInfoR\005votes*H" + - "\n\016BlockVerbosity\022\016\n\nBLOCK_DATA\020\000\022\016\n\nBLOC" + - "K_INFO\020\001\022\026\n\022BLOCK_TRANSACTIONS\020\002*\\\n\010Vote" + - "Type\022\020\n\014VOTE_UNKNOWN\020\000\022\020\n\014VOTE_PREPARE\020\001" + - "\022\022\n\016VOTE_PRECOMMIT\020\002\022\030\n\024VOTE_CHANGE_PROP" + - "OSER\020\0032\213\007\n\nBlockchain\022=\n\010GetBlock\022\027.pact" + - "us.GetBlockRequest\032\030.pactus.GetBlockResp" + - "onse\022I\n\014GetBlockHash\022\033.pactus.GetBlockHa" + - "shRequest\032\034.pactus.GetBlockHashResponse\022" + - "O\n\016GetBlockHeight\022\035.pactus.GetBlockHeigh" + - "tRequest\032\036.pactus.GetBlockHeightResponse" + - "\022X\n\021GetBlockchainInfo\022 .pactus.GetBlockc" + - "hainInfoRequest\032!.pactus.GetBlockchainIn" + - "foResponse\022U\n\020GetConsensusInfo\022\037.pactus." + - "GetConsensusInfoRequest\032 .pactus.GetCons" + - "ensusInfoResponse\022C\n\nGetAccount\022\031.pactus" + - ".GetAccountRequest\032\032.pactus.GetAccountRe" + - "sponse\022I\n\014GetValidator\022\033.pactus.GetValid" + - "atorRequest\032\034.pactus.GetValidatorRespons" + - "e\022Y\n\024GetValidatorByNumber\022#.pactus.GetVa" + - "lidatorByNumberRequest\032\034.pactus.GetValid" + - "atorResponse\022d\n\025GetValidatorAddresses\022$." + - "pactus.GetValidatorAddressesRequest\032%.pa" + - "ctus.GetValidatorAddressesResponse\022I\n\014Ge" + - "tPublicKey\022\033.pactus.GetPublicKeyRequest\032" + - "\034.pactus.GetPublicKeyResponse\022U\n\020GetTxPo" + - "olContent\022\037.pactus.GetTxPoolContentReque" + - "st\032 .pactus.GetTxPoolContentResponseBE\n\021" + - "pactus.blockchainZ0github.com/pactus-pro" + - "ject/pactus/www/grpc/pactusb\006proto3" + "2\025.pactus.ConsensusInfoR\tinstances\022,\n\010pr" + + "oposal\030\006 \001(\0132\020.pactus.ProposalR\010proposal" + + "\"Q\n\027GetTxPoolContentRequest\0226\n\014payload_t" + + "ype\030\001 \001(\0162\023.pactus.PayloadTypeR\013payloadT" + + "ype\"E\n\030GetTxPoolContentResponse\022)\n\003txs\030\001" + + " \003(\0132\027.pactus.TransactionInfoR\003txs\"\334\002\n\rV" + + "alidatorInfo\022\022\n\004hash\030\001 \001(\tR\004hash\022\022\n\004data" + + "\030\002 \001(\tR\004data\022\035\n\npublic_key\030\003 \001(\tR\tpublic" + + "Key\022\026\n\006number\030\004 \001(\005R\006number\022\024\n\005stake\030\005 \001" + + "(\003R\005stake\022.\n\023last_bonding_height\030\006 \001(\rR\021" + + "lastBondingHeight\0222\n\025last_sortition_heig" + + "ht\030\007 \001(\rR\023lastSortitionHeight\022)\n\020unbondi" + + "ng_height\030\010 \001(\rR\017unbondingHeight\022\030\n\007addr" + + "ess\030\t \001(\tR\007address\022-\n\022availability_score" + + "\030\n \001(\001R\021availabilityScore\"\201\001\n\013AccountInf" + + "o\022\022\n\004hash\030\001 \001(\tR\004hash\022\022\n\004data\030\002 \001(\tR\004dat" + + "a\022\026\n\006number\030\003 \001(\005R\006number\022\030\n\007balance\030\004 \001" + + "(\003R\007balance\022\030\n\007address\030\005 \001(\tR\007address\"\304\001" + + "\n\017BlockHeaderInfo\022\030\n\007version\030\001 \001(\005R\007vers" + + "ion\022&\n\017prev_block_hash\030\002 \001(\tR\rprevBlockH" + + "ash\022\035\n\nstate_root\030\003 \001(\tR\tstateRoot\022%\n\016so" + + "rtition_seed\030\004 \001(\tR\rsortitionSeed\022)\n\020pro" + + "poser_address\030\005 \001(\tR\017proposerAddress\"\227\001\n" + + "\017CertificateInfo\022\022\n\004hash\030\001 \001(\tR\004hash\022\024\n\005" + + "round\030\002 \001(\005R\005round\022\036\n\ncommitters\030\003 \003(\005R\n" + + "committers\022\034\n\tabsentees\030\004 \003(\005R\tabsentees" + + "\022\034\n\tsignature\030\005 \001(\tR\tsignature\"\261\001\n\010VoteI" + + "nfo\022$\n\004type\030\001 \001(\0162\020.pactus.VoteTypeR\004typ" + + "e\022\024\n\005voter\030\002 \001(\tR\005voter\022\035\n\nblock_hash\030\003 " + + "\001(\tR\tblockHash\022\024\n\005round\030\004 \001(\005R\005round\022\031\n\010" + + "cp_round\030\005 \001(\005R\007cpRound\022\031\n\010cp_value\030\006 \001(" + + "\005R\007cpValue\"\227\001\n\rConsensusInfo\022\030\n\007address\030" + + "\001 \001(\tR\007address\022\026\n\006active\030\002 \001(\010R\006active\022\026" + + "\n\006height\030\003 \001(\rR\006height\022\024\n\005round\030\004 \001(\005R\005r" + + "ound\022&\n\005votes\030\005 \003(\0132\020.pactus.VoteInfoR\005v" + + "otes\"~\n\010Proposal\022\026\n\006height\030\001 \001(\rR\006height" + + "\022\024\n\005round\030\002 \001(\005R\005round\022\035\n\nblock_data\030\003 \001" + + "(\tR\tblockData\022%\n\016signature_data\030\004 \001(\tR\rs" + + "ignatureData*H\n\016BlockVerbosity\022\016\n\nBLOCK_" + + "DATA\020\000\022\016\n\nBLOCK_INFO\020\001\022\026\n\022BLOCK_TRANSACT" + + "IONS\020\002*\\\n\010VoteType\022\020\n\014VOTE_UNKNOWN\020\000\022\020\n\014" + + "VOTE_PREPARE\020\001\022\022\n\016VOTE_PRECOMMIT\020\002\022\030\n\024VO" + + "TE_CHANGE_PROPOSER\020\0032\213\007\n\nBlockchain\022=\n\010G" + + "etBlock\022\027.pactus.GetBlockRequest\032\030.pactu" + + "s.GetBlockResponse\022I\n\014GetBlockHash\022\033.pac" + + "tus.GetBlockHashRequest\032\034.pactus.GetBloc" + + "kHashResponse\022O\n\016GetBlockHeight\022\035.pactus" + + ".GetBlockHeightRequest\032\036.pactus.GetBlock" + + "HeightResponse\022X\n\021GetBlockchainInfo\022 .pa" + + "ctus.GetBlockchainInfoRequest\032!.pactus.G" + + "etBlockchainInfoResponse\022U\n\020GetConsensus" + + "Info\022\037.pactus.GetConsensusInfoRequest\032 ." + + "pactus.GetConsensusInfoResponse\022C\n\nGetAc" + + "count\022\031.pactus.GetAccountRequest\032\032.pactu" + + "s.GetAccountResponse\022I\n\014GetValidator\022\033.p" + + "actus.GetValidatorRequest\032\034.pactus.GetVa" + + "lidatorResponse\022Y\n\024GetValidatorByNumber\022" + + "#.pactus.GetValidatorByNumberRequest\032\034.p" + + "actus.GetValidatorResponse\022d\n\025GetValidat" + + "orAddresses\022$.pactus.GetValidatorAddress" + + "esRequest\032%.pactus.GetValidatorAddresses" + + "Response\022I\n\014GetPublicKey\022\033.pactus.GetPub" + + "licKeyRequest\032\034.pactus.GetPublicKeyRespo" + + "nse\022U\n\020GetTxPoolContent\022\037.pactus.GetTxPo" + + "olContentRequest\032 .pactus.GetTxPoolConte" + + "ntResponseBE\n\021pactus.blockchainZ0github." + + "com/pactus-project/pactus/www/grpc/pactu" + + "sb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -23727,7 +24952,7 @@ public pactus.blockchain.BlockchainOuterClass.ConsensusInfo getDefaultInstanceFo internal_static_pactus_GetConsensusInfoResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_GetConsensusInfoResponse_descriptor, - new java.lang.String[] { "Instances", }); + new java.lang.String[] { "Instances", "Proposal", }); internal_static_pactus_GetTxPoolContentRequest_descriptor = getDescriptor().getMessageTypes().get(19); internal_static_pactus_GetTxPoolContentRequest_fieldAccessorTable = new @@ -23776,6 +25001,12 @@ public pactus.blockchain.BlockchainOuterClass.ConsensusInfo getDefaultInstanceFo com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_ConsensusInfo_descriptor, new java.lang.String[] { "Address", "Active", "Height", "Round", "Votes", }); + internal_static_pactus_Proposal_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_pactus_Proposal_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_Proposal_descriptor, + new java.lang.String[] { "Height", "Round", "BlockData", "SignatureData", }); pactus.transaction.TransactionOuterClass.getDescriptor(); } diff --git a/www/grpc/gen/js/blockchain_pb.js b/www/grpc/gen/js/blockchain_pb.js index b763cfa55..e9f2d347e 100644 --- a/www/grpc/gen/js/blockchain_pb.js +++ b/www/grpc/gen/js/blockchain_pb.js @@ -49,6 +49,7 @@ goog.exportSymbol('proto.pactus.GetValidatorAddressesResponse', null, global); goog.exportSymbol('proto.pactus.GetValidatorByNumberRequest', null, global); goog.exportSymbol('proto.pactus.GetValidatorRequest', null, global); goog.exportSymbol('proto.pactus.GetValidatorResponse', null, global); +goog.exportSymbol('proto.pactus.Proposal', null, global); goog.exportSymbol('proto.pactus.ValidatorInfo', null, global); goog.exportSymbol('proto.pactus.VoteInfo', null, global); goog.exportSymbol('proto.pactus.VoteType', null, global); @@ -619,6 +620,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.pactus.ConsensusInfo.displayName = 'proto.pactus.ConsensusInfo'; } +/** + * 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.Proposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.Proposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.Proposal.displayName = 'proto.pactus.Proposal'; +} @@ -3562,7 +3584,8 @@ proto.pactus.GetConsensusInfoResponse.prototype.toObject = function(opt_includeI proto.pactus.GetConsensusInfoResponse.toObject = function(includeInstance, msg) { var f, obj = { instancesList: jspb.Message.toObjectList(msg.getInstancesList(), - proto.pactus.ConsensusInfo.toObject, includeInstance) + proto.pactus.ConsensusInfo.toObject, includeInstance), + proposal: (f = msg.getProposal()) && proto.pactus.Proposal.toObject(includeInstance, f) }; if (includeInstance) { @@ -3604,6 +3627,11 @@ proto.pactus.GetConsensusInfoResponse.deserializeBinaryFromReader = function(msg reader.readMessage(value,proto.pactus.ConsensusInfo.deserializeBinaryFromReader); msg.addInstances(value); break; + case 6: + var value = new proto.pactus.Proposal; + reader.readMessage(value,proto.pactus.Proposal.deserializeBinaryFromReader); + msg.setProposal(value); + break; default: reader.skipField(); break; @@ -3641,6 +3669,14 @@ proto.pactus.GetConsensusInfoResponse.serializeBinaryToWriter = function(message proto.pactus.ConsensusInfo.serializeBinaryToWriter ); } + f = message.getProposal(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.pactus.Proposal.serializeBinaryToWriter + ); + } }; @@ -3682,6 +3718,43 @@ proto.pactus.GetConsensusInfoResponse.prototype.clearInstancesList = function() }; +/** + * optional Proposal proposal = 6; + * @return {?proto.pactus.Proposal} + */ +proto.pactus.GetConsensusInfoResponse.prototype.getProposal = function() { + return /** @type{?proto.pactus.Proposal} */ ( + jspb.Message.getWrapperField(this, proto.pactus.Proposal, 6)); +}; + + +/** + * @param {?proto.pactus.Proposal|undefined} value + * @return {!proto.pactus.GetConsensusInfoResponse} returns this +*/ +proto.pactus.GetConsensusInfoResponse.prototype.setProposal = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pactus.GetConsensusInfoResponse} returns this + */ +proto.pactus.GetConsensusInfoResponse.prototype.clearProposal = function() { + return this.setProposal(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pactus.GetConsensusInfoResponse.prototype.hasProposal = function() { + return jspb.Message.getField(this, 6) != null; +}; + + @@ -5731,6 +5804,226 @@ proto.pactus.ConsensusInfo.prototype.clearVotesList = function() { }; + + + +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.Proposal.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.Proposal.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.Proposal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.Proposal.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + round: jspb.Message.getFieldWithDefault(msg, 2, 0), + blockData: jspb.Message.getFieldWithDefault(msg, 3, ""), + signatureData: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + 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.Proposal} + */ +proto.pactus.Proposal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.Proposal; + return proto.pactus.Proposal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.Proposal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.Proposal} + */ +proto.pactus.Proposal.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRound(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setBlockData(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSignatureData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.Proposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.Proposal.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.Proposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.Proposal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getRound(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getBlockData(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSignatureData(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional uint32 height = 1; + * @return {number} + */ +proto.pactus.Proposal.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.Proposal} returns this + */ +proto.pactus.Proposal.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 round = 2; + * @return {number} + */ +proto.pactus.Proposal.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.Proposal} returns this + */ +proto.pactus.Proposal.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string block_data = 3; + * @return {string} + */ +proto.pactus.Proposal.prototype.getBlockData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.Proposal} returns this + */ +proto.pactus.Proposal.prototype.setBlockData = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string signature_data = 4; + * @return {string} + */ +proto.pactus.Proposal.prototype.getSignatureData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.Proposal} returns this + */ +proto.pactus.Proposal.prototype.setSignatureData = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + /** * @enum {number} */ diff --git a/www/grpc/gen/python/blockchain_pb2.py b/www/grpc/gen/python/blockchain_pb2.py index 4fd752f31..f79c1ad09 100644 --- a/www/grpc/gen/python/blockchain_pb2.py +++ b/www/grpc/gen/python/blockchain_pb2.py @@ -14,7 +14,7 @@ import transaction_pb2 as transaction__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10\x62lockchain.proto\x12\x06pactus\x1a\x11transaction.proto\"-\n\x11GetAccountRequest\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\"C\n\x12GetAccountResponse\x12-\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\x13.pactus.AccountInfoR\x07\x61\x63\x63ount\"\x1e\n\x1cGetValidatorAddressesRequest\"=\n\x1dGetValidatorAddressesResponse\x12\x1c\n\taddresses\x18\x01 \x03(\tR\taddresses\"/\n\x13GetValidatorRequest\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\"5\n\x1bGetValidatorByNumberRequest\x12\x16\n\x06number\x18\x01 \x01(\x05R\x06number\"K\n\x14GetValidatorResponse\x12\x33\n\tvalidator\x18\x01 \x01(\x0b\x32\x15.pactus.ValidatorInfoR\tvalidator\"/\n\x13GetPublicKeyRequest\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\"5\n\x14GetPublicKeyResponse\x12\x1d\n\npublic_key\x18\x01 \x01(\tR\tpublicKey\"_\n\x0fGetBlockRequest\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\x12\x34\n\tverbosity\x18\x02 \x01(\x0e\x32\x16.pactus.BlockVerbosityR\tverbosity\"\x83\x02\n\x10GetBlockResponse\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\x12\x12\n\x04hash\x18\x02 \x01(\tR\x04hash\x12\x12\n\x04\x64\x61ta\x18\x03 \x01(\tR\x04\x64\x61ta\x12\x1d\n\nblock_time\x18\x04 \x01(\rR\tblockTime\x12/\n\x06header\x18\x05 \x01(\x0b\x32\x17.pactus.BlockHeaderInfoR\x06header\x12\x34\n\tprev_cert\x18\x06 \x01(\x0b\x32\x17.pactus.CertificateInfoR\x08prevCert\x12)\n\x03txs\x18\x07 \x03(\x0b\x32\x17.pactus.TransactionInfoR\x03txs\"-\n\x13GetBlockHashRequest\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\"*\n\x14GetBlockHashResponse\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\"+\n\x15GetBlockHeightRequest\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\"0\n\x16GetBlockHeightResponse\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\"\x1a\n\x18GetBlockchainInfoRequest\"\xc1\x03\n\x19GetBlockchainInfoResponse\x12*\n\x11last_block_height\x18\x01 \x01(\rR\x0flastBlockHeight\x12&\n\x0flast_block_hash\x18\x02 \x01(\tR\rlastBlockHash\x12%\n\x0etotal_accounts\x18\x03 \x01(\x05R\rtotalAccounts\x12)\n\x10total_validators\x18\x04 \x01(\x05R\x0ftotalValidators\x12\x1f\n\x0btotal_power\x18\x05 \x01(\x03R\ntotalPower\x12\'\n\x0f\x63ommittee_power\x18\x06 \x01(\x03R\x0e\x63ommitteePower\x12H\n\x14\x63ommittee_validators\x18\x07 \x03(\x0b\x32\x15.pactus.ValidatorInfoR\x13\x63ommitteeValidators\x12\x1b\n\tis_pruned\x18\x08 \x01(\x08R\x08isPruned\x12%\n\x0epruning_height\x18\t \x01(\rR\rpruningHeight\x12&\n\x0flast_block_time\x18\n \x01(\x03R\rlastBlockTime\"\x19\n\x17GetConsensusInfoRequest\"O\n\x18GetConsensusInfoResponse\x12\x33\n\tinstances\x18\x01 \x03(\x0b\x32\x15.pactus.ConsensusInfoR\tinstances\"Q\n\x17GetTxPoolContentRequest\x12\x36\n\x0cpayload_type\x18\x01 \x01(\x0e\x32\x13.pactus.PayloadTypeR\x0bpayloadType\"E\n\x18GetTxPoolContentResponse\x12)\n\x03txs\x18\x01 \x03(\x0b\x32\x17.pactus.TransactionInfoR\x03txs\"\xdc\x02\n\rValidatorInfo\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\x12\x12\n\x04\x64\x61ta\x18\x02 \x01(\tR\x04\x64\x61ta\x12\x1d\n\npublic_key\x18\x03 \x01(\tR\tpublicKey\x12\x16\n\x06number\x18\x04 \x01(\x05R\x06number\x12\x14\n\x05stake\x18\x05 \x01(\x03R\x05stake\x12.\n\x13last_bonding_height\x18\x06 \x01(\rR\x11lastBondingHeight\x12\x32\n\x15last_sortition_height\x18\x07 \x01(\rR\x13lastSortitionHeight\x12)\n\x10unbonding_height\x18\x08 \x01(\rR\x0funbondingHeight\x12\x18\n\x07\x61\x64\x64ress\x18\t \x01(\tR\x07\x61\x64\x64ress\x12-\n\x12\x61vailability_score\x18\n \x01(\x01R\x11\x61vailabilityScore\"\x81\x01\n\x0b\x41\x63\x63ountInfo\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\x12\x12\n\x04\x64\x61ta\x18\x02 \x01(\tR\x04\x64\x61ta\x12\x16\n\x06number\x18\x03 \x01(\x05R\x06number\x12\x18\n\x07\x62\x61lance\x18\x04 \x01(\x03R\x07\x62\x61lance\x12\x18\n\x07\x61\x64\x64ress\x18\x05 \x01(\tR\x07\x61\x64\x64ress\"\xc4\x01\n\x0f\x42lockHeaderInfo\x12\x18\n\x07version\x18\x01 \x01(\x05R\x07version\x12&\n\x0fprev_block_hash\x18\x02 \x01(\tR\rprevBlockHash\x12\x1d\n\nstate_root\x18\x03 \x01(\tR\tstateRoot\x12%\n\x0esortition_seed\x18\x04 \x01(\tR\rsortitionSeed\x12)\n\x10proposer_address\x18\x05 \x01(\tR\x0fproposerAddress\"\x97\x01\n\x0f\x43\x65rtificateInfo\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\x12\x14\n\x05round\x18\x02 \x01(\x05R\x05round\x12\x1e\n\ncommitters\x18\x03 \x03(\x05R\ncommitters\x12\x1c\n\tabsentees\x18\x04 \x03(\x05R\tabsentees\x12\x1c\n\tsignature\x18\x05 \x01(\tR\tsignature\"\xb1\x01\n\x08VoteInfo\x12$\n\x04type\x18\x01 \x01(\x0e\x32\x10.pactus.VoteTypeR\x04type\x12\x14\n\x05voter\x18\x02 \x01(\tR\x05voter\x12\x1d\n\nblock_hash\x18\x03 \x01(\tR\tblockHash\x12\x14\n\x05round\x18\x04 \x01(\x05R\x05round\x12\x19\n\x08\x63p_round\x18\x05 \x01(\x05R\x07\x63pRound\x12\x19\n\x08\x63p_value\x18\x06 \x01(\x05R\x07\x63pValue\"\x97\x01\n\rConsensusInfo\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\x12\x16\n\x06\x61\x63tive\x18\x02 \x01(\x08R\x06\x61\x63tive\x12\x16\n\x06height\x18\x03 \x01(\rR\x06height\x12\x14\n\x05round\x18\x04 \x01(\x05R\x05round\x12&\n\x05votes\x18\x05 \x03(\x0b\x32\x10.pactus.VoteInfoR\x05votes*H\n\x0e\x42lockVerbosity\x12\x0e\n\nBLOCK_DATA\x10\x00\x12\x0e\n\nBLOCK_INFO\x10\x01\x12\x16\n\x12\x42LOCK_TRANSACTIONS\x10\x02*\\\n\x08VoteType\x12\x10\n\x0cVOTE_UNKNOWN\x10\x00\x12\x10\n\x0cVOTE_PREPARE\x10\x01\x12\x12\n\x0eVOTE_PRECOMMIT\x10\x02\x12\x18\n\x14VOTE_CHANGE_PROPOSER\x10\x03\x32\x8b\x07\n\nBlockchain\x12=\n\x08GetBlock\x12\x17.pactus.GetBlockRequest\x1a\x18.pactus.GetBlockResponse\x12I\n\x0cGetBlockHash\x12\x1b.pactus.GetBlockHashRequest\x1a\x1c.pactus.GetBlockHashResponse\x12O\n\x0eGetBlockHeight\x12\x1d.pactus.GetBlockHeightRequest\x1a\x1e.pactus.GetBlockHeightResponse\x12X\n\x11GetBlockchainInfo\x12 .pactus.GetBlockchainInfoRequest\x1a!.pactus.GetBlockchainInfoResponse\x12U\n\x10GetConsensusInfo\x12\x1f.pactus.GetConsensusInfoRequest\x1a .pactus.GetConsensusInfoResponse\x12\x43\n\nGetAccount\x12\x19.pactus.GetAccountRequest\x1a\x1a.pactus.GetAccountResponse\x12I\n\x0cGetValidator\x12\x1b.pactus.GetValidatorRequest\x1a\x1c.pactus.GetValidatorResponse\x12Y\n\x14GetValidatorByNumber\x12#.pactus.GetValidatorByNumberRequest\x1a\x1c.pactus.GetValidatorResponse\x12\x64\n\x15GetValidatorAddresses\x12$.pactus.GetValidatorAddressesRequest\x1a%.pactus.GetValidatorAddressesResponse\x12I\n\x0cGetPublicKey\x12\x1b.pactus.GetPublicKeyRequest\x1a\x1c.pactus.GetPublicKeyResponse\x12U\n\x10GetTxPoolContent\x12\x1f.pactus.GetTxPoolContentRequest\x1a .pactus.GetTxPoolContentResponseBE\n\x11pactus.blockchainZ0github.com/pactus-project/pactus/www/grpc/pactusb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10\x62lockchain.proto\x12\x06pactus\x1a\x11transaction.proto\"-\n\x11GetAccountRequest\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\"C\n\x12GetAccountResponse\x12-\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\x13.pactus.AccountInfoR\x07\x61\x63\x63ount\"\x1e\n\x1cGetValidatorAddressesRequest\"=\n\x1dGetValidatorAddressesResponse\x12\x1c\n\taddresses\x18\x01 \x03(\tR\taddresses\"/\n\x13GetValidatorRequest\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\"5\n\x1bGetValidatorByNumberRequest\x12\x16\n\x06number\x18\x01 \x01(\x05R\x06number\"K\n\x14GetValidatorResponse\x12\x33\n\tvalidator\x18\x01 \x01(\x0b\x32\x15.pactus.ValidatorInfoR\tvalidator\"/\n\x13GetPublicKeyRequest\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\"5\n\x14GetPublicKeyResponse\x12\x1d\n\npublic_key\x18\x01 \x01(\tR\tpublicKey\"_\n\x0fGetBlockRequest\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\x12\x34\n\tverbosity\x18\x02 \x01(\x0e\x32\x16.pactus.BlockVerbosityR\tverbosity\"\x83\x02\n\x10GetBlockResponse\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\x12\x12\n\x04hash\x18\x02 \x01(\tR\x04hash\x12\x12\n\x04\x64\x61ta\x18\x03 \x01(\tR\x04\x64\x61ta\x12\x1d\n\nblock_time\x18\x04 \x01(\rR\tblockTime\x12/\n\x06header\x18\x05 \x01(\x0b\x32\x17.pactus.BlockHeaderInfoR\x06header\x12\x34\n\tprev_cert\x18\x06 \x01(\x0b\x32\x17.pactus.CertificateInfoR\x08prevCert\x12)\n\x03txs\x18\x07 \x03(\x0b\x32\x17.pactus.TransactionInfoR\x03txs\"-\n\x13GetBlockHashRequest\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\"*\n\x14GetBlockHashResponse\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\"+\n\x15GetBlockHeightRequest\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\"0\n\x16GetBlockHeightResponse\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\"\x1a\n\x18GetBlockchainInfoRequest\"\xc1\x03\n\x19GetBlockchainInfoResponse\x12*\n\x11last_block_height\x18\x01 \x01(\rR\x0flastBlockHeight\x12&\n\x0flast_block_hash\x18\x02 \x01(\tR\rlastBlockHash\x12%\n\x0etotal_accounts\x18\x03 \x01(\x05R\rtotalAccounts\x12)\n\x10total_validators\x18\x04 \x01(\x05R\x0ftotalValidators\x12\x1f\n\x0btotal_power\x18\x05 \x01(\x03R\ntotalPower\x12\'\n\x0f\x63ommittee_power\x18\x06 \x01(\x03R\x0e\x63ommitteePower\x12H\n\x14\x63ommittee_validators\x18\x07 \x03(\x0b\x32\x15.pactus.ValidatorInfoR\x13\x63ommitteeValidators\x12\x1b\n\tis_pruned\x18\x08 \x01(\x08R\x08isPruned\x12%\n\x0epruning_height\x18\t \x01(\rR\rpruningHeight\x12&\n\x0flast_block_time\x18\n \x01(\x03R\rlastBlockTime\"\x19\n\x17GetConsensusInfoRequest\"}\n\x18GetConsensusInfoResponse\x12\x33\n\tinstances\x18\x01 \x03(\x0b\x32\x15.pactus.ConsensusInfoR\tinstances\x12,\n\x08proposal\x18\x06 \x01(\x0b\x32\x10.pactus.ProposalR\x08proposal\"Q\n\x17GetTxPoolContentRequest\x12\x36\n\x0cpayload_type\x18\x01 \x01(\x0e\x32\x13.pactus.PayloadTypeR\x0bpayloadType\"E\n\x18GetTxPoolContentResponse\x12)\n\x03txs\x18\x01 \x03(\x0b\x32\x17.pactus.TransactionInfoR\x03txs\"\xdc\x02\n\rValidatorInfo\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\x12\x12\n\x04\x64\x61ta\x18\x02 \x01(\tR\x04\x64\x61ta\x12\x1d\n\npublic_key\x18\x03 \x01(\tR\tpublicKey\x12\x16\n\x06number\x18\x04 \x01(\x05R\x06number\x12\x14\n\x05stake\x18\x05 \x01(\x03R\x05stake\x12.\n\x13last_bonding_height\x18\x06 \x01(\rR\x11lastBondingHeight\x12\x32\n\x15last_sortition_height\x18\x07 \x01(\rR\x13lastSortitionHeight\x12)\n\x10unbonding_height\x18\x08 \x01(\rR\x0funbondingHeight\x12\x18\n\x07\x61\x64\x64ress\x18\t \x01(\tR\x07\x61\x64\x64ress\x12-\n\x12\x61vailability_score\x18\n \x01(\x01R\x11\x61vailabilityScore\"\x81\x01\n\x0b\x41\x63\x63ountInfo\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\x12\x12\n\x04\x64\x61ta\x18\x02 \x01(\tR\x04\x64\x61ta\x12\x16\n\x06number\x18\x03 \x01(\x05R\x06number\x12\x18\n\x07\x62\x61lance\x18\x04 \x01(\x03R\x07\x62\x61lance\x12\x18\n\x07\x61\x64\x64ress\x18\x05 \x01(\tR\x07\x61\x64\x64ress\"\xc4\x01\n\x0f\x42lockHeaderInfo\x12\x18\n\x07version\x18\x01 \x01(\x05R\x07version\x12&\n\x0fprev_block_hash\x18\x02 \x01(\tR\rprevBlockHash\x12\x1d\n\nstate_root\x18\x03 \x01(\tR\tstateRoot\x12%\n\x0esortition_seed\x18\x04 \x01(\tR\rsortitionSeed\x12)\n\x10proposer_address\x18\x05 \x01(\tR\x0fproposerAddress\"\x97\x01\n\x0f\x43\x65rtificateInfo\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\x12\x14\n\x05round\x18\x02 \x01(\x05R\x05round\x12\x1e\n\ncommitters\x18\x03 \x03(\x05R\ncommitters\x12\x1c\n\tabsentees\x18\x04 \x03(\x05R\tabsentees\x12\x1c\n\tsignature\x18\x05 \x01(\tR\tsignature\"\xb1\x01\n\x08VoteInfo\x12$\n\x04type\x18\x01 \x01(\x0e\x32\x10.pactus.VoteTypeR\x04type\x12\x14\n\x05voter\x18\x02 \x01(\tR\x05voter\x12\x1d\n\nblock_hash\x18\x03 \x01(\tR\tblockHash\x12\x14\n\x05round\x18\x04 \x01(\x05R\x05round\x12\x19\n\x08\x63p_round\x18\x05 \x01(\x05R\x07\x63pRound\x12\x19\n\x08\x63p_value\x18\x06 \x01(\x05R\x07\x63pValue\"\x97\x01\n\rConsensusInfo\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\x12\x16\n\x06\x61\x63tive\x18\x02 \x01(\x08R\x06\x61\x63tive\x12\x16\n\x06height\x18\x03 \x01(\rR\x06height\x12\x14\n\x05round\x18\x04 \x01(\x05R\x05round\x12&\n\x05votes\x18\x05 \x03(\x0b\x32\x10.pactus.VoteInfoR\x05votes\"~\n\x08Proposal\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\x12\x14\n\x05round\x18\x02 \x01(\x05R\x05round\x12\x1d\n\nblock_data\x18\x03 \x01(\tR\tblockData\x12%\n\x0esignature_data\x18\x04 \x01(\tR\rsignatureData*H\n\x0e\x42lockVerbosity\x12\x0e\n\nBLOCK_DATA\x10\x00\x12\x0e\n\nBLOCK_INFO\x10\x01\x12\x16\n\x12\x42LOCK_TRANSACTIONS\x10\x02*\\\n\x08VoteType\x12\x10\n\x0cVOTE_UNKNOWN\x10\x00\x12\x10\n\x0cVOTE_PREPARE\x10\x01\x12\x12\n\x0eVOTE_PRECOMMIT\x10\x02\x12\x18\n\x14VOTE_CHANGE_PROPOSER\x10\x03\x32\x8b\x07\n\nBlockchain\x12=\n\x08GetBlock\x12\x17.pactus.GetBlockRequest\x1a\x18.pactus.GetBlockResponse\x12I\n\x0cGetBlockHash\x12\x1b.pactus.GetBlockHashRequest\x1a\x1c.pactus.GetBlockHashResponse\x12O\n\x0eGetBlockHeight\x12\x1d.pactus.GetBlockHeightRequest\x1a\x1e.pactus.GetBlockHeightResponse\x12X\n\x11GetBlockchainInfo\x12 .pactus.GetBlockchainInfoRequest\x1a!.pactus.GetBlockchainInfoResponse\x12U\n\x10GetConsensusInfo\x12\x1f.pactus.GetConsensusInfoRequest\x1a .pactus.GetConsensusInfoResponse\x12\x43\n\nGetAccount\x12\x19.pactus.GetAccountRequest\x1a\x1a.pactus.GetAccountResponse\x12I\n\x0cGetValidator\x12\x1b.pactus.GetValidatorRequest\x1a\x1c.pactus.GetValidatorResponse\x12Y\n\x14GetValidatorByNumber\x12#.pactus.GetValidatorByNumberRequest\x1a\x1c.pactus.GetValidatorResponse\x12\x64\n\x15GetValidatorAddresses\x12$.pactus.GetValidatorAddressesRequest\x1a%.pactus.GetValidatorAddressesResponse\x12I\n\x0cGetPublicKey\x12\x1b.pactus.GetPublicKeyRequest\x1a\x1c.pactus.GetPublicKeyResponse\x12U\n\x10GetTxPoolContent\x12\x1f.pactus.GetTxPoolContentRequest\x1a .pactus.GetTxPoolContentResponseBE\n\x11pactus.blockchainZ0github.com/pactus-project/pactus/www/grpc/pactusb\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'blockchain_pb2', globals()) @@ -22,10 +22,10 @@ DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\021pactus.blockchainZ0github.com/pactus-project/pactus/www/grpc/pactus' - _BLOCKVERBOSITY._serialized_start=3000 - _BLOCKVERBOSITY._serialized_end=3072 - _VOTETYPE._serialized_start=3074 - _VOTETYPE._serialized_end=3166 + _BLOCKVERBOSITY._serialized_start=3174 + _BLOCKVERBOSITY._serialized_end=3246 + _VOTETYPE._serialized_start=3248 + _VOTETYPE._serialized_end=3340 _GETACCOUNTREQUEST._serialized_start=47 _GETACCOUNTREQUEST._serialized_end=92 _GETACCOUNTRESPONSE._serialized_start=94 @@ -63,23 +63,25 @@ _GETCONSENSUSINFOREQUEST._serialized_start=1568 _GETCONSENSUSINFOREQUEST._serialized_end=1593 _GETCONSENSUSINFORESPONSE._serialized_start=1595 - _GETCONSENSUSINFORESPONSE._serialized_end=1674 - _GETTXPOOLCONTENTREQUEST._serialized_start=1676 - _GETTXPOOLCONTENTREQUEST._serialized_end=1757 - _GETTXPOOLCONTENTRESPONSE._serialized_start=1759 - _GETTXPOOLCONTENTRESPONSE._serialized_end=1828 - _VALIDATORINFO._serialized_start=1831 - _VALIDATORINFO._serialized_end=2179 - _ACCOUNTINFO._serialized_start=2182 - _ACCOUNTINFO._serialized_end=2311 - _BLOCKHEADERINFO._serialized_start=2314 - _BLOCKHEADERINFO._serialized_end=2510 - _CERTIFICATEINFO._serialized_start=2513 - _CERTIFICATEINFO._serialized_end=2664 - _VOTEINFO._serialized_start=2667 - _VOTEINFO._serialized_end=2844 - _CONSENSUSINFO._serialized_start=2847 - _CONSENSUSINFO._serialized_end=2998 - _BLOCKCHAIN._serialized_start=3169 - _BLOCKCHAIN._serialized_end=4076 + _GETCONSENSUSINFORESPONSE._serialized_end=1720 + _GETTXPOOLCONTENTREQUEST._serialized_start=1722 + _GETTXPOOLCONTENTREQUEST._serialized_end=1803 + _GETTXPOOLCONTENTRESPONSE._serialized_start=1805 + _GETTXPOOLCONTENTRESPONSE._serialized_end=1874 + _VALIDATORINFO._serialized_start=1877 + _VALIDATORINFO._serialized_end=2225 + _ACCOUNTINFO._serialized_start=2228 + _ACCOUNTINFO._serialized_end=2357 + _BLOCKHEADERINFO._serialized_start=2360 + _BLOCKHEADERINFO._serialized_end=2556 + _CERTIFICATEINFO._serialized_start=2559 + _CERTIFICATEINFO._serialized_end=2710 + _VOTEINFO._serialized_start=2713 + _VOTEINFO._serialized_end=2890 + _CONSENSUSINFO._serialized_start=2893 + _CONSENSUSINFO._serialized_end=3044 + _PROPOSAL._serialized_start=3046 + _PROPOSAL._serialized_end=3172 + _BLOCKCHAIN._serialized_start=3343 + _BLOCKCHAIN._serialized_end=4250 # @@protoc_insertion_point(module_scope) diff --git a/www/grpc/gen/rust/pactus.rs b/www/grpc/gen/rust/pactus.rs index 0ee61993b..d9b89a303 100644 --- a/www/grpc/gen/rust/pactus.rs +++ b/www/grpc/gen/rust/pactus.rs @@ -548,6 +548,9 @@ pub struct GetConsensusInfoResponse { /// List of consensus instances. #[prost(message, repeated, tag="1")] pub instances: ::prost::alloc::vec::Vec, + /// The proposal of the consensus info. + #[prost(message, optional, tag="6")] + pub proposal: ::core::option::Option, } /// Request message to retrieve transactions in the transaction pool. #[allow(clippy::derive_partial_eq_without_eq)] @@ -705,6 +708,23 @@ pub struct ConsensusInfo { #[prost(message, repeated, tag="5")] pub votes: ::prost::alloc::vec::Vec, } +/// Message containing information about a proposal. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Proposal { + /// The height of the proposal. + #[prost(uint32, tag="1")] + pub height: u32, + /// The round of the proposal. + #[prost(int32, tag="2")] + pub round: i32, + /// The block data of the proposal. + #[prost(string, tag="3")] + pub block_data: ::prost::alloc::string::String, + /// The signature data of the proposal. + #[prost(string, tag="4")] + pub signature_data: ::prost::alloc::string::String, +} /// Enumeration for verbosity levels when requesting block information. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] diff --git a/www/grpc/gen/rust/pactus.serde.rs b/www/grpc/gen/rust/pactus.serde.rs index 8b34387f3..c62bf4ab1 100644 --- a/www/grpc/gen/rust/pactus.serde.rs +++ b/www/grpc/gen/rust/pactus.serde.rs @@ -3194,10 +3194,16 @@ impl serde::Serialize for GetConsensusInfoResponse { if !self.instances.is_empty() { len += 1; } + if self.proposal.is_some() { + len += 1; + } let mut struct_ser = serializer.serialize_struct("pactus.GetConsensusInfoResponse", len)?; if !self.instances.is_empty() { struct_ser.serialize_field("instances", &self.instances)?; } + if let Some(v) = self.proposal.as_ref() { + struct_ser.serialize_field("proposal", v)?; + } struct_ser.end() } } @@ -3209,11 +3215,13 @@ impl<'de> serde::Deserialize<'de> for GetConsensusInfoResponse { { const FIELDS: &[&str] = &[ "instances", + "proposal", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { Instances, + Proposal, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -3236,6 +3244,7 @@ impl<'de> serde::Deserialize<'de> for GetConsensusInfoResponse { { match value { "instances" => Ok(GeneratedField::Instances), + "proposal" => Ok(GeneratedField::Proposal), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -3256,6 +3265,7 @@ impl<'de> serde::Deserialize<'de> for GetConsensusInfoResponse { V: serde::de::MapAccess<'de>, { let mut instances__ = None; + let mut proposal__ = None; while let Some(k) = map.next_key()? { match k { GeneratedField::Instances => { @@ -3264,10 +3274,17 @@ impl<'de> serde::Deserialize<'de> for GetConsensusInfoResponse { } instances__ = Some(map.next_value()?); } + GeneratedField::Proposal => { + if proposal__.is_some() { + return Err(serde::de::Error::duplicate_field("proposal")); + } + proposal__ = map.next_value()?; + } } } Ok(GetConsensusInfoResponse { instances: instances__.unwrap_or_default(), + proposal: proposal__, }) } } @@ -7856,6 +7873,154 @@ impl<'de> serde::Deserialize<'de> for PeerInfo { deserializer.deserialize_struct("pactus.PeerInfo", FIELDS, GeneratedVisitor) } } +impl serde::Serialize for Proposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.height != 0 { + len += 1; + } + if self.round != 0 { + len += 1; + } + if !self.block_data.is_empty() { + len += 1; + } + if !self.signature_data.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.Proposal", len)?; + if self.height != 0 { + struct_ser.serialize_field("height", &self.height)?; + } + if self.round != 0 { + struct_ser.serialize_field("round", &self.round)?; + } + if !self.block_data.is_empty() { + struct_ser.serialize_field("blockData", &self.block_data)?; + } + if !self.signature_data.is_empty() { + struct_ser.serialize_field("signatureData", &self.signature_data)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Proposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "height", + "round", + "block_data", + "blockData", + "signature_data", + "signatureData", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Height, + Round, + BlockData, + SignatureData, + } + 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 { + "height" => Ok(GeneratedField::Height), + "round" => Ok(GeneratedField::Round), + "blockData" | "block_data" => Ok(GeneratedField::BlockData), + "signatureData" | "signature_data" => Ok(GeneratedField::SignatureData), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Proposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.Proposal") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut height__ = None; + let mut round__ = None; + let mut block_data__ = None; + let mut signature_data__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); + } + height__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Round => { + if round__.is_some() { + return Err(serde::de::Error::duplicate_field("round")); + } + round__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::BlockData => { + if block_data__.is_some() { + return Err(serde::de::Error::duplicate_field("blockData")); + } + block_data__ = Some(map.next_value()?); + } + GeneratedField::SignatureData => { + if signature_data__.is_some() { + return Err(serde::de::Error::duplicate_field("signatureData")); + } + signature_data__ = Some(map.next_value()?); + } + } + } + Ok(Proposal { + height: height__.unwrap_or_default(), + round: round__.unwrap_or_default(), + block_data: block_data__.unwrap_or_default(), + signature_data: signature_data__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.Proposal", FIELDS, GeneratedVisitor) + } +} impl serde::Serialize for RestoreWalletRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result diff --git a/www/grpc/proto/blockchain.proto b/www/grpc/proto/blockchain.proto index 95e58efc4..7dc4f2082 100644 --- a/www/grpc/proto/blockchain.proto +++ b/www/grpc/proto/blockchain.proto @@ -186,8 +186,10 @@ message GetConsensusInfoRequest {} // Message containing the response with consensus information. message GetConsensusInfoResponse { + // The proposal of the consensus info. + Proposal proposal = 1; // List of consensus instances. - repeated ConsensusInfo instances = 1; + repeated ConsensusInfo instances = 2; } // Request message to retrieve transactions in the transaction pool. @@ -300,6 +302,20 @@ message ConsensusInfo { repeated VoteInfo votes = 5; } +// Message containing information about a proposal. +message Proposal { + // The height of the proposal. + uint32 height = 1; + // The round of the proposal. + int32 round = 2; + // The block data of the proposal. + string block_data = 3; + // The signature data of the proposal. + string signature_data = 4; +} + + + // Enumeration for verbosity levels when requesting block information. enum BlockVerbosity { // Request only block data. diff --git a/www/grpc/swagger-ui/pactus.swagger.json b/www/grpc/swagger-ui/pactus.swagger.json index fb438593b..293fcad78 100644 --- a/www/grpc/swagger-ui/pactus.swagger.json +++ b/www/grpc/swagger-ui/pactus.swagger.json @@ -1643,6 +1643,10 @@ "$ref": "#/definitions/pactusConsensusInfo" }, "description": "List of consensus instances." + }, + "proposal": { + "$ref": "#/definitions/pactusProposal", + "description": "The proposal of the consensus info." } }, "description": "Message containing the response with consensus information." @@ -2115,6 +2119,30 @@ }, "description": "Information about a peer in the network." }, + "pactusProposal": { + "type": "object", + "properties": { + "height": { + "type": "integer", + "format": "int64", + "description": "The height of the proposal." + }, + "round": { + "type": "integer", + "format": "int32", + "description": "The round of the proposal." + }, + "blockData": { + "type": "string", + "description": "The block data of the proposal." + }, + "signatureData": { + "type": "string", + "description": "The signature data of the proposal." + } + }, + "description": "Message containing information about a proposal." + }, "pactusRestoreWalletResponse": { "type": "object", "properties": { diff --git a/www/http/blockchain.go b/www/http/blockchain.go index f925e9e5d..d2e4bbf71 100644 --- a/www/http/blockchain.go +++ b/www/http/blockchain.go @@ -233,6 +233,14 @@ func (s *Server) ConsensusHandler(w http.ResponseWriter, r *http.Request) { } tm := newTableMaker() + + if res.Proposal != nil { + tm.addRowInt("Proposal == Height", int(res.Proposal.Height)) + tm.addRowInt("Proposal == Round", int(res.Proposal.Round)) + tm.addRowString("Proposal == BlockData", res.Proposal.BlockData) + tm.addRowString("Proposal == SignatureData", res.Proposal.SignatureData) + } + for i, cons := range res.Instances { tm.addRowInt("== Validator", i+1) tm.addRowValAddress("Address", cons.Address) @@ -250,5 +258,6 @@ func (s *Server) ConsensusHandler(w http.ResponseWriter, r *http.Request) { tm.addRowBlockHash("BlockHash", v.BlockHash) } } + s.writeHTML(w, tm.html()) }