From 4d63923bc8e05cf6feefaeb30ec821520b9b4c56 Mon Sep 17 00:00:00 2001 From: Daniel Olshansky Date: Mon, 9 Sep 2024 10:49:32 -0700 Subject: [PATCH] [GATEWAY POC] A couple helpers to help deploy a PATH gateway (#801) Update the docs to also stake a gateway so we can use it with PATH. --- .../docker_compose_debian_cheatsheet.md | 24 +++++++++++++++++-- .../quickstart/docker_compose_walkthrough.md | 7 ++++++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/docusaurus/docs/operate/quickstart/docker_compose_debian_cheatsheet.md b/docusaurus/docs/operate/quickstart/docker_compose_debian_cheatsheet.md index ec203692a..6da42781b 100644 --- a/docusaurus/docs/operate/quickstart/docker_compose_debian_cheatsheet.md +++ b/docusaurus/docs/operate/quickstart/docker_compose_debian_cheatsheet.md @@ -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 @@ -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 @@ -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 @@ -302,3 +320,5 @@ docker compose up -d appgate-server-example # View docker logs -f --tail 100 appgate_server ``` + +### Re-stake the gateway diff --git a/docusaurus/docs/operate/quickstart/docker_compose_walkthrough.md b/docusaurus/docs/operate/quickstart/docker_compose_walkthrough.md index 913160acb..cf9b7f398 100644 --- a/docusaurus/docs/operate/quickstart/docker_compose_walkthrough.md +++ b/docusaurus/docs/operate/quickstart/docker_compose_walkthrough.md @@ -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) +```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