# Validator Node

A Validator Node monitors the progress of the rollup protocol and actively participates to ensure the secure advancement of the chain state.

## 1. Prerequisites Before Deployment

Several requirements must be met before operating a **Validator Node**. These include:

* A Validator Account
* A Wallet Contract associated with the Validator Account
* An approval and authorization process for the Wallet Contract

### 1-1. Creating a Validator Wallet Contract

To deploy a Validator Node, users must create their own contract wallet using their account.

* The contract can only be controlled by the **deploying account**.
* At this stage, the validator has not yet been granted authorization and must go through an additional approval process.
* A Wallet Contract can be deployed multiple times using the same account. However, if an account owns multiple wallets, it cannot be used to run a node. Please take caution when managing multiple wallets.

For detailed instructions on wallet creation, refer to the following repository:

* <https://github.com/dKargo/dkargo-validator-utils>

### 1-2. Authorization Process

After creating the **Wallet Contract**, its **address must be submitted** to obtain authorization.

dKargo will **review the request** and grant **Validator permissions** upon approval.

For any questions or inquiries, please contact us through the [**dKargo support page**](https://dkargo.io/en/about/contact).

## 2. Mainnet

### 2-1. Public L2 Arbitrum RPC EndPoints

URL information for communicating with Arbitrum, the base layer of dKargo’s L3.

* <https://arb1.arbitrum.io/rpc>

> To avoid rate limits, replace the Arbitrum One RPC URL with a private URL.

### 2-2. Docker Images

* Latest Docker Image: <mark style="color:blue;">`repo.dkargo.io:59083/mainnet-validator:v0.0.1`</mark>

### 2-3. Required Custom Options

* `--node.staker.parent-chain-wallet.private-key`
  * Private key of the wallet that operates the validator.

* `--init.url`
  * Snapshot URL for downloading initialization data to enable fast synchronization.

* `--parent-chain.connection.url`
  * Base layer endpoint URL (default: Arbitrum public RPC endpoints)

* `--node.data-availability.parent-chain-node-url`
  * Base layer endpoint URL (Default: Arbitrum public RPC endpoints).

### 2-4. Running a Node via Docker

{% code overflow="wrap" %}

```bash
docker run -d -p 8547:8547 -p 8548:8548 -v "<LOCAL_DATA_PATH>:/home/user/.arbitrum" repo.dkargo.io:59083/mainnet-validator:v0.0.1 --node.staker.parent-chain-wallet.private-key=<PRIVATE_KEY>
```

{% endcode %}

> **`LOCAL_DATA_PATH`:** The local PC path where the validator node’s data is stored.\
> \&#xNAN;**`PRIVATE_KEY`:** The private key of the wallet used to operate the validator node.

### 2-5. Snapshot Sync

{% code overflow="wrap" %}

```bash
docker run -d -p 8547:8547 -p 8548:8548 -v "<LOCAL_DATA_PATH>:/home/user/.arbitrum" repo.dkargo.io:59083/mainnet-validator:v0.0.1 --node.staker.parent-chain-wallet.private-key=<PRIVATE_KEY> --init.url=<SNAPSHOT_URL>
```

{% endcode %}

> `SNAPSHOT_URL`: The URL where the [snapshot](/docs2-eng/chain-snapshot/download-the-latest-chain-snapshot.md) data is provided. For more details, please refer to Chain Snapshot.

### 2-6. Example (with snapshot)

{% code overflow="wrap" %}

```bash
docker run -d -p 8547:8547 -p 8548:8548 -v "<LOCAL_DATA_PATH>:/home/user/.arbitrum" repo.dkargo.io:59083/mainnet-validator:v0.0.1 --node.staker.parent-chain-wallet.private-key=<PRIVATE_KEY> --init.url="https://dkargo-snapshot.s3.ap-northeast-2.amazonaws.com/prune/latest/pruned.tar.gz"
```

{% endcode %}

## 3. Warehouse (Testnet)

Warehouse is a testnet that allows users to experiment before the official launch of the dKargo Mainnet.

### 3-1. Public L2 Arbitrum RPC EndPoints

URL information for communicating with Arbitrum, the base layer of dKargo’s L3.

* [https://sepolia-rollup.arbitrum.io/rpc](https://sepolia-rollup.arbitrum.io/rpc**)

> To avoid rate limits, replace the Arbitrum One RPC URL with a private URL.

### 3-2. Docker Images

* Latest Docker Image: <mark style="color:blue;">`repo.dkargo.io:59083/warehouse-validator:v0.0.1`</mark>

### 3-3. Required Custom Options

* `--node.staker.parent-chain-wallet.private-key`
  * Private key of the wallet that operates the validator.

* `--init.url`
  * Snapshot URL for downloading initialization data to enable fast synchronization.

* `--parent-chain.connection.url`
  * Base layer endpoint URL (default: Arbitrum public RPC endpoints)

* `--node.data-availability.parent-chain-node-url`
  * Base layer endpoint URL (Default: Arbitrum public RPC endpoints).

### 3-4. Running a Node via Docker

{% code overflow="wrap" %}

```bash
docker run -d -p 8547:8547 -p 8548:8548 -v "<LOCAL_DATA_PATH>:/home/user/.arbitrum" repo.dkargo.io:59083/warehouse-validator:v0.0.1 --node.staker.parent-chain-wallet.private-key=<PRIVATE_KEY>
```

{% endcode %}

> **`LOCAL_DATA_PATH`:** The local PC path where the validator node’s data is stored.\
> \&#xNAN;**`PRIVATE_KEY`:** The private key of the wallet used to operate the validator node.

### 3-5. Snapshot Sync

{% code overflow="wrap" %}

```bash
docker run -d -p 8547:8547 -p 8548:8548 -v "<LOCAL_DATA_PATH>:/home/user/.arbitrum" repo.dkargo.io:59083/warehouse-validator:v0.0.1 --node.staker.parent-chain-wallet.private-key=<PRIVATE_KEY> --init.url=<SNAPSHOT_URL>
```

{% endcode %}

> `SNAPSHOT_URL`: The URL where the [snapshot](/docs2-eng/chain-snapshot/download-the-latest-chain-snapshot.md) data is provided. For more details, please refer to Chain Snapshot.

### 3-6. Example (with snapshot)

{% code overflow="wrap" %}

```bash
docker run -d -p 8547:8547 -p 8548:8548 -v "<LOCAL_DATA_PATH>:/home/user/.arbitrum" repo.dkargo.io:59083/warehouse-validator:v0.0.1 --node.staker.parent-chain-wallet.private-key=<PRIVATE_KEY> --init.url="https://warehouse-snapshot.s3.ap-northeast-2.amazonaws.com/prune/latest/pruned.tar.gz"
```

{% endcode %}


---

# 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.dkargo.io/docs2-eng/run-dkargo-node/validator-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.
