Skip to main content

Set up a node and wallet for mainnet

Mainnet is real value. Everything here assumes you have already done the local chain in run a local network and your first transfer, because the mechanics are identical and the consequences are not.

Two processes. A node that validates and relays the chain, and a wallet that holds keys and asks the node about the state of the world. You need a node. You do not need to mine.

1. Start the node​

Mainnet is the default network, so there is no flag:

epic

The node writes epic-server.toml on first run and reads it from then on. Editing that file is the normal way to change behaviour, because most settings exist only as config keys, not as command-line flags. Every key needs a restart.

Confirm it is up. The owner surface is authenticated and the secret is created for you:

curl -s -u epic:$(cat ~/.epic/main/.api_secret) -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"get_status","params":[],"id":1}' \
http://127.0.0.1:3413/v2/owner

The first sync downloads and validates the whole chain. Expect it to take a while and to use real disk.

Ports​

PortPurposeDefault binding
3413HTTP API127.0.0.1
3414P2PAll interfaces
3416Stratum mining server127.0.0.1, off by default

Only the P2P port needs to be reachable from outside. Leave the API on loopback and read authentication and TLS before changing that. Every port and network offset is in the CLI reference.

Sync validation settings​

skip_pow_validation defaults to true and disable_checkpoints to false. Skipping proof of work inside the checkpointed range is a sync speed optimisation rather than a weakened default: the skipped range ends at a hardcoded checkpoint whose hash must match, and every header in it links back to that checkpoint. Only the headers at the 13 checkpoint heights are compared by hash; the ones between them are not.

Where the block sitsValidation performed on mainnet
Inside the checkpointed range, up to height 3,710,000A header at a checkpoint height is compared against the hardcoded hash, and a mismatch aborts sync. Proof of work skipped while skip_pow_validation is true
Above the last checkpointFull proof of work, always, whatever these settings say

A header batch counts as checkpointed only if every header in it does.

There are 13 checkpoints compiled into the node, in chain/src/types.rs:432. The code is check_header_against_checkpoints(), the skip decision is should_skip_pow(), and the node logs which policy applies when it starts on mainnet.

disable_checkpoints is ignored on mainnet. On a test network, with skip_pow_validation also true, it extends the skipping past the last checkpoint for blocks more than 1,000 below the tip (POW_VERIFICATION_THRESHOLD).

Set skip_pow_validation = false to verify all historical proof of work yourself. That costs a much longer initial sync.

What the node stores​

chain_data, the config file, log files and the API secret. chain_data is the large item and it is disposable, so deleting it costs a resync and nothing else. A node holds no keys, so nothing in its data directory needs backing up.

2. Create the wallet​

epic-wallet init

You will be asked to set a password and shown a recovery phrase.

Write the recovery phrase down before continuing

The phrase is the only thing that can reconstruct your funds. It is shown once here, and afterwards only by epic-wallet recover, which needs the password.

CommandEffect
epic-wallet initCreate a wallet in the default location, ~/.epic/main
epic-wallet init -wCreate it in the current directory. The flag takes no value
epic-wallet init -rRestore from an existing recovery phrase

init -r refuses to run if a seed file already exists, so restoring into a directory that already holds a wallet means moving that wallet aside first. See back up and restore.

Turn off the Tor listener​

The wallet defaults use_tor_listener to true and expects a Tor binary that the release archives do not ship, so epic-wallet listen starts a background thread that fails. Two ways to switch it off, and one of them is per command:

epic-wallet.toml
[tor]
use_tor_listener = false
epic-wallet listen -n

-n is declared on listen only (src/cmd/wallet_args.rs:123), so it has to be repeated on every listen. The config key applies to every command in that wallet directory and is the setting to prefer. Neither affects Tor use by the node.

What the wallet stores​

Back up and restore lists every file in a wallet directory, what it holds, and whether it needs backing up. The recovery phrase reconstructs your funds but not your history. Transaction records, account labels and payment proof records live only in the database and nothing on the chain can rebuild them.

Ports the wallet opens​

epic-wallet listen opens the Foreign API on 3415 and epic-wallet owner_api opens the Owner API on 3420. The Foreign port is derived from the network; the Owner port is 3420 on every network, so a second wallet on the same machine collides there whatever chain it runs. Override owner_api_listen_port. Full list in the CLI reference.

3. Point the wallet at the node​

The wallet defaults to a node on loopback at port 3413. Nothing to configure.

The wallet's calls go to node surfaces that need no credential, so moving either directory does not break it. node_api_secret_path matters only for the Tor onion-address lookup; see the credential the wallet presents to the node. If you want a different node, set check_node_api_http_addr in epic-wallet.toml.

epic-wallet info

A balance of zero and no error means the wallet reached the node and the node answered. A 401 means the node has a foreign_api_secret_path set, which epic-wallet 4.1.0 cannot work with. Going by the code, a node older than 4.1.0 with an API secret would also answer 401; that pairing has not been tested.

A wallet pointed at a public node works. That node sees which outputs the wallet asks about, and the wallet does not validate the chain state it is given.

Next​