pub struct Start {Show 28 fields
pub network: u16,
pub prover: bool,
pub client: bool,
pub validator: bool,
pub private_key: Option<String>,
pub private_key_file: Option<PathBuf>,
pub node: Option<SocketAddr>,
pub bft: Option<SocketAddr>,
pub peers: Option<String>,
pub validators: Option<String>,
pub allow_external_peers: bool,
pub rotate_external_peers: bool,
pub rest: Option<SocketAddr>,
pub rest_rps: u32,
pub jwt_secret: Option<String>,
pub jwt_timestamp: Option<i64>,
pub norest: bool,
pub nodisplay: bool,
pub verbosity: u8,
pub log_filter: Option<String>,
pub logfile: PathBuf,
pub storage: Option<PathBuf>,
pub cdn: Option<String>,
pub nocdn: bool,
pub dev: Option<u16>,
pub dev_num_validators: u16,
pub no_dev_txs: bool,
pub dev_bonded_balances: Option<BondedBalances>,
}Expand description
Starts the snarkOS node.
Fields§
§network: u16Specify the network ID of this node [options: 0 = mainnet, 1 = testnet, 2 = canary]
prover: boolStart the node as a prover.
client: boolStart the node as a client (default).
Client are “full nodes”, i.e, validate and execute all blocks they receive, but they do not participate in AleoBFT consensus.
validator: boolStart the node as a validator.
Validators are “full nodes”, like clients, but also participate in AleoBFT.
private_key: Option<String>Specify the account private key of the node
private_key_file: Option<PathBuf>Specify the path to a file containing the account private key of the node
node: Option<SocketAddr>Set the IP address and port used for P2P communication.
bft: Option<SocketAddr>Set the IP address and port used for BFT communication. This argument is only allowed for validator nodes.
peers: Option<String>Specify the IP address and port of the peer(s) to connect to (as a comma-separated list).
These peers will be set as “trusted”, which means the node will not disconnect from them when performing peer rotation.
Setting peers to “” has the same effect as not setting the flag at all, except when using --dev.
validators: Option<String>Specify the IP address and port of the validator(s) to connect to.
allow_external_peers: boolAllow untrusted peers (not listed in --peers) to connect.
The flag will be ignored by client and prover nodes, as tis behavior is always enabled for these types of nodes.
rotate_external_peers: boolIf the flag is set, a client will periodically evict more external peers
rest: Option<SocketAddr>Specify the IP address and port for the REST server
rest_rps: u32Specify the requests per second (RPS) rate limit per IP for the REST server
jwt_secret: Option<String>Specify the JWT secret for the REST server (16B, base64-encoded).
jwt_timestamp: Option<i64>Specify the JWT creation timestamp; can be any time in the last 10 years.
norest: boolIf the flag is set, the node will not initialize the REST server.
nodisplay: boolWrite log message to stdout instead of showing a terminal UI.
This is useful, for example, for running a node as a service instead of in the foreground or to pipe its output into a file.
verbosity: u8Specify the log verbosity of the node. [options: 0 (lowest log level) to 6 (highest level)]
log_filter: Option<String>Set a custom log filtering scheme, e.g., “off,snarkos_bft=trace”, to show all log messages of snarkos_bft but nothing else.
logfile: PathBufSpecify the path to the file where logs will be stored
storage: Option<PathBuf>Specify the path to a directory containing the storage database for the ledger.
This flag overrides the default path, even when --dev is set.
cdn: Option<String>Enables the node to prefetch initial blocks from a CDN
nocdn: boolIf the flag is set, the node will not prefetch from a CDN
dev: Option<u16>Enables development mode used to set up test networks.
The purpose of this flag is to run multiple nodes on the same machine and in the same working directory.
To do this, set the value to a unique ID within the test work. For example if there are four nodes in the network, pass --dev 0 for the first node, --dev 1 for the second, and so forth.
If you do not explicitly set the --peers flag, this will also populate the set of trusted peers, so that the network is fully connected.
Additionally, if you do not set the --rest or the --norest flags, it will also set the REST port to 3030 for the first node, 3031 for the second, and so forth.
dev_num_validators: u16If development mode is enabled, specify the number of genesis validator.
no_dev_txs: boolIf development mode is enabled, specify whether node 0 should generate traffic to drive the network.
dev_bonded_balances: Option<BondedBalances>If development mode is enabled, specify the custom bonded balances as a JSON object.
Implementations§
Trait Implementations§
Source§impl Args for Start
impl Args for Start
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for Start
impl CommandFactory for Start
Source§impl FromArgMatches for Start
impl FromArgMatches for Start
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for Start
impl Parser for Start
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for Start
impl RefUnwindSafe for Start
impl Send for Start
impl Sync for Start
impl Unpin for Start
impl UnwindSafe for Start
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more