-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Added protobufs for services/streams and removed them from .giti…
…gnore Signed-off-by: ivaylogarnev-limechain <[email protected]>
- Loading branch information
1 parent
e763357
commit 2fdbe34
Showing
147 changed files
with
17,408 additions
and
2 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,5 +1,3 @@ | ||
src/proto.js | ||
src/proto.d.ts | ||
src/proto/services | ||
src/proto/streams | ||
src/services |
143 changes: 143 additions & 0 deletions
143
packages/proto/src/proto/services/address_book_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,143 @@ | ||
syntax = "proto3"; | ||
|
||
package proto; | ||
|
||
/* | ||
* Copyright (C) 2024 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. | ||
*/ | ||
|
||
option java_package = "com.hederahashgraph.service.proto.java"; | ||
// <<<pbj.java_package = "com.hedera.hapi.node.addressbook">>> This comment is special code for setting PBJ Compiler java package | ||
|
||
import "query.proto"; | ||
import "response.proto"; | ||
import "transaction_response.proto"; | ||
import "transaction.proto"; | ||
|
||
/** | ||
* The Address Book service provides the ability for Hedera network node | ||
* administrators to add, update, and remove consensus nodes. This addition, | ||
* update, or removal of a consensus node requires governing council approval, | ||
* but each node operator may update their own operational attributes without | ||
* additional approval, reducing overhead for routine operations. | ||
* | ||
* Most operations are `privileged operations` and require governing council | ||
* approval. | ||
* | ||
* ### For a node creation transaction. | ||
* - The node operator SHALL create a `createNode` transaction. | ||
* - The node operator SHALL sign this transaction with the active `key` for | ||
* the account to be assigned as the "node account". | ||
* - The node operator MUST deliver the signed transaction to the Hedera | ||
* council representative. | ||
* - The Hedera council representative SHALL arrange for council members to | ||
* review and sign the transaction. | ||
* - Once sufficient council members have signed the transaction, the | ||
* Hedera council representative SHALL submit the transaction to the | ||
* network. | ||
* - Upon receipt of a valid and signed node creation transaction the network | ||
* software SHALL | ||
* - Validate the threshold signature for the Hedera governing council | ||
* - Validate the signature of the active `key` for the account to be | ||
* assigned as the "node account". | ||
* - Create the new node in state, this new node SHALL NOT be active in the | ||
* network at this time. | ||
* - When executing the next `freeze` transaction with `freeze_type` set to | ||
* `PREPARE_UPGRADE`, update network configuration and bring the | ||
* new node to an active status within the network. The node to be added | ||
* SHALL be active in the network following this upgrade. | ||
* | ||
* ### For a node deletion transaction. | ||
* - The node operator or Hedera council representative SHALL create a | ||
* `deleteNode` transaction. | ||
* - If the node operator creates the transaction | ||
* - The node operator MUST sign this transaction with the active `key` | ||
* for the account assigned as the "node account". | ||
* - The node operator SHALL deliver the signed transaction to the Hedera | ||
* council representative. | ||
* - The Hedera council representative SHALL arrange for council members to | ||
* review and sign the transaction. | ||
* - Once sufficient council members have signed the transaction, the | ||
* Hedera council representative SHALL submit the transaction to the | ||
* network. | ||
* - Upon receipt of a valid and signed node deletion transaction the network | ||
* software SHALL | ||
* - Validate the threshold signature for the Hedera governing council | ||
* - Remove the existing node from network state. The node SHALL still | ||
* be active in the network at this time. | ||
* - When executing the next `freeze` transaction with `freeze_type` set to | ||
* `PREPARE_UPGRADE`, update network configuration and remove the | ||
* node to be deleted from the network. The node to be deleted SHALL NOT | ||
* be active in the network following this upgrade. | ||
* | ||
* ### For a node update transaction. | ||
* - The node operator SHALL create an `updateNode` transaction. | ||
* - The node operator MUST sign this transaction with the active `key` | ||
* assigned as the `admin_key`. | ||
* - The node operator SHALL submit the transaction to the | ||
* network. Hedera council approval SHALL NOT be sought for this | ||
* transaction | ||
* - Upon receipt of a valid and signed node update transaction the network | ||
* software SHALL | ||
* - If the transaction modifies the value of the "node account", | ||
* - Validate the signature of the active `key` for the account | ||
* assigned as the _current_ "node account". | ||
* - Validate the signature of the active `key` for the account to be | ||
* assigned as the _new_ "node account". | ||
* - Modify the node information held in network state with the changes | ||
* requested in the update transaction. The node changes SHALL NOT be | ||
* applied to network configuration, and SHALL NOT affect network | ||
* operation at this time. | ||
* - When executing the next `freeze` transaction with `freeze_type` set to | ||
* `PREPARE_UPGRADE`, update network configuration according to the | ||
* modified information in network state. The requested changes SHALL | ||
* affect network operation following this upgrade. | ||
*/ | ||
service AddressBookService { | ||
/** | ||
* A transaction to create a new consensus node in the network. | ||
* address book. | ||
* <p> | ||
* This transaction, once complete, SHALL add a new consensus node to the | ||
* network state.<br/> | ||
* The new consensus node SHALL remain in state, but SHALL NOT participate | ||
* in network consensus until the network updates the network configuration. | ||
* <p> | ||
* Hedera governing council authorization is REQUIRED for this transaction. | ||
*/ | ||
rpc createNode (proto.Transaction) returns (proto.TransactionResponse); | ||
|
||
/** | ||
* A transaction to remove a consensus node from the network address | ||
* book. | ||
* <p> | ||
* This transaction, once complete, SHALL remove the identified consensus | ||
* node from the network state. | ||
* <p> | ||
* Hedera governing council authorization is REQUIRED for this transaction. | ||
*/ | ||
rpc deleteNode (proto.Transaction) returns (proto.TransactionResponse); | ||
|
||
/** | ||
* A transaction to update an existing consensus node from the network | ||
* address book. | ||
* <p> | ||
* This transaction, once complete, SHALL modify the identified consensus | ||
* node state as requested. | ||
* <p> | ||
* This transaction is authorized by the node operator | ||
*/ | ||
rpc updateNode (proto.Transaction) returns (proto.TransactionResponse); | ||
} |
88 changes: 88 additions & 0 deletions
88
packages/proto/src/proto/services/auxiliary/tss/tss_message.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,88 @@ | ||
/** | ||
* # Tss Message Transaction | ||
* | ||
* ### Keywords | ||
* The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | ||
* "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this | ||
* document are to be interpreted as described in | ||
* [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in | ||
* [RFC8174](https://www.ietf.org/rfc/rfc8174). | ||
*/ | ||
syntax = "proto3"; | ||
|
||
package com.hedera.hapi.services.auxiliary.tss; | ||
|
||
/* | ||
* Copyright (C) 2024 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. | ||
*/ | ||
|
||
option java_package = "com.hedera.hapi.services.auxiliary.tss.legacy"; | ||
// <<<pbj.java_package = "com.hedera.hapi.services.auxiliary.tss">>> This comment is special code for setting PBJ Compiler java package | ||
|
||
option java_multiple_files = true; | ||
|
||
/** A transaction body to to send a Threshold Signature Scheme (TSS) | ||
* Message.<br/> | ||
* This is a wrapper around several different TSS message types that a node | ||
* might communicate with other nodes in the network. | ||
* | ||
* - A `TssMessageTransactionBody` MUST identify the hash of the roster | ||
* containing the node generating this TssMessage | ||
* - A `TssMessageTransactionBody` MUST identify the hash of the roster that | ||
* the TSS messages is for | ||
* - A `TssMessageTransactionBody` SHALL contain the specificc TssMessage data | ||
* that has been generated by the node for the share_index. | ||
*/ | ||
message TssMessageTransactionBody { | ||
|
||
/** | ||
* A hash of the roster containing the node generating the TssMessage.<br/> | ||
* This hash uniquely identifies the source roster, which will include | ||
* an entry for the node generating this TssMessage. | ||
* <p> | ||
* This value MUST be set.<br/> | ||
* This value MUST NOT be empty.<br/> | ||
* This value MUST contain a valid hash. | ||
*/ | ||
bytes source_roster_hash = 1; | ||
|
||
/** | ||
* A hash of the roster that the TssMessage is for. | ||
* <p> | ||
* This value MUST be set.<br/> | ||
* This value MUST NOT be empty.<br/> | ||
* This value MUST contain a valid hash. | ||
*/ | ||
bytes target_roster_hash = 2; | ||
|
||
/** | ||
* An index to order shares. | ||
* <p> | ||
* A share index SHALL establish a global ordering of shares across all | ||
* shares in the network.<br/> | ||
* A share index MUST correspond to the index of the public share in the list | ||
* returned from the TSS library when the share was created for the source | ||
* roster. | ||
*/ | ||
uint64 share_index = 3; | ||
|
||
/** | ||
* A byte array. | ||
* <p> | ||
* This field SHALL contain the TssMessage data generated by the node | ||
* for the specified `share_index`. | ||
*/ | ||
bytes tss_message = 4; | ||
} |
88 changes: 88 additions & 0 deletions
88
packages/proto/src/proto/services/auxiliary/tss/tss_share_signature.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,88 @@ | ||
/** | ||
* # Tss Share Signature | ||
* Represents a transaction that submits a node's share signature on a block hash | ||
* during the TSS (Threshold Signature Scheme) process. | ||
* | ||
* ### Keywords | ||
* The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | ||
* "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this | ||
* document are to be interpreted as described in | ||
* [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in | ||
* [RFC8174](https://www.ietf.org/rfc/rfc8174). | ||
*/ | ||
syntax = "proto3"; | ||
|
||
package com.hedera.hapi.services.auxiliary.tss; | ||
|
||
/* | ||
* Copyright (C) 2024 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. | ||
*/ | ||
|
||
option java_package = "com.hedera.hapi.services.auxiliary.tss.legacy"; | ||
// <<<pbj.java_package = "com.hedera.hapi.services.auxiliary.tss">>> This comment is special code for setting PBJ Compiler java package | ||
option java_multiple_files = true; | ||
|
||
/** | ||
* A TSS Share Signature transaction Body.<br/> | ||
* This transaction body communicates a node's signature of a block hash | ||
* using its private share within the TSS process. | ||
* This transaction MUST be prioritized for low latency gossip transmission. | ||
* | ||
* ### Block Stream Effects | ||
* This transaction body will be present in the block stream. This will not have | ||
* any state changes or transaction output or transaction result. | ||
*/ | ||
message TssShareSignatureTransactionBody { | ||
/** | ||
* A SHA2-384 Hash.<br/> | ||
* This is the hash of the roster that includes the node whose | ||
* share produced this share signature. | ||
* <p> | ||
* This value is REQUIRED.<br/> | ||
* This value MUST identify the network roster active at the time this | ||
* share signature was produced.<br/> | ||
* This share signature MUST be produced from a share distributed during | ||
* the re-keying process for the identified roster. | ||
*/ | ||
bytes roster_hash = 1; | ||
|
||
/** | ||
* An index of the share from the node private shares.<br/> | ||
* This is the index of the share that produced this share signature. | ||
* <p> | ||
* This value is REQUIRED.<br/> | ||
* The share referred to by this index MUST exist.<br/> | ||
* The share index MUST be greater than or equal to 0. | ||
*/ | ||
uint64 share_index = 2; | ||
|
||
/** | ||
* A SHA2-384 hash.<br/> | ||
* This is the hash of the message that was signed. | ||
* <p> | ||
* This value is REQUIRED.<br/> | ||
* The message signed MUST be a block hash. | ||
*/ | ||
bytes message_hash = 3; | ||
|
||
/** | ||
* The signature bytes.<br/> | ||
* This is the signature generated by signing the block hash with the node's private share. | ||
* <p> | ||
* This value is REQUIRED.<br/> | ||
* This value MUST be a valid signature of the message hash with the node's private share. | ||
*/ | ||
bytes share_signature = 4; | ||
} |
Oops, something went wrong.