adaptation to hero

This commit is contained in:
Mik-TF 2024-06-13 17:09:57 -04:00
parent 3231204426
commit 1d07f178db
3 changed files with 59 additions and 86 deletions

View File

@ -4,10 +4,9 @@
- [Introduction](#introduction)
- [Prerequisites](#prerequisites)
- [Algorand Structure](#algorand-structure)
- [Algorand Structure](#algorand-structure)
- [Run Default Node](#run-default-node)
- [Run Relay Node](#run-relay-node)
- [Run Participant Node](#run-participant-node)
- [Run Indexer Node](#run-indexer-node)
- [Select Capacity](#select-capacity)
@ -23,75 +22,56 @@
- From the sidebar click on **Applications**
- Click on **Algorand**
### Algorand Structure
## Algorand Structure
- Algorand has two main [types](https://developer.algorand.org/docs/run-a-node/setup/types/#:~:text=The%20Algorand%20network%20is%20comprised,%2C%20and%20non%2Drelay%20nodes.) of nodes (Relay or Participant) you can run also a 4 networks you can run your node against. Combining the types you can get:
- Defualt:
This is a Non-relay and Non-participant
It can run on (Devnet, Testnet, Betanet, Mainnet)
- Relay:
Relay node Can't be participant.
It can run only on (Testnet, Mainnet)
- Participant:
Can run on any of the four nets.
- Indexer:
It is a default node but with Archival Mode enbled which will make you able to query the data of the blockchain.
An Algorand node can be either a `Default`, `Relay` or `Indexer` node.
- Default:
- This is a non-relay node.
- It can run on Devnet, Testnet, Betanet and Mainnet.
- Relay:
- It can run only on Testnet and Mainnet.
- Indexer:
- It is a default node but with Archival Mode enabled which will make you able to query the data of the blockchain.
## Run Default Node
The basic type. you select any network you want. and for the node type select Default.
You can select any network you want and for the node type select Default.
If you have more than one SSH keys set, you can click on `Manage SSH keys` to select which one to use for this deployment.
![defaultdep](./img/solutions_algorand.png)
after the deployment is done. `ssh` to the node and run `goal node status`
After the deployment is done, SSH into the node and run `goal node status`.
Here you see your node runs on mainnet.
![defaulttest](./img/algorand_defaulttest.png)
here you see your node run against mainnet.
## Run Relay Node
Relay nodes are where other nodes connect. Therefore, a relay node must be able to support a large number of connections and handle the processing load associated with all the data flowing to and from these connections. Thus, relay nodes require significantly more power than non-relay nodes. Relay nodes are always configured in archival mode.
The relay node must be publicaly accessable. so it must have public ip.
The relay node must be publicaly accessable, so it must have a public ip.
![relaydep](./img/algorand_relaydep.png)
after the deployment is done. `ssh` to the node and run `goal node status` to see the status of the node. and also you can check if the right port is listening (:4161 for testnet, and :4160 for mainnet)
Once the deployment is done, SSH into the node and run `goal node status` to see the status of the node. You can also check if the right port is listening (:4161 for testnet, and :4160 for mainnet).
![relaytest](./img/algorand_relaytest.png)
The next step accourding to the [docs](https://developer.algorand.org/docs/run-a-node/setup/types/#relay-node) is to register your `ip:port` on Algorand Public SRV.
## Run Participant Node
Participation means participation in the Algorand consensus protocol. An account that participates in the Algorand consensus protocol is eligible and available to be selected to propose and vote on new slice in the Algorand blockchain.
Participation node is responsible for hosting participation keys for one or more online accounts.
What you need?
- Account mnemonics on the network you deploy on (offline) you can check the status for you account on the AlgoExplorer. search by your account id.
The account needs to have some microAlgo to sign the participation transaction.
- [Main net explorer](https://algoexplorer.io/)
- [Test net explorer](https://testnet.algoexplorer.io/)
- First Round: is the first block you need your participaiton node to validate from. you can choose the last block form the explorer.
![partexp](./img/algorand_partexp.png)
- Last Round: is the final block your node can validate. let's make it 30M
![partdep](./img/algorand_partdep.png)
after the deployment is done. `ssh` to the node and run `goal node status` to see the status of the node. you see it do catchup. and the fast catchup is to make the node sync with the latest block faster by only fetch the last 1k slice. after it done it will start create the participation keys.
![partstatus](./img/algorand_partstatus.png)
now if you check the explorer you can see the status of the account turned to Online
![partonl](./img/algorand_partonl.png)
## Run Indexer Node
The primary purpose of this Indexer is to provide a REST API interface of API calls to support searching the Algorand Blockchain. The Indexer REST APIs retrieve the blockchain data from a PostgreSQL compatible database that must be populated. This database is populated using the same indexer instance or a separate instance of the indexer which must connect to the algod process of a running Algorand node to read block data. This node must also be an Archival node to make searching the entire blockchain possible.
![indexernode](./img/algorand_indexernode.png)
After it finish you can access the indexer API at port `8980` and here are the [endpoint](https://developer.algorand.org/docs/rest-apis/indexer/) you can access.
Once it's done, you can access the indexer API at port `8980` and here are the [endpoint](https://developer.algorand.org/docs/rest-apis/indexer/) you can access.
## Select Capacity
The default scinario the capacity is computed based on the node (network/type) accourding to this [reference](https://howbigisalgorand.com/).
But you still can change this only to higher values by selecting the option `Set Custom Capacity`
The default scenario capacity is computed based on the node (network/type) accourding to this [reference](https://howbigisalgorand.com/).
But you can still change this to higher values by selecting the option `Set Custom Capacity`.

View File

@ -7,7 +7,8 @@
- [1. Create a Linux Bootstrap Image](#1-create-a-linux-bootstrap-image)
- [2. Boot Linux in *Try Mode*](#2-boot-linux-in-try-mode)
- [3. Use wipefs to Wipe All the Disks](#3-use-wipefs-to-wipe-all-the-disks)
- [Troubleshooting](#troubleshooting)
- [SATA Disks](#sata-disks)
- [NVMe Disks](#nvme-disks)
***
@ -27,12 +28,11 @@ It only takes a few steps to wipe all the disks of a 3Node.
ThreeFold runs its own OS, which is Zero-OS. You thus need to start with completely wiped disks. Note that ALL disks must be wiped. Otherwise, Zero-OS won't boot.
An easy method is to simply download a Linux distribution and wipe the disk with the proper command line in the Terminal.
An easy method is to simply download a Linux distribution and wipe the disks by running simple commands on the command-line interface.
We will show how to do this with Ubuntu 20.04. LTS. This distribution is easy to use and it is thus a good introduction for Linux, in case you haven't yet explored this great operating system.
## 1. Create a Linux Bootstrap Image
Download the Ubuntu 20.04 ISO file [here](https://releases.ubuntu.com/20.04/) and burn the ISO image on a USB key. Make sure you have enough space on your USB key. You can also use other Linux Distro such as [GRML](https://grml.org/download/), if you want a lighter ISO image.
@ -40,7 +40,6 @@ Download the Ubuntu 20.04 ISO file [here](https://releases.ubuntu.com/20.04/) an
The process here is the same as in section [Burning the Bootstrap Image](./2_bootstrap_image.md#burn-the-zero-os-bootstrap-image), but with the Linux ISO instead of the Zero-OS ISO. [BalenaEtcher](https://www.balena.io/etcher/) is recommended as it formats your USB in the process, and it is available for MAC, Windows and Linux.
## 2. Boot Linux in *Try Mode*
When you boot the Linux ISO image, make sure to choose *Try Mode*. Otherwise, it will install Linux on your computer. You do not want this.
@ -49,58 +48,52 @@ When you boot the Linux ISO image, make sure to choose *Try Mode*. Otherwise, it
## 3. Use wipefs to Wipe All the Disks
When you use wipefs, you are removing all the data on your disk. Make sure you have no important data on your disks, or make sure you have copies of your disks before doing this operation, if needed.
We will now use `wipefs` to remove all the data on the disks.
Once Linux is booted, go into the terminal and write the following command lines.
> Important: Make sure that you have no important data on your disks, or make sure that you have copies of your disks before proceeding.
First, you can check the available disks by writing in a terminal or in a shell:
Once Linux is booted, open the terminal.
First, you can check the available disks by writing the command:
```
lsblk
```
To see what disks are connected, write this command:
The types of disk you can see are:
- `sdX`
- SATA type
- e.g. `sda`
- Note: It can be an SSD disk or a USB key
- `nvmeX`
- NVMe type
- e.g. `nvme0n1`
### SATA Disks
To wipe one specific SATA disk at a time, use the following command by replacing `sdX` with the specific disk (e.g. `sdb`):
```
fdisk -l
sudo wipefs -af /dev/sdX
```
If you want to wipe one specific disk, here we use *sda* as an example, write this command:
To wipe all SATA disks (except the Linux distro USB disk you are currently using to run Ubuntu in *Try Mode*), take note of the Linux distro USB disk (e.g. `sdb`) and replace `sdX` with it in the following line:
```
sudo wipefs -a /dev/sda
sudo for i in /dev/sd*; do if [ "$i"!= "/dev/sdX"* ]; then wipefs -af $i; fi; done
```
And replace the "a" in sda by the letter of your disk, as shown when you did *lsblk*. The term *sudo* gives you the correct permission to do this.
### NVMe Disks
To wipe all the disks in your 3Node, write the command:
To wipe one specific NVMe disk at a time, use the following command by replacing `nvmeX` with the specific disk (e.g. `nvme0n1`) :
```
sudo for i in /dev/sd*; do wipefs -a $i; done
sudo wipefs -af /dev/nvmeX
```
If you have any `fdisk` entries that look like `/dev/nvme`, you'll need to adjust the command line.
For a nvme disk, here we use *nvme0* as an example, write:
To wipe all NVMe disks, use the following line:
```
sudo wipefs -a /dev/nvme0
```
And replace the "0" in nvme0 by the number corresponding to your disk, as shown when you did *lsblk*.
To wipe all the nvme disks, write this command line:
```
sudo for i in /dev/nvme*; do wipefs -a $i; done
```
## Troubleshooting
If you're having issues wiping the disks, you might need to use **--force** or **-f** with wipefs (e.g. **sudo wipefs -af /dev/sda**).
If you're having trouble getting your disks recognized by Zero-OS, some farmers have had success enabling AHCI mode for SATA in their BIOS.
If you are using a server with onboard storage, you might need to re-flash the RAID card. [Read the FAQ](faq@@faq) for more information.
sudo for i in /dev/nvme*; do wipefs -af $i; done
```

View File

@ -24,10 +24,10 @@ The Node Status bot provides realtime status updates and alerts on status change
To run the bot, you need to have a TFChain account activated with a twin. For this, you can simply create an account on the ThreeFold Dashboard.
- [A TFChain account](dashboard:wallet_connector.md)
- [A TFChain account](dashboard@@wallet_connector)
- TFT in your TFChain account
- [Buy TFT](threefold_token:buy_sell_tft.md)
- [Send TFT to TFChain](threefold_token:tft_bridges.md)
- [Buy TFT](threefold_token@@buy_sell_tft)
- [Send TFT to TFChain](threefold_token@@tft_bridges)
## Deploy a Micro VM