forked from BitcoinUnlimited/ElectrsCash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig_spec.toml
180 lines (148 loc) · 5.51 KB
/
config_spec.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
[general]
env_prefix = "ELECTRSCASH"
conf_file_param = "conf"
conf_dir_param = "conf_dir"
doc = """
ElectrsCash is an efficient implementation of Electrum Server and can be used
as a drop-in replacement for ElectrumX. In addition to the TCP RPC interface,
it also provides WebSocket support.
ElectrsCash fully implements the version 1.4.3 of the Electrum Cash protocol
and in addition to useful extensions, including CashAccounts.
The server indexes the entire Bitcoin Cash blockchain, and the resulting index
enables fast queries for blockchain applications and any given user wallet,
allowing the user to keep real-time track of his balances and his transaction
history.
When run 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"
[[param]]
name = "db_dir"
type = "std::path::PathBuf"
doc = "Directory to store index database (default: ./db/)"
default = "\"./db\".into()"
[[param]]
name = "daemon_dir"
type = "std::path::PathBuf"
doc = "Data directory of Bitcoind (default: ~/.bitcoin/)"
default = "crate::config::default_daemon_dir()"
[[param]]
name = "blocks_dir"
type = "std::path::PathBuf"
doc = "Analogous to bitcoind's -blocksdir option, this specifies the directory containing the raw blocks files (blk*.dat)"
[[param]]
name = "cookie"
type = "String"
doc = "JSONRPC authentication cookie ('USER:PASSWORD', default: read from cookie file)"
[[param]]
name = "cookie_file"
type = "std::path::PathBuf"
doc = "JSONRPC authentication cookie file (default: ~/.bitcoin/.cookie)"
# This is safe to configure on command line.
[[param]]
name = "network"
type = "crate::config::BitcoinNetwork"
convert_into = "::bitcoincash::network::constants::Network"
doc = "Select Bitcoin network type ('bitcoin', 'testnet', 'testnet4', 'scalenet' or 'regtest')"
default = "Default::default()"
[[param]]
name = "electrum_rpc_addr"
type = "crate::config::ResolvAddr"
doc = "Electrum server JSONRPC 'addr:port' to listen on (default: '0.0.0.0:50001' for mainnet, '0.0.0.0:60001' for testnet and '0.0.0.0:60401' for regtest)"
[[param]]
name = "electrum_ws_addr"
type = "crate::config::ResolvAddr"
doc = "Electrum websocket server 'addr:port' to listen on (default: '0.0.0.0:50003' for mainnet, '0.0.0.0:60003' for testnet and '0.0.0.0:60403' for regtest)"
[[param]]
name = "daemon_rpc_addr"
type = "crate::config::ResolvAddr"
doc = "Bitcoin daemon JSONRPC 'addr:port' to connect (default: 127.0.0.1:8332 for mainnet, 127.0.0.1:18332 for testnet, 28332 for testnet4, 38332 for scalenet and 127.0.0.1:18443 for regtest)"
[[param]]
name = "monitoring_addr"
type = "crate::config::ResolvAddr"
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:34224 for testnet4, 127.0.0.1:44224 for scalenet and 127.0.0.1:24224 for regtest)"
[[switch]]
name = "jsonrpc_import"
doc = "Use JSONRPC instead of directly importing blk*.dat files. Useful for remote full node or low memory system"
default = true
[[param]]
name = "wait_duration_secs"
type = "u64"
doc = "Duration to wait between bitcoind polling"
default = "5"
[[param]]
name = "index_batch_size"
type = "usize"
doc = "Buffer size for blocks (# of blocks) fetched via RPC from bitcoind"
default = "100"
[[param]]
name = "bulk_index_threads"
type = "usize"
doc = "Number of threads used for bulk indexing (default: use the # of CPUs)"
default = "0"
[[param]]
name = "tx_cache_size_mb"
type = "f32"
doc = "Total size of transactions to cache (MB)"
default = "250.0"
[[param]]
name = "blocktxids_cache_size_mb"
type = "f32"
doc = "Total size of block transactions IDs to cache (in MB)"
default = "50.0"
[[param]]
name = "txid_limit"
type = "usize"
doc = "DEPRECATED. Not used. Number of transactions to lookup before returning an error."
default = "0"
[[param]]
name = "server_banner"
type = "String"
doc = "The banner to be shown in the Electrum console"
default = "concat!(\"Welcome to ElectrsCash \", env!(\"CARGO_PKG_VERSION\"), \" (Electrum Rust Server)!\").to_owned()"
[[param]]
name = "rpc_timeout"
type = "usize"
doc = "Maximum time in seconds an RPC call may make. Mitigates DoS when querying 'too popular' addresses"
default = "10"
[[switch]]
name = "low_memory"
doc = "Indicate preference to less memory usage over performance"
default = false
[[param]]
name = "cashaccount_activation_height"
type = "usize"
doc = "The activation blockheight for cashaccount. Set to 0 to disable cashaccount indexing"
default = "563720"
[[param]]
name = "rpc_buffer_size"
type = "usize"
doc = "Size of the message queue for each peer. If set too small, subscription notifications may drop"
default = "2000"
[[param]]
name = "scripthash_subscription_limit"
type = "u32"
doc = "The maximum number of scripthash subscriptions per connection"
default = "250000"
[[param]]
name = "scripthash_alias_bytes_limit"
type = "u32"
doc = "The maximum number of bytes stored for scripthash aliases. A bitcoincash address alias is 54 bytes, making the default allow ~1800 blockchain.address subscriptions."
default = "100000"
[[param]]
name = "rpc_max_connections"
type = "u32"
doc = "Maximum number of simultaneous RPC connections."
default = "2000"
[[param]]
name = "rpc_max_connections_shared_prefix"
type = "u32"
doc = "Maximum number of simultaneous RPC connections from IP's sharing first two octets (255.255.0.0 for IPv4)."
default = "500"