From fa90fb20f21b568472e7a2362aa43bb8e788048e Mon Sep 17 00:00:00 2001 From: bengtlofgren Date: Wed, 21 Jun 2023 21:05:30 +0200 Subject: [PATCH] newer, better, local network script --- .../docs/pages/experimental/local-network.mdx | 34 ++++++++----------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/packages/docs/pages/experimental/local-network.mdx b/packages/docs/pages/experimental/local-network.mdx index 61ccc705..2f6a2533 100644 --- a/packages/docs/pages/experimental/local-network.mdx +++ b/packages/docs/pages/experimental/local-network.mdx @@ -10,21 +10,8 @@ There is a script that has been written specifically for this purpose, which can The script has some dependencies that must be installed in order to run it successfully: -1. `trash` must be installed. -2. python3 must be installed. -3. toml Python pip library https://pypi.org/project/toml/ must be installed. - -`trash` can be installed via: - -```shell copy -# Linux -sudo apt install trash-cli -``` - -```shell copy -# MacOS -brew install trash -``` +1. python3 must be installed. +2. toml Python pip library https://pypi.org/project/toml/ must be installed. The script will require a genesis configuration file, which is a TOML file that specifies the parameters of the network. Examples of such files can be found in the [anoma-network-config repo](https://github.com/heliaxdev/anoma-network-config) in the `templates` directory. @@ -49,19 +36,26 @@ make build-wasm-scripts The script is called `build_network.sh` and can be run with the following command: ```shell copy -./scripts/build_network.sh +# Ensure you are in the root of the namada repository directory +./scripts/build_network.sh ``` More specifically, the script takes three arguments: 1. `config_toml`: the path to the (validator-free) genesis configuration file. -2. `base_dir`: the path to the BASE_DIR directory, where all chain-data is stored. For linux, this is usually `$HOME/.local/share/namada`, and for MacOS, this is usually `"$HOME/Library/Application Support/Namada"`. -3. `namada_dir`: the path to the namada BINARIES directory. If the binaries were build using `make build-release` this would imply the `namada/target/release` directory. +2. `namada_dir`: the path to the namada BINARIES directory. +If the binaries were build using `make build-release` this would imply the `namada/target/release` directory. +Otherwise, if they were built using `make build` it would be the `namada/target/debug` directory. +3. `base_dir`: OPTIONAL ARGUMENT. +You can specify the path to the BASE_DIR directory, where all chain-data is stored. +This is only necessary if the BASE_DIR is not the default given by `namadac utils default-base-dir` command. For example, a MacOS user would run something along the lines of: ```shell copy -./scripts/build_network.sh ~/anoma-network-config/templates/edited_genesis_config.toml "$HOME/Library/Application Support/Namada" ./target/release +./scripts/build_network.sh \ +~/anoma-network-config/templates/edited_genesis_config.toml \ +./target/release # Assuming the binaries were built using `make build-release` ``` ## Running the ledger @@ -70,7 +64,7 @@ After the script has been run, a python process will have started in the backgro The ledger can be run through the familiar command: ```shell copy -target/release/namada ledger +target/release/namada ledger #Assuming the binaries were built using `make build-release` ``` ## Cleaning up