
Returns ledger info to lookup_did_in_configured_ledgers.
Wait for a response for 10 seconds, if timed out return None.Return an applicable ledger if found, else raise an exception.Checks non_production ledger where the DID is not self_certified.Checks production ledger where the DID is not self_certified.Checks non_production ledger where the DID is self_certified.Checks production ledger where the DID is self_certified.
Order/preference for selection: self_certified > production > non_production. As these tasks get finished, construct applicable_prod_ledgers and applicable_non_prod_ledgers dictionaries, each with self_certified and non_self_certified inner dict which are sorted by the original order or index. Otherwise, launch parallel _get_ledger_by_did tasks for each of the configured ledgers. If found, return the ledger info, else continue. If the calling function (above) is in, then check the DID in cache for a corresponding applicable ledger_id. lookup_did_in_configured_ledgers function. If multiple ledgers are configured then IndyLedgerRequestsExecutor service extracts DID from the record identifier and executes the check below, else it returns the BaseLedger instance. The following process is executed for these functions in ACA-Py: Returns the current active/set write_ledger's ledger_id Returns the multiple ledger configuration currently in use Multi-ledger related actions are grouped under the ledger topic in the SwaggerUI or under /ledger/multiple path. Only one ledger can be assigned, otherwise a ConfigError is raised. is_write: Whether the ledger is the write ledger. keepalive: how many seconds to keep the ledger open. pool_name: name of the indy pool to be opened. Multiledger review download#
genesis_url: The url from which to download the genesis transactions to use for connecting to an Indy ledger. genesis_transactions: String of genesis transactions to use for connecting to an Indy ledger. genesis_file: The path to the genesis file to use for connecting to an Indy ledger. prefer production ledgers over non-production ledgers)įor connecting to ledger, one of the following needs to be specified: This is used by the pool selector algorithm to know which ledger to use for certain interactions (i.e. is_production*: Whether the ledger is a production ledger. id*: The id (or name) of the ledger, can also be used as the pool name if none provided. Example config file:įor each ledger, the required properties are as following: If -genesis-transactions-list is specified, then -genesis-url, -genesis-file, -genesis-transactions should not be specified. aries_cloudagent/config/multi_ledger_config.yml This parameter accepts a string which is the path to the YAML configuration file. You can enable support for multiple ledgers using the -genesis-transactions-list startup parameter. More background information including problem statement, design (algorithm) and more can be found here. If no write ledger is assigned then a ConfigError is raised. Write ledger can be assigned using is_write in the configuration or using any of the -genesis-url, -genesis-file, and -genesis-transactions startup (ACA-Py) arguments. For write requests, dynamic allocation of write_ledger is not supported.
For read requests, checking of multiple ledgers in parallel is done dynamically according to logic detailed in Read Requests Ledger Selection. Ability to use multiple Indy ledgers (both IndySdk and IndyVdr) for resolving a DID by the ACA-Py agent.