Skip to content
Snippets Groups Projects
Commit 2bb3115e authored by Hugo Trentesaux's avatar Hugo Trentesaux Committed by Hugo Trentesaux
Browse files

remove mirror and smith doc that was moved to https://duniter.org/wiki/duniter-v2/

and nginx which is out of topic
parent 33060a55
No related branches found
No related tags found
1 merge request!306doc refac
...@@ -10,8 +10,15 @@ ...@@ -10,8 +10,15 @@
<img alt="logov2" src="https://duniter.fr/img/duniterv2.svg" width="128" height="128"/> <img alt="logov2" src="https://duniter.fr/img/duniterv2.svg" width="128" height="128"/>
</div> </div>
## Documentation TOC ## Documentation
Full up to date technical doc (auto-generated) : https://doc-duniter-org.ipns.pagu.re/gdev_runtime/
Multiple documentation sources are available depending on the level of detail you need.
- Full technical Rust doc (auto-generated with `cargo xtask gen-doc`) : https://doc-duniter-org.ipns.pagu.re/duniter/
- User and client developer doc (official website) : https://duniter.org/wiki/duniter-v2/
- Internal documentation (within git repository), see table of contents below : [./doc](./doc)
### Internal documentation TOC
- [README](./README.md) - [README](./README.md)
- [Use](#use) - [Use](#use)
...@@ -38,8 +45,6 @@ Full up to date technical doc (auto-generated) : https://doc-duniter-org.ipns.pa ...@@ -38,8 +45,6 @@ Full up to date technical doc (auto-generated) : https://doc-duniter-org.ipns.pa
- [replay-block](./docs/test/replay-block.md) - [replay-block](./docs/test/replay-block.md)
- [user](./docs/user/) - [user](./docs/user/)
- [autocompletion](./docs/user/autocompletion.md) - [autocompletion](./docs/user/autocompletion.md)
- [mirror](./docs/user/mirror.md) deploy a permanent ǦDev mirror node
- [smith](./docs/user/smith.md) deploy a permanent ǦDev validator node
- [debian installation](./docs/user/installation_debian.md) - [debian installation](./docs/user/installation_debian.md)
- [packaging](./docs/packaging/) - [packaging](./docs/packaging/)
- [build-for-arm](./docs/packaging/build-for-arm.md) - [build-for-arm](./docs/packaging/build-for-arm.md)
......
# How to deploy a permanent rpc node on ĞDev network
## Publish a node
### Duniter part
See [docker documentation](../../docker/README.md) to install, configure, and start a node.
### Reverse proxy part
See [nginx reverse proxy](./nginx_reverse_proxy.md).
To go further, read [How to become a (black)smith](./smith.md)
## Upgrade your node with minimal interruption
1. Modify docker image tag on your compose file
2. Run `docker compose pull`, this will pull the new image.
3. Run `docker compose up -d --remove-orphans`, this will recreate the container
4. Verify that your node restarted well `docker compose logs duniter-rpc`
5. Remove the old image `docker rmi duniter/duniter-v2s:OLD_TAG`
# Nginx reverse proxy example
In `/etc/nginx/sites-enabled/gdev.YOUR_DOMAIN` put (you can probably do simpler):
```nginx
# see http://nginx.org/en/docs/http/websocket.html
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
server_name gdev.YOUR_DOMAIN.fr;
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl_certificate /etc/nginx/ssl/YOUR_DOMAIN.cert;
ssl_certificate_key /etc/nginx/ssl/YOUR_DOMAIN.key;
root /nowhere;
add_header X-Frame-Options SAMEORIGIN;
add_header X-XSS-Protection "1; mode=block";
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_read_timeout 90;
location / {
proxy_pass http://localhost:9944;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
proxy_read_timeout 1200s;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
}
}
```
and replace `YOUR_DOMAIN` by your domain each time.
- [generate your ssl certificates](https://github.com/acmesh-official/acme.sh) with let's encrypt
if you don't already have a wildcard certificate.
- `service nginx reload`
Your node is now online as a rpc node. It's fully capable for wallet use.
# How to become a (black)smith
## Publish a node
### Duniter part
See [docker documentation](../../docker/README.md) to install, configure, and start a node. For a smith node, you want to set `DUNITER_VALIDATOR` to `true`.
### Reverse proxy part
See [nginx reverse proxy](./nginx_reverse_proxy.md).
## Join the Smith WoT
Only members of the smith WoT can author blocks. This WoT is a subset of the main WoT, hence before joining it you need to join the main WoT.
1. Create an SSH bridge from your computer to your server: `ssh -L 9945:localhost:9945 SSH_USER@YOUR_SERVER`
2. Install PolkadotJS browser extension. It will manage your private keys and known pubkeys safely.
3. Go to [a PolkadotJS web UI](https://polkadot.js.org/apps/?rpc=ws://127.0.0.1/ws:9945). (it's not the same thing as the browser extension)
- If using another port or address, change it accordingly in the left panel.
4. In the UI: developer > RPC call > author > rotateKeys() and copy the result in clipboard
5. In the UI: developer > extrinsics > YOUR_SMITH_ACCOUNT > smithMembership > requestMembership(metadata)
- add your p2p endpoint (optional)
- add your session keys
- send the query
6. Wait 48h to ensure your node keeps sync (**both** best **and** finalized block numbers must increase every 6s)
7. Await at least 3 smith certifications. Members of the smith WoT can certify you with this extrinsic:
- In the UI: developer > extrinsics > CERTIFIER_SMITH_ACCOUNT > smithCert > addCert(receiver)
- This is not automatic, you can ask for certs on the forum or the Matrix chatroom.
8. In the UI: developer > extrinsics > YOUR_SMITH_ACCOUNT > smithMembership > claimMembership(maybe_idty_id)
- maybe_idty_id can be left empty since your identity id will be infered from your account address.
All extrinsics can be sent while connected to any Duniter node, but the RPC calls need a direct connection to your server. As some RPC calls should not be publicly callable for security reasons, the only ways to call them is from the server localhost or using an SSH bridge or other kind of secure tunnel.
rotateKeys can be called anytime you want. Then you have to call setSessionKeys with the new keys.
## Validate blocks (blacksmith work)
Once all the previous steps are completed, you can start to actually author blocks.
In the UI: developer > extrinsics > YOUR_SMITH_ACCOUNT > authorityMembers > goOnline()
If you're not able to monitor, reboot, act on your node, goOffline() to avoid penalty to the blockchain and to you. It will take effect after 2h, so please do it in advance if you plan to disconnect your server soon. goOnline can always be called after this, but after 100 days without authoring blocks you will loose your smith membership.
## Upgrade your node with minimal interruption
1. Modify docker image tag on your compose file
2. Run `docker compose pull`, this will pull the new image.
3. Run `docker compose up -d --remove-orphans`, this will recreate the container
4. Verify that your node restarted well `docker compose logs duniter-validator`
5. Remove the old image `docker rmi duniter/duniter-v2s:OLD_TAG`
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment