You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HIP-21 details a free network info query be added to the mirror nodes for use by the SDKs. We should target initially adding a gRPC API to the mirror node since SDKs don't currently support connecting to the REST API.
Create a network_service.proto both in mirror node repository and hedera-protobufs repository
messageAddressBookQuery {
FileIDfile_id=1; // The ID of the address book file on the network. Can be either 0.0.101 or 0.0.102.int32limit=2; // The maximum number of node addresses to receive before stopping. If not set or set to zero it will return all node addresses in the database.
}
serviceNetworkService {
rpcgetNodes (AddressBookQuery) returns (streamNodeAddress);
}
Create a NetworkController that implements the proto
Create a NetworkServiceImpl with caching
Create an AddressBookRepository that finds the latest address book
Create an AddressBookEntryRepository
select*from address_book_entry
where node_id >= ? and consensus_timestamp = ?
order by node_id asclimit10;
Alternatives
Rejected since returning the full address book in one response would be too large. Current address book is 25K and growing.
/** * Response to a getNetworkInfo query. */messageNetworkInfoResponse {
/** * The network <i>address book</i>, which includes not just the IP addresses of the network * nodes, but also the the cryptographic keys they use to sign transactions and encrypt connections. Please * see the <a href="https://hashgraph.github.io/hedera-protobufs/#proto.NodeAddress"><tt>NodeAddress</tt></a> * type for more details. */NodeAddressBooknode_address_book=1;
}
/** * Queries associated with the network as a whole. */serviceNetworkService {
/** * Retrieves free metadata about the network, most importantly its <i>address book</i>. */rpcgetNetworkInfo () returns (NetworkInfoResponse);
}
The text was updated successfully, but these errors were encountered:
Problem
HIP-21 details a free network info query be added to the mirror nodes for use by the SDKs. We should target initially adding a gRPC API to the mirror node since SDKs don't currently support connecting to the REST API.
Solution
See the abandoned services proto PR for inspiration.
network_service.proto
both in mirror node repository andhedera-protobufs
repositoryNetworkController
that implements the protoNetworkServiceImpl
with cachingAddressBookRepository
that finds the latest address bookAddressBookEntryRepository
Alternatives
Rejected since returning the full address book in one response would be too large. Current address book is 25K and growing.
The text was updated successfully, but these errors were encountered: