# Pactus Blockchain

## Pactus Mainnet

System: Ubuntu 22.04  , Open port: <mark style="color:red;">**21888**</mark> TCP and UDP

Min:  1CPU, 2G Ram, 40SSD

## 1. Server preparation

```
sudo apt update && apt upgrade -y

sudo apt install tmux git curl -y

sudo apt install make clang pkg-config libssl-dev build-essential -y
```

## **2. Download the binary file or Upgrade Version** 1.1.8&#x20;

```
cd $HOME && rm -rf node_pactus && wget https://github.com/pactus-project/pactus/releases/download/v1.1.8/pactus-cli_1.1.8_linux_amd64.tar.gz && tar -xzf pactus-cli_1.1.8_linux_amd64.tar.gz && rm -rf pactus-cli_1.1.8_linux_amd64.tar.gz && mv pactus-cli_1.1.8 node_pactus && cd node_pactus
```

## 3. Initializing the Node

Run Command below and choose number <mark style="color:red;">**1**</mark> Validator (no choose 7 or 32)

Save all: <mark style="color:red;">**Your wallet seed, Wallet address, Validator address**</mark>

```
sudo ./pactus-daemon init
```

## 4. Run node&#x20;

```
tmux new -s pactus
```

```
sudo ./pactus-daemon start
```

## 5. Wallet

### 5.1 Restoring the Node <a href="#restoring-the-node" id="restoring-the-node"></a>

```
./pactus-daemon init --restore "<your-mnemonic>"
```

### 5.2 Wallet Seed <a href="#wallet-seed" id="wallet-seed"></a>

```
./pactus-wallet seed
```

### 5.3. List of Addresses <a href="#list-of-addresses" id="list-of-addresses"></a>

```
./pactus-wallet address all
```

### 5.4 Get Address Balance

```
./pactus-wallet address balance <ADDRESS>
```

Replace **`<ADDRESS>`** with the address for which you want to retrieve your balance.

### 5.5 Sending Bond <a href="#sending-bond-transaction" id="sending-bond-transaction"></a>

```
./pactus-wallet tx bond <Reward address> <Validator address> <AMOUNT>
```

### 5.6 Sending Transfer  <a href="#sending-transfer-transaction" id="sending-transfer-transaction"></a>

```
./pactus-wallet tx transfer <sender address> <receiver address> <AMOUNT>
```

## 6. Bootstrap Nodes

Operators are expected to adhere to the following guidelines:

Please read more: <https://github.com/pactus-project/pactus/blob/main/docs/bootstrap.md>

<mark style="color:red;">**IMPORTANT**</mark>

<mark style="color:red;">**Only VPS for bootstrap, Please don't use HomeServer or PC for pull request bootstrap**</mark>

### 6.1 Edit Config.toml

**Stop Node**

&#x20; ctrl + c&#x20;

**Change config.toml**

```
nano $HOME/pactus/config.toml
```

**Find and change your info bellow \[http] image 1 to image 2**

<figure><img src="https://2585830168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRzXvi3emVKzTi94K7StD%2Fuploads%2FdmHHCQdvlO048nD5EXy2%2Fhttp-pactus.JPG?alt=media&#x26;token=6549e2dd-1061-481a-b3b6-164520e3b0c7" alt=""><figcaption><p><mark style="color:red;"><strong>Image 1</strong></mark></p></figcaption></figure>

<figure><img src="https://2585830168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRzXvi3emVKzTi94K7StD%2Fuploads%2FI0CWQgP5ECQ3jIXNR9os%2Fhttp-pactus-1.JPG?alt=media&#x26;token=082cbec9-fba3-48b0-9b3a-2a41d2215b59" alt=""><figcaption><p><mark style="color:red;">Image 2</mark></p></figcaption></figure>

**Save them:** ctrl + o , enter

**Exit edit:** ctrl + x

**Run node again by step 4**

```
sudo ./pactus-daemon start
```

### 6.2 Get Network ID

```
http://your_ip_node:8085/node
```

Please change **your\_ip\_node** and view on browser.&#x20;

Get info <mark style="color:red;">**Peer ID**</mark> and <mark style="color:red;">**Your IP**</mark>

### 6.3 Create a new Fork and Pull requests

#### **Fork :** <https://github.com/pactus-project/pactus>

<figure><img src="https://2585830168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRzXvi3emVKzTi94K7StD%2Fuploads%2Fwii9vVw0p5fx60FwHqE7%2Ffork-pactus.JPG?alt=media&#x26;token=6a37841e-28cc-425e-b008-3c3a89a9a902" alt=""><figcaption></figcaption></figure>

#### Pull requests

Your fork, Edit file bootstrap.json in folder config&#x20;

<figure><img src="https://2585830168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRzXvi3emVKzTi94K7StD%2Fuploads%2F7sfoEVTaE1ylVPkndaGN%2Ffork-pactus-bootstrap.JPG?alt=media&#x26;token=709dcfca-c9db-44c7-a2c1-aeff946b7ea1" alt=""><figcaption></figcaption></figure>

Please change input your info with format json bellow:

your\_name

your\_email

your\_ip

your\_peers\_id

```
,
    {
        "name": "yourname",
        "email": "your_email",
        "website": "n/a",
        "address": "/ip4/your_ip/tcp/21888/p2p/your_peers_id"
    }
```

**Save them**, and Click **Pull Request**

<figure><img src="https://2585830168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRzXvi3emVKzTi94K7StD%2Fuploads%2FhH4R9nDXq57SX99zOhml%2Fpactus-pull1.JPG?alt=media&#x26;token=1ea1ecfd-b2ec-4f4e-afbb-e3d1ca454554" alt=""><figcaption></figcaption></figure>

Next step, Click New pull request

<figure><img src="https://2585830168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRzXvi3emVKzTi94K7StD%2Fuploads%2FN6YdI62qsnaJrZvd8ThY%2Fpactus-pull2.JPG?alt=media&#x26;token=8c95c58a-799f-4368-8ee5-2e587a9d7220" alt=""><figcaption></figcaption></figure>

Next step, Click **Create pull request .**

Next step, Add a title with format bellow,  **important**&#x20;

```
chore: add bootstrap address for YourNamePR
```

<figure><img src="https://2585830168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRzXvi3emVKzTi94K7StD%2Fuploads%2FFm3iPnyKzDo1j227scFw%2Fpactus-pull3.JPG?alt=media&#x26;token=7d05e3c6-97bc-4250-92e7-1c4196bf69c6" alt=""><figcaption></figcaption></figure>

Click **Create pull request** to completed

Team will review and check, then they approved

### 6.4 Return Default File Config

&#x20;All right, you should return default file config, it height security.

Please again step 6.1 change your image 2 to image 1 and start node (default config)

### 6.5 Bootstrap Node Configuration

Please recommended to adjust the Bootstrap node configuration as follows and restart node: <https://github.com/pactus-project/pactus/blob/main/docs/bootstrap.md#bootstrap-node-configuration>

<figure><img src="https://2585830168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRzXvi3emVKzTi94K7StD%2Fuploads%2FJmxvHFDMbvlvaTMDx8K1%2Fbootstrap-node-configuration.JPG?alt=media&#x26;token=bed6cfd9-c055-4779-86c5-3ea4af64b107" alt=""><figcaption></figcaption></figure>

Change your node: enable\_nat\_service, enable\_relay, moniker

<figure><img src="https://2585830168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRzXvi3emVKzTi94K7StD%2Fuploads%2FiUSdvcHQBEDjpr1ZJePD%2Fconfigpactus.JPG?alt=media&#x26;token=d1867370-de37-42b4-90df-1a42e4091a92" alt=""><figcaption><p>Update</p></figcaption></figure>

Thank you !!!
