Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Network and NodeMetadata Protobuf #16581

Merged
merged 11 commits into from
Nov 20, 2024
Next Next commit
Add network proto definition
Signed-off-by: Thomas Moran <152873392+thomas-swirlds-labs@users.noreply.github.com>
  • Loading branch information
thomas-swirlds-labs committed Nov 13, 2024
commit bf7b8ee61e37bea538e283da8ed2d0b2878fc27b
84 changes: 84 additions & 0 deletions hapi/hedera-protobufs/services/state/network/network.proto
thomas-swirlds-labs marked this conversation as resolved.
Show resolved Hide resolved
jsync-swirlds marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/**
* # Network
* A representation that includes all “biographical information” on each
* node that is needed by a network with TSS fully operational.
* Required in order to replace the address book with Rosters.
*
* ### 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.node.state.network;

/*
* 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.
*/

import "auxiliary/tss/tss_message.proto";
import "state/addressbook/node.proto";

option java_package = "com.hederahashgraph.api.proto.java";
// <<<pbj.java_package = "com.hedera.hapi.node.state.network">>> This comment is special code for setting PBJ Compiler java package
option java_multiple_files = true;



/**
* The full information needed to bootstrap a network with TSS enabled
* and the legacy address book completely replaced by rosters.
thomas-swirlds-labs marked this conversation as resolved.
Show resolved Hide resolved
*/
message Network {
/**
* The metadata of the nodes in the network.
*/
repeated NodeMetadata node_metadata = 1;

/**
* If set, a list of TSS messages that have been generated by the nodes in
* a target network that is receiving a "transplant state". This lets us
* preserve the ledger id of the target network even if the transplant
* state has no keys (or even roster entries) in common with the target.
* This must be exactly the ordered list of TSS messages used to generate
* the target network's ledger id; and must generate the same ledger id
* given below.
*/
repeated com.hedera.hapi.services.auxiliary.tss.TssMessageTransactionBody tss_messages = 2;

/**
* If set, the expected ledger id of the network.
*/
bytes ledger_id = 3;
}

/**
* The full information needed for a node.
*/
message NodeMetadata {
/**
* The metadata of the node.
*/
com.hedera.hapi.node.state.addressbook.Node node = 1;
thomas-swirlds-labs marked this conversation as resolved.
Show resolved Hide resolved

/**
* If set, the public part of a prescribed TSS encryption key for the node.
*/
bytes tss_encryption_key = 2;
}
Loading