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

PoS reorg and revision #753

Merged
merged 6 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
Binary file added docs/img/pos/change-owner-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/pos/change-owner-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/pos/polygon-instance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/pos/support-portal-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
159 changes: 0 additions & 159 deletions docs/pos/architecture/bor/commands.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ An overview of the process:
* A selected proposer from the validator set is responsible for collecting all signatures for a particular checkpoint and committing the checkpoint on the Ethereum mainnet.
* The responsibility of creating blocks and proposing checkpoints is variably dependent on a validator’s stake ratio in the overall pool.

See also [Heimdall architecture](heimdall/index.md).
See also [Heimdall architecture](../architecture/heimdall/introduction.md).
<!-- (/docs/pos/design/heimdall/overview). -->

## Bor: Block production layer
Expand All @@ -63,5 +63,5 @@ Bor is Polygon PoS's block producer — the entity responsible for aggregating t

Bor block producers are a subset of the validators and are shuffled periodically by the Heimdall validators.

See also [Bor architecture](bor/index.md).
See also [Bor architecture](../architecture/bor/introduction.md).
<!-- (/docs/pos/design/bor/overview). -->
6 changes: 0 additions & 6 deletions docs/pos/concepts/index.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/pos/concepts/tokens/index.md

This file was deleted.

8 changes: 0 additions & 8 deletions docs/pos/concepts/transactions/index.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/pos/get-started/becoming-a-validator.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,12 @@ The following step-by-step guides will take you through the process of running a

* [Start and run the nodes with Ansible](../how-to/validator/validator-ansible.md).
* [Start and run the nodes with binaries](../how-to/validator/validator-binaries.md).
* [Stake as a validator](../how-to/operate-validator-node/validator-staking-operations.md).
* [Stake as a validator](../how-to/operate-validator-node/next-steps.md#stake-tokens).

### Maintain your validator nodes

* [Change the signer address](../how-to/operate-validator-node/change-signer-address.md).
* [Change the commission](../how-to/operate-validator-node/validator-commission-operations.md).
* [Change the commission](../how-to/operate-validator-node/next-steps.md#changing-your-commission-rate).

### Community assistance

Expand Down
14 changes: 0 additions & 14 deletions docs/pos/how-to/choose-node-type.md

This file was deleted.

18 changes: 9 additions & 9 deletions docs/pos/how-to/erigon-archive-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ comments: true
- RAM: 64GB
- Storage
- Basically `io1` or above with at least 20k+ iops and RAID-0 based disk structure
- Mainnet archive node: 10TB
- Mainnet archive node: 15TB
- Amoy testnet archive node: 1TB
- SSD or NVMe. Bear in mind that SSD performance deteriorates when close to capacity
- SSD or NVMe. Bear in mind that SSD performance deteriorates when close to capacity.
- Golang: >= v1.20
- GCC: >= v10

Expand All @@ -34,16 +34,16 @@ This should create the binary at `./build/bin/erigon`

## Start Erigon client

When connecting to Amoy testnet, use the following command to start your Erigon client:
If you're deploying to mainnet, run the following command:

```bash
erigon --chain=amoy
erigon --chain=bor-mainnet --db.size.limit=12TB --db.pagesize=16KB # remaining flags follow
```

If you're deploying to mainnet, run the following command:
When connecting to Amoy testnet, use the following command to start your Erigon client:

```bash
erigon --chain=bor-mainnet --db.size.limit=12TB --db.pagesize=16KB # remaining flags follow
erigon --chain=amoy
```

## Configure Erigon client
Expand All @@ -60,11 +60,11 @@ If you are not using local **heimdall**, use `-bor.heimdall=<your heimdall url>`
erigon --chain=amoy --bor.heimdall=<your heimdall url> --datadir=<your_data_dir>
```

!!! note "Node RPC"
## Node RPC

- If you want to connect to Polygon Amoy Testnet, use: [https://heimdall-api-amoy.polygon.technology](https://heimdall-api-amoy.polygon.technology)
- If you want to connect to PoS Amoy Testnet, use: [https://heimdall-api-amoy.polygon.technology](https://heimdall-api-amoy.polygon.technology)

- For Polygon mainnet, use: [https://heimdall-api.polygon.technology](https://heimdall-api.polygon.technology)
- For PoS mainnet, use: [https://heimdall-api.polygon.technology](https://heimdall-api.polygon.technology)

!!! tip

Expand Down
36 changes: 6 additions & 30 deletions docs/pos/how-to/full-node/full-node-ansible.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,18 @@
comments: true
---

An [Ansible playbook](https://docs.ansible.com/ansible/latest/user_guide/playbooks_intro.html) is used to configure and manage a full node.
An [Ansible playbook](https://docs.ansible.com/ansible/latest/user_guide/playbooks_intro.html) can be used to configure and manage a full node.

## Prerequisites

- Install Ansible on your local machine with Python3.x. The setup doesn't run on Python 2.x.
- To install Ansible with Python 3.x, you can use pip. If you do not have pip on your machine,
follow the steps outlined [here](https://pip.pypa.io/en/stable/). Run `pip3 install ansible` to install
Ansible.
- Check the [Polygon PoS Ansible repository](https://github.com/maticnetwork/node-ansible#requirements) for
requirements.
- Check the [Polygon PoS Ansible repository](https://github.com/maticnetwork/node-ansible#requirements) for requirements.
- You also need to ensure that Go is *not installed* in your environment. You will run into issues if you attempt to set up your full node through Ansible with Go installed as Ansible requires specific packages of Go.
- You will also need to make sure that your VM / Machine does not have any previous setups for Polygon Validator or Heimdall or Bor. You will need to delete them as your setup will run into issues.

!!! info "Heimdall source enhancements"

The latest Heimdall version, **[v1.0.3](https://github.com/maticnetwork/heimdall/releases/tag/v1.0.3)**, contains a few enhancements.
The delay time between the contract events of different validators **has been increased** to ensure that the mempool doesn't get filled quickly in case of a burst of events that could hamper the chain's progress.

Additionally, the data size **has been restricted in state sync txs to 30Kb (when represented in bytes) and 60Kb (when defined as string)**.

For example:

```bash
Data - "abcd1234"
Length in string format - 8
Hex Byte representation - [171 205 18 52]
Length in byte format - 4
```


## Full node setup

- Ensure you have access to the remote machine or VM on which the full node is being set up.
Expand Down Expand Up @@ -97,10 +79,10 @@ An [Ansible playbook](https://docs.ansible.com/ansible/latest/user_guide/playboo
- On the remote machine/VM, run `curl localhost:26657/status`
- In the output, `catching_up` value should be `false`

- Once Heimdall is synced, run
- Once Heimdall is synced, run:
- `sudo service bor start`

You have successfully set up a full node with Ansible.
If you've reached this point, you have successfully set up a full node with Ansible.

!!! note

Expand All @@ -120,14 +102,8 @@ Logs can be managed by the `journalctl` linux tool. Here is a tutorial for advan
journalctl -u heimdalld.service -f
```

### Check Bor REST-server logs
### Check Bor node logs

```bash
journalctl -u bor.service -f
```

## Ports and firewall setup

Open ports `22`, `26656` and `30303` to world (0.0.0.0/0) on sentry node firewall.

You can use VPN to restrict access for port 22 as per your requirement and security guidelines.
```
Loading