# Running Full Node

<figure><img src="/files/g6vaQ0VfcK5ve5DkEkrq" alt=""><figcaption></figcaption></figure>

## Prerequisites <a href="#prerequisites" id="prerequisites"></a>

* **Java JDK - version 21 or higher.**&#x20;

```
wget https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.deb
sudo apt install ./jdk-21_linux-x64_bin.deb
```

Alternatively, you can manually install the [Java JDK](https://www.oracle.com/java/technologies/downloads).

* [Hyperledger Besu 24.7.0](https://github.com/hyperledger/besu/releases/download/24.7.0/besu-24.7.0.tar.gz) - SHA256: 96cf47defd1d8c10bfc22634e53e3d640eaa81ef58cb0808e5f4265998979530
* 500 GB of disk space and 12 GB RAM is recommended.
* Ubuntu 20.04 or MacOS High Sierra 10.13 or later versions.

<mark style="color:green;">Tip before running in Linux:</mark>

<mark style="color:green;">If synchronizing to Mainnet on Linux or other chains with large data requirements, increase the maximum number of open files allowed using</mark> <mark style="color:green;"></mark><mark style="color:green;">`ulimit`</mark><mark style="color:green;">. If the open files limit is not high enough, a</mark> <mark style="color:green;"></mark><mark style="color:green;">`Too many open files`</mark> <mark style="color:green;"></mark><mark style="color:green;">RocksDB exception occurs.</mark>

## Get Started <a href="#prerequisites" id="prerequisites"></a>

Bitrock-Mainnet Genesis File: <https://raw.githubusercontent.com/BitrockChain/genesis/main/mainnet.json>

### 1. Create Directory <a href="#id-1.-create-directory-and-download-genesis-file" id="id-1.-create-directory-and-download-genesis-file"></a>

{% code overflow="wrap" lineNumbers="true" %}

```sh
mkdir bitrock_node
cd bitrock_node
wget https://raw.githubusercontent.com/BitrockChain/genesis/main/mainnet.json
```

{% endcode %}

### 2. Create Configuration File <a href="#id-2.-create-configuration-file" id="id-2.-create-configuration-file"></a>

Create a **chain\_config.toml** with the following options:

{% code overflow="wrap" lineNumbers="true" %}

```
#Enode Pointing
bootnodes=["enode://1fd6bfa1ac606ab3cdbbbacef1b27a1e38b0ac54d5c1a361d07a27211b54b4817aa9b14e596f23c7020d246998f5224ae18882b181dad2ee940d774a085eb7bd@157.245.21.183:30303","enode://5bca2ebdd0f8e6eb7d916ac92edd3a3ca9f18f99c869c2df703c0457d572b3f7baa8e70880a751204988d97d90fe0566ac5917603981248121e3fc428dee25aa@157.230.28.40:30303","enode://99f9371e0469d486b2c2489de3a7df65dc11f0e7c6cbc4838f4862ac58383fca2f680c0989fd4264ccbae00d66cab20050363976b53b80bbc282c80036ba3f24@159.223.238.200:30303","enode://8f151bb869a67ccfb92a1bd522dd4ab689db6cfd1ce2ed13636b4d6a5fabffd0b12e6a18c2ab42bb0075ea74d74370764eea6b0343f6e56578399bdae2044823@178.62.212.166:30303"]


#Bitrock Genesis File
genesis-file="[PATH]/mainnet.json"

#Data directory
data-path="[PATH]/bitrock_node"

#Chain Configuration 
rpc-http-enabled=true
rpc-ws-enabled=true
host-allowlist=["*"]
sync-mode=["FULL"]
rpc-http-host=[IPHOST]
rpc-ws-host=[IPHOST]
rpc-http-cors-origins=["all"]
poa-block-txs-selection-max-time=["100"] 
rpc-http-max-active-connections=["1000"]
data-storage-format=["FOREST"]

#API Method
rpc-http-api=["ETH","NET","WEB3","TXPOOL","TRACE"]
rpc-ws-api=["ETH","NET","WEB3","TXPOOL","TRACE"]
```

{% endcode %}

### 3. Start Node <a href="#id-3.-start-node" id="id-3.-start-node"></a>

{% code overflow="wrap" lineNumbers="true" %}

```shell
besu --config-file=chain_config.toml
```

{% endcode %}

### 4. Run in a Service System <a href="#id-4.-run-node-as-a-service" id="id-4.-run-node-as-a-service"></a>

{% code overflow="wrap" lineNumbers="true" %}

```sh
nano /etc/systemd/system/bitrockfullnode.service
```

{% endcode %}

```
[Unit]
Description= bitrock full node 

[Service]
Type=simple
User=root
Restart=always
ExecStart=[PATH]/besu --config-file=[PATH]/chain_config.toml 

[Install]
WantedBy=default.target
```

### 5. Confirm Bitrock Network is Running <a href="#id-4.-run-node-as-a-service" id="id-4.-run-node-as-a-service"></a>

{% code overflow="wrap" lineNumbers="true" %}

```
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":53}' http://127.0.0.1:8545
```

{% endcode %}

Response:

{% code overflow="wrap" %}

```sh
{
  "jsonrpc" : "2.0",
  "id" : 53,
  "result" : "0x3e8"
}
```

{% endcode %}

<mark style="color:yellow;">Request to become a Validator:  <info@bit-rock.io></mark>


---

# 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.bit-rock.io/developer/running-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.
