Struct snarkos_cli::commands::Start

source ·
pub struct Start {
Show 25 fields pub network: u16, pub validator: bool, pub prover: bool, pub client: bool, pub private_key: Option<String>, pub private_key_file: Option<PathBuf>, pub node: Option<SocketAddr>, pub bft: Option<SocketAddr>, pub peers: String, pub validators: String, pub allow_external_peers: bool, pub rest: Option<SocketAddr>, pub rest_rps: u32, pub norest: bool, pub nodisplay: bool, pub verbosity: u8, pub logfile: PathBuf, pub metrics: bool, pub storage: Option<PathBuf>, pub cdn: Option<String>, pub nocdn: bool, pub dev: Option<u16>, pub dev_num_validators: Option<u16>, pub no_dev_txs: bool, pub dev_bonded_balances: Option<BondedBalances>,
}
Expand description

Starts the snarkOS node.

Fields§

§network: u16

Specify the network ID of this node

§validator: bool

Specify this node as a validator

§prover: bool

Specify this node as a prover

§client: bool

Specify this node as a client

§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>

Specify the IP address and port for the node server

§bft: Option<SocketAddr>

Specify the IP address and port for the BFT

§peers: String

Specify the IP address and port of the peer(s) to connect to

§validators: String

Specify the IP address and port of the validator(s) to connect to

§allow_external_peers: bool

If the flag is set, a node will allow untrusted peers to connect

§rest: Option<SocketAddr>

Specify the IP address and port for the REST server

§rest_rps: u32

Specify the requests per second (RPS) rate limit per IP for the REST server

§norest: bool

If the flag is set, the node will not initialize the REST server

§nodisplay: bool

If the flag is set, the node will not render the display

§verbosity: u8

Specify the verbosity of the node [options: 0, 1, 2, 3, 4]

§logfile: PathBuf

Specify the path to the file where logs will be stored

§metrics: bool

Enables the metrics exporter

§storage: Option<PathBuf>

Specify the path to a directory containing the storage database for the ledger

§cdn: Option<String>

Enables the node to prefetch initial blocks from a CDN

§nocdn: bool

If the flag is set, the node will not prefetch from a CDN

§dev: Option<u16>

Enables development mode, specify a unique ID for this node

§dev_num_validators: Option<u16>

If development mode is enabled, specify the number of genesis validators (default: 4)

§no_dev_txs: bool

If developtment 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 (default: None)

Implementations§

source§

impl Start

source

pub fn parse(self) -> Result<String>

Starts the snarkOS node.

Trait Implementations§

source§

impl Args for Start

source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
source§

impl Clone for Start

source§

fn clone(&self) -> Start

Returns a copy 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 CommandFactory for Start

source§

fn command<'b>() -> Command

Build a Command that can instantiate Self. Read more
source§

fn command_for_update<'b>() -> Command

Build a Command that can update self. Read more
source§

impl Debug for Start

source§

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

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

impl FromArgMatches for Start

source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
source§

impl Parser for Start

source§

fn parse() -> Self

Parse from std::env::args_os(), exit on error.
source§

fn try_parse() -> Result<Self, Error>

Parse from std::env::args_os(), return Err on error.
source§

fn parse_from<I, T>(itr: I) -> Self
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, exit on error.
source§

fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, return Err on error.
source§

fn update_from<I, T>(&mut self, itr: I)
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, exit on error. Read more
source§

fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, return Err on error.

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> 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, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
source§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

source§

type Output = T

Should always be Self
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
source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,