diff --git a/.github/workflows/build-and-test-bridge.yml b/.github/workflows/build-and-test-bridge.yml index cee43b941b1..1753003e12b 100644 --- a/.github/workflows/build-and-test-bridge.yml +++ b/.github/workflows/build-and-test-bridge.yml @@ -239,7 +239,7 @@ jobs: name: logs-e2e${{ matrix.make.suffix }}-${{ github.sha }} path: | /tmp/.*/logs/ - /tmp/.*/e2e-test.*/setup/validator-*/.anoma/logs/*.log + /tmp/.*/e2e-test.*/setup/validator-*/.namada/logs/*.log retention-days: 5 - name: Print sccache stats if: always() diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 0d0112924e7..792d2ac7756 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -241,7 +241,7 @@ jobs: name: logs-e2e${{ matrix.make.suffix }}-${{ github.sha }} path: | /tmp/.*/logs/ - /tmp/.*/e2e-test.*/setup/validator-*/.anoma/logs/*.log + /tmp/.*/e2e-test.*/setup/validator-*/.namada/logs/*.log retention-days: 5 - name: Print sccache stats if: always() diff --git a/.gitignore b/.gitignore index 4718c258b2d..7143dc9446c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -# Anoma default home dir -/.anoma +# Namada default home dir +/.namada # Generated by Cargo # will have compiled files and executables diff --git a/apps/src/lib/cli.rs b/apps/src/lib/cli.rs index 4534d5bc0db..108a709cf08 100644 --- a/apps/src/lib/cli.rs +++ b/apps/src/lib/cli.rs @@ -1389,7 +1389,7 @@ pub mod args { configuration and state is stored. This value can also \ be set via `ANOMA_BASE_DIR` environment variable, but \ the argument takes precedence, if specified. Defaults to \ - `.anoma`.", + `.namada`.", )) .arg(WASM_DIR.def().about( "Directory with built WASM validity predicates, \ diff --git a/apps/src/lib/client/utils.rs b/apps/src/lib/client/utils.rs index 8ebe2f73aae..2c20cca27db 100644 --- a/apps/src/lib/client/utils.rs +++ b/apps/src/lib/client/utils.rs @@ -154,6 +154,15 @@ pub async fn join_network( } else { (PathBuf::from_str(".").unwrap(), false) }; + + // For compatibility for releases created with ".anoma" base-dir + let old_base_dir = unpack_dir.join(".anoma"); + if old_base_dir.exists() { + fs::rename(&old_base_dir, unpack_dir.join(config::DEFAULT_BASE_DIR)) + .await + .unwrap(); + } + archive.unpack(&unpack_dir).unwrap(); // Rename the base-dir from the default and rename wasm-dir, if non-default. diff --git a/apps/src/lib/config/mod.rs b/apps/src/lib/config/mod.rs index 09b5e0e7bdc..503d4cf2c43 100644 --- a/apps/src/lib/config/mod.rs +++ b/apps/src/lib/config/mod.rs @@ -20,7 +20,7 @@ use thiserror::Error; use crate::cli; /// Base directory contains global config and chain directories. -pub const DEFAULT_BASE_DIR: &str = ".anoma"; +pub const DEFAULT_BASE_DIR: &str = ".namada"; /// Default WASM dir. pub const DEFAULT_WASM_DIR: &str = "wasm"; /// The WASM checksums file contains the hashes of built WASMs. It is inside the diff --git a/docker/namada/Dockerfile b/docker/namada/Dockerfile index 2335ea9f464..0a37c9ba552 100644 --- a/docker/namada/Dockerfile +++ b/docker/namada/Dockerfile @@ -28,7 +28,7 @@ WORKDIR /app RUN git clone -b v0.1.1-abcipp --single-branch https://github.com/heliaxdev/tendermint.git && cd tendermint && make build FROM debian:bullseye-slim AS runtime -ENV ANOMA_BASE_DIR=/.anoma +ENV ANOMA_BASE_NADIR=/.namada ENV ANOMA_LOG_COLOR=false RUN apt-get update && apt-get install libcurl4-openssl-dev -y && apt-get clean diff --git a/documentation/docs/src/user-guide/ledger.md b/documentation/docs/src/user-guide/ledger.md index e51da998aa9..628365fd10b 100644 --- a/documentation/docs/src/user-guide/ledger.md +++ b/documentation/docs/src/user-guide/ledger.md @@ -10,7 +10,7 @@ Note that you need to have [joined a network](./getting-started.md) before you s 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 the `.anoma` directory relative to the current working directory. You can use the `--base-dir` CLI global argument or `ANOMA_BASE_DIR` environment variable to change it. +By default, the ledger will store its configuration and state in the `.namada` directory relative to the current working directory. You can use the `--base-dir` CLI global argument or `ANOMA_BASE_DIR` environment variable to change it. 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, relative to the current working directory. This can also be set with the `--wasm-dir` CLI global argument, `ANOMA_WASM_DIR` environment variable or the configuration file.