-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a get address book nodes gRPC API (#3141)
* Add a NetworkService.getNodes() gRPC API * Change AddressBookEntry and AddressBookServiceEndpoint to use @IdClass with flattened properties * Change TopicMessageFilter to use EntityId instead of long * Fix AddressBookServiceEndpoint incorrectly modeling nodeId as EntityId * Move DomainBuilder to common module Signed-off-by: Steven Sheehy <steven.sheehy@hedera.com> Signed-off-by: Matheus DallRosa <matheus.dallrosa@swirlds.com>
- Loading branch information
1 parent
98b920f
commit 7028baa
Showing
75 changed files
with
1,837 additions
and
782 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,29 @@ | ||
# gRPC API | ||
|
||
The gRPC API provides a protobuf defined interface for interacting with the mirror node. Currently only the Hedera | ||
Consensus Service (HCS) topic subscription is supported. | ||
The gRPC API provides a protobuf defined interface for interacting with the mirror node. | ||
|
||
## Consensus Service | ||
|
||
### Subscribe Topic | ||
|
||
The Hedera Consensus Service (HCS) provides decentralized consensus on the validity and order of messages submitted to a | ||
topic on the network and transparency into the history of these events over time. The `subscribeTopic` API allows a | ||
client to subscribe to a topic and stream messages asynchronously as they arrive at the mirror node. See the protobuf | ||
[definition](hedera-mirror-protobuf/src/main/proto/com/hedera/mirror/api/proto/consensus_service.proto). | ||
|
||
Example invocation using [grpcurl](https://github.com/fullstorydev/grpcurl): | ||
|
||
`grpcurl -plaintext -d '{"topicID": {"topicNum": 41110}, "limit": 0}' localhost:5600 com.hedera.mirror.api.proto.ConsensusService/subscribeTopic` | ||
|
||
## Network Service | ||
|
||
### Get Nodes | ||
|
||
[HIP-21](https://hips.hedera.com/hip/hip-21) describes a need for clients to retrieve address book information without | ||
incurring the costs of multiple queries to get the network file's contents. The `getNode` API will return the list of | ||
nodes associated with the latest address book file. See the protobuf | ||
[definition](/hedera-mirror-protobuf/src/main/proto/com/hedera/mirror/api/proto/network_service.proto). | ||
|
||
Example invocation using `grpcurl`: | ||
|
||
`grpcurl -plaintext -d '{"file_id": {"fileNum": 102}, "limit": 0}' localhost:5600 com.hedera.mirror.api.proto.NetworkService/getNodes` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.