# Metatron Node

## Overview

In the Pando blockchain, Megatron Nodes propose and produce new blocks in the chain, while Metatron Nodes seal blocks and act as a check on malicious or otherwise non-functional Megatron Nodes. Metatron nodes play important roles to protect the security of the Pando blockchain as they form a second layer of defense against potential malicious attackers. Install and stake to your Metatron nodes to help secure the Pando blockchain!

This guide provides the instructions to launch and stake to a Metatron Node for the Pando Network.

The minimum token amount to stake is 10,000 PTX. The minimum hardware requirements are:

### The requirements for a Metatron Node are as such:

<figure><img src="/files/WStICMrIoQDLtpMhkaCd" alt=""><figcaption><p>Hardware Requirement for Metatron Node</p></figcaption></figure>

## Metatron Staking Process

### Staking Through Web Wallet

Staking through Web Wallet the “Pando Wallet” logo, unlock your Pando wallet using your typical access method.

Access the Pando Web Wallet from your desktop/laptop. Under the “Pando Wallet” logo, unlock your Pando wallet using your typical access method (keystore, seed phrase, private key, etc.).

<figure><img src="/files/qi60o9PO0ilYPWNny8rZ" alt=""><figcaption><p>Unlock Wallet</p></figcaption></figure>

Once your wallet is unlocked, click the “**Stakes**” tab of the menu and click “**Deposit Stake**”, then click "**Metatron Node**"

<div><figure><img src="/files/LJ9KAqsYRPB1rDzwPyHp" alt=""><figcaption><p>Stake Tab</p></figcaption></figure> <figure><img src="/files/QRWCK7uKuDIWMKtBiBQ1" alt=""><figcaption><p>After clicking on Stake Deposit</p></figcaption></figure></div>

In the **Metatron Node Holder (Summary)** field, enter the text string from your Metatron Cli Service. Enter the Amount of PTX you want to stake to this node and click **“Deposit Stake"**. Note that you need to stake **at least 10,000 PTX**.

<figure><img src="/files/6hAnSMO3jR75a2nsaAd5" alt=""><figcaption><p>Metatron Stake Deposit</p></figcaption></figure>

After reviewing your stake deposit info on the next screen, enter your wallet password, then click on "**Deposit Stake**". After the stake deposit transaction is confirmed, you can view your metatron deposit detail in dashbaord screen in **"Stake"** Tab.

### Metatron Stake Withdrawal Process

To withdraw your staked tokens from the Metatron Node using either the Pando Web Wallet, click the "Stakes" tab, then the "Withdraw Stake" button.

On the next screen, select the **"Metatron"**, need to click on **"Continue"** button. After clicking on continue this will ask to enter **"Metatron Address"** after entering this after clicking on **"Withdraw Stake button"**&#x20;

<div><figure><img src="/files/LJ9KAqsYRPB1rDzwPyHp" alt=""><figcaption><p>Stake Tab</p></figcaption></figure> <figure><img src="/files/3vKkVzwWen3HqFEA3Mrm" alt=""><figcaption><p>After clicking on Withdraw Stake</p></figcaption></figure> <figure><img src="/files/8bjJ5I4122bzCnDUDCxi" alt=""><figcaption><p>After clicking on Metatron</p></figcaption></figure></div>

Withdrawn stakes will be returned to your wallet address. In the "Stakes" section of your Pando wallet, you'll now see the stake's Withdrawn status has been changed to "Yes".

## Metatron Node Configuration

Install/Launch and Stake to the Metatron Node through command line

Following are the instructions to install a Metatron Node on a Linux server through the command line.

## Install the Metatron node

Please follow the instructions below to download the latest **Linux** binary and the necessary data. If you prefer to compile from the source code, please follow the steps [here](https://theta.readme.io/docs/install-guardian-node-from-source-code). If you are running the node on a Linux server, you'd need to run the node in a **screen or tmux** session, so that after you've logged off, the Pando node can continue to run.

{% code title="1" %}

```shell
sudo apt-get update && sudo apt-get install wget git curl net-tools build-essential make -y
```

{% endcode %}

{% code title="2" %}

```shell
sudo apt-get install build-essential
```

{% endcode %}

{% code title="3" %}

```shell
sudo apt-get install gcc
```

{% endcode %}

{% code title="4" %}

```shell
sudo apt-get install make
```

{% endcode %}

{% code title="5" %}

```shell
sudo apt-get install git
```

{% endcode %}

{% code title="6" %}

```shell
sudo apt-get install -y bzr
```

{% endcode %}

{% code title="7" %}

```shell
sudo apt-get install jq
```

{% endcode %}

{% code title="8" %}

```shell
wget https://go.dev/dl/go1.17.4.linux-amd64.tar.gz
```

{% endcode %}

{% code title="9" %}

```shell
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.17.4.linux-amd64.tar.gz
```

{% endcode %}

{% code title="10" %}

```shell
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.profile
```

{% endcode %}

{% code title="11" %}

```shell
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc
```

{% endcode %}

{% code title="12" %}

```shell
echo 'export PANDO_HOME=/usr/local/go/src/github.com/pandotoken/pando' >> ~/.bashrc
```

{% endcode %}

{% code title="13" %}

```shell
echo 'export PANDO_HOME=/usr/local/go/src/github.com/pandotoken/pando' >> ~/.profile
```

{% endcode %}

{% code title="14" %}

```shell
source ~/.bashrc && source ~/.profile
```

{% endcode %}

Next, clone the release branch of the Pando Ledger repo <https://github.com/Pandoproject/Blockchain-code.git> into your $GOPATH with the following command. The path should look like this: $GOPATH/src/github.com/pandotoken/pando

```shell
$ git clone https://github.com/pandoprojects/pando-network-protocol.git
$GOPATH/src/github.com/pandoprojects/pando
```

```shell
$ export GO111MODULE=on
```

```shell
$ export GO111MODULE=onde
```

```shell
$ cd $PANDO_HOME
```

```shell
$ make install
```

```shell
$ cd $PANDO_HOME
```

```shell
$ cp -r ./integration/pandonet ../pandonet
```

```shell
$ mkdir ~/.pandocli
```

```shell
$ cp -r ./integration/pandonet/pandocli/* ~/.pandocli/
```

```shell
$ chmod 700 ~/.pandocli/keys/encrypted
```

## Launch the metatron node

Now launch the Pando with the following commands.

```shell
$ pando start --config=../pandonet/node
```

**NOTE:** When the Pando node launches for the first time, you need to choose a password to encrypt the signing key of the metatron node. **Please choose a secure password and keep it in a safe place.** The next time when you restart the node, you will need the password to unlock it.

It might take some time for the node to sync up with the network (typically should be less than 10 minutes). To check if the node is already in-sync with the network, you can execute the following command in **another console:**

```shell
$ ./pandocli query status
```

The syncing field in the return indicates whether the node is still in the synchronization mode. If it is false, it means the node is already synced to the lastest block.

## Stake to the metatron node

After the node is synced (i.e. syncing is false), we can proceed with staking to make it a full **Metatron Node**. First we'd need the "fingerprint" of this node. In another console, execute the following command

```shell
$ ./pandocli query metatron
```

The output should look something like this:

`{`

&#x20;`"Address": "0x8f3B...E819",`

&#x20;`"BlsPubkey": "a1225b...16ebe",`

&#x20;`"BlsPop": "b49fd2a...d025c",`

&#x20;`"Signature": "14deb5e...52500",`

&#x20;`"Summary": "0x8f3Bc...952500"`

`}`

The summary part is the "fingerprint" we need for staking.  Each metatron staking transaction requires at least 10,000 Pando tokens


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pandoproject.org/pando-network-docs/pando-nodes/metatron-node.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
