...

Chainflip - Setup Guide

Rent servers

Creating a folder and uploading Chainflip GPG keys

sudo mkdir -p /etc/apt/keyrings
curl -fsSL repo.chainflip.io/keys/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/chainflip.gpg

Checking the key

gpg --show-keys /etc/apt/keyrings/chainflip.gpg

Adding ChainFlip to apt for a quick update

echo "deb [signed-by=/etc/apt/keyrings/chainflip.gpg] https://repo.chainflip.io/perseverance/ focal main" | sudo tee /etc/apt/sources.list.d/chainflip.list

Update and install ChainFlip

sudo apt-get update
sudo apt-get install -y chainflip-cli chainflip-node chainflip-engine

Create a new metamask and connect it to the Goerli test network

Now we need a private key from your Metamask

Insert it in place of YOUR_PRIVATE_KEY

echo -n "YOUR_PRIVATE_KEY" | sudo tee /etc/chainflip/keys/ethereum_key_file

Generate access keys

chainflip-node key generate

Copy "Secret seed" and paste in the place of "YOUR_CHAINFLIP_SECRET_SEED"

SECRET_SEED=YOUR_CHAINFLIP_SECRET_SEED

Create a key

echo -n "${SECRET_SEED:2}" | sudo tee /etc/chainflip/keys/signing_key_file

Generate a key for the node

sudo chainflip-node key generate-node-key --file /etc/chainflip/keys/node_key_file

Create a folder for the configurator

sudo mkdir -p /etc/chainflip/config

Open the configurator

sudo nano /etc/chainflip/config/Default.toml

Before inserting the command into the console, replace - "ip_address", "ws_node_endpoint", "http_node_endpoint"

To create endpoint go to the Alchemy

# 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 RPC endpoints (websocket and http for redundancy).
ws_node_endpoint = "wss://SOME_LONG_SECRET_INFORMATION"
http_node_endpoint = "https://SOME_LONG_SECRET_INFORMATION"
         
# Ethereum private key file path. This file should contain a hex-encoded private key.
private_key_file = "/etc/chainflip/keys/ethereum_key_file"
             
[signing]
db_file = "/etc/chainflip/data.db"

Starting a node

sudo systemctl start chainflip-node

Checking a node

sudo systemctl status chainflip-node

Check synchronization

tail -f /var/log/chainflip-node.log

After that, start the Engine

sudo systemctl start chainflip-engine

And check, it should be active

sudo systemctl status chainflip-engine

Go to the Chainflip website and connect Metamask

Click on "Add node"

For "Add node" you need to have at least 10 FLIP

You can get them through the tFLIP Marketplace

Registration in the terminal

sudo chainflip-cli \
--config-path /etc/chainflip/config/Default.toml \
register-account-role Validator
sudo chainflip-cli \
--config-path /etc/chainflip/config/Default.toml \
activate
sudo chainflip-cli \
--config-path /etc/chainflip/config/Default.toml rotate

Naming a node

sudo chainflip-cli \
--config-path /etc/chainflip/config/Default.toml \
vanity-name NAME_NODE

You can check the node logs with the command:

tail -f /var/log/chainflip-node.log

Restart node:

sudo systemctl restart chainflip-node

Check your node status:

sudo systemctl status chainflip-node

Restart engine:

sudo systemctl restart chainflip-engine

Check your engine status:

sudo systemctl status chainflip-engine