Ğcli a command line tool for Duniter v2

Et avec le port ?

Il me semble qu’en fait TLS était bien géré. (si on met le port !)

Pareil avec le port par ex --url 'wss://gdev.trentesaux.fr:443/ws'. C’est étrange. Tu arrives à reproduire la même erreur si tu ne mets pas le port mais en mettant le port elle disparaît ?

1 Like

J’aimerais bien pouvoir rotate mes sessions_keys, mais j’ai besoin de gcli pour ça :sweat_smile:

Jamais besoin de spécifier un port pour du SSL, c’est juste 443.

En attendant tu peux toujours le faire sans TLS, avec un nœud local ou un bridge SSH vers le nœud. Pour ça je me suis fait des alias dans mon .bashrc :

alias polux-rpc='ssh -L 9944:localhost:9944 pi@192.168.1.22'
alias polux-rpc-ext='ssh -L 9944:localhost:9944 pi@txmn.tk'

Edit: mes exams se terminent jeudi soir, après ça j’investiguerai… :face_with_monocle:

@poka de toute façon pour rotate tes session keys, tu ne peux le faire que depuis l’api rpc de ton noeud validateur si tu as mis --rpc-methods=Unsafe, et tu n’exposes pas cette API sur internet, donc tu es obligé de faire un VPN ou un pont ssh. Mais si je me souviens bien ça n’avait pas marché non plus. Il faut réessayer :

# pont ssh vers l'API RPC du validateur (normalement sur 9945 si tu as mis la même chose que moi)
ssh -NL 9944:localhost:9945 poka@gdev.p2p.legal
# url gcli en ws (c'est la valeur par défaut de toute façon)
gcli --url ws://localhost:9944

Attention, l’exemple de @tuxmain semble être pour un nœud miroir.

1 Like

Super oui ça marche ainsi !

J’ai pu rotate mes session_keys et faire des transfers avec gcli :slight_smile:

1 Like

Suis-je bête ?

Le paramètre url n’est jamais utilisé dans le code ! On utilise toujours la valeur par défaut de subxt, ws://127.0.0.1:9944.

Pour ma défense, clippy ne l’a pas détecté.

Edit: corrigé. wss est bien supporté, mais il faut préciser le port. Par exemple ça marche avec -u wss://gdev.p2p.legal:443/ws

3 Likes

News in gcli:

  • Using the indexer is fixed (username is displayed if possible)
  • New command identity: gives pubkey, identity id and username given one of those.
  • New command online: list online, incoming and outgoing authorities

Maybe the ImOnline pallet is useful for monitoring failing nodes, but I don’t know how it works yet.

4 Likes

do you have news about ssl issues in gcli ? can we set an endpoint in .env like gdev.p2p.legal or something ?

“chez moi ça marche”

I just did:

./target/debug/gcli --url wss://gdev.trentesaux.fr:443/ws expire -s 10000

Authority members:
Must rotate keys before 399 sessions:
  “ tuxmain ” (7139)
Must rotate keys before 1033 sessions:
  “ Pini ” (7228)
  “ Pini ” (7228)
Must rotate keys before 1451 sessions:
  “ poka ” (6951)
Must rotate keys before 1454 sessions:
  “ HugoTrentesaux ” (2457)
2 Likes

Je confirme, ça marche aussi chez moi !! bravo !

New command: tech-members for listing technical committee members.

I would like to add commands to list, submit, vote proposals, but displaying correctly the extrinsic would be challenging. Some calls can be represented in a canonical way, but others need a specific interface, for example adding or removing committee members should be differential.

4 Likes

New command: smith-cert to emit a smith certification.
in MR !4

4 Likes

I am trying to add a simple CI to gcli to publish a release. Can someone test the artifact linked in gcli v0.1.0 · clients / Rust / Ğcli-v2s · GitLab ? It should work on ubuntu contrary to the binary I build on my manjaro.
(this release will be deleted as soon as the pipeline is ok)

It works for me, Debian 11 x86_64.

1 Like

Does not work on the old Ubuntu 18.04.
Work on Ubuntu 20.04.

1 Like

New release :

This release is compatible with gdev network in the current state:

./gcli --network gdev identity get -u poka 
⚠️ indexer does not have the same genesis hash as blockchain
Account id:  5CQ8T4qpbYJq7uVsxGPQ5q2df7x3Wa4aRY6HUWMBYjfLZhnn
Identity id: 6951
Username:    poka

Look at examples to see how to configure your keys (unprotected) and your favorite endpoints.

NB : if someone want to improve the CI to publish artifacts to the release page in a clean way (currently quick and dirty), do not hesitate

1 Like

Thanks to @guenoel I added membercount command to gcli (MR !9) for member and smith member. This reveals a Duniter bug for the smith_membership().counter_for_membership() CountedStorageMap.

Might be linked with Renommage de "smiths" en "smith" : jongler avec deux runtimes.

I added a very basic documentation page on the duniter user wiki: Duniter | Ğcli. It still has to be completed and we also have to make gcli easier for users to install it:

Fix proposal:

Please not that at the moment the secret is written in clean and not secured.

=>

Please note that gcli stores the secret as plain text (not secured).

1 Like