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
Prev Previous commit
Next Next commit
PR review comments
Signed-off-by: Thomas Moran <152873392+thomas-swirlds-labs@users.noreply.github.com>
  • Loading branch information
thomas-swirlds-labs committed Nov 14, 2024
commit 8ca0c4cbfb8c0055815a4958e14c9460e9362299
57 changes: 44 additions & 13 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
Expand Up @@ -42,8 +42,19 @@ 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.
* A description of the Network of Consensus Nodes.<br/>
* This records the full information needed to bootstrap a network with TSS
* enabled and where the legacy address book is completely replaced by rosters.
*
* ### Block Stream Effects
* Every block in the Block Stream SHALL be signed via TSS and MUST be verified
* with the ledger identifier current at the _start_ of that block.
* A change to the ledger identifier SHALL be reported in a State Change for
* the block containing that change.
* A TssMessage transaction body will be present in the block stream.
* Including the metadata in the block stream guarantees that the ledger
* identifiers, and node-specific keys are consistently tracked and
* independently verifiable as part of the block history.
*/
message Network {
/**
Expand All @@ -52,33 +63,53 @@ message 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
* A list of TSS messages that have been generated by the nodes in
* a target network that is receiving a "transplant state". <br/>
* This gives the capability to preserve the ledger id of the target network
* even if the transplant state has no keys or roster entries in common with
* the target.
* <p>
* 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.
* The ledger id of the network.<br/>
* This is the public key that identifies the ledger and can be used by the
* network to create a Block Proof or ledger signature on a block root hash.
*/
bytes ledger_id = 3;
}

/**
* The full information needed for a node.
* The full information needed for a single node in the network state.
*/
message NodeMetadata {
/**
* The metadata of the node.
* A consensus node identifier.
* <p>
* Node identifiers SHALL be unique _within_ a ledger, and may not be repeated
* _between_ shards and realms.<br/>
* This value MUST be set.<br/>
* This value MUST be a valid single address book node in network state.
*/
com.hedera.hapi.node.state.addressbook.Node node = 1;
uint64 node_id = 1;

/**
* If set, the public part of a prescribed TSS encryption key for the node.
*/
* An elliptic curve public encryption key.<br/>
* If set, the public part of a prescribed TSS encryption key for the node.
* This is currently an ALT_BN128 curve, but the elliptic curve
* type may change in the future. For example,
* if the Ethereum ecosystem creates precompiles for BLS12_381,
* we may switch to that curve.
* <p>
* This value SHALL be specified according to EIP-196 and EIP-197 standards,
* See <a href='https://eips.ethereum.org/EIPS/eip-196#encoding'>EIP-196</a> and
* <a href='https://eips.ethereum.org/EIPS/eip-197#encoding'>EIP-197</a><br/>
thomas-swirlds-labs marked this conversation as resolved.
Show resolved Hide resolved
* This field is _initially_ OPTIONAL (i.e. it can be unset _when created_)
* but once set, it is REQUIRED thereafter.
*/
bytes tss_encryption_key = 2;
}
Loading