From ff46190a27e08bdf70e5caae6f580694024ea834 Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Tue, 16 Jul 2024 10:20:09 -0400 Subject: [PATCH 01/52] more detailed guide --- public-testnet/guide.md | 157 ++++++++++++++++++++++++++++------------ 1 file changed, 111 insertions(+), 46 deletions(-) diff --git a/public-testnet/guide.md b/public-testnet/guide.md index 888e68c..418689f 100644 --- a/public-testnet/guide.md +++ b/public-testnet/guide.md @@ -1,11 +1,16 @@ -# Guide +# Public Testnet Guide -## The Guide: Starting a Layer Node and Becoming a Validator +### *Note: This is a guide for setting up a Tellor Layer public testnet validator / reporter. Care is taken to provide info on the tools being used, but testers should be comfortable with running experimental code via command line interface. A beginner’s understanding of the cosmos SDK is highly recommended!* + +This guide has three sections: +1. Run a Tellor Layer node. +2. Stake and become a Validator +3. Create a reporter (and unjail if needed) ### Pre-requisites -* A local or cloud system running linux or macos -* Golang v1.22 +* A local or cloud system running linux (or mac os with the mac scripts) +* Golang v1.22 (install instrauctions [here](https://go.dev/doc/install)) * jq, yq, and sed for running the scripts: * Install jq * For mac: brew install jq @@ -16,8 +21,8 @@ * Install sed * For mac: brew install sed * For linux: sudo apt-get install sed -* Testnet TRB for staking a validator. Feel free to request some layer test TRB in the public discord #developers channel, or [try the token bridge from the Sepolia testnet playground](guide.md#getting-testnet-trb). +## Part 1: Run a Layer Node ### **Steps for Starting a Layer Node Using the Provided Shell Scripts** {% hint style="warning" %} @@ -49,102 +54,162 @@ 5. **Open the Script:** Using your favorite text editor (like nano, vim, or code), open: ```sh - /layer_scripts/join_chain_new_node_{desired OS} + layer_scripts/join_chain_new_node_linux.sh ``` -6. **Edit the Following Variables:** + Note: If you're using a mac, use the corrisponding scripts for mac. If windows, use the linux scripts with Ubuntu or Debian WSL. + +6. **Edit Variables:** * `LAYER_NODE_URL`: Set to the unquoted URL (or public IPv4 address) of a seed node, like tellornode.com. - * `KEYRING_BACKEND`: Set to `test` by default but can be configured here. + * `KEYRING_BACKEND`: Set to `test` by default but can be configured here. (test works fine) * `NODE_MONIKER`: Set to whatever you use for the node name + “moniker” at the end (e.g., “billmoniker”). * `NODE_NAME`: Set to your name or whatever name you choose (e.g., “bill”). - * `TELLORNODE_ID`: Set to the unquoted node ID of the seed node. The node ID can be found by running: + * `TELLORNODE_ID`: Set to the unquoted node ID of the seed node. + * `LAYERD_NODE_HOME`: Should be set to "$HOME/.layer/$NODE_NAME" + + Not: The provided node ID will be incorrect if the test chain was restarted. This can be checked by running: ```sh curl tellornode.com:26657/status ``` - Replace “tellornode.com” with the URL for your seed node if different. - * `LAYERD_NODE_HOME`: This is set automatically based on your input for `NODE_NAME`. This is the directory where you can find the layer config files and your test key. +7. **Important Things to Know Before Running the Script:** + * When you start the script (which you haven't done yet),***a test wallet key pair/mnemonic will be created and printed in the terminal. You will need this address to run your validator. There will be a pause allowing you to copy it before it's burried by the node log.*** It will look something like this: + {% code fullWidth="true" %} + ``` + - address: tellor1mh2ua3w8yq5ldeewsdhpg0cazhr7gtcllr6j0j + name: bill + pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Ag+lE4VGW6CpE/TiMnb3zJ6pyETVHobj5Bd5F3OuRW7/"}' + type: local -1. **Preparation Before Running the Script:** - * When you start the script, a test wallet key pair/mnemonic will be created and printed in the terminal. There will be a pause allowing you to copy it before the node log starts up. It will look something like this: + **Important** write this mnemonic phrase in a safe place. + It is the only way to recover your account if you ever forget your password. - {% code fullWidth="true" %} - ``` - - address: tellor1v7pj7k067hzzxxn9nngdg6wfnw978tnyv2e2n - name: bill - pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Ar9mM1r3El8+/qaWT9sVlcHwDwHe/b0iSq4yRSxZnTd"}' - type: local - ``` - {% endcode %} - * Make sure you copy this wallet if you don’t have another plan for creating your validator wallet. - * The script will start a node with the reporter daemon turned off by default. This is useful for testing if you can successfully run and sync the layer node, participate in consensus, and receive rewards. -2. **Run the Script:** - * Give the script permission to run: + eagle actress venue redacted style redacted potato still redacted final redacted increase redacted parent panda vapor redacted redacted twelve summer redacted redacted redacted redacted + ``` + {% endcode %} + + * **The script should only be run once, or if you want to start over from scratch!** It is intended to be used to delete your old chain and to configure the chain and start it all at once (for testing). Once your node is running, it can be restarted with a `./layerd start` command like the last command in start script. + +8. **Run the Script:** + * Give the script permission to execute: ```sh - chmod +x /layer_scripts/join_chain_new_node_{linux/mac}.sh + chmod +x /layer_scripts/join_chain_new_node_linux.sh ``` * Run it: ```sh - ./layer_scripts/join_chain_new_node_{linux/mac}.sh + ./layer_scripts/join_chain_new_node_linux.sh ``` * Wait for the chain to sync. Some errors are expected as the chain starts up, but the log should start moving very quickly once the node starts downloading blocks. - * Once the log slows down again, it is likely synced. You can verify that your node is synced using: + + * Once the log slows down again, it is likely synced. You can verify that your node is synced using: ```sh - curl {localhost/your new node URL}:26657/status + curl localhost:26657/status ``` If `sync_info.catching_up` is `False`, the node is synced! Well done! -**Steps for Becoming a Validator** +**Part 2: Becoming a Validator** -Once you have a working node, you can try being a validator and competing for rewards. +Once you have a working node, you can try running a validator and competing for rewards. -This is where you will need to have some layer testnet TRB. Feel free to request in the public [discord](https://discord.gg/tellor) #developers channel, or [try the token bridge from the Sepolia testnet playground.](guide.md#getting-testnet-trb) +You will need to have some layer testnet TRB into your validator account (see step 7 above). Feel free to send a request in the public [discord](https://discord.gg/tellor) #testing-layer channel, or [try the token bridge from the Sepolia testnet playground.](guide.md#getting-testnet-trb) 1. **Verify That You Have a Funded Address:** ```sh - curl http://tellornode.com:1317/cosmos/bank/v1beta1/balances/{your address} + ./layerd query bank balance $NODE_NAME loya --chain-id layer ``` -2. **Retrieve Your Validator Public Key:** With `layer` as the active directory, use the command: +2. **Retrieve Your Validator Public Key:** With your `layer` folder as the active directory, use the command: ```sh - ./layerd comet show-validator --home ~/.layer/{node_name} + ./layerd comet show-validator --home $LAYERD_NODE_HOME ``` This returns your validator pubkey (e.g., `{"@type":"/cosmos.crypto.ed25519.PubKey","key":"FX9cKNl+QmxtLcL926P5yJqZw7YyuSX3HQAZboz3TjM="}`). -3. **Create a Validator Configuration File:** Create a file named `~/layer/validator.json` and paste the following JSON object into it: + Note: Your nodes home directory variable `LAYERD_NODE_HOME` needs to be set prior to running ./layerd commands when you're outside the scripts. [You can load variables into all new bash windows by adding the export commands to your shell's .bashrc file](https://unix.stackexchange.com/questions/117467/how-to-permanently-set-environmental-variables) (.zshrc on mac). + +3. **Edit the Validator Configuration File:** + Open `~/layer/validator.json`: ```json { - "pubkey": {PASTE THE PUBKEY RETURNED IN STEP 3}, - "amount": "AMOUNT OF LOYA YOU WANT TO STAKE", - "moniker": "NODE MONIKER", - "identity": "", - "website": "", - "security": "", - "details": "", + "pubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"c+EuycPpudgiyVl6guYG9oyPSImHHJz1z0Pg4ODKveo="}, + "amount": "100000000000loya", + "moniker": "billmoniker", + "identity": "optional identity signature (ex. UPort or Keybase)", + "website": "validator's (optional) website", + "security": "validator's (optional) security contact email", + "details": "validator's (optional) details", "commission-rate": "0.1", "commission-max-rate": "0.2", "commission-max-change-rate": "0.01", "min-self-delegation": "1" } ``` -4. **Create Your Validator:** Run the following command (make sure you leave enough TRB for gas fees): + - Edit the `"pubkey"` to match yours from step 2. + - Edit `"amount"` to be the amount of testnet TRB that you would like to stake with 6 decimals and the "loya" denom. For example if you want to stake 599 TRB: `"amount": "599000000loya"`. + - Edit `"moniker"` to be the moniker you chose for running your node start script. (this is the "name" of your validator) + + {% hint style="warning" %} + **Note:** TRB tokens are used for gas on the layer network. As a validator you will need to make transactions to send tokens, become a reporter, unjail, etc. When choosing the amount to stake, it is important to reserve some TRB for gas. + {% endhint %} + +4. **Create Your Validator:** + Keep your node running. Open another window on your layer machine and load up your variables with the values used when your ran the join chain script. Leave the node running, but have it open so that you can use both windows quickly. + + At the time of writing, a few things need to happen (in order) to successfully start a validator. You will need to: + 1) Make the create-validator tx. + 2) Count to 10. + 3) Restart your node using a ./layerd command *not the script*. + + Before you continue, set the layer script variables in your new window: ```sh - ./layerd tx staking create-validator ./validator.json --from {YOUR ADDRESS} --home ~/.layer/{NODE_NAME} --chain-id layer --node="http://tellornode.com:26657" + export LAYER_NODE_URL=54.166.101.67 \ + && export TELLORNODE_ID=9007e2991e7f07a016559aed4685f4ba0619c631 \ + && export KEYRING_BACKEND="test" \ + && export NODE_MONIKER="bobmoniker" \ + && export NODE_NAME="bob" \ + && export AMOUNT_IN_TRB=10000 \ + && export AMOUNT_IN_LOYA="1000000000loya" \ + && export LAYERD_NODE_HOME="$HOME/.layer/$NODE_NAME" ``` -5. **Verify Your Validator Creation:** Ensure your validator was created successfully using the command: + Use `printenv` to double check that all the commands are set correctly. + + + 1) Run the following command: + ```sh + ./layerd tx staking create-validator ./validator.json --from $NODE_ADDRESS --home $LAYERD_NODE_HOME --chain-id layer --node="http://localhost:26657" --gas "400000" + ``` + 2) count to 10 + 3) In your node window, use `ctrl^c` to stop the node. Use this command to start it back up: + ```sh + ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=false --panic-on-daemon-failure-enabled=false --p2p.seeds "$TELLORNODE_ID@$LAYER_NODE_URL:26656" + ``` + +5. **Verify Your Validator Creation:** + Ensure your validator was created successfully using the command: ```sh ./layerd query staking validator $(./layerd keys show $NODE_NAME --bech val --address --keyring-backend $KEYRING_BACKEND --home $LAYERD_NODE_HOME) --output json | jq ``` + If status is `3`, you are a validator and you're not jailed. Awesome! + If status is `2`, you created your validator, but it was jailed (it's ok, you can probably unjail later). + + **Become a Reporter** + Once you’re successfully running a validator, you’re almost a reporter already! Just aone more command: + ```sh + ./layerd tx reporter create-reporter "100000000000000000" "1000000" --from $NODE_NAME --keyring-backend test --chain-id layer --home $LAYERD_NODE_HOME + ``` + Restart your node again, but this time we will change the command a bit to turn on the price daemon: + ```sh + ./layerd start --home ~/.layer/bill --api.enable --api.swagger --price-daemon-enabled=true --panic-on-daemon-failure-enabled=false + ``` ### Getting Testnet TRB From d86320ec7e724056d14bc7328f6897c5269016b8 Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Tue, 16 Jul 2024 10:23:11 -0400 Subject: [PATCH 02/52] formatting --- public-testnet/guide.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/public-testnet/guide.md b/public-testnet/guide.md index 418689f..c0fdb46 100644 --- a/public-testnet/guide.md +++ b/public-testnet/guide.md @@ -45,9 +45,7 @@ This guide has three sections: ```json - { - "eth_api_key": "your_api_key" - } + "eth_api_key": "your_api_key" ``` @@ -66,11 +64,11 @@ This guide has three sections: * `TELLORNODE_ID`: Set to the unquoted node ID of the seed node. * `LAYERD_NODE_HOME`: Should be set to "$HOME/.layer/$NODE_NAME" - Not: The provided node ID will be incorrect if the test chain was restarted. This can be checked by running: + Note: The provided node ID will be incorrect if the test chain was restarted. This can be checked by running: - ```sh - curl tellornode.com:26657/status - ``` + ```sh + curl tellornode.com:26657/status + ``` 7. **Important Things to Know Before Running the Script:** * When you start the script (which you haven't done yet),***a test wallet key pair/mnemonic will be created and printed in the terminal. You will need this address to run your validator. There will be a pause allowing you to copy it before it's burried by the node log.*** It will look something like this: From 9c0a9ea3095546d449add4e1aebc4aba39f97dac Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Tue, 16 Jul 2024 10:28:14 -0400 Subject: [PATCH 03/52] . --- public-testnet/guide.md | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/public-testnet/guide.md b/public-testnet/guide.md index c0fdb46..d95bc46 100644 --- a/public-testnet/guide.md +++ b/public-testnet/guide.md @@ -73,7 +73,6 @@ This guide has three sections: 7. **Important Things to Know Before Running the Script:** * When you start the script (which you haven't done yet),***a test wallet key pair/mnemonic will be created and printed in the terminal. You will need this address to run your validator. There will be a pause allowing you to copy it before it's burried by the node log.*** It will look something like this: - {% code fullWidth="true" %} ``` - address: tellor1mh2ua3w8yq5ldeewsdhpg0cazhr7gtcllr6j0j name: bill @@ -86,7 +85,6 @@ This guide has three sections: eagle actress venue redacted style redacted potato still redacted final redacted increase redacted parent panda vapor redacted redacted twelve summer redacted redacted redacted redacted ``` - {% endcode %} * **The script should only be run once, or if you want to start over from scratch!** It is intended to be used to delete your old chain and to configure the chain and start it all at once (for testing). Once your node is running, it can be restarted with a `./layerd start` command like the last command in start script. @@ -117,6 +115,20 @@ Once you have a working node, you can try running a validator and competing for You will need to have some layer testnet TRB into your validator account (see step 7 above). Feel free to send a request in the public [discord](https://discord.gg/tellor) #testing-layer channel, or [try the token bridge from the Sepolia testnet playground.](guide.md#getting-testnet-trb) +Keep your node running. Open another window on your layer machine and load up your variables with the values used when your ran the join chain script. Leave the node running, but have it open so that you can use both windows quickly. Now, set the layer script variables in your new window: + + ```sh + export LAYER_NODE_URL=54.166.101.67 \ + && export TELLORNODE_ID=9007e2991e7f07a016559aed4685f4ba0619c631 \ + && export KEYRING_BACKEND="test" \ + && export NODE_MONIKER="bobmoniker" \ + && export NODE_NAME="bob" \ + && export AMOUNT_IN_TRB=10000 \ + && export AMOUNT_IN_LOYA="1000000000loya" \ + && export LAYERD_NODE_HOME="$HOME/.layer/$NODE_NAME" + ``` + Use `printenv` to double check that all the commands are set correctly. + 1. **Verify That You Have a Funded Address:** ```sh @@ -153,34 +165,15 @@ You will need to have some layer testnet TRB into your validator account (see st - Edit `"amount"` to be the amount of testnet TRB that you would like to stake with 6 decimals and the "loya" denom. For example if you want to stake 599 TRB: `"amount": "599000000loya"`. - Edit `"moniker"` to be the moniker you chose for running your node start script. (this is the "name" of your validator) - {% hint style="warning" %} **Note:** TRB tokens are used for gas on the layer network. As a validator you will need to make transactions to send tokens, become a reporter, unjail, etc. When choosing the amount to stake, it is important to reserve some TRB for gas. - {% endhint %} 4. **Create Your Validator:** - Keep your node running. Open another window on your layer machine and load up your variables with the values used when your ran the join chain script. Leave the node running, but have it open so that you can use both windows quickly. - At the time of writing, a few things need to happen (in order) to successfully start a validator. You will need to: 1) Make the create-validator tx. 2) Count to 10. 3) Restart your node using a ./layerd command *not the script*. - Before you continue, set the layer script variables in your new window: - - ```sh - export LAYER_NODE_URL=54.166.101.67 \ - && export TELLORNODE_ID=9007e2991e7f07a016559aed4685f4ba0619c631 \ - && export KEYRING_BACKEND="test" \ - && export NODE_MONIKER="bobmoniker" \ - && export NODE_NAME="bob" \ - && export AMOUNT_IN_TRB=10000 \ - && export AMOUNT_IN_LOYA="1000000000loya" \ - && export LAYERD_NODE_HOME="$HOME/.layer/$NODE_NAME" - ``` - Use `printenv` to double check that all the commands are set correctly. - - - + Let's go! 1) Run the following command: ```sh ./layerd tx staking create-validator ./validator.json --from $NODE_ADDRESS --home $LAYERD_NODE_HOME --chain-id layer --node="http://localhost:26657" --gas "400000" From c6610cc6ed297fa1e607035e558ceea03a4ea900 Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Tue, 16 Jul 2024 10:28:53 -0400 Subject: [PATCH 04/52] . --- public-testnet/guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public-testnet/guide.md b/public-testnet/guide.md index d95bc46..9156af0 100644 --- a/public-testnet/guide.md +++ b/public-testnet/guide.md @@ -192,7 +192,7 @@ Keep your node running. Open another window on your layer machine and load up yo If status is `3`, you are a validator and you're not jailed. Awesome! If status is `2`, you created your validator, but it was jailed (it's ok, you can probably unjail later). - **Become a Reporter** +## **Become a Reporter** Once you’re successfully running a validator, you’re almost a reporter already! Just aone more command: ```sh ./layerd tx reporter create-reporter "100000000000000000" "1000000" --from $NODE_NAME --keyring-backend test --chain-id layer --home $LAYERD_NODE_HOME From 7c4c0c98bbe5149d1fea4c6638ca0d864fca501a Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Tue, 16 Jul 2024 10:41:01 -0400 Subject: [PATCH 05/52] add unjail command --- public-testnet/guide.md | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/public-testnet/guide.md b/public-testnet/guide.md index 9156af0..8cd5e1f 100644 --- a/public-testnet/guide.md +++ b/public-testnet/guide.md @@ -109,7 +109,7 @@ This guide has three sections: If `sync_info.catching_up` is `False`, the node is synced! Well done! -**Part 2: Becoming a Validator** +## Part 2: Becoming a Validator Once you have a working node, you can try running a validator and competing for rewards. @@ -145,7 +145,7 @@ Keep your node running. Open another window on your layer machine and load up yo Note: Your nodes home directory variable `LAYERD_NODE_HOME` needs to be set prior to running ./layerd commands when you're outside the scripts. [You can load variables into all new bash windows by adding the export commands to your shell's .bashrc file](https://unix.stackexchange.com/questions/117467/how-to-permanently-set-environmental-variables) (.zshrc on mac). 3. **Edit the Validator Configuration File:** - Open `~/layer/validator.json`: +Open `~/layer/validator.json`: ```json { "pubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"c+EuycPpudgiyVl6guYG9oyPSImHHJz1z0Pg4ODKveo="}, @@ -168,7 +168,7 @@ Keep your node running. Open another window on your layer machine and load up yo **Note:** TRB tokens are used for gas on the layer network. As a validator you will need to make transactions to send tokens, become a reporter, unjail, etc. When choosing the amount to stake, it is important to reserve some TRB for gas. 4. **Create Your Validator:** - At the time of writing, a few things need to happen (in order) to successfully start a validator. You will need to: +At the time of writing, a few things need to happen (in order) to successfully start a validator. You will need to: 1) Make the create-validator tx. 2) Count to 10. 3) Restart your node using a ./layerd command *not the script*. @@ -185,21 +185,40 @@ Keep your node running. Open another window on your layer machine and load up yo ``` 5. **Verify Your Validator Creation:** - Ensure your validator was created successfully using the command: +Ensure your validator was created successfully using the command: ```sh ./layerd query staking validator $(./layerd keys show $NODE_NAME --bech val --address --keyring-backend $KEYRING_BACKEND --home $LAYERD_NODE_HOME) --output json | jq ``` If status is `3`, you are a validator and you're not jailed. Awesome! If status is `2`, you created your validator, but it was jailed (it's ok, you can probably unjail later). -## **Become a Reporter** +## Part 2: Becoming a Reporter (and maybe unjail a little bit...) + Once you’re successfully running a validator, you’re almost a reporter already! Just aone more command: - ```sh + ``` ./layerd tx reporter create-reporter "100000000000000000" "1000000" --from $NODE_NAME --keyring-backend test --chain-id layer --home $LAYERD_NODE_HOME ``` Restart your node again, but this time we will change the command a bit to turn on the price daemon: - ```sh - ./layerd start --home ~/.layer/bill --api.enable --api.swagger --price-daemon-enabled=true --panic-on-daemon-failure-enabled=false + ``` + ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=true --panic-on-daemon-failure-enabled=false + ``` + +## Steps to unjail: +Layer testnet is still experimental, and jailing can happen for various reasons while we work out the kinks. Make sure your terminal window (shell) has all the variables loaded before trying to build txs. \ + +Read all steps first because you have about 4 minutes to do everything or you will be jailed again for inactivity: + + 1. stop your node / validator / reporter and start it back up as a node / validator (turning off the reporter): + ``` + ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=false --panic-on-daemon-failure-enabled=false + ``` + 2. enter the unjail the command: + ``` + ./layerd tx slashing unjail --from $NODE_NAME --chain-id layer --yes + ``` + 3. Restart the node with reporter daemon turned on: + ``` + ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=true --panic-on-daemon-failure-enabled=false ``` ### Getting Testnet TRB From 4f040b8ac8f43a150c9bdb5440b2354dc9efec3c Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Tue, 16 Jul 2024 10:46:54 -0400 Subject: [PATCH 06/52] . --- public-testnet/guide.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/public-testnet/guide.md b/public-testnet/guide.md index 8cd5e1f..6ac7b2e 100644 --- a/public-testnet/guide.md +++ b/public-testnet/guide.md @@ -117,7 +117,7 @@ You will need to have some layer testnet TRB into your validator account (see st Keep your node running. Open another window on your layer machine and load up your variables with the values used when your ran the join chain script. Leave the node running, but have it open so that you can use both windows quickly. Now, set the layer script variables in your new window: - ```sh + ``` export LAYER_NODE_URL=54.166.101.67 \ && export TELLORNODE_ID=9007e2991e7f07a016559aed4685f4ba0619c631 \ && export KEYRING_BACKEND="test" \ @@ -127,6 +127,7 @@ Keep your node running. Open another window on your layer machine and load up yo && export AMOUNT_IN_LOYA="1000000000loya" \ && export LAYERD_NODE_HOME="$HOME/.layer/$NODE_NAME" ``` + Use `printenv` to double check that all the commands are set correctly. 1. **Verify That You Have a Funded Address:** @@ -189,6 +190,7 @@ Ensure your validator was created successfully using the command: ```sh ./layerd query staking validator $(./layerd keys show $NODE_NAME --bech val --address --keyring-backend $KEYRING_BACKEND --home $LAYERD_NODE_HOME) --output json | jq ``` + If status is `3`, you are a validator and you're not jailed. Awesome! If status is `2`, you created your validator, but it was jailed (it's ok, you can probably unjail later). @@ -198,7 +200,9 @@ Ensure your validator was created successfully using the command: ``` ./layerd tx reporter create-reporter "100000000000000000" "1000000" --from $NODE_NAME --keyring-backend test --chain-id layer --home $LAYERD_NODE_HOME ``` + Restart your node again, but this time we will change the command a bit to turn on the price daemon: + ``` ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=true --panic-on-daemon-failure-enabled=false ``` @@ -209,13 +213,16 @@ Layer testnet is still experimental, and jailing can happen for various reasons Read all steps first because you have about 4 minutes to do everything or you will be jailed again for inactivity: 1. stop your node / validator / reporter and start it back up as a node / validator (turning off the reporter): + ``` ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=false --panic-on-daemon-failure-enabled=false ``` + 2. enter the unjail the command: ``` ./layerd tx slashing unjail --from $NODE_NAME --chain-id layer --yes ``` + 3. Restart the node with reporter daemon turned on: ``` ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=true --panic-on-daemon-failure-enabled=false From 47f95ac93183d584487fd52c5d09822e9c8bc2fb Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Tue, 16 Jul 2024 10:47:23 -0400 Subject: [PATCH 07/52] . --- public-testnet/guide.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public-testnet/guide.md b/public-testnet/guide.md index 6ac7b2e..f1484fa 100644 --- a/public-testnet/guide.md +++ b/public-testnet/guide.md @@ -219,11 +219,13 @@ Read all steps first because you have about 4 minutes to do everything or you wi ``` 2. enter the unjail the command: + ``` ./layerd tx slashing unjail --from $NODE_NAME --chain-id layer --yes ``` 3. Restart the node with reporter daemon turned on: + ``` ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=true --panic-on-daemon-failure-enabled=false ``` From bd8800f124462b4722f88d7630adf40f59ac4c6c Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Tue, 16 Jul 2024 10:48:53 -0400 Subject: [PATCH 08/52] . --- public-testnet/guide.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/public-testnet/guide.md b/public-testnet/guide.md index f1484fa..85c99b7 100644 --- a/public-testnet/guide.md +++ b/public-testnet/guide.md @@ -196,35 +196,35 @@ Ensure your validator was created successfully using the command: ## Part 2: Becoming a Reporter (and maybe unjail a little bit...) - Once you’re successfully running a validator, you’re almost a reporter already! Just aone more command: - ``` +Once you’re successfully running a validator, you’re almost a reporter already! Just aone more command: + `` ./layerd tx reporter create-reporter "100000000000000000" "1000000" --from $NODE_NAME --keyring-backend test --chain-id layer --home $LAYERD_NODE_HOME ``` - Restart your node again, but this time we will change the command a bit to turn on the price daemon: +Restart your node again, but this time we will change the command a bit to turn on the price daemon: ``` ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=true --panic-on-daemon-failure-enabled=false ``` ## Steps to unjail: -Layer testnet is still experimental, and jailing can happen for various reasons while we work out the kinks. Make sure your terminal window (shell) has all the variables loaded before trying to build txs. \ +Layer testnet is still experimental, and jailing can happen for various reasons while we work out the kinks. Make sure your terminal window (shell) has all the variables loaded before trying to build txs. Read all steps first because you have about 4 minutes to do everything or you will be jailed again for inactivity: - 1. stop your node / validator / reporter and start it back up as a node / validator (turning off the reporter): +1. stop your node / validator / reporter and start it back up as a node / validator (turning off the reporter): ``` ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=false --panic-on-daemon-failure-enabled=false ``` - 2. enter the unjail the command: +2. enter the unjail the command: ``` ./layerd tx slashing unjail --from $NODE_NAME --chain-id layer --yes ``` - 3. Restart the node with reporter daemon turned on: +3. Restart the node with reporter daemon turned on: ``` ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=true --panic-on-daemon-failure-enabled=false From 3bcedc5138186c05ab3c173aa3263bf35d4bc782 Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Tue, 16 Jul 2024 10:53:48 -0400 Subject: [PATCH 09/52] test --- public-testnet/guide.md | 106 +++++++++++++++++++++------------------- 1 file changed, 56 insertions(+), 50 deletions(-) diff --git a/public-testnet/guide.md b/public-testnet/guide.md index 85c99b7..a0cecff 100644 --- a/public-testnet/guide.md +++ b/public-testnet/guide.md @@ -31,29 +31,31 @@ This guide has three sections: 1. **Clone the Layer Repository:** - ```sh - git clone https://github.com/tellor-io/layer -b public-testnet - ``` +```sh +git clone https://github.com/tellor-io/layer -b public-testnet +``` + 2. **Change Active Directory:** - ```sh - cd layer - ``` +```sh +cd layer +``` + 3. **Create a file named** `secrets.json` in the layer folder. 4. **Set an alchemy api key for eth rpc.** \ The file, secrets.json, should contain a single line (replace with your own Alchemy API key): \ - ```json - "eth_api_key": "your_api_key" - ``` +```json +"eth_api_key": "your_api_key" +``` 5. **Open the Script:** Using your favorite text editor (like nano, vim, or code), open: - ```sh - layer_scripts/join_chain_new_node_linux.sh - ``` +```sh +layer_scripts/join_chain_new_node_linux.sh +``` Note: If you're using a mac, use the corrisponding scripts for mac. If windows, use the linux scripts with Ubuntu or Debian WSL. 6. **Edit Variables:** @@ -66,14 +68,14 @@ This guide has three sections: Note: The provided node ID will be incorrect if the test chain was restarted. This can be checked by running: - ```sh - curl tellornode.com:26657/status - ``` +```sh +curl tellornode.com:26657/status +``` 7. **Important Things to Know Before Running the Script:** * When you start the script (which you haven't done yet),***a test wallet key pair/mnemonic will be created and printed in the terminal. You will need this address to run your validator. There will be a pause allowing you to copy it before it's burried by the node log.*** It will look something like this: - ``` +```sh - address: tellor1mh2ua3w8yq5ldeewsdhpg0cazhr7gtcllr6j0j name: bill pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Ag+lE4VGW6CpE/TiMnb3zJ6pyETVHobj5Bd5F3OuRW7/"}' @@ -84,16 +86,17 @@ This guide has three sections: It is the only way to recover your account if you ever forget your password. eagle actress venue redacted style redacted potato still redacted final redacted increase redacted parent panda vapor redacted redacted twelve summer redacted redacted redacted redacted - ``` +``` * **The script should only be run once, or if you want to start over from scratch!** It is intended to be used to delete your old chain and to configure the chain and start it all at once (for testing). Once your node is running, it can be restarted with a `./layerd start` command like the last command in start script. 8. **Run the Script:** * Give the script permission to execute: - ```sh - chmod +x /layer_scripts/join_chain_new_node_linux.sh - ``` + ```sh + chmod +x /layer_scripts/join_chain_new_node_linux.sh + ``` + * Run it: ```sh @@ -103,11 +106,11 @@ This guide has three sections: * Once the log slows down again, it is likely synced. You can verify that your node is synced using: - ```sh - curl localhost:26657/status - ``` + ``` + curl localhost:26657/status + ``` - If `sync_info.catching_up` is `False`, the node is synced! Well done! + If `sync_info.catching_up` is `False`, the node is synced! Well done! ## Part 2: Becoming a Validator @@ -117,7 +120,7 @@ You will need to have some layer testnet TRB into your validator account (see st Keep your node running. Open another window on your layer machine and load up your variables with the values used when your ran the join chain script. Leave the node running, but have it open so that you can use both windows quickly. Now, set the layer script variables in your new window: - ``` + ```sh export LAYER_NODE_URL=54.166.101.67 \ && export TELLORNODE_ID=9007e2991e7f07a016559aed4685f4ba0619c631 \ && export KEYRING_BACKEND="test" \ @@ -132,14 +135,14 @@ Keep your node running. Open another window on your layer machine and load up yo 1. **Verify That You Have a Funded Address:** - ```sh +```sh ./layerd query bank balance $NODE_NAME loya --chain-id layer - ``` -2. **Retrieve Your Validator Public Key:** With your `layer` folder as the active directory, use the command: - - ```sh +``` +2. **Retrieve Your Validator Public Key:** +With your `layer` folder as the active directory, use the command: +```sh ./layerd comet show-validator --home $LAYERD_NODE_HOME - ``` +``` This returns your validator pubkey (e.g., `{"@type":"/cosmos.crypto.ed25519.PubKey","key":"FX9cKNl+QmxtLcL926P5yJqZw7YyuSX3HQAZboz3TjM="}`). @@ -147,6 +150,7 @@ Keep your node running. Open another window on your layer machine and load up yo 3. **Edit the Validator Configuration File:** Open `~/layer/validator.json`: + ```json { "pubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"c+EuycPpudgiyVl6guYG9oyPSImHHJz1z0Pg4ODKveo="}, @@ -170,47 +174,49 @@ Open `~/layer/validator.json`: 4. **Create Your Validator:** At the time of writing, a few things need to happen (in order) to successfully start a validator. You will need to: - 1) Make the create-validator tx. - 2) Count to 10. - 3) Restart your node using a ./layerd command *not the script*. + 1. Make the create-validator tx. + 2. Count to 10. + 3. Restart your node using a ./layerd command *not the script*. Let's go! - 1) Run the following command: - ```sh - ./layerd tx staking create-validator ./validator.json --from $NODE_ADDRESS --home $LAYERD_NODE_HOME --chain-id layer --node="http://localhost:26657" --gas "400000" - ``` - 2) count to 10 - 3) In your node window, use `ctrl^c` to stop the node. Use this command to start it back up: - ```sh - ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=false --panic-on-daemon-failure-enabled=false --p2p.seeds "$TELLORNODE_ID@$LAYER_NODE_URL:26656" - ``` + 1. Run the following command: + + ```sh + ./layerd tx staking create-validator ./validator.json --from $NODE_ADDRESS --home $LAYERD_NODE_HOME --chain-id layer --node="http://localhost:26657" --gas "400000" + ``` + 2. count to 10 + 3. In your node window, use `ctrl^c` to stop the node. Use this command to start it back up: + + ```sh + ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=false --panic-on-daemon-failure-enabled=false --p2p.seeds "$TELLORNODE_ID@$LAYER_NODE_URL:26656" + ``` 5. **Verify Your Validator Creation:** Ensure your validator was created successfully using the command: + ```sh ./layerd query staking validator $(./layerd keys show $NODE_NAME --bech val --address --keyring-backend $KEYRING_BACKEND --home $LAYERD_NODE_HOME) --output json | jq ``` - If status is `3`, you are a validator and you're not jailed. Awesome! - If status is `2`, you created your validator, but it was jailed (it's ok, you can probably unjail later). +If status is `3`, you are a validator and you're not jailed. Awesome! +If status is `2`, you created your validator, but it was jailed (it's ok, you can probably unjail later). ## Part 2: Becoming a Reporter (and maybe unjail a little bit...) Once you’re successfully running a validator, you’re almost a reporter already! Just aone more command: - `` + + ```sh ./layerd tx reporter create-reporter "100000000000000000" "1000000" --from $NODE_NAME --keyring-backend test --chain-id layer --home $LAYERD_NODE_HOME ``` Restart your node again, but this time we will change the command a bit to turn on the price daemon: - ``` + ```sh ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=true --panic-on-daemon-failure-enabled=false ``` ## Steps to unjail: -Layer testnet is still experimental, and jailing can happen for various reasons while we work out the kinks. Make sure your terminal window (shell) has all the variables loaded before trying to build txs. - -Read all steps first because you have about 4 minutes to do everything or you will be jailed again for inactivity: +Layer testnet is still experimental, and jailing can happen for various reasons while we work out the kinks. Make sure your terminal window (shell) has all the variables loaded before trying to build txs. Read all steps first because you have about 4 minutes to do everything or you will be jailed again for inactivity: 1. stop your node / validator / reporter and start it back up as a node / validator (turning off the reporter): From 6c16cdfc97316648616cdb092fad7b0a4f22992f Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Tue, 16 Jul 2024 10:54:44 -0400 Subject: [PATCH 10/52] . --- public-testnet/guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public-testnet/guide.md b/public-testnet/guide.md index a0cecff..b0045b9 100644 --- a/public-testnet/guide.md +++ b/public-testnet/guide.md @@ -88,7 +88,7 @@ curl tellornode.com:26657/status eagle actress venue redacted style redacted potato still redacted final redacted increase redacted parent panda vapor redacted redacted twelve summer redacted redacted redacted redacted ``` - * **The script should only be run once, or if you want to start over from scratch!** It is intended to be used to delete your old chain and to configure the chain and start it all at once (for testing). Once your node is running, it can be restarted with a `./layerd start` command like the last command in start script. +*The script should only be run once, or if you want to start over from scratch! It is intended to be used to delete your old chain and to configure the chain and start it all at once (for testing). Once your node is running, it can be restarted with a `./layerd start` command like the last command in start script.* 8. **Run the Script:** * Give the script permission to execute: From c9bb9c3bd50859c1604afeba0d0705d86ffc5b90 Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Tue, 16 Jul 2024 11:00:07 -0400 Subject: [PATCH 11/52] . --- public-testnet/guide.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/public-testnet/guide.md b/public-testnet/guide.md index b0045b9..ce2fa27 100644 --- a/public-testnet/guide.md +++ b/public-testnet/guide.md @@ -47,7 +47,9 @@ cd layer ```json +{ "eth_api_key": "your_api_key" +} ``` @@ -205,15 +207,15 @@ If status is `2`, you created your validator, but it was jailed (it's ok, you ca Once you’re successfully running a validator, you’re almost a reporter already! Just aone more command: - ```sh - ./layerd tx reporter create-reporter "100000000000000000" "1000000" --from $NODE_NAME --keyring-backend test --chain-id layer --home $LAYERD_NODE_HOME - ``` +```sh +./layerd tx reporter create-reporter "100000000000000000" "1000000" --from $NODE_NAME --keyring-backend test --chain-id layer --home $LAYERD_NODE_HOME +``` Restart your node again, but this time we will change the command a bit to turn on the price daemon: - ```sh - ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=true --panic-on-daemon-failure-enabled=false - ``` +```sh +./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=true --panic-on-daemon-failure-enabled=false +``` ## Steps to unjail: Layer testnet is still experimental, and jailing can happen for various reasons while we work out the kinks. Make sure your terminal window (shell) has all the variables loaded before trying to build txs. Read all steps first because you have about 4 minutes to do everything or you will be jailed again for inactivity: From 3fb1f50000609ea8b267dc71e7ea93931c0d165b Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Tue, 16 Jul 2024 11:00:54 -0400 Subject: [PATCH 12/52] hint --- public-testnet/guide.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/public-testnet/guide.md b/public-testnet/guide.md index ce2fa27..360ea69 100644 --- a/public-testnet/guide.md +++ b/public-testnet/guide.md @@ -247,9 +247,7 @@ You can mint Layer Testnet TRB using the Sepolia Tellor Playground contract’s [https://sepolia.etherscan.io/address/0x7a261EAa9E8033B1337554df59bD462ca4A251FA#writeContract\ ](https://sepolia.etherscan.io/address/0x7a261EAa9E8033B1337554df59bD462ca4A251FA#writeContract) -{% hint style="success" %} -**Additional Resources** +{% hint style="success" %}**Additional Resources** * **Template Checklist:** [Google Sheets Checklist](https://docs.google.com/spreadsheets/d/1wT6nSM60KU6JD5PGHiKxPhUgwL0DQtOC-Rfo6BTitN8/edit#gid=0) -* **Project Checklists Folder:** [Google Drive Folder](https://drive.google.com/drive/u/1/folders/10Ixjl4fP7A7ZT-bPdIeTq9kI9XKkrvx\_) -{% endhint %} +* **Project Checklists Folder:** [Google Drive Folder](https://drive.google.com/drive/u/1/folders/10Ixjl4fP7A7ZT-bPdIeTq9kI9XKkrvx\_){% endhint %} From ae92691fe0f4233b97a4574b64ab2fa82287ff44 Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Tue, 16 Jul 2024 11:03:40 -0400 Subject: [PATCH 13/52] done for now --- public-testnet/guide.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public-testnet/guide.md b/public-testnet/guide.md index 360ea69..1c926da 100644 --- a/public-testnet/guide.md +++ b/public-testnet/guide.md @@ -58,7 +58,8 @@ cd layer ```sh layer_scripts/join_chain_new_node_linux.sh ``` - Note: If you're using a mac, use the corrisponding scripts for mac. If windows, use the linux scripts with Ubuntu or Debian WSL. + +Note: If you're using a mac, use the corrisponding scripts for mac. If windows, use the linux scripts with Ubuntu or Debian WSL. 6. **Edit Variables:** * `LAYER_NODE_URL`: Set to the unquoted URL (or public IPv4 address) of a seed node, like tellornode.com. @@ -247,7 +248,7 @@ You can mint Layer Testnet TRB using the Sepolia Tellor Playground contract’s [https://sepolia.etherscan.io/address/0x7a261EAa9E8033B1337554df59bD462ca4A251FA#writeContract\ ](https://sepolia.etherscan.io/address/0x7a261EAa9E8033B1337554df59bD462ca4A251FA#writeContract) -{% hint style="success" %}**Additional Resources** +}**Additional Resources** * **Template Checklist:** [Google Sheets Checklist](https://docs.google.com/spreadsheets/d/1wT6nSM60KU6JD5PGHiKxPhUgwL0DQtOC-Rfo6BTitN8/edit#gid=0) -* **Project Checklists Folder:** [Google Drive Folder](https://drive.google.com/drive/u/1/folders/10Ixjl4fP7A7ZT-bPdIeTq9kI9XKkrvx\_){% endhint %} +* **Project Checklists Folder:** [Google Drive Folder](https://drive.google.com/drive/u/1/folders/10Ixjl4fP7A7ZT-bPdIeTq9kI9XKkrvx\_) From 5dff747eddba5a78cec90a5fa35584c90dcd356b Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Tue, 16 Jul 2024 11:12:50 -0400 Subject: [PATCH 14/52] . --- public-testnet/guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public-testnet/guide.md b/public-testnet/guide.md index 1c926da..10c2830 100644 --- a/public-testnet/guide.md +++ b/public-testnet/guide.md @@ -97,7 +97,7 @@ curl tellornode.com:26657/status * Give the script permission to execute: ```sh - chmod +x /layer_scripts/join_chain_new_node_linux.sh + chmod +x layer_scripts/join_chain_new_node_linux.sh ``` * Run it: From bc3271db19e29095db1a40790af0215ee5a8385b Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Tue, 16 Jul 2024 11:14:43 -0400 Subject: [PATCH 15/52] . --- public-testnet/guide.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/public-testnet/guide.md b/public-testnet/guide.md index 10c2830..ae9f89a 100644 --- a/public-testnet/guide.md +++ b/public-testnet/guide.md @@ -123,16 +123,16 @@ You will need to have some layer testnet TRB into your validator account (see st Keep your node running. Open another window on your layer machine and load up your variables with the values used when your ran the join chain script. Leave the node running, but have it open so that you can use both windows quickly. Now, set the layer script variables in your new window: - ```sh - export LAYER_NODE_URL=54.166.101.67 \ - && export TELLORNODE_ID=9007e2991e7f07a016559aed4685f4ba0619c631 \ - && export KEYRING_BACKEND="test" \ - && export NODE_MONIKER="bobmoniker" \ - && export NODE_NAME="bob" \ - && export AMOUNT_IN_TRB=10000 \ - && export AMOUNT_IN_LOYA="1000000000loya" \ - && export LAYERD_NODE_HOME="$HOME/.layer/$NODE_NAME" - ``` +```sh +export LAYER_NODE_URL=54.166.101.67 \ +&& export TELLORNODE_ID=9007e2991e7f07a016559aed4685f4ba0619c631 \ +&& export KEYRING_BACKEND="test" \ +&& export NODE_MONIKER="bobmoniker" \ +&& export NODE_NAME="bob" \ +&& export AMOUNT_IN_TRB=10000 \ +&& export AMOUNT_IN_LOYA="1000000000loya" \ +&& export LAYERD_NODE_HOME="$HOME/.layer/$NODE_NAME" +``` Use `printenv` to double check that all the commands are set correctly. From ecfcffa56b4b643593eb81e23baf22ba9cca0028 Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Tue, 16 Jul 2024 11:15:19 -0400 Subject: [PATCH 16/52] asdf --- public-testnet/guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public-testnet/guide.md b/public-testnet/guide.md index ae9f89a..4afbf14 100644 --- a/public-testnet/guide.md +++ b/public-testnet/guide.md @@ -134,7 +134,7 @@ export LAYER_NODE_URL=54.166.101.67 \ && export LAYERD_NODE_HOME="$HOME/.layer/$NODE_NAME" ``` - Use `printenv` to double check that all the commands are set correctly. +Use `printenv` to double check that all the commands are set correctly. 1. **Verify That You Have a Funded Address:** From 13e8cbd3b38cc074351a574a4597c28c7ca35488 Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Tue, 16 Jul 2024 11:24:01 -0400 Subject: [PATCH 17/52] . --- public-testnet/guide.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public-testnet/guide.md b/public-testnet/guide.md index 4afbf14..8fb9f62 100644 --- a/public-testnet/guide.md +++ b/public-testnet/guide.md @@ -139,17 +139,17 @@ Use `printenv` to double check that all the commands are set correctly. 1. **Verify That You Have a Funded Address:** ```sh - ./layerd query bank balance $NODE_NAME loya --chain-id layer +./layerd query bank balance $NODE_NAME loya --chain-id layer ``` 2. **Retrieve Your Validator Public Key:** With your `layer` folder as the active directory, use the command: ```sh - ./layerd comet show-validator --home $LAYERD_NODE_HOME +./layerd comet show-validator --home $LAYERD_NODE_HOME ``` - This returns your validator pubkey (e.g., `{"@type":"/cosmos.crypto.ed25519.PubKey","key":"FX9cKNl+QmxtLcL926P5yJqZw7YyuSX3HQAZboz3TjM="}`). +This returns your validator pubkey (e.g., `{"@type":"/cosmos.crypto.ed25519.PubKey","key":"FX9cKNl+QmxtLcL926P5yJqZw7YyuSX3HQAZboz3TjM="}`). - Note: Your nodes home directory variable `LAYERD_NODE_HOME` needs to be set prior to running ./layerd commands when you're outside the scripts. [You can load variables into all new bash windows by adding the export commands to your shell's .bashrc file](https://unix.stackexchange.com/questions/117467/how-to-permanently-set-environmental-variables) (.zshrc on mac). +Note: Your nodes home directory variable `LAYERD_NODE_HOME` needs to be set prior to running ./layerd commands when you're outside the scripts. [You can load variables into all new bash windows by adding the export commands to your shell's .bashrc file](https://unix.stackexchange.com/questions/117467/how-to-permanently-set-environmental-variables) (.zshrc on mac). 3. **Edit the Validator Configuration File:** Open `~/layer/validator.json`: From 6205b099cf09593372d54037e9e3ab0009565b69 Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Tue, 16 Jul 2024 11:24:23 -0400 Subject: [PATCH 18/52] . --- public-testnet/guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public-testnet/guide.md b/public-testnet/guide.md index 8fb9f62..8884ff8 100644 --- a/public-testnet/guide.md +++ b/public-testnet/guide.md @@ -191,7 +191,7 @@ At the time of writing, a few things need to happen (in order) to successfully s 3. In your node window, use `ctrl^c` to stop the node. Use this command to start it back up: ```sh - ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=false --panic-on-daemon-failure-enabled=false --p2p.seeds "$TELLORNODE_ID@$LAYER_NODE_URL:26656" + ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=false --panic-on-daemon-failure-enabled=false ``` 5. **Verify Your Validator Creation:** From 29523e6548b351d630dd2091bfc7b8920122c191 Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Tue, 16 Jul 2024 13:34:27 -0400 Subject: [PATCH 19/52] asdf --- public-testnet/guide.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/public-testnet/guide.md b/public-testnet/guide.md index 8884ff8..26be410 100644 --- a/public-testnet/guide.md +++ b/public-testnet/guide.md @@ -221,7 +221,7 @@ Restart your node again, but this time we will change the command a bit to turn ## Steps to unjail: Layer testnet is still experimental, and jailing can happen for various reasons while we work out the kinks. Make sure your terminal window (shell) has all the variables loaded before trying to build txs. Read all steps first because you have about 4 minutes to do everything or you will be jailed again for inactivity: -1. stop your node / validator / reporter and start it back up as a node / validator (turning off the reporter): +1. stop your node / validator / reporter with and start it back up as a node / validator (turning off the reporter): ``` ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=false --panic-on-daemon-failure-enabled=false @@ -247,8 +247,3 @@ You can mint Layer Testnet TRB using the Sepolia Tellor Playground contract’s ](https://sepolia.etherscan.io/address/0x3251838bd813fdf6a97D32781e011cce8D225d59#writeContract)Once you have TRBP in your wallet, head over to the Layer Testnet bridge:\ [https://sepolia.etherscan.io/address/0x7a261EAa9E8033B1337554df59bD462ca4A251FA#writeContract\ ](https://sepolia.etherscan.io/address/0x7a261EAa9E8033B1337554df59bD462ca4A251FA#writeContract) - -}**Additional Resources** - -* **Template Checklist:** [Google Sheets Checklist](https://docs.google.com/spreadsheets/d/1wT6nSM60KU6JD5PGHiKxPhUgwL0DQtOC-Rfo6BTitN8/edit#gid=0) -* **Project Checklists Folder:** [Google Drive Folder](https://drive.google.com/drive/u/1/folders/10Ixjl4fP7A7ZT-bPdIeTq9kI9XKkrvx\_) From f0b9416919e1df657d337b943a34c6783c3e336a Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Tue, 16 Jul 2024 14:03:08 -0400 Subject: [PATCH 20/52] tellorvaloper --- public-testnet/guide.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/public-testnet/guide.md b/public-testnet/guide.md index 26be410..1d14de7 100644 --- a/public-testnet/guide.md +++ b/public-testnet/guide.md @@ -181,12 +181,28 @@ At the time of writing, a few things need to happen (in order) to successfully s 2. Count to 10. 3. Restart your node using a ./layerd command *not the script*. + Before we start do these things, we need to find your validator address. It's different from your normal "tellor" prefix address. Use the command: + + ```sh + ./layerd keys show $NODE_NAME --home $LAYERD_NODE_HOME --bech val + ``` + + The output will be your validator address with the "tellorvaloper" prefix. This is the address to use in your create-validator tx. Copy it for use in your create validator command. + + Then, run: + + ```sh + echo "$VALIDATOR_JSON" > ./validator.json + ``` + Let's go! - 1. Run the following command: + 1. Run the following commands: ```sh - ./layerd tx staking create-validator ./validator.json --from $NODE_ADDRESS --home $LAYERD_NODE_HOME --chain-id layer --node="http://localhost:26657" --gas "400000" + echo "$VALIDATOR_JSON" > ./validator.json + ./layerd tx staking create-validator ./validator.json --from tellorvaloperYOUR_ADDRESS_HERE --home $LAYERD_NODE_HOME --chain-id layer --node="http://localhost:26657" --gas "400000" ``` + 2. count to 10 3. In your node window, use `ctrl^c` to stop the node. Use this command to start it back up: From c88a3cf438d747cfebecd6ccda700ebce572981d Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Tue, 16 Jul 2024 14:11:41 -0400 Subject: [PATCH 21/52] asdf --- public-testnet/guide.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/public-testnet/guide.md b/public-testnet/guide.md index 1d14de7..75d9a22 100644 --- a/public-testnet/guide.md +++ b/public-testnet/guide.md @@ -191,15 +191,10 @@ At the time of writing, a few things need to happen (in order) to successfully s Then, run: - ```sh - echo "$VALIDATOR_JSON" > ./validator.json - ``` - Let's go! 1. Run the following commands: ```sh - echo "$VALIDATOR_JSON" > ./validator.json ./layerd tx staking create-validator ./validator.json --from tellorvaloperYOUR_ADDRESS_HERE --home $LAYERD_NODE_HOME --chain-id layer --node="http://localhost:26657" --gas "400000" ``` From 6a212f97ec6a617feddc5e3ffcd4ae55b46c0b9d Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Tue, 16 Jul 2024 15:03:24 -0400 Subject: [PATCH 22/52] . --- public-testnet/guide.md | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/public-testnet/guide.md b/public-testnet/guide.md index 75d9a22..ebdd879 100644 --- a/public-testnet/guide.md +++ b/public-testnet/guide.md @@ -181,21 +181,11 @@ At the time of writing, a few things need to happen (in order) to successfully s 2. Count to 10. 3. Restart your node using a ./layerd command *not the script*. - Before we start do these things, we need to find your validator address. It's different from your normal "tellor" prefix address. Use the command: - - ```sh - ./layerd keys show $NODE_NAME --home $LAYERD_NODE_HOME --bech val - ``` - - The output will be your validator address with the "tellorvaloper" prefix. This is the address to use in your create-validator tx. Copy it for use in your create validator command. - - Then, run: - Let's go! 1. Run the following commands: ```sh - ./layerd tx staking create-validator ./validator.json --from tellorvaloperYOUR_ADDRESS_HERE --home $LAYERD_NODE_HOME --chain-id layer --node="http://localhost:26657" --gas "400000" + ./layerd tx staking create-validator ./validator.json --from $NODE_NAME --home $LAYERD_NODE_HOME --chain-id layer --node="http://localhost:26657" --gas "400000" ``` 2. count to 10 From e0f4d99f44cde8a1c3b36b98e999ed31a6dff7fb Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Wed, 17 Jul 2024 09:29:07 -0400 Subject: [PATCH 23/52] still working --- public-testnet/guide.md | 81 +++++++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 39 deletions(-) diff --git a/public-testnet/guide.md b/public-testnet/guide.md index ebdd879..321960c 100644 --- a/public-testnet/guide.md +++ b/public-testnet/guide.md @@ -3,48 +3,35 @@ ### *Note: This is a guide for setting up a Tellor Layer public testnet validator / reporter. Care is taken to provide info on the tools being used, but testers should be comfortable with running experimental code via command line interface. A beginner’s understanding of the cosmos SDK is highly recommended!* This guide has three sections: -1. Run a Tellor Layer node. -2. Stake and become a Validator -3. Create a reporter (and unjail if needed) +1. Build and Configure layerd +2. Run a Tellor Layer node. +3. Stake and become a Validator +4. Create a reporter (and unjail if needed) ### Pre-requisites * A local or cloud system running linux (or mac os with the mac scripts) * Golang v1.22 (install instrauctions [here](https://go.dev/doc/install)) -* jq, yq, and sed for running the scripts: - * Install jq - * For mac: brew install jq - * For linux Ubuntu: sudo apt-get install jq - * Install yq - * For mac: brew install yq - * For linux Ubuntu: sudo apt-get install yq - * Install sed - * For mac: brew install sed - * For linux: sudo apt-get install sed - -## Part 1: Run a Layer Node -### **Steps for Starting a Layer Node Using the Provided Shell Scripts** +* jq +* yq +* sed -{% hint style="warning" %} -**Note:** The test backend is not recommended for production use with real funds. Always handle mnemonics/keys with extreme care, even if it’s just a testnet address. -{% endhint %} - -1. **Clone the Layer Repository:** +## Part 1: Build and Configure layerd +There are 7 steps in this part. +1. Clone the Layer repo and change directory to `layer`: ```sh -git clone https://github.com/tellor-io/layer -b public-testnet +git clone https://github.com/tellor-io/layer -b public-testnet && cd layer ``` -2. **Change Active Directory:** +2. **An ethereum RPC is used for reporting tellor bridge transactions.** +Using your favorite text editor, create a file called `secrets.json`: ```sh -cd layer +nano secrets.json ``` -3. **Create a file named** `secrets.json` in the layer folder. -4. **Set an alchemy api key for eth rpc.** \ - The file, secrets.json, should contain a single line (replace with your own Alchemy API key): \ - +Add this code to the file, replacing `your_api_key` with your Alchemy api key: ```json { @@ -52,16 +39,10 @@ cd layer } ``` +Close the file with `crtl^x` `y` to save your changes. -5. **Open the Script:** Using your favorite text editor (like nano, vim, or code), open: - -```sh -layer_scripts/join_chain_new_node_linux.sh -``` - -Note: If you're using a mac, use the corrisponding scripts for mac. If windows, use the linux scripts with Ubuntu or Debian WSL. - -6. **Edit Variables:** +3. **Add variables to .bashrc** +Layer needs some information about your setup to be able to run. For the purposes of this guide we will use the following variables: * `LAYER_NODE_URL`: Set to the unquoted URL (or public IPv4 address) of a seed node, like tellornode.com. * `KEYRING_BACKEND`: Set to `test` by default but can be configured here. (test works fine) * `NODE_MONIKER`: Set to whatever you use for the node name + “moniker” at the end (e.g., “billmoniker”). @@ -69,12 +50,33 @@ Note: If you're using a mac, use the corrisponding scripts for mac. If windows, * `TELLORNODE_ID`: Set to the unquoted node ID of the seed node. * `LAYERD_NODE_HOME`: Should be set to "$HOME/.layer/$NODE_NAME" - Note: The provided node ID will be incorrect if the test chain was restarted. This can be checked by running: +It's usually easiest to add them as exports in your `.bashrc` or `zshrc` file so that they are automatically loaded in new windows. Open your `.bashrc` file and add these lines at the end: ```sh -curl tellornode.com:26657/status +# layer +export LAYER_NODE_URL=54.166.101.67 +export TELLORNODE_ID=72a0284c589e1e11823c27580bfbcbaa32a769e7 +export KEYRING_BACKEND="test" +export NODE_MONIKER="bobmoniker" +export ACCOUNT_NAME="bob" +export LAYERD_NODE_HOME="$HOME/.layer/$NODE_NAME" ``` +*Note: We may need to reset the chain a few more times while we cook. This causes the `TELLORNODE_ID` to change. You can check the current correct id with:* + + ```sh + curl tellornode.com:26657/status + ``` + +4. Create an account on Layer +You will need an account on layer to hold your TRB tokens that you will stake to become a validator reporter. + +## Part 2: Run a Layer Node + +{% hint style="warning" %} +**Note:** The test backend is not recommended for production use with real funds. Always handle mnemonics/keys with extreme care, even if it’s just a testnet address. +{% endhint %} + 7. **Important Things to Know Before Running the Script:** * When you start the script (which you haven't done yet),***a test wallet key pair/mnemonic will be created and printed in the terminal. You will need this address to run your validator. There will be a pause allowing you to copy it before it's burried by the node log.*** It will look something like this: @@ -201,6 +203,7 @@ Ensure your validator was created successfully using the command: ```sh ./layerd query staking validator $(./layerd keys show $NODE_NAME --bech val --address --keyring-backend $KEYRING_BACKEND --home $LAYERD_NODE_HOME) --output json | jq ``` + If status is `3`, you are a validator and you're not jailed. Awesome! If status is `2`, you created your validator, but it was jailed (it's ok, you can probably unjail later). From e88780679fcfd6f8db6e7fe2244783e7ae0becd6 Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Wed, 17 Jul 2024 12:20:16 -0400 Subject: [PATCH 24/52] no scripts necessary setup guide --- .../1_install_layer_and_run_node.md | 155 ++++++ .../2_become_a_validator_reporter.md | 129 +++++ public-testnet/config_files/app.toml | 236 +++++++++ public-testnet/config_files/client.toml | 17 + public-testnet/config_files/config.toml | 482 ++++++++++++++++++ public-testnet/configure_layer.sh | 61 +++ public-testnet/{guide.md => guide copy.md} | 0 7 files changed, 1080 insertions(+) create mode 100644 public-testnet/1_install_layer_and_run_node.md create mode 100644 public-testnet/2_become_a_validator_reporter.md create mode 100644 public-testnet/config_files/app.toml create mode 100644 public-testnet/config_files/client.toml create mode 100644 public-testnet/config_files/config.toml create mode 100755 public-testnet/configure_layer.sh rename public-testnet/{guide.md => guide copy.md} (100%) diff --git a/public-testnet/1_install_layer_and_run_node.md b/public-testnet/1_install_layer_and_run_node.md new file mode 100644 index 0000000..5a0cf97 --- /dev/null +++ b/public-testnet/1_install_layer_and_run_node.md @@ -0,0 +1,155 @@ +# Public Testnet Guide + +### *Note: This is a guide for setting up a Tellor Layer public testnet validator / reporter. Care is taken to provide info on the tools being used, but testers should be comfortable with running experimental code via command line interface. A beginner’s understanding of the cosmos SDK is highly recommended!* + +This guide has three sections: +1. Build and Configure layerd +2. Run a Tellor Layer node. +3. Stake and become a Validator +4. Create a reporter (and unjail if needed) + +### Pre-requisites + +* A local or cloud system running linux (or mac os with the mac scripts) +* Golang v1.22 (install instrauctions [here](https://go.dev/doc/install)) +* jq +* yq +* sed + +## Part 1: Build and Configure layerd +There are 7 steps in this part. + +1. Clone the Layer repo and change directory to `layer`: + +```sh +git clone https://github.com/tellor-io/layer -b public-testnet && cd layer +``` + +2. Build layerd with the command: + +```sh +go build ./cmd/layerd +``` + +3. **An ethereum RPC is used for reporting tellor bridge transactions.** +Using your favorite text editor, create a file called `secrets.json`: + +```sh +nano secrets.json +``` + +Add this code to the file, replacing `your_api_key` with your Alchemy api key: + +```json +{ +"eth_api_key": "your_api_key" +} +``` + +Close the file with `crtl^x` `y` to save your changes. + +4. **Add variables to .bashrc** +*Setting variables in .bashrc is not required, but it helps to avoid errors because the variables are set on terminal startup.* + +Here is a list of variables we will use in this guide and a short description of their purpose: + * `LAYER_NODE_URL`: Set to the unquoted URL (or public IPv4 address) of a seed node, like tellornode.com. + * `KEYRING_BACKEND`: Set to `test` by default but can be configured here. (test works fine) + * `NODE_MONIKER`: Set to whatever you'd like to use for your validator's public readable name (e.g "bob"). + * `ACCOUNT_NAME`: Set to your name or whatever name you choose (like “bill” or "ruth"). + * `TELLORNODE_ID`: Set to the unquoted node ID of the seed node. + * `LAYERD_NODE_HOME`: Should be set to "$HOME/.layer/$NODE_NAME" + +Open your `.bashrc` or `zshrc` file and add these lines at the end. replace "bob" with the values you choose: + +```sh +# layer +export LAYER_NODE_URL=54.166.101.67 +export TELLORNODE_ID=72a0284c589e1e11823c27580bfbcbaa32a769e7 +export KEYRING_BACKEND="test" +export NODE_MONIKER="bobmoniker" +export ACCOUNT_NAME="bob" +export LAYERD_NODE_HOME="$HOME/.layer/$ACCOUNT_NAME" +``` + +Restart your terminal, or use `source ~/.bashrc` before you continue. + +*Note: We may need to reset the chain a few more times while we cook. This causes the `TELLORNODE_ID` to change. You can check the current correct id with:* + +```sh +curl tellornode.com:26657/status +``` + +4. **Initialize config folders** + +```sh +./layerd init layer --chain-id layer +``` + +5. **Initialize a named config folder** + +```sh +./layerd init $NODE_MONIKER --chain-id layer --home ~/.layer/$ACCOUNT_NAME +``` + + +5. **Create an account on Layer** +You will need a "wallet" account on layer to hold your TRB tokens that you will stake to become a validator reporter. + +**Security Tips:** 1. The test backend is not recommended for production use with real funds because the keys are stored as plain text. Always use a secure keyring-backend option for real funds! 2. Handle mnemonics/keys with extreme care, even if it’s just a testnet address! 3. Never use an address that holds real mainnet funds for testing! + + You can check accounts any time with: + + ```sh + ./layerd keys list --keyring-backend $KEYRING_BACKEND --home $LAYERD_NODE_HOME + ``` + +**If you do not yet have an account / mnemonic** + Generate a new key pair with the command: + + ```sh + ./layerd keys add $ACCOUNT_NAME --keyring-backend $KEYRING_BACKEND --home $LAYERD_NODE_HOME + ``` + **Be sure to copy the entire output with the mnemonic and keep it in a very safe place!** + +**If you already have an account / pnemonic** + Import your account with the command: + (You will be prompted to input your mnemonic) + + ```sh + ./layerd keys add $ACCOUNT_NAME --recover=true --keyring-backend $KEYRING_BACKEND --home $LAYERD_NODE_HOME + ``` + +6. **Run the configure_layer script (or manually replace config files)** +We need to change the config files a bit using the provided `configure_layer.sh` shell script. +Download the script onto your computer: + +```sh +wget path/configure_layer.sh # (change path accordingly) +``` + +Give it permission to execute and run it: + +```sh +chmod +x configure_layer.sh && ./configure_layer.sh # (change path accordingly) +``` + +Alternatively, you can download the configured config files [here](link). If using this method: +- First open up config.toml and relpace `moniker = "billmoniker"` with your node moniker. +- Navigate to `~/.layer/config` and replace app.toml, client.toml, and config.toml with the properly configured configs. +- Navigate to `~/.layer/$ACCOUNT_NAME/config` and replace the files there also. + +If you've completed the install layer section, you're ready to try running a layer node! + +## Run a Layer Node! + +*Before starting your node, think about how you want to run it so that the process does not get killed accidentally. GNU screen(link) is a great option for beginners. More advanced setups can be achieved using systemd (link). + +Make sure to load your node variables. (use `source ~/.bashrc` if necessary) + +Then run the command: + +```sh +./layerd start --home $LAYERD_NODE_HOME --api.swagger --price-daemon-enabled=false +``` + +If your node is configured correctly, you should see the node connecting to endopoints before rapidly downloading blocks. congrats! diff --git a/public-testnet/2_become_a_validator_reporter.md b/public-testnet/2_become_a_validator_reporter.md new file mode 100644 index 0000000..a559a3f --- /dev/null +++ b/public-testnet/2_become_a_validator_reporter.md @@ -0,0 +1,129 @@ +# Part 2: Become a Validator + +Once you have a working node, you can try running a validator. + +You will need to have some layer testnet TRB. Feel free to send us your tellor prefixed address / request in the public [discord](https://discord.gg/tellor) #testing-layer channel, or [try the token bridge from the Sepolia testnet playground.](guide.md#getting-testnet-trb) + +Keep your node running. Open up another screen or terminal winodw on your layer machine. If you added the variables to your .bashrc file they should load autmatically. + +*Note: You will need to have quick access to the node window and new window as you go though the steps.* + +1. **Check if your node is synced:** +If you cannot read the log as it's being printed, the node still syncing. +Syncing can a while (>1hr) so please be patient and wait until your node is ready before you proceed. + +2. **Check if your address has funds** + +```sh +./layerd query bank balance $ACCOUNT_NAME loya --chain-id layer +``` + +2. **Retrieve Your Validator Public Key:** +With your `layer` folder as the active directory, use the command: + +```sh +./layerd comet show-validator --home $LAYERD_NODE_HOME +``` + +This returns your validator pubkey (e.g., `{"@type":"/cosmos.crypto.ed25519.PubKey","key":"FX9cKNl+QmxtLcL926P5yJqZw7YyuSX3HQAZboz3TjM="}`). Copy this for the next step. + +3. **Edit the Validator Configuration File:** +Open `~/layer/validator.json`: + + ```json + { + "pubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"c+EuycPpudgiyVl6guYG9oyPSImHHJz1z0Pg4ODKveo="}, + "amount": "100000000000loya", + "moniker": "billmoniker", + "identity": "optional identity signature (ex. UPort or Keybase)", + "website": "validator's (optional) website", + "security": "validator's (optional) security contact email", + "details": "validator's (optional) details", + "commission-rate": "0.1", + "commission-max-rate": "0.2", + "commission-max-change-rate": "0.01", + "min-self-delegation": "1" + } + ``` +- Edit `"pubkey"` to match yours from step 2. +- Edit `"amount"` to be the amount of testnet TRB that you would like to stake with 6 decimals and the "loya" denom. + (For example: if you want to stake 99 TRB use `"amount": "99000000loya"`) +- Edit `"moniker"` to match your node moniker variable. + + **Note:** TRB tokens are used for gas on the layer network. As a validator you will need to make transactions to send tokens, become a reporter, unjail, etc. When choosing the amount to stake, it is important to reserve some TRB for gas. + +4. **Create Your Validator:** +A few things need to happen (in order) to successfully start a layer validator. +You will: +1. Make the create-validator tx. +2. Count to 10. +3. Restart your node. + + Let's go! + 1. Run the following commands: + + ```sh + ./layerd tx staking create-validator ./validator.json --from $ACCOUNT_NAME --home $LAYERD_NODE_HOME --chain-id layer --node="http://localhost:26657" --gas "400000" + ``` + + 2. count to 10 + 3. In your node window, use `ctrl^c` to stop the node. Use this command to start it back up: + + ```sh + ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=false --panic-on-daemon-failure-enabled=false + ``` + +5. **Verify Your Validator Creation:** +Ensure your validator was created successfully using the command: + + ```sh + ./layerd query staking validator $(./layerd keys show $ACCOUNT_NAME --bech val --address --keyring-backend $KEYRING_BACKEND --home $LAYERD_NODE_HOME) --output json | jq + ``` + + +If status is `3`, you are a validator and you're not jailed. Awesome! +If status is `2`, you created your validator, but it was jailed (it's ok, you can probably unjail later). + +## Part 2: Becoming a Reporter (and maybe unjail a little bit...) + +Once you’re successfully running a validator, you’re almost a reporter already! Just aone more command: + +```sh +./layerd tx reporter create-reporter "100000000000000000" "1000000" --from $ACCOUNT_NAME --keyring-backend test --chain-id layer --home $LAYERD_NODE_HOME +``` + +Restart your node again, but this time we will change the command a bit to turn on the price daemon: + +```sh +./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=true --panic-on-daemon-failure-enabled=false +``` + +## Steps to unjail: +Layer testnet is still experimental, and jailing can happen for various reasons while we work out the kinks. Make sure your terminal window (shell) has all the variables loaded before trying to build txs. Read all steps first because you have about 4 minutes to do everything or you will be jailed again for inactivity: + +1. stop your node / validator / reporter with and start it back up as a node / validator (turning off the reporter): + + ``` + ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=false --panic-on-daemon-failure-enabled=false + ``` + +2. enter the unjail the command: + + ``` + ./layerd tx slashing unjail --from $ACCOUNT_NAME --chain-id layer --yes + ``` + +3. Restart the node with reporter daemon turned on: + + ``` + ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=true --panic-on-daemon-failure-enabled=false + ``` + +### Getting Testnet TRB + +You can mint Layer Testnet TRB using the Sepolia Tellor Playground contract’s “faucet” command:\ +[https://sepolia.etherscan.io/address/0x3251838bd813fdf6a97D32781e011cce8D225d59#writeContract\ +\ +](https://sepolia.etherscan.io/address/0x3251838bd813fdf6a97D32781e011cce8D225d59#writeContract)Once you have TRBP in your wallet, head over to the Layer Testnet bridge:\ +[https://sepolia.etherscan.io/address/0x7a261EAa9E8033B1337554df59bD462ca4A251FA#writeContract\ +](https://sepolia.etherscan.io/address/0x7a261EAa9E8033B1337554df59bD462ca4A251FA#writeContract) diff --git a/public-testnet/config_files/app.toml b/public-testnet/config_files/app.toml new file mode 100644 index 0000000..609f77b --- /dev/null +++ b/public-testnet/config_files/app.toml @@ -0,0 +1,236 @@ +# This is a TOML config file. +# For more information, see https://github.com/toml-lang/toml + +############################################################################### +### Base Configuration ### +############################################################################### + +# The minimum gas prices a validator is willing to accept for processing a +# transaction. A transaction's fees must meet the minimum of any denomination +# specified in this config (e.g. 0.25token1,0.0001token2). +minimum-gas-prices = "0stake" + +# The maximum gas a query coming over rest/grpc may consume. +# If this is set to zero, the query can consume an unbounded amount of gas. +query-gas-limit = "0" + +# default: the last 362880 states are kept, pruning at 10 block intervals +# nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node) +# everything: 2 latest states will be kept; pruning at 10 block intervals. +# custom: allow pruning options to be manually specified through 'pruning-keep-recent', and 'pruning-interval' +pruning = "default" + +# These are applied if and only if the pruning strategy is custom. +pruning-keep-recent = "0" +pruning-interval = "0" + +# HaltHeight contains a non-zero block height at which a node will gracefully +# halt and shutdown that can be used to assist upgrades and testing. +# +# Note: Commitment of state will be attempted on the corresponding block. +halt-height = 0 + +# HaltTime contains a non-zero minimum block time (in Unix seconds) at which +# a node will gracefully halt and shutdown that can be used to assist upgrades +# and testing. +# +# Note: Commitment of state will be attempted on the corresponding block. +halt-time = 0 + +# MinRetainBlocks defines the minimum block height offset from the current +# block being committed, such that all blocks past this offset are pruned +# from CometBFT. It is used as part of the process of determining the +# ResponseCommit.RetainHeight value during ABCI Commit. A value of 0 indicates +# that no blocks should be pruned. +# +# This configuration value is only responsible for pruning CometBFT blocks. +# It has no bearing on application state pruning which is determined by the +# "pruning-*" configurations. +# +# Note: CometBFT block pruning is dependant on this parameter in conjunction +# with the unbonding (safety threshold) period, state pruning and state sync +# snapshot parameters to determine the correct minimum value of +# ResponseCommit.RetainHeight. +min-retain-blocks = 0 + +# InterBlockCache enables inter-block caching. +inter-block-cache = true + +# IndexEvents defines the set of events in the form {eventType}.{attributeKey}, +# which informs CometBFT what to index. If empty, all events will be indexed. +# +# Example: +# ["message.sender", "message.recipient"] +index-events = [] + +# IavlCacheSize set the size of the iavl tree cache (in number of nodes). +iavl-cache-size = 781250 + +# IAVLDisableFastNode enables or disables the fast node feature of IAVL. +# Default is false. +iavl-disable-fastnode = false + +# AppDBBackend defines the database backend type to use for the application and snapshots DBs. +# An empty string indicates that a fallback will be used. +# The fallback is the db_backend value set in CometBFT's config.toml. +app-db-backend = "" + +############################################################################### +### Telemetry Configuration ### +############################################################################### + +[telemetry] + +# Prefixed with keys to separate services. +service-name = "" + +# Enabled enables the application telemetry functionality. When enabled, +# an in-memory sink is also enabled by default. Operators may also enabled +# other sinks such as Prometheus. +enabled = false + +# Enable prefixing gauge values with hostname. +enable-hostname = false + +# Enable adding hostname to labels. +enable-hostname-label = false + +# Enable adding service to labels. +enable-service-label = false + +# PrometheusRetentionTime, when positive, enables a Prometheus metrics sink. +prometheus-retention-time = 0 + +# GlobalLabels defines a global set of name/value label tuples applied to all +# metrics emitted using the wrapper functions defined in telemetry package. +# +# Example: +# [["chain_id", "cosmoshub-1"]] +global-labels = [ +] + +# MetricsSink defines the type of metrics sink to use. +metrics-sink = "" + +# StatsdAddr defines the address of a statsd server to send metrics to. +# Only utilized if MetricsSink is set to "statsd" or "dogstatsd". +statsd-addr = "" + +# DatadogHostname defines the hostname to use when emitting metrics to +# Datadog. Only utilized if MetricsSink is set to "dogstatsd". +datadog-hostname = "" + +############################################################################### +### API Configuration ### +############################################################################### + +[api] + +# Enable defines if the API server should be enabled. +enable = false + +# Swagger defines if swagger documentation should automatically be registered. +swagger = false + +# Address defines the API server to listen on. +address = "tcp://0.0.0.0:1317" + +# MaxOpenConnections defines the number of maximum open connections. +max-open-connections = 1000 + +# RPCReadTimeout defines the CometBFT RPC read timeout (in seconds). +rpc-read-timeout = 10 + +# RPCWriteTimeout defines the CometBFT RPC write timeout (in seconds). +rpc-write-timeout = 0 + +# RPCMaxBodyBytes defines the CometBFT maximum request body (in bytes). +rpc-max-body-bytes = 1000000 + +# EnableUnsafeCORS defines if CORS should be enabled (unsafe - use it at your own risk). +enabled-unsafe-cors = false + +############################################################################### +### gRPC Configuration ### +############################################################################### + +[grpc] + +# Enable defines if the gRPC server should be enabled. +enable = true + +# Address defines the gRPC server address to bind to. +address = "localhost:9090" + +# MaxRecvMsgSize defines the max message size in bytes the server can receive. +# The default value is 10MB. +max-recv-msg-size = "10485760" + +# MaxSendMsgSize defines the max message size in bytes the server can send. +# The default value is math.MaxInt32. +max-send-msg-size = "2147483647" + +############################################################################### +### gRPC Web Configuration ### +############################################################################### + +[grpc-web] + +# GRPCWebEnable defines if the gRPC-web should be enabled. +# NOTE: gRPC must also be enabled, otherwise, this configuration is a no-op. +# NOTE: gRPC-Web uses the same address as the API server. +enable = true + +############################################################################### +### State Sync Configuration ### +############################################################################### + +# State sync snapshots allow other nodes to rapidly join the network without replaying historical +# blocks, instead downloading and applying a snapshot of the application state at a given height. +[state-sync] + +# snapshot-interval specifies the block interval at which local state sync snapshots are +# taken (0 to disable). +snapshot-interval = 0 + +# snapshot-keep-recent specifies the number of recent snapshots to keep and serve (0 to keep all). +snapshot-keep-recent = 2 + +############################################################################### +### State Streaming ### +############################################################################### + +# Streaming allows nodes to stream state to external systems. +[streaming] + +# streaming.abci specifies the configuration for the ABCI Listener streaming service. +[streaming.abci] + +# List of kv store keys to stream out via gRPC. +# The store key names MUST match the module's StoreKey name. +# +# Example: +# ["acc", "bank", "gov", "staking", "mint"[,...]] +# ["*"] to expose all keys. +keys = [] + +# The plugin name used for streaming via gRPC. +# Streaming is only enabled if this is set. +# Supported plugins: abci +plugin = "" + +# stop-node-on-err specifies whether to stop the node on message delivery error. +stop-node-on-err = true + +############################################################################### +### Mempool ### +############################################################################### + +[mempool] +# Setting max-txs to 0 will allow for a unbounded amount of transactions in the mempool. +# Setting max_txs to negative 1 (-1) will disable transactions from being inserted into the mempool (no-op mempool). +# Setting max_txs to a positive number (> 0) will limit the number of transactions in the mempool, by the specified amount. +# +# Note, this configuration only applies to SDK built-in app-side mempool +# implementations. +max-txs = -1 diff --git a/public-testnet/config_files/client.toml b/public-testnet/config_files/client.toml new file mode 100644 index 0000000..e6740b0 --- /dev/null +++ b/public-testnet/config_files/client.toml @@ -0,0 +1,17 @@ +# This is a TOML config file. +# For more information, see https://github.com/toml-lang/toml + +############################################################################### +### Client Configuration ### +############################################################################### + +# The network chain ID +chain-id = "" +# The keyring's backend, where the keys are stored (os|file|kwallet|pass|test|memory) +keyring-backend = "test" +# CLI output format (text|json) +output = "text" +# : to CometBFT RPC interface for this chain +node = "tcp://localhost:26657" +# Transaction broadcasting mode (sync|async) +broadcast-mode = "sync" diff --git a/public-testnet/config_files/config.toml b/public-testnet/config_files/config.toml new file mode 100644 index 0000000..c41d7fd --- /dev/null +++ b/public-testnet/config_files/config.toml @@ -0,0 +1,482 @@ +# This is a TOML config file. +# For more information, see https://github.com/toml-lang/toml + +# NOTE: Any path below can be absolute (e.g. "/var/myawesomeapp/data") or +# relative to the home directory (e.g. "data"). The home directory is +# "$HOME/.cometbft" by default, but could be changed via $CMTHOME env variable +# or --home cmd flag. + +# The version of the CometBFT binary that created or +# last modified the config file. Do not modify this. +version = "0.38.7" + +####################################################################### +### Main Base Config Options ### +####################################################################### + +# TCP or UNIX socket address of the ABCI application, +# or the name of an ABCI application compiled in with the CometBFT binary +proxy_app = "tcp://127.0.0.1:26658" + +# A custom human readable name for this node +moniker = "billmoniker" + +# Database backend: goleveldb | cleveldb | boltdb | rocksdb | badgerdb +# * goleveldb (github.com/syndtr/goleveldb - most popular implementation) +# - pure go +# - stable +# * cleveldb (uses levigo wrapper) +# - fast +# - requires gcc +# - use cleveldb build tag (go build -tags cleveldb) +# * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt) +# - EXPERIMENTAL +# - may be faster is some use-cases (random reads - indexer) +# - use boltdb build tag (go build -tags boltdb) +# * rocksdb (uses github.com/tecbot/gorocksdb) +# - EXPERIMENTAL +# - requires gcc +# - use rocksdb build tag (go build -tags rocksdb) +# * badgerdb (uses github.com/dgraph-io/badger) +# - EXPERIMENTAL +# - use badgerdb build tag (go build -tags badgerdb) +db_backend = "goleveldb" + +# Database directory +db_dir = "data" + +# Output level for logging, including package level options +log_level = "info" + +# Output format: 'plain' (colored text) or 'json' +log_format = "plain" + +##### additional base config options ##### + +# Path to the JSON file containing the initial validator set and other meta data +genesis_file = "config/genesis.json" + +# Path to the JSON file containing the private key to use as a validator in the consensus protocol +priv_validator_key_file = "config/priv_validator_key.json" + +# Path to the JSON file containing the last sign state of a validator +priv_validator_state_file = "data/priv_validator_state.json" + +# TCP or UNIX socket address for CometBFT to listen on for +# connections from an external PrivValidator process +priv_validator_laddr = "" + +# Path to the JSON file containing the private key to use for node authentication in the p2p protocol +node_key_file = "config/node_key.json" + +# Mechanism to connect to the ABCI application: socket | grpc +abci = "socket" + +# If true, query the ABCI app on connecting to a new peer +# so the app can decide if we should keep the connection or not +filter_peers = false + + +####################################################################### +### Advanced Configuration Options ### +####################################################################### + +####################################################### +### RPC Server Configuration Options ### +####################################################### +[rpc] + +# TCP or UNIX socket address for the RPC server to listen on +laddr = "tcp://0.0.0.0:26657" + +# A list of origins a cross-domain request can be executed from +# Default value '[]' disables cors support +# Use '["*"]' to allow any origin +cors_allowed_origins = ["*"] + +# A list of methods the client is allowed to use with cross-domain requests +cors_allowed_methods = ["HEAD", "GET", "POST", ] + +# A list of non simple headers the client is allowed to use with cross-domain requests +cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", ] + +# TCP or UNIX socket address for the gRPC server to listen on +# NOTE: This server only supports /broadcast_tx_commit +grpc_laddr = "" + +# Maximum number of simultaneous connections. +# Does not include RPC (HTTP&WebSocket) connections. See max_open_connections +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} +# 1024 - 40 - 10 - 50 = 924 = ~900 +grpc_max_open_connections = 900 + +# Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool +unsafe = false + +# Maximum number of simultaneous connections (including WebSocket). +# Does not include gRPC connections. See grpc_max_open_connections +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} +# 1024 - 40 - 10 - 50 = 924 = ~900 +max_open_connections = 900 + +# Maximum number of unique clientIDs that can /subscribe +# If you're using /broadcast_tx_commit, set to the estimated maximum number +# of broadcast_tx_commit calls per block. +max_subscription_clients = 100 + +# Maximum number of unique queries a given client can /subscribe to +# If you're using GRPC (or Local RPC client) and /broadcast_tx_commit, set to +# the estimated # maximum number of broadcast_tx_commit calls per block. +max_subscriptions_per_client = 5 + +# Experimental parameter to specify the maximum number of events a node will +# buffer, per subscription, before returning an error and closing the +# subscription. Must be set to at least 100, but higher values will accommodate +# higher event throughput rates (and will use more memory). +experimental_subscription_buffer_size = 200 + +# Experimental parameter to specify the maximum number of RPC responses that +# can be buffered per WebSocket client. If clients cannot read from the +# WebSocket endpoint fast enough, they will be disconnected, so increasing this +# parameter may reduce the chances of them being disconnected (but will cause +# the node to use more memory). +# +# Must be at least the same as "experimental_subscription_buffer_size", +# otherwise connections could be dropped unnecessarily. This value should +# ideally be somewhat higher than "experimental_subscription_buffer_size" to +# accommodate non-subscription-related RPC responses. +experimental_websocket_write_buffer_size = 200 + +# If a WebSocket client cannot read fast enough, at present we may +# silently drop events instead of generating an error or disconnecting the +# client. +# +# Enabling this experimental parameter will cause the WebSocket connection to +# be closed instead if it cannot read fast enough, allowing for greater +# predictability in subscription behavior. +experimental_close_on_slow_client = false + +# How long to wait for a tx to be committed during /broadcast_tx_commit. +# WARNING: Using a value larger than 10s will result in increasing the +# global HTTP write timeout, which applies to all connections and endpoints. +# See https://github.com/tendermint/tendermint/issues/3435 +timeout_broadcast_tx_commit = "10s" + +# Maximum size of request body, in bytes +max_body_bytes = 1000000 + +# Maximum size of request header, in bytes +max_header_bytes = 1048576 + +# The path to a file containing certificate that is used to create the HTTPS server. +# Might be either absolute path or path related to CometBFT's config directory. +# If the certificate is signed by a certificate authority, +# the certFile should be the concatenation of the server's certificate, any intermediates, +# and the CA's certificate. +# NOTE: both tls_cert_file and tls_key_file must be present for CometBFT to create HTTPS server. +# Otherwise, HTTP server is run. +tls_cert_file = "" + +# The path to a file containing matching private key that is used to create the HTTPS server. +# Might be either absolute path or path related to CometBFT's config directory. +# NOTE: both tls-cert-file and tls-key-file must be present for CometBFT to create HTTPS server. +# Otherwise, HTTP server is run. +tls_key_file = "" + +# pprof listen address (https://golang.org/pkg/net/http/pprof) +pprof_laddr = "localhost:6060" + +####################################################### +### P2P Configuration Options ### +####################################################### +[p2p] + +# Address to listen for incoming connections +laddr = "tcp://0.0.0.0:26656" + +# Address to advertise to peers for them to dial. If empty, will use the same +# port as the laddr, and will introspect on the listener to figure out the +# address. IP and port are required. Example: 159.89.10.97:26656 +external_address = "" + +# Comma separated list of seed nodes to connect to +seeds = "72a0284c589e1e11823c27580bfbcbaa32a769e7@54.166.101.67:26656" + +# Comma separated list of nodes to keep persistent connections to +persistent_peers = "72a0284c589e1e11823c27580bfbcbaa32a769e7@54.166.101.67:26656" + +# Path to address book +addr_book_file = "config/addrbook.json" + +# Set true for strict address routability rules +# Set false for private or local networks +addr_book_strict = true + +# Maximum number of inbound peers +max_num_inbound_peers = 40 + +# Maximum number of outbound peers to connect to, excluding persistent peers +max_num_outbound_peers = 10 + +# List of node IDs, to which a connection will be (re)established ignoring any existing limits +unconditional_peer_ids = "" + +# Maximum pause when redialing a persistent peer (if zero, exponential backoff is used) +persistent_peers_max_dial_period = "0s" + +# Time to wait before flushing messages out on the connection +flush_throttle_timeout = "100ms" + +# Maximum size of a message packet payload, in bytes +max_packet_msg_payload_size = 1024 + +# Rate at which packets can be sent, in bytes/second +send_rate = 5120000 + +# Rate at which packets can be received, in bytes/second +recv_rate = 5120000 + +# Set true to enable the peer-exchange reactor +pex = true + +# Seed mode, in which node constantly crawls the network and looks for +# peers. If another node asks it for addresses, it responds and disconnects. +# +# Does not work if the peer-exchange reactor is disabled. +seed_mode = false + +# Comma separated list of peer IDs to keep private (will not be gossiped to other peers) +private_peer_ids = "" + +# Toggle to disable guard against peers connecting from the same ip. +allow_duplicate_ip = false + +# Peer connection configuration. +handshake_timeout = "20s" +dial_timeout = "3s" + +####################################################### +### Mempool Configuration Option ### +####################################################### +[mempool] + +# The type of mempool for this node to use. +# +# Possible types: +# - "flood" : concurrent linked list mempool with flooding gossip protocol +# (default) +# - "nop" : nop-mempool (short for no operation; the ABCI app is responsible +# for storing, disseminating and proposing txs). "create_empty_blocks=false" is +# not supported. +type = "flood" + +# Recheck (default: true) defines whether CometBFT should recheck the +# validity for all remaining transaction in the mempool after a block. +# Since a block affects the application state, some transactions in the +# mempool may become invalid. If this does not apply to your application, +# you can disable rechecking. +recheck = true + +# Broadcast (default: true) defines whether the mempool should relay +# transactions to other peers. Setting this to false will stop the mempool +# from relaying transactions to other peers until they are included in a +# block. In other words, if Broadcast is disabled, only the peer you send +# the tx to will see it until it is included in a block. +broadcast = true + +# WalPath (default: "") configures the location of the Write Ahead Log +# (WAL) for the mempool. The WAL is disabled by default. To enable, set +# WalPath to where you want the WAL to be written (e.g. +# "data/mempool.wal"). +wal_dir = "" + +# Maximum number of transactions in the mempool +size = 5000 + +# Limit the total size of all txs in the mempool. +# This only accounts for raw transactions (e.g. given 1MB transactions and +# max_txs_bytes=5MB, mempool will only accept 5 transactions). +max_txs_bytes = 1073741824 + +# Size of the cache (used to filter transactions we saw earlier) in transactions +cache_size = 10000 + +# Do not remove invalid transactions from the cache (default: false) +# Set to true if it's not possible for any invalid transaction to become valid +# again in the future. +keep-invalid-txs-in-cache = false + +# Maximum size of a single transaction. +# NOTE: the max size of a tx transmitted over the network is {max_tx_bytes}. +max_tx_bytes = 1048576 + +# Maximum size of a batch of transactions to send to a peer +# Including space needed by encoding (one varint per transaction). +# XXX: Unused due to https://github.com/tendermint/tendermint/issues/5796 +max_batch_bytes = 0 + +# Experimental parameters to limit gossiping txs to up to the specified number of peers. +# We use two independent upper values for persistent and non-persistent peers. +# Unconditional peers are not affected by this feature. +# If we are connected to more than the specified number of persistent peers, only send txs to +# ExperimentalMaxGossipConnectionsToPersistentPeers of them. If one of those +# persistent peers disconnects, activate another persistent peer. +# Similarly for non-persistent peers, with an upper limit of +# ExperimentalMaxGossipConnectionsToNonPersistentPeers. +# If set to 0, the feature is disabled for the corresponding group of peers, that is, the +# number of active connections to that group of peers is not bounded. +# For non-persistent peers, if enabled, a value of 10 is recommended based on experimental +# performance results using the default P2P configuration. +experimental_max_gossip_connections_to_persistent_peers = 0 +experimental_max_gossip_connections_to_non_persistent_peers = 0 + +####################################################### +### State Sync Configuration Options ### +####################################################### +[statesync] +# State sync rapidly bootstraps a new node by discovering, fetching, and restoring a state machine +# snapshot from peers instead of fetching and replaying historical blocks. Requires some peers in +# the network to take and serve state machine snapshots. State sync is not attempted if the node +# has any local state (LastBlockHeight > 0). The node will have a truncated block history, +# starting from the height of the snapshot. +enable = false + +# RPC servers (comma-separated) for light client verification of the synced state machine and +# retrieval of state data for node bootstrapping. Also needs a trusted height and corresponding +# header hash obtained from a trusted source, and a period during which validators can be trusted. +# +# For Cosmos SDK-based chains, trust_period should usually be about 2/3 of the unbonding time (~2 +# weeks) during which they can be financially punished (slashed) for misbehavior. +rpc_servers = "" +trust_height = 0 +trust_hash = "" +trust_period = "168h0m0s" + +# Time to spend discovering snapshots before initiating a restore. +discovery_time = "15s" + +# Temporary directory for state sync snapshot chunks, defaults to the OS tempdir (typically /tmp). +# Will create a new, randomly named directory within, and remove it when done. +temp_dir = "" + +# The timeout duration before re-requesting a chunk, possibly from a different +# peer (default: 1 minute). +chunk_request_timeout = "10s" + +# The number of concurrent chunk fetchers to run (default: 1). +chunk_fetchers = "4" + +####################################################### +### Block Sync Configuration Options ### +####################################################### +[blocksync] + +# Block Sync version to use: +# +# In v0.37, v1 and v2 of the block sync protocols were deprecated. +# Please use v0 instead. +# +# 1) "v0" - the default block sync implementation +version = "v0" + +####################################################### +### Consensus Configuration Options ### +####################################################### +[consensus] + +wal_file = "data/cs.wal/wal" + +# How long we wait for a proposal block before prevoting nil +timeout_propose = "3s" +# How much timeout_propose increases with each round +timeout_propose_delta = "500ms" +# How long we wait after receiving +2/3 prevotes for “anything” (ie. not a single block or nil) +timeout_prevote = "1s" +# How much the timeout_prevote increases with each round +timeout_prevote_delta = "500ms" +# How long we wait after receiving +2/3 precommits for “anything” (ie. not a single block or nil) +timeout_precommit = "1s" +# How much the timeout_precommit increases with each round +timeout_precommit_delta = "500ms" +# How long we wait after committing a block, before starting on the new +# height (this gives us a chance to receive some more precommits, even +# though we already have +2/3). +timeout_commit = "1s" + +# How many blocks to look back to check existence of the node's consensus votes before joining consensus +# When non-zero, the node will panic upon restart +# if the same consensus key was used to sign {double_sign_check_height} last blocks. +# So, validators should stop the state machine, wait for some blocks, and then restart the state machine to avoid panic. +double_sign_check_height = 0 + +# Make progress as soon as we have all the precommits (as if TimeoutCommit = 0) +skip_timeout_commit = false + +# EmptyBlocks mode and possible interval between empty blocks +create_empty_blocks = true +create_empty_blocks_interval = "0s" + +# Reactor sleep duration parameters +peer_gossip_sleep_duration = "100ms" +peer_query_maj23_sleep_duration = "2s" + +####################################################### +### Storage Configuration Options ### +####################################################### +[storage] + +# Set to true to discard ABCI responses from the state store, which can save a +# considerable amount of disk space. Set to false to ensure ABCI responses are +# persisted. ABCI responses are required for /block_results RPC queries, and to +# reindex events in the command-line tool. +discard_abci_responses = false + +####################################################### +### Transaction Indexer Configuration Options ### +####################################################### +[tx_index] + +# What indexer to use for transactions +# +# The application will set which txs to index. In some cases a node operator will be able +# to decide which txs to index based on configuration set in the application. +# +# Options: +# 1) "null" +# 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend). +# - When "kv" is chosen "tx.height" and "tx.hash" will always be indexed. +# 3) "psql" - the indexer services backed by PostgreSQL. +# When "kv" or "psql" is chosen "tx.height" and "tx.hash" will always be indexed. +indexer = "kv" + +# The PostgreSQL connection configuration, the connection format: +# postgresql://:@:/? +psql-conn = "" + +####################################################### +### Instrumentation Configuration Options ### +####################################################### +[instrumentation] + +# When true, Prometheus metrics are served under /metrics on +# PrometheusListenAddr. +# Check out the documentation for the list of available metrics. +prometheus = false + +# Address to listen for Prometheus collector(s) connections +prometheus_listen_addr = ":26660" + +# Maximum number of simultaneous connections. +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +max_open_connections = 3 + +# Instrumentation namespace +namespace = "cometbft" diff --git a/public-testnet/configure_layer.sh b/public-testnet/configure_layer.sh new file mode 100755 index 0000000..a9478c2 --- /dev/null +++ b/public-testnet/configure_layer.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +# clear the terminal +clear + +# Stop execution if any command fails +set -e + +# Stop execution if any command fails +source ~/.bashrc + +echo "Change denom to loya in config files..." +sed -i 's/([0-9]+)stake/1loya/g' ~/.layer/$ACCOUNT_NAME/config/app.toml +sed -i 's/([0-9]+)stake/1loya/g' ~/.layer/config/app.toml + +echo "Set Chain Id to layer in client config file..." +sed -i 's/^chain-id = .*$/chain-id = "layer"/g' ~/.layer/$ACCOUNT_NAME/config/app.toml +sed -i 's/^chain-id = .*$/chain-id = "layer"/g' ~/.layer/config/app.toml + +# Modify timeout_commit in config.toml for node +echo "Modifying timeout_commit in config.toml for node..." +sed -i 's/timeout_commit = "5s"/timeout_commit = "1s"/' ~/.layer/$ACCOUNT_NAME/config/config.toml + +# Open up node to outside traffic +echo "Open up node to outside traffice" +sed -i 's/^laddr = "tcp:\/\/127.0.0.1:26657"/laddr = "tcp:\/\/0.0.0.0:26657"/g' ~/.layer/$ACCOUNT_NAME/config/config.toml +sed -i 's/^laddr = "tcp:\/\/127.0.0.1:26656"/laddr = "tcp:\/\/0.0.0.0:26656"/g' ~/.layer/$ACCOUNT_NAME/config/config.toml + +sed -i 's/^address = "tcp:\/\/localhost:1317"/address = "tcp:\/\/0.0.0.0:1317"/g' ~/.layer/$ACCOUNT_NAME/config/app.toml + +# Modify cors to accept * +echo "Modify cors to accept *" +sed -i 's/^cors_allowed_origins = \[\]/cors_allowed_origins = \["\*"\]/g' ~/.layer/$ACCOUNT_NAME/config/config.toml +sed -i 's/^cors_allowed_origins = \[\]/cors_allowed_origins = \["\*"\]/g' ~/.layer/config/config.toml + +# enable unsafe cors +echo "Enable unsafe cors" +sed -i 's/^cors_allowed_origins = \[\]/cors_allowed_origins = \["\*"\]/g' ~/.layer/$ACCOUNT_NAME/config/app.toml +sed -i 's/^enable-unsafe-cors = false/enable-unsafe-cors = true/g' ~/.layer/$ACCOUNT_NAME/config/app.toml +sed -i 's/^enabled-unsafe-cors = false/enabled-unsafe-cors = true/g' ~/.layer/config/app.toml +sed -i 's/^enable-unsafe-cors = false/enable-unsafe-cors = true/g' ~/.layer/config/app.toml + +# Modify keyring-backend in client.toml for node +echo "Modifying keyring-backend in client.toml for node..." +sed -i 's/^keyring-backend = "os"/keyring-backend = "'$KEYRING_BACKEND'"/g' ~/.layer/$ACCOUNT_NAME/config/client.toml +# update for main dir as well. why is this needed? +sed -i 's/keyring-backend = "os"/keyring-backend = "'$KEYRING_BACKEND'"/g' ~/.layer/config/client.toml + +rm -f ~/.layer/config/genesis.json +rm -f ~/.layer/$ACCOUNT_NAME/config/genesis.json +# get genesis file from running node's rpc +echo "Getting genesis from runnning node....." +curl $LAYER_NODE_URL:26657/genesis | jq '.result.genesis' > ~/.layer/config/genesis.json +curl $LAYER_NODE_URL:26657/genesis | jq '.result.genesis' > ~/.layer/$ACCOUNT_NAME/config/genesis.json + +sed -i 's/seeds = ""/seeds = "'$TELLORNODE_ID'@'$LAYER_NODE_URL':26656"/g' ~/.layer/$ACCOUNT_NAME/config/config.toml +sed -i 's/persistent_peers = ""/persistent_peers = "'$TELLORNODE_ID'@'$LAYER_NODE_URL':26656"/g' ~/.layer/$ACCOUNT_NAME/config/config.toml + +echo "Path: $TELLORNODE_ID@$LAYER_NODE_URL:26656" + +echo "layer has been configured in it's home folder!" \ No newline at end of file diff --git a/public-testnet/guide.md b/public-testnet/guide copy.md similarity index 100% rename from public-testnet/guide.md rename to public-testnet/guide copy.md From b198c847820bb55e07f654b9920ad9f2f9542543 Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Wed, 17 Jul 2024 13:06:45 -0400 Subject: [PATCH 25/52] delete copy --- public-testnet/guide copy.md | 253 ----------------------------------- 1 file changed, 253 deletions(-) delete mode 100644 public-testnet/guide copy.md diff --git a/public-testnet/guide copy.md b/public-testnet/guide copy.md deleted file mode 100644 index 321960c..0000000 --- a/public-testnet/guide copy.md +++ /dev/null @@ -1,253 +0,0 @@ -# Public Testnet Guide - -### *Note: This is a guide for setting up a Tellor Layer public testnet validator / reporter. Care is taken to provide info on the tools being used, but testers should be comfortable with running experimental code via command line interface. A beginner’s understanding of the cosmos SDK is highly recommended!* - -This guide has three sections: -1. Build and Configure layerd -2. Run a Tellor Layer node. -3. Stake and become a Validator -4. Create a reporter (and unjail if needed) - -### Pre-requisites - -* A local or cloud system running linux (or mac os with the mac scripts) -* Golang v1.22 (install instrauctions [here](https://go.dev/doc/install)) -* jq -* yq -* sed - -## Part 1: Build and Configure layerd -There are 7 steps in this part. -1. Clone the Layer repo and change directory to `layer`: - -```sh -git clone https://github.com/tellor-io/layer -b public-testnet && cd layer -``` - -2. **An ethereum RPC is used for reporting tellor bridge transactions.** -Using your favorite text editor, create a file called `secrets.json`: - -```sh -nano secrets.json -``` - -Add this code to the file, replacing `your_api_key` with your Alchemy api key: - -```json -{ -"eth_api_key": "your_api_key" -} -``` - -Close the file with `crtl^x` `y` to save your changes. - -3. **Add variables to .bashrc** -Layer needs some information about your setup to be able to run. For the purposes of this guide we will use the following variables: - * `LAYER_NODE_URL`: Set to the unquoted URL (or public IPv4 address) of a seed node, like tellornode.com. - * `KEYRING_BACKEND`: Set to `test` by default but can be configured here. (test works fine) - * `NODE_MONIKER`: Set to whatever you use for the node name + “moniker” at the end (e.g., “billmoniker”). - * `NODE_NAME`: Set to your name or whatever name you choose (e.g., “bill”). - * `TELLORNODE_ID`: Set to the unquoted node ID of the seed node. - * `LAYERD_NODE_HOME`: Should be set to "$HOME/.layer/$NODE_NAME" - -It's usually easiest to add them as exports in your `.bashrc` or `zshrc` file so that they are automatically loaded in new windows. Open your `.bashrc` file and add these lines at the end: - -```sh -# layer -export LAYER_NODE_URL=54.166.101.67 -export TELLORNODE_ID=72a0284c589e1e11823c27580bfbcbaa32a769e7 -export KEYRING_BACKEND="test" -export NODE_MONIKER="bobmoniker" -export ACCOUNT_NAME="bob" -export LAYERD_NODE_HOME="$HOME/.layer/$NODE_NAME" -``` - -*Note: We may need to reset the chain a few more times while we cook. This causes the `TELLORNODE_ID` to change. You can check the current correct id with:* - - ```sh - curl tellornode.com:26657/status - ``` - -4. Create an account on Layer -You will need an account on layer to hold your TRB tokens that you will stake to become a validator reporter. - -## Part 2: Run a Layer Node - -{% hint style="warning" %} -**Note:** The test backend is not recommended for production use with real funds. Always handle mnemonics/keys with extreme care, even if it’s just a testnet address. -{% endhint %} - -7. **Important Things to Know Before Running the Script:** - * When you start the script (which you haven't done yet),***a test wallet key pair/mnemonic will be created and printed in the terminal. You will need this address to run your validator. There will be a pause allowing you to copy it before it's burried by the node log.*** It will look something like this: - -```sh - - address: tellor1mh2ua3w8yq5ldeewsdhpg0cazhr7gtcllr6j0j - name: bill - pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Ag+lE4VGW6CpE/TiMnb3zJ6pyETVHobj5Bd5F3OuRW7/"}' - type: local - - - **Important** write this mnemonic phrase in a safe place. - It is the only way to recover your account if you ever forget your password. - - eagle actress venue redacted style redacted potato still redacted final redacted increase redacted parent panda vapor redacted redacted twelve summer redacted redacted redacted redacted -``` - -*The script should only be run once, or if you want to start over from scratch! It is intended to be used to delete your old chain and to configure the chain and start it all at once (for testing). Once your node is running, it can be restarted with a `./layerd start` command like the last command in start script.* - -8. **Run the Script:** - * Give the script permission to execute: - - ```sh - chmod +x layer_scripts/join_chain_new_node_linux.sh - ``` - - * Run it: - - ```sh - ./layer_scripts/join_chain_new_node_linux.sh - ``` - * Wait for the chain to sync. Some errors are expected as the chain starts up, but the log should start moving very quickly once the node starts downloading blocks. - - * Once the log slows down again, it is likely synced. You can verify that your node is synced using: - - ``` - curl localhost:26657/status - ``` - - If `sync_info.catching_up` is `False`, the node is synced! Well done! - -## Part 2: Becoming a Validator - -Once you have a working node, you can try running a validator and competing for rewards. - -You will need to have some layer testnet TRB into your validator account (see step 7 above). Feel free to send a request in the public [discord](https://discord.gg/tellor) #testing-layer channel, or [try the token bridge from the Sepolia testnet playground.](guide.md#getting-testnet-trb) - -Keep your node running. Open another window on your layer machine and load up your variables with the values used when your ran the join chain script. Leave the node running, but have it open so that you can use both windows quickly. Now, set the layer script variables in your new window: - -```sh -export LAYER_NODE_URL=54.166.101.67 \ -&& export TELLORNODE_ID=9007e2991e7f07a016559aed4685f4ba0619c631 \ -&& export KEYRING_BACKEND="test" \ -&& export NODE_MONIKER="bobmoniker" \ -&& export NODE_NAME="bob" \ -&& export AMOUNT_IN_TRB=10000 \ -&& export AMOUNT_IN_LOYA="1000000000loya" \ -&& export LAYERD_NODE_HOME="$HOME/.layer/$NODE_NAME" -``` - -Use `printenv` to double check that all the commands are set correctly. - -1. **Verify That You Have a Funded Address:** - -```sh -./layerd query bank balance $NODE_NAME loya --chain-id layer -``` -2. **Retrieve Your Validator Public Key:** -With your `layer` folder as the active directory, use the command: -```sh -./layerd comet show-validator --home $LAYERD_NODE_HOME -``` - -This returns your validator pubkey (e.g., `{"@type":"/cosmos.crypto.ed25519.PubKey","key":"FX9cKNl+QmxtLcL926P5yJqZw7YyuSX3HQAZboz3TjM="}`). - -Note: Your nodes home directory variable `LAYERD_NODE_HOME` needs to be set prior to running ./layerd commands when you're outside the scripts. [You can load variables into all new bash windows by adding the export commands to your shell's .bashrc file](https://unix.stackexchange.com/questions/117467/how-to-permanently-set-environmental-variables) (.zshrc on mac). - -3. **Edit the Validator Configuration File:** -Open `~/layer/validator.json`: - - ```json - { - "pubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"c+EuycPpudgiyVl6guYG9oyPSImHHJz1z0Pg4ODKveo="}, - "amount": "100000000000loya", - "moniker": "billmoniker", - "identity": "optional identity signature (ex. UPort or Keybase)", - "website": "validator's (optional) website", - "security": "validator's (optional) security contact email", - "details": "validator's (optional) details", - "commission-rate": "0.1", - "commission-max-rate": "0.2", - "commission-max-change-rate": "0.01", - "min-self-delegation": "1" - } - ``` - - Edit the `"pubkey"` to match yours from step 2. - - Edit `"amount"` to be the amount of testnet TRB that you would like to stake with 6 decimals and the "loya" denom. For example if you want to stake 599 TRB: `"amount": "599000000loya"`. - - Edit `"moniker"` to be the moniker you chose for running your node start script. (this is the "name" of your validator) - - **Note:** TRB tokens are used for gas on the layer network. As a validator you will need to make transactions to send tokens, become a reporter, unjail, etc. When choosing the amount to stake, it is important to reserve some TRB for gas. - -4. **Create Your Validator:** -At the time of writing, a few things need to happen (in order) to successfully start a validator. You will need to: - 1. Make the create-validator tx. - 2. Count to 10. - 3. Restart your node using a ./layerd command *not the script*. - - Let's go! - 1. Run the following commands: - - ```sh - ./layerd tx staking create-validator ./validator.json --from $NODE_NAME --home $LAYERD_NODE_HOME --chain-id layer --node="http://localhost:26657" --gas "400000" - ``` - - 2. count to 10 - 3. In your node window, use `ctrl^c` to stop the node. Use this command to start it back up: - - ```sh - ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=false --panic-on-daemon-failure-enabled=false - ``` - -5. **Verify Your Validator Creation:** -Ensure your validator was created successfully using the command: - - ```sh - ./layerd query staking validator $(./layerd keys show $NODE_NAME --bech val --address --keyring-backend $KEYRING_BACKEND --home $LAYERD_NODE_HOME) --output json | jq - ``` - - -If status is `3`, you are a validator and you're not jailed. Awesome! -If status is `2`, you created your validator, but it was jailed (it's ok, you can probably unjail later). - -## Part 2: Becoming a Reporter (and maybe unjail a little bit...) - -Once you’re successfully running a validator, you’re almost a reporter already! Just aone more command: - -```sh -./layerd tx reporter create-reporter "100000000000000000" "1000000" --from $NODE_NAME --keyring-backend test --chain-id layer --home $LAYERD_NODE_HOME -``` - -Restart your node again, but this time we will change the command a bit to turn on the price daemon: - -```sh -./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=true --panic-on-daemon-failure-enabled=false -``` - -## Steps to unjail: -Layer testnet is still experimental, and jailing can happen for various reasons while we work out the kinks. Make sure your terminal window (shell) has all the variables loaded before trying to build txs. Read all steps first because you have about 4 minutes to do everything or you will be jailed again for inactivity: - -1. stop your node / validator / reporter with and start it back up as a node / validator (turning off the reporter): - - ``` - ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=false --panic-on-daemon-failure-enabled=false - ``` - -2. enter the unjail the command: - - ``` - ./layerd tx slashing unjail --from $NODE_NAME --chain-id layer --yes - ``` - -3. Restart the node with reporter daemon turned on: - - ``` - ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=true --panic-on-daemon-failure-enabled=false - ``` - -### Getting Testnet TRB - -You can mint Layer Testnet TRB using the Sepolia Tellor Playground contract’s “faucet” command:\ -[https://sepolia.etherscan.io/address/0x3251838bd813fdf6a97D32781e011cce8D225d59#writeContract\ -\ -](https://sepolia.etherscan.io/address/0x3251838bd813fdf6a97D32781e011cce8D225d59#writeContract)Once you have TRBP in your wallet, head over to the Layer Testnet bridge:\ -[https://sepolia.etherscan.io/address/0x7a261EAa9E8033B1337554df59bD462ca4A251FA#writeContract\ -](https://sepolia.etherscan.io/address/0x7a261EAa9E8033B1337554df59bD462ca4A251FA#writeContract) From 7f7b8dcc4104d524f3384279e686a3ad217d44a3 Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Wed, 17 Jul 2024 15:59:24 -0400 Subject: [PATCH 26/52] tested validator and reporter steps --- public-testnet/1_install_layer_and_run_node.md | 2 +- public-testnet/2_become_a_validator_reporter.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public-testnet/1_install_layer_and_run_node.md b/public-testnet/1_install_layer_and_run_node.md index 5a0cf97..26c3f92 100644 --- a/public-testnet/1_install_layer_and_run_node.md +++ b/public-testnet/1_install_layer_and_run_node.md @@ -49,7 +49,7 @@ Add this code to the file, replacing `your_api_key` with your Alchemy api key: Close the file with `crtl^x` `y` to save your changes. 4. **Add variables to .bashrc** -*Setting variables in .bashrc is not required, but it helps to avoid errors because the variables are set on terminal startup.* +*Setting variables in .bashrc is not required, but it helps to avoid many common errors.* Here is a list of variables we will use in this guide and a short description of their purpose: * `LAYER_NODE_URL`: Set to the unquoted URL (or public IPv4 address) of a seed node, like tellornode.com. diff --git a/public-testnet/2_become_a_validator_reporter.md b/public-testnet/2_become_a_validator_reporter.md index a559a3f..5a485f7 100644 --- a/public-testnet/2_become_a_validator_reporter.md +++ b/public-testnet/2_become_a_validator_reporter.md @@ -55,7 +55,7 @@ Open `~/layer/validator.json`: 4. **Create Your Validator:** A few things need to happen (in order) to successfully start a layer validator. You will: -1. Make the create-validator tx. +1. Do the create-validator tx. 2. Count to 10. 3. Restart your node. @@ -77,7 +77,7 @@ You will: Ensure your validator was created successfully using the command: ```sh - ./layerd query staking validator $(./layerd keys show $ACCOUNT_NAME --bech val --address --keyring-backend $KEYRING_BACKEND --home $LAYERD_NODE_HOME) --output json | jq + ./layerd query staking validator $(./layerd keys show $ACCOUNT_NAME --bech val --address --keyring-backend $KEYRING_BACKEND --home $LAYERD_NODE_HOME) ``` @@ -89,7 +89,7 @@ If status is `2`, you created your validator, but it was jailed (it's ok, you ca Once you’re successfully running a validator, you’re almost a reporter already! Just aone more command: ```sh -./layerd tx reporter create-reporter "100000000000000000" "1000000" --from $ACCOUNT_NAME --keyring-backend test --chain-id layer --home $LAYERD_NODE_HOME +./layerd tx reporter create-reporter "100000000000000000" "1000000" --from $ACCOUNT_NAME --keyring-backend $KEYRING_BACKEND --chain-id layer --home $LAYERD_NODE_HOME ``` Restart your node again, but this time we will change the command a bit to turn on the price daemon: From 31689480ddfb04917139ac660fba24842b5c7d93 Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Thu, 18 Jul 2024 09:32:00 -0400 Subject: [PATCH 27/52] asdf --- public-testnet/1_install_layer_and_run_node.md | 6 +++--- .../2_become_a_validator_reporter.md | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/public-testnet/1_install_layer_and_run_node.md b/public-testnet/1_install_layer_and_run_node.md index 26c3f92..47b4a28 100644 --- a/public-testnet/1_install_layer_and_run_node.md +++ b/public-testnet/1_install_layer_and_run_node.md @@ -48,9 +48,9 @@ Add this code to the file, replacing `your_api_key` with your Alchemy api key: Close the file with `crtl^x` `y` to save your changes. -4. **Add variables to .bashrc** +4. **Add variables to .bashrc (or .zshrc)** *Setting variables in .bashrc is not required, but it helps to avoid many common errors.* - +ds Here is a list of variables we will use in this guide and a short description of their purpose: * `LAYER_NODE_URL`: Set to the unquoted URL (or public IPv4 address) of a seed node, like tellornode.com. * `KEYRING_BACKEND`: Set to `test` by default but can be configured here. (test works fine) @@ -88,7 +88,7 @@ curl tellornode.com:26657/status 5. **Initialize a named config folder** ```sh -./layerd init $NODE_MONIKER --chain-id layer --home ~/.layer/$ACCOUNT_NAME +./layerd init $ACCOUNT_NAME --chain-id layer --home ~/.layer/$ACCOUNT_NAME ``` diff --git a/public-testnet/2_become_a_validator_reporter.md b/public-testnet/2_become_a_validator_reporter.md index 5a485f7..6998f8b 100644 --- a/public-testnet/2_become_a_validator_reporter.md +++ b/public-testnet/2_become_a_validator_reporter.md @@ -103,21 +103,21 @@ Layer testnet is still experimental, and jailing can happen for various reasons 1. stop your node / validator / reporter with and start it back up as a node / validator (turning off the reporter): - ``` - ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=false --panic-on-daemon-failure-enabled=false - ``` +```sh +./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=false --panic-on-daemon-failure-enabled=false +``` 2. enter the unjail the command: - ``` - ./layerd tx slashing unjail --from $ACCOUNT_NAME --chain-id layer --yes - ``` +```sh +./layerd tx slashing unjail --from $ACCOUNT_NAME --chain-id layer --yes +``` 3. Restart the node with reporter daemon turned on: - ``` - ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=true --panic-on-daemon-failure-enabled=false - ``` +```sh +./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=true --panic-on-daemon-failure-enabled=false +``` ### Getting Testnet TRB From f8fe10cdcb848de80c468a4140c510d67d659c61 Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Thu, 18 Jul 2024 10:04:55 -0400 Subject: [PATCH 28/52] added setup script for mac --- .../1_install_layer_and_run_node.md | 37 ++++++----- public-testnet/configure_layer_mac.sh | 62 +++++++++++++++++++ ...figure_layer.sh => configure_layer_nix.sh} | 3 +- 3 files changed, 86 insertions(+), 16 deletions(-) create mode 100755 public-testnet/configure_layer_mac.sh rename public-testnet/{configure_layer.sh => configure_layer_nix.sh} (96%) diff --git a/public-testnet/1_install_layer_and_run_node.md b/public-testnet/1_install_layer_and_run_node.md index 47b4a28..1bc2a84 100644 --- a/public-testnet/1_install_layer_and_run_node.md +++ b/public-testnet/1_install_layer_and_run_node.md @@ -57,7 +57,7 @@ Here is a list of variables we will use in this guide and a short description of * `NODE_MONIKER`: Set to whatever you'd like to use for your validator's public readable name (e.g "bob"). * `ACCOUNT_NAME`: Set to your name or whatever name you choose (like “bill” or "ruth"). * `TELLORNODE_ID`: Set to the unquoted node ID of the seed node. - * `LAYERD_NODE_HOME`: Should be set to "$HOME/.layer/$NODE_NAME" + * `LAYERD_NODE_HOME`: Should be set to "$HOME/.layer/$ACCOUNT_NAME" Open your `.bashrc` or `zshrc` file and add these lines at the end. replace "bob" with the values you choose: @@ -97,27 +97,27 @@ You will need a "wallet" account on layer to hold your TRB tokens that you will **Security Tips:** 1. The test backend is not recommended for production use with real funds because the keys are stored as plain text. Always use a secure keyring-backend option for real funds! 2. Handle mnemonics/keys with extreme care, even if it’s just a testnet address! 3. Never use an address that holds real mainnet funds for testing! - You can check accounts any time with: +You can check accounts any time with: - ```sh - ./layerd keys list --keyring-backend $KEYRING_BACKEND --home $LAYERD_NODE_HOME - ``` +```sh +./layerd keys list --keyring-backend $KEYRING_BACKEND --home $LAYERD_NODE_HOME +``` **If you do not yet have an account / mnemonic** - Generate a new key pair with the command: +Generate a new key pair with the command: - ```sh - ./layerd keys add $ACCOUNT_NAME --keyring-backend $KEYRING_BACKEND --home $LAYERD_NODE_HOME - ``` - **Be sure to copy the entire output with the mnemonic and keep it in a very safe place!** +```sh +./layerd keys add $ACCOUNT_NAME --keyring-backend $KEYRING_BACKEND --home $LAYERD_NODE_HOME +``` +**Be sure to copy the entire output with the mnemonic and keep it in a very safe place!** **If you already have an account / pnemonic** - Import your account with the command: - (You will be prompted to input your mnemonic) +Import your account with the command: +(You will be prompted to input your mnemonic) - ```sh - ./layerd keys add $ACCOUNT_NAME --recover=true --keyring-backend $KEYRING_BACKEND --home $LAYERD_NODE_HOME - ``` +```sh +./layerd keys add $ACCOUNT_NAME --recover=true --keyring-backend $KEYRING_BACKEND --home $LAYERD_NODE_HOME +``` 6. **Run the configure_layer script (or manually replace config files)** We need to change the config files a bit using the provided `configure_layer.sh` shell script. @@ -144,6 +144,8 @@ If you've completed the install layer section, you're ready to try running a lay *Before starting your node, think about how you want to run it so that the process does not get killed accidentally. GNU screen(link) is a great option for beginners. More advanced setups can be achieved using systemd (link). +If you're not sure what to do, create a + Make sure to load your node variables. (use `source ~/.bashrc` if necessary) Then run the command: @@ -153,3 +155,8 @@ Then run the command: ``` If your node is configured correctly, you should see the node connecting to endopoints before rapidly downloading blocks. congrats! + +Troubleshooting: + +Connectivity Errors (no handshake, etc...) +- Check if you have any other processes that are using ports 26657, 26656, 6060, 26658, diff --git a/public-testnet/configure_layer_mac.sh b/public-testnet/configure_layer_mac.sh new file mode 100755 index 0000000..fbdcb82 --- /dev/null +++ b/public-testnet/configure_layer_mac.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +# clear the terminal +clear + +# Stop execution if any command fails +set -e + +# set variables in your .zshrc before starting this script! +source ~/.zshrc + +echo "Change denom to loya in config files..." +sed -i '' 's/([0-9]+)stake/1loya/g' ~/.layer/$ACCOUNT_NAME/config/app.toml +sed -i '' 's/([0-9]+)stake/1loya/g' ~/.layer/config/app.toml + +echo "Set Chain Id to layer in client config file..." +sed -i '' 's/^chain-id = .*$/chain-id = "layer"/g' ~/.layer/$ACCOUNT_NAME/config/app.toml +sed -i '' 's/^chain-id = .*$/chain-id = "layer"/g' ~/.layer/config/app.toml + +# Modify timeout_commit in config.toml for node +echo "Modifying timeout_commit in config.toml for $ACCOUNT_NAME..." +sed -i '' 's/timeout_commit = "5s"/timeout_commit = "1s"/' ~/.layer/$ACCOUNT_NAME/config/config.toml + +# Open up node to outside traffic +echo "Open up node to outside traffic" +sed -i '' 's/^laddr = "tcp:\/\/127.0.0.1:26657"/laddr = "tcp:\/\/0.0.0.0:26657"/g' ~/.layer/$ACCOUNT_NAME/config/config.toml +sed -i '' 's/^laddr = "tcp:\/\/127.0.0.1:26656"/laddr = "tcp:\/\/0.0.0.0:26656"/g' ~/.layer/$ACCOUNT_NAME/config/config.toml + +sed -i '' 's/^address = "tcp:\/\/localhost:1317"/address = "tcp:\/\/0.0.0.0:1317"/g' ~/.layer/$ACCOUNT_NAME/config/app.toml + +# Modify cors to accept * +echo "Modify cors to accept *" +sed -i '' 's/^cors_allowed_origins = \[\]/cors_allowed_origins = \["\*"\]/g' ~/.layer/$ACCOUNT_NAME/config/config.toml +sed -i '' 's/^cors_allowed_origins = \[\]/cors_allowed_origins = \["\*"\]/g' ~/.layer/config/config.toml + +# enable unsafe cors +echo "Enable unsafe cors" +sed -i '' 's/^cors_allowed_origins = \[\]/cors_allowed_origins = \["\*"\]/g' ~/.layer/$ACCOUNT_NAME/config/app.toml +sed -i '' 's/^enable-unsafe-cors = false/enable-unsafe-cors = true/g' ~/.layer/$ACCOUNT_NAME/config/app.toml +sed -i '' 's/^enabled-unsafe-cors = false/enabled-unsafe-cors = true/g' ~/.layer/config/app.toml +sed -i '' 's/^enable-unsafe-cors = false/enable-unsafe-cors = true/g' ~/.layer/config/app.toml + +# Modify keyring-backend in client.toml for node +echo "Modifying keyring-backend in client.toml for node..." +sed -i '' 's/^keyring-backend = "os"/keyring-backend = "'$KEYRING_BACKEND'"/g' ~/.layer/$ACCOUNT_NAME/config/client.toml +# update for main dir as well. why is this needed? +sed -i '' 's/keyring-backend = "os"/keyring-backend = "'$KEYRING_BACKEND'"/g' ~/.layer/config/client.toml + +rm -f ~/.layer/config/genesis.json +rm -f ~/.layer/$ACCOUNT_NAME/config/genesis.json +# get genesis file from running node's rpc +echo "Getting genesis from runnning node....." +curl $LAYER_NODE_URL:26657/genesis | jq '.result.genesis' > ~/.layer/config/genesis.json +curl $LAYER_NODE_URL:26657/genesis | jq '.result.genesis' > ~/.layer/$ACCOUNT_NAME/config/genesis.json + +echo "Running Tellor node id: $TELLORNODE_ID" +sed -i '' 's/seeds = ""/seeds = "'$TELLORNODE_ID'@'$LAYER_NODE_URL':26656"/g' ~/.layer/$ACCOUNT_NAME/config/config.toml +sed -i '' 's/persistent_peers = ""/persistent_peers = "'$TELLORNODE_ID'@'$LAYER_NODE_URL':26656"/g' ~/.layer/$ACCOUNT_NAME/config/config.toml + +echo "Path: $TELLORNODE_ID@$LAYER_NODE_URL:26656" + +echo "layer has been configured in it's home folder!" \ No newline at end of file diff --git a/public-testnet/configure_layer.sh b/public-testnet/configure_layer_nix.sh similarity index 96% rename from public-testnet/configure_layer.sh rename to public-testnet/configure_layer_nix.sh index a9478c2..6601ec3 100755 --- a/public-testnet/configure_layer.sh +++ b/public-testnet/configure_layer_nix.sh @@ -6,7 +6,7 @@ clear # Stop execution if any command fails set -e -# Stop execution if any command fails +# set variables in your .bashrc before starting this script! source ~/.bashrc echo "Change denom to loya in config files..." @@ -53,6 +53,7 @@ echo "Getting genesis from runnning node....." curl $LAYER_NODE_URL:26657/genesis | jq '.result.genesis' > ~/.layer/config/genesis.json curl $LAYER_NODE_URL:26657/genesis | jq '.result.genesis' > ~/.layer/$ACCOUNT_NAME/config/genesis.json +echo "Running Tellor node id: $TELLORNODE_ID" sed -i 's/seeds = ""/seeds = "'$TELLORNODE_ID'@'$LAYER_NODE_URL':26656"/g' ~/.layer/$ACCOUNT_NAME/config/config.toml sed -i 's/persistent_peers = ""/persistent_peers = "'$TELLORNODE_ID'@'$LAYER_NODE_URL':26656"/g' ~/.layer/$ACCOUNT_NAME/config/config.toml From 2263aecc2389d3f48ded80def5f0f510209710e3 Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Thu, 18 Jul 2024 10:16:16 -0400 Subject: [PATCH 29/52] added mac script commands --- public-testnet/1_install_layer_and_run_node.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/public-testnet/1_install_layer_and_run_node.md b/public-testnet/1_install_layer_and_run_node.md index 1bc2a84..ce493ad 100644 --- a/public-testnet/1_install_layer_and_run_node.md +++ b/public-testnet/1_install_layer_and_run_node.md @@ -120,17 +120,19 @@ Import your account with the command: ``` 6. **Run the configure_layer script (or manually replace config files)** -We need to change the config files a bit using the provided `configure_layer.sh` shell script. -Download the script onto your computer: +We need to change the config files a bit using the provided `configure_layer.sh` shell script. Save the script into your layer folder. +With layer as your active direcory: ```sh -wget path/configure_layer.sh # (change path accordingly) +wget configure_layer_nix.sh #if linux +wget configure_layer_mac.sh #if mac ``` Give it permission to execute and run it: ```sh -chmod +x configure_layer.sh && ./configure_layer.sh # (change path accordingly) +chmod +x configure_layer_nix.sh && ./configure_layer_nix.sh +chmod +x configure_layer_mac.sh && ./configure_layer_mac.sh ``` Alternatively, you can download the configured config files [here](link). If using this method: From 3851ea0633ecd1d0ca28954a42a1b203ec5e2ae7 Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Thu, 18 Jul 2024 10:28:17 -0400 Subject: [PATCH 30/52] added links --- public-testnet/1_install_layer_and_run_node.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/public-testnet/1_install_layer_and_run_node.md b/public-testnet/1_install_layer_and_run_node.md index ce493ad..5805e78 100644 --- a/public-testnet/1_install_layer_and_run_node.md +++ b/public-testnet/1_install_layer_and_run_node.md @@ -124,18 +124,18 @@ We need to change the config files a bit using the provided `configure_layer.sh` With layer as your active direcory: ```sh -wget configure_layer_nix.sh #if linux -wget configure_layer_mac.sh #if mac +wget https://github.com/tellor-io/layerdocs/blob/update-guide-working/public-testnet/configure_layer_nix.sh #if linux +wget https://github.com/tellor-io/layerdocs/blob/update-guide-working/public-testnet/configure_layer_mac.sh #if mac ``` Give it permission to execute and run it: ```sh -chmod +x configure_layer_nix.sh && ./configure_layer_nix.sh -chmod +x configure_layer_mac.sh && ./configure_layer_mac.sh +chmod +x configure_layer_nix.sh && ./configure_layer_nix.sh #if linux +chmod +x configure_layer_mac.sh && ./configure_layer_mac.sh #if mac ``` -Alternatively, you can download the configured config files [here](link). If using this method: +Alternatively, you can download the configured config files from this repo. If using this method: - First open up config.toml and relpace `moniker = "billmoniker"` with your node moniker. - Navigate to `~/.layer/config` and replace app.toml, client.toml, and config.toml with the properly configured configs. - Navigate to `~/.layer/$ACCOUNT_NAME/config` and replace the files there also. @@ -144,7 +144,7 @@ If you've completed the install layer section, you're ready to try running a lay ## Run a Layer Node! -*Before starting your node, think about how you want to run it so that the process does not get killed accidentally. GNU screen(link) is a great option for beginners. More advanced setups can be achieved using systemd (link). +*Before starting your node, think about how you want to run it so that the process does not get killed accidentally. [GNU screen](https://www.youtube.com/watch?v=3S3I9lT6eKE) is a great option for beginners. More advanced setups can be achieved using systemd (link). If you're not sure what to do, create a @@ -153,7 +153,7 @@ Make sure to load your node variables. (use `source ~/.bashrc` if necessary) Then run the command: ```sh -./layerd start --home $LAYERD_NODE_HOME --api.swagger --price-daemon-enabled=false +./layerd start --api.swagger --price-daemon-enabled=false --home $LAYERD_NODE_HOME ``` If your node is configured correctly, you should see the node connecting to endopoints before rapidly downloading blocks. congrats! From 57f34e614e3a41634f5af38cf12c68b744499dd1 Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Thu, 18 Jul 2024 10:31:14 -0400 Subject: [PATCH 31/52] wget prereq --- public-testnet/1_install_layer_and_run_node.md | 1 + 1 file changed, 1 insertion(+) diff --git a/public-testnet/1_install_layer_and_run_node.md b/public-testnet/1_install_layer_and_run_node.md index 5805e78..d5cca11 100644 --- a/public-testnet/1_install_layer_and_run_node.md +++ b/public-testnet/1_install_layer_and_run_node.md @@ -15,6 +15,7 @@ This guide has three sections: * jq * yq * sed +* wget ## Part 1: Build and Configure layerd There are 7 steps in this part. From dd65a88020c315dcc76565192d6e8171be1cdd0d Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Thu, 18 Jul 2024 10:58:10 -0400 Subject: [PATCH 32/52] walkthrough script creation --- .../1_install_layer_and_run_node.md | 37 ++++++++++++------- public-testnet/configure_layer_mac.sh | 3 -- public-testnet/configure_layer_nix.sh | 0 3 files changed, 23 insertions(+), 17 deletions(-) mode change 100755 => 100644 public-testnet/configure_layer_nix.sh diff --git a/public-testnet/1_install_layer_and_run_node.md b/public-testnet/1_install_layer_and_run_node.md index d5cca11..8d72547 100644 --- a/public-testnet/1_install_layer_and_run_node.md +++ b/public-testnet/1_install_layer_and_run_node.md @@ -47,7 +47,7 @@ Add this code to the file, replacing `your_api_key` with your Alchemy api key: } ``` -Close the file with `crtl^x` `y` to save your changes. +Exit nano with `ctrl^x` then enter `y` to save the changes. 4. **Add variables to .bashrc (or .zshrc)** *Setting variables in .bashrc is not required, but it helps to avoid many common errors.* @@ -120,28 +120,37 @@ Import your account with the command: ./layerd keys add $ACCOUNT_NAME --recover=true --keyring-backend $KEYRING_BACKEND --home $LAYERD_NODE_HOME ``` -6. **Run the configure_layer script (or manually replace config files)** -We need to change the config files a bit using the provided `configure_layer.sh` shell script. Save the script into your layer folder. -With layer as your active direcory: +6. **Run the configure_layer script** +We need to change the config files a bit using one of the provided `configure_layer_nix.sh` or `configure_layer_mac.sh` scripts from the layerdocs repo. + +**If on linux:** +- Navigate [here](https://raw.githubusercontent.com/tellor-io/layerdocs/update-guide-working/public-testnet/configure_layer_nix.sh), select all and copy the code to your clipboard. + +- create the script file locally: ```sh -wget https://github.com/tellor-io/layerdocs/blob/update-guide-working/public-testnet/configure_layer_nix.sh #if linux -wget https://github.com/tellor-io/layerdocs/blob/update-guide-working/public-testnet/configure_layer_mac.sh #if mac +nano configure_layer_nix.sh # or configure_layer_mac.sh if mac ``` -Give it permission to execute and run it: +Paste the code, then exit nano with `ctrl^x` then enter `y` to save the changes. + +**If on Mac:** +- Navigate [here](https://raw.githubusercontent.com/tellor-io/layerdocs/update-guide-working/public-testnet/configure_layer_mac.sh), select all and copy the code to your clipboard. + +- create the script file locally: ```sh -chmod +x configure_layer_nix.sh && ./configure_layer_nix.sh #if linux -chmod +x configure_layer_mac.sh && ./configure_layer_mac.sh #if mac +nano configure_layer_mac.sh # or configure_layer_mac.sh if mac ``` -Alternatively, you can download the configured config files from this repo. If using this method: -- First open up config.toml and relpace `moniker = "billmoniker"` with your node moniker. -- Navigate to `~/.layer/config` and replace app.toml, client.toml, and config.toml with the properly configured configs. -- Navigate to `~/.layer/$ACCOUNT_NAME/config` and replace the files there also. +Paste the code, then exit nano with `ctrl^x` then enter `y` to save the changes. -If you've completed the install layer section, you're ready to try running a layer node! +Give your new script permission to execute and run it: + +```sh +chmod +x configure_layer_nix.sh && ./configure_layer_nix.sh #if linux +chmod +x configure_layer_mac.sh && ./configure_layer_mac.sh #if mac +``` ## Run a Layer Node! diff --git a/public-testnet/configure_layer_mac.sh b/public-testnet/configure_layer_mac.sh index fbdcb82..84203e5 100755 --- a/public-testnet/configure_layer_mac.sh +++ b/public-testnet/configure_layer_mac.sh @@ -3,9 +3,6 @@ # clear the terminal clear -# Stop execution if any command fails -set -e - # set variables in your .zshrc before starting this script! source ~/.zshrc diff --git a/public-testnet/configure_layer_nix.sh b/public-testnet/configure_layer_nix.sh old mode 100755 new mode 100644 From ac98b757417fdca95dcb507b179e4e2700492323 Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Thu, 18 Jul 2024 11:06:24 -0400 Subject: [PATCH 33/52] steps for scripts --- public-testnet/1_install_layer_and_run_node.md | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/public-testnet/1_install_layer_and_run_node.md b/public-testnet/1_install_layer_and_run_node.md index 8d72547..998c4e2 100644 --- a/public-testnet/1_install_layer_and_run_node.md +++ b/public-testnet/1_install_layer_and_run_node.md @@ -145,22 +145,18 @@ nano configure_layer_mac.sh # or configure_layer_mac.sh if mac Paste the code, then exit nano with `ctrl^x` then enter `y` to save the changes. -Give your new script permission to execute and run it: +Give your new script permission to execute and run it to replace the default configs with proper layer chain configs: ```sh chmod +x configure_layer_nix.sh && ./configure_layer_nix.sh #if linux chmod +x configure_layer_mac.sh && ./configure_layer_mac.sh #if mac ``` -## Run a Layer Node! +## Start your Layer Node! -*Before starting your node, think about how you want to run it so that the process does not get killed accidentally. [GNU screen](https://www.youtube.com/watch?v=3S3I9lT6eKE) is a great option for beginners. More advanced setups can be achieved using systemd (link). +***Before starting your node, it's a good idea to think about how you want to run it so that the process does not get killed accidentally. [GNU screen](https://tellor.io/blog/how-to-manage-cli-applications-on-hosted-vms-with-screen/) is a great option for beginners. More advanced setups can be achieved using systemd.*** -If you're not sure what to do, create a - -Make sure to load your node variables. (use `source ~/.bashrc` if necessary) - -Then run the command: +Run the command: ```sh ./layerd start --api.swagger --price-daemon-enabled=false --home $LAYERD_NODE_HOME @@ -168,7 +164,3 @@ Then run the command: If your node is configured correctly, you should see the node connecting to endopoints before rapidly downloading blocks. congrats! -Troubleshooting: - -Connectivity Errors (no handshake, etc...) -- Check if you have any other processes that are using ports 26657, 26656, 6060, 26658, From b4a387c766afc912f51d8db95f96e9e12c2ce89c Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Thu, 18 Jul 2024 11:06:50 -0400 Subject: [PATCH 34/52] no wget --- public-testnet/1_install_layer_and_run_node.md | 1 - 1 file changed, 1 deletion(-) diff --git a/public-testnet/1_install_layer_and_run_node.md b/public-testnet/1_install_layer_and_run_node.md index 998c4e2..811593d 100644 --- a/public-testnet/1_install_layer_and_run_node.md +++ b/public-testnet/1_install_layer_and_run_node.md @@ -15,7 +15,6 @@ This guide has three sections: * jq * yq * sed -* wget ## Part 1: Build and Configure layerd There are 7 steps in this part. From eb6c3aaa16f96106f4353ac3fa6b91f6615c04b6 Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Thu, 18 Jul 2024 12:05:04 -0400 Subject: [PATCH 35/52] asdf --- public-testnet/2_become_a_validator_reporter.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/public-testnet/2_become_a_validator_reporter.md b/public-testnet/2_become_a_validator_reporter.md index 6998f8b..0db8d6c 100644 --- a/public-testnet/2_become_a_validator_reporter.md +++ b/public-testnet/2_become_a_validator_reporter.md @@ -18,16 +18,26 @@ Syncing can a while (>1hr) so please be patient and wait until your node is read ./layerd query bank balance $ACCOUNT_NAME loya --chain-id layer ``` -2. **Retrieve Your Validator Public Key:** +3. While we're at it, let's grab your "tellorvaloper" prefix address also: + +```sh +./layerd keys show $ACCOUNT_NAME --bech val --home $LAYERD_NODE_HOME +``` + +*This will output the "tellorvaloper" prefix address for your account. It is used for validator commands and is different from the "tellor" prefix address that is used for sending and recieving TRB. Copy this "tellorvaloper" prefix address and keep it in the same place where you can copy it later.* + +4. **Retrieve Your Validator Public Key:** With your `layer` folder as the active directory, use the command: ```sh ./layerd comet show-validator --home $LAYERD_NODE_HOME ``` -This returns your validator pubkey (e.g., `{"@type":"/cosmos.crypto.ed25519.PubKey","key":"FX9cKNl+QmxtLcL926P5yJqZw7YyuSX3HQAZboz3TjM="}`). Copy this for the next step. +This returns your validator pubkey / +(e.g., `{"@type":"/cosmos.crypto.ed25519.PubKey","key":"FX9cKNl+QmxtLcL926P5yJqZw7YyuSX3HQAZboz3TjM="}`). / +Copy this for the next step. -3. **Edit the Validator Configuration File:** +5. **Edit the Validator Configuration File:** Open `~/layer/validator.json`: ```json From 3b367e39134b4d452ad12ece721734fb93a6a13e Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Thu, 18 Jul 2024 12:18:27 -0400 Subject: [PATCH 36/52] . --- .../2_become_a_validator_reporter.md | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/public-testnet/2_become_a_validator_reporter.md b/public-testnet/2_become_a_validator_reporter.md index 0db8d6c..0a9a465 100644 --- a/public-testnet/2_become_a_validator_reporter.md +++ b/public-testnet/2_become_a_validator_reporter.md @@ -1,12 +1,12 @@ # Part 2: Become a Validator -Once you have a working node, you can try running a validator. +*Once you've got your node running and synced, you're ready to become a validator!* You will need to have some layer testnet TRB. Feel free to send us your tellor prefixed address / request in the public [discord](https://discord.gg/tellor) #testing-layer channel, or [try the token bridge from the Sepolia testnet playground.](guide.md#getting-testnet-trb) -Keep your node running. Open up another screen or terminal winodw on your layer machine. If you added the variables to your .bashrc file they should load autmatically. +***Setup Note: Open up another screen or terminal window on your layer machine for doing the validator steps. If you followed the install guide and added the variables to your .bashrc file, you should be able to copy / paste the commands in this documentation to stake your validator.*** -*Note: You will need to have quick access to the node window and new window as you go though the steps.* +***It helps to have quick access to the node window and the commands window as you go though the steps (to avoid jailing).*** 1. **Check if your node is synced:** If you cannot read the log as it's being printed, the node still syncing. @@ -33,9 +33,8 @@ With your `layer` folder as the active directory, use the command: ./layerd comet show-validator --home $LAYERD_NODE_HOME ``` -This returns your validator pubkey / -(e.g., `{"@type":"/cosmos.crypto.ed25519.PubKey","key":"FX9cKNl+QmxtLcL926P5yJqZw7YyuSX3HQAZboz3TjM="}`). / -Copy this for the next step. +This returns your validator pubkey. (e.g., `{"@type":"/cosmos.crypto.ed25519.PubKey","key":"FX9cKNl+QmxtLcL926P5yJqZw7YyuSX3HQAZboz3TjM="}`). +Copy it and keep it in a safe place. You will need it in the next step. 5. **Edit the Validator Configuration File:** Open `~/layer/validator.json`: @@ -62,22 +61,23 @@ Open `~/layer/validator.json`: **Note:** TRB tokens are used for gas on the layer network. As a validator you will need to make transactions to send tokens, become a reporter, unjail, etc. When choosing the amount to stake, it is important to reserve some TRB for gas. -4. **Create Your Validator:** -A few things need to happen (in order) to successfully start a layer validator. -You will: -1. Do the create-validator tx. -2. Count to 10. -3. Restart your node. +6. **Create Your Validator:** +A few things need to happen (in order) to successfully start a layer validator. You should have two terminal windows open: a command window and a node window. + +You will need to do a, b, and c carefully: +a. Do the create-validator tx in command window +b. Count to 10 +c. Restart your node in the node window Let's go! - 1. Run the following commands: + a. Run the following command to create-validator: ```sh - ./layerd tx staking create-validator ./validator.json --from $ACCOUNT_NAME --home $LAYERD_NODE_HOME --chain-id layer --node="http://localhost:26657" --gas "400000" + ./layerd tx staking create-validator ./validator.json --from $ACCOUNT_NAME --home $LAYERD_NODE_HOME --chain-id layer --node="http://localhost:26657" --gas "400000" --yes ``` - 2. count to 10 - 3. In your node window, use `ctrl^c` to stop the node. Use this command to start it back up: + b. count to 10 and open the node window + c. In your node window, use `ctrl^c` to stop the node. Enter this command to start it back up: ```sh ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=false --panic-on-daemon-failure-enabled=false From 921e1d77ced8e21a8809a8984eed395342c22c03 Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Thu, 18 Jul 2024 12:59:34 -0400 Subject: [PATCH 37/52] check if synced step --- public-testnet/1_install_layer_and_run_node.md | 13 ++++++++++--- public-testnet/2_become_a_validator_reporter.md | 10 ++++++++-- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/public-testnet/1_install_layer_and_run_node.md b/public-testnet/1_install_layer_and_run_node.md index 811593d..8ee9e94 100644 --- a/public-testnet/1_install_layer_and_run_node.md +++ b/public-testnet/1_install_layer_and_run_node.md @@ -50,7 +50,6 @@ Exit nano with `ctrl^x` then enter `y` to save the changes. 4. **Add variables to .bashrc (or .zshrc)** *Setting variables in .bashrc is not required, but it helps to avoid many common errors.* -ds Here is a list of variables we will use in this guide and a short description of their purpose: * `LAYER_NODE_URL`: Set to the unquoted URL (or public IPv4 address) of a seed node, like tellornode.com. * `KEYRING_BACKEND`: Set to `test` by default but can be configured here. (test works fine) @@ -59,7 +58,14 @@ Here is a list of variables we will use in this guide and a short description of * `TELLORNODE_ID`: Set to the unquoted node ID of the seed node. * `LAYERD_NODE_HOME`: Should be set to "$HOME/.layer/$ACCOUNT_NAME" -Open your `.bashrc` or `zshrc` file and add these lines at the end. replace "bob" with the values you choose: +Open your `.bashrc` or `zshrc` file: + +```sh +nano ~/.bashrc # if linux +nano ~/.zshrc # if mac +``` + +Add these lines at the end, editing `NODE_MONIKER` be to whatever you'd like to name your node. Edit the ACCOUNT_NAME to whatever you'd like to call your wallet account: ```sh # layer @@ -71,7 +77,8 @@ export ACCOUNT_NAME="bob" export LAYERD_NODE_HOME="$HOME/.layer/$ACCOUNT_NAME" ``` -Restart your terminal, or use `source ~/.bashrc` before you continue. +Restart your terminal, or use `source ~/.bashrc` before you continue. (if Linux) +Restart your terminal, or use `source ~/.zshrc` before you continue. (if mac) *Note: We may need to reset the chain a few more times while we cook. This causes the `TELLORNODE_ID` to change. You can check the current correct id with:* diff --git a/public-testnet/2_become_a_validator_reporter.md b/public-testnet/2_become_a_validator_reporter.md index 0a9a465..13ba495 100644 --- a/public-testnet/2_become_a_validator_reporter.md +++ b/public-testnet/2_become_a_validator_reporter.md @@ -9,8 +9,14 @@ You will need to have some layer testnet TRB. Feel free to send us your tellor p ***It helps to have quick access to the node window and the commands window as you go though the steps (to avoid jailing).*** 1. **Check if your node is synced:** -If you cannot read the log as it's being printed, the node still syncing. -Syncing can a while (>1hr) so please be patient and wait until your node is ready before you proceed. +Run the command + +```sh +./layerd status +``` + +If `"catching_up": true`, your node is not synced. +If `"catching_up": false`, your node is synced! 2. **Check if your address has funds** From f76d5d05b70044106de3284b92db92a26c37d7af Mon Sep 17 00:00:00 2001 From: 0xSpuddy Date: Thu, 18 Jul 2024 16:22:05 -0400 Subject: [PATCH 38/52] fixed commands --- .../1_install_layer_and_run_node.md | 25 +++++++++- .../2_become_a_validator_reporter.md | 50 ++++++++++++------- 2 files changed, 56 insertions(+), 19 deletions(-) diff --git a/public-testnet/1_install_layer_and_run_node.md b/public-testnet/1_install_layer_and_run_node.md index 8ee9e94..b37baad 100644 --- a/public-testnet/1_install_layer_and_run_node.md +++ b/public-testnet/1_install_layer_and_run_node.md @@ -57,6 +57,8 @@ Here is a list of variables we will use in this guide and a short description of * `ACCOUNT_NAME`: Set to your name or whatever name you choose (like “bill” or "ruth"). * `TELLORNODE_ID`: Set to the unquoted node ID of the seed node. * `LAYERD_NODE_HOME`: Should be set to "$HOME/.layer/$ACCOUNT_NAME" + * `TELLOR_ADDRESS`: the tellor prefix address for your account + * `TELLORVALOPER_ADDRESS`: the tellorvaloper prefix address for your account Open your `.bashrc` or `zshrc` file: @@ -75,8 +77,12 @@ export KEYRING_BACKEND="test" export NODE_MONIKER="bobmoniker" export ACCOUNT_NAME="bob" export LAYERD_NODE_HOME="$HOME/.layer/$ACCOUNT_NAME" +export TELLOR_ADDRESS= # your tellor prefix address (we will add it later) +export TELLORVALOPER_ADDRESS= #your tellorvaloper address (we will add it later) ``` +Exit nano with `ctrl^x` then enter `y` to save the changes. + Restart your terminal, or use `source ~/.bashrc` before you continue. (if Linux) Restart your terminal, or use `source ~/.zshrc` before you continue. (if mac) @@ -98,7 +104,6 @@ curl tellornode.com:26657/status ./layerd init $ACCOUNT_NAME --chain-id layer --home ~/.layer/$ACCOUNT_NAME ``` - 5. **Create an account on Layer** You will need a "wallet" account on layer to hold your TRB tokens that you will stake to become a validator reporter. @@ -126,7 +131,23 @@ Import your account with the command: ./layerd keys add $ACCOUNT_NAME --recover=true --keyring-backend $KEYRING_BACKEND --home $LAYERD_NODE_HOME ``` -6. **Run the configure_layer script** +6. **Add your address to your ~/.bashrc or .zshrc file** +Open it with: + +```sh +nano ~/.bashrc # if linux +nano ~/.zshrc # if mac +``` + +set TELLOR_ADDRESS to your tellor prefix address like: + +```sh +export TELLOR_ADDRESS=tellor1asdfc5cqnt68k376g7fvasdfh6w4qy9et6asdf +``` + +Exit nano with `ctrl^x` then enter `y` to save the changes. + +7. **Create and Run the configure_layer script** We need to change the config files a bit using one of the provided `configure_layer_nix.sh` or `configure_layer_mac.sh` scripts from the layerdocs repo. **If on linux:** diff --git a/public-testnet/2_become_a_validator_reporter.md b/public-testnet/2_become_a_validator_reporter.md index 13ba495..54cb735 100644 --- a/public-testnet/2_become_a_validator_reporter.md +++ b/public-testnet/2_become_a_validator_reporter.md @@ -21,7 +21,7 @@ If `"catching_up": false`, your node is synced! 2. **Check if your address has funds** ```sh -./layerd query bank balance $ACCOUNT_NAME loya --chain-id layer +./layerd query bank balance $TELLOR_ADDRESS loya --chain-id layer ``` 3. While we're at it, let's grab your "tellorvaloper" prefix address also: @@ -32,7 +32,23 @@ If `"catching_up": false`, your node is synced! *This will output the "tellorvaloper" prefix address for your account. It is used for validator commands and is different from the "tellor" prefix address that is used for sending and recieving TRB. Copy this "tellorvaloper" prefix address and keep it in the same place where you can copy it later.* -4. **Retrieve Your Validator Public Key:** +4. **Add your tellorvaloper address to your ~/.bashrc or .zshrc file** +Open it with: + +```sh +nano ~/.bashrc # if linux +nano ~/.zshrc # if mac +``` + +set TELLORVALOPER_ADDRESS to your tellor prefix address like: + +```sh +export TELLORVALOPER_ADDRESS=tellorvaloper1asdfc5cqnasdf376g7fv9whph6w4qy9e74asdf +``` + +Exit nano with `ctrl^x` then enter `y` to save the changes. + +5. **Retrieve Your Validator Public Key:** With your `layer` folder as the active directory, use the command: ```sh @@ -42,7 +58,7 @@ With your `layer` folder as the active directory, use the command: This returns your validator pubkey. (e.g., `{"@type":"/cosmos.crypto.ed25519.PubKey","key":"FX9cKNl+QmxtLcL926P5yJqZw7YyuSX3HQAZboz3TjM="}`). Copy it and keep it in a safe place. You will need it in the next step. -5. **Edit the Validator Configuration File:** +6. **Edit the Validator Configuration File:** Open `~/layer/validator.json`: ```json @@ -60,14 +76,14 @@ Open `~/layer/validator.json`: "min-self-delegation": "1" } ``` -- Edit `"pubkey"` to match yours from step 2. +- Edit `"pubkey"` to match yours from step 4. - Edit `"amount"` to be the amount of testnet TRB that you would like to stake with 6 decimals and the "loya" denom. (For example: if you want to stake 99 TRB use `"amount": "99000000loya"`) - Edit `"moniker"` to match your node moniker variable. **Note:** TRB tokens are used for gas on the layer network. As a validator you will need to make transactions to send tokens, become a reporter, unjail, etc. When choosing the amount to stake, it is important to reserve some TRB for gas. -6. **Create Your Validator:** +7. **Create Your Validator:** A few things need to happen (in order) to successfully start a layer validator. You should have two terminal windows open: a command window and a node window. You will need to do a, b, and c carefully: @@ -75,21 +91,21 @@ a. Do the create-validator tx in command window b. Count to 10 c. Restart your node in the node window - Let's go! - a. Run the following command to create-validator: +Let's go! +a. Run the following command to create-validator: - ```sh - ./layerd tx staking create-validator ./validator.json --from $ACCOUNT_NAME --home $LAYERD_NODE_HOME --chain-id layer --node="http://localhost:26657" --gas "400000" --yes - ``` +```sh +./layerd tx reporter create-reporter "100000000000000000" "1000000" --from $ACCOUNT_NAME --keyring-backend $KEYRING_BACKEND --chain-id layer --home $LAYERD_NODE_HOME --keyring-dir $LAYERD_NODE_HOME +``` - b. count to 10 and open the node window - c. In your node window, use `ctrl^c` to stop the node. Enter this command to start it back up: +b. count to 10 and open the node window +c. In your node window, use `ctrl^c` to stop the node. Enter this command to start it back up: - ```sh - ./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=false --panic-on-daemon-failure-enabled=false - ``` +```sh +./layerd start --home $LAYERD_NODE_HOME --api.enable --api.swagger --price-daemon-enabled=false --panic-on-daemon-failure-enabled=false +``` -5. **Verify Your Validator Creation:** +8. **Verify Your Validator Creation:** Ensure your validator was created successfully using the command: ```sh @@ -126,7 +142,7 @@ Layer testnet is still experimental, and jailing can happen for various reasons 2. enter the unjail the command: ```sh -./layerd tx slashing unjail --from $ACCOUNT_NAME --chain-id layer --yes +./layerd tx slashing unjail --from $TELLOR_ADDRESS --chain-id layer --home $LAYERD_NODE_HOME --keyring-backend test --keyring-dir $LAYERD_NODE_HOME ``` 3. Restart the node with reporter daemon turned on: From 669c84dd7ee999fba22de5768d487a5787d963b3 Mon Sep 17 00:00:00 2001 From: spuddy <72078372+0xSpuddy@users.noreply.github.com> Date: Thu, 5 Sep 2024 14:01:30 -0400 Subject: [PATCH 39/52] Update configure_layer_nix.sh --- public-testnet/configure_layer_nix.sh | 29 +++++++++++---------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/public-testnet/configure_layer_nix.sh b/public-testnet/configure_layer_nix.sh index 6601ec3..adc8693 100644 --- a/public-testnet/configure_layer_nix.sh +++ b/public-testnet/configure_layer_nix.sh @@ -7,56 +7,51 @@ clear set -e # set variables in your .bashrc before starting this script! -source ~/.bashrc +export LAYER_NODE_URL=tellorlayer.com +export TELLORNODE_ID=18f58b3bc1756ad3872b00b349429fd4f56d2b34 echo "Change denom to loya in config files..." -sed -i 's/([0-9]+)stake/1loya/g' ~/.layer/$ACCOUNT_NAME/config/app.toml sed -i 's/([0-9]+)stake/1loya/g' ~/.layer/config/app.toml echo "Set Chain Id to layer in client config file..." -sed -i 's/^chain-id = .*$/chain-id = "layer"/g' ~/.layer/$ACCOUNT_NAME/config/app.toml sed -i 's/^chain-id = .*$/chain-id = "layer"/g' ~/.layer/config/app.toml # Modify timeout_commit in config.toml for node echo "Modifying timeout_commit in config.toml for node..." -sed -i 's/timeout_commit = "5s"/timeout_commit = "1s"/' ~/.layer/$ACCOUNT_NAME/config/config.toml +sed -i 's/timeout_commit = "5s"/timeout_commit = "1s"/' ~/.layer/config/config.toml # Open up node to outside traffic echo "Open up node to outside traffice" -sed -i 's/^laddr = "tcp:\/\/127.0.0.1:26657"/laddr = "tcp:\/\/0.0.0.0:26657"/g' ~/.layer/$ACCOUNT_NAME/config/config.toml -sed -i 's/^laddr = "tcp:\/\/127.0.0.1:26656"/laddr = "tcp:\/\/0.0.0.0:26656"/g' ~/.layer/$ACCOUNT_NAME/config/config.toml +sed -i 's/^laddr = "tcp:\/\/127.0.0.1:26656"/laddr = "tcp:\/\/0.0.0.0:26656"/g' ~/.layer/config/config.toml -sed -i 's/^address = "tcp:\/\/localhost:1317"/address = "tcp:\/\/0.0.0.0:1317"/g' ~/.layer/$ACCOUNT_NAME/config/app.toml +sed -i 's/^address = "tcp:\/\/localhost:1317"/address = "tcp:\/\/0.0.0.0:1317"/g' ~/.layer/config/app.toml # Modify cors to accept * echo "Modify cors to accept *" -sed -i 's/^cors_allowed_origins = \[\]/cors_allowed_origins = \["\*"\]/g' ~/.layer/$ACCOUNT_NAME/config/config.toml sed -i 's/^cors_allowed_origins = \[\]/cors_allowed_origins = \["\*"\]/g' ~/.layer/config/config.toml # enable unsafe cors echo "Enable unsafe cors" -sed -i 's/^cors_allowed_origins = \[\]/cors_allowed_origins = \["\*"\]/g' ~/.layer/$ACCOUNT_NAME/config/app.toml -sed -i 's/^enable-unsafe-cors = false/enable-unsafe-cors = true/g' ~/.layer/$ACCOUNT_NAME/config/app.toml +sed -i 's/^cors_allowed_origins = \[\]/cors_allowed_origins = \["\*"\]/g' ~/.layer/config/app.toml +sed -i 's/^enable-unsafe-cors = false/enable-unsafe-cors = true/g' ~/.layer/config/app.toml sed -i 's/^enabled-unsafe-cors = false/enabled-unsafe-cors = true/g' ~/.layer/config/app.toml sed -i 's/^enable-unsafe-cors = false/enable-unsafe-cors = true/g' ~/.layer/config/app.toml # Modify keyring-backend in client.toml for node echo "Modifying keyring-backend in client.toml for node..." -sed -i 's/^keyring-backend = "os"/keyring-backend = "'$KEYRING_BACKEND'"/g' ~/.layer/$ACCOUNT_NAME/config/client.toml +sed -i 's/^keyring-backend = "os"/keyring-backend = "'test'"/g' ~/.layer/config/client.toml # update for main dir as well. why is this needed? -sed -i 's/keyring-backend = "os"/keyring-backend = "'$KEYRING_BACKEND'"/g' ~/.layer/config/client.toml +sed -i 's/keyring-backend = "os"/keyring-backend = "'test'"/g' ~/.layer/config/client.toml rm -f ~/.layer/config/genesis.json -rm -f ~/.layer/$ACCOUNT_NAME/config/genesis.json # get genesis file from running node's rpc echo "Getting genesis from runnning node....." curl $LAYER_NODE_URL:26657/genesis | jq '.result.genesis' > ~/.layer/config/genesis.json -curl $LAYER_NODE_URL:26657/genesis | jq '.result.genesis' > ~/.layer/$ACCOUNT_NAME/config/genesis.json echo "Running Tellor node id: $TELLORNODE_ID" -sed -i 's/seeds = ""/seeds = "'$TELLORNODE_ID'@'$LAYER_NODE_URL':26656"/g' ~/.layer/$ACCOUNT_NAME/config/config.toml -sed -i 's/persistent_peers = ""/persistent_peers = "'$TELLORNODE_ID'@'$LAYER_NODE_URL':26656"/g' ~/.layer/$ACCOUNT_NAME/config/config.toml +sed -i 's/seeds = ""/seeds = "'$TELLORNODE_ID'@'$LAYER_NODE_URL':26656"/g' ~/.layer/config/config.toml +sed -i 's/persistent_peers = ""/persistent_peers = "'$TELLORNODE_ID'@'$LAYER_NODE_URL':26656"/g' ~/.layer/config/config.toml echo "Path: $TELLORNODE_ID@$LAYER_NODE_URL:26656" -echo "layer has been configured in it's home folder!" \ No newline at end of file +echo "layer has been configured in it's home folder!" From 387d404458ba05ac1122862a1eb90497399f38cc Mon Sep 17 00:00:00 2001 From: spuddy <72078372+0xSpuddy@users.noreply.github.com> Date: Thu, 5 Sep 2024 14:03:46 -0400 Subject: [PATCH 40/52] Update configure_layer_mac.sh --- public-testnet/configure_layer_mac.sh | 48 +++++++++++++-------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/public-testnet/configure_layer_mac.sh b/public-testnet/configure_layer_mac.sh index 84203e5..3db8853 100755 --- a/public-testnet/configure_layer_mac.sh +++ b/public-testnet/configure_layer_mac.sh @@ -3,57 +3,55 @@ # clear the terminal clear -# set variables in your .zshrc before starting this script! -source ~/.zshrc +# Stop execution if any command fails +set -e + +# set variables in your .bashrc before starting this script! +export LAYER_NODE_URL=tellorlayer.com +export TELLORNODE_ID=18f58b3bc1756ad3872b00b349429fd4f56d2b34 echo "Change denom to loya in config files..." -sed -i '' 's/([0-9]+)stake/1loya/g' ~/.layer/$ACCOUNT_NAME/config/app.toml -sed -i '' 's/([0-9]+)stake/1loya/g' ~/.layer/config/app.toml +sed '' -i 's/([0-9]+)stake/1loya/g' ~/.layer/config/app.toml echo "Set Chain Id to layer in client config file..." -sed -i '' 's/^chain-id = .*$/chain-id = "layer"/g' ~/.layer/$ACCOUNT_NAME/config/app.toml -sed -i '' 's/^chain-id = .*$/chain-id = "layer"/g' ~/.layer/config/app.toml +sed '' -i 's/^chain-id = .*$/chain-id = "layer"/g' ~/.layer/config/app.toml # Modify timeout_commit in config.toml for node -echo "Modifying timeout_commit in config.toml for $ACCOUNT_NAME..." -sed -i '' 's/timeout_commit = "5s"/timeout_commit = "1s"/' ~/.layer/$ACCOUNT_NAME/config/config.toml +echo "Modifying timeout_commit in config.toml for node..." +sed '' -i 's/timeout_commit = "5s"/timeout_commit = "1s"/' ~/.layer/config/config.toml # Open up node to outside traffic -echo "Open up node to outside traffic" -sed -i '' 's/^laddr = "tcp:\/\/127.0.0.1:26657"/laddr = "tcp:\/\/0.0.0.0:26657"/g' ~/.layer/$ACCOUNT_NAME/config/config.toml -sed -i '' 's/^laddr = "tcp:\/\/127.0.0.1:26656"/laddr = "tcp:\/\/0.0.0.0:26656"/g' ~/.layer/$ACCOUNT_NAME/config/config.toml +echo "Open up node to outside traffice" +sed '' -i 's/^laddr = "tcp:\/\/127.0.0.1:26656"/laddr = "tcp:\/\/0.0.0.0:26656"/g' ~/.layer/config/config.toml -sed -i '' 's/^address = "tcp:\/\/localhost:1317"/address = "tcp:\/\/0.0.0.0:1317"/g' ~/.layer/$ACCOUNT_NAME/config/app.toml +sed '' -i 's/^address = "tcp:\/\/localhost:1317"/address = "tcp:\/\/0.0.0.0:1317"/g' ~/.layer/config/app.toml # Modify cors to accept * echo "Modify cors to accept *" -sed -i '' 's/^cors_allowed_origins = \[\]/cors_allowed_origins = \["\*"\]/g' ~/.layer/$ACCOUNT_NAME/config/config.toml -sed -i '' 's/^cors_allowed_origins = \[\]/cors_allowed_origins = \["\*"\]/g' ~/.layer/config/config.toml +sed '' -i 's/^cors_allowed_origins = \[\]/cors_allowed_origins = \["\*"\]/g' ~/.layer/config/config.toml # enable unsafe cors echo "Enable unsafe cors" -sed -i '' 's/^cors_allowed_origins = \[\]/cors_allowed_origins = \["\*"\]/g' ~/.layer/$ACCOUNT_NAME/config/app.toml -sed -i '' 's/^enable-unsafe-cors = false/enable-unsafe-cors = true/g' ~/.layer/$ACCOUNT_NAME/config/app.toml -sed -i '' 's/^enabled-unsafe-cors = false/enabled-unsafe-cors = true/g' ~/.layer/config/app.toml -sed -i '' 's/^enable-unsafe-cors = false/enable-unsafe-cors = true/g' ~/.layer/config/app.toml +sed '' -i 's/^cors_allowed_origins = \[\]/cors_allowed_origins = \["\*"\]/g' ~/.layer/config/app.toml +sed '' -i 's/^enable-unsafe-cors = false/enable-unsafe-cors = true/g' ~/.layer/config/app.toml +sed '' -i 's/^enabled-unsafe-cors = false/enabled-unsafe-cors = true/g' ~/.layer/config/app.toml +sed '' -i 's/^enable-unsafe-cors = false/enable-unsafe-cors = true/g' ~/.layer/config/app.toml # Modify keyring-backend in client.toml for node echo "Modifying keyring-backend in client.toml for node..." -sed -i '' 's/^keyring-backend = "os"/keyring-backend = "'$KEYRING_BACKEND'"/g' ~/.layer/$ACCOUNT_NAME/config/client.toml +sed '' -i 's/^keyring-backend = "os"/keyring-backend = "'test'"/g' ~/.layer/config/client.toml # update for main dir as well. why is this needed? -sed -i '' 's/keyring-backend = "os"/keyring-backend = "'$KEYRING_BACKEND'"/g' ~/.layer/config/client.toml +sed '' -i 's/keyring-backend = "os"/keyring-backend = "'test'"/g' ~/.layer/config/client.toml rm -f ~/.layer/config/genesis.json -rm -f ~/.layer/$ACCOUNT_NAME/config/genesis.json # get genesis file from running node's rpc echo "Getting genesis from runnning node....." curl $LAYER_NODE_URL:26657/genesis | jq '.result.genesis' > ~/.layer/config/genesis.json -curl $LAYER_NODE_URL:26657/genesis | jq '.result.genesis' > ~/.layer/$ACCOUNT_NAME/config/genesis.json echo "Running Tellor node id: $TELLORNODE_ID" -sed -i '' 's/seeds = ""/seeds = "'$TELLORNODE_ID'@'$LAYER_NODE_URL':26656"/g' ~/.layer/$ACCOUNT_NAME/config/config.toml -sed -i '' 's/persistent_peers = ""/persistent_peers = "'$TELLORNODE_ID'@'$LAYER_NODE_URL':26656"/g' ~/.layer/$ACCOUNT_NAME/config/config.toml +sed '' -i 's/seeds = ""/seeds = "'$TELLORNODE_ID'@'$LAYER_NODE_URL':26656"/g' ~/.layer/config/config.toml +sed '' -i 's/persistent_peers = ""/persistent_peers = "'$TELLORNODE_ID'@'$LAYER_NODE_URL':26656"/g' ~/.layer/config/config.toml echo "Path: $TELLORNODE_ID@$LAYER_NODE_URL:26656" -echo "layer has been configured in it's home folder!" \ No newline at end of file +echo "layer has been configured in it's home folder!" From 7bcceeb9e339159434b8257888b9800f7e6bc21f Mon Sep 17 00:00:00 2001 From: spuddy <72078372+0xSpuddy@users.noreply.github.com> Date: Thu, 5 Sep 2024 20:46:27 -0400 Subject: [PATCH 41/52] Update configure_layer_mac.sh --- public-testnet/configure_layer_mac.sh | 28 +++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/public-testnet/configure_layer_mac.sh b/public-testnet/configure_layer_mac.sh index 3db8853..01d27bd 100755 --- a/public-testnet/configure_layer_mac.sh +++ b/public-testnet/configure_layer_mac.sh @@ -11,37 +11,37 @@ export LAYER_NODE_URL=tellorlayer.com export TELLORNODE_ID=18f58b3bc1756ad3872b00b349429fd4f56d2b34 echo "Change denom to loya in config files..." -sed '' -i 's/([0-9]+)stake/1loya/g' ~/.layer/config/app.toml +sed -i '' 's/([0-9]+)stake/1loya/g' ~/.layer/config/app.toml echo "Set Chain Id to layer in client config file..." -sed '' -i 's/^chain-id = .*$/chain-id = "layer"/g' ~/.layer/config/app.toml +sed -i '' 's/^chain-id = .*$/chain-id = "layer"/g' ~/.layer/config/app.toml # Modify timeout_commit in config.toml for node echo "Modifying timeout_commit in config.toml for node..." -sed '' -i 's/timeout_commit = "5s"/timeout_commit = "1s"/' ~/.layer/config/config.toml +sed -i '' 's/timeout_commit = "5s"/timeout_commit = "1s"/' ~/.layer/config/config.toml # Open up node to outside traffic echo "Open up node to outside traffice" -sed '' -i 's/^laddr = "tcp:\/\/127.0.0.1:26656"/laddr = "tcp:\/\/0.0.0.0:26656"/g' ~/.layer/config/config.toml +sed -i '' 's/^laddr = "tcp:\/\/127.0.0.1:26656"/laddr = "tcp:\/\/0.0.0.0:26656"/g' ~/.layer/config/config.toml -sed '' -i 's/^address = "tcp:\/\/localhost:1317"/address = "tcp:\/\/0.0.0.0:1317"/g' ~/.layer/config/app.toml +sed -i '' 's/^address = "tcp:\/\/localhost:1317"/address = "tcp:\/\/0.0.0.0:1317"/g' ~/.layer/config/app.toml # Modify cors to accept * echo "Modify cors to accept *" -sed '' -i 's/^cors_allowed_origins = \[\]/cors_allowed_origins = \["\*"\]/g' ~/.layer/config/config.toml +sed -i '' 's/^cors_allowed_origins = \[\]/cors_allowed_origins = \["\*"\]/g' ~/.layer/config/config.toml # enable unsafe cors echo "Enable unsafe cors" -sed '' -i 's/^cors_allowed_origins = \[\]/cors_allowed_origins = \["\*"\]/g' ~/.layer/config/app.toml -sed '' -i 's/^enable-unsafe-cors = false/enable-unsafe-cors = true/g' ~/.layer/config/app.toml -sed '' -i 's/^enabled-unsafe-cors = false/enabled-unsafe-cors = true/g' ~/.layer/config/app.toml -sed '' -i 's/^enable-unsafe-cors = false/enable-unsafe-cors = true/g' ~/.layer/config/app.toml +sed -i '' 's/^cors_allowed_origins = \[\]/cors_allowed_origins = \["\*"\]/g' ~/.layer/config/app.toml +sed -i '' 's/^enable-unsafe-cors = false/enable-unsafe-cors = true/g' ~/.layer/config/app.toml +sed -i '' 's/^enabled-unsafe-cors = false/enabled-unsafe-cors = true/g' ~/.layer/config/app.toml +sed -i '' 's/^enable-unsafe-cors = false/enable-unsafe-cors = true/g' ~/.layer/config/app.toml # Modify keyring-backend in client.toml for node echo "Modifying keyring-backend in client.toml for node..." -sed '' -i 's/^keyring-backend = "os"/keyring-backend = "'test'"/g' ~/.layer/config/client.toml +sed -i '' 's/^keyring-backend = "os"/keyring-backend = "'test'"/g' ~/.layer/config/client.toml # update for main dir as well. why is this needed? -sed '' -i 's/keyring-backend = "os"/keyring-backend = "'test'"/g' ~/.layer/config/client.toml +sed -i '' 's/keyring-backend = "os"/keyring-backend = "'test'"/g' ~/.layer/config/client.toml rm -f ~/.layer/config/genesis.json # get genesis file from running node's rpc @@ -49,8 +49,8 @@ echo "Getting genesis from runnning node....." curl $LAYER_NODE_URL:26657/genesis | jq '.result.genesis' > ~/.layer/config/genesis.json echo "Running Tellor node id: $TELLORNODE_ID" -sed '' -i 's/seeds = ""/seeds = "'$TELLORNODE_ID'@'$LAYER_NODE_URL':26656"/g' ~/.layer/config/config.toml -sed '' -i 's/persistent_peers = ""/persistent_peers = "'$TELLORNODE_ID'@'$LAYER_NODE_URL':26656"/g' ~/.layer/config/config.toml +sed -i '' 's/seeds = ""/seeds = "'$TELLORNODE_ID'@'$LAYER_NODE_URL':26656"/g' ~/.layer/config/config.toml +sed -i '' 's/persistent_peers = ""/persistent_peers = "'$TELLORNODE_ID'@'$LAYER_NODE_URL':26656"/g' ~/.layer/config/config.toml echo "Path: $TELLORNODE_ID@$LAYER_NODE_URL:26656" From 6f84cf02466e4f42eac1dedbbfa86b044c30348f Mon Sep 17 00:00:00 2001 From: spuddy <72078372+0xSpuddy@users.noreply.github.com> Date: Tue, 29 Oct 2024 14:57:46 -0400 Subject: [PATCH 42/52] Update configure_layer_nix.sh --- public-testnet/configure_layer_nix.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/public-testnet/configure_layer_nix.sh b/public-testnet/configure_layer_nix.sh index adc8693..dc3beb5 100644 --- a/public-testnet/configure_layer_nix.sh +++ b/public-testnet/configure_layer_nix.sh @@ -7,8 +7,11 @@ clear set -e # set variables in your .bashrc before starting this script! +source ~/.bashrc + export LAYER_NODE_URL=tellorlayer.com -export TELLORNODE_ID=18f58b3bc1756ad3872b00b349429fd4f56d2b34 +export TELLORNODE_ID=b0dff39942b90880c040e302bfa37b2239dddc1b +export KEYRING_BACKEND="test" echo "Change denom to loya in config files..." sed -i 's/([0-9]+)stake/1loya/g' ~/.layer/config/app.toml @@ -39,9 +42,9 @@ sed -i 's/^enable-unsafe-cors = false/enable-unsafe-cors = true/g' ~/.layer/conf # Modify keyring-backend in client.toml for node echo "Modifying keyring-backend in client.toml for node..." -sed -i 's/^keyring-backend = "os"/keyring-backend = "'test'"/g' ~/.layer/config/client.toml +sed -i 's/^keyring-backend = "os"/keyring-backend = "'$KEYRING_BACKEND'"/g' ~/.layer/config/client.toml # update for main dir as well. why is this needed? -sed -i 's/keyring-backend = "os"/keyring-backend = "'test'"/g' ~/.layer/config/client.toml +sed -i 's/keyring-backend = "os"/keyring-backend = "'$KEYRING_BACKEND'"/g' ~/.layer/config/client.toml rm -f ~/.layer/config/genesis.json # get genesis file from running node's rpc From b6b7d64bd453cbd48dda5608bfb282405627c026 Mon Sep 17 00:00:00 2001 From: spuddy <72078372+0xSpuddy@users.noreply.github.com> Date: Tue, 29 Oct 2024 15:00:06 -0400 Subject: [PATCH 43/52] Update configure_layer_mac.sh --- public-testnet/configure_layer_mac.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/public-testnet/configure_layer_mac.sh b/public-testnet/configure_layer_mac.sh index 01d27bd..8aa01c6 100755 --- a/public-testnet/configure_layer_mac.sh +++ b/public-testnet/configure_layer_mac.sh @@ -7,8 +7,11 @@ clear set -e # set variables in your .bashrc before starting this script! +source ~/.bashrc + export LAYER_NODE_URL=tellorlayer.com -export TELLORNODE_ID=18f58b3bc1756ad3872b00b349429fd4f56d2b34 +export TELLORNODE_ID=b0dff39942b90880c040e302bfa37b2239dddc1b +export KEYRING_BACKEND="test" echo "Change denom to loya in config files..." sed -i '' 's/([0-9]+)stake/1loya/g' ~/.layer/config/app.toml @@ -39,9 +42,9 @@ sed -i '' 's/^enable-unsafe-cors = false/enable-unsafe-cors = true/g' ~/.layer/c # Modify keyring-backend in client.toml for node echo "Modifying keyring-backend in client.toml for node..." -sed -i '' 's/^keyring-backend = "os"/keyring-backend = "'test'"/g' ~/.layer/config/client.toml +sed -i '' 's/^keyring-backend = "os"/keyring-backend = "'$KEYRING_BACKEND'"/g' ~/.layer/config/client.toml # update for main dir as well. why is this needed? -sed -i '' 's/keyring-backend = "os"/keyring-backend = "'test'"/g' ~/.layer/config/client.toml +sed -i '' 's/keyring-backend = "os"/keyring-backend = "'$KEYRING_BACKEND'"/g' ~/.layer/config/client.toml rm -f ~/.layer/config/genesis.json # get genesis file from running node's rpc From c85a50ed4e4f1cc2fdd2b869d83df65859aa2eb5 Mon Sep 17 00:00:00 2001 From: spuddy <72078372+0xSpuddy@users.noreply.github.com> Date: Fri, 8 Nov 2024 12:24:12 -0500 Subject: [PATCH 44/52] Update configure_layer_nix.sh add lots of seeds and peers --- public-testnet/configure_layer_nix.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public-testnet/configure_layer_nix.sh b/public-testnet/configure_layer_nix.sh index dc3beb5..0cea237 100644 --- a/public-testnet/configure_layer_nix.sh +++ b/public-testnet/configure_layer_nix.sh @@ -12,6 +12,7 @@ source ~/.bashrc export LAYER_NODE_URL=tellorlayer.com export TELLORNODE_ID=b0dff39942b90880c040e302bfa37b2239dddc1b export KEYRING_BACKEND="test" +export PEERS="6a5ab45eea6ebd53eea5da79293c53d3ba9244d0@54.183.89.163:26656,b0dff39942b90880c040e302bfa37b2239dddc1b@54.209.172.1:26656,de33dfeeebe49930f51a09e6e9994e1288c6bb69@18.222.23.49:26757,0d38bda3729bbd4a30ed8d602d569548f60824e9@3.147.56.107:26757" echo "Change denom to loya in config files..." sed -i 's/([0-9]+)stake/1loya/g' ~/.layer/config/app.toml @@ -51,10 +52,10 @@ rm -f ~/.layer/config/genesis.json echo "Getting genesis from runnning node....." curl $LAYER_NODE_URL:26657/genesis | jq '.result.genesis' > ~/.layer/config/genesis.json +# set initial seeds / peers echo "Running Tellor node id: $TELLORNODE_ID" -sed -i 's/seeds = ""/seeds = "'$TELLORNODE_ID'@'$LAYER_NODE_URL':26656"/g' ~/.layer/config/config.toml -sed -i 's/persistent_peers = ""/persistent_peers = "'$TELLORNODE_ID'@'$LAYER_NODE_URL':26656"/g' ~/.layer/config/config.toml +sed -i 's/seeds = ""/seeds = "'$PEERS'"/g' ~/.layer/config/config.toml +sed -i 's/persistent_peers = ""/persistent_peers = "'$PEERS'"/g' ~/.layer/config/config.toml -echo "Path: $TELLORNODE_ID@$LAYER_NODE_URL:26656" echo "layer has been configured in it's home folder!" From 3b714ea6a47e00b3dc8a4c8d4a24b6ffb7fde78e Mon Sep 17 00:00:00 2001 From: spuddy <72078372+0xSpuddy@users.noreply.github.com> Date: Fri, 8 Nov 2024 12:26:06 -0500 Subject: [PATCH 45/52] Update configure_layer_mac.sh --- public-testnet/configure_layer_mac.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public-testnet/configure_layer_mac.sh b/public-testnet/configure_layer_mac.sh index 8aa01c6..ebe0317 100755 --- a/public-testnet/configure_layer_mac.sh +++ b/public-testnet/configure_layer_mac.sh @@ -12,6 +12,7 @@ source ~/.bashrc export LAYER_NODE_URL=tellorlayer.com export TELLORNODE_ID=b0dff39942b90880c040e302bfa37b2239dddc1b export KEYRING_BACKEND="test" +export PEERS="6a5ab45eea6ebd53eea5da79293c53d3ba9244d0@54.183.89.163:26656,b0dff39942b90880c040e302bfa37b2239dddc1b@54.209.172.1:26656,de33dfeeebe49930f51a09e6e9994e1288c6bb69@18.222.23.49:26757,0d38bda3729bbd4a30ed8d602d569548f60824e9@3.147.56.107:26757" echo "Change denom to loya in config files..." sed -i '' 's/([0-9]+)stake/1loya/g' ~/.layer/config/app.toml @@ -51,10 +52,10 @@ rm -f ~/.layer/config/genesis.json echo "Getting genesis from runnning node....." curl $LAYER_NODE_URL:26657/genesis | jq '.result.genesis' > ~/.layer/config/genesis.json +# set initial seeds / peers echo "Running Tellor node id: $TELLORNODE_ID" -sed -i '' 's/seeds = ""/seeds = "'$TELLORNODE_ID'@'$LAYER_NODE_URL':26656"/g' ~/.layer/config/config.toml -sed -i '' 's/persistent_peers = ""/persistent_peers = "'$TELLORNODE_ID'@'$LAYER_NODE_URL':26656"/g' ~/.layer/config/config.toml +sed -i '' 's/seeds = ""/seeds = "'$PEERS'"/g' ~/.layer/config/config.toml +sed -i '' 's/persistent_peers = ""/persistent_peers = "'$PEERS'"/g' ~/.layer/config/config.toml -echo "Path: $TELLORNODE_ID@$LAYER_NODE_URL:26656" echo "layer has been configured in it's home folder!" From ca67274b1e0df6a695c74ca29a23018992d115aa Mon Sep 17 00:00:00 2001 From: spuddy <72078372+0xSpuddy@users.noreply.github.com> Date: Fri, 8 Nov 2024 12:53:09 -0500 Subject: [PATCH 46/52] Update configure_layer_mac.sh --- public-testnet/configure_layer_mac.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public-testnet/configure_layer_mac.sh b/public-testnet/configure_layer_mac.sh index ebe0317..75f4164 100755 --- a/public-testnet/configure_layer_mac.sh +++ b/public-testnet/configure_layer_mac.sh @@ -7,7 +7,7 @@ clear set -e # set variables in your .bashrc before starting this script! -source ~/.bashrc +source ~/.zshrc export LAYER_NODE_URL=tellorlayer.com export TELLORNODE_ID=b0dff39942b90880c040e302bfa37b2239dddc1b From 24b25ae7542c8797987cc0fae2d2d60711bfc518 Mon Sep 17 00:00:00 2001 From: spuddy <72078372+0xSpuddy@users.noreply.github.com> Date: Fri, 8 Nov 2024 12:56:55 -0500 Subject: [PATCH 47/52] Update configure_layer_mac.sh --- public-testnet/configure_layer_mac.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public-testnet/configure_layer_mac.sh b/public-testnet/configure_layer_mac.sh index 75f4164..ff38c98 100755 --- a/public-testnet/configure_layer_mac.sh +++ b/public-testnet/configure_layer_mac.sh @@ -12,7 +12,7 @@ source ~/.zshrc export LAYER_NODE_URL=tellorlayer.com export TELLORNODE_ID=b0dff39942b90880c040e302bfa37b2239dddc1b export KEYRING_BACKEND="test" -export PEERS="6a5ab45eea6ebd53eea5da79293c53d3ba9244d0@54.183.89.163:26656,b0dff39942b90880c040e302bfa37b2239dddc1b@54.209.172.1:26656,de33dfeeebe49930f51a09e6e9994e1288c6bb69@18.222.23.49:26757,0d38bda3729bbd4a30ed8d602d569548f60824e9@3.147.56.107:26757" +export PEERS="6a5ab45eea6ebd53eea5da79293c53d3ba9244d0@54.183.89.163:26656,b0dff39942b90880c040e302bfa37b2239dddc1b@54.209.172.1:26656,de33dfeeebe49930f51a09e6e9994e1288c6bb69@18.222.23.49:26656,0d38bda3729bbd4a30ed8d602d569548f60824e9@3.147.56.107:26656" echo "Change denom to loya in config files..." sed -i '' 's/([0-9]+)stake/1loya/g' ~/.layer/config/app.toml From 9cae31c0a4c850dd34dfa4f2926708f9248aa6df Mon Sep 17 00:00:00 2001 From: spuddy <72078372+0xSpuddy@users.noreply.github.com> Date: Fri, 8 Nov 2024 12:57:17 -0500 Subject: [PATCH 48/52] Update configure_layer_nix.sh --- public-testnet/configure_layer_nix.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public-testnet/configure_layer_nix.sh b/public-testnet/configure_layer_nix.sh index 0cea237..2808d80 100644 --- a/public-testnet/configure_layer_nix.sh +++ b/public-testnet/configure_layer_nix.sh @@ -12,7 +12,7 @@ source ~/.bashrc export LAYER_NODE_URL=tellorlayer.com export TELLORNODE_ID=b0dff39942b90880c040e302bfa37b2239dddc1b export KEYRING_BACKEND="test" -export PEERS="6a5ab45eea6ebd53eea5da79293c53d3ba9244d0@54.183.89.163:26656,b0dff39942b90880c040e302bfa37b2239dddc1b@54.209.172.1:26656,de33dfeeebe49930f51a09e6e9994e1288c6bb69@18.222.23.49:26757,0d38bda3729bbd4a30ed8d602d569548f60824e9@3.147.56.107:26757" +export PEERS="6a5ab45eea6ebd53eea5da79293c53d3ba9244d0@54.183.89.163:26656,b0dff39942b90880c040e302bfa37b2239dddc1b@54.209.172.1:26656,de33dfeeebe49930f51a09e6e9994e1288c6bb69@18.222.23.49:26656,0d38bda3729bbd4a30ed8d602d569548f60824e9@3.147.56.107:26656" echo "Change denom to loya in config files..." sed -i 's/([0-9]+)stake/1loya/g' ~/.layer/config/app.toml From 94cae6490383cef20234acab21ecd6bd8f134c31 Mon Sep 17 00:00:00 2001 From: spuddy <72078372+0xSpuddy@users.noreply.github.com> Date: Mon, 25 Nov 2024 12:28:37 -0500 Subject: [PATCH 49/52] Update configure_layer_mac.sh update peers --- public-testnet/configure_layer_mac.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public-testnet/configure_layer_mac.sh b/public-testnet/configure_layer_mac.sh index ff38c98..4d42815 100755 --- a/public-testnet/configure_layer_mac.sh +++ b/public-testnet/configure_layer_mac.sh @@ -10,9 +10,9 @@ set -e source ~/.zshrc export LAYER_NODE_URL=tellorlayer.com -export TELLORNODE_ID=b0dff39942b90880c040e302bfa37b2239dddc1b +export TELLORNODE_ID=5ca2c0eccb54e907ba474ce3b6827077ae40ba53 export KEYRING_BACKEND="test" -export PEERS="6a5ab45eea6ebd53eea5da79293c53d3ba9244d0@54.183.89.163:26656,b0dff39942b90880c040e302bfa37b2239dddc1b@54.209.172.1:26656,de33dfeeebe49930f51a09e6e9994e1288c6bb69@18.222.23.49:26656,0d38bda3729bbd4a30ed8d602d569548f60824e9@3.147.56.107:26656" +export PEERS="6a5ab45eea6ebd53eea5da79293c53d3ba9244d0@54.183.89.163:26656,c3223c066d7e97904192a1cdb99e7676ad03d581@3.147.56.107:26656,06067c9ce50f07f4fdd3dba4a7730c62b6225080@18.222.23.49:26656" echo "Change denom to loya in config files..." sed -i '' 's/([0-9]+)stake/1loya/g' ~/.layer/config/app.toml From 31f5639bfa29766f6ed30a8e4b9ce434ec0b7fef Mon Sep 17 00:00:00 2001 From: spuddy <72078372+0xSpuddy@users.noreply.github.com> Date: Mon, 25 Nov 2024 12:29:24 -0500 Subject: [PATCH 50/52] Update configure_layer_nix.sh update peers for layertest-2 --- public-testnet/configure_layer_nix.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public-testnet/configure_layer_nix.sh b/public-testnet/configure_layer_nix.sh index 2808d80..059ca8a 100644 --- a/public-testnet/configure_layer_nix.sh +++ b/public-testnet/configure_layer_nix.sh @@ -10,9 +10,9 @@ set -e source ~/.bashrc export LAYER_NODE_URL=tellorlayer.com -export TELLORNODE_ID=b0dff39942b90880c040e302bfa37b2239dddc1b +export TELLORNODE_ID=5ca2c0eccb54e907ba474ce3b6827077ae40ba53 export KEYRING_BACKEND="test" -export PEERS="6a5ab45eea6ebd53eea5da79293c53d3ba9244d0@54.183.89.163:26656,b0dff39942b90880c040e302bfa37b2239dddc1b@54.209.172.1:26656,de33dfeeebe49930f51a09e6e9994e1288c6bb69@18.222.23.49:26656,0d38bda3729bbd4a30ed8d602d569548f60824e9@3.147.56.107:26656" +export PEERS="6a5ab45eea6ebd53eea5da79293c53d3ba9244d0@54.183.89.163:26656,c3223c066d7e97904192a1cdb99e7676ad03d581@3.147.56.107:26656,06067c9ce50f07f4fdd3dba4a7730c62b6225080@18.222.23.49:26656" echo "Change denom to loya in config files..." sed -i 's/([0-9]+)stake/1loya/g' ~/.layer/config/app.toml From b80416e57188ef82afa8a2be82632bfcfff81b81 Mon Sep 17 00:00:00 2001 From: spuddy <72078372+0xSpuddy@users.noreply.github.com> Date: Mon, 9 Dec 2024 12:10:55 -0500 Subject: [PATCH 51/52] Update configure_layer_nix.sh fixed broken peer --- public-testnet/configure_layer_nix.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public-testnet/configure_layer_nix.sh b/public-testnet/configure_layer_nix.sh index 059ca8a..55a7996 100644 --- a/public-testnet/configure_layer_nix.sh +++ b/public-testnet/configure_layer_nix.sh @@ -12,7 +12,7 @@ source ~/.bashrc export LAYER_NODE_URL=tellorlayer.com export TELLORNODE_ID=5ca2c0eccb54e907ba474ce3b6827077ae40ba53 export KEYRING_BACKEND="test" -export PEERS="6a5ab45eea6ebd53eea5da79293c53d3ba9244d0@54.183.89.163:26656,c3223c066d7e97904192a1cdb99e7676ad03d581@3.147.56.107:26656,06067c9ce50f07f4fdd3dba4a7730c62b6225080@18.222.23.49:26656" +export PEERS="5ca2c0eccb54e907ba474ce3b6827077ae40ba53@54.234.103.186:26656,c3223c066d7e97904192a1cdb99e7676ad03d581@3.147.56.107:26656,06067c9ce50f07f4fdd3dba4a7730c62b6225080@18.222.23.49:26656" echo "Change denom to loya in config files..." sed -i 's/([0-9]+)stake/1loya/g' ~/.layer/config/app.toml From 8eef8abba8de83e0b0df3533b59ca9270d6e5709 Mon Sep 17 00:00:00 2001 From: spuddy <72078372+0xSpuddy@users.noreply.github.com> Date: Mon, 9 Dec 2024 12:11:15 -0500 Subject: [PATCH 52/52] Update configure_layer_mac.sh fix broken peer --- public-testnet/configure_layer_mac.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public-testnet/configure_layer_mac.sh b/public-testnet/configure_layer_mac.sh index 4d42815..cb97cab 100755 --- a/public-testnet/configure_layer_mac.sh +++ b/public-testnet/configure_layer_mac.sh @@ -12,7 +12,7 @@ source ~/.zshrc export LAYER_NODE_URL=tellorlayer.com export TELLORNODE_ID=5ca2c0eccb54e907ba474ce3b6827077ae40ba53 export KEYRING_BACKEND="test" -export PEERS="6a5ab45eea6ebd53eea5da79293c53d3ba9244d0@54.183.89.163:26656,c3223c066d7e97904192a1cdb99e7676ad03d581@3.147.56.107:26656,06067c9ce50f07f4fdd3dba4a7730c62b6225080@18.222.23.49:26656" +export PEERS="5ca2c0eccb54e907ba474ce3b6827077ae40ba53@54.234.103.186:26656,c3223c066d7e97904192a1cdb99e7676ad03d581@3.147.56.107:26656,06067c9ce50f07f4fdd3dba4a7730c62b6225080@18.222.23.49:26656" echo "Change denom to loya in config files..." sed -i '' 's/([0-9]+)stake/1loya/g' ~/.layer/config/app.toml