Skip to main content
Version: Next

Run SPC Validator

Validator Hardware Requirements

Mainnet

  • Instance Spec:
    • Suggest i7i.8xlarge or i7ie.6xlarge instance type on AWS (better to disable HyperThread, which could have 10%+ performance gain).
    • or other instance spec to meet >=400 mgasps
  • Memory: 128 GB
  • Disk: IMPORTANT 7TB, NVMe SSD, 40k IOPS, 500 MB/S throughput, read latency <1ms.
  • Network Bandwidth: >= 512 Mbps

Testnet

  • CPU: "AMD Gen 3 or newer" or "Intel Ice Lake or newer"
  • Memory: 16 GB
  • Disk: 1.5 TB, solid-state drive(SSD), gp3, 8k IOPS, 250 MB/S throughput.
  • Network Bandwidth: >= 128 Mbps

Setup Validator Node

1. Install SPC Fullnode

Follow the instructions here to set up a full node.

2. Prepare Accounts

Two accounts require preparation before running a validator: the Consensus account and the BLS Vote account. Ensure these accounts match the corresponding ones when creating a new validator.

Generate Consensus Address

To create a new mining consensus account, run this command and set a password for the account:

geth account new --datadir ${DATA_DIR}
  • DATA_DIR: Where your key store files are saved.

If you already have a consensus account, skip this step. Save the password in a file named password.txt:

echo {your-password for the consensus account} > password.txt

Generate BLS Vote Address

To set up a new BLS account, use this command:

geth bls account new --datadir ${DATA_DIR}
  • DATA_DIR: The directory to store your key store files.

If you already have a BLS vote key, you can create a BLS wallet and recover it with the keyfile using:

geth bls account import ${KEY_FILE} --datadir ${DATA_DIR}

To retrieve your bls address, run:

geth bls account list --datadir ${DATA_DIR}

Save the password in a file named blspassword.txt:

echo {your-password for the BLS wallet} > blspassword.txt

3. Start Validator Node

Warning: Please do not expose your RPC endpoints to public network!

Start your validator using the command line below:

geth --config ./config.toml --datadir ./node --syncmode snap -unlock {accounts to sign txs, including your mining account at least} --miner.etherbase {the address of your mining account} --password password.txt --blspassword blspassword.txt --mine --vote --allow-insecure-unlock --cache 18000

Post Running

1. Monitor node status

To get started quickly, run GethExporter in a Docker container.

docker run -it -d -p 9090:9090 \
-e "GETH=http://mygethserverhere.com:8545" \
hunterlong/gethexporter

2. Stop Validating

You can stop mining new blocks by sending commands in geth console

Connect to your validator node with geth attach ipc:path/to/geth.ipc

miner.stop()

To resume validating,

miner.start()

Some Tips & Tools

1.Run backup node

Backup node could help when your primary validator node encounters issues due to a variety of potential reasons, ensuring the continuity and reliability of your participation in the network.

2.About maintenance mode

Should your validator incur 50 slashes, it will automatically transition into maintenance mode. It is imperative to promptly diagnose and rectify any issues with your node to prevent further penalties. Failure to do so may result in your node being placed in a more restrictive state, often referred to as "jail."

Upon successfully restoring your node's functionality, it is crucial to promptly exit maintenance mode to resume normal operations and avoid any unnecessary downtime or penalties.

// note: replace "0x75B851a27D7101438F45fce31816501193239A83" with your validator's consensus address.
geth attach geth.ipc
web3.eth.sendTransaction({ from: "0x75B851a27D7101438F45fce31816501193239A83", to: "0x0000000000000000000000000000000000001000", data: "0x04c4fec6"})