Skip to content
Snippets Groups Projects
Verified Commit aac91ac9 authored by Pascal Engélibert's avatar Pascal Engélibert :bicyclist:
Browse files

doc(smith): fix, clarify

parent 08c82258
No related branches found
No related tags found
1 merge request!143doc(smith): fix, clarify
......@@ -12,30 +12,37 @@ See [nginx reverse proxy](./nginx_reverse_proxy.md).
## Join the Smith WoT
- add polkadot webextension to be able to authentificate with your account.
- Go to [any node with polkadotjs ui](https://gdev.1000i100.fr/dev-ui/?rpc=wss://gdev.1000i100.fr/ws)
- Ask to join Smith WoT (you need to already be in the main WoT)
- developer > extrinsics > YOUR_SMITH_ACCOUNT > smithMembership > requestMemberShip(metadata)
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 > authorityMembers > setSessionKeys(keys) then paste your session keys and run the query.
6. In the UI: developer > extrinsics > YOUR_SMITH_ACCOUNT > smithsMembership > requestMembership(metadata)
- add your p2p endpoint (optional)
- add your session key (follow point 1 to 4 from Validate blocks > Generate and publish your session key)
- Send the query
- Await smith certification : developer > extrinsics > CERTIFIER_SMITH_ACCOUNT > smithCert > addCert(receiver)
- add your session keys
- send the query
7. Wait 48h to ensure your node keeps sync (**both** best **and** finalized block numbers must increase every 6s)
8. 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 > smithsCert > addCert(receiver)
- This is not automatic, you can ask for certs on the forum or the Matrix chatroom.
9. In the UI: developer > extrinsics > YOUR_SMITH_ACCOUNT > smithsMembership > claimMembership(maybe_idty_id)
- maybe_idty_id can be left empty since your identity id will be infered from your account address.
When you have at least 3 certifications, your'in!
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)
- Generate and publish your session keys
1. create an ssh bridge from your desktop/laptop to your server : `ssh -L 9945:localhost:9945 SSH_USER@YOUR_SERVER`
2. In your browser go to [polkadotjs : ws://localhost:9945](https://polkadot.js.org/apps/?rpc=ws%3A%2F%2Flocalhost%3A9945#/explorer)
3. In the UI : developer > appel RPC > author > rotateKeys() and copy the result in clipboard
4. In the UI : developer > extrinsics > YOUR_SMITH_ACCOUNT > authorityMembers > setSessionKeys(keys) then paste your session keys and run the query.
5. In the UI : developer > extrinsics > YOUR_SMITH_ACCOUNT > authorityMembers > claimMembership(keys)
6. **wait 48h to verify you keep sync**
- Join
- 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 penality to the blockchain and to you.
Once all the previous steps are completed, you can start to actually author blocks.
1. In the UI: developer > extrinsics > YOUR_SMITH_ACCOUNT > authorityMembers > goOnline()
2. Every less than 2 months, the rotateKeys and setSessionKeys steps must be renewed.
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment