Skip to content

Commit

Permalink
add appgate
Browse files Browse the repository at this point in the history
  • Loading branch information
okdas committed Mar 20, 2024
1 parent 64e873d commit f11288c
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 108 deletions.
2 changes: 1 addition & 1 deletion docusaurus/docs/internal_infrastructure/_category_.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "Internal infrastructure",
"position": 8,
"position": 10,
"link": {
"type": "generated-index",
"description": "Documentation for internal Pocket network team infrastructure: LocalNet, DevNet and TestNets."
Expand Down
2 changes: 1 addition & 1 deletion docusaurus/docs/run_a_node/_category_.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "Run a Node",
"position": 10,
"position": 8,
"link": {
"type": "generated-index",
"description": "Guides and documentation on how to run Pocket Network software"
Expand Down
16 changes: 16 additions & 0 deletions docusaurus/docs/run_a_node/appgate_server.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
**AppGate Server - Docker Compose**

- [What is AppGate Server](#what-is-appgate-server)
- [Docker Compose Example Repository](#docker-compose-example-repository)

### What is AppGate Server

An AppGate Server plays a crucial role within the Pocket Network ecosystem, serving as a bridge between decentralized applications (dApps), such as mobile or web applications, and the Suppliers operating on the Pocket Network. Its primary function is to handle the necessary intermediary logic and facilitate seamless communication and transactions.

If you're a Node Runner interested in deploying a [Gateway](../actors/gateway.md) or a sovereign [Application](../actors/application.md) that requires direct access to Pocket Network functionalities, setting up an AppGate Server is highly recommended.

### Docker Compose Example Repository

To simplify the process of deploying an AppGate Server, we have created an illustrative example utilizing Docker Compose. This example is hosted in the [poktroll-docker-compose-example](https://github.com/pokt-network/poktroll-docker-compose-example?tab=readme-ov-file#deploying-an-appgate-server) GitHub repository.

Please refer to the "Deploying an AppGate Server" section within the repository for detailed instructions and guidance on setting up your AppGate Server using the provided Docker Compose example.
72 changes: 10 additions & 62 deletions docusaurus/docs/run_a_node/full_node.md
Original file line number Diff line number Diff line change
@@ -1,70 +1,18 @@
---
title: Full Node - Docker Compose
---
**Full Node - Docker Compose**

- [What is a Full Node?](#what-is-a-full-node)
- [0. Prerequisites](#0-prerequisites)
- [1. Clone the Repository](#1-clone-the-repository)
- [2. Download Network Genesis](#2-download-network-genesis)
- [3. Configure Environment Variables](#3-configure-environment-variables)
- [4. Launch the Node](#4-launch-the-node)
- [What is a Full Node](#what-is-a-full-node)
- [Docker Compose Example Repository](#docker-compose-example-repository)

### What is a Full Node

### What is a Full Node?
In a blockchain network, a Full Node retains a complete copy of the ledger, verifying all transactions and blocks according to the network's rules. While it does not play a role in block creation or consensus, it is crucial for ensuring data integrity, enhancing network security, and fostering decentralization. Full Nodes facilitate this by distributing transactions and blocks to other nodes.

A full node in a blockchain network maintains a complete copy of the ledger, verifying transactions and blocks against the network's rules without participating in block creation or consensus. It ensures data accuracy, supports network security, and promotes decentralization by relaying transactions and blocks to other nodes.
Within the Pocket Network ecosystem, the role of Full Nodes is pivotal for Node Runners. These nodes are essential for off-chain entities like RelayMiners and AppGates, which rely on interaction with the Pocket Network blockchain for optimal functionality.

Within the Pocket Network ecosystem, Full Nodes are especially important for Node Runners. This is because our off-chain actors, such as RelayMiners and AppGates, require communication with the Pocket Network blockchain to function properly.
This guide outlines the setup process for a Full Node using Docker Compose, offering a simplified and efficient method for launching a Full Node.

This guide will demonstrate the process of setting up a Full Node using Docker Compose. This method offers a straightforward and efficient approach to initiate a full node operation.
### Docker Compose Example Repository

### 0. Prerequisites

Ensure the following software is installed on your system:
- [git](https://github.com/git-guides/install-git);
- [Docker](https://docs.docker.com/engine/install/);
- [docker-compose](https://docs.docker.com/compose/install/#installation-scenarios);

Additionally, the system and network setup must be capable of exposing ports to the internet for peer-to-peer communication.

### 1. Clone the Repository

```
git clone https://github.com/pokt-network/poktroll-docker-compose-example.git
cd poktroll-docker-compose-example
```

### 2. Download Network Genesis

The Poktrolld blockchain deploys various networks (e.g., testnets, mainnet). Access the list of Poktrolld networks available for community participation here: [Poktrolld Networks](https://github.com/pokt-network/pocket-network-genesis/tree/master/poktrolld).

Download and place the genesis.json for your chosen network (e.g., testnet-validated) into the poktrolld/config directory:

```bash
NETWORK_NAME=testnet-validated curl https://raw.githubusercontent.com/pokt-network/pocket-network-genesis/master/poktrolld/${NETWORK_NAME}.json > poktrolld-data/config/genesis.json
```

### 3. Configure Environment Variables

Create and configure your `.env` file from the sample:

```bash
cp .env.sample .env
```

Update `NODE_HOSTNAME` in `.env` to the IP address or hostname of your node.

### 4. Launch the Node

Initiate the node with:

```bash
docker-compose up -d
```

Monitor node activity through logs with:

```bash
docker-compose logs -f
```
To help you understand how a Full Node can be operated with Docker Compose, we have prepared an example in the [poktroll-docker-compose-example](https://github.com/pokt-network/poktroll-docker-compose-example) GitHub repository.

Please refer to the "Deploying a Full Node" section of the guide in that repository for detailed instructions on setting up your Full Node using the provided Docker Compose example.
52 changes: 8 additions & 44 deletions docusaurus/docs/run_a_node/relay_miner.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,14 @@
---
title: RelayMiner - Docker Compose
---
**RelayMiner - Docker Compose**

### What is a RelayMiner?
- [What is a RelayMiner](#what-is-a-relayminer)
- [Docker Compose Example Repository](#docker-compose-example-repository)

RelayMiner is a type of node that node runners can deploy to provide service via Pocket Network. Read more in [RelayMiner documentation](../actors/relay_miner.md).
### What is a RelayMiner

### 0. Prerequisites
A RelayMiner is a specialized node designed for individuals to offer services through the Pocket Network. For more information on this role, please refer to the [RelayMiner documentation](../actors/relay_miner.md). Unlike the Pocket Morse Mainnet client, which supports service provision on the current Pocket Network Mainnet and maintains a copy of the blockchain data, the RelayMiner operates without storing blockchain data. Instead, it relies on connections to Full Nodes for interacting with the blockchain. It is crucial to deploy a [Full Node](full_node.md) prior to setting up a RelayMiner, as this ensures the necessary infrastructure for blockchain communication is in place.

Ensure the following software is installed on your system:
- [git](https://github.com/git-guides/install-git);
- [Docker](https://docs.docker.com/engine/install/);
- [docker-compose](https://docs.docker.com/compose/install/#installation-scenarios);
<!-- - TODO(@okdas): provide a link to binaries -->
- poktrolld binary;
<!-- - TODO(@okdas): what's the correct amount to stake? -->
- POKT tokens to stake your relayminer and allow it to submit transactions;
### Docker Compose Example Repository

### Generate new key and fund the wallet
To help you get started with deploying a RelayMiner, we have prepared an example using Docker Compose. This example is available in the [poktroll-docker-compose-example](https://github.com/pokt-network/poktroll-docker-compose-example?tab=readme-ov-file#deploying-a-relay-miner) GitHub repository.

:::info

Some **content** with _Markdown_ `syntax`. Check [this `api`](#).

In this example, we use "test" keyring to showcase how to run RelayMiner. It is not advisable to use this method in production.
Please, consult with [this documentation page](https://docs.cosmos.network/v0.50/user/run-node/keyring) to
understand what other options are available.

:::

Your relayminer will need access to the keys to submit transactions on the network.
```
KEY_NAME="relayminer1" poktrolld --keyring-backend=test --home=./$KEY_NAME keys add $KEY_NAME
```

### Docker compose



### Stake

TODO(@okdas): link to staking config

```
poktrolld --keyring-backend=test --home=/Users/dk/tmp/poktroll-validated-2/ --node=https://testnet-validated-validator-rpc.poktroll.com/ tx supplier stake-supplier --config=/Users/dk/pocket/poktroll/localnet/poktrolld/config/dimasupp.yaml --from=key-for-relayminer1 --chain-id=poktroll
```


### Run
Please refer to the "Deploying a RelayMiner" section within the repository for detailed instructions and guidance on setting up your RelayMiner using the provided Docker Compose example.

0 comments on commit f11288c

Please sign in to comment.