tendermint_config

Struct TendermintConfig

Source
pub struct TendermintConfig {
Show 23 fields pub proxy_app: Address, pub moniker: Moniker, pub fast_sync: bool, pub db_backend: DbBackend, pub db_dir: PathBuf, pub log_level: LogLevel, pub log_format: LogFormat, pub genesis_file: PathBuf, pub priv_validator_key_file: Option<PathBuf>, pub priv_validator_state_file: PathBuf, pub priv_validator_laddr: Option<Address>, pub node_key_file: PathBuf, pub abci: AbciMode, pub filter_peers: bool, pub rpc: RpcConfig, pub p2p: P2PConfig, pub mempool: MempoolConfig, pub consensus: ConsensusConfig, pub storage: StorageConfig, pub tx_index: TxIndexConfig, pub instrumentation: InstrumentationConfig, pub statesync: StatesyncConfig, pub fastsync: FastsyncConfig,
}
Expand description

Tendermint config.toml file

Fields§

§proxy_app: Address

TCP or UNIX socket address of the ABCI application, or the name of an ABCI application compiled in with the Tendermint binary.

§moniker: Moniker

A custom human readable name for this node

§fast_sync: bool

If this node is many blocks behind the tip of the chain, FastSync allows them to catchup quickly by downloading blocks in parallel and verifying their commits

§db_backend: DbBackend

Database backend: goleveldb | cleveldb | boltdb | rocksdb | badgerdb

§db_dir: PathBuf

Database directory

§log_level: LogLevel

Output level for logging, including package level options

§log_format: LogFormat

Output format: ‘plain’ (colored text) or ‘json’

§genesis_file: PathBuf

Path to the JSON file containing the initial validator set and other meta data

§priv_validator_key_file: Option<PathBuf>

Path to the JSON file containing the private key to use as a validator in the consensus protocol

§priv_validator_state_file: PathBuf

Path to the JSON file containing the last sign state of a validator

§priv_validator_laddr: Option<Address>

TCP or UNIX socket address for Tendermint to listen on for connections from an external PrivValidator process

§node_key_file: PathBuf

Path to the JSON file containing the private key to use for node authentication in the p2p protocol

§abci: AbciMode

Mechanism to connect to the ABCI application: socket | grpc

§filter_peers: bool

If true, query the ABCI app on connecting to a new peer so the app can decide if we should keep the connection or not

§rpc: RpcConfig

rpc server configuration options

§p2p: P2PConfig

peer to peer configuration options

§mempool: MempoolConfig

mempool configuration options

§consensus: ConsensusConfig

consensus configuration options

§storage: StorageConfig

Storage configuration options. This section was only first made available in Tendermint Core v0.34.21.

§tx_index: TxIndexConfig

transactions indexer configuration options

§instrumentation: InstrumentationConfig

instrumentation configuration options

§statesync: StatesyncConfig

statesync configuration options

§fastsync: FastsyncConfig

fastsync configuration options

Implementations§

Source§

impl TendermintConfig

Source

pub fn parse_toml<T: AsRef<str>>(toml_string: T) -> Result<Self, Error>

Parse Tendermint config.toml

Source

pub fn load_toml_file<P>(path: &P) -> Result<Self, Error>
where P: AsRef<Path>,

Load config.toml from a file

Source

pub fn load_genesis_file( &self, home: impl AsRef<Path>, ) -> Result<Genesis, Error>

Load genesis.json file from the configured location

Source

pub fn load_node_key(&self, home: impl AsRef<Path>) -> Result<NodeKey, Error>

Load node_key.json file from the configured location

Trait Implementations§

Source§

impl Clone for TendermintConfig

Source§

fn clone(&self) -> TendermintConfig

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 Debug for TendermintConfig

Source§

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

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

impl<'de> Deserialize<'de> for TendermintConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for TendermintConfig

Source§

fn eq(&self, other: &TendermintConfig) -> 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 Serialize for TendermintConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for TendermintConfig

Source§

impl StructuralPartialEq for TendermintConfig

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

🔬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, 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> 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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,