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 Docs] Replace References to AppGateServer with PATH #945

Merged
merged 13 commits into from
Dec 11, 2024
Merged
4 changes: 2 additions & 2 deletions docusaurus/docs/develop/contributing/observability.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ We are still refining our observability guidelines. If in doubt - please reach o
- [Best Practices](#best-practices)
- [Examples](#examples)
- [Counter](#counter)
- [x/proof/keeper/msg_server_create_claim.go](#xproofkeepermsg_server_create_claimgo)
- [x/proof/keeper/msg\_server\_create\_claim.go](#xproofkeepermsg_server_create_claimgo)
- [Gauage](#gauage)
- [x/tokenomics/module/abci.go](#xtokenomicsmoduleabcigo)
- [Histogram](#histogram)
Expand All @@ -28,7 +28,7 @@ We are still refining our observability guidelines. If in doubt - please reach o
In our system, metrics are exposed using the Prometheus exporter. This approach aligns with tools like Rollkit, and we
leverage the [go-kit metrics package](https://pkg.go.dev/github.com/go-kit/kit/metrics) for custom metrics
implementation. For practical examples of metric definitions, refer to
[AppGate Metrics](https://github.com/pokt-network/poktroll/blob/main/pkg/appgateserver/metrics.go).
[RelayMiner Metrics](https://github.com/pokt-network/poktroll/blob/main/pkg/relayer/proxy/metrics.go).

### Types of Metrics

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ title: Performance troubleshooting
- [Available `pprof` Endpoints](#available-pprof-endpoints)
- [Configure Software to Expose `pprof` Endpoints](#configure-software-to-expose-pprof-endpoints)
- [Full Nodes and Validator Configuration](#full-nodes-and-validator-configuration)
- [AppGate Server and RelayMiner](#appgate-server-and-relayminer)
- [RelayMiner](#relayminer)
- [Save the Profiling Data](#save-the-profiling-data)
- [Explore the Profiling Data](#explore-the-profiling-data)
- [Explore without saving data](#explore-without-saving-data)
Expand Down Expand Up @@ -98,10 +98,9 @@ on a particular network interface and port. By default, `pprof` listens on `loca

If the value has been modified, you must restart the process.

#### AppGate Server and RelayMiner
#### RelayMiner

Both `AppGate Server` and `RelayMiner` can be configured to expose a `pprof`
endpoint using a configuration file like this:
The `RelayMiner` can be configured to expose a `pprof` endpoint using a configuration file like this:

```yaml
pprof:
Expand Down
67 changes: 17 additions & 50 deletions docusaurus/docs/develop/developer_guide/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,11 @@ Create a new [GitHub issue here](https://github.com/pokt-network/pocket/issues/n
- [3.4 Stake the new Supplier](#34-stake-the-new-supplier)
- [3.4 Prepare the RelayMiner configuration](#34-prepare-the-relayminer-configuration)
- [3.5 Start the RelayMiner locally](#35-start-the-relayminer-locally)
- [4. Manually Stake an Application \& Deploy an AppGate Server](#4-manually-stake-an-application--deploy-an-appgate-server)
- [4. Manually Stake an Application \& Deploy a PATH Gateway](#4-manually-stake-an-application--deploy-a-path-gateway)
- [4.1 View Existing Application](#41-view-existing-application)
- [4.2 Create an Application configuration](#42-create-an-application-configuration)
- [4.3 Stake the new Application](#43-stake-the-new-application)
- [4.4 Prepare the AppGate Server configuration](#44-prepare-the-appgate-server-configuration)
- [4.5 Start the AppGate Server locally](#45-start-the-appgate-server-locally)
- [4.4 Prepare the PATH Gateway configuration](#44-prepare-the-path-gateway-configuration)
- [5. Send A Relay](#5-send-a-relay)
- [5.1 Send a relay on Shannon](#51-send-a-relay-on-shannon)
- [5.2 What just happened?](#52-what-just-happened)
Expand Down Expand Up @@ -475,7 +474,7 @@ new shell instance.

:::

## 4. Manually Stake an Application & Deploy an AppGate Server
## 4. Manually Stake an Application & Deploy a PATH Gateway

:::note Independent Gateway

Expand Down Expand Up @@ -531,46 +530,13 @@ You can also you re-run, `make app_list` you should see that `SHANNON_APPLICATIO

![Apps](./img/quickstart_applist.png)

### 4.4 Prepare the AppGate Server configuration
### 4.4 Prepare the PATH Gateway configuration

You can learn more about our [appgate server configs here](../../operate/configs/appgate_server_config.md).

The following example should get you started:

```yaml
cat <<EOF >> shannon_appgate_config.yaml
query_node_rpc_url: tcp://127.0.0.1:26657
query_node_grpc_url: tcp://127.0.0.1:9090
self_signing: true
signing_key: shannon_application
listening_endpoint: http://localhost:42042
metrics:
enabled: true
addr: :9091
EOF
```

### 4.5 Start the AppGate Server locally

:::warning
You might need to add the following to your `/etc/hosts` file:
127.0.0.1 anvil
127.0.0.1 relayminers
:::

And the start the appgate server locally:

```bash
poktrolld appgate-server \
--config shannon_appgate_config.yaml \
--keyring-backend test \
--node tcp://127.0.0.1:26657 \
--home=./localnet/poktrolld
```
You can learn more about our [PATH Gateway configs here](https://path.grove.city/operate).

## 5. Send A Relay

Now that we've staked an `Application`, are running an `AppGate Server`, staked
Now that we've staked an `Application`, are running a `PATH Gateway`, staked
a `Supplier`, and are running a `RelayMiner`, we can send a relay!

:::note Initialize Public Keys
Expand All @@ -590,7 +556,7 @@ You can use `curl`
```bash
curl -X POST -H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' \
http://localhost:42042/anvil
http://anvil.localhost:3000/v1
```

If everything worked as expected, you should see output similar to the following:
Expand All @@ -609,16 +575,16 @@ The Relay Request/Response from is captured in the sequence diagram below.
sequenceDiagram
actor U as User <br> (curl Client)

participant AG as AppGate Server <br> (off-chain Application Operator)
participant PG as PATH Gateway<br> (off-chain Application Operator)
participant RM as RelayMiner <br> (off-chain Supplier Operator)
participant anvil as ETH Node <br> (Anvil)

U ->> +AG: eth_blockNumber <br> (JSON-RPC Request)
AG ->> +RM: POKT Relay Request
U ->> +PG: eth_blockNumber <br> (JSON-RPC Request)
PG ->> +RM: POKT Relay Request
RM ->> +anvil: eth_blockNumber
anvil ->> -RM: eth_result
RM ->> -AG: POKT Relay Response
AG ->> -U: eth_result <br> (JSON-RPC Response)
RM ->> -PG: POKT Relay Response
PG ->> -U: eth_result <br> (JSON-RPC Response)
```

### 5.3 What will happen later
Expand Down Expand Up @@ -654,16 +620,17 @@ make supplier3_stake

Running `make supplier_list` should now show that all three suppliers are staked.

You can reuse the running AppGate Server to send requests, which should round-robin
through all the available suppliers. However, since not all of them have a RelayMiner
running, you'll see that some of requests will fail.
You can reuse the running `PATH Gateway` to send requests. However, since not all
of them have a `RelayMiner` running, you'll see that initially some of requests will fail.
Meanwhile `PATH Gateway` will build a set of responsive `RelayMiner`s excluding the
failing ones.

Give it a shot by running the following multiple times:

```bash
curl -X POST -H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' \
http://localhost:42042/anvil
http://anvil.localhost:3000/v1
```

### 5.5. Inspect the logs
Expand Down
200 changes: 0 additions & 200 deletions docusaurus/docs/develop/packages/appgate_server.md

This file was deleted.

Loading
Loading