HugoTrentesaux

Become smithπŸ”—

In Duniter v2 you can only forge blocks if your identity is smith (see glossary). This page guides you to get the smith status. If you previously followed the run a smith node tutorial, you will be able to enable forging blocks. The steps to complete are the following one:

  1. become member of the main web of trust
  2. read, understand, accept and start to follow the smith licence
  3. run a smith node (if not yet done)
  4. be invited to join smith with smithMembers.InviteSmith()
  5. accept invitation with smithMembers.AcceptInvitation()
  6. get enough certifications from other smith with smithMembers.CertifySmith() until promoted
  7. set session keys with authorityMembers.set_session_keys() extrinsic
  8. start forging blocks with authorityMembers.goOnline()

This process is detailed below and Ğcli can be helpful.

Table of contents

  1. Become member of the main web of trust
  2. Read and understand the smith licence
  3. Accept invitation to the smith group
  4. Get enough certifications from other smith
  5. Set session keys
  6. Start forging blocks
  7. Stay smith

Become member of the main web of trustπŸ”—

Duniter is based on human trust without implying peculiary interest. Therefore, there is no need to own a large quantity of currency to take part to the blockchain authoring, only to be part of the main web of trust. This implies having read and accepted the Ğ1 licence and getting certified by other wot members (see g1 documentation). Having a unique digital identity entails you can only have one smith identity.

Read and understand the smith licenceπŸ”—

The smith licence defines the rules to certify a new Duniter smith. These rules aim to garantee a good operation of Duniter blockchain by making sure that the new smith knows the rules applying to this role and that other smiths trust his/her ability to apply them.

Accept invitation to the smith groupπŸ”—

Before getting smith certifications, you have to be invited and accept the invitation (see runtime calls reference). After that, you will have to get certs and go online within a certain delay.

Get enough certifications from other smithπŸ”—

The minimum number of received certifications to become smith depends on the runtime. Currently it is:

A smith is only able to become an authority (see glossary) once he/she get enough certifications before the membership request expiration.

Set session keysπŸ”—

Once you are member of the smith wot, you are allowed to declare session keys with authorityMembers.set_session_keys(). The argument of set_session_keys is a pubkey, make sure your smith node has the corresponding session keys!

You can do it easilly with Ğcli (it has helper commands) Or with Duniter-vue (src)

Or more manual with a client like polkadotjs app :

  1. connect your smith rpc endpoint to your local machine with ssh-tunel
  2. be sure to have duniter-connect installed on your browser with your simth key in it.
  3. go to your local PolkadotJs App or go to the public one and connect to your smith rpc endpoint (add ?rpc=ws://localhost:9944 to your url).
  4. go to Menu : Dev > RPC Call then in author category, choose rotateKeys(), validate and copy the returned key.
  5. paste the copied key in a text editor and split it in 4 (with 0x in front of each)
  6. go to Menu : Dev > Extrinsics then in authorityMembers category, choose setSessionKeys(keys) copy paste the 4 keys and validate.

Start forging blocksπŸ”—

Before calling authorityMembers.goOnline(), you can double-check that your validator node actually has the session keys you declared and is syncrhonized to the network. Otherwise you will be unable to add blocks and will generate BABE offenses.


Stay smithπŸ”—

Once you are smith, you must:

Otherwise, you will be excluded from the smith.