-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy pathconsensus_service.proto
More file actions
100 lines (84 loc) · 2.71 KB
/
consensus_service.proto
File metadata and controls
100 lines (84 loc) · 2.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/*-
*
* Hedera Mirror Node
*
* Copyright (C) 2019 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
syntax = "proto3";
package com.hedera.mirror.api.proto;
/**
* Required for the reactor-grpc generator to work correctly
*/
option java_multiple_files = true;
option java_package = "com.hedera.mirror.api.proto";
import "services/basic_types.proto";
import "services/timestamp.proto";
import "services/consensus_submit_message.proto";
message ConsensusTopicQuery {
/**
* A required topic ID to retrieve messages for.
*/
.proto.TopicID topicID = 1;
/**
* Include messages which reached consensus on or after this time. Defaults to current time if
* not set.
*/
.proto.Timestamp consensusStartTime = 2;
/**
* Include messages which reached consensus before this time. If not set it will receive
* indefinitely.
*/
.proto.Timestamp consensusEndTime = 3;
/**
* The maximum number of messages to receive before stopping. If not set or set to zero it will
* return messages indefinitely.
*/
uint64 limit = 4;
}
message ConsensusTopicResponse {
/**
* The time at which the transaction reached consensus
*/
.proto.Timestamp consensusTimestamp = 1;
/**
* The message body originally in the ConsensusSubmitMessageTransactionBody. Message size will
* be less than 6KiB.
*/
bytes message = 2;
/**
* The running hash (SHA384) of every message.
*/
bytes runningHash = 3;
/**
* Starts at 1 for first submitted message. Incremented on each submitted message.
*/
uint64 sequenceNumber = 4;
/**
* Version of the SHA-384 digest used to update the running hash.
*/
uint64 runningHashVersion = 5;
/**
* Optional information of the current chunk in a fragmented message.
*/
.proto.ConsensusMessageChunkInfo chunkInfo = 6;
}
/**
* The Mirror Service provides the ability to query a stream of Hedera Consensus Service (HCS)
* messages for an HCS Topic via a specific (possibly open-ended) time range.
*/
service ConsensusService {
rpc subscribeTopic (ConsensusTopicQuery) returns (stream ConsensusTopicResponse);
}