Skip to content

Commit

Permalink
Merge pull request #572 from threefoldtech/development_algo
Browse files Browse the repository at this point in the history
Development algo
  • Loading branch information
khaledyoussef24 committed Jun 27, 2024
2 parents 4590b4c + 84189e3 commit 64e9611
Showing 1 changed file with 12 additions and 40 deletions.
52 changes: 12 additions & 40 deletions src/documentation/dashboard/solutions/algorand.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -23,19 +22,17 @@
- 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 also run those nodes on 4 different networks. Combining the types you can get:
- Default:
- This is a Non-relay and Non-participant
- It can run on Devnet, Testnet, Betanet and Mainnet.
- Relay:
- A relay node can't be participant.
- It can run only on Testnet and Mainnet
- Participant:
- Can run on any of the four networks.
- Indexer:
- It is a default node but with Archival Mode enabled 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

Expand All @@ -56,6 +53,7 @@ Here you see your node runs on mainnet.
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 a public ip.

![relaydep](./img/algorand_relaydep.png)

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).
Expand All @@ -64,32 +62,6 @@ Once the deployment is done, SSH into the node and run `goal node status` to see

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 blocks in the Algorand blockchain.

Participation node is responsible for hosting participation keys for one or more online accounts.

- What do you need?
- Account mnemonics on the network you deploy on (offline) you can check the status for you account on the AlgoExplorer. Search using 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)

Once the deployment is done, SSH into the node and run `goal node status` to see the status of the node. You can see it doing catchup and the fast catchup is to make the node synchronize with the latest block faster by only fetching the last 1k blocks. After this is done, it will start to 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.
Expand Down

0 comments on commit 64e9611

Please sign in to comment.