Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wallet-type: only "indy" creates DB and tables; "askar" missing #2617

Closed
darrellodonnell opened this issue Nov 21, 2023 · 5 comments · Fixed by #2618
Closed

wallet-type: only "indy" creates DB and tables; "askar" missing #2617

darrellodonnell opened this issue Nov 21, 2023 · 5 comments · Fixed by #2618

Comments

@darrellodonnell
Copy link

darrellodonnell commented Nov 21, 2023

using version 0.10.4 we noticed that new Agents are force into in-memory wallets, not postgres.

Leaving out wallet-type: in our config.yml results in an in-memory wallet, not the postgres wallet that we need.

setting wallet-type: indy gives us our storage but then dumps out a deprecation note:

2023-11-20 16:42:14 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
2023-11-20 16:42:14 ::                             ⚠ DEPRECATION NOTICE: ⚠                              ::
2023-11-20 16:42:14 :: -------------------------------------------------------------------------------- ::
2023-11-20 16:42:14 :: The Indy wallet type is deprecated, use Askar instead; see: https://aca-         ::
2023-11-20 16:42:14 :: py.org/main/deploying/IndySDKtoAskarMigration/                                   ::
2023-11-20 16:42:14 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

At one point there was a wallet-type: askar option but that has vanished it seems. Only basic (default) and indy are supported as options from what I can see:

--wallet-type <wallet-type>
                        Specifies the type of Indy wallet provider to use. Supported internal storage types are 'basic' (memory) and 'indy'. The default (if not specified)
                        is 'basic'. [env var: ACAPY_WALLET_TYPE]
@darrellodonnell
Copy link
Author

is it possible that the wallet-storage-type: basic has been confused with wallet-type: askar somehow?

@dbluhm
Copy link
Contributor

dbluhm commented Nov 21, 2023

--wallet-type askar will work; the help text is just out of date. I'll submit a quick update for that.

@dbluhm
Copy link
Contributor

dbluhm commented Nov 21, 2023

If you've attempted to use the askar wallet type and are seeing errors, feel free to post them here. A common issue I've seen is that the postgres version is older than askar requires so I'd keep an eye out for that.

@darrellodonnell
Copy link
Author

@dbluhm i thought that we had tried wallet-type: askar and saw immediate failures but a clean start shows that was incorrect. I have an agent running with Askar now. Many thanks!

We had definitely seen the older postgres issues (I somehow ended up with postgres v10 on one machine???). I think the cause of our issues was re-using the wallet-name value. More here...

For those that are interested, if you create a wallet of type indy and then use the same wallet-name: but flip to wallet-type: askar things fail out immediately:

2023-11-21 06:23:33 2023-11-21 14:23:33,653 aries_cloudagent.commands.start ERROR Exception during startup:
2023-11-21 06:23:33 Traceback (most recent call last):
2023-11-21 06:23:33 File "/home/indy/.local/lib/python3.9/site-packages/aries_cloudagent/askar/store.py", line 157, in open_store
2023-11-21 06:23:33 store = await Store.open(
2023-11-21 06:23:33 File "/home/indy/.local/lib/python3.9/site-packages/aries_askar/store.py", line 326, in open
2023-11-21 06:23:33 return Store(await bindings.store_open(uri, key_method, pass_key, profile), uri)
2023-11-21 06:23:33 File "/home/indy/.local/lib/python3.9/site-packages/aries_askar/bindings/init.py", line 83, in store_open
2023-11-21 06:23:33 return await invoke_async(
2023-11-21 06:23:33 File "/home/indy/.local/lib/python3.9/site-packages/aries_askar/bindings/lib.py", line 358, in invoke_async
2023-11-21 06:23:33 return await self.loaded.invoke_async(
2023-11-21 06:23:33 File "/usr/local/lib/python3.9/asyncio/futures.py", line 284, in await
2023-11-21 06:23:33 yield self # This tells Task to wait for completion.
2023-11-21 06:23:33 File "/usr/local/lib/python3.9/asyncio/tasks.py", line 328, in __wakeup
2023-11-21 06:23:33 future.result()
2023-11-21 06:23:33 File "/usr/local/lib/python3.9/asyncio/futures.py", line 201, in result
2023-11-21 06:23:33 raise self._exception
2023-11-21 06:23:33 aries_askar.error.AskarError: Backend error
2023-11-21 06:23:33 Caused by: error returned from database: relation "config" does not exist

@WadeBarnes
Copy link
Contributor

To add to @darrellodonnell 's comment. Switching from indy to askar requires a migration. Scripts can be found here; https://github.com/hyperledger/aries-acapy-tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants