# Running a Full Node

This is a detailed documentation for setting up a **Full node** on HeliChain.

{% hint style="danger" %}
REMARKS:

The following is the minimal setup to join HeliChain. If running a validator node, you should research validator security.
{% endhint %}

### Prerequisites[​](https://docs.aura.network/validator/running-a-fullnode#prerequisites) <a href="#prerequisites" id="prerequisites"></a>

* Go 1.18+
* GCC/G++ compiler

#### Supported OS[​](https://docs.aura.network/validator/running-a-fullnode#supported-os) <a href="#supported-os" id="supported-os"></a>

We officially *support Linux only*. Other platforms may work, but there is no guarantee. We will extend our support to other platforms after we have stabilized our current architecture.

#### Commonly used ports[​](https://docs.aura.network/validator/running-a-fullnode#commonly-used-ports) <a href="#commonly-used-ports" id="commonly-used-ports"></a>

`helichaind` uses the following TCP ports. Toggle their settings to fit your environment.

* *26656*: The default port for the P2P protocol. This port is used to communicate with other nodes and must be open to join a network. However, it does not have to be open to the public. For validator nodes, we recommend configuring `persistent_peers` and closing this port to the public.

Additional ports:

* *1317*: The default port for the Lite Client Daemon (LCD), which can be executed by `helichaind rest-server`. The LCD provides an HTTP RESTful API layer to allow applications and services to interact with your `helichaind instance` through RPC. You don’t need to open this port unless you have use for it.
* *26657*: The default port for the `Tendermint RPC protocol`. Because this port is used for querying and sending transactions, it must be open for serving queries from `helichaind`.

### Networks information[​](https://docs.aura.network/validator/running-a-fullnode#networks-information) <a href="#networks-information" id="networks-information"></a>

Specify the network details for the network you want to participate in by selecting the corresponding genesis file and seeds.

### Setup a full-node[​](https://docs.aura.network/validator/running-a-fullnode#setup-a-full-node) <a href="#setup-a-full-node" id="setup-a-full-node"></a>

This guide completes the following actions:

* Download the latest release corresponding to the chosen network from [Helichaind repository](https://github.com/Heli-chain/heli)
* Compile `helichaind`
* Give your node a moniker and configure it
* Configure genesis state

Example:

```
git clone https://github.com/Heli-chain/heli
cd heli
make
cd build
./helichaind init <moniker> 
cp ../genesis.json ~/.helichain/config/genesis.json
```

Start your full-node:

```
./helichaind start --p2p.seeds <seed-id>@<seed-ip>:<seed-p2p-port> --minimum-gas-prices <gas-price>
```

```
./helichaind start --p2p.seeds 8f86b9543ee84a69072cb8347cc8fb4ace68e6f5@45.77.172.45:26656 --minimum-gas-prices 0.0025uheli
```

{% hint style="info" %}
FOR OPTIMIZED NODE PERFORMANCE, SET `minimum-gas-prices` TO ENABLE THE ANTI-SPAM MECHANISM AND REJECT INCOMING TRANSACTIONS WITH LESS THAN THE MINIMUM GAS PRICES.
{% endhint %}

After starting your full-node, wait until it completely sync transactions to your local to start create your validator.

#### Optional Configuration: State Sync[​](https://docs.aura.network/validator/running-a-fullnode#optional-configuration-state-sync) <a href="#optional-configuration-state-sync" id="optional-configuration-state-sync"></a>

State sync rapidly bootstraps a new node by discovering, fetching, and restoring a state machine snapshot from peers instead of fetching and replaying historical blocks

Visit a explorer to get a recent block height and corresponding hash. The recommended snapshot period is 1000 blocks, it is advised to choose something close to current height - 1000.

```
# Retrieve trust height interval
INTERVAL=1000
LATEST_HEIGHT=$(curl -s https://rpc.helichain.com/block | jq -r .result.block.header.height)
BLOCK_HEIGHT=$(($LATEST_HEIGHT-$INTERVAL))
TRUST_HASH=$(curl -s "https://rpc.helichain.com/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
```

Set these parameters in the code snippet below \<block\_height>, \<block\_hash>, \<rpc\_server>

```
cd $HOME/.helichain/config
RPC_SERVER=<rpc_server>
sed -i "s/enable = false/enable = true/" config.toml
sed -i "s/trust_height = 0/trust_height = \"$BLOCK_HEIGHT\"/" config.toml
sed -i "s/trust_hash = \"\"/trust_hash = \"$TRUST_HASH\"/" config.toml
sed -i "s/rpc_servers = \"\"/rpc_servers = \"$RPC_SERVER\"/" config.toml
```

#### Optional Configuration: Change RPC port <a href="#optional-configuration-change-rpc-port" id="optional-configuration-change-rpc-port"></a>

```
cd $HOME/.helichain/config
RPC_PORT=<rpc_port>
sed -i "s/localhost:1317/localhost:$RPC_PORT/" app.toml
```


---

# 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://helichains-organization.gitbook.io/helichain-white-paper-v2.0.1/run-node/running-a-full-node.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.
