|
| 1 | +# Joining TRUF.NETWORK Testnet (testnet-v1) |
| 2 | + |
| 3 | +This directory contains the configuration files required to join the TRUF.NETWORK testnet. |
| 4 | + |
| 5 | +## Network Information |
| 6 | + |
| 7 | +- **Chain ID**: `testnet-v1` |
| 8 | +- **Genesis File**: `genesis.json` (in this directory) |
| 9 | +- **Bootnodes**: See `network-nodes.csv` |
| 10 | + |
| 11 | +## Quick Start |
| 12 | + |
| 13 | +To initialize your node configuration and join the testnet, follow these steps: |
| 14 | + |
| 15 | +### 1. Prerequisites |
| 16 | +- Install `kwild` (v0.10.3+) |
| 17 | +- Install `docker` (to run the database) |
| 18 | +- Install `postgresql-client-16` (for state sync) |
| 19 | + |
| 20 | +### 2. Start PostgreSQL |
| 21 | + |
| 22 | +Kwil requires a PostgreSQL database to store state. Run the pre-configured Kwil Postgres image: |
| 23 | + |
| 24 | +```bash |
| 25 | +docker run -d --name tn-db-postgres \ |
| 26 | + -p 5432:5432 \ |
| 27 | + -e "POSTGRES_HOST_AUTH_METHOD=trust" \ |
| 28 | + -v tn_db_data:/var/lib/postgresql/data \ |
| 29 | + ghcr.io/trufnetwork/kwil-postgres:latest |
| 30 | +``` |
| 31 | + |
| 32 | +### 3. Initialize Configuration |
| 33 | + |
| 34 | +Run the following command from the root of your configuration directory: |
| 35 | + |
| 36 | +```bash |
| 37 | +kwild setup init \ |
| 38 | + --genesis ./configs/network/testnet-v1/genesis.json \ |
| 39 | + --p2p.bootnodes "0368d4f915451a5c58782b804c49cc784bfcd2866e8f6c21799e3577f2441a5799#secp256k1@3.141.77.16:6600,0237d8c37fe15c4837027701efad2db3cf2705abbf8a6cf7c77c4ea5f895a436eb#secp256k1@13.58.112.159:6600" \ |
| 40 | + --state-sync.enable \ |
| 41 | + --state-sync.trusted-providers "0368d4f915451a5c58782b804c49cc784bfcd2866e8f6c21799e3577f2441a5799#secp256k1@3.141.77.16:6600" \ |
| 42 | + --root ./tn-testnet-config |
| 43 | +``` |
| 44 | + |
| 45 | +### 4. Start the Node |
| 46 | + |
| 47 | +```bash |
| 48 | +kwild start --root ./tn-testnet-config |
| 49 | +``` |
| 50 | + |
| 51 | +## Troubleshooting |
| 52 | + |
| 53 | +- **Firewall**: Ensure ports `6600` (P2P) and `8484` (RPC) are open. |
| 54 | +- **Peers**: If your node is not finding peers, ensure the bootnodes are reachable. |
| 55 | +- **Logs**: Check `kwild.log` in your root directory for errors. |
0 commit comments