# Kava

## 1.Introducción

En esencia, poner en marcha un nodo de **Kava** (mainnet `kava_2222-10`) consiste en:

1. Preparar un servidor con los recursos y el software base.
2. Compilar e instalar **kava d** —o delegar la gestión de upgrades a Cosmovisor—.
3. Inicializar la configuración y cargar el *genesis*.
4. Sincronizar la cadena (snapshot o *state-sync*) para ahorrar tiempo.
5. Registrar tu wallet y, opcionalmente, convertir el nodo en validador mediante una transacción *on-chain*.

En los apartados siguientes repasamos cada paso con todo detalle.

## 2.Requisitos previos

<table data-header-hidden><thead><tr><th width="247" valign="top">Recurso</th><th valign="top">Requisito mínimo</th><th valign="top">Recomendación</th></tr></thead><tbody><tr><td valign="top"><strong>Recurso</strong></td><td valign="top"><strong>Requisito mínimo</strong></td><td valign="top"><strong>Recomendación</strong></td></tr><tr><td valign="top"><strong>Hardware</strong></td><td valign="top">CPU quad‑core, 64 GB RAM, 2 TB SSD NVMe</td><td valign="top">128 GB RAM para archival; 4 TB NVMe si planeas sin pruning (<a href="https://docs.kava.io/docs/nodes-and-validators/node-setup-guide/">docs.kava.io</a>)</td></tr><tr><td valign="top"><strong>Sistema operativo</strong></td><td valign="top">Ubuntu 20.04 LTS/22.04 LTS o Debian 12</td><td valign="top">Distro estable con kernel 5.x</td></tr><tr><td valign="top"><strong>Conectividad</strong></td><td valign="top">500 Mb simétricos sin límite de datos</td><td valign="top">1 Gb simétrico si tu ISP lo permite</td></tr><tr><td valign="top"><strong>Go</strong></td><td valign="top">go1.22.11 obligatorio para v29</td><td valign="top">Versión oficial para v0.26.x</td></tr><tr><td valign="top"><strong>Conocimientos</strong></td><td valign="top">Familiaridad básica con Linux y comandos CLI</td><td valign="top">No necesitas ser sysadmin veterano, pero sí moverte con la terminal</td></tr></tbody></table>

{% hint style="info" %}
Nota: ejecutaremos todo en **mainnet** (kava-1). Si prefieres practicar, clona la guía y sustituye la red por la testnet correspondiente.
{% endhint %}

### Dependencias base &#x20;

```
sudo apt update && sudo apt upgrade -y
sudo apt install build-essential curl git jq lz4 aria2 zstd -y
```

Go 1.22.11 (recomendado):<br>

```
sudo rm -rf /usr/local/go
wget https://golang.org/dl/go1.22.11.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.22.11.linux-amd64.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> ~/.profile
source ~/.profile
go version # go1.22.11
```

## 3.Instalar Kava (compilación manual)

```
git clone https://github.com/kava-labs/kava
cd kava
git checkout v0.28.0
make install # instala kava en $HOME/go/bin
kava version --long # confirma 0.28.0
```

## 4. Inicializar el nodo y cargar el *genesis*<br>

```
kava init NOMBRE_DEL_NODO --chain-id kava_2222-10
wget -O $HOME/.kava/config/genesis.json
https://kava-genesis-files.s3.us-east-1.amazonaws.com/kava_2222-10/genesis.json
```

## 5.Servicio systemd

Crea `/etc/systemd/system/kava.service`:

````
---

```ini
[Unit]
Description=Kava daemon (manual)
After=network-online.target

[Service]
User=%u
ExecStart=$HOME/go/bin/kava start --home $HOME/.kava
Restart=always
RestartSec=3
LimitNOFILE=infinity

[Install]
WantedBy=multi-user.target
````

## 6.Sincronizar la cadena

### 6.1 Snapshot (*QuickSync*)

```
URL=$(curl -s https://quicksync.io/kava |
grep -Eo 'https://[^"]+kava_2222-10[^"]+-minimal[^"]+.tar.lz4' | head -n1)
cd $HOME/.kava
wget -O- "$URL" | lz4 -dc | tar -xf -
```

El listado de snapshots muestra archivos actualizados cada pocas horas

### 6.2 State-sync (opcional, muy rápido)

```
cat > $HOME/state_sync_kava.sh <<'EOF'
SNAP_RPC="https://kava-rpc.polkachu.com:443"
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height)
BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000))
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
CONFIG=$HOME/.kava/config/config.toml
sed -i.bak -E "s|^(enable[[:space:]]=).|\1 true|;
s|^(rpc_servers[[:space:]]=).|\1 "$SNAP_RPC,$SNAP_RPC"|;
s|^(trust_height[[:space:]]=).|\1 $BLOCK_HEIGHT|;
s|^(trust_hash[[:space:]]=).|\1 "$TRUST_HASH"|" $CONFIG
EOF
bash $HOME/state_sync_kava.sh
kava tendermint unsafe-reset-all --home $HOME/.kava --keep-addr-book
sudo systemctl restart kava
```

Endpoint público  en Polkachu

## 7. Conexión inicial – Seeds y *Peers*

\
`~/.kava/config/config.toml`

`seeds = "b334e291ac361f9a1cf253d290047700b488b679@52.2.147.96:26656"`

`persistent_peers = "2a15d9c39eea97b4cf00480b45d4ea32a2e173d0@94.130.78.22:26656,5a933891627e8bde0c4bd0b43c9f99b706e520a2@141.95.99.214:11656,41d88639239c55fd37279d24df507238e1c417ea@85.237.192.104:26656"`

Tras editar, elimina `addrbook.json` y reinicia el servicio para poblar contactos frescos.\ <br>

### 8. Gestión de actualizaciones (manual)

Cuando salga un nuevo tag, compílalo y sustituye el binario:

```
sudo systemctl stop kava
cd $HOME/kava && git fetch && git checkout v0.29.0 && make install
kava version
sudo systemctl start kava
journalctl -u kava -f   # verifica que arranque en el nuevo bloque de upgrade
```

### 9. Ajustes esenciales y buenas prácticas

| Archivo    | Clave                | Valor recomendado                                                                                             |
| ---------- | -------------------- | ------------------------------------------------------------------------------------------------------------- |
| `app.toml` | `minimum-gas-prices` | `0.025ukava;1000000000akava` [docs.kava.io](https://docs.kava.io/docs/nodes-and-validators/node-setup-guide/) |
| `app.toml` | `pruning`            | `"everything"` (o `"default"` si prefieres histórico parcial)                                                 |
| Firewall   |                      | Abrir sólo **26656/tcp**. Mantén 26657, 8545, 8546, 9090, 9091 en `127.0.0.1`.                                |

**Monitoreo rápido**

```bash
bashCopiarEditarkava status | jq .SyncInfo          # estado de sincronización
kava query slashing signing-info VALOPER_PUBKEY   # salud de firmas
journalctl -u kava -f               # logs en tiempo real
```

**Copias de seguridad**\
Haz un `tar` periódico de `$HOME/.kava` y guarda tu *mnemonic* offline.

**Seguridad**\
Para validadores, utiliza arquitectura *sentry node + validator* para aislar la clave de firma.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ethernodes.io/guias-y-otros/deplega-tu-nodo/kava.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
