silkaj issueshttps://git.duniter.org/clients/python/silkaj/-/issues2024-02-05T15:46:23+01:00https://git.duniter.org/clients/python/silkaj/-/issues/470Support BMA optimizations2024-02-05T15:46:23+01:00MoulSupport BMA optimizations- [x] Use DuniterPy dev from git
- [x] Use optimizations: clients/python/duniterpy#201: Set `pubkey_query=True` to `wot` path
- [x] `silkaj.money.tools::get_sources()`: `receiving`/pending transfers are no longer part of `bma.tx.sources`...- [x] Use DuniterPy dev from git
- [x] Use optimizations: clients/python/duniterpy#201: Set `pubkey_query=True` to `wot` path
- [x] `silkaj.money.tools::get_sources()`: `receiving`/pending transfers are no longer part of `bma.tx.sources`. Adapt `get_sources()`?
- [x] Test all Silkaj commands against Duniter v1.8.7/BMA and Duniter v1.8.6 (for compatibility check)
- [x] #483+0.12.0MoulMoulhttps://git.duniter.org/clients/python/silkaj/-/issues/438Add sleep() between identity_of() calls in a loop2022-10-27T18:20:45+02:00MoulAdd sleep() between identity_of() calls in a loop`blocks`, `history --uids`, and `transfer` commands are requesting in a loop `identity_of()` to get `uids` from pubkeys.
There is too much requests at the same time for BMA to answer. Adding a `time.sleep()` in between solves the issue t...`blocks`, `history --uids`, and `transfer` commands are requesting in a loop `identity_of()` to get `uids` from pubkeys.
There is too much requests at the same time for BMA to answer. Adding a `time.sleep()` in between solves the issue to retrieve the `uids` in order for not getting a broken state.
This is specially the case on local node.0.11.0MoulMoulhttps://git.duniter.org/clients/python/silkaj/-/issues/411command `blocks` fails2022-10-27T18:21:34+02:00matograinecommand `blocks` failsI meet an error I don't understand.
On the 30/09/2021 on branch dev at commit [60eb5d](https://git.duniter.org/clients/python/silkaj/-/commit/60eb5dc2d80485d8ff7df777a52ab361a1e92c12). On Linux Mint 20.1 Ulyssa
I can reach nodes. `silka...I meet an error I don't understand.
On the 30/09/2021 on branch dev at commit [60eb5d](https://git.duniter.org/clients/python/silkaj/-/commit/60eb5dc2d80485d8ff7df777a52ab361a1e92c12). On Linux Mint 20.1 Ulyssa
I can reach nodes. `silkaj info` works.
However, `silkaj blocks` does not :
```python
$ silkaj blocks
Traceback (most recent call last):
File "/home/thomas/.cache/pypoetry/virtualenvs/silkaj-hneDEFxq-py3.8/bin/silkaj", line 5, in <module>
cli()
File "/home/thomas/.cache/pypoetry/virtualenvs/silkaj-hneDEFxq-py3.8/lib/python3.8/site-packages/click/core.py", line 1134, in __call__
return self.main(*args, **kwargs)
File "/home/thomas/.cache/pypoetry/virtualenvs/silkaj-hneDEFxq-py3.8/lib/python3.8/site-packages/click/core.py", line 1059, in main
rv = self.invoke(ctx)
File "/home/thomas/.cache/pypoetry/virtualenvs/silkaj-hneDEFxq-py3.8/lib/python3.8/site-packages/click/core.py", line 1665, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/thomas/.cache/pypoetry/virtualenvs/silkaj-hneDEFxq-py3.8/lib/python3.8/site-packages/click/core.py", line 1401, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/thomas/.cache/pypoetry/virtualenvs/silkaj-hneDEFxq-py3.8/lib/python3.8/site-packages/click/core.py", line 767, in invoke
return __callback(*args, **kwargs)
File "/home/thomas/Documents/Duniter/silkaj/silkaj/commands.py", line 159, in list_blocks
idty = identity_of(issuer["pubkey"])
File "/home/thomas/Documents/Duniter/silkaj/silkaj/wot_tools.py", line 33, in identity_of
return client(wot.identity_of, pubkey_uid)
File "/home/thomas/.cache/pypoetry/virtualenvs/silkaj-hneDEFxq-py3.8/lib/python3.8/site-packages/duniterpy/api/client.py", line 455, in __call__
return _function(self, *args, **kwargs)
File "/home/thomas/.cache/pypoetry/virtualenvs/silkaj-hneDEFxq-py3.8/lib/python3.8/site-packages/duniterpy/api/bma/wot.py", line 350, in identity_of
return client.get(MODULE + "/identity-of/%s" % search, schema=IDENTITY_OF_SCHEMA)
File "/home/thomas/.cache/pypoetry/virtualenvs/silkaj-hneDEFxq-py3.8/lib/python3.8/site-packages/duniterpy/api/client.py", line 372, in get
return client.request_url(
File "/home/thomas/.cache/pypoetry/virtualenvs/silkaj-hneDEFxq-py3.8/lib/python3.8/site-packages/duniterpy/api/client.py", line 260, in request_url
with request.urlopen(
File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.8/urllib/request.py", line 531, in open
response = meth(req, response)
File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response
response = self.parent.error(
File "/usr/lib/python3.8/urllib/request.py", line 569, in error
return self._call_chain(*args)
File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/usr/lib/python3.8/urllib/request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 503: Service Unavailable
```0.11.0MoulMoulhttps://git.duniter.org/clients/python/silkaj/-/issues/385id/lookup command does not display the non-member uids2021-04-07T18:57:50+02:00Kapisid/lookup command does not display the non-member uidsif I try to find "silkaj id titi"
it will show me:
```
→ 9zHLPCPwEH37wDfPpPoajt7zxP13xKFr5n9HY2CYtBEq:CPg
→ 4qJZFRfArLaUMEXDhsd69unsKynEFNLFazAVij4HNsBa:F4z
→ 4LCdTC9QsmqbFSHAhyaqGdDCVPr8Ywu2DZ8hDCzkdx4n:8ta
→ CehfxBHrowP6tXouR73GS52Q...if I try to find "silkaj id titi"
it will show me:
```
→ 9zHLPCPwEH37wDfPpPoajt7zxP13xKFr5n9HY2CYtBEq:CPg
→ 4qJZFRfArLaUMEXDhsd69unsKynEFNLFazAVij4HNsBa:F4z
→ 4LCdTC9QsmqbFSHAhyaqGdDCVPr8Ywu2DZ8hDCzkdx4n:8ta
→ CehfxBHrowP6tXouR73GS52QhGAoNMtabooKbCvT7f3j:6cG ↔ Laetiti974
→ FtZdA1HzHcDG6utoEgg6R5jjXfEne2ftS2UzvXajKurp:6Sm
→ EUn8uLJxgc3fVXJ1fBA74re4iD4Ws8Nk2xHytX1wLMfK:AQ2 ↔ LaetitiaCarivenc
→ HqHZt9J1U7MwC3RF1bSjPgxACsTypfNjUThYFMZZfK6X:Dk1 ↔ LaetitiaHOFF
→ 5Vcm1zkHKoAMo9yy7Lk2HDX2Yn54agavtEUdrcFNmqkP:8mU ↔ laetitiajanot
→ BfncGdTeq8qvhPZnBaM8T76SHM9xfx78ASRNZtGp64rZ:7tP
→ BWKuSHYojjwzAXZZxSFTf5XVWneUMZqoWGUJEfWaFRL9:21F ↔ titi43
```
but actually the BfncGdTeq8qvhPZnBaM8T76SHM9xfx78ASRNZtGp64rZ pubkey was revoked as we can see here and it had the 'titi' username registered in the blockchain, see here:
https://demo.cesium.app/#/app/wot/BfncGdTeq8qvhPZnBaM8T76SHM9xfx78ASRNZtGp64rZ/titi
![image](/uploads/c49ca8902f7bafd89042d13f52a2c43e/image.png)
could silkaj show those usernames in the same way that it shows for the other actives?
Thanks.0.9.0MoulMoulhttps://git.duniter.org/clients/python/silkaj/-/issues/345Inconsistent results with `id` command on an ex-member2021-04-07T18:58:37+02:00matograineInconsistent results with `id` command on an ex-memberWhen asking for old members, the results of `id` command are not consistent :
```bash
$ silkaj -gt id elois
Public keys found matching 'elois':
→ D7CYHJXjaH4j7zRdWngUbsURPnSnjsCYtvo6f8dvW3C
$ silkaj -gt id D7CYHJXjaH4j7zRdWngUbsURPnSn...When asking for old members, the results of `id` command are not consistent :
```bash
$ silkaj -gt id elois
Public keys found matching 'elois':
→ D7CYHJXjaH4j7zRdWngUbsURPnSnjsCYtvo6f8dvW3C
$ silkaj -gt id D7CYHJXjaH4j7zRdWngUbsURPnSnjsCYtvo6f8dvW3C
No matching identity
```
The cause is :
When we have a pubkey, silkaj uses the path wot/identity-of/, that returns "not a member".
When we have a uid, silkaj uses the path wot/lookup/, that returns a result for old members also.0.9.0MoulMoulhttps://git.duniter.org/clients/python/silkaj/-/issues/310wot: 'outdistanced' provides a wrong information?2022-06-28T18:21:02+02:00matograinewot: 'outdistanced' provides a wrong information?The member Maria44 should enter the wot in a few days, according to WotWizard. (see [forum](https://forum.duniter.org/t/maria44-bug-pour-certifications/7039/3))
```
silkaj wot Maria44
Maria44 (HXSSj…) from block #300354-0000049C…
receiv...The member Maria44 should enter the wot in a few days, according to WotWizard. (see [forum](https://forum.duniter.org/t/maria44-bug-pour-certifications/7039/3))
```
silkaj wot Maria44
Maria44 (HXSSj…) from block #300354-0000049C…
received 7 and sent 0/100 certifications:
| received_expire | received | sent | sent_expire |
|-------------------+--------------------+--------+---------------|
| 2022-01-31 | Claire666 ✔ | | |
| 2022-01-31 | carinecoxi ✔ | | |
| 2022-01-31 | TristanG1 | | |
| 2022-01-31 | Michellecuyer26 | | |
| 2022-01-31 | ChristineWilloth26 | | |
| 2022-02-06 | ChristineWilloth26 | | |
| 2022-02-06 | Michellecuyer26 | | |
✔: Certifications written into the blockchain
Membership expiration due to certification expirations: 2022-01-31
member: False
outdistanced: True
```
All pending certifications are correctly displayed.
What does "outdistanced" mean ? I understand that the member is out of the minimum distance, and should not enter the blockchain. Is it a bug or an unclear TUI ?https://git.duniter.org/clients/python/silkaj/-/issues/297Get the info card of an identity (member or not)2022-06-28T18:19:25+02:00MoulGet the info card of an identity (member or not)`moul-test` identity is inside the blocks frame but is not member and caused an exception:
```
silkaj -p gt.moul.re:10902 blocks 100
Traceback (most recent call last):
File "/home/moul/silkaj/silkaj/wot.py", line 207, in identity_of
...`moul-test` identity is inside the blocks frame but is not member and caused an exception:
```
silkaj -p gt.moul.re:10902 blocks 100
Traceback (most recent call last):
File "/home/moul/silkaj/silkaj/wot.py", line 207, in identity_of
return await client(wot.identity_of, pubkey_uid)
File "/home/moul/.cache/pypoetry/virtualenvs/silkaj-58dUTebQ-py3.7/lib64/python3.7/site-packages/duniterpy/api/bma/wot.py", line 343, in identity_of
MODULE + "/identity-of/%s" % search, schema=IDENTITY_OF_SCHEMA
File "/home/moul/.cache/pypoetry/virtualenvs/silkaj-58dUTebQ-py3.7/lib64/python3.7/site-packages/duniterpy/api/client.py", line 358, in get
response = await client.requests_get(url_path, **params)
File "/home/moul/.cache/pypoetry/virtualenvs/silkaj-58dUTebQ-py3.7/lib64/python3.7/site-packages/duniterpy/api/client.py", line 244, in requests_get
raise DuniterError(error_data)
duniterpy.api.errors.DuniterError: Error code 1002 - Not a member
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/moul/.cache/pypoetry/virtualenvs/silkaj-58dUTebQ-py3.7/bin/../bin/silkaj", line 11, in <module>
load_entry_point('silkaj', 'console_scripts', 'silkaj')()
File "/home/moul/.cache/pypoetry/virtualenvs/silkaj-58dUTebQ-py3.7/lib64/python3.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/moul/.cache/pypoetry/virtualenvs/silkaj-58dUTebQ-py3.7/lib64/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/moul/.cache/pypoetry/virtualenvs/silkaj-58dUTebQ-py3.7/lib64/python3.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/moul/.cache/pypoetry/virtualenvs/silkaj-58dUTebQ-py3.7/lib64/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/moul/.cache/pypoetry/virtualenvs/silkaj-58dUTebQ-py3.7/lib64/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/moul/silkaj/silkaj/tools.py", line 70, in wrapper
return loop.run_until_complete(f(*args, **kwargs))
File "/usr/lib64/python3.7/asyncio/base_events.py", line 583, in run_until_complete
return future.result()
File "/home/moul/silkaj/silkaj/commands.py", line 283, in list_blocks
idty = await identity_of(issuer["pubkey"])
File "/home/moul/silkaj/silkaj/wot.py", line 209, in identity_of
raise DuniterError(e)
File "/home/moul/.cache/pypoetry/virtualenvs/silkaj-58dUTebQ-py3.7/lib64/python3.7/site-packages/duniterpy/api/errors.py", line 12, in __init__
super().__init__("Error code {0} - {1}".format(data["ucode"], data["message"]))
TypeError: 'DuniterError' object is not subscriptable
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f81a89a9c90>
ERROR:asyncio:Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f81a5acb0c0>, 2501453.441665225)]']
connector: <aiohttp.connector.TCPConnector object at 0x7f81a5acab50>
```
- [ ] Generic function to generate the same identity card:
- `wot/identity-of` first
- if the not-member exception got raised: `wot/lookup`, and generate the same kind of identity card
- [ ] `tx_history.py`
- [ ] `commands.py`: `net`, `blocks`
- [ ] `wot.py`: `id` (change call)https://git.duniter.org/clients/python/silkaj/-/issues/256Implement `excluded` command to report excluded identities from the WoT / Dea...2023-11-13T16:29:05+01:00MoulImplement `excluded` command to report excluded identities from the WoT / DeathReaper- [Forum post](https://forum.duniter.org/t/je-me-presente-je-suis-deathreaper-alias-la-faucheuse/6539)
- [Crowdfunding](https://moul.re/moul/silkaj.html)
## Tasks
### Message generation
- [x] Generate markdown output
- [x] [Improve gene...- [Forum post](https://forum.duniter.org/t/je-me-presente-je-suis-deathreaper-alias-la-faucheuse/6539)
- [Crowdfunding](https://moul.re/moul/silkaj.html)
## Tasks
### Message generation
- [x] Generate markdown output
- [x] [Improve generated output for more readability](https://forum.duniter.org/t/exclusions-de-la-toile-de-confiance-g1-expirations-des-statuts-de-membre/4393/652?u=moul):
```bash
### Exclusions de la toile de confiance Ğ1, pertes des statuts de membre
> Message automatique. Merci de notifier vos proches de leur exclusion de la toile de confiance
- [`Williambenhaim`](https://g1.duniter.fr/#/app/block/274234/7D4334A459D6F35A089492D346B07C6711AFB0E8273CE9DCE3BC65C594061A25?ssl=true) :
- **certifié·e par** Jonelio108, Gauri, Djtina12.
- **a certifié·e** Jonelio108, Gauri, Djtina12.
- [bloc](https://g1.duniter.fr/#/app/block/278701/4C83465A475FF97AA48125CB8567BD7AE5EFCAE35DEF6819DE22826306C0C5A3?ssl=true) :
- @Helene:
- **certifié·e par** @ElenaMoshkina, @bert, @Notfifi, @Floweranne, @Gabychou, @dagasaga, @AnaisTerraFlor.
- **a certifié·e** Jonelio108, Gauri, Djtina12.
- @Valentina:
- **certifié·e par** @ElenaMoshkina, @bert, @Notfifi, @Gabychou, @Floweranne, @AnaisTerraFlor, @dagasaga.
- **a certifié·e** Jonelio108, Gauri, Djtina12.
```
- [ ] One post per block/exclusion? Could ease not to loose exclusions around 9AM/PM.
- [ ] [The exclusion through WebSocket event would be nice on GVA](https://forum.duniter.org/t/gva-graph-verificaton-api-features-wishes/6600):
- Already possible listening on `/ws/blocks`.
- exclusions won’t be loose
- Silkaj would constantly listen to this flow.
- We could also benefit of having direct notifications.
- But, Silkaj will not be able to run into a CI/CD job. It would need to run on a server.
- [x] Request Discourse forum to know if the account exists
- [x] Remove every request and simply prefix all accounts with a `@`:
- This drastically improve the speed and generate much less requests.
- May be the `@` could be extended later on, once the account have been renamed.
- [x] Generate once the message for the two forums/Ğ1
- We might only be keep Monnaie libre forum for Ğ1 exclusions
- [x] Request Cesium+ to get the corresponding name.
- [x] Ignore revoked identities
- [ ] Handle to start the list X days before now (pass an extra parameter).
- [x] Display the reason of the exclusion:
- [x] membership expiration: check membership expiration date
- [x] lack of certifications: check current number of certifications
- [x] Date of the exclusion
### Forums Publication/CLI
- [x] Publish on Discourse forums
- [x] Allow renaming pseudo on the forums
- [x] Add ability to pass a number of hours. One of the days and hours should be present. Both could be present.
- [ ] Ask with a confirmation to publish or not the message if `--publish` option is not passed, Keep `--publish` option.
- [ ] Option(s) to publish on only one of the two forums
- [ ] Stop publishing Ğ1 exclusions on Duniter forum.
#### Discourse API authentication change
- [Discourse API change](https://meta.discourse.org/t/discourse-api-documentation/22706)
- [Header authentication handling in pydiscourse](https://github.com/bennylope/pydiscourse/pull/28)
- Published in `pydiscourse` v1.0.
### Packaging
- [ ] [`pydiscourse`](https://pypi.org/project/pydiscourse/) is not in Debian, this dependency will prevent Silkaj to enter in Debian Bullseye #270:
- [ ] Create DeathReaper package, and set Silkaj as a dependency:
- [x] Create `client/python/deathreaper` git repository/package based on Silkaj: Poetry, CI/CD
- [ ] Introduce a module system in Silkaj:
- Silkaj could install an extra `deathreaper` package:
- The CLI could be extended through Click to add a command, then an `import` should be enough
- [ ] Implement in DuniterPy the used HTTP REST call: `create_post()` to replace `pydiscourse`. Not nice, better let `pydiscourse` project handle the changes of the API. DuniterPy should stay focuse on Ğ1’s APIs.
### Automation
- [x] Executed at 9 AM and PM for Ğ1 and Ğ1-Test with a cron on my machine
- [x] #388: Generate Docker image with Silkaj inside
- [x] [Timezone of the image set to Paris](https://serverfault.com/questions/1012542/docker-container-time-2-hours-behind-when-tz-cest)
- [x] Create `clients/python/deathreaper` repository to set the automation
- Executed at 9 AM and PM for Ğ1 and Ğ1-Test
- Based on the previously generated Docker image
- [x] Pass the API tokens through the CI secret system
- [ ] Could/Should be kept on a machine if all the time running: in case of listening exclusions on a WS
---
## To do later/Improvements
> Open following tickets
- [ ] English translation of the output message?
- [ ] Report joiners (previously excluded) by replying to the post which notifies the exclusion
- …0.10.0MoulMoulhttps://git.duniter.org/clients/python/silkaj/-/issues/226Get rid of ipaddress dependency2021-03-14T16:05:07+01:00MoulGet rid of ipaddress dependencyUse DuniterPy IPv{4,6} regexes to get rid of `ipaddress` dependency.
`ipaddress` is used in `silkaj.network_tools.check_ip()` to determine the IP address version. As a first step, it can be replaced with stdlib `re` regex module and `du...Use DuniterPy IPv{4,6} regexes to get rid of `ipaddress` dependency.
`ipaddress` is used in `silkaj.network_tools.check_ip()` to determine the IP address version. As a first step, it can be replaced with stdlib `re` regex module and `duniterpy.constants.IPV{4,6}_REGEX` regexes.
As a second step (#177), replace `silkaj.network_tools.{parse_endpoint(),endpoint_type(),check_ip()}` with `duniterpy.api.endpoint.{,Secured}BMAEndpoint`. May be a useless step, since we will move to GVA(Endpoint).0.9.0atraxatraxhttps://git.duniter.org/clients/python/silkaj/-/issues/216diffi: WebSocket connection get broken2022-03-29T20:06:41+02:00Mouldiffi: WebSocket connection get broken> Follows #93
Time to time, the WebSocket connection get broken, and no new blocks arrive. Then the view stayed frozen. Then a restart is necessary.
It does not happen whether Silkaj and the BMA API (node) is on the same machine.
But...> Follows #93
Time to time, the WebSocket connection get broken, and no new blocks arrive. Then the view stayed frozen. Then a restart is necessary.
It does not happen whether Silkaj and the BMA API (node) is on the same machine.
But with the network in the middle, the connection get broken.
There might be an issue into the websocket wrapper implementation.
[Might be linked to the virtualhost configuration of the http proxy server (Nginx/Apache)](https://forum.duniter.org/t/cesium-nouvelle-version-1-4-17-et-1-5-x-en-test/6706/20?u=moul).0.10.0MoulMoulhttps://git.duniter.org/clients/python/silkaj/-/issues/210Close client session in every cases2020-06-02T17:56:32+02:00MoulClose client session in every casesFor instance, when aborting a certification:
```bash
Do you confirm sending this certification? [y/N]: n
Aborted!
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f02f5594348>
ERROR:asyncio...For instance, when aborting a certification:
```bash
Do you confirm sending this certification? [y/N]: n
Aborted!
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f02f5594348>
ERROR:asyncio:Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f02effd5dc8>, 7239440.848067479)]']
connector: <aiohttp.connector.TCPConnector object at 0x7f02f55a16d8>
```
- [x] `cert`
- [x] `tx`: When aborting a transaction.
- [ ] #321: Use `with x as y:`?0.8.0MoulMoulhttps://git.duniter.org/clients/python/silkaj/-/issues/177Clean no longer used network layer functions2021-06-07T21:07:41+02:00MoulClean no longer used network layer functions`network_tools.py` cleaning before GVA introduction:
- [x] #226: Get rid of `ipaddress` dependency
- [x] !186: Delete no longer used `parse_endpoint()`, `parse_endpoints()`, `check_port()`, `check_ip()`, `endpoint_type()`
- [x] Delete `c...`network_tools.py` cleaning before GVA introduction:
- [x] #226: Get rid of `ipaddress` dependency
- [x] !186: Delete no longer used `parse_endpoint()`, `parse_endpoints()`, `check_port()`, `check_ip()`, `endpoint_type()`
- [x] Delete `check_port()` in favour of of DuniterPy's port check in the regex
- [x] Delete `best_endpoint_address()` in favour of DuniterPy's `connection_handler` which choose in priority `domain`, `ipv6`, then `ipv4`.0.10.0MoulMoulhttps://git.duniter.org/clients/python/silkaj/-/issues/175Migrate from BMA to GVA2022-06-28T18:19:45+02:00MoulMigrate from BMA to GVANew client API implementation GVA with GraphQL:
- [RFC](https://git.duniter.org/nodes/common/doc/merge_requests/3)
- [Forum post](https://forum.duniter.org/t/simplified-verification-api/3631)
- [Forum post about Duniter module](https://f...New client API implementation GVA with GraphQL:
- [RFC](https://git.duniter.org/nodes/common/doc/merge_requests/3)
- [Forum post](https://forum.duniter.org/t/simplified-verification-api/3631)
- [Forum post about Duniter module](https://forum.duniter.org/t/implementation-de-l-api-gva-en-tant-que-module-duniter/5436)
- [DuniterPy ticket](https://git.duniter.org/clients/python/duniterpy/issues/59)
## Plan
- [x] Update to DuniterPy 0.61 which implements GraphQL
- [ ] `duniterpy.api.Client` is used for BMA and GVA. When closing one, it closes the other one. We shouldn't keep both in parallel for now. May be something to search within the singleton to have two separated clients instances.
- [ ] Keep in parallel BMA/GVA? Probably not.
### Network layer
- [x] Use DuniterPy’s `GVAEndpoint`
- [x] Endpoint definition:
- [ ] Use port regex from DuniterPy (redefine it in DuniterPy)
- [x] Add ability to pass and endpoint
- [x] #223, #354: Make optional to have a `click` context
- [x] Handle Gtest
- [x] Use `ipaddress` to separated `host` from `ipv4` which seems not separable from regex matching
- [ ] Rename `-p/--peer` option to `-e/--endpoint`?
### Commands
#### Simple
Replace BMA by GVA in simple commands regarding network requests:
- [ ] `balance`
- [x] #209: One query for multiple balances
- [x] currency string not found in `params` nor `blocks` (`CurrencySymbol()`)
- [x] Merge tables into one table
- [ ] Separation (Textable fonctionnality) between "tables" to improve readability?
- [ ] One query for multiple identities: `identities` query
- [ ] handle pending tx?
- [ ] balance difference between CS/Silkaj calculation <−> GVA?
- [ ] New ticket: display balance of UDs and UTXO from tx (SIG, LOCKED)
- [ ] `argos`
- [ ] `info`
- [ ] `blocks`
#### Complex
Replace BMA by GVA in complex commands with websocket (subscription) and document emission:
- [ ] `diffi`
- [ ] `history`
- [ ] `tx`
- [ ] `id`
- [ ] `wot`
- [ ] `cert`
- [ ] `membership`https://git.duniter.org/clients/python/silkaj/-/issues/150Wot: Use `/wot/requirements` for more precise expiration dates of received ce...2022-06-28T18:20:09+02:00MoulWot: Use `/wot/requirements` for more precise expiration dates of received certificationsFor received certification, `expiresIn` parameter rather than calculate it.
- [ ] Certification must be sorted by date: I do not manage to make the sort works as apparently there is no `sort` method on `dict()` and `OrderedDict`.
- [ ] ...For received certification, `expiresIn` parameter rather than calculate it.
- [ ] Certification must be sorted by date: I do not manage to make the sort works as apparently there is no `sort` method on `dict()` and `OrderedDict`.
- [ ] Certifier id must be converted from their pubkey: loss of time doing it.https://git.duniter.org/clients/python/silkaj/-/issues/53blocks: request chunks of blocks on several nodes2023-06-02T11:59:23+02:00Moulblocks: request chunks of blocks on several nodesNodes blocks requests is limited up to 5.000 blocks.
To handle retrieving all blocks for `blocks` cmd, many requests needs to be done to many nodes.Nodes blocks requests is limited up to 5.000 blocks.
To handle retrieving all blocks for `blocks` cmd, many requests needs to be done to many nodes.Backlog