pub struct NodeCreateTransactionBody {
pub account_id: Option<AccountId>,
pub description: String,
pub gossip_endpoint: Vec<ServiceEndpoint>,
pub service_endpoint: Vec<ServiceEndpoint>,
pub gossip_ca_certificate: Vec<u8>,
pub grpc_certificate_hash: Vec<u8>,
pub admin_key: Option<Key>,
pub decline_reward: bool,
pub grpc_proxy_endpoint: Option<ServiceEndpoint>,
}
Expand description
A transaction body to add a new consensus node to the network address book.
This transaction body SHALL be considered a “privileged transaction”.
This message supports a transaction to create a new node in the network address book. The transaction, once complete, enables a new consensus node to join the network, and requires governing council authorization.
- A
NodeCreateTransactionBody
MUST be signed by theKey
assigned to theadmin_key
field and one of those keys: treasure account (2) key, systemAdmin(50) key, or addressBookAdmin(55) key. - The newly created node information SHALL be added to the network address book information in the network state.
- The new entry SHALL be created in “state” but SHALL NOT participate in network consensus and SHALL NOT be present in network “configuration” until the next “upgrade” transaction (as noted below).
- All new address book entries SHALL be added to the active network
configuration during the next
freeze
transaction with the fieldfreeze_type
set toPREPARE_UPGRADE
.
§Block Stream Effects
Upon completion the newly assigned node_id
SHALL be recorded in
the transaction receipt.
This value SHALL be the next available node identifier.
Node identifiers SHALL NOT be reused.
Fields§
§account_id: Option<AccountId>
A Node account identifier.
This account identifier MUST be in the "account number" form.
This account identifier MUST NOT use the alias field.
If the identified account does not exist, this transaction SHALL fail.
Multiple nodes MAY share the same node account.
This field is REQUIRED.
description: String
A short description of the node.
This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes`
(default 100) bytes when encoded as UTF-8.
This field is OPTIONAL.
gossip_endpoint: Vec<ServiceEndpoint>
A list of service endpoints for gossip.
These endpoints SHALL represent the published endpoints to which other
consensus nodes may _gossip_ transactions.
These endpoints MUST specify a port.
This list MUST NOT be empty.
This list MUST 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.
Each network may have additional requirements for these endpoints.
A client MUST check network-specific documentation for those
details.
If the network configuration value `gossipFqdnRestricted` is set, then
all endpoints in this list MUST 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
MUST NOT supply both values for the same endpoint.
service_endpoint: Vec<ServiceEndpoint>
A list of service endpoints for gRPC calls.
These endpoints SHALL represent the published gRPC endpoints to which
clients may submit transactions.
These endpoints MUST specify a port.
Endpoints in this list MAY supply either IP address or FQDN, but MUST
NOT supply both values for the same endpoint.
This list MUST NOT be empty.
This list MUST NOT contain more than `8` entries.
gossip_ca_certificate: Vec<u8>
A certificate used to sign gossip events.
This value MUST be a certificate of a type permitted for gossip
signatures.
This value MUST be the DER encoding of the certificate presented.
This field is REQUIRED and MUST NOT be empty.
grpc_certificate_hash: Vec<u8>
A hash of the node gRPC TLS certificate.
This value MAY be used to verify the certificate presented by the node
during TLS negotiation for gRPC.
This value MUST be a SHA-384 hash.
The TLS certificate to be hashed MUST first be in PEM format and MUST be
encoded with UTF-8 NFKD encoding to a stream of bytes provided to
the hash algorithm.
This field is OPTIONAL.
admin_key: Option<Key>
An administrative key controlled by the node operator.
This key MUST sign this transaction.
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`.
decline_reward: bool
A boolean flag indicating whether the node operator declines to receive node rewards.
If this flag is set to `true`, the node operator declines to receive
node rewards.
grpc_proxy_endpoint: Option<ServiceEndpoint>
A web proxy for gRPC from non-gRPC clients.
This endpoint SHALL be a Fully Qualified Domain Name (FQDN) using the HTTPS
protocol, and SHALL support gRPC-Web for use by browser-based clients.
This endpoint MUST be signed by a trusted certificate authority.
This endpoint MUST use a valid port and SHALL be reachable over TLS.
This field MAY be omitted if the node does not support gRPC-Web access.
This field MUST be updated if the gRPC-Web endpoint changes.
This field SHALL enable frontend clients to avoid hard-coded proxy endpoints.
Trait Implementations§
Source§impl Clone for NodeCreateTransactionBody
impl Clone for NodeCreateTransactionBody
Source§fn clone(&self) -> NodeCreateTransactionBody
fn clone(&self) -> NodeCreateTransactionBody
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for NodeCreateTransactionBody
impl Debug for NodeCreateTransactionBody
Source§impl Default for NodeCreateTransactionBody
impl Default for NodeCreateTransactionBody
Source§impl Message for NodeCreateTransactionBody
impl Message for NodeCreateTransactionBody
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.impl StructuralPartialEq for NodeCreateTransactionBody
Auto Trait Implementations§
impl Freeze for NodeCreateTransactionBody
impl RefUnwindSafe for NodeCreateTransactionBody
impl Send for NodeCreateTransactionBody
impl Sync for NodeCreateTransactionBody
impl Unpin for NodeCreateTransactionBody
impl UnwindSafe for NodeCreateTransactionBody
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request