Merge pull request #3601 from nymtech/revert-3593-feature/release-1-1-22-docs

Revert "Feature/release 1 1 22 docs"
This commit is contained in:
mx
2023-06-27 09:29:14 +00:00
committed by GitHub
8 changed files with 73 additions and 84 deletions
+2 -2
View File
@@ -49,8 +49,8 @@ assets_version = "2.0.0" # do not edit: managed by `mdbook-admonish install`
[preprocessor.variables.variables]
# code prerequisites versions
minimum_rust_version = "1.66"
# for links: TODO think on how to streamline.. shell script?
platform_release_version = "v1.1.23"
# TODO remove this in place of develop in next release
platform_release_version = "v1.1.21"
[preprocessor.last-changed]
command = "mdbook-last-changed"
+3 -3
View File
@@ -48,9 +48,9 @@ assets_version = "2.0.0" # do not edit: managed by `mdbook-admonish install`
# https://gitlab.com/tglman/mdbook-variables/
[preprocessor.variables.variables]
minimum_rust_version = "1.66"
# vars for links: TODO think on how to streamline updating
platform_release_version = "v1.1.23"
wallet_release_version = "v1.2.5"
# old variables - this is still needed for links.. TODO change to develop?
platform_release_version = "v1.1.21"
[preprocessor.last-changed]
command = "mdbook-last-changed"
@@ -8,7 +8,6 @@
```
## What is this client for?
Many existing applications are able to use either the SOCKS4, SOCKS4A, or SOCKS5 proxy protocols. If you want to send such an application's traffic through the mixnet, you can use the `nym-socks5-client` to bounce network traffic through the Nym network, like this:
```
@@ -66,7 +65,6 @@ The `nym-socks5-client` allows you to do the following from your local machine:
The `nym-network-requester` then reassembles the original TCP stream using the packets' sequence numbers, and make the intended request. It will then chop up the response into Sphinx packets and send them back through the mixnet to your `nym-socks5-client`. The application will then receive its data, without even noticing that it wasn't talking to a "normal" SOCKS5 proxy!
## Client setup
### Viewing command help
You can check that your binaries are properly compiled with:
@@ -88,7 +86,6 @@ You can check the necessary parameters for the available commands by running:
```
### Initialising a new client instance
Before you can use the client, you need to initalise a new instance of it, which can be done with the following command:
```
@@ -108,7 +105,6 @@ The `--provider` field needs to be filled with the Nym address of a Network Requ
Since the nodes on this list are the infrastructure for [Nymconnect](https://nymtech.net/developers/quickstart/nymconnect-gui.html) they will support all apps on the [default whitelist](../nodes/network-requester-setup.md#network-requester-whitelist): Keybase, Telegram, Electrum, Blockstream Green, and Helios.
#### Choosing a Gateway
By default - as in the example above - your client will choose a random gateway to connect to.
However, there are several options for choosing a gateway, if you do not want one that is randomly assigned to your client:
@@ -121,7 +117,6 @@ However, there are several options for choosing a gateway, if you do not want on
> Note this doesn't mean that your client will pick the closest gateway to you, but it will be far more likely to connect to gateway with a 20ms ping rather than 200ms
### Configuring your client
When you initalise a client instance, a configuration directory will be generated and stored in `$HOME_DIR/.nym/socks5-clients/<client-name>/`.
```
@@ -145,13 +140,14 @@ The `config.toml` file contains client configuration options, while the two `pem
The generated files contain the client name, public/private keypairs, and gateway address. The name `<client_id>` in the example above is just a local identifier so that you can name your clients.
#### Configuring your client for Docker
By default, the native client listens to host `127.0.0.1`. However this can be an issue if you wish to run a client in a Dockerized environment, where it can be convenenient to listen on a different host such as `0.0.0.0`.
You can set this via the `--host` flag during either the `init` or `run` commands.
Alternatively, a custom host can be set in the `config.toml` file under the `socket` section. If you do this, remember to restart your client process.
### Running the socks5 client
You can run the initalised client by doing this:
@@ -160,38 +156,6 @@ You can run the initalised client by doing this:
./nym-socks5-client run --id docs-example
```
## Automating your socks5 client with systemd
Stop the running process with `CTRL-C`, and create a service file for the socks5 client as we did with our client instance previously at `/etc/systemd/system/nym-socks5-client.service`:
```ini
[Unit]
Description=Nym Socks5 Client ({{platform_release_version}})
StartLimitInterval=350
StartLimitBurst=10
[Service]
User=nym # replace this with whatever user you wish
LimitNOFILE=65536
ExecStart=/home/nym/nym-socks5-client run --id <your_id>
KillSignal=SIGINT
Restart=on-failure
RestartSec=30
[Install]
WantedBy=multi-user.target
```
Now enable and start your socks5 client:
```
systemctl enable nym-socks5-client.service
systemctl start nym-socks5-client.service
# you can always check your socks5 client has succesfully started with:
systemctl status nym-socks5-client.service
```
## Using your Socks5 Client
After completing the steps above, your local Socks5 Client will be listening on `localhost:1080` ready to proxy traffic to the Network Requester set as the `--provider` when initialising.
@@ -7,6 +7,7 @@
<!-- cmdrun ../../../../target/release/nym-gateway --version | grep "Build Version" | cut -b 21-26 -->
```
## Preliminary steps
There are a couple of steps that need completing before starting to set up your gateway:
@@ -23,6 +24,7 @@ If you don't already have one, please create a Nym address using the wallet, and
> Remember that you can **only** use native Cosmos `NYM` tokens to bond your gateway. You **cannot** use ERC20 representations of `NYM` to run a node.
#### Sandbox testnet
Make sure to download a wallet and create an account as outlined above. Then head to our [token faucet](https://faucet.nymtech.net/) and get some tokens to use to bond it.
@@ -73,12 +75,12 @@ To check available configuration options use:
The following command returns a gateway on your current IP with the `id` of `supergateway`:
```
./nym-gateway init --id supergateway --host $(curl ifconfig.me)
./nym-gateway init --id supergateway --host $(curl ifconfig.me) --wallet-address n1eufxdlgt0puwrwptgjfqne8pj4nhy2u5ft62uq
```
~~~admonish example collapsible=true title="Console output"
```
<!-- cmdrun ../../../../target/release/nym-gateway init --id supergateway --host $(curl ifconfig.me) -->
<!-- cmdrun ../../../../target/release/nym-gateway init --id supergateway --host $(curl ifconfig.me) --wallet-address n1eufxdlgt0puwrwptgjfqne8pj4nhy2u5ft62uq -->
```
~~~
@@ -84,15 +84,15 @@ To check available configuration options for initializing your node use:
```
~~~
Initalise your mixnode with the following command, replacing the value of `--id` with the moniker you wish to give your mixnode. Your `--host` must be publicly routable on the internet in order to mix packets, and can be either an Ipv4 or IPv6 address. The `$(curl ifconfig.me)` command returns your IP automatically using an external service. If you enter your IP address manually, enter it **without** any port information.
Initalise your mixnode with the following command, replacing the value of `--id` with the moniker you wish to give your mixnode, and the `--wallet-address` with the Nym address you created earlier. Your `--host` must be publicly routable on the internet in order to mix packets, and can be either an Ipv4 or IPv6 address. The `$(curl ifconfig.me)` command returns your IP automatically using an external service. If you enter your IP address manually, enter it **without** any port information.
```
./nym-mixnode init --id winston-smithnode --host $(curl ifconfig.me)
./nym-mixnode init --id winston-smithnode --host $(curl ifconfig.me) --wallet-address n1eufxdlgt0puwrwptgjfqne8pj4nhy2u5ft62uq
```
~~~admonish example collapsible=true title="Console output"
```
<!-- cmdrun ../../../../target/release/nym-mixnode init --id winston-smithnode --host $(curl ifconfig.me) -->
<!-- cmdrun ../../../../target/release/nym-mixnode init --id winston-smithnode --host $(curl ifconfig.me) --wallet-address n1eufxdlgt0puwrwptgjfqne8pj4nhy2u5ft62uq -->
```
~~~
@@ -106,7 +106,7 @@ During the `init` process you will have the option to change the `http_api`, `ve
From `v1.1.3`, if you unbond your mixnode that means you are leaving the mixnet and you will lose all your delegations (permanently). You can join again with the same identity key, however, you will start with **no delegations**.
```
#### Bond via the Desktop wallet
#### Bond via the Desktop wallet (recommended)
You can bond your mix node via the Desktop wallet.
@@ -149,7 +149,7 @@ You can bond your mix node via the Desktop wallet.
> You are asked to `sign` a transaction on bonding so that the mixnet smart contract is able to map your nym address to your node. This allows us to create a nonce for each account and defend against replay attacks.
#### Bond via the CLI
#### Bond via the CLI (power users)
If you want to bond your mix node via the CLI, then check out the [relevant section in the Nym CLI](../tools/nym-cli.md#bond-a-mix-node) docs.
### Running your mix node
+32 -13
View File
@@ -61,7 +61,6 @@ The validator binary can be compiled by running the following commands:
```
git clone https://github.com/nymtech/nyxd.git
cd nyxd
git checkout release/<nyxd_version>
# Mainnet
make build
@@ -78,17 +77,43 @@ At this point, you will have a copy of the `nyxd` binary in your `build/` direct
You should see help text print out.
### Linking `nyxd` to `libwasmvm.so`
The `nyxd` binary and the `libwasmvm.so` shared object library binary have been compiled. `libwasmvm.so` is the wasm virtual machine which is needed to execute smart contracts.
`libwasmvm.so` is the wasm virtual machine which is needed to execute smart contracts in `v0.26.1`. This file is renamed in `libwasmvm.x86_64.so` in `v0.31.1`.
```admonish caution title=""
If you have compiled these files locally and need to upload both of them to the server on which the validator will run, **or** downloaded a pre-compiled binary from Github, you need to locate and link these files in slightly different ways, outlined below. If you have instead compiled them on the server skip to the step outlining setting `LD_LIBRARY PATH` below.
```
If you downloaded your `nyxd` binary from Github, you will have seen this file when un-`tar`-ing the `.tar.gz` file from the releases page.
To locate these files on your system **if you downloaded a pre-compiled binary from Github** run:
If you are seeing an error concerning this file when trying to run `nyxd`, then you need to move the `libwasmvm.so` file to correct location.
```
WASMVM_SO=$(ldd path/to/nyxd/binary | grep libwasmvm.so | awk '{ print $3 }')
ls ${WASMVM_SO}
```
Simply `cp` or `mv` that file to `/lib/x86_64-linux-gnu/` and re-run `nyxd`.
e.g. if you downloaded your `nyxd` binary to `/root` then you would replace `ldd path/to/nyxd/binary` with `ldd nyxd` in the above command.
To locate these files on your system **if you uploaded your validator after compiling it on a local machine** run:
```
WASMVM_SO=$(ldd build/nyxd | grep libwasmvm.so | awk '{ print $3 }')
ls ${WASMVM_SO}
```
The above commands will output something like:
```
'/home/username/go/pkg/mod/github.com/!cosm!wasm/wasmvm@v0.13.0/api/libwasmvm.so'
```
When you upload your `nyxd` binary, you'll need to tell it where `libwasmvm.so` is when you start your validator, or it will not run. If you have compiled them on your server then this is not necessary, as the compiled `nyxd` already has access to `libwasmvm.so`.
Upload both `nyxd` and `libwasmvm.so` to your validator machine. If `nyxd` can't find `libwasmvm.so` you will see an error like the following:
```
./nyxd: error while loading shared libraries: libwasmvm.so: cannot open shared object file: No such file or directory
```
### Adding `nyxd` to your `$PATH`
You'll need to set `LD_LIBRARY_PATH` in your user's `~/.bashrc` file, and add that to our path. Replace `/home/youruser/path/to/nym/binaries` in the command below to the locations of `nyxd` and `libwasmvm.so` and run it. If you have compiled these on the server, they will be in the `build/` folder:
```
@@ -591,12 +616,6 @@ nyxd tx slashing unjail
--fees=7000unyxt
```
### Upgrading your validator
Upgrading from `v0.26.0` -> `v0.31.1` doesn't require many modifications, simply grab a binary from the [`nyxd` releases page](https://github.com/nymtech/nyxd/releases) and once the chain has halted at the decided upon haltheight, stop your `nyxd` process, replace your binaries, and restart your process.
You can also use something like [Cosmovisor](https://github.com/cosmos/cosmos-sdk/tree/main/tools/cosmovisor) - grab the relevant information from the current upgrade proposal [here](https://nym.explorers.guru/proposal/8).
#### Common reasons for your validator being jailed
The most common reason for your validator being jailed is that your validator is out of memory because of bloated syslogs.
+1 -1
View File
@@ -50,7 +50,7 @@ As seen in the example above, the `mixnet::MixnetClientBuilder::new()` function
If you're integrating mixnet functionality into an existing app and want to integrate saving client configs and keys into your existing storage logic, you can manually perform the actions taken automatically above (`examples/manually_handle_keys_and_config.rs`)
```rust,noplayground
{{#include ../../../../sdk/rust/nym-sdk/examples/manually_handle_storage.rs}}
{{#include ../../../../sdk/rust/nym-sdk/examples/manually_handle_keys_and_config.rs}}
```
### Anonymous replies with SURBs
+24 -20
View File
@@ -5,23 +5,23 @@ The Nym Desktop Wallet lets you interact with your Nym node and to delegate stak
You can download it for Mac, Windows, or Linux.
[![download nym wallet](../images/download-wallet.png)](https://github.com/nymtech/nym/releases/tag/nym-wallet-{{wallet_release_version}})
[![download nym wallet](../images/download-wallet.png)](https://github.com/nymtech/nym/releases/tag/nym-wallet-{{platform_release_version}})
### Bypassing security warnings
On Windows you will see a security warning pop up when you attempt to run the wallet. We are in the process of getting app store keys from Microsoft so that this doesn't happen. See the section below for details on steps to bypass these.
On Windows you will see a security warning pop up when you attempt to run the wallet. We are in the process of getting app store keys from Microsoft so that this doesn't happen. See the section below for details on steps to bypass these.
#### Linux
#### Linux
You will need to `chmod +x` the AppImage in the terminal (or give it execute permission in your file browser) before it will run.
You will need to `chmod +x` the AppImage in the terminal (or give it execute permission in your file browser) before it will run.
#### Windows
#### Windows
_You will still encounter warnings when opening the wallet on Windows. This is because - although the wallet is approved by Microsoft - it has less than 10 thousand downloads at the current time. Once the wallet has passed this threshold, this warning will disappear._
Follow the steps below to bypass the warnings.
Follow the steps below to bypass the warnings.
* Select more-info after clicking the msi installer app:
* Select more-info after clicking the msi installer app:
![Windows Warning](../images/wallet-warnings/windows_warningv1-0-2.png)
@@ -29,7 +29,7 @@ Follow the steps below to bypass the warnings.
![Windows Warning](../images/wallet-warnings/windows_warning2.png)
* Follow the installer instructions:
* Follow the installer instructions:
![Windows Warning](../images/wallet-warnings/windows_warning3.png)
@@ -39,7 +39,7 @@ Follow the steps below to bypass the warnings.
### For developers
If you would like to the compile the wallet yourself, follow the instructions below.
If you would like to the compile the wallet yourself, follow the instructions below.
> Please note that the wallet has currently only been built on the operating systems for which there are binaries as listed above. If you find an issue or any additional prerequisties, please create an issue or PR against `develop` on [Github](https://github.com/nymtech/docs).
@@ -85,22 +85,22 @@ sudo apt install pkg-config build-essential libssl-dev curl jq
### Removing signing errors when building in development mode
If you're wanting to build the wallet yourself, you will need to make a few modifications to the file located at `nym-wallet/src-tauri/tauri.conf.json` before doing so. These relate to the wallet being accepted by Mac and Windows app stores, and so aren't relevant to you when building and running the wallet yourself.
If you're wanting to build the wallet yourself, you will need to make a few modifications to the file located at `nym-wallet/src-tauri/tauri.conf.json` before doing so. These relate to the wallet being accepted by Mac and Windows app stores, and so aren't relevant to you when building and running the wallet yourself.
On **all** operating systems:
On **all** operating systems:
* set the value of line 49 to `false`
* remove lines 50 to 54
* remove lines 50 to 54
As well as these modifications for MacOS and Windows users:
* MacOS users must also remove line 39
* Windows users must remove lines 42 to 46
As well as these modifications for MacOS and Windows users:
* MacOS users must also remove line 39
* Windows users must remove lines 42 to 46
### Installation
Once you have made these modifications to `tauri.conf.json`, inside of the `nym-wallet` folder, run:
```
yarn install
```
```
### Running in Development Mode
@@ -112,7 +112,7 @@ You can run the wallet without having to install it in development mode by runni
yarn dev
```
This will then start the Wallet GUI and produce a binary in `nym-wallet/target/debug/` named `nym-wallet`.
This will then start the Wallet GUI and produce a binary in `nym-wallet/target/debug/` named `nym-wallet`.
### Running in Production Mode
@@ -165,21 +165,25 @@ To import or create a new account, first you need to create a password for your
6. Come back to this page to import or create new accounts
### Importing or creating account(s) when you have signed in with mnemonic but a password already exists on your machine
To import or create a new account, you need to log in with your existing password or create a new password.
To import or create a new account, you need to log in with your existing password or create a new password.
> Creating a new password will overwrite any old one stored on your machine. Make sure you have saved any mnemonics associated with the password before creating a new one.
1. Log out
2. Click on “Forgot password”
2. Click on “Forgot password”
3. On the next screen select “Create new password”
4. Follow the instructions and create a new password
5. Sign in using your new password
### CLI tool for wallet encrypted file (password) recovery:
The mnemonics that are stored in the local password protected file can also be decrypted and recovered through a simple CLI tool, `nym-wallet-recovery-cli`.
The mnemonics that are stored in the local password protected file can also be decrypted and recovered through a simple CLI tool, `nym-wallet-recovery-cli`.
```
nym-wallet-recovery file saved-wallet.json password foo
```
The saved wallet file can be found in `$XDG_DATA_HOME` or `$HOME/.local/share` on Linux, `$HOME/Library/Application Support` on Mac, and `C:\Users\username\AppData\Local` on Windows.