Skip to content

Commit

Permalink
change dir '.gaiad' to '.gaia' (#690)
Browse files Browse the repository at this point in the history
  • Loading branch information
kimurayu45z authored and shahankhatch committed Mar 9, 2021
1 parent be989fa commit db44d99
Show file tree
Hide file tree
Showing 30 changed files with 116 additions and 119 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Simple usage with a mounted data directory:
# > docker build -t gaia .
# > docker run -it -p 46657:46657 -p 46656:46656 -v ~/.gaiad:/gaia/.gaiad -v ~/.gaiacli:/gaia/.gaiacli gaia gaiad init
# > docker run -it -p 46657:46657 -p 46656:46656 -v ~/.gaiad:/gaia/.gaiad -v ~/.gaiacli:/gaia/.gaiacli gaia gaiad start
# > docker run -it -p 46657:46657 -p 46656:46656 -v ~/.gaia:/gaia/.gaia gaia gaiad init
# > docker run -it -p 46657:46657 -p 46656:46656 -v ~/.gaia:/gaia/.gaia gaia gaiad start
FROM golang:1.15-alpine AS build-env

# Set up dependencies
Expand Down
4 changes: 2 additions & 2 deletions contrib/Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Simple usage with a mounted data directory:
# > docker build -t gaia .
# > docker run -it -p 46657:46657 -p 46656:46656 -v ~/.gaiad:/root/.gaiad -v ~/.gaiacli:/root/.gaiacli gaia gaiad init
# > docker run -it -p 46657:46657 -p 46656:46656 -v ~/.gaiad:/root/.gaiad -v ~/.gaiacli:/root/.gaiacli gaia gaiad start
# > docker run -it -p 46657:46657 -p 46656:46656 -v ~/.gaia:/root/.gaia gaia gaiad init
# > docker run -it -p 46657:46657 -p 46656:46656 -v ~/.gaia:/root/.gaia gaia gaiad start
FROM golang:1.15-alpine AS build-env

# Set up dependencies
Expand Down
8 changes: 4 additions & 4 deletions docs/gaia-tutorials/deploy-testnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ Supporting code can be found in the [networks directory](https://github.com/cosm

In case you need to use or deploy gaia as a container you could skip the `build` steps and use the official images, \$TAG stands for the version you are interested in:

- `docker run -it -v ~/.gaiad:/root/.gaiad tendermint:$TAG gaiad init`
- `docker run -it -p 26657:26657 -p 26656:26656 -v ~/.gaiad:/root/.gaiad tendermint:$TAG gaiad start`
- `docker run -it -v ~/.gaia:/root/.gaia tendermint:$TAG gaiad init`
- `docker run -it -p 26657:26657 -p 26656:26656 -v ~/.gaia:/root/.gaia tendermint:$TAG gaiad start`
- ...
- `docker run -it -v ~/.gaiad:/root/.gaiad tendermint:$TAG gaiad version`
- `docker run -it -v ~/.gaia:/root/.gaia tendermint:$TAG gaiad version`

The same images can be used to build your own docker-compose stack.

Expand Down Expand Up @@ -61,7 +61,7 @@ gaiad collect-gentxs
gaiad start
```

This setup puts all the data for `gaiad` in `~/.gaiad`. You can examine the genesis file you created at `~/.gaiad/config/genesis.json`. With this configuration `gaiad` is also ready to use and has an account with tokens (both staking and custom).
This setup puts all the data for `gaiad` in `~/.gaia`. You can examine the genesis file you created at `~/.gaia/config/genesis.json`. With this configuration `gaiad` is also ready to use and has an account with tokens (both staking and custom).

## Multi-node, Local, Automated Testnet

Expand Down
12 changes: 6 additions & 6 deletions docs/gaia-tutorials/join-mainnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ gaiad init <your_custom_moniker>
**Note**
Monikers can contain only ASCII characters. Using Unicode characters will render your node unreachable.

You can edit this `moniker` later, in the `~/.gaiad/config/config.toml` file:
You can edit this `moniker` later, in the `~/.gaia/config/config.toml` file:

```toml
# A custom human readable name for this node
moniker = "<your_custom_moniker>"
```

You can edit the `~/.gaiad/config/app.toml` file in order to enable the anti spam mechanism and reject incoming transactions with less than the minimum gas prices:
You can edit the `~/.gaia/config/app.toml` file in order to enable the anti spam mechanism and reject incoming transactions with less than the minimum gas prices:

```
# This is a TOML config file.
Expand All @@ -72,10 +72,10 @@ Your full node has been initialized!
Fetch the mainnet's `genesis.json` file into `gaiad`'s config directory.

```bash
mkdir -p $HOME/.gaiad/config
mkdir -p $HOME/.gaia/config
wget https://github.com/cosmos/mainnet/raw/master/genesis.cosmoshub-4.json.gz
gzip -d genesis.cosmoshub-4.json.gz
mv genesis.cosmoshub-4.json $HOME/.gaiad/config
mv genesis.cosmoshub-4.json $HOME/.gaia/config
```

If you want to connect to the public testnet instead, click [here](./join-testnet.md)
Expand All @@ -88,7 +88,7 @@ gaiad start

### Add Seed Nodes

Your node needs to know how to find peers. You'll need to add healthy seed nodes to `$HOME/.gaiad/config/config.toml`. The [`launch`](https://github.com/cosmos/launch) repo contains links to some seed nodes.
Your node needs to know how to find peers. You'll need to add healthy seed nodes to `$HOME/.gaia/config/config.toml`. The [`launch`](https://github.com/cosmos/launch) repo contains links to some seed nodes.

If those seeds aren't working, you can find more seeds and persistent peers on a Cosmos Hub explorer (a list can be found on the [launch page](https://cosmos.network/launch)).

Expand All @@ -114,7 +114,7 @@ For mainnet, the recommended `gas-prices` is `0.025uatom`.

## Set `minimum-gas-prices`

Your full-node keeps unconfirmed transactions in its mempool. In order to protect it from spam, it is better to set a `minimum-gas-prices` that the transaction must meet in order to be accepted in your node's mempool. This parameter can be set in the following file `~/.gaiad/config/app.toml`.
Your full-node keeps unconfirmed transactions in its mempool. In order to protect it from spam, it is better to set a `minimum-gas-prices` that the transaction must meet in order to be accepted in your node's mempool. This parameter can be set in the following file `~/.gaia/config/app.toml`.

The initial recommended `min-gas-prices` is `0.025uatom`, but you might want to change it later.

Expand Down
2 changes: 1 addition & 1 deletion docs/gaia-tutorials/join-testnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ These instructions are for full nodes that have ran on previous versions of and
First, remove the outdated files and reset the data.

```bash
rm $HOME/.gaiad/config/addrbook.json $HOME/.gaiad/config/genesis.json
rm $HOME/.gaia/config/addrbook.json $HOME/.gaia/config/genesis.json
gaiad unsafe-reset-all
```

Expand Down
4 changes: 2 additions & 2 deletions docs/gaia-tutorials/upgrade-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ If you are joining the mainnet, fetch the genesis from the [mainnet repo](https:
Save the new genesis as `new_genesis.json`. Then replace the old `genesis.json` with `new_genesis.json`

```bash
cd $HOME/.gaiad/config
cd $HOME/.gaia/config
cp -f genesis.json new_genesis.json
mv new_genesis.json genesis.json
```
Expand All @@ -51,7 +51,7 @@ Then, go to the [reset data](#reset-data) section.
If you were running a node in the previous version of the network and want to build your new genesis locally from a state of this previous network, use the following command:

```bash
cd $HOME/.gaiad/config
cd $HOME/.gaia/config
gaiad export --for-zero-height --height=<export-height> > new_genesis.json
```

Expand Down
10 changes: 5 additions & 5 deletions docs/migration/cosmoshub-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ before resetting your validator.

Prior to exporting `cosmoshub-2` state, validators are encouraged to take a full data snapshot at the
export height before proceeding. Snapshotting depends heavily on infrastructure, but generally this
can be done by backing up the `.gaiacli` and `.gaiad` directories.
can be done by backing up the `.gaia` directories.

It is critically important to back-up the `.gaiad/data/priv_validator_state.json` file after stopping your gaiad process. This file is updated every block as your validator participates in a consensus rounds. It is a critical file needed to prevent double-signing, in case the upgrade fails and the previous chain needs to be restarted.
It is critically important to back-up the `.gaia/data/priv_validator_state.json` file after stopping your gaiad process. This file is updated every block as your validator participates in a consensus rounds. It is a critical file needed to prevent double-signing, in case the upgrade fails and the previous chain needs to be restarted.

In the event that the upgrade does not succeed, validators and operators must downgrade back to
v0.34.6+ of the _Cosmos SDK_ and restore to their latest snapshot before restarting their nodes.
Expand Down Expand Up @@ -187,8 +187,8 @@ single parameter, `max_validators`, that we're upgrading based on [proposal 10](
$ gaiad unsafe-reset-all
```

10. Move the new `genesis.json` to your `.gaiad/config/` directory
11. Replace the `db_backend` on `.gaiad/config/config.toml` to:
10. Move the new `genesis.json` to your `.gaia/config/` directory
11. Replace the `db_backend` on `.gaia/config/config.toml` to:

```toml
db_backend = "goleveldb"
Expand All @@ -197,7 +197,7 @@ single parameter, `max_validators`, that we're upgrading based on [proposal 10](
12. Note, if you have any application configuration in `gaiad.toml`, that file has now been renamed to `app.toml`:

```bash
$ mv .gaiad/config/gaiad.toml .gaiad/config/app.toml
$ mv .gaia/config/gaiad.toml .gaia/config/app.toml
```

## Notes for Service Providers
Expand Down
22 changes: 11 additions & 11 deletions docs/migration/cosmoshub-3.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ applications gain in speed, readability, convinience and interoperability with m
led to a `gaiad` and `gaiacli` binary which were seperated and could be used for different interactions with the
blockchain. Both of these have been merged into one `gaiad` which now supports the commands the `gaiacli` previously
supported.
- **Node Configuration**: Previously blockchain data and node configuration was stored in `~/.gaiad/`, these will
- **Node Configuration**: Previously blockchain data and node configuration was stored in `~/.gaia/`, these will
now reside in `~/.gaia/`, if you use scripts that make use of the configuration or blockchain data, make sure to update the path.

## Risks
Expand All @@ -116,9 +116,9 @@ before resetting your validator.

Prior to exporting `cosmoshub-3` state, validators are encouraged to take a full data snapshot at the
export height before proceeding. Snapshotting depends heavily on infrastructure, but generally this
can be done by backing up the `.gaiad` directory.
can be done by backing up the `.gaia` directory.

It is critically important to back-up the `.gaiad/data/priv_validator_state.json` file after stopping your gaiad process. This file is updated every block as your validator participates in a consensus rounds. It is a critical file needed to prevent double-signing, in case the upgrade fails and the previous chain needs to be restarted.
It is critically important to back-up the `.gaia/data/priv_validator_state.json` file after stopping your gaiad process. This file is updated every block as your validator participates in a consensus rounds. It is a critical file needed to prevent double-signing, in case the upgrade fails and the previous chain needs to be restarted.

In the event that the upgrade does not succeed, validators and operators must downgrade back to
gaia v2.0.15 with v0.37.15 of the _Cosmos SDK_ and restore to their latest snapshot before restarting their nodes.
Expand Down Expand Up @@ -146,13 +146,13 @@ The version/commit hash of Gaia v2.0.15: `89cf7e6fc166eaabf47ad2755c443d455feda0
February 18, 2021 at 06:00 UTC is in UNIX seconds: `1613628000`

```bash
perl -i -pe 's/^halt-time =.*/halt-time = 1613628000/' ~/.gaiad/config/app.toml
perl -i -pe 's/^halt-time =.*/halt-time = 1613628000/' ~/.gaia/config/app.toml
```

1. After the chain has halted, make a backup of your `.gaiad` directory
1. After the chain has halted, make a backup of your `.gaia` directory

```bash
mv ~/.gaiad ./gaiad_backup
mv ~/.gaia ./gaiad_backup
```

**NOTE**: It is recommended for validators and operators to take a full data snapshot at the export
Expand All @@ -164,11 +164,11 @@ The version/commit hash of Gaia v2.0.15: `89cf7e6fc166eaabf47ad2755c443d455feda0

Before exporting state via the following command, the `gaiad` binary must be stopped!
As a validator, you can see the last block height created in the
`~/.gaiad/data/priv_validator_state.json` - or now residing in `gaiad_backup` when you made
`~/.gaia/data/priv_validator_state.json` - or now residing in `gaiad_backup` when you made
a backup as in the last step - and obtain it with

```bash
cat ~/.gaiad/data/priv_validator_state.json | jq '.height'
cat ~/.gaia/data/priv_validator_state.json | jq '.height'
```

```bash
Expand Down Expand Up @@ -270,15 +270,15 @@ Cross check your genesis hash with other peers (other validators) in the chat ro

1. Stop your Gaia v2.0.15 instance.

1. After the chain has halted, make a backup of your `.gaiad` directory
1. After the chain has halted, make a backup of your `.gaia` directory

```bash
mv ~/.gaiad ./gaiad_backup
mv ~/.gaia ./gaiad_backup
```

**NOTE**: It is recommended for validators and operators to take a full data snapshot at the export
height before proceeding in case the upgrade does not go as planned or if not enough voting power
comes online in a sufficient and agreed upon amount of time. That means the backup of `.gaiad` should
comes online in a sufficient and agreed upon amount of time. That means the backup of `.gaia` should
only take place once the chain has halted at UNIX time `1613628000`.
In such a case, the chain will fallback
to continue operating `cosmoshub-3`. See [Recovery](#recovery) for details on how to proceed.
Expand Down
16 changes: 8 additions & 8 deletions docs/migration/cosmoshub-3[ES_es].md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Algunos de los principales cambios que hay que tener en cuenta a la hora de actu

- **Protocol Buffers**: Inicialmente el SDK de Cosmos utilizaba _codecs_ de Amino para casi toda la codificación y decodificación. En esta versión se ha integrado una importante actualización de los Protocol Buffers. Se espera que con los Protocol Buffers las aplicaciones ganen en velocidad, legibilidad, conveniencia e interoperabilidad con muchos lenguajes de programación. Para más información consulta [aquí](https://github.com/cosmos/cosmos-sdk/blob/master/docs/migrations/app_and_modules.md#protocol-buffers).
- **CLI**: El CLI y el commando de full node para la cadena de bloques estaban separados en las versiones anteriores del SDK de Cosmos. Esto dio lugar a dos binarios, `gaiad` y `gaiacli`, que estaban separados y podían utilizarse para diferentes interacciones con la cadena de bloques. Ambos se han fusionado en un solo comando `gaiad` que ahora soporta los comandos que antes soportaba el `gaiacli`.
- **Configuración del nodo**: Anteriormente los datos de la cadena de bloques y la configuración de los nodos se almacenaban en `~/.gaiad/`, ahora residirán en `~/.gaia/`, si utilizas scripts que hacen uso de la configuración o de los datos de la cadena de bloques, asegúrate de actualizar la ruta.
- **Configuración del nodo**: Anteriormente los datos de la cadena de bloques y la configuración de los nodos se almacenaban en `~/.gaia/`, ahora residirán en `~/.gaia/`, si utilizas scripts que hacen uso de la configuración o de los datos de la cadena de bloques, asegúrate de actualizar la ruta.

## Riesgos

Expand All @@ -56,9 +56,9 @@ Lo más arriesgado que puede hacer un validador es descubrir que ha cometido un

## Recuperación

Antes de exportar el estado de `cosmoshub-3`, se recomienda a los validadores que tomen una instantánea completa de los datos a la altura de la exportación antes de proceder. La toma de snapshots depende en gran medida de la infraestructura, pero en general se puede hacer una copia de seguridad del directorio `.gaiad`.
Antes de exportar el estado de `cosmoshub-3`, se recomienda a los validadores que tomen una instantánea completa de los datos a la altura de la exportación antes de proceder. La toma de snapshots depende en gran medida de la infraestructura, pero en general se puede hacer una copia de seguridad del directorio `.gaia`.

Es muy importante hacer una copia de seguridad del archivo `.gaiad/data/priv_validator_state.json` después de detener el proceso de gaiad. Este archivo se actualiza en cada bloque cuando tu validador participa en las rondas de consenso. Es un archivo crítico necesario para evitar la doble firma, en caso de que la actualización falle y sea necesario reiniciar la cadena anterior.
Es muy importante hacer una copia de seguridad del archivo `.gaia/data/priv_validator_state.json` después de detener el proceso de gaiad. Este archivo se actualiza en cada bloque cuando tu validador participa en las rondas de consenso. Es un archivo crítico necesario para evitar la doble firma, en caso de que la actualización falle y sea necesario reiniciar la cadena anterior.

En el caso de que la actualización no tenga éxito, los validadores y operadores deben volver a actualizar a
gaia v2.0.15 con v0.37.15 del _Cosmos SDK_ y restaurar a su último snapshot antes de reiniciar sus nodos.
Expand Down Expand Up @@ -86,21 +86,21 @@ El hash de la versión/commit de Gaia v2.0.15: `89cf7e6fc166eaabf47ad2755c443d45
18 de febrero de 2021 a las 06:00 UTC es en segundos UNIX: `1613628000`

```bash
perl -i -pe 's/^halt-time =.*/halt-time = 1613628000/' ~/.gaiad/config/app.toml
perl -i -pe 's/^halt-time =.*/halt-time = 1613628000/' ~/.gaia/config/app.toml
```
1. Después de que la cadena se haya detenido, haz una copia de seguridad de tu directorio `.gaiad`.
1. Después de que la cadena se haya detenido, haz una copia de seguridad de tu directorio `.gaia`.

```bash
mv ~/.gaiad ./gaiad_backup
mv ~/.gaia ./gaiad_backup
```
**NOTA**: Se recomienda a los validadores y operadores que tomen una instantánea completa de los datos a la altura de la exportación antes de proceder en caso de que la actualización no vaya según lo previsto o si no se pone en línea suficiente poder de voto en un tiempo determinado y acordado. En tal caso, la cadena volverá a funcionar con `cosmoshub-3`. Consulte [Recuperación](#recuperación) para saber cómo proceder.

1. Exportar el estado existente de `cosmoshub-3`:

Antes de exportar el estado a través del siguiente comando, el binario `gaiad` debe estar detenido. Como validador, puedes ver la última altura del bloque creado en el `~/.gaiad/config/data/priv_validator_state.json` -o que ahora reside en `gaiad_backup` cuando hiciste una copia de seguridad como en el último paso- y obtenerla con
Antes de exportar el estado a través del siguiente comando, el binario `gaiad` debe estar detenido. Como validador, puedes ver la última altura del bloque creado en el `~/.gaia/config/data/priv_validator_state.json` -o que ahora reside en `gaiad_backup` cuando hiciste una copia de seguridad como en el último paso- y obtenerla con

```bash
cat ~/.gaiad/config/data/priv_validator_state.json | jq '.height'
cat ~/.gaia/config/data/priv_validator_state.json | jq '.height'
```

```bash
Expand Down
Loading

0 comments on commit db44d99

Please sign in to comment.