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 and disable_checkpoints both default to true. That is a sync speed optimisation rather than a weakened default.

Where the block sitsValidation performed
Inside a checkpointed rangeHeader hash compared against a hardcoded checkpoint. A mismatch aborts sync. Proof of work skipped
Past the checkpoints, more than 1,000 blocks behind the tipProof of work skipped
Within 1,000 blocks of the tipFull proof of work, always, regardless of these settings

There are 12 checkpoints compiled into the node, in chain/src/types.rs:432. The code is check_header_against_checkpoints(), the skip decision is at servers/src/common/adapters.rs:728, and the floor is POW_VERIFICATION_THRESHOLD.

Set both to 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, and in the default layout it resolves the node's API secret to the same file the node created. Nothing to configure.

Two things change that. If you moved either directory, set node_api_secret_path to 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 two disagree about the secret.

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