diff --git a/documentation/docs/src/testnets/pre-genesis-validator.md b/documentation/docs/src/testnets/pre-genesis-validator.md index 9d12d718d8..69407cd6e6 100644 --- a/documentation/docs/src/testnets/pre-genesis-validator.md +++ b/documentation/docs/src/testnets/pre-genesis-validator.md @@ -9,13 +9,17 @@ namada client utils init-genesis-validator --alias $ALIAS \ --max-commission-rate-change 0.01 --commission-rate 0.05 \ --net-address $PUBLIC_IP:26656 ``` -2. Expect the message `Pre-genesis TOML written to .namada/pre-genesis/[your-alias]/validator.toml` +2. Expect the message: +- Linux: `Pre-genesis TOML written to /home/[your-username]/.config/namada/pre-genesis/[your-alias]/validator.toml` +- MacOS: `Pre-genesis TOML written to /Users/[your-username]/Library/Application Support/com.heliax.namada/pre-genesis/[your-alias]/validator.toml` -This will generate a folder inside `namada/.namada`. +This will generate a folder inside `$HOME/.config/namada` or `$HOME/Library/Application\ Support/com.heliax.namada` depending on the operating system (OS). The former is based on a linux OS and the latter is based on a MacOS. 3. You can print the validator.toml by running: -`cat namada/.namada/pre-genesis/$ALIAS/validator.toml` +- Linux `cat $HOME/.config/namada/pre-genesis/$ALIAS/validator.toml` +- MacOS `cat $HOME/Library/Application\ Support/com.heliax.namada/pre-genesis/$ALIAS/validator.toml` + ## 2.1) Submitting the config If you want to be a genesis validator for the testnet, please make a pull request to https://github.com/anoma/namada-testnets adding your validator.toml file to the relevant directory (e.g. `namada-public-testnet-2` for the second public testnet), renaming it to `$alias.toml`. diff --git a/documentation/docs/src/testnets/run-your-genesis-validator.md b/documentation/docs/src/testnets/run-your-genesis-validator.md index 197365fa6f..59e5219bfe 100644 --- a/documentation/docs/src/testnets/run-your-genesis-validator.md +++ b/documentation/docs/src/testnets/run-your-genesis-validator.md @@ -20,18 +20,31 @@ mkdir backup-pregenesis && cp -r .namada/pre-genesis backup-pregenesis/ *(WARNING: THIS WILL ALSO DELETE YOUR VALIDATOR KEYS, DO NOT RUN UNLESS YOU'VE BACKED IT UP)* 3. Delete ledger base directory + +- Linux: `rm -rf $HOME/.config/namada` +- MacOS: `rm -rf $HOME/Library/Application\ Support/com.heliax.namada` + +4. Check that namada and tendermint binaries are correct (see step 1) +5. Create a base directory for the ledger +- Linux: `mkdir $HOME/.config/namada` +- MacOS: `mkdir $HOME/Library/Application\ Support/com.heliax.namada` + +Save the base directory path to a variable +- Linux: ```bash -rm -rf .namada +export BASE_DIR=$HOME/.config/namada ``` -4. Check that namada and tendermint binaries are correct (see step 1) -5. Create a `.namada` folder +- MacOS: ```bash -mkdir .namada -mkdir .namada/pre-genesis +export BASE_DIR=$HOME/Library/Application\ Support/com.heliax.namada ``` -6. Copy the backuped file back to `.namada/pre-genesis` folder +6. Create a pre-genesis directory +- Linux: `mkdir $HOME/.config/namada/pre-genesis` +- MacOS: `mkdir $HOME/Library/Application\ Support/com.heliax.namada/pre-genesis` + +7. Copy the backuped file back to `$BASE_DIR/pre-genesis` folder ```bash -cp -r backup-pregenesis/* .namada/pre-genesis/ +cp -r backup-pregenesis/* $BASE_DIR/pre-genesis/ ``` ## 3.1) Run your node as a genesis validator diff --git a/documentation/docs/src/user-guide/genesis-validator-setup.md b/documentation/docs/src/user-guide/genesis-validator-setup.md index b23ec0657a..18e293403e 100644 --- a/documentation/docs/src/user-guide/genesis-validator-setup.md +++ b/documentation/docs/src/user-guide/genesis-validator-setup.md @@ -22,8 +22,24 @@ namada client utils init-genesis-validator \ After generating your keys, the command will print something like this: +- Linux ```shell -Pre-genesis TOML written to .namada/pre-genesis/1337-validator/validator.toml +Pre-genesis TOML written to /home/$USER/.config/com.heliax.namada +``` +- MacOS +```shell +Pre-genesis TOML written to /Users/$USER/Library/Application\ Support/com.heliax.namada +``` + +Save this directory as an environment variable for later use: + +- Linux +```shell +export BASE_DIR="/home/$USER/.config/com.heliax.namada" +``` +- MacOS +```shell +export BASE_DIR="/Users/$USER/Library/Application\ Support/com.heliax.namada" ``` This file is the public configuration of your validator. You can safely share this file with the network's organizer, who is responsible for setting up and publishing the finalized genesis file and Namada configuration for the chain. @@ -48,7 +64,7 @@ If you run this command in the same directory that you ran `namada client utils ```shell namada client utils join-network \ --chain-id $CHAIN_ID \ - --pre-genesis-path workspace/.namada/pre-genesis/$ALIAS + --pre-genesis-path $BASE_DIR/pre-genesis/$ALIAS ``` Once setup, you can start the ledger as usual with e.g.: diff --git a/documentation/docs/src/user-guide/ledger.md b/documentation/docs/src/user-guide/ledger.md index f6fb9e012b..72d1c2bce6 100644 --- a/documentation/docs/src/user-guide/ledger.md +++ b/documentation/docs/src/user-guide/ledger.md @@ -10,11 +10,20 @@ namada ledger The node will attempt to connect to the persistent validator nodes and other peers in the network, and synchronize to the latest block. -By default, the ledger will store its configuration and state in either `$HOME/.config/namada` or `$HOME/Library/Application\ Support/com.heliax.namada`. You can use the `--base-dir` CLI global argument or `NAMADA_BASE_DIR` environment variable to change it. +By default, the ledger will store its configuration and state in either `$HOME/.config/namada` or `$HOME/Library/Application\ Support/com.heliax.namada`. You can use the `--base-dir` CLI global argument or `BASE_DIR` environment variable to change it. + +- Linux: +```bash +export BASE_DIR=$HOME/.config/namada +``` +- MacOS: +```bash +export BASE_DIR=$HOME/Library/Application\ Support/com.heliax.namada +``` The ledger also needs access to the built WASM files that are used in the genesis block. These files are included in release and shouldn't be modified, otherwise your node will fail with a consensus error on the genesis block. By default, these are expected to be in the `wasm` directory inside the chain directory that's in the base directory. This can also be set with the `--wasm-dir` CLI global argument, `NAMADA_WASM_DIR` environment variable or the configuration file. -The ledger configuration is stored in `.namada/{chain_id}/config.toml` (with +The ledger configuration is stored in `$BASE_DIR/{chain_id}/config.toml` (with default `--base-dir`). It is created when you join the network. You can modify that file to change the configuration of your node. All values can also be set via environment variables. Names of the recognized environment variables are