From 664fea6d686172eb7289d3ddff98b32c10895ef7 Mon Sep 17 00:00:00 2001 From: Raffael Campos Date: Thu, 8 Aug 2024 14:32:06 -0300 Subject: [PATCH 01/15] add genesis file --- configs/network/staging/genesis.json | 47 ++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 configs/network/staging/genesis.json diff --git a/configs/network/staging/genesis.json b/configs/network/staging/genesis.json new file mode 100644 index 0000000..9467c9a --- /dev/null +++ b/configs/network/staging/genesis.json @@ -0,0 +1,47 @@ +{ + "genesis_time": "2024-08-08T15:24:23.773191969Z", + "chain_id": "tsn-staging", + "initial_height": 0, + "app_hash": null, + "activations": null, + "consensus_params": { + "block": { + "max_bytes": 6291456, + "max_gas": -1, + "abci_max_bytes": false + }, + "evidence": { + "max_age_num_blocks": 100000, + "max_age_duration": 172800000000000, + "max_bytes": 1048576 + }, + "version": { + "app": 0 + }, + "validator": { + "pub_key_types": [ + "ed25519" + ], + "join_expiry": 14400 + }, + "votes": { + "vote_expiry": 28800 + }, + "abci": { + "vote_extensions_enable_height": 0 + }, + "without_gas_costs": true + }, + "validators": [ + { + "pub_key": "4e0b5c952be7f26698dc1898ff3696ac30e990f25891aeaf88b0285eab4663e1", + "power": 1, + "name": "tsn-node-1" + }, + { + "pub_key": "0c830b69790eaa09315826403c2008edc65b5c7132be9d4b7b4da825c2a166ae", + "power": 1, + "name": "tsn-node-2" + } + ] +} \ No newline at end of file From d556618410213cb3be12416b23b6b8486b533358 Mon Sep 17 00:00:00 2001 From: Raffael Campos Date: Thu, 8 Aug 2024 15:16:21 -0300 Subject: [PATCH 02/15] Add staging network configuration documentation Create README.md for staging network setup, detailing configuration files and public keys. Introduce network-nodes.csv with initial validator node information. --- configs/network/staging/README.md | 16 ++++++++++++++++ configs/network/staging/network-nodes.csv | 3 +++ 2 files changed, 19 insertions(+) create mode 100644 configs/network/staging/README.md create mode 100644 configs/network/staging/network-nodes.csv diff --git a/configs/network/staging/README.md b/configs/network/staging/README.md new file mode 100644 index 0000000..dc9de37 --- /dev/null +++ b/configs/network/staging/README.md @@ -0,0 +1,16 @@ +# Network Configuration: Staging + +This directory contains the configuration files for the Truflation Staging Network. + +## Files + +- `genesis.json`: The genesis file for the staging network. +- `network-nodes.csv`: A list of initial validator nodes in the network. + +## Public Keys + +The `node_pubkey` in the `network-nodes.csv` file is represented in raw hexadecimal format. + +For information on transforming these public keys to other formats used in node configurations, please refer to the CometBFT documentation on public key cryptography: + +https://docs.cometbft.com/v0.38/spec/core/encoding#public-key-cryptography \ No newline at end of file diff --git a/configs/network/staging/network-nodes.csv b/configs/network/staging/network-nodes.csv new file mode 100644 index 0000000..e1464c3 --- /dev/null +++ b/configs/network/staging/network-nodes.csv @@ -0,0 +1,3 @@ +node_name,owner_title,owner_website,node_pubkey,p2p_rpc_endpoint +"Truflation Node 01","Truflation","https://truflation.com","4e0b5c952be7f26698dc1898ff3696ac30e990f25891aeaf88b0285eab4663e1","https://staging.node-1.tsn.truflation.com:26656" +"Truflation Node 02","Truflation","https://truflation.com","0c830b69790eaa09315826403c2008edc65b5c7132be9d4b7b4da825c2a166ae","https://staging.node-2.tsn.truflation.com:26656" \ No newline at end of file From a43240bd86c88ac8d15db6f48d55e15bd993a538 Mon Sep 17 00:00:00 2001 From: Raffael Campos Date: Fri, 9 Aug 2024 15:58:27 -0300 Subject: [PATCH 03/15] Add detailed configuration and setup guides Introduced a comprehensive guide to configuring Kwil node operators, covering database, performance, network, and peer configurations. Updated README with step-by-step instructions for setting up a TSN node, deploying it, and optionally becoming a validator. --- README.md | 97 +++++++++++++++++++++++++++++++++++++++- docs/creating-config.md | 99 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 195 insertions(+), 1 deletion(-) create mode 100644 docs/creating-config.md diff --git a/README.md b/README.md index 8e3dc13..2adc1dd 100644 --- a/README.md +++ b/README.md @@ -1 +1,96 @@ -# TSN Node Operator \ No newline at end of file +# TSN Node Operator Guide + +This guide will walk you through the process of setting up and running a TSN (Truflation Secure Network) node. By following these steps, you'll be able to deploy a node, optionally become a validator, and contribute to the TSN network. + +## Prerequisites + +Before you begin, ensure you have the following: + +1. **Kwil-admin**: Used to generate the initial configuration file. + - Download from the [latest GitHub release](https://github.com/kwilteam/kwil-db/releases) + +2. **Docker**: Required for running the PostgreSQL image. + - Install from [Docker's official website](https://docs.docker.com/get-docker/) + +3. **TSN Binaries**: Necessary for node deployment. + - Download from the [latest GitHub release](https://github.com/truflation/tsn-db/releases) + +## Setup Steps + +### 1. Generate Initial Configuration + +Use `kwil-admin` to create your initial configuration file: + +```bash +kwil-admin setup peer [flags] +``` + +For detailed instructions on configuration options, refer to our [Configuration Guide](docs/creating-config.md). + +### 2. Set Up PostgreSQL + +For a quick setup, run Kwil's pre-configured PostgreSQL Docker image: + +```bash +docker run -d -p 5432:5432 --name tsn-postgres \ + -e "POSTGRES_HOST_AUTH_METHOD=trust" \ + kwildb/postgres:latest +``` + +If you prefer a custom PostgreSQL setup, ensure it meets the requirements specified in the [configuration guide](https://docs.kwil.com/docs/daemon/running-postgres). + +### 3. Deploy TSN Node + +Run the TSN binaries to deploy your node: + +```bash +./.build/kwild --config /path/to/your/config.toml +``` + +Ensure your firewall allows incoming connections on the JSON-RPC port (default: 8484) and P2P port (default: 26656). + +### 4. Become a Validator (Optional) + +To upgrade your node to a validator: + +1. Ensure your node is fully synced with the network. +2. Submit a validator join request: + + ```bash + kwil-admin validators join --rpcserver /path/to/your/node.sock + ``` + +3. Wait for approval from existing validators. You can check your join request status with: + + ```bash + kwil-admin validators join-status --rpcserver /path/to/your/node.sock + ``` + +You can always ping us for help in the validator process. + +### 5. Submit Your Node to Available Node List (Optional) + +To help others discover your node: + +1. Fork the TSN repository. +2. Add your node information to the `configs/network/available_nodes.json` file. +3. Submit a Pull Request with your changes. + +We'll review and merge your PR to include your node in the network's seed list. + +## Network Configuration Files + +Essential network configuration files are located in the `configs/network/` directory: + +- `genesis.json`: The network's genesis file. +- `network-nodes.csv`: List of available nodes for peer discovery. + +When setting up your node, refer to these files for network-specific parameters and peer information. + +## Additional Resources + +- [Kwil Documentation](https://docs.kwil.com) + +For further assistance, join our [Discord community](https://discord.com/invite/5AMCBYxfW4) or open an issue on our [GitHub repository](https://github.com/truflation/tsn-node-operator/issues). + +Welcome to the TSN network! Your participation helps build a more robust and decentralized data infrastructure. \ No newline at end of file diff --git a/docs/creating-config.md b/docs/creating-config.md new file mode 100644 index 0000000..4703b25 --- /dev/null +++ b/docs/creating-config.md @@ -0,0 +1,99 @@ +# Kwil Node Operator Configuration Guide + +This guide outlines essential configurations for Kwil node operators. We'll use `kwil-admin` to generate the initial configuration file. + +## Database Configuration + +Kwil provides a pre-configured PostgreSQL Docker image for quick setup: + +```bash +docker run -p 5432:5432 --name kwil-postgres -e "POSTGRES_HOST_AUTH_METHOD=trust" \ + kwildb/postgres:latest +``` + +If using a custom PostgreSQL setup, configure these parameters: + +``` +--app.pg-db-host string PostgreSQL host address (default "127.0.0.1") +--app.pg-db-name string Database name (default "kwild") +--app.pg-db-pass string Database password +--app.pg-db-port string Database port (default "5432") +--app.pg-db-user string Database user name (default "kwild") +``` + +## Performance Optimization + +``` +--app.db-read-timeout duration Database read timeout (recommended: 60s, default: 5s) +-r, --root-dir string Kwild root directory (default "~/.kwild") +``` + +We recommend a 60s timeout due to the potentially long execution time of deeply nested TSN queries. The configuration file will be generated in the specified root directory. + +## Network Configuration + +### Listening Addresses + +``` +--app.jsonrpc-listen-addr string JSON-RPC listen address (default "0.0.0.0:8484") +--chain.p2p.listen-addr string P2P listen address (default "tcp://0.0.0.0:26656") +--chain.p2p.external-address string P2P external address for peer advertising +--app.hostname string Server hostname for RPC endpoint +``` + +Important: +- Open the JSON-RPC port (8484) and P2P port (26656) in your firewall. +- Ensure the P2P external address is reachable by other peers. +- `hostname` and `p2p.external-address` can be the same or different based on your setup. + +## Peer Configuration + +``` +--chain.p2p.persistent-peers string Persistent P2P peers +--chain.p2p.seeds string Seed nodes for peer discovery +``` + +Recommendations: +- Use our provided node list as seeds for initial peer discovery. +- Set critical nodes as persistent peers for constant connectivity. + +## Additional Configuration + +For a complete list of options: +- Refer to the [Kwil documentation](https://docs.kwil.com) +- Run `kwil-admin --help` + +After generating the configuration, you can manually edit the file for further customization. + +## Generating the Configuration + +Use `kwil-admin` to generate your configuration file: + +```bash +kwil-admin setup peer [flags] +``` + +Replace `[flags]` with the desired configuration options from this guide. + +Remember to review and adjust these settings based on your specific requirements and infrastructure. + + +{lets build example +"KWILD_APP_HOSTNAME=mynode.mycompany.com", +"KWILD_APP_PG_DB_HOST=kwil-postgres", +"KWILD_CHAIN_P2P_PERSISTENT_PEERS=825594e3d8abfc91f6e15823d0ef9272a8792f31@mynode.mycompany.com:26656,e4e3883da96d8cc705f477ad7724c7dabaaa11e8@3.129.133.203:26656", +"KWILD_CHAIN_P2P_EXTERNAL_ADDRESS=http://mynode.mycompany.com:26656", +"CONFIG_PATH=/root/.kwild", +} + +## Example Configuration + +```bash +kwil-admin setup peer \ + --app.pg-db-host node-postgres \ + --app.hostname mynode.mycompany.com \ + --chain.p2p.external-address http://mynode.mycompany.com:26656 \ + --chain.p2p.seeds 825594e3d8abfc91f6e15823d0ef9272a8792f31@mynode.mycompany.com:26656,e4e3883da96d8cc705f477ad7724c7dabaaa11e8@3.129.133.203:26656 \ + --root-dir ./tsn-config \ + --app.db-read-timeout 60s +``` \ No newline at end of file From 5dee2d27409f6e2b492c097096eca3c3e715f87f Mon Sep 17 00:00:00 2001 From: Raffael Campos Date: Sat, 10 Aug 2024 15:39:34 -0300 Subject: [PATCH 04/15] Update node configuration guide to reflect TSN changes Renamed Kwil Node Operator to TSN Node and updated configuration instructions accordingly. Added details on specifying the genesis file and other network configurations. --- docs/creating-config.md | 43 ++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/docs/creating-config.md b/docs/creating-config.md index 4703b25..c785694 100644 --- a/docs/creating-config.md +++ b/docs/creating-config.md @@ -1,6 +1,6 @@ -# Kwil Node Operator Configuration Guide +# TSN Node Configuration Guide -This guide outlines essential configurations for Kwil node operators. We'll use `kwil-admin` to generate the initial configuration file. +This guide outlines essential configurations for TSN Node operators. We'll use `kwil-admin` to generate the initial configuration file. ## Database Configuration @@ -21,16 +21,25 @@ If using a custom PostgreSQL setup, configure these parameters: --app.pg-db-user string Database user name (default "kwild") ``` -## Performance Optimization +## Network Configuration + +### Genesis File ``` ---app.db-read-timeout duration Database read timeout (recommended: 60s, default: 5s) --r, --root-dir string Kwild root directory (default "~/.kwild") +-g, --genesis string Path to genesis file ``` -We recommend a 60s timeout due to the potentially long execution time of deeply nested TSN queries. The configuration file will be generated in the specified root directory. +You should use this option to specify the genesis file provided in the `configs/network/` directory of the tsn-node-operator repository. This is crucial for joining the correct network. -## Network Configuration +- The genesis file is mandatory for joining an existing TSN network. +- It defines the initial state of the blockchain, including initial validators and other network parameters. +- Using the correct genesis file ensures your node starts with the same state as other nodes in the network. + +Example usage: + +```bash +kwil-admin setup peer -g ./configs/network/staging/genesis.json [other options] +``` ### Listening Addresses @@ -54,11 +63,17 @@ Important: ``` Recommendations: -- Use our provided node list as seeds for initial peer discovery. -- Set critical nodes as persistent peers for constant connectivity. +- Use the node list provided in `configs/network//network-nodes.csv` as seeds for initial peer discovery.- Set critical nodes as persistent peers for constant connectivity. ## Additional Configuration +``` +--app.db-read-timeout duration Database read timeout (recommended: 60s, default: 5s) +-r, --root-dir string Kwild root directory (default "~/.kwild") +``` + +We recommend a 60s timeout due to the potentially long execution time of deeply nested TSN queries. The configuration file will be generated in the specified root directory. + For a complete list of options: - Refer to the [Kwil documentation](https://docs.kwil.com) - Run `kwil-admin --help` @@ -77,19 +92,11 @@ Replace `[flags]` with the desired configuration options from this guide. Remember to review and adjust these settings based on your specific requirements and infrastructure. - -{lets build example -"KWILD_APP_HOSTNAME=mynode.mycompany.com", -"KWILD_APP_PG_DB_HOST=kwil-postgres", -"KWILD_CHAIN_P2P_PERSISTENT_PEERS=825594e3d8abfc91f6e15823d0ef9272a8792f31@mynode.mycompany.com:26656,e4e3883da96d8cc705f477ad7724c7dabaaa11e8@3.129.133.203:26656", -"KWILD_CHAIN_P2P_EXTERNAL_ADDRESS=http://mynode.mycompany.com:26656", -"CONFIG_PATH=/root/.kwild", -} - ## Example Configuration ```bash kwil-admin setup peer \ + -g ./configs/network/staging/genesis.json \ --app.pg-db-host node-postgres \ --app.hostname mynode.mycompany.com \ --chain.p2p.external-address http://mynode.mycompany.com:26656 \ From e74ec6a3238a38c2b57f4a110fe93a85581cc588 Mon Sep 17 00:00:00 2001 From: Raffael Campos Date: Tue, 13 Aug 2024 15:50:40 -0300 Subject: [PATCH 05/15] Add CometBFT ID to network-nodes.csv in staging config Update the staging network nodes CSV to include a new column for node CometBFT ID. --- configs/network/staging/network-nodes.csv | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configs/network/staging/network-nodes.csv b/configs/network/staging/network-nodes.csv index e1464c3..dc81865 100644 --- a/configs/network/staging/network-nodes.csv +++ b/configs/network/staging/network-nodes.csv @@ -1,3 +1,3 @@ -node_name,owner_title,owner_website,node_pubkey,p2p_rpc_endpoint -"Truflation Node 01","Truflation","https://truflation.com","4e0b5c952be7f26698dc1898ff3696ac30e990f25891aeaf88b0285eab4663e1","https://staging.node-1.tsn.truflation.com:26656" -"Truflation Node 02","Truflation","https://truflation.com","0c830b69790eaa09315826403c2008edc65b5c7132be9d4b7b4da825c2a166ae","https://staging.node-2.tsn.truflation.com:26656" \ No newline at end of file +node_name,owner_title,owner_website,node_pubkey,node_cometbft_id,p2p_rpc_endpoint +"Truflation Node 01","Truflation","https://truflation.com","4e0b5c952be7f26698dc1898ff3696ac30e990f25891aeaf88b0285eab4663e1","c6d2ea1e573d207cc31b7e17c771ab8ca2091b22","https://staging.node-1.tsn.truflation.com:26656" +"Truflation Node 02","Truflation","https://truflation.com","0c830b69790eaa09315826403c2008edc65b5c7132be9d4b7b4da825c2a166ae","34599966ce4b67628f4cfa99fdca74ea2d039018","https://staging.node-2.tsn.truflation.com:26656" \ No newline at end of file From 45dc5a3129e9d7397409ac30ab14aa3e893467ea Mon Sep 17 00:00:00 2001 From: Raffael Campos Date: Tue, 13 Aug 2024 16:26:01 -0300 Subject: [PATCH 06/15] Update command usage in README Replaced `--config` with `--root-dir` in the deployment command. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2adc1dd..c4c2c1f 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ If you prefer a custom PostgreSQL setup, ensure it meets the requirements specif Run the TSN binaries to deploy your node: ```bash -./.build/kwild --config /path/to/your/config.toml +./.build/kwild --root-dir /path/to/config/dir ``` Ensure your firewall allows incoming connections on the JSON-RPC port (default: 8484) and P2P port (default: 26656). From 62eeffe4f876cc3318452d9d9e7e9a6fb0da195e Mon Sep 17 00:00:00 2001 From: Raffael Campos Date: Wed, 14 Aug 2024 10:33:37 -0300 Subject: [PATCH 07/15] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c4c2c1f..668883e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # TSN Node Operator Guide -This guide will walk you through the process of setting up and running a TSN (Truflation Secure Network) node. By following these steps, you'll be able to deploy a node, optionally become a validator, and contribute to the TSN network. +This guide will walk you through the process of setting up and running a TSN node. By following these steps, you'll be able to deploy a node, optionally become a validator, and contribute to the TSN network. ## Prerequisites @@ -93,4 +93,4 @@ When setting up your node, refer to these files for network-specific parameters For further assistance, join our [Discord community](https://discord.com/invite/5AMCBYxfW4) or open an issue on our [GitHub repository](https://github.com/truflation/tsn-node-operator/issues). -Welcome to the TSN network! Your participation helps build a more robust and decentralized data infrastructure. \ No newline at end of file +Welcome to the TSN network! Your participation helps build a more robust and decentralized data infrastructure. From be9ff092d061be650cd24dc5affe2e49e4ad3421 Mon Sep 17 00:00:00 2001 From: Raffael Campos Date: Thu, 15 Aug 2024 14:28:18 -0300 Subject: [PATCH 08/15] add binary download instructions --- README.md | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 668883e..8e9506f 100644 --- a/README.md +++ b/README.md @@ -9,12 +9,31 @@ Before you begin, ensure you have the following: 1. **Kwil-admin**: Used to generate the initial configuration file. - Download from the [latest GitHub release](https://github.com/kwilteam/kwil-db/releases) +
Download with github-cli + + ```bash + # archs: linux_amd64, linux_arm64, darwin_amd64, darwin_arm64 + MY_ARCH= + gh release download --repo kwilteam/kwil-db --pattern "kwil-db_*_$MY_ARCH.tar.gz" + ``` +
+ 2. **Docker**: Required for running the PostgreSQL image. - Install from [Docker's official website](https://docs.docker.com/get-docker/) 3. **TSN Binaries**: Necessary for node deployment. - Download from the [latest GitHub release](https://github.com/truflation/tsn-db/releases) +
Download with github-cli + + ```bash + # gh needs to be authenticated, tsn is private + # archs: linux_amd64, linux_arm64, darwin_amd64, darwin_arm64 + MY_ARCH= + gh release download --repo truflation/tsn --pattern "*kwild_$MY_ARCH.tar.gz" + ``` +
+ ## Setup Steps ### 1. Generate Initial Configuration @@ -60,12 +79,12 @@ To upgrade your node to a validator: kwil-admin validators join --rpcserver /path/to/your/node.sock ``` -3. Wait for approval from existing validators. You can check your join request status with: +3. Wait for approval from existing validators. You can check your join request status with: ```bash kwil-admin validators join-status --rpcserver /path/to/your/node.sock ``` - + You can always ping us for help in the validator process. ### 5. Submit Your Node to Available Node List (Optional) From b1cc537ccb39d6daab415002e157e27d828aa0c4 Mon Sep 17 00:00:00 2001 From: Raffael Campos Date: Thu, 15 Aug 2024 14:29:46 -0300 Subject: [PATCH 09/15] exclude instructions about gh usage --- README.md | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/README.md b/README.md index 8e9506f..32b535e 100644 --- a/README.md +++ b/README.md @@ -9,31 +9,12 @@ Before you begin, ensure you have the following: 1. **Kwil-admin**: Used to generate the initial configuration file. - Download from the [latest GitHub release](https://github.com/kwilteam/kwil-db/releases) -
Download with github-cli - - ```bash - # archs: linux_amd64, linux_arm64, darwin_amd64, darwin_arm64 - MY_ARCH= - gh release download --repo kwilteam/kwil-db --pattern "kwil-db_*_$MY_ARCH.tar.gz" - ``` -
- 2. **Docker**: Required for running the PostgreSQL image. - Install from [Docker's official website](https://docs.docker.com/get-docker/) 3. **TSN Binaries**: Necessary for node deployment. - Download from the [latest GitHub release](https://github.com/truflation/tsn-db/releases) -
Download with github-cli - - ```bash - # gh needs to be authenticated, tsn is private - # archs: linux_amd64, linux_arm64, darwin_amd64, darwin_arm64 - MY_ARCH= - gh release download --repo truflation/tsn --pattern "*kwild_$MY_ARCH.tar.gz" - ``` -
- ## Setup Steps ### 1. Generate Initial Configuration From b1fc60f6dc6e79204af0e84e4ce354dd68a202e1 Mon Sep 17 00:00:00 2001 From: Raffael Campos Date: Thu, 15 Aug 2024 16:21:43 -0300 Subject: [PATCH 10/15] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 32b535e..99ebd98 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ If you prefer a custom PostgreSQL setup, ensure it meets the requirements specif Run the TSN binaries to deploy your node: ```bash -./.build/kwild --root-dir /path/to/config/dir +kwild --root-dir /path/to/config/dir ``` Ensure your firewall allows incoming connections on the JSON-RPC port (default: 8484) and P2P port (default: 26656). From a593ddf55229feb662cd2d01ccb4a886043bc4ac Mon Sep 17 00:00:00 2001 From: Raffael Campos Date: Thu, 15 Aug 2024 17:45:01 -0300 Subject: [PATCH 11/15] Update network-nodes.csv --- configs/network/staging/network-nodes.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/network/staging/network-nodes.csv b/configs/network/staging/network-nodes.csv index dc81865..48ff35a 100644 --- a/configs/network/staging/network-nodes.csv +++ b/configs/network/staging/network-nodes.csv @@ -1,3 +1,3 @@ node_name,owner_title,owner_website,node_pubkey,node_cometbft_id,p2p_rpc_endpoint -"Truflation Node 01","Truflation","https://truflation.com","4e0b5c952be7f26698dc1898ff3696ac30e990f25891aeaf88b0285eab4663e1","c6d2ea1e573d207cc31b7e17c771ab8ca2091b22","https://staging.node-1.tsn.truflation.com:26656" -"Truflation Node 02","Truflation","https://truflation.com","0c830b69790eaa09315826403c2008edc65b5c7132be9d4b7b4da825c2a166ae","34599966ce4b67628f4cfa99fdca74ea2d039018","https://staging.node-2.tsn.truflation.com:26656" \ No newline at end of file +"Truflation Node 01","Truflation","https://truflation.com","4e0b5c952be7f26698dc1898ff3696ac30e990f25891aeaf88b0285eab4663e1","c6d2ea1e573d207cc31b7e17c771ab8ca2091b22","http://staging.node-1.tsn.truflation.com:26656" +"Truflation Node 02","Truflation","https://truflation.com","0c830b69790eaa09315826403c2008edc65b5c7132be9d4b7b4da825c2a166ae","34599966ce4b67628f4cfa99fdca74ea2d039018","http://staging.node-2.tsn.truflation.com:26656" From c8505762f27cb67efaca381cdaea6c47a42e6bfd Mon Sep 17 00:00:00 2001 From: Raffael Campos Date: Fri, 16 Aug 2024 09:28:00 -0300 Subject: [PATCH 12/15] fix incorrect node endpoints --- configs/network/staging/network-nodes.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/network/staging/network-nodes.csv b/configs/network/staging/network-nodes.csv index 48ff35a..aa47274 100644 --- a/configs/network/staging/network-nodes.csv +++ b/configs/network/staging/network-nodes.csv @@ -1,3 +1,3 @@ node_name,owner_title,owner_website,node_pubkey,node_cometbft_id,p2p_rpc_endpoint -"Truflation Node 01","Truflation","https://truflation.com","4e0b5c952be7f26698dc1898ff3696ac30e990f25891aeaf88b0285eab4663e1","c6d2ea1e573d207cc31b7e17c771ab8ca2091b22","http://staging.node-1.tsn.truflation.com:26656" -"Truflation Node 02","Truflation","https://truflation.com","0c830b69790eaa09315826403c2008edc65b5c7132be9d4b7b4da825c2a166ae","34599966ce4b67628f4cfa99fdca74ea2d039018","http://staging.node-2.tsn.truflation.com:26656" +"Truflation Node 01","Truflation","https://truflation.com","4e0b5c952be7f26698dc1898ff3696ac30e990f25891aeaf88b0285eab4663e1","c6d2ea1e573d207cc31b7e17c771ab8ca2091b22","http://staging.node-1.tsn.test.truflation.com:26656" +"Truflation Node 02","Truflation","https://truflation.com","0c830b69790eaa09315826403c2008edc65b5c7132be9d4b7b4da825c2a166ae","34599966ce4b67628f4cfa99fdca74ea2d039018","http://staging.node-2.tsn.test.truflation.com:26656" From 9f93b90381542a2fa16bbb19fef09e9635d00fb1 Mon Sep 17 00:00:00 2001 From: Raffael Campos Date: Fri, 16 Aug 2024 09:29:14 -0300 Subject: [PATCH 13/15] Refactor and reorganize configuration documentation Moved custom PostgreSQL setup instructions and peer configuration to more appropriate sections for better readability. Updated example commands to include persistent peers configuration, ensuring consistency and clarity in the documentation. --- docs/creating-config.md | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/docs/creating-config.md b/docs/creating-config.md index c785694..6329191 100644 --- a/docs/creating-config.md +++ b/docs/creating-config.md @@ -11,16 +11,6 @@ docker run -p 5432:5432 --name kwil-postgres -e "POSTGRES_HOST_AUTH_METHOD=trust kwildb/postgres:latest ``` -If using a custom PostgreSQL setup, configure these parameters: - -``` ---app.pg-db-host string PostgreSQL host address (default "127.0.0.1") ---app.pg-db-name string Database name (default "kwild") ---app.pg-db-pass string Database password ---app.pg-db-port string Database port (default "5432") ---app.pg-db-user string Database user name (default "kwild") -``` - ## Network Configuration ### Genesis File @@ -38,7 +28,9 @@ You should use this option to specify the genesis file provided in the `configs/ Example usage: ```bash -kwil-admin setup peer -g ./configs/network/staging/genesis.json [other options] +kwil-admin setup peer -g ./configs/network/staging/genesis.json \ + --chain.p2p.persistent-peers c6d2ea1e573d207cc31b7e17c771ab8ca2091b22@staging.node-1.tsn.test.truflation.com:26656,34599966ce4b67628f4cfa99fdca74ea2d039018@staging.node-2.tsn.test.truflation.com:26656 \ + [other options] ``` ### Listening Addresses @@ -55,7 +47,7 @@ Important: - Ensure the P2P external address is reachable by other peers. - `hostname` and `p2p.external-address` can be the same or different based on your setup. -## Peer Configuration +### Peer Configuration ``` --chain.p2p.persistent-peers string Persistent P2P peers @@ -63,7 +55,21 @@ Important: ``` Recommendations: -- Use the node list provided in `configs/network//network-nodes.csv` as seeds for initial peer discovery.- Set critical nodes as persistent peers for constant connectivity. +- Set critical nodes as persistent peers for constant connectivity. We recommend that you add our TSN nodes as persistent peers. + For example: `--chain.p2p.persistent-peers c6d2ea1e573d207cc31b7e17c771ab8ca2091b22@staging.node-1.tsn.test.truflation.com:26656,34599966ce4b67628f4cfa99fdca74ea2d039018@staging.node-2.tsn.test.truflation.com:26656` +- Use the node list provided in `configs/network//network-nodes.csv` as seeds for initial peer discovery + +### Custom Database Configuration + +If using a custom PostgreSQL setup, configure these parameters: + +``` +--app.pg-db-host string PostgreSQL host address (default "127.0.0.1") +--app.pg-db-name string Database name (default "kwild") +--app.pg-db-pass string Database password +--app.pg-db-port string Database port (default "5432") +--app.pg-db-user string Database user name (default "kwild") +``` ## Additional Configuration @@ -97,10 +103,9 @@ Remember to review and adjust these settings based on your specific requirements ```bash kwil-admin setup peer \ -g ./configs/network/staging/genesis.json \ - --app.pg-db-host node-postgres \ + --chain.p2p.persistent-peers c6d2ea1e573d207cc31b7e17c771ab8ca2091b22@staging.node-1.tsn.test.truflation.com:26656,34599966ce4b67628f4cfa99fdca74ea2d039018@staging.node-2.tsn.test.truflation.com:26656 --app.hostname mynode.mycompany.com \ --chain.p2p.external-address http://mynode.mycompany.com:26656 \ - --chain.p2p.seeds 825594e3d8abfc91f6e15823d0ef9272a8792f31@mynode.mycompany.com:26656,e4e3883da96d8cc705f477ad7724c7dabaaa11e8@3.129.133.203:26656 \ --root-dir ./tsn-config \ --app.db-read-timeout 60s ``` \ No newline at end of file From 8575c285e829f3e690f6834041df0d5987314bf6 Mon Sep 17 00:00:00 2001 From: Raffael Campos Date: Fri, 16 Aug 2024 09:34:40 -0300 Subject: [PATCH 14/15] Update README with detailed TSN node setup commands Expanded the setup section to include specific commands for generating initial configuration using `kwil-admin`. Improved clarity by defining the Truflation Stream Network and updating labels accordingly. --- README.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 99ebd98..10b3368 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # TSN Node Operator Guide -This guide will walk you through the process of setting up and running a TSN node. By following these steps, you'll be able to deploy a node, optionally become a validator, and contribute to the TSN network. +This guide will walk you through the process of setting up and running a Truflation Stream Network (TSN) node. By following these steps, you'll be able to deploy a node, optionally become a validator, and contribute to the TSN. ## Prerequisites @@ -19,13 +19,19 @@ Before you begin, ensure you have the following: ### 1. Generate Initial Configuration -Use `kwil-admin` to create your initial configuration file: +Use `kwil-admin` to create your initial configuration file. ```bash -kwil-admin setup peer [flags] +kwil-admin setup peer \ + -g ./configs/network/staging/genesis.json \ + --root-dir ./my-peer-config/ \ + --chain.p2p.persistent-peers c6d2ea1e573d207cc31b7e17c771ab8ca2091b22@staging.node-1.tsn.test.truflation.com:26656,34599966ce4b67628f4cfa99fdca74ea2d039018@staging.node-2.tsn.test.truflation.com:26656 \ + --app.hostname mynode.mycompany.com \ + --chain.p2p.external-address http://mynode.mycompany.com:26656 \ + --app.db-read-timeout 60s ``` -For detailed instructions on configuration options, refer to our [Configuration Guide](docs/creating-config.md). +For detailed instructions on these and other configuration options, refer to our [Configuration Guide](docs/creating-config.md). ### 2. Set Up PostgreSQL @@ -44,7 +50,7 @@ If you prefer a custom PostgreSQL setup, ensure it meets the requirements specif Run the TSN binaries to deploy your node: ```bash -kwild --root-dir /path/to/config/dir +kwild --root-dir ./my-peer-config/ ``` Ensure your firewall allows incoming connections on the JSON-RPC port (default: 8484) and P2P port (default: 26656). @@ -93,4 +99,4 @@ When setting up your node, refer to these files for network-specific parameters For further assistance, join our [Discord community](https://discord.com/invite/5AMCBYxfW4) or open an issue on our [GitHub repository](https://github.com/truflation/tsn-node-operator/issues). -Welcome to the TSN network! Your participation helps build a more robust and decentralized data infrastructure. +Welcome to the Truflation Stream Network! Your participation helps build a more robust and decentralized data infrastructure. From 4d61c0a9447835d52c628b42ff02c8dcf243d43b Mon Sep 17 00:00:00 2001 From: Raffael Campos Date: Fri, 16 Aug 2024 15:04:49 -0300 Subject: [PATCH 15/15] Simplify initial configuration example in README --- README.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 10b3368..e0277cd 100644 --- a/README.md +++ b/README.md @@ -19,19 +19,16 @@ Before you begin, ensure you have the following: ### 1. Generate Initial Configuration -Use `kwil-admin` to create your initial configuration file. +Use `kwil-admin` to create your initial configuration file. For example: ```bash kwil-admin setup peer \ -g ./configs/network/staging/genesis.json \ --root-dir ./my-peer-config/ \ - --chain.p2p.persistent-peers c6d2ea1e573d207cc31b7e17c771ab8ca2091b22@staging.node-1.tsn.test.truflation.com:26656,34599966ce4b67628f4cfa99fdca74ea2d039018@staging.node-2.tsn.test.truflation.com:26656 \ - --app.hostname mynode.mycompany.com \ - --chain.p2p.external-address http://mynode.mycompany.com:26656 \ - --app.db-read-timeout 60s + --chain.p2p.persistent-peers c6d2ea1e573d207cc31b7e17c771ab8ca2091b22@staging.node-1.tsn.test.truflation.com:26656,34599966ce4b67628f4cfa99fdca74ea2d039018@staging.node-2.tsn.test.truflation.com:26656 ``` -For detailed instructions on these and other configuration options, refer to our [Configuration Guide](docs/creating-config.md). +For detailed instructions on these and other configuration options more relevant to a production setup, refer to our [Configuration Guide](docs/creating-config.md). ### 2. Set Up PostgreSQL