aries-cloudagent-python
aries-cloudagent-python copied to clipboard
Adding configuration parameters when opening the pool ledger
I have seen in the code of aca-py that when you are open the pool ledger using the indy sdk, you are not passing any additional configuration parameters, from /aries_cloudagent/ledger/indy.py line 170 self.handle = await indy.pool.open_pool_ledger(self.name, "{}"), while indy-sdk gives you this option. Is it possible to also add this functionality?
@andrewwhitehead -- could you review this and let me know what could/should be done about this? What can be passed in the {}s, and should we expose this as needing to be available to controllers using ACA-Py?
@shaangill025 -- does this play into the state proofs work you were looking at when you did the multi-ledger support?
Thanks
The parameters are as follows:
{
"timeout": int (optional), timeout for network request (in sec).
"extended_timeout": int (optional), extended timeout for network request (in sec).
"preordered_nodes": array<string> - (optional), names of nodes which will have a priority during request sending:
["name_of_1st_prior_node", "name_of_2nd_prior_node", .... ]
This can be useful if a user prefers querying specific nodes.
Assume that `Node1` and `Node2` nodes reply faster.
If you pass them Libindy always sends a read request to these nodes first and only then (if not enough) to others.
Note: Nodes not specified will be placed randomly.
"number_read_nodes": int (optional) - the number of nodes to send read requests (2 by default)
By default Libindy sends a read requests to 2 nodes in the pool.
If response isn't received or `state proof` is invalid Libindy sends the request again but to 2 (`number_read_nodes`) * 2 = 4 nodes and so far until completion.
}
There was an issue to set the number of read nodes specifically (#165). Otherwise option could be added to pass them in as JSON, although that's not very ergonomic it would be easier to support different ledger backends without adding too many command line parameters. indy_vdr has mostly the same settings, although the node priorities are a little different.