Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions configs/network/testnet-v1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Joining TRUF.NETWORK Testnet (testnet-v1)

This directory contains the configuration files required to join the TRUF.NETWORK testnet.

## Network Information

- **Chain ID**: `testnet-v1`
- **Genesis File**: `genesis.json` (in this directory)
- **Bootnodes**: See `network-nodes.csv`

## Quick Start

To initialize your node configuration and join the testnet, follow these steps:

### 1. Prerequisites
- Install `kwild` (v0.10.3+)
- Install `docker` (to run the database)
- Install `postgresql-client-16` (for state sync)

### 2. Start PostgreSQL

Kwil requires a PostgreSQL database to store state. Run the pre-configured Kwil Postgres image:

```bash
docker run -d --name tn-db-postgres \
-p 5432:5432 \
-e "POSTGRES_HOST_AUTH_METHOD=trust" \
-v tn_db_data:/var/lib/postgresql/data \
ghcr.io/trufnetwork/kwil-postgres:latest
```

### 3. Initialize Configuration

Run the following command from the root of your configuration directory:

```bash
kwild setup init \
--genesis ./configs/network/testnet-v1/genesis.json \
--p2p.bootnodes "0368d4f915451a5c58782b804c49cc784bfcd2866e8f6c21799e3577f2441a5799#secp256k1@3.141.77.16:6600,0237d8c37fe15c4837027701efad2db3cf2705abbf8a6cf7c77c4ea5f895a436eb#secp256k1@13.58.112.159:6600" \
--state-sync.enable \
--state-sync.trusted-providers "0368d4f915451a5c58782b804c49cc784bfcd2866e8f6c21799e3577f2441a5799#secp256k1@3.141.77.16:6600" \
--root ./tn-testnet-config
```

### 4. Start the Node

```bash
kwild start --root ./tn-testnet-config
```

## Troubleshooting

- **Firewall**: Ensure ports `6600` (P2P) and `8484` (RPC) are open.
- **Peers**: If your node is not finding peers, ensure the bootnodes are reachable.
- **Logs**: Check `kwild.log` in your root directory for errors.
24 changes: 24 additions & 0 deletions configs/network/testnet-v1/genesis.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"chain_id": "testnet-v1",
"initial_height": 0,
"db_owner": "0x231ea6C42aD77036237EF1C6398b76D0afc7Fd9e",
"validators": [
{
"pubkey": "0368d4f915451a5c58782b804c49cc784bfcd2866e8f6c21799e3577f2441a5799",
"type": "secp256k1",
"power": 1
}
],
"migration": {
"start_height": 0,
"end_height": 0
},
"leader": {
"type": "secp256k1",
"key": "0368d4f915451a5c58782b804c49cc784bfcd2866e8f6c21799e3577f2441a5799"
},
"max_block_size": 6291456,
"join_expiry": "168h0m0s",
"disabled_gas_costs": true,
"max_votes_per_tx": 200
}
3 changes: 3 additions & 0 deletions configs/network/testnet-v1/network-nodes.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_name,owner_title,owner_website,node_id,ip_address
"Testnet Leader","TRUF.NETWORK","https://truf.network","0368d4f915451a5c58782b804c49cc784bfcd2866e8f6c21799e3577f2441a5799#secp256k1","3.141.77.16:6600"
"Testnet Sentry","TRUF.NETWORK","https://truf.network","0237d8c37fe15c4837027701efad2db3cf2705abbf8a6cf7c77c4ea5f895a436eb#secp256k1","13.58.112.159:6600"