Skip to content

0Spin-Nodes/kwil_node_guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Run a Validator Node on Kwil


Prerequisites

Before setting up your Kwil validator node, ensure you have the following:

System Requirements:

  • Operating System: Linux-based OS (Ubuntu 20.04+ preferred)
  • CPU: 4+ cores
  • RAM: 8 GB or higher
  • Storage: SSD with at least 200 GB free space
  • Network: Stable internet connection with at least 1 Gbps bandwidth

Tools & Software:

  • Docker and Docker Compose installed
  • Git
  • Basic familiarity with Linux terminal commands

Step 1: Install Dependencies

First, update your system and install required dependencies.

sudo apt update && sudo apt upgrade -y
sudo apt install -y curl git docker.io docker-compose

Verify that Docker is installed and running:

docker --version
sudo systemctl enable docker
sudo systemctl start docker

Step 2: Clone the Kwil Node Repository

Kwil provides the necessary code to run a node through its GitHub repository. Clone the repository:

git clone https://github.com/kwil-team/kwil-node.git
cd kwil-node

Step 3: Configuration

3.1 Generate a Key Pair

To run a validator, you’ll need a public-private key pair. The public key is used to register your validator on the network, while the private key is used to sign blocks.

Kwil provides a tool for generating keys. Run the following command to create your key pair:

docker run -it --rm kwil/kwil-node generate-keys

This will output a public key and a private key. Save these keys securely. Do not share your private key.


3.2 Edit Configuration File

The kwil-node repository includes a default configuration file. You will need to edit it to include your public key and other settings.

Open the configuration file:

nano config/config.yaml

Update the following fields:

  • public_key: Add your validator's public key here.
  • network: Choose the appropriate network (mainnet, testnet, or devnet).
  • port: Ensure the port you choose is open and not in use by another application.

Save and exit the file (Ctrl+O, then Ctrl+X).


Step 4: Start the Validator Node

4.1 Build and Run the Node

Use Docker Compose to build and run the node:

docker-compose up --build -d

This command will:

  • Build the Docker container for the Kwil validator.
  • Start the validator node in the background.

4.2 Check Node Logs

To ensure your node is running correctly, check the logs:

docker logs -f kwil-node

Look for messages indicating successful connection to peers and block validation activity.


Step 5: Register Your Validator

Once your node is operational, register it with the Kwil network.

  1. Visit the Kwil dashboard or CLI interface for validator registration.
  2. Provide your public key, node's IP address, and port.
  3. Follow the prompts to complete registration.

Step 6: Monitor and Maintain Your Node

Running a validator node requires consistent monitoring to ensure uptime and performance. Use the following commands to manage your node:

Check Status:

docker ps

Restart Node:

docker-compose restart

Update Node:

When a new version of the Kwil software is released, update your node by pulling the latest changes and rebuilding the Docker image:

git pull
docker-compose down
docker-compose up --build -d

View Logs:

docker logs -f kwil-node

Optional: Set Up Alerts and Metrics

For a professional validator setup, integrate monitoring tools such as Prometheus and Grafana. Kwil may provide prebuilt dashboards for tracking node performance.


Troubleshooting

Here are common issues you might encounter and how to resolve them:

  • Port Unavailable: Ensure the port specified in config.yaml is open using ufw or another firewall tool.

    sudo ufw allow <port>
  • Syncing Issues: If your node cannot sync, ensure your configuration matches the correct network (mainnet/testnet).

  • High Resource Usage: Verify your hardware meets the recommended requirements.


By following this guide, you should have a fully operational validator node on the Kwil network. Good luck, and thank you for contributing to the decentralization and security of Kwil!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors