DuniterPy issueshttps://git.duniter.org/clients/python/duniterpy/-/issues2022-07-07T10:04:58+02:00https://git.duniter.org/clients/python/duniterpy/-/issues/189Add support for Substrate/RPC/Subsquid/Extrinsics/GraphQL Hasura indexer2022-07-07T10:04:58+02:00MoulAdd support for Substrate/RPC/Subsquid/Extrinsics/GraphQL Hasura indexerAdd support Duniter v2 based on Substrate blockchain framework.
Client Interface: RPC, GraphQL Hasura indexer?
- [ ] Support new documents/extrinsics
- Use [`py-substrate-interface`](https://github.com/polkascan/py-substrate-interface) ...Add support Duniter v2 based on Substrate blockchain framework.
Client Interface: RPC, GraphQL Hasura indexer?
- [ ] Support new documents/extrinsics
- Use [`py-substrate-interface`](https://github.com/polkascan/py-substrate-interface) Python Substrate library2.0.0https://git.duniter.org/clients/python/duniterpy/-/issues/176Add support for GVA subscription2021-07-21T15:57:24+02:00MoulAdd support for GVA subscriptionIn ["Prototype de GVA" forum thread](https://forum.duniter.org/t/prototype-de-gva/7688/150), the subscriptions are now served on `GVA` endpoint type with an additional `/subscription` path to the specified path `/$gva_path` in the `GVA` ...In ["Prototype de GVA" forum thread](https://forum.duniter.org/t/prototype-de-gva/7688/150), the subscriptions are now served on `GVA` endpoint type with an additional `/subscription` path to the specified path `/$gva_path` in the `GVA` endpoint.
- [ ] Introduce helper(s)
- [ ] Introduce example
- [ ] Add support for `/$gva_path/subscription` path. `$gva_path is found in `GVAEndpoint`Backloghttps://git.duniter.org/clients/python/duniterpy/-/issues/148Deprecate BMA API2021-07-03T10:27:48+02:00MoulDeprecate BMA API- [ ] Set deprecation warnings in earliest possible version
- [ ] Remove BMA related code once major clients (Silkaj) completely migrated away from it. This means GVA provides at least the same requestable datas as BMA has.
- [ ] #135: A...- [ ] Set deprecation warnings in earliest possible version
- [ ] Remove BMA related code once major clients (Silkaj) completely migrated away from it. This means GVA provides at least the same requestable datas as BMA has.
- [ ] #135: Add back `R0801` pylint deactivation which was mostly happening on json schemas2.0.0https://git.duniter.org/clients/python/duniterpy/-/issues/126Refactor api.client module to offer url from endpoint2023-07-08T15:27:00+02:00Vincent TexierRefactor api.client module to offer url from endpointIn the api.client module:
* The API instance should be injected as a dependency in the Client instance (composition).
* The API class should not be public, so prefix it with an underscore.
* Why API.reverse_url() needs arguments already...In the api.client module:
* The API instance should be injected as a dependency in the Client instance (composition).
* The API class should not be public, so prefix it with an underscore.
* Why API.reverse_url() needs arguments already in conn_handler ?
* As the endpoint can define the scheme for sure, we can withdraw it and get it from the ConnHandler class.
* But for that, the ConnHandler class need to set only one scheme!
* Expose a method to easily get the url of an endpoint (refactor reverse_url of API in public Client class).
If we do that:
* Set only one scheme (with http, https, ws, wss) in ConnHandler class
We can do that:
* Get the api url from the connhandler without giving any scheme.Backloghttps://git.duniter.org/clients/python/duniterpy/-/issues/109DuniterPy should not parse the result of a failed request2020-11-30T15:10:40+01:00MoulDuniterPy should not parse the result of a failed requestDuniterPy should not try to parse the result of a request with an HTTP error:
https://forum.duniter.org/t/remuneration-des-contributeurs-au-projet-duniter/4995/52?u=moul
Here, you can see `jsonschema` failing to parse the result of a 4...DuniterPy should not try to parse the result of a request with an HTTP error:
https://forum.duniter.org/t/remuneration-des-contributeurs-au-projet-duniter/4995/52?u=moul
Here, you can see `jsonschema` failing to parse the result of a 429 error:
```bash
Traceback (most recent call last):
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/duniterpy/api/client.py", line 141, in requests_get
error_data = parse_error(await response.text())
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/duniterpy/api/client.py", line 65, in parse_error
raise jsonschema.ValidationError("Could not parse json : {0}".format(str(e)))
jsonschema.exceptions.ValidationError: Could not parse json : Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/inso/.pyenv/versions/silkaj-3.7/bin/silkaj", line 23, in <module>
cli(obj={})
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/silkaj/tools.py", line 70, in wrapper
return loop.run_until_complete(f(*args, **kwargs))
File "/home/inso/.pyenv/versions/3.7.0/lib/python3.7/asyncio/base_events.py", line 568, in run_until_complete
return future.result()
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/silkaj/tx.py", line 99, in send_transaction
key, issuer_pubkey, tx_amount, outputAddresses, comment, outputbackchange
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/silkaj/tx.py", line 237, in handle_intermediaries_transactions
OutputbackChange,
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/silkaj/tx.py", line 277, in generate_and_send_transaction
OutputbackChange,
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/silkaj/tx.py", line 307, in generate_transaction_document
head_block = await HeadBlock().head_block
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/silkaj/network_tools.py", line 244, in get_head
return await client(blockchain.current)
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/duniterpy/api/bma/blockchain.py", line 392, in current
return await client.get(MODULE + '/current', schema=BLOCK_SCHEMA)
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/duniterpy/api/client.py", line 231, in get
response = await client.requests_get(url_path, **params)
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/duniterpy/api/client.py", line 144, in requests_get
raise ValueError('status code != 200 => %d (%s)' % (response.status, (await response.text())))
ValueError: status code != 200 => 429 (Error)
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fd385bca8d0>
ERROR:asyncio:Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7fd385b07888>, 4002.554372885)]']
connector: <aiohttp.connector.TCPConnector object at 0x7fd385bca9e8>
Traceback (most recent call last):
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/duniterpy/api/client.py", line 141, in requests_get
error_data = parse_error(await response.text())
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/duniterpy/api/client.py", line 65, in parse_error
raise jsonschema.ValidationError("Could not parse json : {0}".format(str(e)))
jsonschema.exceptions.ValidationError: Could not parse json : Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/inso/.pyenv/versions/silkaj-3.7/bin/silkaj", line 23, in <module>
cli(obj={})
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/silkaj/tools.py", line 70, in wrapper
return loop.run_until_complete(f(*args, **kwargs))
File "/home/inso/.pyenv/versions/3.7.0/lib/python3.7/asyncio/base_events.py", line 568, in run_until_complete
return future.result()
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/silkaj/tx.py", line 68, in send_transaction
pubkey_amount = await get_amount_from_pubkey(issuer_pubkey)
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/silkaj/money.py", line 117, in get_amount_from_pubkey
listinput, amount = await get_sources(pubkey)
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/silkaj/money.py", line 128, in get_sources
sources = await client(tx.sources, pubkey)
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/duniterpy/api/bma/tx.py", line 236, in sources
return await client.get(MODULE + '/sources/%s' % pubkey, schema=SOURCES_SCHEMA)
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/duniterpy/api/client.py", line 231, in get
response = await client.requests_get(url_path, **params)
File "/home/inso/.pyenv/versions/3.7.0/envs/silkaj-3.7/lib/python3.7/site-packages/duniterpy/api/client.py", line 144, in requests_get
raise ValueError('status code != 200 => %d (%s)' % (response.status, (await response.text())))
ValueError: status code != 200 => 429 (Error)
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f51690d3978>
ERROR:asyncio:Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f516900e888>, 4003.371805189)]']
connector: <aiohttp.connector.TCPConnector object at 0x7f51690d38d0>
```Backloghttps://git.duniter.org/clients/python/duniterpy/-/issues/64Add automatic p2p multi-nodes requests to spread the load on nodes2023-07-08T15:27:19+02:00Vincent TexierAdd automatic p2p multi-nodes requests to spread the load on nodesDuniterpy should handle multi-nodes requests to share the write load on nodes and to ensure to have the most valid information of the blockchain consensus.
Client should not care about how and where the requests are sent, and all the co...Duniterpy should handle multi-nodes requests to share the write load on nodes and to ensure to have the most valid information of the blockchain consensus.
Client should not care about how and where the requests are sent, and all the complexity should be in the library.
Then, all clients using Duniterpy, will be really p2p clients.
Sakia implementation : https://git.duniter.org/clients/python/sakia/blob/master/src/sakia/services/network.py#L250Backlog