You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am in the process of migrating our project from the askr to askar-anoncreds wallet-type. I have come across unexpected behavior during the issuance of anoncreds.
Summary of unexpected behavior
We run 2 agents in our stack, author (ACAPY_MULTITENANT: true) and endorser. We restrict the creation of schemas to the endorser agent.
In the create_offer function of the anoncreds implementation acapy_agent/protocols/issue_credential/v2_0/formats/anoncreds/handler.py the current profile session uses the cred_def_id to find the schemaId associated with the cred_def and then attempts to fetch the schema from the agent's askar db. However since our endorser agent created the schema this fetch comes back as None
Looking at the indy implementation acapy_agent/protocols/issue_credential/v2_0/formats/indy/handler.py the ledger is used to resolve the schema.
More detail
Below is a modified version of the anoncreds create_offer function with added print statements followed by a stack trace of the error I see when I attempt to issue an anon cred :
The handler should be using the anoncreds registry here instead of the wallet/db.
I'll fix it. I'm not sure when this was introduced, but this would only work if the issuer created the schema and it should get the objects through the registry anyway.
I am in the process of migrating our project from the
askr
toaskar-anoncreds
wallet-type. I have come across unexpected behavior during the issuance of anoncreds.Summary of unexpected behavior
We run 2 agents in our stack, author (
ACAPY_MULTITENANT: true
) and endorser. We restrict the creation of schemas to the endorser agent.In the
create_offer
function of the anoncreds implementationacapy_agent/protocols/issue_credential/v2_0/formats/anoncreds/handler.py
the current profile session uses thecred_def_id
to find theschemaId
associated with thecred_def
and then attempts to fetch the schema from the agent's askar db. However since our endorser agent created the schema this fetch comes back asNone
Looking at the indy implementation
acapy_agent/protocols/issue_credential/v2_0/formats/indy/handler.py
the ledger is used to resolve the schema.More detail
Below is a modified version of the anoncreds
create_offer
function with added print statements followed by a stack trace of the error I see when I attempt to issue an anon cred :The stack trace
As we can see from the prints surrounded by
<><><><>
theschemaId
is resolved from thecred_def_dict
but theschema_entry
comes back asNone
If I have missed something or going about this the wrong way etc. please enlighten me.
The text was updated successfully, but these errors were encountered: