Skip to content

Commit 582cfae

Browse files
Changes to the proto file
Signed-off-by: Matt Peterson <[email protected]>
1 parent 706f4ba commit 582cfae

File tree

1 file changed

+23
-26
lines changed

1 file changed

+23
-26
lines changed

protos/src/main/protobuf/blockstream.proto

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -21,39 +21,38 @@ option java_outer_classname = "BlockStreamServiceGrpcProto";
2121

2222
/**
2323
* The BlockStreamGrpc service definition provides 2 bidirectional streaming methods for
24-
* exchanging blocks with the Block Node server.
24+
* exchanging BlockItems with the Block Node server.
2525
*
26-
* A producer (e.g. Consensus Node) can use the StreamSink method to stream blocks to the
26+
* A producer (e.g. Consensus Node) can use the StreamSink method to stream BlockItems to the
2727
* Block Node server. The Block Node server will respond with a BlockResponse message for
28-
* each block received.
28+
* each BlockItem received.
2929
*
3030
* A consumer (e.g. Mirror Node) can use the StreamSource method to request a stream of
31-
* blocks from the server. The consumer is expected to respond with a BlockResponse message
32-
* with the id of each block received.
31+
* BlockItems from the server. The consumer is expected to respond with a BlockResponse message
32+
* with the id of each BlockItem received.
3333
*/
3434
service BlockStreamGrpc {
35-
3635
/**
37-
* StreamSink is a bidirectional streaming method that allows a producer to stream blocks
38-
* to the Block Node server. The server will respond with a BlockResponse message for each
39-
* block received.
40-
*/
41-
rpc StreamSink(stream Block) returns (stream BlockResponse) {}
36+
* StreamSink is a bidirectional streaming method that allows a producer to stream BlockItems
37+
* to the Block Node server. The server will respond with a BlockResponse message for each
38+
* BlockItem received.
39+
*/
40+
rpc StreamSink (stream BlockItem) returns (stream BlockItemResponse) {}
4241

4342
/**
44-
* StreamSource is a bidirectional streaming method that allows a consumer to request a
45-
* stream of blocks from the server. The consumer is expected to respond with a BlockResponse
46-
* message with the id of each block received.
47-
*/
48-
rpc StreamSource(stream BlockResponse) returns (stream Block) {}
43+
* StreamSource is a bidirectional streaming method that allows a consumer to request a
44+
* stream of BlockItems from the server. The consumer is expected to respond with a BlockResponse
45+
* message with the id of each BlockItem received.
46+
*/
47+
rpc StreamSource (stream BlockItemResponse) returns (stream BlockItem) {}
4948
}
5049

5150
/**
52-
* A block is a simple message that contains an id and a value.
51+
* A BlockItem is a simple message that contains an id and a value.
5352
* This specification is a simple example meant to expedite development.
5453
* It will be replaced with a PBJ implementation in the future.
5554
*/
56-
message Block {
55+
message BlockItem {
5756
/**
5857
* The id of the block. Each block id should be unique.
5958
*/
@@ -66,16 +65,14 @@ message Block {
6665
}
6766

6867
/**
69-
* A block response is a simple message that contains an id.
70-
* The block response message is simply meant to disambiguate it
71-
* from the original request. This specification is a simple
72-
* example meant to expedite development. It will be replaced with
73-
* a PBJ implementation in the future.
68+
* A BlockItemResponse is a simple message that contains an id.
69+
* The BlockItemResponse is meant to confirm the receipt of a BlockItem.
70+
* A future use case may expand on this type to communicate a failure
71+
* condition where the BlockItem needs to be resent, etc.
7472
*/
75-
message BlockResponse {
73+
message BlockItemResponse {
7674
/**
77-
* The id of the block which was received. Each block id should
78-
* correlate with the id of a Block message id.
75+
* The id of the BlockItem which was received.
7976
*/
8077
int64 id = 1;
8178
}

0 commit comments

Comments
 (0)