Skip to content

Latest commit

 

History

History
289 lines (220 loc) · 6.5 KB

README.md

File metadata and controls

289 lines (220 loc) · 6.5 KB

Perseverance-Chainflip

Chainflip

Minimum specification

  • OS : Ubuntu 20.04 (PLEASE ONLY USE THIS VERSION)

  • CPU : 4 Cores

  • RAM : 8 GB

  • Disk : 50 GB (may increase overtime)

  • Bandwith: 1GBps connection (recommended), 100 GB bandwidth combined up/down per month

    Prerequisites

  • Discord

  • Website

  • Twitter

  • Telegram

  • Official docs

1. Open Port 30333 & 8078

sudo ufw allow ssh & sudo ufw allow 30333 && sudo ufw allow 8078 && sudo ufw enable

2. Add User

a. create flip user with this command:

sudo useradd -s /bin/bash -d /home/flip/ -m -G sudo flip 

b. add password for flip user

sudo passwd flip

c. create directory & give permission

mkdir /home/flip/.ssh
sudo chown -R flip:flip /home/flip/.ssh/
sudo chmod 0700 /home/flip/.ssh/

d. move to flip user

su - flip

3. Download & Install Chainflip

a. download 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

verify the keys with command

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

*if it run properly, output will be:

chengflip2

b. add chainflip

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

c. install Chainflip

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

4. Wallet Configuration & Faucet

(prefer use new wallet)

a. create key directory

sudo mkdir /etc/chainflip/keys

b. create key's file

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

replace YOUR_PRIVATE_KEY with your Metamask wallet private key

c. request faucet

Goerli:

FLIP Token:

  • Join Chainflip Discord, go to #join-testnet channel and click the button, then go to #faucet channel and use command !drip <your_address>

d. create node key

chainflip-node key generate

Save all output in the safe place for backup

e. save signing key

create

SECRET_SEED=<YOUR_SECRET_SEED>
  • replace <YOUR_SECRET_SEED> with your secret seed from step before

save

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

f. generate node key

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

g. give permission

sudo chmod 600 /etc/chainflip/keys/ethereum_key_file
sudo chmod 600 /etc/chainflip/keys/signing_key_file
sudo chmod 600 /etc/chainflip/keys/node_key_file
history -c

BACKUP keys file (location: ```/etc/chainflip/keys/)

5. Create edit Configuration

a. create directory

sudo mkdir -p /etc/chainflip/config

b. create file

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

c. create config

# Default configurations for the CFE
[node_p2p]
node_key_file = "/etc/chainflip/keys/node_key_file"
ip_address="YOUR_IP_ADDRESS"
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 = "YOUR_WSS_ENDPOINT"
http_node_endpoint = "YOUR_HTTPS_ENDPOINT"

# 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"

replace:

  • YOUR_IP_ADDRESS : your VPS IP
  • YOUR_WSS_ENDPOINT : your goerli wss endpoint from Alchemy/Infura
  • YOUR_WSS_ENDPOINT : your goerli https endpoint from Alchemy/Infura

Save file Ctrl + X and press Y then Enter

6. Start Node

a. start

sudo systemctl start chainflip-node

b. check status

sudo systemctl status chainflip-node

output will be like this:

chengflip3

exit Ctrl + C

c. check logs

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

MAKE SURE YOUR NODE IS SYNCED WITH LATEST BLOCK BEFORE CONTIINUE TO THE NEXT STEP

synced node output will be like:

chengflip5

7. Start Engine

a. start engine

sudo systemctl start chainflip-engine

b. check status

sudo systemctl status chainflip-engine

make sure its active, output will be like:

chengflip6

8. Enable Node & Engine

a. enable Node

sudo systemctl enable chainflip-node

b. enable Engine

sudo systemctl enable chainflip-engine

9. Stake

  • Visit Web dashboard https://stake-perseverance.chainflip.io/
  • Connect your Metamask, use your wallet that used before
  • Click My Node
  • +Add Node
  • Input your public key(SS58) in step 4.d before.
  • Stake your FLIP Token for your Node

chengflep1

10. Register & Activate

a. register

Make sure your staked FLIP token confirmed and visible on the website before Register

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

press Y then Enter

b. activate

sudo chainflip-cli \
    --config-path /etc/chainflip/config/Default.toml \
    activate

c. join rotate for next auction

sudo chainflip-cli \
    --config-path /etc/chainflip/config/Default.toml rotate

d. change your Node name

sudo chainflip-cli \
    --config-path /etc/chainflip/config/Default.toml \
    vanity-name <YOUR_NODE_NAME>

*replace <YOUR_NODE_NAME> with your Node name

All Set!

you can check your Node status on Chainflip Website