> For the complete documentation index, see [llms.txt](https://docs.validator247.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.validator247.com/mainnet/elys-network.md).

# Elys Network

**Public Endpoints**

> RPC : <https://elys-rpc.validator247.com>
>
> API: [ https://elys-api.validator247.com](< https://elys-api.validator247.com>)

## Install App and build

```
git clone https://github.com/elys-network/elys.git
cd elys
git fetch
git checkout fix/v1.3.0-patch-1
git pull origin fix/v1.3.0-patch-1
git tag -f v1.3.0
make instal
```

## config and init&#x20;

```
elysd init <Validator_name> --chain-id=elys-1
```

```bash
# config pruning
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.elys/config/app.toml 
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.elys/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"19\"/" $HOME/.elys/config/app.toml

# set minimum gas price, enable prometheus and disable indexing
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0.0003uelys"|g' $HOME/.elys/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.elys/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.elys/config/config.toml

# create service file
sudo tee /etc/systemd/system/elysd.service > /dev/null <<EOF
[Unit]
Description=Elys node
After=network-online.target
[Service]
User=$USER
WorkingDirectory=$HOME/.elys
ExecStart=$(which elysd) start --home $HOME/.elys
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF

# enable and start service
sudo systemctl daemon-reload
sudo systemctl enable elysd
sudo systemctl restart elysd && sudo journalctl -u elysd -f -o ca
```

<pre class="language-bash"><code class="lang-bash"><strong># download genesis and addrbook
</strong>
wget -O addrbook.json https://raw.githubusercontent.com/Validator247/Elys---mainnet/main/addrbook.json

wget -O genesis.json https://raw.githubusercontent.com/Validator247/Elys---mainnet/main/genesis.json
</code></pre>

### &#x20;State Sync <a href="#state-sync" id="state-sync"></a>

```
sudo systemctl stop elysd
elysd tendermint unsafe-reset-all --home ~/.hedge/ --keep-addr-book
SNAP_RPC="https://elys-rpc.validator247.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)
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" ~/.elys/config/config.toml
more ~/.elys/config/config.toml | grep 'rpc_servers'
more ~/.elys/config/config.toml | grep 'trust_height'
more ~/.elys/config/config.toml | grep 'trust_hash'

sudo systemctl restart elysd && journalctl -u elysd -f -o cat
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.validator247.com/mainnet/elys-network.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.
