NodeUpdateTransactionBody

Struct NodeUpdateTransactionBody 

Source
pub struct NodeUpdateTransactionBody {
    pub node_id: u64,
    pub account_id: Option<AccountId>,
    pub description: Option<String>,
    pub gossip_endpoint: Vec<ServiceEndpoint>,
    pub service_endpoint: Vec<ServiceEndpoint>,
    pub gossip_ca_certificate: Option<Vec<u8>>,
    pub grpc_certificate_hash: Option<Vec<u8>>,
    pub admin_key: Option<Key>,
    pub decline_reward: Option<bool>,
    pub grpc_proxy_endpoint: Option<ServiceEndpoint>,
}
Expand description

Transaction body to modify address book node attributes.

  • This transaction SHALL enable the node operator, as identified by the admin_key, to modify operational attributes of the node.
  • This transaction MUST be signed by the active admin_key for the node.
  • If this transaction sets a new value for the admin_key, then both the current admin_key, and the new admin_key MUST sign this transaction.
  • This transaction SHALL NOT change any field that is not set (is null) in this transaction body.
  • This SHALL create a pending update to the node, but the change SHALL NOT be immediately applied to the active configuration.
  • All pending node updates SHALL be applied to the active network configuration during the next freeze transaction with the field freeze_type set to PREPARE_UPGRADE.

§Block Stream Effects

None.

Fields§

§node_id: u64

A consensus node identifier in the network state.

The node identified MUST exist in the network address book.
The node identified MUST NOT be deleted.
This value is REQUIRED.

§account_id: Option<AccountId>

An account identifier.

If set, this SHALL replace the node account identifier.
If set, this transaction MUST be signed by the active `key` for _both_ the current node account _and_ the identified new node account.

§description: Option<String>

A short description of the node.

This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` (default 100) bytes when encoded as UTF-8.
If set, this value SHALL replace the previous value.

§gossip_endpoint: Vec<ServiceEndpoint>

A list of service endpoints for gossip.

If set, this list MUST meet the following requirements.


These endpoints SHALL represent the published endpoints to which other consensus nodes may _gossip_ transactions.
These endpoints SHOULD NOT specify both address and DNS name.
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.

Example
Hedera Mainnet _requires_ that address be specified, and does not permit DNS name (FQDN) to be specified.
Solo, however, _requires_ DNS name (FQDN) but also permits address.

If set, the new list SHALL replace the existing list.

§service_endpoint: Vec<ServiceEndpoint>

A list of service endpoints for gRPC calls.

If set, this list MUST meet the following requirements.


These endpoints SHALL represent the published endpoints to which clients may submit transactions.
These endpoints SHOULD specify address and port.
These endpoints MAY specify a DNS name.
These endpoints SHOULD NOT specify both address and DNS name.
This list MUST NOT be empty.
This list MUST NOT contain more than `8` entries.

Each network may have additional requirements for these endpoints. A client MUST check network-specific documentation for those details.

If set, the new list SHALL replace the existing list.

§gossip_ca_certificate: Option<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.

If set, the new value SHALL replace the existing bytes value.

§grpc_certificate_hash: Option<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.

If set, the new value SHALL replace the existing hash value.

§admin_key: Option<Key>

An administrative key controlled by the node operator.

This field is OPTIONAL.
If set, this key MUST sign this transaction.
If set, this key MUST sign each subsequent transaction to update this node.
If set, this field MUST contain a valid `Key` value.
If set, this field MUST NOT be set to an empty `KeyList`.

§decline_reward: Option<bool>

A boolean indicating that this node has chosen to decline node rewards distributed at the end of staking period.

This node SHALL NOT receive reward if this value is set, and `true`.

§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.
This field MAY be set to `ServiceEndpoint.DEFAULT` to remove a previously-valid web proxy.

Trait Implementations§

Source§

impl Clone for NodeUpdateTransactionBody

Source§

fn clone(&self) -> NodeUpdateTransactionBody

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NodeUpdateTransactionBody

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for NodeUpdateTransactionBody

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Message for NodeUpdateTransactionBody

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl PartialEq for NodeUpdateTransactionBody

Source§

fn eq(&self, other: &NodeUpdateTransactionBody) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for NodeUpdateTransactionBody

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more