Validators
Testnet
Setup
Engine Settings

Engine Settings

We need to create the engine config file.

sudo mkdir -p /etc/chainflip/config
sudo nano /etc/chainflip/config/Settings.toml

Editing the Config

Copy the following to your nano editor. You also need to replace IP_ADDRESS_OF_YOUR_NODE with the public IP Address of your server. To get the public IP of your node you can run this command: curl -w "\n" ifconfig.me.

Also you'll need to provide the eth.rpc.ws_endpoint, eth.rpc.http_endpoint, arb.rpc.ws_endpoint, and arb.rpc.http_endpoint for whichever Ethereum client and Arbitrum client you've selected. It will look different depending on which client you select:

Ethereum

  • Rivet - wss://SOME_LONG_SECRET_INFORMATION.sepolia.ws.rivet.cloud
  • Infura - wss://sepolia.infura.io/ws/v3/SOME_LONG_SECRET_INFORMATION
  • Alchemy - wss://eth-sepolia.g.alchemy.com/v2/SOME_LONG_SECRET_INFORMATION

Arbitrum

  • Infura - wss://arbitrum-sepolia.infura.io/ws/v3/SOME_LONG_SECRET_INFORMATION
  • Alchemy - wss://arb-mainnet.g.alchemy.com/v2/SOME_LONG_SECRET_INFORMATION

Make sure that both endpoints (HTTP and WebSockets) are accessible for the Ethereum, Arbitrum and Polkadot nodes. Bitcoin only has HTTP. Otherwise your engine will fail to start.

Note that you can optionally provide a backup RPC endpoint for each chain. If the primary endpoint fails, the engine will attempt to connect to the backup endpoint. The engine will only attempt to use the backup endpoint if the primary endpoint fails. You should set your primary endpoint to the cheapest (and most reliable) endpoint you have i.e. a local geth node to lower your operating costs.

# Default configurations for the CFE
[node_p2p]
node_key_file = "/etc/chainflip/keys/node_key_file"
ip_address = "IP_ADDRESS_OF_YOUR_NODE"
port = "8078"
 
[state_chain]
ws_endpoint = "ws://127.0.0.1:9944"
signing_key_file = "/etc/chainflip/keys/signing_key_file"
 
[eth]
# Ethereum private key file path. This file should contain a hex-encoded private key.
private_key_file = "/etc/chainflip/keys/ethereum_key_file"
 
[eth.rpc]
ws_endpoint = "wss://my_local_geth_node:8546"
http_endpoint = "https://my_local_geth_node:8545"
 
# Optional
# [eth.backup_rpc]
# ws_endpoint = "wss://some_public_rpc.com:443/<secret_access_key>"
# http_endpoint = "https://some_public_rpc.com:443/<secret_access_key>"
 
[dot.rpc]
ws_endpoint = "wss://rpc-pdot.chainflip.io:443"
http_endpoint = "https://rpc-pdot.chainflip.io:443"
 
# Optional
# [dot.backup_rpc]
# ws_endpoint = "wss://rpc-pdot2.chainflip.io:443"
# http_endpoint = "https://rpc-pdot2.chainflip.io:443"
 
[btc.rpc]
basic_auth_user = "flip"
basic_auth_password = "flip"
http_endpoint = "https://testnet.rpc.btc.chainflip.io"
 
# Optional
# [btc.backup_rpc]
# basic_auth_user = "flip2"
# basic_auth_password = "flip2"
# http_endpoint = "http://second-node-424380952.eu-central-1.elb.amazonaws.com"
 
[arb]
# Arbitrum private key file path. This file should contain a hex-encoded private key.
# Note: You could use the same private key file as Ethereum if you want to use the same key for both chains.
# This is up to you.
private_key_file = "/etc/chainflip/keys/arbitrum_key_file"
 
[arb.rpc]
ws_endpoint = "ws://my_local_arbitrum_node:8548"
http_endpoint = "http://my_local_arbitrum_node:8547"
 
# optional
#[arb.backup_rpc]
#ws_endpoint = "ws://my_arbitrum_node_backup.someprovider/<secret_access_key>"
#http_endpoint = "http://my_arbitrum_node_backup.someprovider/<secret_access_key>"
 
# Optional (default: 36079)
# [logging]
# command_server_port = 36079
 

At least one of the RPC endpoints (primary or backup) must be an archive node.

Pointing to the Ethereum Client

If you followed the instructions in Prerequisites, you will probably have an account with an Ethereum RPC provider (Alchemy, Infura, Rivet, etc.). You must change the eth.rpc.ws_endpoint and eth.rpc.http_endpoint in the above file to RPC URLs given to you by these services. You must have both a Websocket (wss) and HTTPS connection in order for the software to function.

Important: Make sure that you are not using a mainnet RPC, this will not work!

You can try other node connections as well. Geth with an open websocket server enabled (opens in a new tab) will accept connections through port 8546 by default. If it's running on the same machine as your validator, you can use [ws|http]://127.0.0.1:854[6|5]

Pointing to the Arbitrum Client

If you followed the instructions in Prerequisites, you will probably have an account with an Arbitrum RPC provider (Alchemy, Infura, Rivet, etc.). You must change the arb.rpc.ws_endpoint and arb.rpc.http_endpoint in the above file to RPC URLs given to you by these services. You must have both a Websocket (wss) and HTTPS connection in order for the software to function.

Important: Make sure that you are not using a mainnet RPC, this will not work!

Saving the File

Once you're happy with your configuration file and have inserted a valid endpoint address, exit and save the file by using CTRL(Control)+x and when prompted type Y then hit Enter.