Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(grpc): adding is pruned and pruning height in blockchain info API #1420

Merged
merged 7 commits into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions state/facade.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,6 @@ type Facade interface {
PublicKey(addr crypto.Address) (crypto.PublicKey, error)
AvailabilityScore(valNum int32) float64
AllPendingTxs() []*tx.Tx
IsPruned() bool
PruningHeight() uint32
}
8 changes: 8 additions & 0 deletions state/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,3 +267,11 @@ func (*MockState) AvailabilityScore(_ int32) float64 {
func (*MockState) AllPendingTxs() []*tx.Tx {
return make([]*tx.Tx, 0)
}

func (m *MockState) IsPruned() bool {
return m.TestStore.IsPruned()
}

func (m *MockState) PruningHeight() uint32 {
return m.TestStore.PruningHeight()
}
8 changes: 8 additions & 0 deletions state/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -762,3 +762,11 @@ func (st *state) AllPendingTxs() []*tx.Tx {

return st.txPool.AllPendingTxs()
}

func (st *state) IsPruned() bool {
return st.store.IsPruned()
kehiy marked this conversation as resolved.
Show resolved Hide resolved
}

func (st *state) PruningHeight() uint32 {
return st.store.PruningHeight()
}
1 change: 1 addition & 0 deletions store/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ type Reader interface {
LastCertificate() *certificate.BlockCertificate
IsBanned(addr crypto.Address) bool
IsPruned() bool
PruningHeight() uint32
}

type Store interface {
Expand Down
4 changes: 4 additions & 0 deletions store/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,3 +297,7 @@ func (*MockStore) Prune(_ func(_ bool, _ uint32) bool) error {
func (*MockStore) IsPruned() bool {
return false
}

func (*MockStore) PruningHeight() uint32 {
return 1
}
12 changes: 12 additions & 0 deletions store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -487,3 +487,15 @@ func (s *store) pruneBlock(blockHeight uint32) (bool, error) {

return true, nil
}

func (s *store) PruningHeight() uint32 {
s.lk.RLock()
defer s.lk.RUnlock()

cert := s.lastCertificate()
if cert == nil {
return 0
}

return cert.Height() - s.config.RetentionBlocks()
}
2 changes: 2 additions & 0 deletions www/grpc/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ func (s *blockchainServer) GetBlockchainInfo(_ context.Context,
TotalValidators: s.state.TotalValidators(),
TotalPower: s.state.TotalPower(),
CommitteePower: s.state.CommitteePower(),
IsPruned: s.state.IsPruned(),
PruningHeight: int32(s.state.PruningHeight()),
CommitteeValidators: cv,
}, nil
}
Expand Down
28 changes: 28 additions & 0 deletions www/grpc/gen/dart/blockchain.pb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,8 @@ class GetBlockchainInfoResponse extends $pb.GeneratedMessage {
..aInt64(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'totalPower')
..aInt64(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'committeePower')
..pc<ValidatorInfo>(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'committeeValidators', $pb.PbFieldType.PM, subBuilder: ValidatorInfo.create)
..aOB(8, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'isPruned')
..a<$core.int>(9, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'pruningHeight', $pb.PbFieldType.O3)
..hasRequiredFields = false
;

Expand All @@ -849,6 +851,8 @@ class GetBlockchainInfoResponse extends $pb.GeneratedMessage {
$fixnum.Int64? totalPower,
$fixnum.Int64? committeePower,
$core.Iterable<ValidatorInfo>? committeeValidators,
$core.bool? isPruned,
$core.int? pruningHeight,
}) {
final _result = create();
if (lastBlockHeight != null) {
Expand All @@ -872,6 +876,12 @@ class GetBlockchainInfoResponse extends $pb.GeneratedMessage {
if (committeeValidators != null) {
_result.committeeValidators.addAll(committeeValidators);
}
if (isPruned != null) {
_result.isPruned = isPruned;
}
if (pruningHeight != null) {
_result.pruningHeight = pruningHeight;
}
return _result;
}
factory GetBlockchainInfoResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
Expand Down Expand Up @@ -951,6 +961,24 @@ class GetBlockchainInfoResponse extends $pb.GeneratedMessage {

@$pb.TagNumber(7)
$core.List<ValidatorInfo> get committeeValidators => $_getList(6);

@$pb.TagNumber(8)
$core.bool get isPruned => $_getBF(7);
@$pb.TagNumber(8)
set isPruned($core.bool v) { $_setBool(7, v); }
@$pb.TagNumber(8)
$core.bool hasIsPruned() => $_has(7);
@$pb.TagNumber(8)
void clearIsPruned() => clearField(8);

@$pb.TagNumber(9)
$core.int get pruningHeight => $_getIZ(8);
@$pb.TagNumber(9)
set pruningHeight($core.int v) { $_setSignedInt32(8, v); }
@$pb.TagNumber(9)
$core.bool hasPruningHeight() => $_has(8);
@$pb.TagNumber(9)
void clearPruningHeight() => clearField(9);
}

class GetConsensusInfoRequest extends $pb.GeneratedMessage {
Expand Down
4 changes: 3 additions & 1 deletion www/grpc/gen/dart/blockchain.pbjson.dart
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,13 @@ const GetBlockchainInfoResponse$json = const {
const {'1': 'total_power', '3': 5, '4': 1, '5': 3, '10': 'totalPower'},
const {'1': 'committee_power', '3': 6, '4': 1, '5': 3, '10': 'committeePower'},
const {'1': 'committee_validators', '3': 7, '4': 3, '5': 11, '6': '.pactus.ValidatorInfo', '10': 'committeeValidators'},
const {'1': 'is_pruned', '3': 8, '4': 1, '5': 8, '10': 'isPruned'},
const {'1': 'pruning_height', '3': 9, '4': 1, '5': 5, '10': 'pruningHeight'},
],
};

/// Descriptor for `GetBlockchainInfoResponse`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List getBlockchainInfoResponseDescriptor = $convert.base64Decode('ChlHZXRCbG9ja2NoYWluSW5mb1Jlc3BvbnNlEioKEWxhc3RfYmxvY2tfaGVpZ2h0GAEgASgNUg9sYXN0QmxvY2tIZWlnaHQSJgoPbGFzdF9ibG9ja19oYXNoGAIgASgJUg1sYXN0QmxvY2tIYXNoEiUKDnRvdGFsX2FjY291bnRzGAMgASgFUg10b3RhbEFjY291bnRzEikKEHRvdGFsX3ZhbGlkYXRvcnMYBCABKAVSD3RvdGFsVmFsaWRhdG9ycxIfCgt0b3RhbF9wb3dlchgFIAEoA1IKdG90YWxQb3dlchInCg9jb21taXR0ZWVfcG93ZXIYBiABKANSDmNvbW1pdHRlZVBvd2VyEkgKFGNvbW1pdHRlZV92YWxpZGF0b3JzGAcgAygLMhUucGFjdHVzLlZhbGlkYXRvckluZm9SE2NvbW1pdHRlZVZhbGlkYXRvcnM=');
final $typed_data.Uint8List getBlockchainInfoResponseDescriptor = $convert.base64Decode('ChlHZXRCbG9ja2NoYWluSW5mb1Jlc3BvbnNlEioKEWxhc3RfYmxvY2tfaGVpZ2h0GAEgASgNUg9sYXN0QmxvY2tIZWlnaHQSJgoPbGFzdF9ibG9ja19oYXNoGAIgASgJUg1sYXN0QmxvY2tIYXNoEiUKDnRvdGFsX2FjY291bnRzGAMgASgFUg10b3RhbEFjY291bnRzEikKEHRvdGFsX3ZhbGlkYXRvcnMYBCABKAVSD3RvdGFsVmFsaWRhdG9ycxIfCgt0b3RhbF9wb3dlchgFIAEoA1IKdG90YWxQb3dlchInCg9jb21taXR0ZWVfcG93ZXIYBiABKANSDmNvbW1pdHRlZVBvd2VyEkgKFGNvbW1pdHRlZV92YWxpZGF0b3JzGAcgAygLMhUucGFjdHVzLlZhbGlkYXRvckluZm9SE2NvbW1pdHRlZVZhbGlkYXRvcnMSGwoJaXNfcHJ1bmVkGAggASgIUghpc1BydW5lZBIlCg5wcnVuaW5nX2hlaWdodBgJIAEoBVINcHJ1bmluZ0hlaWdodA==');
@$core.Deprecated('Use getConsensusInfoRequestDescriptor instead')
const GetConsensusInfoRequest$json = const {
'1': 'GetConsensusInfoRequest',
Expand Down
150 changes: 75 additions & 75 deletions www/grpc/gen/dart/network.pb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -200,81 +200,6 @@ class GetNodeInfoRequest extends $pb.GeneratedMessage {
static GetNodeInfoRequest? _defaultInstance;
}

class ConnectionInfo extends $pb.GeneratedMessage {
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ConnectionInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create)
..a<$fixnum.Int64>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'connections', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO)
..a<$fixnum.Int64>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'inboundConnections', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO)
..a<$fixnum.Int64>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'outboundConnections', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO)
..hasRequiredFields = false
;

ConnectionInfo._() : super();
factory ConnectionInfo({
$fixnum.Int64? connections,
$fixnum.Int64? inboundConnections,
$fixnum.Int64? outboundConnections,
}) {
final _result = create();
if (connections != null) {
_result.connections = connections;
}
if (inboundConnections != null) {
_result.inboundConnections = inboundConnections;
}
if (outboundConnections != null) {
_result.outboundConnections = outboundConnections;
}
return _result;
}
factory ConnectionInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory ConnectionInfo.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')
ConnectionInfo clone() => ConnectionInfo()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
ConnectionInfo copyWith(void Function(ConnectionInfo) updates) => super.copyWith((message) => updates(message as ConnectionInfo)) as ConnectionInfo; // ignore: deprecated_member_use
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static ConnectionInfo create() => ConnectionInfo._();
ConnectionInfo createEmptyInstance() => create();
static $pb.PbList<ConnectionInfo> createRepeated() => $pb.PbList<ConnectionInfo>();
@$core.pragma('dart2js:noInline')
static ConnectionInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ConnectionInfo>(create);
static ConnectionInfo? _defaultInstance;

@$pb.TagNumber(1)
$fixnum.Int64 get connections => $_getI64(0);
@$pb.TagNumber(1)
set connections($fixnum.Int64 v) { $_setInt64(0, v); }
@$pb.TagNumber(1)
$core.bool hasConnections() => $_has(0);
@$pb.TagNumber(1)
void clearConnections() => clearField(1);

@$pb.TagNumber(2)
$fixnum.Int64 get inboundConnections => $_getI64(1);
@$pb.TagNumber(2)
set inboundConnections($fixnum.Int64 v) { $_setInt64(1, v); }
@$pb.TagNumber(2)
$core.bool hasInboundConnections() => $_has(1);
@$pb.TagNumber(2)
void clearInboundConnections() => clearField(2);

@$pb.TagNumber(3)
$fixnum.Int64 get outboundConnections => $_getI64(2);
@$pb.TagNumber(3)
set outboundConnections($fixnum.Int64 v) { $_setInt64(2, v); }
@$pb.TagNumber(3)
$core.bool hasOutboundConnections() => $_has(2);
@$pb.TagNumber(3)
void clearOutboundConnections() => clearField(3);
}

class GetNodeInfoResponse extends $pb.GeneratedMessage {
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetNodeInfoResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create)
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'moniker')
Expand Down Expand Up @@ -735,6 +660,81 @@ class PeerInfo extends $pb.GeneratedMessage {
void clearCompletedSessions() => clearField(20);
}

class ConnectionInfo extends $pb.GeneratedMessage {
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ConnectionInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create)
..a<$fixnum.Int64>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'connections', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO)
..a<$fixnum.Int64>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'inboundConnections', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO)
..a<$fixnum.Int64>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'outboundConnections', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO)
..hasRequiredFields = false
;

ConnectionInfo._() : super();
factory ConnectionInfo({
$fixnum.Int64? connections,
$fixnum.Int64? inboundConnections,
$fixnum.Int64? outboundConnections,
}) {
final _result = create();
if (connections != null) {
_result.connections = connections;
}
if (inboundConnections != null) {
_result.inboundConnections = inboundConnections;
}
if (outboundConnections != null) {
_result.outboundConnections = outboundConnections;
}
return _result;
}
factory ConnectionInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory ConnectionInfo.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')
ConnectionInfo clone() => ConnectionInfo()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
ConnectionInfo copyWith(void Function(ConnectionInfo) updates) => super.copyWith((message) => updates(message as ConnectionInfo)) as ConnectionInfo; // ignore: deprecated_member_use
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static ConnectionInfo create() => ConnectionInfo._();
ConnectionInfo createEmptyInstance() => create();
static $pb.PbList<ConnectionInfo> createRepeated() => $pb.PbList<ConnectionInfo>();
@$core.pragma('dart2js:noInline')
static ConnectionInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ConnectionInfo>(create);
static ConnectionInfo? _defaultInstance;

@$pb.TagNumber(1)
$fixnum.Int64 get connections => $_getI64(0);
@$pb.TagNumber(1)
set connections($fixnum.Int64 v) { $_setInt64(0, v); }
@$pb.TagNumber(1)
$core.bool hasConnections() => $_has(0);
@$pb.TagNumber(1)
void clearConnections() => clearField(1);

@$pb.TagNumber(2)
$fixnum.Int64 get inboundConnections => $_getI64(1);
@$pb.TagNumber(2)
set inboundConnections($fixnum.Int64 v) { $_setInt64(1, v); }
@$pb.TagNumber(2)
$core.bool hasInboundConnections() => $_has(1);
@$pb.TagNumber(2)
void clearInboundConnections() => clearField(2);

@$pb.TagNumber(3)
$fixnum.Int64 get outboundConnections => $_getI64(2);
@$pb.TagNumber(3)
set outboundConnections($fixnum.Int64 v) { $_setInt64(2, v); }
@$pb.TagNumber(3)
$core.bool hasOutboundConnections() => $_has(2);
@$pb.TagNumber(3)
void clearOutboundConnections() => clearField(3);
}

class NetworkApi {
$pb.RpcClient _client;
NetworkApi(this._client);
Expand Down
24 changes: 12 additions & 12 deletions www/grpc/gen/dart/network.pbjson.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,6 @@ const GetNodeInfoRequest$json = const {

/// Descriptor for `GetNodeInfoRequest`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List getNodeInfoRequestDescriptor = $convert.base64Decode('ChJHZXROb2RlSW5mb1JlcXVlc3Q=');
@$core.Deprecated('Use connectionInfoDescriptor instead')
const ConnectionInfo$json = const {
'1': 'ConnectionInfo',
'2': const [
const {'1': 'connections', '3': 1, '4': 1, '5': 4, '10': 'connections'},
const {'1': 'inbound_connections', '3': 2, '4': 1, '5': 4, '10': 'inboundConnections'},
const {'1': 'outbound_connections', '3': 3, '4': 1, '5': 4, '10': 'outboundConnections'},
],
};

/// Descriptor for `ConnectionInfo`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List connectionInfoDescriptor = $convert.base64Decode('Cg5Db25uZWN0aW9uSW5mbxIgCgtjb25uZWN0aW9ucxgBIAEoBFILY29ubmVjdGlvbnMSLwoTaW5ib3VuZF9jb25uZWN0aW9ucxgCIAEoBFISaW5ib3VuZENvbm5lY3Rpb25zEjEKFG91dGJvdW5kX2Nvbm5lY3Rpb25zGAMgASgEUhNvdXRib3VuZENvbm5lY3Rpb25z');
@$core.Deprecated('Use getNodeInfoResponseDescriptor instead')
const GetNodeInfoResponse$json = const {
'1': 'GetNodeInfoResponse',
Expand Down Expand Up @@ -144,6 +132,18 @@ const PeerInfo_ReceivedBytesEntry$json = const {

/// Descriptor for `PeerInfo`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List peerInfoDescriptor = $convert.base64Decode('CghQZWVySW5mbxIWCgZzdGF0dXMYASABKAVSBnN0YXR1cxIYCgdtb25pa2VyGAIgASgJUgdtb25pa2VyEhQKBWFnZW50GAMgASgJUgVhZ2VudBIXCgdwZWVyX2lkGAQgASgJUgZwZWVySWQSJQoOY29uc2Vuc3VzX2tleXMYBSADKAlSDWNvbnNlbnN1c0tleXMSLwoTY29uc2Vuc3VzX2FkZHJlc3NlcxgGIAMoCVISY29uc2Vuc3VzQWRkcmVzc2VzEhoKCHNlcnZpY2VzGAcgASgNUghzZXJ2aWNlcxImCg9sYXN0X2Jsb2NrX2hhc2gYCCABKAlSDWxhc3RCbG9ja0hhc2gSFgoGaGVpZ2h0GAkgASgNUgZoZWlnaHQSKQoQcmVjZWl2ZWRfYnVuZGxlcxgKIAEoBVIPcmVjZWl2ZWRCdW5kbGVzEicKD2ludmFsaWRfYnVuZGxlcxgLIAEoBVIOaW52YWxpZEJ1bmRsZXMSGwoJbGFzdF9zZW50GAwgASgDUghsYXN0U2VudBIjCg1sYXN0X3JlY2VpdmVkGA0gASgDUgxsYXN0UmVjZWl2ZWQSPgoKc2VudF9ieXRlcxgOIAMoCzIfLnBhY3R1cy5QZWVySW5mby5TZW50Qnl0ZXNFbnRyeVIJc2VudEJ5dGVzEkoKDnJlY2VpdmVkX2J5dGVzGA8gAygLMiMucGFjdHVzLlBlZXJJbmZvLlJlY2VpdmVkQnl0ZXNFbnRyeVINcmVjZWl2ZWRCeXRlcxIYCgdhZGRyZXNzGBAgASgJUgdhZGRyZXNzEhwKCWRpcmVjdGlvbhgRIAEoCVIJZGlyZWN0aW9uEhwKCXByb3RvY29scxgSIAMoCVIJcHJvdG9jb2xzEiUKDnRvdGFsX3Nlc3Npb25zGBMgASgFUg10b3RhbFNlc3Npb25zEi0KEmNvbXBsZXRlZF9zZXNzaW9ucxgUIAEoBVIRY29tcGxldGVkU2Vzc2lvbnMaPAoOU2VudEJ5dGVzRW50cnkSEAoDa2V5GAEgASgFUgNrZXkSFAoFdmFsdWUYAiABKANSBXZhbHVlOgI4ARpAChJSZWNlaXZlZEJ5dGVzRW50cnkSEAoDa2V5GAEgASgFUgNrZXkSFAoFdmFsdWUYAiABKANSBXZhbHVlOgI4AQ==');
@$core.Deprecated('Use connectionInfoDescriptor instead')
const ConnectionInfo$json = const {
'1': 'ConnectionInfo',
'2': const [
const {'1': 'connections', '3': 1, '4': 1, '5': 4, '10': 'connections'},
const {'1': 'inbound_connections', '3': 2, '4': 1, '5': 4, '10': 'inboundConnections'},
const {'1': 'outbound_connections', '3': 3, '4': 1, '5': 4, '10': 'outboundConnections'},
],
};

/// Descriptor for `ConnectionInfo`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List connectionInfoDescriptor = $convert.base64Decode('Cg5Db25uZWN0aW9uSW5mbxIgCgtjb25uZWN0aW9ucxgBIAEoBFILY29ubmVjdGlvbnMSLwoTaW5ib3VuZF9jb25uZWN0aW9ucxgCIAEoBFISaW5ib3VuZENvbm5lY3Rpb25zEjEKFG91dGJvdW5kX2Nvbm5lY3Rpb25zGAMgASgEUhNvdXRib3VuZENvbm5lY3Rpb25z');
const $core.Map<$core.String, $core.dynamic> NetworkServiceBase$json = const {
'1': 'Network',
'2': const [
Expand Down
16 changes: 15 additions & 1 deletion www/grpc/gen/docs/grpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -1384,7 +1384,21 @@ Message has no fields.
The availability score of the validator.
</td>
</tr>
</tbody>
<tr>
<td class="fw-bold">is_pruned</td>
<td> bool</td>
<td>
If the blocks are subject to pruning.
</td>
</tr>
<tr>
<td class="fw-bold">pruning_height</td>
<td> int32</td>
<td>
Lowest-height block stored (only present if pruning is enabled)
</td>
</tr>
</tbody>
</table>

### GetConsensusInfo <span id="pactus.Blockchain.GetConsensusInfo" class="rpc-badge"></span>
Expand Down
16 changes: 15 additions & 1 deletion www/grpc/gen/docs/json-rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -1385,7 +1385,21 @@ Parameters has no fields.
The availability score of the validator.
</td>
</tr>
</tbody>
<tr>
<td class="fw-bold">is_pruned</td>
<td> boolean</td>
<td>
If the blocks are subject to pruning.
</td>
</tr>
<tr>
<td class="fw-bold">pruning_height</td>
<td> numeric</td>
<td>
Lowest-height block stored (only present if pruning is enabled)
</td>
</tr>
</tbody>
</table>

### pactus.blockchain.get_consensus_info <span id="pactus.blockchain.get_consensus_info" class="rpc-badge"></span>
Expand Down
Loading
Loading