Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GATEWAY POC] A couple helpers to help deploy a PATH gateway #801

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading