Skip to content

Commit

Permalink
create sandbox testnet guide page
Browse files Browse the repository at this point in the history
  • Loading branch information
serinko committed Jun 14, 2024
1 parent 96e2a39 commit e37d0cb
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 39 deletions.
1 change: 1 addition & 0 deletions documentation/operators/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- [Introduction](introduction.md)
- [Changelog](changelog.md)
- [Release Cycle](release-cycle.md)
- [Sandbox Testnet](sandbox.md)

# Binaries

Expand Down
Binary file added documentation/operators/src/images/sandbox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 10 additions & 39 deletions documentation/operators/src/release-cycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,20 @@ The core team therefore established a flow with different environments:

- ***local***: Developers use their local environments for feature building
- ***canary***: Nym internal testing environment managed by Qualty Assurance team (QA)
- ***sandbox***: Public testnet, including testnet NYM token available in the [faucet](#sandbox-token-faucet)
- [***sandbox***](sandbox.md): Public testnet, including testnet NYM token available in the [faucet](sandbox.md#sandbox-token-faucet)
- ***mainnet***: Nym Mixnet - the production version of Nym network

## Release Flow

Frequency of releases to mainnet is aimed to be every ~14 days. This time time window is an optimal compromise between periodicity and qualty assurance/testing, key factors playing an essential role in the development.

|**Action** | **Environment** | **Branch** | **Ownership** |
| :-- | :-- | :--: | :--: |
| features development -> meged to develop | local/canary | feature branches | devs |
| cut off develop -> QA testing | canary | release branch | QA |
| bug fixing | canary |directly on release branch | QA & devs |
| merge to sandbox after QA approval | canary -> sandbox | release -> master | QA |
| promote to mainnet after 3-5 days | sandbox -> mainnet | master | QA |

<!--
FEEDBACK FROM bn:
Might be easier to understand to have like:
| development work | local/canary | feature branches | devs |
| cut and test release | canary | release branch | QA |
| bug fixing | canary | directly on release branch | QA & devs |
| put release on sandbox | sandbox | release -> master/develop | QA |
| promote release to mainnet after 3-5 days | mainnet | master | QA |
-->
| **Stage** | **Environment** | **Branch** | **Ownership |
| :-- | :-- | :-- | :-- |
| development work | local/canary | feature branches | devs |
| cut and test release | canary | release branch | QA |
| bug fixing | canary | directly on release branch | QA & devs |
| put release on sandbox | sandbox | release -> master/develop | QA |
| promote release to mainnet after 3-5 days | mainnet | master | QA |

```ascii
▲ ▲
Expand Down Expand Up @@ -97,24 +86,6 @@ In case you want to propose changes or resolve some of the existing [issues](htt

```tip
Feature tickets need explicit (while concise) wording because that title is eventually added to the changelog. Keep in mind that bad ticket naming results in bad changelog.
```

## Sandbox Testnet

### Sanbox Environment Setup
<!--
- WHY
- HOW -> env setup
-->

## Sandbox Token Faucet

To run your nodes in the sandbox environment, you need testnet version of NYM token, that can be aquired at [faucet.nymtech.net](https://faucet.nymtech.net).

To prevent abuse, the faucet is rate-limited with the following rules:

- A request grants 101 testing NYM token (100 is a bonding minimum + fees)
- 1 request per wallet every 24 hours
- 2 requests per IP address every 24 hours (so that people can request funds to bond two nodes, one `nym-node` running as Mixnode & and one running as Gateway from unique wallet addresses)
- Request will fail if the requesting wallet already has more than 101 NYM tokens
If you want to run in the testing environment, follow our [Sandbox testnet](sandbox.md) guide.
```
49 changes: 49 additions & 0 deletions documentation/operators/src/sandbox.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Sandbox Testnet

Nym node operators can run their nodes on Nym Sandbox testnet environment. Whether it's testing new configuration, hot features from Nym developers or just trying to setup a node for the first time, this environment is for you. Below are steps to [setup your environment](#sandbox-environment-setup) and an introduction to [Sandbox token faucet](#sandbox-token-faucet).

```admonish warning title=""
This page is for Nym node operators. If you want to run NymVPN CLI over Sandbox testnet, visit our [developers portal](https://nymtech.net/developers/nymvpn/cli.html#testnet-environment).
```

## Sanbox Environment Setup

> Any syntax in `<>` brackets is a user's unique variable. Exchange with a corresponding name without the `<>` brackets.
To run Nym binaries in Sandbox Testnet you need to get the `.env` configuration file and point your binary to it. Follow the steps below:


1. Create Sandbox environment config file by saving [this](https://raw.githubusercontent.com/nymtech/nym/develop/envs/sandbox.env) as `sandbox.env` in the same directory as your binaries:
```sh
curl -o sandbox.env -L https://raw.githubusercontent.com/nymtech/nym/develop/envs/sandbox.env
```

2. Run your `nym-node` with all the commands as always with an additional flag `--config-file` with a path to `sanbox.env` file. For example:
```sh
# this example is for mixnode mode
./nym-node run --mode mixnode --config-file <PATH/TO/sandbox.env>

# this example is for exit-gateway mode
./nym-node run --id <ID> --config-file <PATH/TO/sandbox.env> --mode exit-gateway --public-ips "$(curl -4 https://ifconfig.me)" --hostname "<YOUR_DOMAIN>" --http-bind-address 0.0.0.0:8080 --mixnet-bind-address 0.0.0.0:1789 true --location <COUNTRY_FULL_NAME>
```

3. Bond your node to Nym Sandbox environment:
- Open [Nym Wallet](https://nymtech.net/download/wallet) and switch to testnet
![](images/sandbox.png)
- Go to [faucet.nymtech.net](https://faucet.nymtech.net) and aquire 101 testnet NYM tokens
- Follow the steps on the [bonding page](nodes/bonding.md)

~~~admonish tip
1. If you [built Nym from source](building-nym.md), you already have `sanbox.env` as a part of the monorepo (`nym/envs/sandbox.env`). Giving that you likely to run `nym-node` from `nym/target/release`, the flag will look like this `--config-env ../../envs/sandbox.env`
2. You can export the path to `sanbox.env` to your enviromental variables:
```sh
export NYMNODE_CONFIG=<PATH/TO/sandbox.env>
```
~~~

## Sandbox Token Faucet

To run your nodes in the sandbox environment, you need testnet version of NYM token, that can be aquired at [faucet.nymtech.net](https://faucet.nymtech.net).

To prevent abuse, the faucet is rate-limited - your request will fail if the requesting wallet already has 101 NYM tokens.

0 comments on commit e37d0cb

Please sign in to comment.