@@ -21,39 +21,38 @@ option java_outer_classname = "BlockStreamServiceGrpcProto";
21
21
22
22
/**
23
23
* 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.
25
25
*
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
27
27
* Block Node server. The Block Node server will respond with a BlockResponse message for
28
- * each block received.
28
+ * each BlockItem received.
29
29
*
30
30
* 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.
33
33
*/
34
34
service BlockStreamGrpc {
35
-
36
35
/**
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 ) {}
42
41
43
42
/**
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 ) {}
49
48
}
50
49
51
50
/**
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.
53
52
* This specification is a simple example meant to expedite development.
54
53
* It will be replaced with a PBJ implementation in the future.
55
54
*/
56
- message Block {
55
+ message BlockItem {
57
56
/**
58
57
* The id of the block. Each block id should be unique.
59
58
*/
@@ -66,16 +65,14 @@ message Block {
66
65
}
67
66
68
67
/**
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.
74
72
*/
75
- message BlockResponse {
73
+ message BlockItemResponse {
76
74
/**
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.
79
76
*/
80
77
int64 id = 1 ;
81
78
}
0 commit comments