-
Notifications
You must be signed in to change notification settings - Fork 12
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
[Documentation] Load Testing on DevNets and TestNets #637
Changes from all commits
702520d
678407c
98fbc27
e79cd81
1eac4dd
6622e43
9537e37
8bbdcc3
e899039
0296cf7
fb520a5
91dd241
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,9 +1,9 @@ | ||||||||||||||||||||||||||||||||||||||||||
--- | ||||||||||||||||||||||||||||||||||||||||||
sidebar_position: 3 | ||||||||||||||||||||||||||||||||||||||||||
title: DevNet | ||||||||||||||||||||||||||||||||||||||||||
title: DevNets | ||||||||||||||||||||||||||||||||||||||||||
--- | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
# DevNet <!-- omit in toc --> | ||||||||||||||||||||||||||||||||||||||||||
# DevNets <!-- omit in toc --> | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
:::note | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
|
@@ -20,6 +20,15 @@ to set up your access to GCP. | |||||||||||||||||||||||||||||||||||||||||
- [Grafana logs](#grafana-logs) | ||||||||||||||||||||||||||||||||||||||||||
- [Infrastructure Provisioning](#infrastructure-provisioning) | ||||||||||||||||||||||||||||||||||||||||||
- [Configuration](#configuration) | ||||||||||||||||||||||||||||||||||||||||||
- [Interaction with DevNet](#interaction-with-devnet) | ||||||||||||||||||||||||||||||||||||||||||
- [DevNet types](#devnet-types) | ||||||||||||||||||||||||||||||||||||||||||
- [Manually provisioned DevNets](#manually-provisioned-devnets) | ||||||||||||||||||||||||||||||||||||||||||
- [How to create](#how-to-create) | ||||||||||||||||||||||||||||||||||||||||||
- [How to delete](#how-to-delete) | ||||||||||||||||||||||||||||||||||||||||||
- [Configuring and updating DevNets](#configuring-and-updating-devnets) | ||||||||||||||||||||||||||||||||||||||||||
- [Scaling actors up and down](#scaling-actors-up-and-down) | ||||||||||||||||||||||||||||||||||||||||||
- [Run e2e tests on a manually provisioned DevNet](#run-e2e-tests-on-a-manually-provisioned-devnet) | ||||||||||||||||||||||||||||||||||||||||||
- [Staking actors](#staking-actors) | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
## GCP Console | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
|
@@ -54,3 +63,127 @@ Each DevNet ArgoCD App (following the App of Apps pattern) provisions a Helm cha | |||||||||||||||||||||||||||||||||||||||||
Each `full-network` includes other ArgoCD applications that deploy Validators and off-chain actors. | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
Each Helm chart receives a list of configuration files. For example, see the [relayminer configuration](https://github.com/pokt-network/protocol-infra/blob/main/charts/full-network/templates/Application-Relayminer.yaml#L37). All possible values can be found in the `values.yaml` of the Helm chart, such as the [relayminer Helm chart](https://github.com/pokt-network/helm-charts/blob/main/charts/relayminer/values.yaml). | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
## Interaction with DevNet | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
:::note | ||||||||||||||||||||||||||||||||||||||||||
Devnets are provisioned with the same mnemonc phrases as LocalNet, so it is possible to reuse the same keys | ||||||||||||||||||||||||||||||||||||||||||
from the keybase - the user just needs to change the `--node=` flag to point to the DevNet RPC endpoint when using the `poktrolld` CLI. | ||||||||||||||||||||||||||||||||||||||||||
::: | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
The DevNet RPC endpoint is exposed on `https://devnet-**NETWORK_NAME**-validator-rpc.poktroll.com`. | ||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a list or an example of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would an example a few lines below count? 😅
Comment on lines
+67
to
+74
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Provide an example for the devnet name in environment variables. Add an example to clarify how the devnet name should be specified in the environment variables. - The DevNet RPC endpoint is exposed on `https://devnet-**NETWORK_NAME**-validator-rpc.poktroll.com`.
+ The DevNet RPC endpoint is exposed on `https://devnet-**NETWORK_NAME**-validator-rpc.poktroll.com` (e.g., `NETWORK_NAME=sophon`). Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
It is possible to reuse the LocalNet make targets with DevNet endpoints. For example | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
```bash | ||||||||||||||||||||||||||||||||||||||||||
POCKET_NODE=https://devnet-issue-420-validator-rpc.poktroll.com make supplier_list | ||||||||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
## DevNet types | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
We have two types of DevNets: | ||||||||||||||||||||||||||||||||||||||||||
1. Automatically provisioned by `devnet-test-e2e` GitHub label. | ||||||||||||||||||||||||||||||||||||||||||
- Their main purpose is to automatically run e2e tests for each PR this label has been assigned to. | ||||||||||||||||||||||||||||||||||||||||||
- They are not easily modified and configured. E.g. we automatically provision single instance of each actor only. | ||||||||||||||||||||||||||||||||||||||||||
2. Manually provisioned by creating a file in [protocol-infra repo under `devnet-configs` directory](https://github.com/pokt-network/protocol-infra/tree/main/devnets-configs). | ||||||||||||||||||||||||||||||||||||||||||
- Their main purpose is for testing new features or configurations that require more complex setups than the first type can provide. | ||||||||||||||||||||||||||||||||||||||||||
- They are easily modified and configured, allowing you to add multiple instances of each actor. | ||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+84
to
+90
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix unordered list indentation. The unordered list items should be properly indented. - - Their main purpose is to automatically run e2e tests for each PR this label has been assigned to.
- - They are not easily modified and configured. E.g. we automatically provision single instance of each actor only.
- - Their main purpose is for testing new features or configurations that require more complex setups than the first type can provide.
- - They are easily modified and configured, allowing you to add multiple instances of each actor.
+ - Their main purpose is to automatically run e2e tests for each PR this label has been assigned to.
+ - They are not easily modified and configured. E.g. we automatically provision single instance of each actor only.
+ - Their main purpose is for testing new features or configurations that require more complex setups than the first type can provide.
+ - They are easily modified and configured, allowing you to add multiple instances of each actor. Committable suggestion
Suggested change
ToolsLanguageTool
Markdownlint
|
||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
## Manually provisioned DevNets | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
### How to create | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
Commit a new YAML file in the [devnets-configs](https://github.com/pokt-network/protocol-infra/tree/main/devnets-configs) | ||||||||||||||||||||||||||||||||||||||||||
directory on the `main` branch. Use [this template](https://github.com/pokt-network/protocol-infra/blob/main/devnets-configs/_TEMPLATE_YAML_) | ||||||||||||||||||||||||||||||||||||||||||
as a reference. If you are not a member of the protocol team, open a pull request (PR) to add the new YAML file to the | ||||||||||||||||||||||||||||||||||||||||||
`main` branch. Protocol team members can bypass the `main` branch protection to commit directly without going through | ||||||||||||||||||||||||||||||||||||||||||
the PR flow. | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
### How to delete | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
Remove the devnet config file by committing the deletion to the `main` branch. If you are not a member of the protocol | ||||||||||||||||||||||||||||||||||||||||||
team, open a pull request (PR) to delete the YAML file from the `main` branch. Protocol team members can bypass the | ||||||||||||||||||||||||||||||||||||||||||
`main` branch protection to commit the deletion directly without going through the PR flow. | ||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+94
to
+106
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Clarify instructions for creating and deleting DevNet config files. The instructions should mention that the new file needs to be merged to the main branch for the changes to take effect. - Commit a new YAML file in the [devnets-configs](https://github.com/pokt-network/protocol-infra/tree/main/devnets-configs)
- directory on the `main` branch. Use [this template](https://github.com/pokt-network/protocol-infra/blob/main/devnets-configs/_TEMPLATE_YAML_)
- as a reference. If you are not a member of the protocol team, open a pull request (PR) to add the new YAML file to the
- `main` branch. Protocol team members can bypass the `main` branch protection to commit directly without going through
- the PR flow.
+ Create a new YAML file in [devnets-configs](https://github.com/pokt-network/protocol-infra/tree/main/devnets-configs) and merge it to the main branch. Use [this template](https://github.com/pokt-network/protocol-infra/blob/main/devnets-configs/_TEMPLATE_YAML_) as a reference. If you are not a member of the protocol team, open a pull request (PR) to add the new YAML file to the main branch. Protocol team members can bypass the main branch protection to commit directly without going through the PR flow.
- Remove the devnet config file by committing the deletion to the `main` branch. If you are not a member of the protocol
- team, open a pull request (PR) to delete the YAML file from the `main` branch. Protocol team members can bypass the
- `main` branch protection to commit the deletion directly without going through the PR flow.
+ Remove the devnet config file and merge the changes to the main branch. If you are not a member of the protocol team, open a pull request (PR) to delete the YAML file from the main branch. Protocol team members can bypass the main branch protection to commit the deletion directly without going through the PR flow. Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
### Configuring and updating DevNets | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
New container images are automatically built on each merge to the `main` branch and each push to non-main branches for which there exists a PR with the `push-image` label. | ||||||||||||||||||||||||||||||||||||||||||
Images named according to the following format: | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||||||||
ghcr.io/pokt-network/poktrolld:sha-7042be3 | ||||||||||||||||||||||||||||||||||||||||||
ghcr.io/pokt-network/poktrolld:sha-7042be3922245fb4313ee90e1f28d0f402b700a0 | ||||||||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+110
to
+116
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Specify language for fenced code blocks. Fenced code blocks should have a language specified for syntax highlighting. - ```
+ ```yaml ToolsMarkdownlint
Comment on lines
+113
to
+116
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Specify language for fenced code blocks. Fenced code blocks should have a language specified for syntax highlighting. - ```
+ ```yaml ToolsMarkdownlint
|
||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
You can update the version of DevNet by changing this parameter in the devnet config file: | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
```yaml | ||||||||||||||||||||||||||||||||||||||||||
image: | ||||||||||||||||||||||||||||||||||||||||||
tag: sha-7042be3 | ||||||||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
All parameters in this config are passed to the [downstream helm chart](https://github.com/pokt-network/protocol-infra/tree/main/charts/full-network) via an [ArgoCD Application](https://github.com/pokt-network/protocol-infra/blob/main/clusters/protocol-us-central1/devnets-persistent.yaml). | ||||||||||||||||||||||||||||||||||||||||||
Here is a [list of all options](https://github.com/pokt-network/protocol-infra/blob/main/charts/full-network/values.yaml) which can be modified, in addition to the image tag. | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
### Scaling actors up and down | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
You can modify the number of each actor by changing the devnet config file: | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
:::info | ||||||||||||||||||||||||||||||||||||||||||
We use the same ignite `config.yaml` to provision genesis in devnet as is used in localnet. Because localnet supports a max of 3 of each actor type, any devnet deployment with more actors would also require additional corresponding genesis state to be included in `config.yaml`, or on-demand account funding and staking. General rule of thumb: don't go over `3`. | ||||||||||||||||||||||||||||||||||||||||||
::: | ||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+130
to
+134
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Clarify the rule of thumb for actor count. Rephrase the note to make it clear that the rule of thumb is to not go over 3 actors. - General rule of thumb: don't go over `3`.
+ General rule of thumb: do not go over three actors. Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
```yaml | ||||||||||||||||||||||||||||||||||||||||||
appgateservers: | ||||||||||||||||||||||||||||||||||||||||||
count: 1 | ||||||||||||||||||||||||||||||||||||||||||
gateways: | ||||||||||||||||||||||||||||||||||||||||||
count: 1 | ||||||||||||||||||||||||||||||||||||||||||
relayminers: | ||||||||||||||||||||||||||||||||||||||||||
count: 1 | ||||||||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
### Run e2e tests on a manually provisioned DevNet | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
To run e2e tests on a manually provisioned DevNet, use the following command from the root of the poktroll repo: | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
```bash | ||||||||||||||||||||||||||||||||||||||||||
IMAGE_TAG=**IMAGE TAG NAME FROM DEVNET CONFIG** NAMESPACE=devnet-**NETWORK NAME** JOB_NAME=e2e-test-**GITSHA FROM IMAGE TAG** POCKET_NODE=tcp://devnet-**NETWORK NAME**-validator-poktrolld:26657 bash .github/workflows-helpers/run-e2e-test.sh | ||||||||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
**Environment Variables**: | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
- **IMAGE_TAG**: The tag of the image from the devnet config YAML file. This tag must match the tag of the image used in the DevNet configuration. | ||||||||||||||||||||||||||||||||||||||||||
- **NAMESPACE**: The name of the devnet. This should be specified in the environment variables and follow the format devnet-**NETWORK NAME**. | ||||||||||||||||||||||||||||||||||||||||||
- **JOB_NAME**: A unique identifier for the e2e test job. It follows the format e2e-test-**GITSHA FROM IMAGE TAG**. | ||||||||||||||||||||||||||||||||||||||||||
- **POCKET_NODE**: The address of the pocket node, following the format tcp://devnet-**NETWORK NAME**-validator-poktrolld:26657. | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
**Example** | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
```bash | ||||||||||||||||||||||||||||||||||||||||||
IMAGE_TAG=sha-7042be3 NAMESPACE=devnet-sophon JOB_NAME=e2e-test-7042be3 POCKET_NODE=tcp://devnet-sophon-validator-poktrolld:26657 bash .github/workflows-helpers/run-e2e-test.sh | ||||||||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
:::info | ||||||||||||||||||||||||||||||||||||||||||
- The `IMAGE_TAG` must match the tag of the image from the devnet config YAML file. | ||||||||||||||||||||||||||||||||||||||||||
- The name of the devnet in the environment variables must be specified. | ||||||||||||||||||||||||||||||||||||||||||
- The Kubernetes context must be pointed to the protocol cluster. This command can be used to change context: | ||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+168
to
+171
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Provide an example for the devnet name in environment variables. Add an example to clarify how the devnet name should be specified in the environment variables. - The name of the devnet in the environment variables must be specified.
+ The name of the devnet in the environment variables must be specified (e.g., `NETWORK_NAME=sophon`). Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||
```bash | ||||||||||||||||||||||||||||||||||||||||||
kubectl config set-context gke_protocol-us-central1-d505_us-central1_protocol-us-central1 | ||||||||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||||||||
::: | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
### Staking actors | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
Since the genesis actor keys are the same as LocalNet, we can use the same commands (and keyring) to stake actors on | ||||||||||||||||||||||||||||||||||||||||||
DevNet. Additionally, DevNets match the hostnames with LocalNet, making it possible for the same stake configs to work on different networks. | ||||||||||||||||||||||||||||||||||||||||||
For example, this command stakes supplier2 on DevNet `devnet-sophon`: | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
```bash | ||||||||||||||||||||||||||||||||||||||||||
POCKET_NODE=https://devnet-sophon-validator-rpc.poktroll.com make supplier2_stake | ||||||||||||||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
:::note | ||||||||||||||||||||||||||||||||||||||||||
Only manually provisioned DevNets have more than one actor to stake. | ||||||||||||||||||||||||||||||||||||||||||
::: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix link fragments in Table of Contents.
Ensure the link fragments match the corresponding section headers.
Tools
LanguageTool