Skip to content

Commit d3c5487

Browse files
fix: adjusted the design doc to refer to the hedera-protobufs repo
Signed-off-by: Matt Peterson <[email protected]>
1 parent a21c418 commit d3c5487

File tree

1 file changed

+2
-66
lines changed

1 file changed

+2
-66
lines changed

server/docs/design/bidi-producer-consumers-streaming.md

Lines changed: 2 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -52,72 +52,8 @@ unsubscribed from a producer so that internal objects can be cleaned up and reso
5252

5353
### Block Node gRPC Streaming Services API
5454

55-
The following protobuf definition outlines the gRPC services and messages used to stream BlockItems between a producer,
56-
consumers and the `hedera-block-node`. The `BlockStreamGrpc` service definition provides 2 bidirectional streaming
57-
methods: `StreamSink` and `StreamSource`. Aside from the gRPC service and method names, all the types will be replaced
58-
by those outlined in [hedera-protobufs](https://github.com/hashgraph/hedera-protobufs/pull/342/files).
59-
60-
```protobuf
61-
62-
/**
63-
* The BlockStreamGrpc service definition provides 2 bidirectional streaming methods for
64-
* exchanging BlockItems with the Block Node server.
65-
*
66-
* A producer (e.g. Consensus Node) can use the StreamSink method to stream BlockItems to the
67-
* Block Node server. The Block Node server will respond with a BlockResponse message for
68-
* each BlockItem received.
69-
*
70-
* A consumer (e.g. Mirror Node) can use the StreamSource method to request a stream of
71-
* BlockItems from the server. The consumer is expected to respond with a BlockResponse message
72-
* with the id of each BlockItem received.
73-
*/
74-
service BlockStreamGrpc {
75-
/**
76-
* StreamSink is a bidirectional streaming method that allows a producer to stream BlockItems
77-
* to the Block Node server. The server will respond with a BlockResponse message for each
78-
* BlockItem received.
79-
*/
80-
rpc StreamSink (stream BlockItem) returns (stream BlockItemResponse) {}
81-
82-
/**
83-
* StreamSource is a bidirectional streaming method that allows a consumer to request a
84-
* stream of BlockItems from the server. The consumer is expected to respond with a BlockResponse
85-
* message with the id of each BlockItem received.
86-
*/
87-
rpc StreamSource (stream BlockItemResponse) returns (stream BlockItem) {}
88-
}
89-
90-
/**
91-
* A BlockItem is a simple message that contains an id and a value.
92-
* This specification is a simple example meant to expedite development.
93-
* It will be replaced with a PBJ implementation in the future.
94-
*/
95-
message BlockItem {
96-
/**
97-
* The id of the block. Each block id should be unique.
98-
*/
99-
int64 id = 1;
100-
101-
/**
102-
* The value of the block. The value can be any string.
103-
*/
104-
string value = 2;
105-
}
106-
107-
/**
108-
* A BlockItemResponse is a simple message that contains an id.
109-
* The BlockItemResponse is meant to confirm the receipt of a BlockItem.
110-
* A future use case may expand on this type to communicate a failure
111-
* condition where the BlockItem needs to be resent, etc.
112-
*/
113-
message BlockItemResponse {
114-
/**
115-
* The id of the BlockItem which was received.
116-
*/
117-
int64 id = 1;
118-
}
119-
120-
```
55+
The Block Node gRPC Streaming Services API is now aligned with the names and simplified types defined in the
56+
[`hedera-protobufs` repository on the `continue-block-node` branch](https://github.com/hashgraph/hedera-protobufs/blob/25783427575ded59d06d6bf1ed253fd24ef3c437/block/block_service.proto#L701-L742).
12157

12258
---
12359

0 commit comments

Comments
 (0)