2019-09-06 11:40:13 +02:00
[ general ]
env_prefix = "ELECTRS"
2019-09-28 22:42:23 +02:00
conf_file_param = "conf"
conf_dir_param = "conf_dir"
2022-02-17 19:10:45 +01:00
skip_default_conf_files_switch = "skip_default_conf_files"
2019-09-06 11:40:13 +02:00
doc = "" "
An efficient re-implementation of Electrum Server , inspired by ElectrumX , Electrum Personal Server and bitcoincore-indexd .
The motivation behind this project is to enable a user to run his own Electrum server , with required hardware resources not much beyond those of a full node . The server indexes the entire Bitcoin blockchain , and the resulting index enables fast queries for any given user wallet , allowing the user to keep real-time track of his balances and his transaction history using the Electrum wallet . Since it runs on the user 's own machine, there is no need for the wallet to communicate with external Electrum servers, thus preserving the privacy of the user' s addresses and balances . "" "
[ [ switch ] ]
name = "verbose"
abbr = "v"
doc = "Increase logging verbosity"
count = true
[ [ switch ] ]
name = "timestamp"
doc = "Prepend log lines with a timestamp"
2021-09-13 11:50:21 +02:00
[ [ switch ] ]
name = "auto_reindex"
doc = "Automatically reindex the database if it's inconsistent or in old format"
default = true
2019-09-06 11:40:13 +02:00
[ [ param ] ]
name = "db_dir"
type = "std::path::PathBuf"
doc = "Directory to store index database (default: ./db/)"
default = "\"./db\".into()"
2023-11-24 13:11:16 +01:00
[ [ param ] ]
name = "db_log_dir"
type = "std::path::PathBuf"
doc = "Directory to store index database internal log (default: same as specified by `db_dir`)"
2019-09-06 11:40:13 +02:00
[ [ param ] ]
name = "daemon_dir"
type = "std::path::PathBuf"
doc = "Data directory of Bitcoind (default: ~/.bitcoin/)"
default = "crate::config::default_daemon_dir()"
2021-03-26 09:05:58 +01:00
[ [ param ] ]
name = "auth"
type = "String"
doc = "JSONRPC authentication ('USER:PASSWORD', default: use cookie file)"
2019-09-06 11:40:13 +02:00
# Force the user to use config file in order to avoid password leaks
argument = false
env_var = false
2019-11-10 12:11:31 +01:00
[ [ param ] ]
name = "cookie_file"
type = "std::path::PathBuf"
doc = "JSONRPC authentication cookie file (default: ~/.bitcoin/.cookie)"
# This is safe to configure on command line.
2019-09-06 11:40:13 +02:00
[ [ param ] ]
name = "network"
type = "crate::config::BitcoinNetwork"
2023-10-16 09:11:05 +02:00
convert_into = "::bitcoin::Network"
2024-10-29 20:34:00 +01:00
doc = "Select Bitcoin network type ('bitcoin', 'testnet', 'testnet4', 'regtest' or 'signet')"
2019-09-06 11:40:13 +02:00
default = "Default::default()"
[ [ param ] ]
name = "electrum_rpc_addr"
type = "crate::config::ResolvAddr"
2021-03-26 09:05:58 +01:00
doc = "Electrum server JSONRPC 'addr:port' to listen on (default: '127.0.0.1:50001' for mainnet, '127.0.0.1:60001' for testnet, '127.0.0.1:60401' for regtest and '127.0.0.1:60601' for signet)"
2019-09-06 11:40:13 +02:00
[ [ param ] ]
name = "daemon_rpc_addr"
type = "crate::config::ResolvAddr"
2021-03-26 09:05:58 +01:00
doc = "Bitcoin daemon JSONRPC 'addr:port' to connect (default: 127.0.0.1:8332 for mainnet, 127.0.0.1:18332 for testnet, 127.0.0.1:18443 for regtest and 127.0.0.1:18554 for signet)"
[ [ param ] ]
name = "daemon_p2p_addr"
type = "crate::config::ResolvAddr"
doc = "Bitcoin daemon p2p 'addr:port' to connect (default: 127.0.0.1:8333 for mainnet, 127.0.0.1:18333 for testnet, 127.0.0.1:18444 for regtest and 127.0.0.1:38333 for signet)"
2019-09-06 11:40:13 +02:00
[ [ param ] ]
name = "monitoring_addr"
type = "crate::config::ResolvAddr"
2023-05-29 19:00:06 +02:00
doc = "Prometheus monitoring 'addr:port' to listen on (default: 127.0.0.1:4224 for mainnet, 127.0.0.1:14224 for testnet, 127.0.0.1:24224 for regtest and 127.0.0.1:34224 for signet)"
2019-09-06 11:40:13 +02:00
2020-06-13 17:15:03 +02:00
[ [ param ] ]
name = "wait_duration_secs"
type = "u64"
doc = "Duration to wait between bitcoind polling"
2021-03-26 09:05:58 +01:00
default = "10"
2020-06-13 17:15:03 +02:00
2021-09-22 10:42:17 +02:00
[ [ param ] ]
name = "jsonrpc_timeout_secs"
type = "u64"
doc = "Duration to wait until bitcoind JSON-RPC timeouts (must be greater than wait_duration_secs)."
default = "15"
2019-09-06 11:40:13 +02:00
[ [ param ] ]
name = "index_batch_size"
type = "usize"
2021-09-30 12:58:49 +02:00
doc = "Number of blocks to get in a single p2p protocol request from bitcoind"
2021-03-26 09:05:58 +01:00
default = "10"
2019-09-06 11:40:13 +02:00
2021-05-08 10:14:12 +02:00
[ [ switch ] ]
name = "ignore_mempool"
doc = "Don't sync mempool - queries will show only confirmed transactions."
2021-10-09 12:49:56 +02:00
[ [ switch ] ]
name = "disable_electrum_rpc"
doc = "Disable Electrum RPC server - only sync and index blocks."
2021-09-11 10:01:05 +02:00
[ [ switch ] ]
name = "sync_once"
doc = "Exit after the initial sync is over (don't start Electrum server)."
2023-06-06 19:23:51 +02:00
[ [ switch ] ]
name = "skip_block_download_wait"
doc = "Don't wait for block download to finish before starting sync."
2021-11-07 21:06:52 +01:00
[ [ switch ] ]
name = "version"
doc = "Print out the program version."
2019-09-06 11:40:13 +02:00
[ [ param ] ]
2021-08-17 13:15:16 +02:00
name = "index_lookup_limit"
2019-09-06 11:40:13 +02:00
type = "usize"
doc = "Number of transactions to lookup before returning an error, to prevent 'too popular' addresses from causing the RPC server to get stuck (0 - disable the limit)"
2021-12-04 08:02:37 +01:00
default = "0"
2019-09-06 11:40:13 +02:00
2021-10-11 09:26:27 +02:00
[ [ param ] ]
name = "reindex_last_blocks"
type = "usize"
doc = "Number of last blocks to reindex (used for testing)"
default = "0"
2019-09-06 11:40:13 +02:00
[ [ param ] ]
name = "server_banner"
type = "String"
doc = "The banner to be shown in the Electrum console"
default = "concat!(\"Welcome to electrs \", env!(\"CARGO_PKG_VERSION\"), \" (Electrum Rust Server)!\").to_owned()"
2021-11-08 14:03:06 +01:00
[ [ param ] ]
name = "log_filters"
type = "String"
doc = "Logging filters, overriding `RUST_LOG` environment variable (see https://docs.rs/env_logger/ for details)"
2022-08-11 15:42:36 +02:00
[ [ param ] ]
name = "signet_magic"
2022-09-04 13:33:48 +02:00
type = "String"
doc = "network magic for custom signet network in hex format, as found in Bitcoin Core logs (signet only)"