thruput_xdr/network.rs
1// Generated by xdrc 0.18.0 (xdrs d7777c37264da66eb41f8139bd539c4aa049fcc5). Do not edit.
2
3#![allow(non_camel_case_types)]
4#![allow(non_snake_case)]
5#![allow(non_upper_case_globals)]
6#![allow(unused_imports)]
7#![allow(dead_code)]
8#![allow(unused_variables)]
9#![allow(clippy::unnecessary_cast)]
10use crate::*;
11use core::ops::{Deref, DerefMut};
12use core::option::Option;
13#[cfg(feature = "std")]
14use std::io::{Read, Write};
15#[cfg(feature = "xdrs")]
16use xdrs::*;
17#[cfg(feature = "serde")]
18use ::serde::{Deserialize, Serialize};
19
20// Definitions for network config parameters
21/// ServerAddress is an IP (or hostname) and port address, separated by a
22/// colon.
23pub type ServerAddress = StringM;
24
25/// UPID is a globally unique process identifier (function of start time, place
26/// and randomness)
27pub type UPID = [u8; 8];
28
29/// ProtocolCommit describes a specific protocol repo version.
30/// Used to ensure communicating daemons in a validator deployment are compatible.
31///
32/// Printable ASCII: a short prefix followed by the leading characters of the
33/// protocol repo commit id. Peers only ever compare it byte for byte, and it
34/// travels as plain text outside XDR too -- runtime manifests, log lines, and
35/// indexer outbox filenames -- so it stays text rather than a raw hash.
36///
37/// Fixed width, so a peer cannot declare a length: decoding reads exactly
38/// these bytes into an inline array, with no length prefix and no allocation.
39/// 20 is a whole number of XDR words, so nothing is spent on padding.
40pub type ProtocolCommit = [u8; 20];