Skip to content

Commit

Permalink
[GATEWAY POC] A couple helpers to help deploy a PATH gateway (#801)
Browse files Browse the repository at this point in the history
Update the docs to also stake a gateway so we can use it with PATH.
  • Loading branch information
Olshansk authored Sep 9, 2024
1 parent 5ee73d4 commit 4d63923
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ import ReactPlayer from "react-player";
- [Stake an Application \& Deploy an AppGate Server](#stake-an-application--deploy-an-appgate-server)
- [Send a Relay](#send-a-relay)
- [Ensure you get a response](#ensure-you-get-a-response)
- [\[BONUS\] Deploy a PATH Gateway](#bonus-deploy-a-path-gateway)
- [Managing a re-genesis](#managing-a-re-genesis)
- [Full Nodes](#full-nodes)
- [Fund the same accounts](#fund-the-same-accounts)
- [Faucet is not ready and you need to fund the accounts manually](#faucet-is-not-ready-and-you-need-to-fund-the-accounts-manually)
- [Start the RelayMiner](#start-the-relayminer)
- [Start the AppGate Server](#start-the-appgate-server)
- [Re-stake the gateway](#re-stake-the-gateway)

## Results

Expand Down Expand Up @@ -233,6 +235,22 @@ for i in {1..10}; do
done
```

## [BONUS] Deploy a PATH Gateway

If you want to deploy a real Gateway, you can use [Grove's PATH](https://github.com/buildwithgrove/path)
after running the following commands:

```bash
# Stake the gateway
poktrolld tx gateway stake-gateway --config=/poktroll/stake_configs/gateway_stake_config_example.yaml --from=gateway --chain-id=poktroll --yes
# Delegate from the application to the gateway
poktrolld tx application delegate-to-gateway $GATEWAY_ADDR --from=application --chain-id=poktroll --chain-id=poktroll --yes

# OPTIONALLY check the gateway's and application's status
poktrolld query gateway show-gateway $GATEWAY_ADDR
poktrolld query application show-application $APPLICATION_ADDR
```

## Managing a re-genesis

Assuming you already had everything functioning following the steps above, this
Expand All @@ -242,14 +260,14 @@ is a quick way to reset everything (without recreating keys) after a re-genesis.

```bash
# Stop all containers
docker-compose down
docker compose down
docker rm $(docker ps -aq) -f

# Remove existing data
rm -rf poktrolld-data/config/addrbook.json poktrolld-data/config/genesis.json poktrolld-data/data/ poktrolld-data/config/node_key.json poktrolld-data/config/priv_validator_key.json
```

Update `POKTROLLD_IMAGE_TAG` in `.env` based on the releases [here](https://github.com/pokt-network/poktroll/releases/tag/v0.0.6).
Update `POKTROLLD_IMAGE_TAG` in `.env` based on the releases [here](https://github.com/pokt-network/poktroll/releases).

```bash
# Start the full
Expand Down Expand Up @@ -302,3 +320,5 @@ docker compose up -d appgate-server-example
# View
docker logs -f --tail 100 appgate_server
```

### Re-stake the gateway
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import ReactPlayer from "react-player";
- [B. Creating a Supplier and Deploying a RelayMiner](#b-creating-a-supplier-and-deploying-a-relayminer)
- [C. Creating an Application and Deploying an AppGate Server](#c-creating-an-application-and-deploying-an-appgate-server)
- [D. Creating a Gateway Deploying an Gateway Server](#d-creating-a-gateway-deploying-an-gateway-server)
- [\[BONUS\] Deploy a PATH Gateway](#bonus-deploy-a-path-gateway)

<!--
Expand Down Expand Up @@ -628,7 +629,13 @@ docker-compose logs -f --tail 100 gateway-example

### Delegate your Application to the Gateway <!-- omit in toc -->

```bash
poktrolld tx application delegate-to-gateway $GATEWAY_ADDR --from=application-1 --chain-id=poktroll --chain-id=poktroll --yes
```

### [BONUS] Deploy a PATH Gateway

If you want to deploy a real Gateway, you can use [Grove's PATH](https://github.com/buildwithgrove/path).

### Send a relay <!-- omit in toc -->

Expand Down

0 comments on commit 4d63923

Please sign in to comment.