epic-server.toml
Complete reference for the node's configuration file. Defaults shown are what a fresh mainnet install writes.
Every key requires a restart to take effect. The file is read once at startup and there is no reload signal.
Where the file lives
The node looks for configuration in this order:
--config_file <path>, if given. A missing file at an explicit path is fatal../epic-server.tomlin the current working directory.~/.epic/<network>/epic-server.toml, created with defaults if absent.
<network> is main, floo, user or auto.
epic server config writes a fresh epic-server.toml into the current directory with its paths
pointed at that directory. It refuses to overwrite an existing file.
A hardened starting point
The generated file contains every key with defaults. A minimal hardened configuration differs from those defaults in these keys:
[server]
# Loopback only. Front it with an authenticating proxy to reach it from another host.
api_http_addr = "127.0.0.1:3413"
api_secret_path = "/home/you/.epic/main/.api_secret"
# Optional, and created by hand: the node does not write this file.
foreign_api_secret_path = "/home/you/.epic/main/.foreign_api_secret"
# Keep full block history rather than pruning.
archive_mode = true
# skip_pow_validation applies only through the latest checkpoint. Set it to false to verify all
# historical proof of work yourself.
# skip_pow_validation = true
# disable_checkpoints = false
[server.p2p_config]
host = "0.0.0.0"
port = 3414
[logging]
log_to_file = true
file_log_level = "Info"
See authentication and TLS for the foreign secret, and node and wallet setup to get started.
[server]
| Key | Type | Default | Purpose |
|---|---|---|---|
db_root | string | ~/.epic/main/chain_data | Directory holding chain and peer databases |
api_http_addr | host:port | 127.0.0.1:3413 | Listen address for the HTTP APIs |
api_secret_path | string, optional | ~/.epic/main/.api_secret | Basic auth secret for /v1 and /v2/owner. Commenting it out does not open them: with no secret, both return 401 to every call except GET /v1/version and one plain get_status. See the node credential |
foreign_api_secret_path | string, optional | .foreign_api_secret, relative | Basic auth secret for /v2/foreign. Create the file yourself. A node with it set cannot serve epic-wallet 4.1.0. See API authentication |
foundation_path | string, optional | /usr/share/epic/foundation.json, or .\foundation.json on Windows | Pre-generated foundation coinbase data. Omit the key, or leave it empty, to use the copy built into the binary |
tls_certificate_file | string, optional | unset | PEM certificate chain. Setting it switches the API to HTTPS |
tls_certificate_key | string, optional | unset | PEM private key. Required if the certificate is set |
chain_type | enum | Mainnet | Mainnet, Floonet, UserTesting, AutomatedTesting |
chain_validation_mode | enum | Disabled | EveryBlock runs a full chain validation after each block |
archive_mode | bool, optional | false | true keeps full block history instead of pruning |
skip_pow_validation | bool, optional | true | Skip proof-of-work validation during sync for blocks inside the checkpointed range. Applies only through the latest checkpoint |
disable_checkpoints | bool, optional | false | On a test network, extends the skipping past the latest checkpoint for blocks more than 1,000 below the tip. Has effect only when skip_pow_validation is true. Ignored on mainnet |
skip_sync_wait | bool, optional | false | Skip the startup sync wait |
header_sync_timeout | seconds | 10 | Timeout waiting for confirmation more headers exist. Zero or negative becomes 10 |
run_tui | bool, optional | false | Run the terminal interface. Enabling it disables stdout logging |
only_randomx | bool, optional | false | Force a RandomX-only block policy on a test network. See the block policy |
no_progpow | bool, optional | false | Remove ProgPow from the block policy on a test network. See the block policy |
run_test_miner | bool, optional | false | Built-in miner, Cuckoo only. Mining a chain takes Stratum and an external miner. See run a local network |
test_miner_wallet_url | string, optional | unset | Wallet listener that receives the test miner's coinbase. Unset falls back to http://127.0.0.1:13415 |
On mainnet only skip_pow_validation matters. Left at true, proof of work is skipped for blocks up to
the last checkpoint, at height 3,710,000, and fully verified for every block above
it. disable_checkpoints widens that only on a test network. See
node and wallet setup for what each one skips.
[server.p2p_config]
| Key | Type | Default | Purpose |
|---|---|---|---|
host | IP | 0.0.0.0 | Interface to listen on. 127.0.0.1 restricts to local |
port | u16 | 3414, 13414 floonet, 23414 usernet | P2P listen port |
seeding_type | enum | DNSSeed, None on usernet | None, List, DNSSeed, Programmatic. DNSSeed queries node.epiccash.com:3414 on mainnet and floonet.epiccash.com:13414 on floonet. See networks for when to use List |
seeds | array of ip:port, optional | unset in code, four addresses in the generated file | Used when seeding_type = "List". Startup fails if that type is set with no list |
capabilities | u32 flags | 31 | What the node advertises. See the bit table below |
peer_min_preferred_outbound_count | u32, optional | 4 | Outbound peers the node keeps trying to reach, and the count it must reach before the sync state leaves AwaitingPeers. Absent from the generated file. Set 0 on a private chain, where the Stratum server otherwise refuses work |
peers_allow | array, optional | unset | Connect only to these peers |
peers_deny | array, optional | unset | Never connect to these peers |
peers_preferred | array, optional | unset | Preferred peers, actively dialled |
ban_window | seconds, optional | 10800 | How long a banned peer stays banned |
peer_max_inbound_count | u32, optional | 128 | Maximum inbound peers |
peer_max_outbound_count | u32, optional | 128 | Maximum outbound peers |
peer_listener_buffer_count | u32, optional | 8 | Slack above the inbound limit, to help bootstrapping. Also caps how many inbound handshakes can be pending at once, one per IP address |
dandelion_peer | ip:port, optional | unset | Pinned Dandelion relay |
my_onion_addr | string, optional | unset | This node's own onion address |
The four addresses the generated file writes
(config/src/comments.rs:273):
seeds = ["95.217.197.180:3414","5.161.127.56:3414","5.75.242.4:3414","5.78.71.29:3414"]
Capability bits:
| Bit | Value | Meaning |
|---|---|---|
HEADER_HIST | 1 | Serves header history |
TXHASHSET_HIST | 2 | Serves txhashset history |
PEER_LIST | 4 | Serves peer lists |
TX_KERNEL_HASH | 8 | Serves kernel hashes |
HEADER_FASTSYNC | 16 | Supports fast header sync |
ONIONSTEM | 32 | Supports stem transactions over an onion route |
The default of 31 is every bit except ONIONSTEM.
[server.pool_config]
| Key | Type | Default | Purpose |
|---|---|---|---|
accept_fee_base | u64 | 100000 | Minimum fee per unit of transaction weight for pool acceptance |
max_pool_size | usize | 50000 | Maximum transactions in the main pool |
max_stempool_size | usize | 50000 | Maximum transactions in the stempool |
mineable_max_weight | usize | 40000, 150 on usernet and automated testing | Maximum total weight a miner packs into a block |
[server.dandelion_config]
| Key | Type | Default | Purpose |
|---|---|---|---|
epoch_secs | u16 | 600 | Length of one Dandelion epoch |
embargo_secs | u16 | 180 | Fluff a stemmed transaction if it is not seen before this expires |
aggregation_secs | u16 | 30 | Aggregation window before relaying |
stem_probability | u8 percent | 90 | Probability of stem mode for an epoch |
always_stem_our_txs | bool | true | Always stem transactions submitted through our own API |
[server.stratum_mining_config]
| Key | Type | Default | Purpose |
|---|---|---|---|
enable_stratum_server | bool, optional | false on every network | Run the Stratum server. A generated config carries false whichever network it is for |
stratum_server_addr | string, optional | 127.0.0.1:3416 | Stratum listen address |
attempt_time_per_block | seconds | 15 | How long to mine one header before rebuilding it |
cuckatoo_minimum_share_difficulty | u64 | 3 | Minimum share difficulty for Cuckatoo workers |
randomx_minimum_share_difficulty | u64 | 4000, 1 on usertesting | Minimum share difficulty for RandomX workers |
progpow_minimum_share_difficulty | u64 | 200000 | Minimum share difficulty for ProgPow workers |
wallet_listener_url | string | http://127.0.0.1:3415 | Wallet listener that receives coinbase rewards |
burn_reward | bool | false | Discard the block reward instead of paying a wallet. Test only |
Keep the [server.stratum_mining_config] section present and set enable_stratum_server = false to
disable mining. See Stratum for the protocol.
[server.webhook_config]
| Key | Type | Default | Purpose |
|---|---|---|---|
tx_received_url | string, optional | unset | POST target when a transaction arrives from a peer |
header_received_url | string, optional | unset | POST target when a header arrives |
block_received_url | string, optional | unset | POST target when a block arrives |
block_accepted_url | string, optional | unset | POST target when this node accepts a block, including reorgs |
nthreads | u16 | 4 | Worker threads for webhook delivery |
timeout | seconds | 10 | HTTP request timeout |
[server.tor]
| Key | Type | Default | Purpose |
|---|---|---|---|
socks_proxy_addr | string | 127.0.0.1:9050 | SOCKS proxy address, written into the generated torrc |
send_config_dir | string | . | Directory for torrc, data/ and onion service addresses |
Onion stem routing also needs capabilities to include the ONIONSTEM bit, value 32, which the
default of 31 excludes.
[logging]
| Key | Type | Default | Purpose |
|---|---|---|---|
log_to_stdout | bool | true | Log to stdout |
stdout_log_level | enum | Info | Error, Warning, Info, Debug, Trace |
log_to_file | bool | false | Log to a file |
file_log_level | enum | Debug | Level for the file log |
log_file_path | string | ~/.epic/main/epic-server.log | Log file path |
log_file_append | bool | true | Append rather than truncate on each run |
log_max_size | bytes, optional | 16777216 | Rotate above this size. Comment out to disable rotation |
log_max_files | u32, optional | 32 | How many rotated files to keep |
tui_running | bool, optional | unset | Set from run_tui at startup |
A fresh node writes no log file, because log_to_file is false while log_file_path is populated.
Set log_to_file = true for a log on disk.
Source
These values come from the configuration structs and their defaults:
servers/src/common/types.rsfor[server],[server.webhook_config]and[server.tor]p2p/src/types.rsfor[server.p2p_config]pool/src/types.rsfor[server.pool_config]and[server.dandelion_config]util/src/logger.rs:65for[logging], shared with the walletconfig/src/comments.rsfor the annotated template written to diskconfig/src/config.rsfor file discovery and path rewriting