Skip to content

Commit

Permalink
fix: added additional documentation regarding the service definition …
Browse files Browse the repository at this point in the history
…of the proto file

Signed-off-by: Matt Peterson <[email protected]>
  • Loading branch information
mattp-swirldslabs committed Jun 27, 2024
1 parent c623b48 commit 59e60fc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions protos/src/main/protobuf/blockstream.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ syntax = "proto3";
option java_package = "com.hedera.block.protos";
option java_outer_classname = "BlockStreamServiceGrpcProto";

/**
* The BlockStreamGrpc service definition provides 2 bidirectional streaming methods for
* exchanging blocks with the Block Node server.
*
* A producer (e.g. Consensus Node) can use the StreamSink method to stream blocks to the
* Block Node server. The Block Node server will respond with a BlockResponse message for
* each block received.
*
* A consumer (e.g. Mirror Node) can use the StreamSource method to request a stream of
* blocks from the server. The consumer is expected to respond with a BlockResponse message
* with the id of each block received.
*/
service BlockStreamGrpc {
rpc StreamSink(stream Block) returns (stream BlockResponse) {}
rpc StreamSource(stream BlockResponse) returns (stream Block) {}
Expand Down

0 comments on commit 59e60fc

Please sign in to comment.