state.addressbook.node.proto Maven / Gradle / Ivy
syntax = "proto3";
package com.hedera.hapi.node.state.addressbook;
/*
* 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 "basic_types.proto";
option java_package = "com.hederahashgraph.api.proto.java";
// <<>> This comment is special code for setting PBJ Compiler java package
option java_multiple_files = true;
/**
* A single address book node in the network state.
*
* Each node in the network address book SHALL represent a single actual
* consensus node that is eligible to participate in network consensus.
*
* Address book nodes SHALL NOT be _globally_ uniquely identified. A given node
* is only valid within a single realm and shard combination, so the identifier
* for a network node SHALL only be unique within a single realm and shard
* combination.
*/
message Node {
/**
* A consensus node identifier.
*
* Node identifiers SHALL be unique _within_ a shard and realm,
* but a node SHALL NOT, ever, serve multiple shards or realms,
* therefore the node identifier MAY be repeated _between_ shards and realms.
*/
uint64 node_id = 1;
/**
* An account identifier.
*
* This account SHALL be owned by the entity responsible for the node.
* This account SHALL be charged transaction fees for any transactions that
* are submitted to the network by this node and fail due diligence checks.
*/
proto.AccountID account_id = 2;
/**
* A short description of the node.
*
* This value, if set, SHALL NOT exceed 100 bytes when encoded as UTF-8.
*/
string description = 3;
/**
* A list of service endpoints for gossip.
*
* These endpoints SHALL represent the published endpoints to which other
* consensus nodes may _gossip_ transactions.
* If the network configuration value `gossipFqdnRestricted` is set, then
* all endpoints in this list SHALL supply only IP address.
* If the network configuration value `gossipFqdnRestricted` is _not_ set,
* then endpoints in this list MAY supply either IP address or FQDN, but
* SHALL NOT supply both values for the same endpoint.
* This list SHALL NOT be empty.
* This list SHALL NOT contain more than `10` entries.
* The first two entries in this list SHALL be the endpoints published to
* all consensus nodes.
* All other entries SHALL be reserved for future use.
*/
repeated proto.ServiceEndpoint gossip_endpoint = 4;
/**
* A list of service endpoints for gRPC calls.
*
* These endpoints SHALL represent the published endpoints to which clients
* may submit transactions.
* These endpoints SHALL specify a port.
* Endpoints in this list MAY supply either IP address or FQDN, but SHALL
* NOT supply both values for the same endpoint.
* This list SHALL NOT be empty.
* This list SHALL NOT contain more than `8` entries.
*/
repeated proto.ServiceEndpoint service_endpoint = 5;
/**
* A certificate used to sign gossip events.
*
* This value SHALL be a certificate of a type permitted for gossip
* signatures.
* This value SHALL be the DER encoding of the certificate presented.
* This field is REQUIRED and MUST NOT be empty.
*/
bytes gossip_ca_certificate = 6;
/**
* A hash of the node gRPC certificate.
*
* This value MAY be used to verify the certificate presented by the node
* during TLS negotiation for gRPC.
* This value SHALL be a SHA-384 hash.
* The TLS certificate to be hashed SHALL first be in PEM format and SHALL
* be encoded with UTF-8 NFKD encoding to a stream of bytes provided to
* the hash algorithm.
* This field is OPTIONAL.
*/
bytes grpc_certificate_hash = 7;
/**
* A consensus weight.
*
* Each node SHALL have a weight in consensus calculations.
* The consensus weight of a node SHALL be calculated based on the amount
* of HBAR staked to that node.
* Consensus SHALL be calculated based on agreement of greater than `2/3`
* of the total `weight` value of all nodes on the network.
*/
uint64 weight = 8;
/**
* A flag indicating this node is deleted.
*
* If this field is set, then this node SHALL NOT be included in the next
* update of the network address book.
* If this field is set, then this node SHALL be immutable and SHALL NOT
* be modified.
* If this field is set, then any `nodeUpdate` transaction to modify this
* node SHALL fail.
*/
bool deleted = 9;
/**
* An administrative key controlled by the node operator.
*
* This key MUST sign each transaction to update this node.
* This field MUST contain a valid `Key` value.
* This field is REQUIRED and MUST NOT be set to an empty `KeyList`.
*/
proto.Key admin_key = 10;
}