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

multi-ledger write failure on register-nym #2168

Closed
usingtechnology opened this issue Mar 14, 2023 · 6 comments · Fixed by #2339
Closed

multi-ledger write failure on register-nym #2168

usingtechnology opened this issue Mar 14, 2023 · 6 comments · Fixed by #2339

Comments

@usingtechnology
Copy link
Contributor

version: aries-cloudagent-python-1.0.0-rc1
multitenant = true
wallet type = askar AND indy

tests were performed locally using a local endorser that is preconfigured. the production and write ledger is http://test.bcovrin.vonx.io/genesis.

Cannot successfully call ledger/register-nym for an agent/wallet, with a valid endorser connection when running in multiledger mode (ACAPY_GENESIS_TRANSACTIONS_LIST=ledgers.yml) but the same code will work when running in single ledger mode (ACAPY_GENESIS_URL=http://test.bcovrin.vonx.io/genesis)

I have a branch in traction that I was using to run the tests and there are a lot of notes in this hack md.

I ran both scenarios (multi ledger vs single ledger) with indy and askar wallets and both wallets gave the same results (at the api level). Both indy and askar were successful with single ledger and both failed with multi ledger: Cannot update endpoint at ledger without a public DID. See hackmd - where error seems to be

I dug in a lot deeper and event adjusted some of the acapy code to get as far into the call stack as I could, and then both fail similarly with WalletItemNotFound (indy) WalletNotFoundError (askar). See hackmd - focused failure

It appears that there is some context switching or changing of sessions when we get into multi ledger. This is pure speculation on my part... But in the same call stack, we can see the wallet record containing the public did information, but further down the stack, the same call returns None.

To get as deep into the code as I could, I passed in the public_info (DIDInfo) into wallet and ledger calls just so they wouldn't fail on lookup, but of course, eventually we hit a point where I couldn't change the code.

Please refer to hackmd - deeper testing to see where indy and askar eventually end up failing for me.

Bottom line is there is some kind of low-level difference between multi ledger and single ledger that is preventing an agent/wallet from successfully calling ledger/register-nym

@ianco
Copy link
Contributor

ianco commented Mar 14, 2023

I think this is an issue in multi-tenancy only. I found a similar issue with mediation in multi-tenancy mode:

#2075

I had the same experience as @usingtechnology ... traced the code and it seemed to be getting confused between wallet contexts.

@usingtechnology
Copy link
Contributor Author

thanks @ianco - that should help narrow the focus. I did not test with a single tenant, ONLY with multitenant=true.

@esune
Copy link
Contributor

esune commented Apr 4, 2023

@swcurran this is the issue I was mentioning that is preventing Traction from being used in multi-tenant mode. It would be nice if we can plan when it will be looked into as it might affect Traction's roadmap as well.
c.c.: @usingtechnology

@swcurran
Copy link
Contributor

@shaangill025 — this is associated with your work on multi-ledgers. Adding it here for bookkeeping completeness.

@esune
Copy link
Contributor

esune commented Jul 25, 2023

@shaangill025 this will be resolved by #2339, correct?

@shaangill025
Copy link
Contributor

@shaangill025 this will be resolved by #2339, correct?

Yes, this is what I had demonstrated.

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.

5 participants