-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Pull protos from services (#2611)
* refactor: Migrated the protobufs submodule directory to services repo Signed-off-by: ivaylogarnev-limechain <[email protected]> * refactor: Removed submodule tagging, Taskfile refactor Signed-off-by: ivaylogarnev-limechain <[email protected]> * fix: Fixed the deletion of submodule Signed-off-by: ivaylogarnev-limechain <[email protected]> * refactor: Changed some changed protobufs namings Signed-off-by: ivaylogarnev-limechain <[email protected]> * fix: Added protobufs for services/streams and removed them from .gitignore Signed-off-by: ivaylogarnev-limechain <[email protected]> * fix: Added newly introduced request type Signed-off-by: ivaylogarnev-limechain <[email protected]> * fix: Fixed Status code naming Signed-off-by: ivaylogarnev-limechain <[email protected]> * fix: Added new status codes and updated protos Signed-off-by: ivaylogarnev-limechain <[email protected]> --------- Signed-off-by: ivaylogarnev-limechain <[email protected]> Co-authored-by: ivaylonikolov7 <[email protected]>
- Loading branch information
1 parent
cba5d67
commit 7865bc3
Showing
156 changed files
with
17,742 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[submodule "packages/proto/src/proto"] | ||
path = packages/proto/src/proto | ||
url = https://github.com/hashgraph/hedera-protobufs.git | ||
[submodule "packages/proto/src/services"] | ||
path = packages/proto/src/services | ||
url = https://github.com/hashgraph/hedera-services.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
src/proto.js | ||
src/proto.d.ts | ||
src/services |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule proto
deleted from
d88484
100 changes: 100 additions & 0 deletions
100
packages/proto/src/proto/mirror/consensus_service.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 "basic_types.proto"; | ||
import "timestamp.proto"; | ||
import "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); | ||
} |
57 changes: 57 additions & 0 deletions
57
packages/proto/src/proto/mirror/mirror_network_service.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/*- | ||
* | ||
* Hedera Mirror Node | ||
* | ||
* Copyright (C) 2019-2022 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; | ||
|
||
option java_multiple_files = true; // Required for the reactor-grpc generator to work correctly | ||
option java_package = "com.hedera.mirror.api.proto"; | ||
|
||
import "basic_types.proto"; | ||
import "timestamp.proto"; | ||
|
||
/** | ||
* Request object to query an address book for its list of nodes | ||
*/ | ||
message AddressBookQuery { | ||
/** | ||
* The ID of the address book file on the network. Can be either 0.0.101 or 0.0.102. | ||
*/ | ||
.proto.FileID file_id = 1; | ||
|
||
/** | ||
* The maximum number of node addresses to receive before stopping. If not set or set to zero it will return all node addresses in the database. | ||
*/ | ||
int32 limit = 2; | ||
} | ||
|
||
/** | ||
* Provides cross network APIs like address book queries | ||
*/ | ||
service NetworkService { | ||
/* | ||
* Query for an address book and return its nodes. The nodes are returned in ascending order by node ID. The | ||
* response is not guaranteed to be a byte-for-byte equivalent to the NodeAddress in the Hedera file on | ||
* the network since it is reconstructed from a normalized database table. | ||
*/ | ||
rpc getNodes (AddressBookQuery) returns (stream .proto.NodeAddress); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
syntax = "proto3"; | ||
|
||
package proto; | ||
|
||
option java_package = "com.hedera.hashgraph.sdk.proto"; | ||
option java_multiple_files = true; | ||
|
||
import "transaction.proto"; | ||
|
||
/** | ||
* A simple protobuf wrapper to store a list of transactions. This is used by | ||
* `Transaction.[from|to]Bytes()` in the SDKs. The reason the SDK needs a list of transactions is | ||
* because it holds onto a transaction per node. So if a transaction is to be submitted to nodes 3 | ||
* and 4 the SDK Transaction type would contain a list of 2 protobuf transactions, one for node 3 | ||
* and one for node 4. | ||
*/ | ||
message TransactionList { | ||
repeated Transaction transaction_list = 1; | ||
} |
Oops, something went wrong.