Skip to content

Run a Bitgold full node

About

A full node stores the full world state on disk and is able to:

  • handle new transactions and produce new blocks, so it can also be used as a validator node;
  • execute and validate newly received blocks;
  • verify the state of every account, because it holds the full world state.

The Bitgold node is a Geth-based client. Bitgold node releases, genesis.json, config.toml, and chain snapshots are distributed through the official Bitgold Network channels — see www.bitgold.network. Download the build for your platform and keep the binary (geth) in your working directory.

Tip

If you want high performance and care little about state consistency, you can run a fast node, which is a full node started with --tries-verify-mode none. See Fast Node for details.

Supported platforms

The Bitgold node runs on Linux, macOS, and Windows.

Setup

There are two ways to set up a full node:

  • From a snapshot (recommended): download the latest chaindata snapshot and sync from it.
  • From genesis: sync the whole Bitgold chain from the genesis block. This takes considerably more time and disk I/O.

1. Obtain the node binary and config files

Download the Bitgold node binary for your platform, plus the genesis.json and config.toml for the network you want to join (mainnet or testnet), from the official Bitgold Network distribution channel. Put the config files next to the binary.

Download the latest chaindata snapshot published by the Bitgold team and extract it into the data directory you will pass to --datadir.

3. Start the node

## Replace <datadir> with the path to your data directory.
./geth --config ./config.toml --datadir <datadir> \
  --cache 10000 --rpc.allow-unprotected-txs \
  --history.transactions 0 --history.logs 576000

Note: Consider adding --history.logs.disable for better performance, but eth_getLogs will be slower.

4. Monitor the node

The node writes its log under the data directory. Once syncing starts you should see entries like:

lvl=info msg="Imported new chain segment" blocks=1 txs=177 mgas=17.317 elapsed=31.131ms number=21,153,429 hash=0x42e6... dirty="0.00 B"

Sync modes

Two sync modes are available and can be selected with --syncmode:

  • snap — initial sync downloads the latest state instead of executing every block from genesis; after the initial sync it switches to full sync automatically.
  • full — executes all blocks since genesis. This is not recommended for an initial sync because of the size of historical data; start from a snapshot instead.

If --syncmode is not provided, the default depends on the state of the data directory: snap when syncing from genesis, full when starting from a snapshot.

Local private network

To run a local private network for development, use the Bitgold node with your own genesis file and a dedicated data directory. Keep the network isolated from mainnet (separate ports and --nodiscover), and never reuse validator keys from a public network.

Operations