Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update become validator #41

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
323 changes: 36 additions & 287 deletions content/get-started/become-a-validator.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,304 +3,53 @@ title: Become A Validator
weight: 1
---

## Preface
The Pactus blockchain is empowered by the
[Solid State Proof-of-Stake](/protocol/consensus/proof-of-stake) mechanism.
This ensures security and stability, with network validators playing a crucial role.
There are no restrictions on the number of validators on the Pactus blockchain,
allowing anyone to participate and earn PAC coin rewards while enhancing network security.
Pactus does not pre-select validators, instead,
they are self-elected through a randomization algorithm based on their stake and luck.

Welcome to the exciting world of the Pactus blockchain, where decentralization and security
are paramount. As the backbone of blockchain technology, validators play a crucial role in
maintaining the integrity and efficiency of the network. Becoming a validator on the Pactus
blockchain not only contributes to the robustness of the ecosystem but also offers the opportunity
to engage deeply with cutting-edge technology and potentially earn rewards for participating in
the network's governance and consensus mechanisms.
## What Roles do Validators Play?

This guide is designed for individuals and organizations interested in becoming validators
We will walk you through each step of the process, from understanding the basic requirements
to setting up your validator node. Whether you are a seasoned blockchain enthusiast or new to
the field, this article will provide you with the necessary insights and tools to embark on your
journey as a Pactus validator. Join us in securing the network and shaping the future of decentralized technology.
Validators can run Pactus Core software on their personal computers or remote servers to process transactions, create blocks,
and uphold network security and decentralization.
By staking their own coins, validators contribute to the network's security and are rewarded for their efforts.

## Step 1: How to become a validator?
## Validator Rewards

First need to download and install [Pactus GUI
or CLI](https://pactus.org/download/ ) for initlize your node
When a validator successfully proposes a block that is accepted by the network,
they receive a block reward in the form of one coin.
This reward serves as an [incentive](/protocol/blockchain/incentive)
for validators to continue supporting the network.

### How to initilize Pactus GUI node?
## Minimum requirement

- Please download the appropriate Pactus GUI for your operating system and specific
architecture by visiting the [download page](https://pactus.org/download/#gui).
After thorough testing on multiple machines, we can conclude that
the recommended minimum hardware requirements are as follows:

- Extract the file named "pactus-gui*{latest_version}{os}{architecture}.tar.gz"
or, if you're using Windows, run the installer
named "pactus-gui*{latest_version}\_windows_amd64_installer.exe" in your user directory.
**Personal Computer:**

- Run file "pactus-gui" for initlize or run your node.
- CPU's: 2 physical cores / 4vCPU
- RAM: 4 GB Ram
- Storage (SSD): 64 GB SSD Drive
- Network: stable internet connection with over 15 MBps speed

- If you run the node for the first time, you will see a wizard page to initialize your node.
The first page is the 'Initialize Mode' where you can select to create or restore a wallet using a seed phrase.
**Private server:**

![Initlize mode](/images/topic/become-a-validator/wizard-welcome.png)
- CPU's: 1/2 physical core / 1vCPU
- RAM: 1 GB Ram
- Storage (SSD): 20 GB NVMe Drive
- Network: stable internet connection with 1 TBps speed

- After selecting "Create new wallet from scratch" the next page will generate
a new seed phrase. It is crucial to back up these seed words either by writing them down or storing them in a secure document.
## How to Run Pactus?

{{< callout type="warning" >}}
Do not share your seed words with other users, as they grant access to your wallet.
Keeping your seed phrase private is essential for the security of your funds.
{{< /callout >}}
Pactus is designed to lightweight and simple blockchain software.
You can run the Pactus blockchain on your personal computer with basic hardware.

![Generated Seed words](/images/topic/become-a-validator/generated-seed.png)
To run Pactus you can follow these tutorials:

- You will need to confirm your seed words by typing them into the input box provided.

![Confirm Seed words](/images/topic/become-a-validator/confirm-seed.png)

- You can set a password for wallet security. This password for any
interactions with the wallet, such as creating transactions.

![Wallet Password](/images/topic/become-a-validator/wallet-password.png)

- You can select the number of validators on your node for staking.
You can choose between 7 and 32 validators for each node.

![Number of validators](/images/topic/become-a-validator/number-of-validators.png)

- The wizard is finished, and your node is initialized. You can now view your node information.

{{< callout type="info" >}}
Your node configuration is located at "{user home}/pactus".
{{< /callout >}}

![Finished Wizard](/images/topic/become-a-validator/finish-wizard.png)

- Now that your node is initialized, you need to keep it running on your system to synchronize with the blockchain

![Node information](/images/topic/become-a-validator/node-info.png)

1. Working directory: The path to the Pactus node configuration directory.
2. Network: The current network your node is connected to (default is mainnet).
3. Network ID: A specific identifier for your node within the network.
4. Connections: The current inbound or outbound connections established by your node.
5. Moniker: Your node's name on the P2P network, which can be set or changed in the Pactus
configuration file located at `{user home}/pactus/config.toml`.
6. Reachability: Your node's status within the network
7. Last block height: The height of the last block synced on your node.
8. Last block time: The timestamp of the last block synced on your node.
9. Number of blocks left: The remaining number of blocks to be synced by your node.
10. Sync Progress: A progress bar indicating the synchronization progress of blocks.
11. [Committee](/protocol/consensus/committee/ ) size:
The number of committee validators responsible for validating or proposing blocks.
12. In committee now: Indicates whether your node is currently part of the committee. If yes,
please keep your node running to earn rewards by proposing blocks.

- On this page, you can view your validators and rewards addresses

![wallets](/images/topic/become-a-validator/wallets.png)

1. Address: Here you can view the validators and rewards addresses.
2. Label: This field allows you to set or change the address label.
3. Balance: Displays the balance of the account-type address.
4. Stake: Shows the total stake of the validator-type address.
5. Availability Score: Indicates the score of your validators. [Please check this for insights into your node's availability](https://medium.com/pactuschain/pactus-pip-19-explained-what-is-availability-score-9ac279c193a8).

### How to initilize Pactus CLI node?

- Please download the appropriate Pactus CLI for your operating system and specific
architecture by visiting the [download page](https://pactus.org/download/#cli).

- Extract the file named "pactus-cli\_{latest_version}{os}{architecture}.tar.gz.

- Run file "pactus-daemon" with init command for initlization.

```shell
./pactus-daemon init
```

- Generate new seed words and press "y" for continue, It is crucial to back up these
seed words either by writing them down or storing them in a secure document.

```shell
Your wallet seed is:
hundred excuse lady weird impulse vendor please penalty wish rally blanket mansion

Write down this seed on a piece of paper to recover your validator key in the future.

Do you want to continue? [y/N] y
```

{{< callout type="warning" >}}
Do not share your seed words with other users, as they grant access to your wallet.
Keeping your seed phrase private is essential for the security of your funds.
{{< /callout >}}

- You can set a password for wallet security. This password for any interactions
with the wallet, such as creating transactions.

```shell
Enter a password for wallet
Password: *******
Confirm password: *******
```

- You can select the number of validators on your node for staking. You can choose
between 7 and 32 validators for each node.

```shell
How many validators do you want to create?
Each node can run up to 32 validators, and each validator can hold up to 1000 staked coins.
You can define validators based on the amount of coins you want to stake.
✔ Number of Validators: |7
```

- After select number of validators your inilized and you can start your node with command `./pactus-daemon start -w /home/{user}/pactus`,

```shell
Validator addresses:
1- pc1pg7nlscnf4dzk2kxr854828klvujx5cajnegpgx
2- pc1p5dfmq3vnukhh3xlwrctuph5g6x3eanljp7kpfh
3- pc1p9633ng3erlpy4f75p0ezkae8ssa7z99ysnt3p9
4- pc1ps330kzz30kqdr7u6c5zzes8nqh4k86arr6wjkd
5- pc1p26kg5822fd55h6w9vd9lu2unpty7jaucq35qgy
6- pc1pgkmjf6cd0f8qk5av6s6v52sv2u4crmk89h23cv
7- pc1pmzmcg035z3rkl4z8r66d9zsdgff3vzz5jlqprs

Reward addresses:
1- pc1z4tc9e7qsvxgzhv62pyeh4jjkvy2d6d92cgs6nz
2- pc1zp9nva62l6fsq4jqrj6fzajevgjy8q8pl56ut6v
3- pc1zw8qs0w74w6fv09h4dmr9znfgeprechcj95tdv4
4- pc1zpcl5w0pg3g3qjm250avk68yrqsnpxa38mkw77t
5- pc1zmtzqnlur2y4rlph6rjwc6zn0wvmf4st6aql2ll
6- pc1zmls9lsu332xxdz2e4kvmqlqx0fxq2x7yspnv4y
7- pc1z99k4vtmfcctx8nwdeuqktqdun5e56jy3au8a8z

Network: Mainnet

A pactus node is successfully initialized at /home/{user}/pactus

You can start the node by running this command:
./pactus-daemon start -w /home/{user}/pactus
```

## Step 2: Subscribe to the Pactus Newsletter for Important Updates

Stay informed and up-to-date with the latest developments in the Pactus ecosystem by
subscribing to the newsletter. Receive important news, updates, and announcements
directly to your email inbox. Don't miss out on crucial information that could impact
your involvement with Pactus blockchain. Sign up now to stay connected and informed.

{{< callout type="warning" >}}
It's required to subscribe to "Pactus Update News" channel news.
{{< /callout >}}

<form method="post" action="https://pacmail.org/subscription/form" class="listmonk-form">
<div>
<input type="hidden" name="nonce" />
<p>
<input type="email" name="email" required placeholder="E-mail" />
<p></p>
<input type="submit" class="custom-button" role="button" value="Subscribe" />
</p>
<p></p>
<div class="short">
Please add
<b>"[email protected]"</b>
to your email service's
<a href="https://blog.hubspot.com/marketing/email-whitelist" rel="nofollow noreferrer" target="_blank">
whitelist
</a>
<br />
to ensure you receive our emails in your inbox.
</div>
<p></p>

<div class="captcha">
<div class="h-captcha" data-sitekey="898156d4-1b49-4bb4-a3d9-f4c2214b9908"></div>
<script src="https://js.hcaptcha.com/1/api.js" async defer></script>
</div>

<p>
<input id="90cc6" type="checkbox" name="l" checked value="90cc6b4e-c631-45f3-b1d5-c5027b379c7e" />
<label for="90cc6">Pactus Announcements</label>
</p>
<p>
<input id="647b6" type="checkbox" name="l" checked value="647b6294-eced-4887-9298-3ae6f79f12a6" />
<label for="647b6">Pactus Update News</label>
</p>
</div>
</form>

## Step 3: Purchase Coins for Staking on Your Validators

Prepare to participate in the Pactus blockchain as a validator by acquiring the necessary coins for staking.
Staking is essential for securing the network and participating in consensus. By purchasing coins,
you'll have the resources needed to stake on your validators, contributing to the network's security
and earning rewards in return. Take this step to actively engage with the Pactus blockchain and
play a vital role in its ecosystem.

## Step 4: Join the Pactus Blockchain Community on Social Networks

<ul class="list-unstyled community">
<li>
<a href="https://discord.gg/H5vZkNnXCu">
<img alt="Discord" src="/images/social/social-discord.svg" width="32">
Discord
</a>
</li>
<li>
<a href="https://x.com/pactuschain/">
<img alt="Discord" src="/images/social/social-twitter.svg" width="32">
Twitter
</a>
</li>
<li>
<a href="https://t.me/pactusblockchain">
<img alt="Discord" src="/images/social/social-telegram.svg" width="32">
Telegram
</a>
</li>
<li>
<a href="https://linkedin.com/company/pactus-blockchain">
<img alt="Discord" src="/images/social/social-linkedin.svg" width="32">
Linkedin
</a>
</li>
<li>
<a href="https://bitcointalk.org/index.php?topic=5480867.0">
<img alt="Discord" src="/images/social/social-bitcoin-talk.svg" width="32">
BitcoinTalk
</a>
</li>
</ul>

To explore the communities managed by members of the community, you can follow the links below.

<ul class="list-unstyled community_ran">
<li>
<a href="https://t.me/pactuschat">
<img alt="Discord" src="/images/social/social-telegram.svg" width="32">
Telegram
</a>
</li>
<li>
<a href="https://twitter.com/PactusNaija">
<img alt="Discord" src="/images/social/social-twitter.svg" width="32">
Nigeria
</a>
</li>
<li>
<a href="https://www.facebook.com/PactusChain">
<img alt="Facebook" src="/images/social/social-facebook.svg" width="32">
Facebook
</a>
</li>
<li>
<a href="https://t.me/nodesync_top">
<img alt="Discord" src="/images/social/social-telegram.svg" width="32">
NodeSync
</a>
</li>
</ul>

## Step 5: Expand Your Knowledge with Pactus Tutorials

- [What is Pactus?](https://pactus.org/about/what-is-pactus/ )
- [Roadmap](https://pactus.org/about/roadmap/ )
- [FAQs](https://pactus.org/about/faq/ )
- [Run Pactus in Graphic Mode](/get-started/pactus-gui)
- [Run Pactus in Command Line Mode](/get-started/pactus-daemon)
- [Run Pactus using Docker](/get-started/pactus-docker)
27 changes: 18 additions & 9 deletions content/protocol/consensus/protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,13 @@ number of validators that may be faulty or byzantine. For example, if there is o
the resiliency of the algorithm is optimal if we have at least 3 non-faulty
validators. So the minimum number of validators should be $3+1=4$.

We denote a message as $\langle m \rangle$ tuple and a signed message by node $i$ as
$\langle m \rangle_{\sigma_i}$.
Messages are denoted as $\langle m \rangle$ tuples,
and a message signed by node $i$ is represented as $\langle m \rangle_{\sigma_i}$.
We use <i>aggregate signature scheme</i> for signing the message that allow each
party to justify its vote for a particular value by a single aggregated signature
generated from $n$ signatures for the same message $m$.

$${\sigma_{agg}} = Agg({\sigma_1}, {\sigma_2}, \dots, {\sigma_n})$$

Pactus consensus algorithms has two phases: Block creation phase and change proposer phase.

Expand Down Expand Up @@ -78,9 +83,9 @@ In _precommit_ step, validator $i$ signs and broadcasts precommit message to
the other validators.
The precommit message has this form:

$\langle \text{PRECOMMIT},h,r,d \rangle_{\sigma_i}$
$$\langle \text{PRECOMMIT},h,r,d \rangle_{\sigma_i}$$

Each validator executes and commits block $b$ after receiving
Each validator executes and commits block $B$ after receiving
$2f+1$ precommit messages (including its own) and becomes **committed**.

#### Block Announcement
Expand Down Expand Up @@ -156,7 +161,7 @@ For the first round, if the validator's timer has expired in the prepare step, t
and if the validator's timer expired in the precommit step,
the justification is the proper quorum certificate for the prepare step at round $r$.

In the next rounds, a pre-vote for $b$ may be justified in two ways:
In the next rounds, a pre-vote for $B$ may be justified in two ways:

- **Hard**: that is the quorum certificate for $\langle \text{CP:PRE-VOTE},h,r,r_{cp}-1,b \rangle$
- **Soft**: that is the quorum certificate for $\langle \text{CP:MAIN-VOTE},h,r,r_{cp}-1,abstain \rangle$
Expand Down Expand Up @@ -187,11 +192,15 @@ A main-vote for $v$ may be justified in two ways:

#### Decide Step

After collecting $2f+1$ valid and justified main-votes, each validator examines these votes. If all
votes are for a value $b \in \{0, 1\}$, then the validator decides $b$, but continues to
participate in the protocol for one more round. Otherwise, the validator proceeds to the next round.
After collecting $2f+1$ valid and justified main-votes, each validator examines these votes.
If all votes are for a value $b \in \{0, 1\}$, then the validator decides $b$ and
broadcasts decided message to the network.
Otherwise, it moves to next round.
The decided message has this form:

$$\langle\langle \text{CP:DECIDED},h,r,r_{cp},b \rangle, justification\rangle$$

$$r_{cp}+1$$
The justification in the decided message is a combination of all main-vote signatures for the value $b$.

### Comparison

Expand Down