diff --git a/docs/img/pos/change-owner-1.png b/docs/img/pos/change-owner-1.png new file mode 100644 index 000000000..56a44bb68 Binary files /dev/null and b/docs/img/pos/change-owner-1.png differ diff --git a/docs/img/pos/change-owner-2.png b/docs/img/pos/change-owner-2.png new file mode 100644 index 000000000..5e361187f Binary files /dev/null and b/docs/img/pos/change-owner-2.png differ diff --git a/docs/img/pos/polygon-instance.png b/docs/img/pos/polygon-instance.png new file mode 100644 index 000000000..695af1315 Binary files /dev/null and b/docs/img/pos/polygon-instance.png differ diff --git a/docs/img/pos/support-portal-1.png b/docs/img/pos/support-portal-1.png new file mode 100644 index 000000000..d1eb69c83 Binary files /dev/null and b/docs/img/pos/support-portal-1.png differ diff --git a/docs/pos/architecture/bor/commands.md b/docs/pos/architecture/bor/commands.md deleted file mode 100644 index ddbe796c0..000000000 --- a/docs/pos/architecture/bor/commands.md +++ /dev/null @@ -1,159 +0,0 @@ -This guide provides a curated list of common commands and Polygon-specific operations essential for node operators. Whether you're setting up a full node, validator node or troubleshooting, these commands will assist you in managing your Polygon PoS environment effectively. - -## Frequently used commands - -### Bor - -To execute Bor IPC commands, use the following syntax: - -```bash -bor attach .bor/data/bor.ipc -``` - -| IPC Command | RPC Command | Description | -| ----------- | ----------- | ----------- | -| `admin.peers.length` | `curl -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "net_peerCount", "params": [], "id": 74}' localhost:8545` | Retrieves the number of peers connected to the node. | -| `admin.nodeInfo` | | Provides detailed information about the node. | -| `eth.syncing` | `curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "eth_syncing","params": []}' localhost:8545` | Indicates whether the node is syncing (`true`) or not (`false`). | -| `eth.syncing.highestBlock - eth.syncing.currentBlock` | | Compares the current block of your node to the highest block. | -| `eth.blockNumber` | `curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "eth_blockNumber","params": []}' localhost:8545` | Returns the latest block number processed by the node. | -| `debug.setHead("0x"+((eth.getBlock('latest').number) - 1000).toString(16))` | | Rewinds the blockchain to 1000 blocks prior. | -| `admin.nodeInfo.enode` | | Retrieves the public enode URL of the node. | -| `eth.syncing.currentBlock * 100 / eth.syncing.highestBlock` | | Calculates the remaining percentage for block synchronization. | -| `eth.getBlock("latest").number` | `curl http://YourIP:8545 -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "method":"bor_getSigners", "params":["0x98b3ea"]}'` | Queries the height of the latest Bor block. | -| | `curl http://YourIP:8545 -X POST -H "Content-Type: application/json" --data '{"method":"eth_chainId","params":[],"id":1,"jsonrpc":"2.0"}'` | Retrieves the `chainID`. | - -### Heimdall - -| Command | Description | -| ------- | ----------- | -| `curl localhost:26657/net_info?` | Returns the number of connected peers using `jq .result.n_peers`. | -| `curl -s localhost:26657/status` | Retrieves Heimdall's current block height using `jq .result.sync_info.latest_block_height`. | -| `curl localhost:26657/net_info` | Queries the node using its moniker with `grep moniker`. | -| `curl -s localhost:26657/status` | Checks if Heimdall is in sync using `jq .result.sync_info.catching_up`. | -| `curl -s localhost:26657/status` | Verifies Heimdall's sync status using `jq .result \| jq .sync_info`. | -| `heimdalld unsafe-reset-all` | Resets the database in case of issues. | -| `curl localhost:26657/status` | Provides comprehensive information about Heimdall. | - -## Node management commands - -| Description | Command | -| ------------------------------------- | ---------------------------------------------- | -| Locate Heimdall genesis file | `$CONFIGPATH/heimdall/config/genesis.json` | -| Locate heimdall-config.toml | `/etc/heimdall/config/heimdall-config.toml` | -| Locate config.toml | `/etc/heimdall/config/config.toml` | -| Locate heimdall-seeds.txt | `$CONFIGPATH/heimdall/heimdall-seeds.txt` | -| Start Heimdall | `$ sudo service heimdalld start` | -| Start Heimdall rest-server | `$ sudo service heimdalld-rest-server start` | -| Start Heimdall bridge-server | `$ sudo service heimdalld-bridge start` | -| Locate Bor genesis file | `$CONFIGPATH/bor/genesis.json` | -| Start Bor | `sudo service bor start` | -| Retrieve Heimdall logs | `/var/log/matic-logs/` | -| Check Heimdall logs | `tail -f heimdalld.log` | -| Check Heimdall rest-server logs | `tail -f heimdalld-rest-server.log` | -| Check Heimdall bridge logs | `tail -f heimdalld-bridge.log` | -| Check Bor logs | `tail -f bor.log` | - -## Useful configuration commands - -### Sync Heimdall status - -To check if Heimdall is synced, run: - -```bash -curl http://localhost:26657/status -``` - -### Latest block height on Heimdall - -To check the latest block height on Heimdall, run: - -```bash -curl localhost:26657/status -``` - -### Latest block height on Bor - -To check the latest block height on Bor, use: - -```bash -curl http://:8545 -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, "method":"bor_getSigners", "params":["0x98b3ea"]}' -``` - -### Cleanup: Deleting remnants of Heimdall and Bor - -##### For Linux package - -```bash -sudo dpkg -i matic-bor -sudo rm -rf /etc/bor -``` - -##### For binaries - -```bash -sudo rm -rf /etc/bor -sudo rm /etc/heimdall -``` - -### Terminate Bor process - -##### For Linux package - -```bash -ps -aux | grep bor -sudo kill -9 -``` - -##### For binaries - -```bash -cd CS-2003/bor -bash stop.sh -``` - -### Retrieve latest peer details - -To retrieve the latest peer details, run: - -```bash -bor attach bor.ipc -admin.peers.forEach(function(value){ - console.log(value.enode+',') -}) -exit -``` - -### Stop Heimdall and Bor services - -##### For Linux packages - -```bash -sudo service heimdalld stop -sudo service bor stop -``` - -##### For binaries - -```bash -pkill heimdalld -pkill heimdalld-bridge -cd CS-2001/bor -bash stop.sh -``` - -### Remove Heimdall and Bor directories - -##### For Linux packages - -```bash -sudo rm -rf /etc/heimdall/* -sudo rm -rf /etc/bor/* -``` - -##### For binaries - -```bash -sudo rm -rf /var/lib/heimdalld/ -sudo rm -rf /var/lib/bor -``` diff --git a/docs/pos/architecture/bor/index.md b/docs/pos/architecture/bor/introduction.md similarity index 100% rename from docs/pos/architecture/bor/index.md rename to docs/pos/architecture/bor/introduction.md diff --git a/docs/pos/architecture/heimdall/index.md b/docs/pos/architecture/heimdall/introduction.md similarity index 100% rename from docs/pos/architecture/heimdall/index.md rename to docs/pos/architecture/heimdall/introduction.md diff --git a/docs/pos/architecture/index.md b/docs/pos/architecture/overview.md similarity index 96% rename from docs/pos/architecture/index.md rename to docs/pos/architecture/overview.md index e27c4f397..2a8d5cc15 100644 --- a/docs/pos/architecture/index.md +++ b/docs/pos/architecture/overview.md @@ -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). ## Bor: Block production layer @@ -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). diff --git a/docs/pos/concepts/index.md b/docs/pos/concepts/index.md deleted file mode 100644 index 549d17a8d..000000000 --- a/docs/pos/concepts/index.md +++ /dev/null @@ -1,6 +0,0 @@ -This section covers basic concepts necessary in understanding a few more aspects about Polygon PoS. Specifically the network's native token MATIC and its proposed replacement POL, two Ethereum improvement proposals (EIP-1559 and EIP-4337) pertaining to gas estimations, transaction costs, as well as account abstraction. - -The section contains an elaborate discussion on the proposed transition from MATIC to POL as the Polygon PoS's native token. The [POL subsection](../concepts/tokens/pol.md) defines the POL token and continues to present, in a Q&A format, all the information that users need to know about the proposed transition. A subsequent subsection defines what the MATIC token is, gives an example script to send MATIC tokens from one account to another, the three different ways to acquire MATIC tokens and finally how to obtain test MATIC tokens. - -In the [Transactions subsection](../concepts/transactions/index.md) is a brief discussion on the types of transactions, how legacy transaction format works, and ways in which different types of transactions can be sent. - diff --git a/docs/pos/concepts/tokens/index.md b/docs/pos/concepts/tokens/index.md deleted file mode 100644 index b8faa8260..000000000 --- a/docs/pos/concepts/tokens/index.md +++ /dev/null @@ -1,5 +0,0 @@ -This section focuses on the proposed Polygon PoS's native token POL and the soon to be replaced native token MATIC. - -The *POL* subsection defines the POL token and continues to present, in a question-and-answer (Q&A) format, all the information that users need to know about the proposed transition. - -The subsequent *MATIC* subsection defines what the MATIC token is, gives an example script to send MATIC tokens from one account to another, the three different ways to acquire MATIC tokens and finally how to obtain test MATIC tokens. diff --git a/docs/pos/concepts/transactions/index.md b/docs/pos/concepts/transactions/index.md deleted file mode 100644 index 8aaf15ffb..000000000 --- a/docs/pos/concepts/transactions/index.md +++ /dev/null @@ -1,8 +0,0 @@ - - -The *Transactions* subsection provides information about the [EIP-1559](../transactions/eip-1559.md) as it applies to how gas estimations and costs of transactions work on Polygon PoS. Further on, are discussions on new and old types of transaction formats and how they are processed in Polygon PoS. - -Regarding account abstraction, the subsection contains a simplified overview of the different components of [ERC-4337](../transactions/eip-4337.md) and how these components work together. These are altogether; `UserOperation`, `Bundler`, `EntryPoint`, and `Contract Account`. Optional ERC-4337 components are `Paymasters` and `Aggregators`. - -There is a extra subsection discussion several aspects of [meta transactions](../transactions/meta-transactions.md). These are transactions that allow anyone to interact with the blockchain without requiring users to have tokens in order to pay for the network’s services. - diff --git a/docs/pos/get-started/becoming-a-validator.md b/docs/pos/get-started/becoming-a-validator.md index 291e757a8..ab4402248 100644 --- a/docs/pos/get-started/becoming-a-validator.md +++ b/docs/pos/get-started/becoming-a-validator.md @@ -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 diff --git a/docs/pos/how-to/choose-node-type.md b/docs/pos/how-to/choose-node-type.md deleted file mode 100644 index 4bccc8c7b..000000000 --- a/docs/pos/how-to/choose-node-type.md +++ /dev/null @@ -1,14 +0,0 @@ -Depending on the extent to which you're looking to participate in different network processes, and the kind of computational and network capabilities you can offer, you can choose to deploy any of the following nodes: - -!!! tip "Different minimum and recommended system requirements" - - It's always a good idea to first read and understand the *minimum* and *recommended* system requirements for any node that you choose to deploy to the PoS network. - -| Validator node | Full node | Access node | Archive node | -| :--------------------------------------------------------: | :---------------------------------------------------------: | :------------------------: | :----------: | -| [Prerequisites](validator/prerequisites.md) *(Read me!)* | [Requirements](full-node/full-node-system-requirements.md) | [Full guide](access-node.md) | [Full guide](erigon-archive-node.md) | -| [Binaries](validator/validator-binaries.md) | [Binaries](full-node/full-node-binaries.md) | - | - | -| [Ansible](validator/validator-ansible.md) | [Ansible](full-node/full-node-ansible.md) | - | - | -| [Packages](validator/validator-packages.md) | [Packages](full-node/full-node-packages.md) | - | - | -| - | [Docker](full-node/full-node-docker.md) | - | - | -| - | [GCP](full-node/full-node-gcp.md) | - | - | diff --git a/docs/pos/how-to/erigon-archive-node.md b/docs/pos/how-to/erigon-archive-node.md index b512c3a6c..4ecfd009a 100644 --- a/docs/pos/how-to/erigon-archive-node.md +++ b/docs/pos/how-to/erigon-archive-node.md @@ -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 @@ -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 @@ -60,11 +60,11 @@ If you are not using local **heimdall**, use `-bor.heimdall=` erigon --chain=amoy --bor.heimdall= --datadir= ``` -!!! 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 diff --git a/docs/pos/how-to/full-node/full-node-ansible.md b/docs/pos/how-to/full-node/full-node-ansible.md index 30fab315c..0553f66f7 100644 --- a/docs/pos/how-to/full-node/full-node-ansible.md +++ b/docs/pos/how-to/full-node/full-node-ansible.md @@ -2,7 +2,7 @@ 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 @@ -10,28 +10,10 @@ An [Ansible playbook](https://docs.ansible.com/ansible/latest/user_guide/playboo - 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. @@ -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 @@ -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. +``` \ No newline at end of file diff --git a/docs/pos/how-to/full-node/full-node-binaries.md b/docs/pos/how-to/full-node/full-node-binaries.md index ae7e5a346..2b269bdbc 100644 --- a/docs/pos/how-to/full-node/full-node-binaries.md +++ b/docs/pos/how-to/full-node/full-node-binaries.md @@ -2,7 +2,7 @@ comments: true --- -This deployment guide walks you through starting and running a full node through various methods. For the system requirements, see the [minimum technical requirements](../validator/validator-system-requirements.md) guide. +This deployment guide walks you through starting and running a full node through various methods. For the system requirements, see the [minimum technical requirements](../prerequisites.md) guide. !!! tip "Snapshots" @@ -17,7 +17,7 @@ This deployment guide walks you through starting and running a full node through !!! warning - It's crucial to follow the outlined sequence of actions precisely; deviating from it may result in encountering issues. + It is essential to follow the outlined sequence of actions precisely, as any deviation may lead to potential issues. - Prepare the machine. - Install Heimdall and Bor binaries on the full node machine. @@ -29,7 +29,7 @@ This deployment guide walks you through starting and running a full node through ### Install `build-essential` -This is **required** for your full node. In order to install, run the below command: +This is *required* for your full node. In order to install, run the below command: ```bash sudo apt-get update @@ -44,22 +44,7 @@ Both binaries must be installed and run in the correct order to function properl ### Heimdall -Install the latest version of Heimdall and related services. Make sure you checkout to the correct [release version](https://github.com/maticnetwork/heimdall/releases). Note that the latest version, [Heimdall v1.0.5](https://github.com/maticnetwork/heimdall/releases/tag/v1.0.5), contains enhancements such as: - -1. Restricting data size in state sync txs to: - * *30Kb* when represented in `bytes` - * *60Kb* when represented as `string` - -2. Increasing the `delay time` between the contract events of different validators to ensure that the mempool doesn't get filled very quickly in case of a burst of events which can hamper the progress of the chain. - -The following example shows how the data size is restricted: - -``` -Data - "abcd1234" -Length in string format - 8 -Hex Byte representation - [171 205 18 52] -Length in byte format - 4 -``` +Install the latest version of Heimdall and related services. Make sure you checkout to the correct [release version](https://github.com/maticnetwork/heimdall/releases). To install *Heimdall*, run the following commands: @@ -73,7 +58,7 @@ You can run the above command with following options: - `network_type`: `mainnet` and `amoy` - `node_type`: `sentry` -That will install the `heimdalld` and `heimdallcli` binaries. Verify the installation by checking the Heimdall version on your machine: +This will install the `heimdalld` and `heimdallcli` binaries. Verify the installation by checking the Heimdall version on your machine: ```bash heimdalld version --long @@ -88,9 +73,9 @@ chown heimdall /var/lib/heimdall ### Configure Heimdall seeds (Amoy) -The Heimdall seeds don't need to be configured manually for Amoy testnet since they've already been included at genesis. +The Heimdall and Bor seeds don't need to be configured manually for Amoy testnet since they've already been included at genesis. -### Bor install +### Bor Install the latest version of Bor, based on valid v1.0+ [released version](https://github.com/maticnetwork/bor/releases). @@ -119,7 +104,7 @@ chown bor /var/lib/bor ### Configure Bor seeds (Amoy) -The Bor seeds don't need to be configured manually for Amoy testnet since they've already been included at genesis. +The Heimdall and Bor seeds don't need to be configured manually for Amoy testnet since they've already been included at genesis. ### Update service config user permission @@ -160,20 +145,8 @@ Logs can be managed by the `journalctl` linux tool. Here is a tutorial for advan journalctl -u heimdalld.service -f ``` -### Check Heimdall REST-server logs - -```bash -journalctl -u heimdalld-rest-server.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. +``` \ No newline at end of file diff --git a/docs/pos/how-to/full-node/full-node-docker.md b/docs/pos/how-to/full-node/full-node-docker.md index a6571e479..16440631b 100644 --- a/docs/pos/how-to/full-node/full-node-docker.md +++ b/docs/pos/how-to/full-node/full-node-docker.md @@ -4,33 +4,17 @@ comments: true The Polygon team distributes official Docker images which can be used to run nodes on the Polygon PoS mainnet. These instructions are for running a full Node, but they can be adapted for running sentry nodes and validators as well. -## Prerequisites - -The general configuration for running a Polygon full node is to have *at least* 4 CPUs/cores and 16 GB of RAM. For this walkthrough, we’re going to be using AWS and a *t3.2xlarge* instance type. The application can run on both x86 and ARM architectures. - -These instructions are based on Docker, so it should be easy to follow along with almost any operating system, but we’re using Ubuntu. - -In terms of space, for a full node you’ll probably need from *2.5 to 5 terabytes of SSD (or faster) storage*. - -The peer exchange for a Polygon full node generally depends on port `30303` and `26656` being open. When you configure your firewall or security groups for AWS, make sure these ports are open along with whatever ports you need to access the machine. - -TLDR: - -- Use a machine with at least 4 cores and 16GB RAM -- Make sure you have from 2.5 TB to 5 TB of fast storage -- Use a public IP and open ports `30303` and `26656` - ## Initial setup -At this point, you should have shell access with root privileges to a linux machine. +To get started, you'll need to have shell access with root privileges to a linux machine. ![img](../../../img/pos/term-access.png) ### Install Docker -Most likely your operating system won’t have Docker installed by default. Please follow the instructions for your particular distribution found here: https://docs.docker.com/engine/install/ +It is likely that your operating system won’t have Docker installed by default. Please follow the instructions for your particular distribution found here: https://docs.docker.com/engine/install/ -We’re following the instructions for Ubuntu. The steps are included below, but please see the official instructions in case they’ve been updated. +We’re following the instructions for Ubuntu. The steps are included below, but please refer to the official instructions in case they’ve been updated. ``` bash sudo apt-get update @@ -44,7 +28,7 @@ sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin ``` -At this point you should have Docker installed. In order to verify, you should be able to run a command like this: +At this point you should have Docker installed. In order to verify, you should be able to run the following command successfully: ``` bash sudo docker run hello-world @@ -59,11 +43,11 @@ sudo groupadd docker sudo usermod -aG docker $USER ``` -Now you should be able to logout and log back in and run docker commands without `sudo`. +Now you should be able to logout and log back in, and run docker commands without `sudo`. ### Disk setup -The exact steps required here are going to vary a lot based on your needs. Most likely you’ll have a root partition running your operating system on one device. You’ll probably want one or more devices for actually holding the blockchain data. For the rest of the walkthrough, we’re going to have that additional device mounted at `/mnt/data`. +The exact steps required here may vary a lot based on your needs. Most likely you’ll have a root partition running your operating system on one device. You’ll probably want one or more devices for actually holding the blockchain data. For the rest of the walkthrough, we’re going to have that additional device mounted at `/mnt/data`. In this example, we have a device with 4 TB of available space located at `/dev/nvme1n1`. We are going to mount that using the steps below: @@ -76,7 +60,7 @@ We use `df -h` to make sure the mount looks good. ![img](../../../img/pos/space.png) -If that all looks good, we might as well create the home directories on this mount for Bor and Heimdall. +Once we've verified that successfully, we might as well create the home directories on this mount for Bor and Heimdall. ```bash sudo mkdir /mnt/data/bor @@ -133,7 +117,7 @@ Let’s break this command down a bit in case anything goes wrong. * The argument `--entrypoint /usr/bin/heimdalld` is overriding the default entry point for this container. -* The switch `-it` is used to run the command interactively. +* The switch `it` is used to run the command interactively. * Finally we’re specifying which image we want to run with `0xpolygon/heimdall:1.0.3`. @@ -169,7 +153,7 @@ seeds="f4f605d60b8ffaaf15240564e58a81103510631c@159.203.9.164:26656,4fb1bc820088 !!! warning - There are two `laddr` inside `config.toml` file. Make sure that you only change the `laddr` parameter under `[rpc]`. + There are two `laddr` parameters inside `config.toml` file. Make sure that you only change the `laddr` parameter under `[rpc]`. Now that your `config.toml` file is all set, you’ll need to make two small changes to your `heimdall-config.toml` file. Use your favorite editor to update these two settings: @@ -181,7 +165,7 @@ eth_rpc_url = "http://localhost:9545" bor_rpc_url = "http://localhost:8545" ``` -The `eth_rpc_url` should be updated to whatever URL you use for Ethereum Mainnet RPC. The `bor_rpc_url` in our case is going to be updated to `http://bor:8545`. After making the edits, our file has these lines: +The `eth_rpc_url` should be updated to whatever URL you use for Ethereum mainnet RPC. The `bor_rpc_url` in our case is going to be updated to `http://bor:8545`. After making the edits, our file has these lines: ``` # RPC endpoint for ethereum chain @@ -191,7 +175,7 @@ eth_rpc_url = "https://eth-mainnet.g.alchemy.com/v2/ydmGjsREDACTED_DONT_USE9t7FS bor_rpc_url = "http://bor:8545" ``` -The default `init` command provides a `genesis.json` but that will not work with Polygon Mainnet or Mumbai. If you’re setting up a mainnet node, you can run this command to download the correct genesis file: +The default `init` command provides a `genesis.json` but that will not work with PoS mainnet or Amoy. If you’re setting up a mainnet node, you can run this command to download the correct genesis file: ```bash sudo curl -o /mnt/data/heimdall/config/genesis.json https://raw.githubusercontent.com/maticnetwork/heimdall/master/builder/files/genesis-mainnet-v1.json @@ -218,7 +202,7 @@ Now we’re going to start Heimdall. Run the following command: docker run -p 26657:26657 -p 26656:26656 -v /mnt/data/heimdall:/heimdall-home:rw --net polygon --name heimdall --entrypoint /usr/bin/heimdalld -d --restart unless-stopped 0xpolygon/heimdall:1.0.3 start --home=/heimdall-home ``` -Many of the pieces of this command will look familiar. So let’s talk about what’s new. +Many of the options in this command will look familiar. So let’s talk about what’s new. * The `-p 26657:26657` and `-p 26656:26656` switches are port mappings. This will instruct docker to map the host port `26657` to the container port `26657` and the same for `26656`. @@ -313,13 +297,13 @@ In this initial setup phase, it’s important to pay attention to the `sync_info At this point, you should have a node that’s successfully running Heimdall. You should be ready now to run Bor. -Before we get started with Bor, we need to run the Heimdall rest server. This command will start a REST API that Bor uses to retrieve information from Heimdall. The command to start server is: +Before we get started with Bor, we need to run the Heimdall rest server. This command will start a REST API that Bor uses to retrieve information from Heimdall. The command to start the server is: ```bash docker run -p 1317:1317 -v /mnt/data/heimdall:/heimdall-home:rw --net polygon --name heimdallrest --entrypoint /usr/bin/heimdalld -d --restart unless-stopped 0xpolygon/heimdall:1.0.3 rest-server --home=/heimdall-home --node "tcp://heimdall:26657" ``` -There are two pieces of this command that are different and worth noting. Rather than running the `start` command, we’re running the `rest-server` command. Also, we’re passing `~–node “tcp://heimdall:26657”~` which tells the rest server how to communicate with Heimdall. +There are two options used in this command that are different and worth noting. Rather than running the `start` command, we’re running the `rest-server` command. Also, we’re passing `~–node “tcp://heimdall:26657”~` which tells the rest server how to communicate with Heimdall. If this command runs successfully, when you run `docker ps`, you should see two commands containers running now. Additionally, if you run this command you should see some basic output: @@ -348,7 +332,7 @@ Now we need to create a default config file for starting Bor. docker run -it 0xpolygon/bor:1.1.0 dumpconfig | sudo tee /mnt/data/bor/config.toml ``` -This command is going to generate a .toml file with default settings. We’re going to make a few changes to the file, so open it up with your favorite editor and make a few updates. Note: we’re only showing the lines that are changed. +This command is going to generate a `.toml` file with default settings. We’re going to make a few changes to the file, so open it up with your favorite editor and make a few updates. Note: we’re only showing the lines that are changed. For reference, you can see the details for the Bor image here: [https://hub.docker.com/repository/docker/0xpolygon/bor](https://hub.docker.com/repository/docker/0xpolygon/bor) @@ -376,6 +360,7 @@ datadir = "/bor-home" ``` At this point, we should be ready to start Bor. We’re going to use this command: + ``` bash docker run -p 30303:30303 -p 8545:8545 -v /mnt/data/bor:/bor-home:rw --net polygon --name bor -d --restart unless-stopped 0xpolygon/bor:1.1.0 server --config /bor-home/config.toml ``` @@ -420,7 +405,7 @@ If everything goes well, you should see log entries that look like this: 2022-12-14T19:53:52.450356966Z INFO [12-14|19:53:52.450] Fetching state updates from Heimdall fromID=4 to=2020-05-31T00:11:58Z ``` -There are a few ways to check the sync state of Bor. The simplest is with `curl`: +There are a few ways to check the sync state of Bor. The simplest is using `curl`: ```bash curl 'localhost:8545/' \ @@ -433,7 +418,7 @@ curl 'localhost:8545/' \ }' ``` -When you run this command, it will give you a result like: +When you run this command, you'll see an output like this: ```json { @@ -463,25 +448,23 @@ This will indicate the `currentBlock` that’s been synced and also the `highest ## Seed nodes and bootnodes -!!! tip "Amoy testnet seeds" +!!! info "Amoy testnet seeds" The Bor and Heimdall seeds don't need to be configured manually for Amoy testnet since they've already been included at genesis. -- Heimdall seed nodes: - - ```bash - moniker= +### Heimdall seed nodes - # Mainnet: - seeds="1500161dd491b67fb1ac81868952be49e2509c9f@52.78.36.216:26656,dd4a3f1750af5765266231b9d8ac764599921736@3.36.224.80:26656,8ea4f592ad6cc38d7532aff418d1fb97052463af@34.240.245.39:26656,e772e1fb8c3492a9570a377a5eafdb1dc53cd778@54.194.245.5:26656,6726b826df45ac8e9afb4bdb2469c7771bd797f1@52.209.21.164:26656" - ``` +```bash +# Mainnet: +seeds = "1500161dd491b67fb1ac81868952be49e2509c9f@52.78.36.216:26656,dd4a3f1750af5765266231b9d8ac764599921736@3.36.224.80:26656,8ea4f592ad6cc38d7532aff418d1fb97052463af@34.240.245.39:26656,e772e1fb8c3492a9570a377a5eafdb1dc53cd778@54.194.245.5:26656,6726b826df45ac8e9afb4bdb2469c7771bd797f1@52.209.21.164:26656" +``` !!! tip The following Heimdall seed can also be used for mainnet: `8542cd7e6bf9d260fef543bc49e59be5a3fa9074@seed.publicnode.com:27656` -- Bootnodes: +### Bootnodes - ```bash - # Mainnet: - bootnode ["enode://b8f1cc9c5d4403703fbf377116469667d2b1823c0daf16b7250aa576bacf399e42c3930ccfcb02c5df6879565a2b8931335565f0e8d3f8e72385ecf4a4bf160a@3.36.224.80:30303", "enode://8729e0c825f3d9cad382555f3e46dcff21af323e89025a0e6312df541f4a9e73abfa562d64906f5e59c51fe6f0501b3e61b07979606c56329c020ed739910759@54.194.245.5:30303"] - ``` +```bash +# Mainnet: +bootnodes = ["enode://b8f1cc9c5d4403703fbf377116469667d2b1823c0daf16b7250aa576bacf399e42c3930ccfcb02c5df6879565a2b8931335565f0e8d3f8e72385ecf4a4bf160a@3.36.224.80:30303", "enode://8729e0c825f3d9cad382555f3e46dcff21af323e89025a0e6312df541f4a9e73abfa562d64906f5e59c51fe6f0501b3e61b07979606c56329c020ed739910759@54.194.245.5:30303"] +``` diff --git a/docs/pos/how-to/full-node/full-node-gcp.md b/docs/pos/how-to/full-node/full-node-gcp.md index da94118d9..1a29b9c28 100644 --- a/docs/pos/how-to/full-node/full-node-gcp.md +++ b/docs/pos/how-to/full-node/full-node-gcp.md @@ -2,39 +2,40 @@ comments: true --- -!!! warning "Mumbai testnet deprecated" - - Mumbai testnet is deprecated and will not receive any future updates. GCP support for deploying Amoy testnet nodes will be ready soon. Stay tuned! - -This document describes how to deploy Polygon PoS nodes into a Virtual Machine instance on the Google Cloud Platform (GCP). +This document describes how to deploy Polygon PoS nodes in a virtual machine (VM) instance on the Google Cloud Platform (GCP). It is recommended to use any modern Debian or Linux Ubuntu OS with long-term support, i.e. Debian 11, Ubuntu 20.04. We'll focus on Ubuntu 20.04 in this guide. -## Deploy VM Instance +!!! info + + This setup is currently only supported for mainnet. GCP support for deploying Amoy testnet nodes will be available soon. + +## Deploy VM instance You may use any of the following ways to create an instance in Google Cloud: 1. Google Cloud CLI, local or [Cloud Shell](https://cloud.google.com/shell) 2. Web Console -We'll only cover the first case in this manual. Let's start with deployment using Google Cloud CLI. +We only cover the first case in this guide. Let's start with deployment using Google Cloud CLI. 1. Follow ["Before you begin" section](https://cloud.google.com/compute/docs/instances/create-start-instance#before-you-begin) to install and configure gcloud command-line tool. Pay attention to default region and zone, choose ones closer to you or your customers. You may use [gcping.com](https://gcping.com) to measure latency to choose the closest location. -2. Adjust the following command variables using your favorite editor prior executing, when required - * `POLYGON_NETWORK` - choose `mainnet` or `mumbai` testnet network to run - * `POLYGON_NODETYPE` - choose `archive`,`fullnode` node type to run - * `POLYGON_BOOTSTRAP_MODE` - choose bootstrap mode `snapshot` or `from_scratch` - * `POLYGON_RPC_PORT` - choose JSON RPC bor node port to listen on, the default value is what used on VM instance creation and in firewall rules - * `EXTRA_VAR` - choose Bor and Heimdall branches, use `network_version=mainnet-v1` with `mainnet` network and `network_version=testnet-v4` with `amoy` network - * `INSTANCE_NAME` - the name of a VM instance with Polygon we are going to create - * `INSTANCE_TYPE` - GCP [machine type](https://cloud.google.com/compute/docs/machine-types), default value is recommended, You may change it later if required - * `BOR_EXT_DISK_SIZE` - additional disk size in GB to use with Bor, default value with `fullnode` is recommended, You may expand it later if required. You'll need 8192GB+ with `archive` node though - * `HEIMDALL_EXT_DISK_SIZE` - additional disk size in GB to use with Heimdall, default value is recommended - * `DISK_TYPE` - GCP [disk type](https://cloud.google.com/compute/docs/disks#disk-types), SSD is highly recommended. You may need to increase the total SSD GB quota in the region you are spinning up the node. - -3. Use the following command to create an instance with correct hardware and software requirements. In the example below, we deploy Polygon `mainnet` from `snapshot` in the `fullnode` mode: +2. Adjust the following command variables using your favorite editor prior to executing, when required: + + * `POLYGON_NETWORK` - choose `mainnet` network to run. + * `POLYGON_NODETYPE` - choose `archive`,`fullnode` node type to run. + * `POLYGON_BOOTSTRAP_MODE` - choose bootstrap mode `snapshot` or `from_scratch`. + * `POLYGON_RPC_PORT` - choose JSON RPC bor node port to listen on, the default value is what used on VM instance creation and in firewall rules. + * `EXTRA_VAR` - choose Bor and Heimdall branches, use `network_version=mainnet-v1` with `mainnet` network and `network_version=testnet-v4` with `amoy` network. + * `INSTANCE_NAME` - the name of a VM instance with Polygon we are going to create. + * `INSTANCE_TYPE` - GCP [machine type](https://cloud.google.com/compute/docs/machine-types), default value is recommended, You may change it later if required. + * `BOR_EXT_DISK_SIZE` - additional disk size in GB to use with Bor, default value with `fullnode` is recommended, You may expand it later if required. You'll need 8192GB+ with `archive` node though. + * `HEIMDALL_EXT_DISK_SIZE` - additional disk size in GB to use with Heimdall, default value is recommended. + * `DISK_TYPE` - GCP [disk type](https://cloud.google.com/compute/docs/disks#disk-types), SSD is highly recommended. You may need to increase the total SSD GB quota in the region you are spinning up the node. + +3. Use the following command to create an instance with the correct hardware and software requirements. In the example below, we deploy Polygon PoS `mainnet` from `snapshot` in the `fullnode` mode: ```bash export POLYGON_NETWORK=mainnet export POLYGON_NODETYPE=fullnode @@ -69,7 +70,7 @@ The instance should be created and live in a couple of minutes. ## Login to VM -It will take a couple of minutes to install all the required software and a couple of hours to download a snapshot when chosen. +It will take a couple of minutes to install all the required software, and a couple of hours to download a snapshot when chosen. - You should see working `bor` and `heimdalld` processes filling up additional drives. You may run the following commands to check it. @@ -99,11 +100,11 @@ It will take a couple of minutes to install all the required software and a coup journalctl -fu heimdalld ``` -!!! note +!!! info Blockchain data is saved onto additional drives which are kept by default on VM instance removal. You need to remove additional disks manually if you don't need this data anymore. -At the end, you will get an instance as shown in the below diagram. +At the end, you will get an instance as shown in the diagram below. -![Figure: Mainnet - Polygon instance](../../../img/pos/polygon-instance.svg) +![Figure: Mainnet - Polygon instance](../../../img/pos/polygon-instance.png) diff --git a/docs/pos/how-to/full-node/full-node-packages.md b/docs/pos/how-to/full-node/full-node-packages.md index 39ee7c6d9..e03edb1ad 100644 --- a/docs/pos/how-to/full-node/full-node-packages.md +++ b/docs/pos/how-to/full-node/full-node-packages.md @@ -8,67 +8,53 @@ comments: true - Install Heimdall and Bor packages on the Full Node machine. - Configure the Full node. - Start the Full node. -- Check node health with the community. -!!!note - You have to follow the exact outlined sequence of actions, otherwise you will run into issues. +!!! warning + + It is essential to follow the outlined sequence of actions precisely, as any deviation may lead to potential issues. ## Install packages -#### Prerequisites +### Prerequisites - One machine is needed. - Bash is installed on the machine. -#### Heimdall +### Heimdall - Install the default latest version of sentry for Mainnet: ```shell - curl -L https://raw.githubusercontent.com/maticnetwork/install/main/heimdall.sh | bash + curl -L https://raw.githubusercontent.com/maticnetwork/install/main/heimdall.sh | bash -s -- ``` or install a specific version, node type (`sentry` or `validator`), and network (`mainnet` or `amoy`). All release versions can be found on [Heimdall GitHub repository](https://github.com/maticnetwork/heimdall/releases). ```shell - curl -L https://raw.githubusercontent.com/maticnetwork/install/main/heimdall.sh | bash -s -- # Example: - # curl -L https://raw.githubusercontent.com/maticnetwork/install/main/heimdall.sh | bash -s -- v1.0.3 mainnet sentry + # curl -L https://raw.githubusercontent.com/maticnetwork/install/main/heimdall.sh | bash -s -- v1.0.7 mainnet sentry ``` -#### Bor +### Bor - Install the default latest version of sentry for Mainnet: ```shell - curl -L https://raw.githubusercontent.com/maticnetwork/install/main/bor.sh | bash + curl -L https://raw.githubusercontent.com/maticnetwork/install/main/heimdall.sh | bash -s -- ``` or install a specific version, node type (`sentry` or `validator`), and network (`mainnet` or `amoy`). All release versions could be found on [Bor Github repository](https://github.com/maticnetwork/bor/releases). ```shell - curl -L https://raw.githubusercontent.com/maticnetwork/install/main/bor.sh | bash -s -- - # Example: - # curl -L https://raw.githubusercontent.com/maticnetwork/install/main/bor.sh | bash -s -- v1.1.0 - - - mainnet sentry + # curl -L https://raw.githubusercontent.com/maticnetwork/install/main/bor.sh | bash -s -- v1.3.7 mainnet sentry ``` - ## Configuration -In this section, we will go through steps to initialize and customize configurations nodes. - -!!! warning - - Bor and Heimdall 0.3.0 use standardized paths for configuration files and chain data. If you have existing config files and chain data on your node, please skip the [Configure Heimdall](#configure-heimdall) section below and jump directly to **[Migration](#install-packages) section** to learn about migrating configs and data to standardized file locations. - - ### Configure Heimdall - Initialize Heimdall configs @@ -94,17 +80,16 @@ sudo -u heimdall heimdalld init --chain=amoy --home /var/lib/heimdall Make sure you keep the proper formatting when you make the changes above. -### Configure service files for bor and heimdall +### Configure service files for Bor and Heimdall -After successfully installing Bor and Heimdall through [packages](#install-packages), their service file could be found under `/lib/systemd/system`, and Bor's config -file could be found under `/var/lib/bor/config.toml`. +After successfully installing Bor and Heimdall through [packages](#install-packages), their service file could be found under `/lib/systemd/system`, and Bor's config file could be found under `/var/lib/bor/config.toml`. You will need to check and modify these files accordingly. - Make sure the chain is set correctly in `/lib/systemd/system/heimdalld.service` file. Open the file with following command `sudo vi /lib/systemd/system/heimdalld.service` - In the service file, set `--chain` to `mainnet` or `amoy` accordingly - Save the changes in `/lib/systemd/system/heimdalld.service`. +Save the changes in `/lib/systemd/system/heimdalld.service`. - Make sure the chain is set correctly in `/var/lib/bor/config.toml` file. Open the file with following command `sudo vi /var/lib/bor/config.toml` @@ -112,7 +97,7 @@ You will need to check and modify these files accordingly. - To enable Archive mode you can optionally enable the following flags: - ``` + ```js gcmode "archive" [jsonrpc] @@ -122,7 +107,7 @@ You will need to check and modify these files accordingly. corsdomain = ["*"] ``` - Save the changes in `/var/lib/bor/config.toml`. +Save the changes in `/var/lib/bor/config.toml`. ## Start services @@ -139,25 +124,27 @@ Start Heimdall, Heimdall rest server, and Heimdall bridge. sudo service heimdalld start ``` -You can also check Heimdall logs with command +You can also check Heimdall logs with the following command: ```shell journalctl -u heimdalld.service -f ``` -Now you need to make sure that **Heimdall is synced** completely and only then Start Bor. If you start Bor without Heimdall syncing completely, you will run into issues frequently. +!!! warning + At this point, please make sure that *Heimdall is synced completely*, and only then start Bor. If you start Bor without Heimdall syncing completely, you will run into issues frequently. + +To check if Heimdall is synced: -- To check if Heimdall is synced - - On the remote machine/VM, run `curl localhost:26657/status` - - In the output, `catching_up` value should be `false` +- On the remote machine/VM, run `curl localhost:26657/status` +- In the output, `catching_up` value should be `false` -Now once Heimdall is synced, run +Now, once Heimdall is synced, run: ```shell sudo service bor start ``` -You can check Bor logs via command +You can check Bor logs using the following command: ```shell journalctl -u bor.service -f diff --git a/docs/pos/how-to/full-node/full-node-system-requirements.md b/docs/pos/how-to/full-node/full-node-system-requirements.md deleted file mode 100644 index bda8d62b6..000000000 --- a/docs/pos/how-to/full-node/full-node-system-requirements.md +++ /dev/null @@ -1,19 +0,0 @@ -# System requirements - -The general configuration for running a Polygon full node is to have *at least* 4 CPUs/cores and 16 GB of RAM. - -In terms of space, for a full node you’ll need from *2.5 to 5 terabytes of SSD (or faster) storage*. - -# Available ports - -The peer exchange for a Polygon full node generally depends on port `30303` and `26656` being open. When you configure your firewall or security groups for AWS, make sure these ports are open along with whatever ports you need to access the machine. - -# TL;DR - -| | Minimum | Recommended | -| :----------: | :--------: | :---------: | -| CPU | 4 cores | 16 cores | -| RAM | 32GB | 64GB | -| Storage | 2.5TB | 5TB | -| Bandwidth | 100 Mbps+ | 1 Gbps | -| AWS instance | c5.4xlarge | m5d.4xlarge | \ No newline at end of file diff --git a/docs/pos/how-to/operate-validator-node/change-signer-address.md b/docs/pos/how-to/operate-validator-node/change-signer-address.md index 177680f84..656c6df49 100644 --- a/docs/pos/how-to/operate-validator-node/change-signer-address.md +++ b/docs/pos/how-to/operate-validator-node/change-signer-address.md @@ -1,18 +1,47 @@ -For more information on what a signer address is, see -[Key Management](../../architecture/heimdall/key-management.md). +This guide will walk you through the process of changing the owner and signer address for your validator node. -## Prerequisites +## Change the owner address -Make sure your new validator node is fully synced and is running with the new signer address. +1. Access StakingNFT smart contract. + + - Mainnet: https://etherscan.io/address/0x47Cbe25BbDB40a774cC37E1dA92d10C2C7Ec897F#writeContract + - Amoy: https://sepolia.etherscan.io/address/0x72CF5618142Eb369E75ec6529A907e9A6Fe99bB7#writeContract + +2. Click on the **Connect to Web3** button and login using the owner address of your validator node. + +
+ ![change-owner-1](../../../img/pos/change-owner-1.png){width=30%} +
+ +3. You will see a list of functions appear. Click on **`safeTransferFrom`** function. This will be 5th function in the list. There will be 3 data fields that you will need to add information. + +
+ ![change-owner-2](../../../img/pos/change-owner-2.png) +
+ +4. Here: + + - **from (address)** is your current owner address + - **to (address**) is your new owner Address + - **tokenId** is your validator ID + +5. Fill in the relevant information and select **Write**. You will be prompted to sign a transaction. Ensure that you have sufficient ETH to make the transaction. + +6. Upon signing the transaction your validator NFT will be transferred to the new owner address. + +7. Log in to the [staking dashboard](https://staking.polygon.technology/) with the new owner address to verify the changes. ## Change the signer address This guide refers to your current validator node as Node 1 and your new validator node as Node 2. 1. Log in to the [staking dashboard](https://staking.polygon.technology/) with the Node 1 address. + 2. On your profile, select **Edit Profile**. + 3. In the **Signer's address** field, enter the Node 2 address. + 4. In the **Signer's public key** field, enter the Node 2 public key. To get the public key, run the following command on the validator node: diff --git a/docs/pos/how-to/operate-validator-node/next-steps.md b/docs/pos/how-to/operate-validator-node/next-steps.md new file mode 100644 index 000000000..d99de2d34 --- /dev/null +++ b/docs/pos/how-to/operate-validator-node/next-steps.md @@ -0,0 +1,162 @@ + +!!! info "Limited spots for new validators" + + There is limited space for accepting new validators. New validators can only join the active set when an already active validator unbonds. Check out the following links for more information and to apply for a validator slot: + + - [Admission form](https://polygoncommunity.typeform.com/validatorshub?typeform) + - [Admission dashboard](https://play.validatrium.club/public-dashboards/1b29d3bbdcd14007a0858b68dee76bdd?orgId=1) + +Once your validator node is onboarded into the active set, do the following: + +- Log in to the [staking dashboard](https://staking.polygon.technology/) with the owner address. +- Go to my account, and click on edit details below the validator name. +- Click on Profile Details and update your **name**, **website**, **description**, **logo URL**, and click on **Save Profile Details**. + +## Stake tokens + +### Initial staking + +1. Access the [validator dashboard](https://staking.polygon.technology/validators/). +2. Log in with your wallet. You can use a popular wallet such as MetaMask. Make sure you login using the owner address, and that you have POL tokens in the wallet. +3. Select **Become a Validator**. You will be asked to set up your node. If you haven't already set up your node by now, you will need to do so, else if you proceed ahead you will receive an error when you attempt to stake. +4. On the next screen, add your validator details, the commission rate, and the staking amount. +5. Select **Stake Now**. +6. Now, you'll be prompted for three confirmations to send the transaction. Once complete, your POL tokens will be added to the staked amount on the validator node. The three confirmations include: + - Approve Transaction: This approves your stake transaction. + - Stake: Confirms your stake transaction. + - Save: Saves your validator details. + +!!! info + + For the changes to take effect on the [staking dashboard](https://staking.polygon.technology/account), it requires a *minimum of 12 block confirmations*. + + +### Add stake + +1. Access the [validator dashboard](https://staking.polygon.technology/validators/). +2. Log in with your wallet. You can use a popular wallet such as MetaMask. Make sure you login using the owner address, and that you have POL tokens in the wallet. +3. Select **Add more Stake**. +4. Enter the amount, and select **Add More Stake**. +5. Now, you'll be prompted for three confirmations to send the transaction. Once complete, your POL tokens will be added to your staked amount on the validator node. The three confirmations include: + - Approve Transaction: This approves your stake transaction. + - Stake: Confirms your stake transaction. + - Save: Saves your validator details. + +!!! info + + For the changes to take effect on the [staking dashboard](https://staking.polygon.technology/account), it requires a *minimum of 12 block confirmations*. + +## Set commission rate + +You can set up and change your commission as a validator. + +A validator is entitled to charge any commission rate. The minimum commission would be 0% and the maximum commission would be 100% of the rewards earned. + +You set up the commission rate as part of your initial [validator staking process](#initial-staking). + +## Changing your commission rate + +You are allowed to freely adjust the commission rate as and when necessary. + +As a validator, it is one of your responsibilities to inform the community on commission changes. See [Validator Responsibilities](../../get-started/becoming-a-validator.md#validator-responsibilities). + +Follow the steps below to change your commission rate: + +1. With your owner address, login to the [staking dashboard](https://staking.polygon.technology/). +2. On your profile, select **Edit Profile**. +3. In the **Commission** field, enter your new commission rate. + +Once you have confirmed and signed the transaction your commission rate will be set. + +Note that once the commission is updated, there is a cool down period of *80 checkpoints*. + +## Claim validator rewards + +Once you are set up and staked as a validator, you will earn rewards for performing validator duties. When you perform validator duties dutifully, you get rewarded. + +To claim rewards you can go to your [validator dashboard](https://staking.polygon.technology/account). + +You will see two buttons on your profile: + +- **Withdraw Reward** +- **Restake Reward** + +### Withdraw Reward + +As a validator, you earn rewards as long as you are performing your validator duties correctly. + +Selecting **Withdraw Reward** will get your rewards back to your wallet. + +The dashboard will update after *12 block confirmations*. + +### Restake Reward + +Restaking your rewards is an easy way to increase your stake as a validator. + +Selecting **Restake Reward** will restake your reward and increase your stake. + +The dashboard will update after *12 block confirmations*. + +## Common operations + +You can use the following commands to check if your validator node is set up correctly. + +### Check validator account + +Run the following command *on your validator node* to check if the account is set up correctly: + +```sh +heimdalld show-account +``` + +The output should appear in the following format: + +```json +{ + "address": "0x6c468CF8c9879006E22EC4029696E005C2319C9D", + "pub_key": "0x04b12d8b2f6e3d45a7ace12c4b2158f79b95e4c28ebe5ad54c439be9431d7fc9dc1164210bf6a5c3b8523528b931e772c86a307e8cff4b725e6b4a77d21417bf19" +} +``` + +This will display your address and public key for your validator node. Note that *this address must match with your signer address on Ethereum*. + +### Show private key + +Run the following command *on your validator node* to check if the private key configured correctly: + +```sh +heimdalld show-privatekey +``` + +The output should appear in the following format: + +```json +{ + "priv_key": "0x********************************************************" +} +``` + +### Check the balance + +To check the balance of your address, run the following command: + +```sh +heimdallcli query auth account SIGNER_ADDRESS --chain-id CHAIN_ID +``` + +where, + +* `SIGNER_ADDRESS`: Your signer address. +* `CHAIN_ID`: The Polygon mainnet chain ID with the client prefix: `heimdall-137`. + +The following output should appear: + +```json +address: 0x6c468cf8c9879006e22ec4029696e005c2319c9d +coins: +- denom: pol +amount: + i: "1000000000000000000000" +accountnumber: 0 +sequence: 0 +``` \ No newline at end of file diff --git a/docs/pos/how-to/operate-validator-node/validator-commission-operations.md b/docs/pos/how-to/operate-validator-node/validator-commission-operations.md deleted file mode 100644 index f664a2f17..000000000 --- a/docs/pos/how-to/operate-validator-node/validator-commission-operations.md +++ /dev/null @@ -1,24 +0,0 @@ - -You can set up and change your commission as a validator. - -A validator is entitled to charge any commission rate. The minimum commission would be 0% and the maximum commission would be 100% of the rewards earned. - -You are allowed to change the commission rates as many times as you would like. - -As a validator, it is one of your responsibilities to inform the community on commission changes. See [Validator Responsibilities](../../get-started/becoming-a-validator.md#validator-responsibilities). - -## Set up your commission rate as a validator - -You set up the commission rate as part of your initial validator staking process. See [Validator Staking Operations](validator-staking-operations.md). - -## Change your commission rate - -You can change your commission rate. - -1. With your owner address, login to the [staking dashboard](https://staking.polygon.technology/). -1. On your profile, select **Edit Profile**. -1. In the **Commission** field, enter your new commission rate. - -Once you have confirmed and signed the transaction your commission rate will be set. - -Once the commission is updated, there is a cool down period of *80 checkpoints*. diff --git a/docs/pos/how-to/operate-validator-node/validator-staking-operations.md b/docs/pos/how-to/operate-validator-node/validator-staking-operations.md deleted file mode 100644 index 70814c9a3..000000000 --- a/docs/pos/how-to/operate-validator-node/validator-staking-operations.md +++ /dev/null @@ -1,121 +0,0 @@ ---- -comments: true ---- - -## Prerequisites - -### Full node setup - -Your validator node fully set up and synced. See also: [Run a Validator Node](../validator/validator-binaries.md) - -### Account setup - -On your validator node, check that the account is set up. To check, run the following command *on the validator node*: - -```sh -heimdalld show-account -``` - -Your output should appear in the following format: - -```json -{ - "address": "0x6c468CF8c9879006E22EC4029696E005C2319C9D", - "pub_key": "0x04b12d8b2f6e3d45a7ace12c4b2158f79b95e4c28ebe5ad54c439be9431d7fc9dc1164210bf6a5c3b8523528b931e772c86a307e8cff4b725e6b4a77d21417bf19" -} -``` - -This will display your address and public key for your validator node. Note that *this address must match with your signer address on Ethereum*. - -### Show private key - -This step is optional. - -On your validator node, check that the private key is correct. To check, run the following command *on the validator node*: - -```sh -heimdalld show-privatekey -``` - -The following output should appear: - -```json -{ - "priv_key": "0x********************************************************" -} -``` - -## Stake on Polygon - -You can stake on Polygon using the [validator dashboard](https://staking.polygon.technology/validators/). - -### Stake using the staking dashboard - -1. Access the [validator dashboard](https://staking.polygon.technology/validators/). -2. Log in with your wallet. MetaMask is the recommended wallet. You have to make sure that you login using the same address where your POL tokens are present. -3. Select **Become a Validator**. You will be asked to set up your node. If you haven't already set up your node by now, you will need to do so, else if you proceed ahead you will receive an error when you attempt to stake. -4. On the next screen, add your validator details, the commission rate, and the staking amount. -5. Select **Stake Now**. - -Once the transaction is completed you will have staked successfully to become a validator. You will be asked thrice to confirm the transaction. - -* Approve Transaction: This will approve your stake transaction. -* Stake:This will confirm your stake transaction. -* Save: This will save your validator details. - -!!! note - - For the changes to take effect on the [staking dashboard](https://staking.polygon.technology/account), it requires a *minimum of 12 block confirmations*. - - -### Check the balance - -To check the balance of your address: - -```sh -heimdallcli query auth account SIGNER_ADDRESS --chain-id CHAIN_ID -``` - -where, - -* `SIGNER_ADDRESS`: Your signer address. -* `CHAIN_ID`: The Polygon mainnet chain ID with the client prefix: `heimdall-137`. - -The following output should appear: - -```json -address: 0x6c468cf8c9879006e22ec4029696e005c2319c9d -coins: -- denom: pol -amount: - i: "1000000000000000000000" -accountnumber: 0 -sequence: 0 -``` - -### Claim rewards as a validator - -Once you are set up and staked as a validator, you will earn rewards for performing validator duties. When you perform validator duties dutifully, you get rewarded. - -To claim rewards you can go to your [validator dashboard](https://staking.polygon.technology/account). - -You will see two buttons on your profile: - -* **Withdraw Reward** -* **Restake Reward** - -#### Withdraw Reward - -As a validator, you earn rewards as long as you are performing your validator duties correctly. - -Selecting **Withdraw Reward** will get your rewards back to your wallet. - -The dashboard will update after *12 block confirmations*. - -#### Restake Reward - -Restaking your rewards is an easy way to increase your stake as a validator. - -Selecting **Restake Reward** will restake your reward and increase your stake. - -The dashboard will update after *12 block confirmations*. diff --git a/docs/pos/how-to/prerequisites.md b/docs/pos/how-to/prerequisites.md new file mode 100644 index 000000000..4d296d5b5 --- /dev/null +++ b/docs/pos/how-to/prerequisites.md @@ -0,0 +1,89 @@ +--- +comments: true +--- + +## Node system requirements + +Please note that all system requirements listed below are presented in a *Minimum/Recommended* format. + +### Mainnet specs + +| Node type | RAM | CPU | Storage | Network bandwidth | +| --------------------- | ----------- | -------------- | ----------------------------------------------------------------------------- | ----------------- | +| Full Node/Sentry Node | 32 GB/64 GB | 8 core/16 core | 4 TB/6 TB | 1 Gbit/s | +| Validator Node | 32 GB/64 GB | 8 core/16 core | 4 TB/6 TB | 1 Gbit/s | +| Archive Node (Erigon) | 64 GB | 16 core | 16 TB(`io1` or above with at least 20k+ iops and RAID-0 based disk structure) | 1 Gbit/s | + + +### Testnet (Amoy) specs + +| Node type | RAM | CPU | Storage | Network bandwidth | +| --------------------- | ---------- | -------------- | ---------------------------------------------------------------------------------- | ----------------- | +| Full Node/Sentry Node | 8 GB/16 GB | 8 core/16 core | 1 TB/2 TB | 1 Gbit/s | +| Validator Node | 8 GB/16 GB | 8 core/16 core | 1 TB/2 TB | 1 Gbit/s | +| Archive Node (Erigon) | 16 GB | 16 core | 1 TB/2 TB (`io1` or above with at least 20k+ iops and RAID-0 based disk structure) | 1 Gbit/s | + +## Downloading the snapshot + +It is recommended that you keep your snapshots handy before setting up the node. Link to the snapshot documentation [here](https://docs.polygon.technology/pos/how-to/snapshots/). + +## Open necessary ports + +### Sentry/full nodes + +| Port | Description | +| :---------------------: | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `26656` | Heimdall service connects your node to another node’s Heimdall service using this port. | +| `30303` | Bor service connects your node to another node’s Bor service using this port. | +| `22` | For the validator to be able to SSH from wherever they are. | +| `26660` | Prometheus port for Tendermint/Heimdall. Not required to be opened to the public. Only allow for the monitoring systems (Prometheus/Datadog). | +| `7071` | Metric port for Bor. Only needs to be opened for the Monitoring system. | +| `8545`, `8546`,  `1317` | Can be opened for Bor HTTP RPC, Bor WS RPC, and Heimdall API respectively; but only if really necessary. | + +### Validator nodes + +| Port | Description | +| :-----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `22` | Opening this to the public is not a good idea as the default SSH port 22 is prone to attacks. It is better to secure it by allowing it only in a closed network (VPN). | +| `30303` | To be opened to only Sentry to which the validator is connected for Bor P2P discovery. | +| `26656` | To be opened to only Sentry to which the validator is connected for Heimdall/Tendermint P2P discovery. | +| `26660` | Prometheus port for Tendermint/Heimdall. Not required to be opened to the public. Only allow for the monitoring systems (Prometheus/Datadog). | +| `7071` | Metric port for Bor. Only needs to be opened for the monitoring system. | + +## Install RabbitMQ + +!!! info "Only for validator nodes" + + This step is only relevant for validator nodes. + +Before setting up your validator node, it’s advisable to install the RabbitMQ service. You can use the following commands to set up RabbitMQ (if it’s not already installed): + +```bash +sudo apt-get update +sudo apt install build-essential +sudo apt install erlang +wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.10.8/rabbitmq-server_3.10.8-1_all.deb +sudo dpkg -i rabbitmq-server_3.10.8-1_all.deb +``` +## Connect to Ethereum RPC endpoint + +!!! info "Only for validator nodes" + + This step is only relevant for validator nodes. + +Validator nodes need to connect to an Ethereum RPC endpoint. You may use your own Ethereum node, or utilize [external infrastructure providers](https://www.alchemy.com/chain-connect/chain/ethereum). + +## Mandatory checklist for validators + +Please follow the below checklist in order to set up your validator node using binaries, Ansible, or packages. + +| Checklist | Binaries | Ansible | Packages | +| ------------------- | ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | +| Machines required | 2 Machines - *sentry* & *validator* | 3 Machines - *local machine*, *sentry* and *validator* | 2 Machines - *sentry* & *validator* | +| Install Go packages | Yes | No | No | +| Install Python | No | Yes (only on the local machine where the Ansible Playbook runs) | No | +| Install Ansible | No | Yes (only on one machine) | No | +| Install Bash | No | No | Yes | +| Run Build Essential | Yes | No | No | +| Node setup | [Using binaries](https://docs.polygon.technology/pos/how-to/validator/validator-binaries/) | [Using Ansible](https://docs.polygon.technology/pos/how-to/validator/validator-ansible/) | [Using packages](https://docs.polygon.technology/pos/how-to/validator/validator-packages/) | + diff --git a/docs/pos/how-to/snapshots.md b/docs/pos/how-to/snapshots.md index 112944a1a..6693a47f9 100644 --- a/docs/pos/how-to/snapshots.md +++ b/docs/pos/how-to/snapshots.md @@ -8,13 +8,13 @@ When setting up a new sentry, validator, or full node server, it is recommended Polygon PoS has transitioned to a community-driven model for snapshots. Active community members now contribute to provide snapshots. Some of these members include: -| Name | Available snapshots | Note | -| ---------------------------------------------------------------------- | --------------------- | -------------------------------------------- | -| Stakecraft | Mainnet, Amoy, Erigon | Support for Erigon archive snapshot | +| Name | Available snapshots | Note | +| --------------------------------------------------------------------- | --------------------- | -------------------------------------------- | +| Stakecraft | Mainnet, Amoy, Erigon | Support for Erigon archive snapshot | | [PublicNode (by Allnodes)*](https://publicnode.com/snapshots#polygon) | Mainnet, Amoy | Support for PBSS + PebbleDB enabled snapshot | -| Stakepool | Mainnet, Amoy | - | -| Vaultstaking | Mainnet | - | -| Girnaar Nodes | Amoy | - | +| Stakepool | Mainnet, Amoy | - | +| Vaultstaking | Mainnet | - | +| Girnaar Nodes | Amoy | - | > *\*The PBSS + PebbleDB snapshot provided by PublicNode is currently in the beta phase.* @@ -78,12 +78,12 @@ sudo service bor start ### Polygon mainnet -| Metric | Calculation Breakdown | Value | -| --------------------------------- | ----------------------------------- | ------- | -| approx. compressed total | 1500 GB (Bor) + 225 GB (Heimdall) | 1725 GB | -| approx. data growth daily | 100 GB (Bor) + 5 GB (Heimdall) | 105 GB | -| approx. total extracted size | 2.1 TB (Bor) + 300 GB (Heimdall) | 2.4 TB | -| suggested disk size (2.5x buffer) | 2.4 TB * 2.5 (natural chain growth) | 6 TB | +| Metric | Calculation Breakdown | Value | +| --------------------------------- | --------------------------------- | ------- | +| approx. compressed total | 3000 GB (Bor) + 500 GB (Heimdall) | 3500 GB | +| approx. data growth daily | 100 GB (Bor) + 5 GB (Heimdall) | 105 GB | +| approx. total extracted size | 4 TB (Bor) + 500 GB (Heimdall) | 4.5 TB | +| suggested disk size (2.5x buffer) | 4 TB * 2 (natural chain growth) | 8 TB | ### Polygon Amoy Erigon archive diff --git a/docs/pos/how-to/troubleshoot/known-issues.md b/docs/pos/how-to/troubleshoot/known-issues.md index 0b2996af7..a29addfe4 100644 --- a/docs/pos/how-to/troubleshoot/known-issues.md +++ b/docs/pos/how-to/troubleshoot/known-issues.md @@ -2,50 +2,55 @@ comments: true --- -### Error: Bad block/Invalid Merkle +This resource is designed to help you efficiently diagnose and resolve common issues encountered while interacting with the Polygon PoS network as a validator. + +## Bor + +### Bor is unable to connect to peers -##### Description +Bor stops importing new blocks, with logs displaying messages similar to the following: + +```js +Aug 19 13:33:35 polygon-mainnet-validator-backup-4 bor[124475]: INFO [08-19|13:33:35.123] Looking for peers peercount=0 tried=0 static=7 +Aug 19 13:33:36 polygon-mainnet-validator-backup-4 bor[124475]: INFO [08-19|13:33:36.916] Whitelisting milestone deferred err="chain out of sync" +Aug 19 13:33:48 polygon-mainnet-validator-backup-4 bor[124475]: INFO [08-19|13:33:48.916] Whitelisting milestone deferred err="chain out of sync" +``` + +##### Solution + +- Increase `maxpeer` count to 200 +- Add the bootnodes under static and trusted nodes +- If this doesn’t resolve the issue, try adding the peers manually using the IPC console + +### Error: Bad block/Invalid Merkle A bad block or invalid Merkle root error occurs when the Heimdall and Bor layers are not in sync. Heimdall, as the consensus layer for Polygon POS chain, directs Bor to create blocks accordingly. A bad block error occurs when the Bor moves ahead to create a block which has not been directed by Heimdall. This causes an invalid hash being created, and hence results in an invalid Merkle root. ##### Solution 1 -Restart the Bor service by using the following command: +Restart the Bor service using the following command: ```bash - sudo service bor restart +sudo service bor restart ``` Typically a restart of the Bor service should resolve the problem, and that's because restarting causes Bor to reconnect with Heimdall, start syncing, and create blocks correctly. -If restarting the Bor service does not fix the problem, then try the next option. +If restarting the Bor service does not fix the problem, try the next option. ##### Solution 2 -Make the following checks. - -- Check if your Heimdall and REST servers are running. - - The Heimdall service might have stopped, and thus causing the bad block issue on Bor. +Make the following checks: +- Check if your Heimdall and REST servers are running. The Heimdall service might have stopped, and thus causing the bad block issue on Bor. - Check the logs for your Heimdall first using the following command: ```bash - journalctl -u heimdalld -f + journalctl -u heimdalld -f ``` - Check if everything is working correctly. - -- Additionally, check your REST server logs using: - - ```bash - journalctl -u heimdalld-rest-server -f - ``` - -- Restart the services not running. - - This should cause Bor to automatically resolve the problem - +- Restart the services that are not running. This should cause Bor to automatically resolve the problem If restarting both the Bor and Heimdall services doesn't solve the problem, it could be that Bor is stuck on a particular block. @@ -55,11 +60,11 @@ Check the bad block in logs for Bor. - Check Bor logs with this command: ```bash - journalctl -u bor -f + journalctl -u bor -f ``` The bad block is typically displayed in the logs as shown in the below figure: -![Figure: Bad block](../../../img/pos/bad_block.png) + ![Figure: Bad block](../../../img/pos/bad_block.png) - Note the bad block number. - Convert the block number to a hexadecimal number. @@ -69,7 +74,7 @@ Check the bad block in logs for Bor. Use this [tool](https://www.rapidtables.com/convert/number/decimal-to-hex.html) to convert the block number to a hexadecimal number. -- Roll back the Blockchain by a few hundred blocks. That is, set Bor at the right block height, with the `debug.setHead()` function. Use the following command: +- Roll back the chain by a few hundred blocks, i.e., set Bor at the right block height using the `debug.setHead()` function. Use the following command: ```bash bor attach ./.bor/data/bor.ipc @@ -78,453 +83,77 @@ bor attach ./.bor/data/bor.ipc The `debug.setHead()` function allows Bor to set the tip at a particular block height, resyncing from a previous block. -A successful output of the above command is a `null`. Once this is achieved, monitoring of the Bor can resume and see if the blochain goes passed the previously bad block number. - -If none of these solutions works for you, please contact the Polygon Support team immediately. - -### Log: Error validating checkpoint module=checkpoint startBlock - -If the node throws these logs, check the following: - -- Check if the Bor node is in sync by running the following command: - - ```bash - bor attach .bor/data/bor.ipc - eth.syncing - ``` - - If the output is "false", then the Bor node is in sync. - -- Check if the Bor node is on the wrong fork by running this command: - - ```bash - bor attach .bor/data/bor.ipc - eth_blockNumber - ``` - - Find the associated block hash for the block number: - - ``` - bor attach .bor/data/bor.ipc - eth.getBlockByNumber("").hash - ``` - - Inspect the block number to identify if you are running on the right fork. One way to do this is to search for the block number on an explorer like [PolygonScan](https://polygonscan.com/). - - ![Figure: Bad block](../../../img/pos/block_number.png) - - If the hashes match, then the node is on the right fork. - -### Log: Error dialing seed - -- Check whether your Heimdall node is configured with the latest seeds as listed on the [node setup documents](../full-node/full-node-binaries.md). - -If you're still encountering the error, after either updating to the latest seeds or confirming that you are using the right seeds, you may need to clear the `addrbook.json` file. To do this, follow the steps below. - - -1. Open the `config.toml` file in your terminal: ```vi /var/lib/heimdall/config/config.toml``` - -2. Stop `heimdalld` service: ```sudo service heimdalld stop``` - -3. Clear your `addrbook` using the following command: - - ``` - sudo service heimdalld stop - cp /var/lib/heimdall/config/addrbook.json /var/lib/heimdall/config/addrbook.json.bkp - rm /var/lib/heimdall/config/addrbook.json - ``` - -4. Increase `max_num_inbound_peers` and `max_num_outbound_peers` in `/var/lib/heimdall/config/config.toml`: - - ``` - max_num_inbound_peers = 300 - max_num_outbound_peers = 100 - ``` - -5. Start `heimdalld` service with the following command: - - ```bash - sudo service heimdalld start - ``` - - -### Log: Demoting invalidated transaction - -This log is not an error but a process in the transactinos pool `txpool` which rearranges the transactions and removes some of them (as per specified conditions). - -It should in **no way affect the checkpointing mechanism**. - -### Error: Failed Sanity Checks - -##### Description - -`Addressbook` warnings can be ignored without an issue most of the time. If your node is connected to sufficient number of peers these kind of errors can be ignored. Your `pex` is just trying to re-establish it's connections with peers already present in `addrbook.json`. +The command should return a `null` upon successful execution. Once this occurs, you can resume monitoring Bor to verify whether the chain progresses beyond the previously problematic block. -### Issue: Bor synchronisation is slow +If none of these solutions work for you, please contact the Polygon Support team immediately. -##### Description +### Issue: Bor synchronization is slow -If Bor synchronisation is slow it could be due to either of the below reasons: - -- The node is running on a fork - means at certain point the block production was done by forking on a different block and that has impacted the further block production -- The machine is not working at optimum levels and could be with insufficient resources. - - This can be addressed by checking on: - - IOPS - - IOPS stands for Input/Output state of cycle - - The rate of reading is usually higher than write speed - - 6000 is the recommended range for IOPS - - Processing Power - - Processor has to be 8 or 16 core - - RAM: 32 GB is the minimum; 64 GB is recommended - - Block import should be more than 2 block for every second - - Node sync rate should be at 15-20 blocks every 8 secs +If Bor synchronization is slow, it may be caused by one or more of the following factors: +- The node is running on a fork - means at certain point the block production was done by forking on a different block and that has impacted the further block production. +- The machine is not working at optimum levels and could be with insufficient resources. This can be addressed by checking the following: + - IOPS + - IOPS stands for Input/Output state of cycle. + - The rate of reading is usually higher than write speed. + - 6000 is the recommended range for IOPS. + - Processing power + - Processor has to be 8 or 16 core. + - RAM: 32 GB is the minimum; 64 GB is recommended. + - Block import should be more than 2 block for every second. + - Node sync rate should be at 15-20 blocks every 8 secs. ##### Solution -As the issue is more about lack of hardware resources try upgrading it to double of the current specifications. - -### Node is not signing any checkpoints - -##### Prerequisite - -First, please point the bor_rpc_url(heimdall-config.toml) of the validator to any external infra providers and restart the services. This change helps to avoid missing checkpoints. - -You can find a list of Infra Providers, on the navbar, that validators can make use of. - -!!! note - At this point in time, the node will not mine blocks. So once the issue is fixed, the changes made have to be reverted for the node to return to normal functionality. - - -##### Description - -First of all, your node not signing checkpoints could be due to multiple reasons. +Since the issue is likely due to insufficient hardware resources, consider upgrading to double the current specs. -##### Solution 1 - -First check if your Heimdall service is running correctly on your sentry and validator node. If the service has stopped abruptly or see any errors, try restarting your Heimdall service and see it comes back to normal. - -##### Solution 2 - -Check your Bor service and see if it has halted abruptly or there are any errors on the logs. Try restarting your Bor service to resolve this issue. - -##### Solution 3 - -Check if your Heimdall Bridge is running or not or if it has any errors in the logs. Try restarting the service and see if the issue resolves. - -### Issue: Validator Heimdall is unable to connect to peers +### Validator Bor is stuck on a block for a long time -##### Description - -This typically means that your sentry Heimdall is running into issues. - -##### Solution - -- Check your sentry Heimdall and see if the service is running fine. -- If the service is stopped then restarting the service on your sentry node should resolve this issue. -- Similarly, after fixing your sentry, a restart of your Heimdall service should also resolve the problem. - -### Error: Error while fetching mainchain receipt error - -##### Description - -These are normal logs. Do not do anything to your bridge. - -### Validator bor is stuck on block for a long time - -##### Description - -This means that your Bor on your Sentry is also stuck because your Validator gets information from your Sentry. +This implies that the Bor service on your sentry node is also stuck because your validator gets information from your sentry. ##### Solution -- Please check your Bor logs on your sentry and see if everything is okay. -- Probably restart the Bor service first on your Bor and then simultaneously restart the Bor service on your validator as well. - -### Error: (in Bor) "Failed to prepare header mining at block 0" - -##### Description - -This happens because of a formatting issue in your `static-nodes.json` file *(/var/lib/bor/data/bor/static-nodes.json)*. - -##### Solution - -- Ensure there are no space and no additional characters like '<', '/', or '>'. -- If you have made any changes to the file then please restart your Bor service and you should see logs printing. - -### Error: "30303" or invalid command - -##### Description - -This is because you haven’t created the bor keystore and the password file for it. - -##### Solution - -Ensure that you follow all the steps from the guide setup. - -### Error: Impossible reorg, please file an issue - -##### Description - -Let these logs be. Your node should ideally not suffer because of this and the issue should be automatically resolved. - -If your node is suffering because of this, please contact the support team immediately. - -### Error: "Host not found" while setting up a node using Ansible - -##### Description -This could be because your `inventory.yml` file may have some formatting issues. - -##### Solution -Correct them with proper indentation and then try again. - -### Issue: "Dialling failed" in Heimdall - -##### Description - -This is related to connectivity and more specifically a port related problem. - -##### Solution - -- Check to `curl localhost:26657/status` still shows the same block. -- Try a Heimdall restart. -- Make sure that the connectivity to this port 26656 is open. -- Try adding additional peers in vi /var/lib/heimdall/config/config.toml -- Set `max_open_connection` parameter to 100. - -### Issue: Looking for peers or stopping peer for error - -##### Solution - -- Open the `config.toml` file on your sentry node. The file can be found at the following path: - - `/var/lib/heimdall/config/config.toml` - -- And then find the parameter `external_address`. Once you find it this what you should be updating it with: - - `tcp://:26656` - -- Here `my_elastic_ip` is your sentry’s public IP. - -- Once you have updated this, all you need to do is restart your Heimdall service on your Sentry - - `sudo service heimdalld restart` - -- Double-check to ensure that you’re performing these operations on your sentry node. - -Follow the below steps for adding additional peers in `vi /var/lib/heimdall/config/config.toml` - -- Stop `heimdalld` service - - ```bash - sudo service heimdalld stop - ``` - -- Clear your `addrbook` - - ```bash - sudo service heimdalld stop - cp /var/lib/heimdall/config/addrbook.json /var/lib/heimdall/config/addrbook.json.bkp - rm /var/lib/heimdall/config/addrbook.json - ``` - -- Increase `max_num_inbound_peers` and `max_num_outbound_peers` in `/var/lib/heimdall/config/config.toml`: - - ```toml - max_num_inbound_peers = 300 - max_num_outbound_peers = 100 - ``` - -- Start heimdalld service: - - ```bash - sudo service heimdalld start - ``` - -### Error: Error while fetching data from URL - -##### Sample error - -```bash -module=span service=processor error="Error while fetching data from url: -[http://0.0.0.0:1317/bor/prepare-next-span?chain_id=137&proposer=0x29f265b54a298df0c1b762f688e7e7c09d8790ea&span_id=2863&start_block=18317056](http://0.0.0.0:1317/bor/prepare-next-span?chain_id=137&proposer=0x29f265b54a298df0c1b762f688e7e7c09d8790ea&span_id=2863&start_block=18317056), status: 400" -Aug 23 12:07:23 US-CA-SN01 bridge[2340]: E[2021-08-23|12:07:23.158] Unable to fetch next span details -module=span service=processor lastSpanId=2862 -``` - -##### Solution - -Then the Heimdall Bridge needs a restart. - -### Error: no contract code at the given address - -##### Solution - -1. Get the right configs from Github and copy them to `/var/lib/heimdall/config`. -2. Reset heimdall using `heimdalld unsafe-reset-all`. - -### Issue: Problems in starting Bor - -##### Issue - -Address is required as an argument. - -##### Solution - -You have to add address. - -```bash -/etc/matic/metadata -``` - -### Error: Failed to unlock account (0x...) No key for given address or file - -##### Description - -This error happens in light of the fact that the way for the password.txt record is erroneous. You can follow the beneath steps to amend this. - -##### Solution - -For Linux packages: - -Kill Bor process - -##### For linux - -1. `ps -aux | grep bor`. Get the PID for Bor and then run the following command. -2. `sudo kill -9 PID` - -##### For Ansible - -1. Copy the bor keystore file to - - ```jsx - /etc/bor/dataDir/keystore - ``` - -2. And password.txt to - - ```jsx - /etc/bor/dataDir/ - ``` - -3. Make sure you have added correct address in `/etc/bor/metadata` - -##### For Binaries - -1. Copy the Bor keystore file to: - - ```jsx - /var/lib/bor/keystore/ - ``` - -2. And password.txt to - - ```jsx - /var/lib/bor/password.txt - ``` - -### Consequences of validator missing a checkpoint and points to investigate from our side - -- Economics - - Bad reputation for Validator - - Rewards gets missed for Delegator -- Investigation - - Ask for recent logs - -### Error: dpkg: error processing archive matic-heimdall-xxxxxxxxxx - -##### Sample - -```bash - "dpkg: error processing archive matic-heimdall_1.0.0_amd64.deb (--install): trying to overwrite '/heimdalld-rest-server.service', which is also in package matic-node 1.0.0" -``` - -##### Solution - -This occurs mainly because of a previous installation of Matic on machine. To resolve you can run: `sudo dpkg -r matic-node` - -### Issue: Tendermint was rest without resetting application's data - -##### Solution - -- Reset Heimdall config data and try running the installation again; - - ```jsx - $ heimdalld unsafe-reset-all - ``` - - ```jsx - $ rm -rf $HEIMDALLDIR/bridge - ``` - -### Issue: Bor crashed - -##### Solution - -- Try upgrading to double the amount of RAM -- For example, their current RAM capacity is 16GB, it can be upgraded to 32GB - -### Error: err="insufficient funds for gas * price + value" - -##### Description - -These logs throw up when there is no enough ETH in your signer wallet. - -##### Solution -It is recommended to have 1 ETH in your signer wallet but can keep .5 to .75 in case you check it often enough. - -### Heimdall: No staking sequence exists: module=staking - -If the following logs are found on a large frequency on Heimdall then this issue is related to the bridge service resetting the bridge directory fixes this issue. - -```bash -sudo service rabbitmq-server stop -mv /var/lib/rabbitmq/mnesia /var/lib/rabbitmq/mnesia-old -sudo service rabbitmq-server start -``` +- Please check the Bor logs on your sentry and see if everything is normal and functional. +- Restart the Bor service on your sentry node, then simultaneously restart the Bor service on your validator. ### Retrying again in 5 seconds to fetch data from Heimdall path=bor/span/1 -These logs in Bor mean that it cannot connect to Heimdall. +These logs in Bor mean that it cannot connect to Heimdall. Heimdall appears to be out of sync, and thus it lacks the data needed by Bor. -The Heimdall doesn’t look in sync and hence it won’t have data on all the things that Bor would require. +##### Solution -So the recommended procedure would be to clear the historical data of both Heimdall and Bor and resync from the snapshot. +The recommended approach is to clear the historical data from both Heimdall and Bor, then [resync using a snapshot](../snapshots.md). -Ensure the following is fine: +Verify the following: -1. Heimdall logs are normal or is it throwing up any errors? -2. Ensure Heimdall is fully synced by running: ```curl localhost:26657/status``` -3. Also ensure whether Heimdall is connected with the other peers. +1. Are Heimdall logs normal, or do they show any errors? +2. Confirm Heimdall is fully synced by running: curl localhost:26657/status +3. Check whether Heimdall is connected to other peers. ```bash curl localhost:26657/net_info? | jq .result.n_peers ``` -If there aren’t any peers, check whether the *seeds or persistent peers are rightly set on Heimdall* and *ensure Port 26656 is all open*. +If there are no peers, verify that the *seeds or persistent peers are correctly configured on Heimdall*, and ensure that *port 26656 is open*. -##### Reset Heimdall +### etherbase missing: etherbase must be explicitly specified -```bash -sudo service heimdalld stop -heimdalld unsafe-reset-all -``` +To fix this issue, the signer address that is used to mine must be added in the `miner.etherbase` section in the `config.toml` file. -##### Sync Heimdall using a snapshot +### Error: Failed to unlock account (0x…) No key for given address or file -```bash -wget -c -tar -xzvf -C -``` +This error occurs because the path to the `password.txt` file is incorrect. Follow the steps below to resolve this issue. -### etherbase missing: etherbase must be explicitly specified +##### Solution -To fix this issue, the signer address that is used to mine must be added inside `miner.etherbase` section in the `config.toml` file. +1. Kill the Bor process. +2. Copy the Bor keystore file to: `/var/lib/bor/keystore/` +3. And the `password.txt` file to: `/var/lib/bor/password.txt` +4. Ensure that the user 'Bor' has permission to access the password.txt file. You can do this by running the following command: `sudo chown -R bor:nogroup /var/lib/bor/` ### Steps to prune the node -Please use the below steps: +Follow the steps below to prune your node: 1. Check your Bor data size before pruning using the following command: @@ -545,7 +174,6 @@ Please use the below steps: ```bash sudo bor snapshot prune-state --datadir /usr/bin/bor ``` - The default --datadir is `/usr/bin/bor`. 5. Once the pruning is completed, you will see success logs and details. Then start Bor again using: @@ -554,9 +182,41 @@ Please use the below steps: sudo service bor start ``` - 6. Check your Bor data size after pruning using: ```bash du -sh /usr/bin/bor ``` + +## Heimdall + +### Log: Error dialing seed/Looking for peers or stopping peer for error/Dialing failed + +This log is expected when you first start Heimdall, as it takes some time to find and connect to peers. If the issue persists, check the following: + +- Verify that your Heimdall node is configured with the latest seeds as listed in the [node setup documentation](../full-node/full-node-binaries.md#configure-heimdall-seeds-mainnet). + +If the error persists after updating to the latest seeds or confirming that you are using the correct ones, follow these steps: + +1. Increase `max_num_inbound_peers` and `max_num_outbound_peers` in `/var/lib/heimdall/config/config.toml`: + + ```toml + max_num_inbound_peers = 300 + max_num_outbound_peers = 100 + ``` + +2. Start `heimdalld` service using the following command: + + ```bash + sudo service heimdalld start + ``` + +### Issue: Validator Heimdall is unable to connect to peers + +This typically means that your sentry Heimdall is running into issues. + +##### Solution + +- Check your sentry Heimdall to ensure that the service is running properly. +- If the service is stopped, restarting it on your sentry node should resolve the issue. +- Likewise, after addressing any issues with your sentry, restarting your Heimdall service should also help resolve the problem. \ No newline at end of file diff --git a/docs/pos/how-to/troubleshoot/reporting-issues.md b/docs/pos/how-to/troubleshoot/reporting-issues.md index bc55c1cad..8122c0bf7 100644 --- a/docs/pos/how-to/troubleshoot/reporting-issues.md +++ b/docs/pos/how-to/troubleshoot/reporting-issues.md @@ -1,9 +1,14 @@ ## Where to report a bug -For any bugs or attacks that are discovered, you need to report them to the [Immunefi bug bounty program](https://immunefi.com/bounty/polygon/). +Any discovered bugs or vulnerabilities related to our Bug Bounty Program should be reported as follows: + +- For websites and applications: https://hackerone.com/polygon-technology +- For smart contracts: https://immunefi.com/bounty/polygon +- For security inquiries, please contact us at security@polygon.technology. (Please disclose vulnerabilities through the bug bounty program) !!! info + Performing an attack and not providing submission of your proof will result in disqualification of your attempt. Make sure you add all relevant details such as your email address and Discord ID. Providing ample details creates a rapport of communication, and helps the Polygon team evaluate your submission appropriately. @@ -12,14 +17,25 @@ Make sure you add all relevant details such as your email address and Discord ID Once an issue is reported, the Polygon team reviews it, comments, and updates on the status of the issue. After evaluation, the Polygon team reports the outcome of the submission. The severity of the issue also gets tagged as per the evaluation. -## Contact us for further questions - -Submitters of issues can connect with the community leaders via email or tag the validator-support-team on Discord. +## Contact us for all other questions ### Via E-mail -* Parvez — parvez.shaikh@polygon.technology +- For node operators: node-support@polygon.technology +- For validators: validator-support@polygon.technology + +### Via support portal + +- Visit the support portal at [support.polygon.technology](https://support.polygon.technology/). +- Sign in using your email address and select **Submit a Ticket** located in the top right corner. + +![Polygon support portal](../../../img/pos/support-portal-1.png) + +- Tha above page appears. To ensure an accurate response, please include the following details when submitting your ticket: + - The versions of Bor and Heimdall you are using. + - At least one hour of logs related to the affected services. + - The `config.toml` files for the affected services. ### Via Discord -* Check out the @validator-support-team channel on our [Discord](https://discord.com/invite/0xPolygonCommunity) server. +- Please visit the **#pos-full-node-queries** channel on our [Discord](https://discord.com/invite/0xPolygonCommunity) server and feel free to post your questions there. We will address your queries directly in that channel. \ No newline at end of file diff --git a/docs/pos/how-to/troubleshoot/technical-faqs.md b/docs/pos/how-to/troubleshoot/technical-faqs.md index 8a760671e..2b5229289 100644 --- a/docs/pos/how-to/troubleshoot/technical-faqs.md +++ b/docs/pos/how-to/troubleshoot/technical-faqs.md @@ -7,260 +7,48 @@ testnet tokens are stored. ### 2. List of Common Commands -We currently have an easy to dive-in list for you for the Linux packages. We will -keep updating this list regularly for more convenience. +Refer to the [list of common commands](../../reference/commands.md) that might come in handy while troubleshooting. -**For Linux packages** +### 3. Default Directories -#### A. Where to find Heimdall genesis file - - ```bash - $CONFIGPATH/heimdall/config/genesis.json - ``` +- Heimdall genesis file: `/var/lib/heimdall/config/genesis.json` +- Heimdall-config.toml file: `/var/lib/heimdall/config/heimdall-config.toml` +- Heimdall config.toml file: `/var/lib/heimdall/config/config.toml` +- Heimdall data directory: `/var/lib/heimdall/data/` +- Bor config.toml file: `/var/lib/bor/config.toml` +- Bor data directory: `/var/lib/bor/data/bor/chaindata` - -#### B. Where to find heimdall-config.toml - - ```bash - /etc/heimdall/config/heimdall-config.toml - ``` - - -#### C. Where to find config.toml - - ```bash - /etc/heimdall/config/config.toml - ``` - - -#### D. Where to find heimdall-seeds.txt - - ```bash - $CONFIGPATH/heimdall/heimdall-seeds.txt - ``` - - -#### E. Start Heimdall - - ```bash - $ sudo service heimdalld start - ``` - - -#### F. Start Heimdall rest-server - - ```bash - $ sudo service heimdalld-rest-server start - ``` - - -#### G. Start Heimdall bridge-server - - ```bash - $ sudo service heimdalld-bridge start - ``` - - -#### H. Heimdall logs - - ```bash - /var/log/matic-logs/ - ``` - - -#### I. Where to find Bor genesis file - - ```bash - $CONFIGPATH/bor/genesis.json - ``` - - -#### J. Start Bor - - ```bash - sudo service bor start - ``` - - -#### K Check heimdall logs - - ```bash - tail -f heimdalld.log - ``` - - -#### L. Check Heimdall rest-server - ```bash - tail -f heimdalld-rest-server.log - ``` - - -#### M. Check Heimdall bridge logs - - ```bash - tail -f heimdalld-bridge.log - ``` - - -#### N. Check Bor logs - - ```bash - tail -f bor.log - ``` - - -#### O. Kill Bor process - -##### For linux - -1. -```bash -ps -aux | grep bor -``` - Get the PID for Bor and then run the following command. -2. -```bash -sudo kill -9 PID -``` - -##### For binaries - -Go to -```bash -CS-2003/bor -``` - and then run, -```bash -bash stop.sh -``` - - -### 3. `Error: Failed to unlock account (0x...) No key for given address or file` - -This error occurs because the path for the `password.txt` file is incorrect. You can follow the below steps to rectify this: - -This error occurs because the path for the `password.txt` and Keystore file is incorrect. You can follow the below steps to rectify this: - -1. Copy the bor keystore file to - - `/etc/bor/dataDir/keystore` - -2. And `password.txt` to - - `/etc/bor/dataDir/` - -3. Make sure you have added correct address in `/etc/bor/metadata`. - - -##### For binaries - -1. Copy the Bor keystore file to: - - `/var/lib/bor/keystore/` - -2. And password.txt to - - `/var/lib/bor/password.txt` - - -### 4. `Error: Wrong Block.Header.AppHash. Expected xxxx` - -This usually occurs due to an incorrect installation of heimdall. You can follow the steps below to rectify this: - - Run - ```bash - heimdalld unsafe-reset-all - ``` -and start Heimdall services again. You can refer to this [guide](../validator/prerequisites.md). - - -### 5. From where do I create the API key? +### 4. From where do I create the API key? You can access this link: [https://infura.io/register](https://infura.io/register) . Make sure that once you have setup your account and project, you copy the API key for Sepolia and not mainnet. Mainnet is selected by default. -### 6. Heimdall isn't working. I'm getting a panic error - -Example: My `heimdalld` isn’t working. In the log the first line is: - -```bash -panic: Unknown db_backend leveldb, expected either goleveldb or memdb or fsdb -``` - -Solution: Change the config to `goleveldb` in `config.toml`. - +### 5. How do I delete remnants of Heimdall and Bor? -### 7. How do I delete remnants of Heimdall and Bor? +Run the following commands to delete the remnants of Heimdall and Bor from your machines. -If you want to delete remnants of Heimdall and Bor then you can run the following commands -Bor: +For the Linux package, run: `$ sudo dpkg -i bor` -##### For Linux package +And delete the Bor directory using: `$ sudo rm -rf /var/lib/bor` -```$ sudo dpkg -i matic-bor``` +For binaries, run: `$ sudo rm -rf /var/lib/bor` -And delete Bor directory using: +And then run: `$ sudo rm /var/lib/heimdall` -```$ sudo rm -rf /etc/bor``` - -##### For binaries - -```$ sudo rm -rf /etc/bor``` - -And then run: - -```$ sudo rm /etc/heimdall``` - - -### 8. How many validators can be active concurrently? +### 6. How many validators can be active concurrently? Under the current limit, a maximum of 105 validators can be active at any given time. It's important to note that active validators are primarily those with high uptime, while participants with significant downtime may be removed. -### 9. How much should I stake? - -Set the `stake-amount` and `heimdall-fee-amount` values according to the logic described below. - -A minimum of 10 POL tokens is required for the stake amount whereas heimdall fee should be greater than 10. For example, your stake amount is 400 then the heimdall fee should be 20. We suggest to keep the Heimdall fee as 20. - -However, please note that the values entered in stake amount and `heimdal-fee-amount` should be entered in 18 decimals. +### 7. How much should I stake? -For example, - -```bash -heimdallcli stake --staked-amount 400000000000000000000 --fee-amount 1000000000000000000 --validator 0xf8d1127780b89f167cb4578935e89b8ea1de774f -``` - -### 10. I was selected to become a validator but my ETH address was incorrect. What do I do? - -If you have access to the ETH address that you submitted earlier then you can transfer the test tokens from that account to the current account. And then you can initiate your process of setting up your nodes. - -If you don't have access to that ETH address, we won't be transferring you tokens separately. You can re-register in the form again with the correct ETH address. - -### 11. I'm getting an error starting the bridge - -Error: Object "start" is unknown, try "bridge help". Is it still OK to ignore this? - -Check "which bridge" - if it's `/usr/sbin/bridge` you're not running the right "bridge" program. - -Try `~/go/bin/bridge` instead `(or $GOBIN/bridge)`. +A minimum stake of 10,000 POL tokens is required (as per PIP-4). We recommend setting a Heimdall fee of 10 POL. - -### 12. I'm getting `dpkg` error - -Error: "dpkg: error processing archive matic-heimdall_1.0.0_amd64.deb (--install): trying to overwrite '/heimdalld-rest-server.service', which is also in package matic-node 1.0.0" - -This occurs mainly because of a previous installation of Polygon on your machine. To resolve you can run: - -`sudo dpkg -r matic-node` - - -### 13. I'm not clear on which Private Key should I add when I generate validator key +### 8. I'm not clear on which Private Key should I add when I generate validator key. The private key to be used is your wallet's ETH address where your Polygon testnet tokens are stored. You can complete the setup with one public-private key pair tied to the address submitted on the form. - -### 14. Is there a way to know if Heimdall is synced? +### 9. Is there a way to know if Heimdall is synced? You can run the following command to check it: @@ -270,133 +58,43 @@ $ curl [http://localhost:26657/status](http://localhost:26657/status) Check the value of the `catching_up` flag. If it is `false` then the node is all synced up. - -### 15. If someone becomes a top 10 staker, how do they receive their POL reward? - -Stage 1 rewards are not based on stake. Participants with high stake don't automatically qualify for a reward in this stage. - - -### 16. What should the Heimdall version be? - -To check your Heimdall version you can simply run: - -```bash -heimdalld version -``` - -The correct version of Heimdall for stage 1 should be `heimdalld version is beta-1.1-rc1-213-g2bfd1ac` - - -### 17. What values should I add in the stake amount and fee amount? - -A minimum of 10 POL tokens is required for the stake amount whereas heimdall fee should be greater than 10. For example, your stake amount is 400 then the heimdall fee should be 20. We suggest to keep the Heimdall fee as 20. - -However, please note that the values entered in stake amount and `heimdal-fee-amount` should be entered in 18 decimals. - -For example, - -```bash -heimdallcli stake --staked-amount 400000000000000000000 --fee-amount 1000000000000000000 --validator 0xf8d1127780b89f167cb4578935e89b8ea1de774f -``` - - -### 18. What's the difference between `/var/lib/heimdall` and `/etc/heimdall?` - -`/var/lib/heimdall` is the heimdall dir when you use the binary installation method. `/etc/heimdall` is for the Linux package installation method. - - -### 19. When I make the stake transaction, I'm getting "Gas Exceeded" error - -This error may occur because of the stake or fee amount format. The values entered during the stake command need to have 18 decimals. - -However, please note that the values entered in stake amount and `heimdal-fee-amount` should be entered in 18 decimals. - -For example, - -```bash -heimdallcli stake --staked-amount 400000000000000000000 --fee-amount 1000000000000000000 --validator 0xf8d1127780b89f167cb4578935e89b8ea1de774f -``` - - -### 20. When will I get a chance to become a Validator? - -We are progressively adding validators throughout the course of Stage 1 event. We will be releasing a list of new external validators gradually. This list will be announced on the [Discord channel](https://discord.com/invite/0xPolygonCommunity). - - -### 21. Where can I find Heimdall account info location? - -For binaries: `/var/lib/heimdall/config folder` - -For Linux package: `/etc/heimdall/config` - - -### 22. Which file do I add the API key in? +### 10. Which file do I add the API key in? Once you have created the API key, you need to add it to the `heimdall-config.toml` file. +### 11. How to check if the correct signer address is used for validator setup? -### 23. Which file do I add the persistent_peers? - -You can add the persistent_peers in the following file: `/var/lib/heimdall/config/config.toml` - - -### 24. “Did you reset Tendermint without resetting your application's data?” - -In such a case you can reset heimdall config data and try running the installation again. +To check the signer address, run the following command *on the validator node*: ```bash -$ heimdalld unsafe-reset-all -$ rm -rf $HEIMDALLDIR/bridge +heimdalld show-account ``` -### 25. Error: Unable to unmarshall config Error 1 error(s) decoding - -Error: `* '' has invalid keys: clerk_polling_interval, matic_token, span_polling_interval, stake_manager_contract, stakinginfo_contract` - -This occurs mostly because when there are typos, or some missing parts or an old config file which is still a remnant. You will need to clear all the remnants and then try setting it up again. - -### 26. To stop Heimdall and Bor services - -##### For Linux packages - -Stop Heimdall: `sudo service heimdalld stop` - -Stop Bor: `sudo service bor stop` or - -1. `ps -aux | grep bor`. Get the PID for Bor and then run the following command. -2. `sudo kill -9 PID` - -##### For binaries +### 12. `Error: Failed to unlock account (0x...) No key for given address or file` -Stop Heimdall: `pkill heimdalld` - -Stop Bridge: `pkill heimdalld-bridge` - -Stop Bor: Go to CS-2001/bor and then run, `bash stop.sh` - -### 27. To remove Heimdall and Bor directories - -##### For Linux packages - -Delete Heimdall: `sudo rm -rf /etc/heimdall/*` - -Delete Bor: `sudo rm -rf /etc/bor/*` - -##### For binaries - -Delete Heimdall: `sudo rm -rf /var/lib/heimdall/` +This error occurs because the path for the `password.txt` file is incorrect. You can follow the below steps to rectify this: -Delete Bor: `sudo rm -rf /var/lib/bor` +1. Copy the Bor keystore file to `/var/lib/bor/keystore` +2. Copy `password.txt` to `/var/lib/bor/` +3. Make sure you have added correct address in `/var/lib/bor/config.toml`. +4. Ensure that the `priv_validator_key.json` and `UTC-