Node

Step 1: Download a binary file.

curl -L https://github.com/CascadiaFoundation/cascadia/releases/download/v0.3.0/cascadiad -o cascadiad

The latest cascadiad binary release can also be found on GitHub.

sudo chmod u+x cascadiad
sudo cp cascadiad /usr/local/bin/cascadiad

Below, replace <username> with your own account name.

sudo chown <username> /usr/local/bin/cascadiad

For example, we use the name ubuntu. If you're using Google Cloud, replace the name ubuntu with your account name.

sudo chown ubuntu /usr/local/bin/cascadiad

Step 2: To confirm that the installation has succeeded, run:

cascadiad version

Step 3: Initialize the chain.

Replace [moniker] with your own name and initialize cascadiad.

cascadiad init [moniker] --chain-id cascadia_11029-1

Moniker will be the displayed id of your node when connected to Cascadia. When providing a moniker name, drop the square brackets.

For example:

cascadiad init mynode --chain-id cascadia_11029-1

Step 4: Download the genesis file.

Download and replace the Cascadia Testnet genesis.json by:

curl -LO https://github.com/CascadiaFoundation/chain-configuration/blob/master/testnet/genesis.json
cp genesis.json ~/.cascadiad/config/

Step 5: Set persistent peers.

Persistent peers allow your node to connect to other nodes and join the network.

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$(curl  https://raw.githubusercontent.com/CascadiaFoundation/chain-configuration/master/testnet/persistent_peers.txt)\"/" ~/.cascadiad/config/config.toml

Step 6: Set minimum gas price.

In ~/.cascadiad/config/app.toml, update the min gas price to avoid transaction spam.

sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.0025aCC\"/" ~/.cascadiad/config/app.toml

Step 7: Sync your node to the network.

There are three main ways to sync a node to the network:

  1. Upgrade your existing node.

After completing one of the above, continue with Step 8.

Step 8: Create systemd service file.

sudo nano /etc/systemd/system/cascadiad.service

Step 9: Copy/paste the following configuration, save, and exit.

Replace <username> with your own account name.

[Unit]
Description=Cascadia Node
After=network.target
 
[Service]
Type=simple
User=<username>
WorkingDirectory=/usr/local/bin
ExecStart=/usr/local/bin/cascadiad start --trace --log_level info --json-rpc.api eth,txpool,personal,net,debug,web3 --api.enable
Restart=on-failure
StartLimitInterval=0
RestartSec=3
LimitNOFILE=65535
LimitMEMLOCK=209715200
 
[Install]
WantedBy=multi-user.target

In the following example, our <username> is ubuntu:

[Unit]
Description=Cascadia Node
After=network.target
 
[Service]
Type=simple
User=ubuntu
WorkingDirectory=/usr/local/bin
ExecStart=/usr/local/bin/cascadiad start --trace --log_level info --json-rpc.api eth,txpool,personal,net,debug,web3 --api.enable
Restart=on-failure
StartLimitInterval=0
RestartSec=3
LimitNOFILE=65535
LimitMEMLOCK=209715200
 
[Install]
WantedBy=multi-user.target

Press ctrl + s to save, then ctrl + x to exit.

Step 10: Start your Node.

# reload service files
sudo systemctl daemon-reload
# create the symlink
sudo systemctl enable cascadiad.service
# start the node
sudo systemctl start cascadiad.service
# show logs
journalctl -u cascadiad -f

Last updated