Skip to content

Error during creation of credential definition with revocation enabled #3624

Open
@MonolithicMonk

Description

@MonolithicMonk

Problem Description

I get the error an error during the creation of a credential definition with revocation enabled using anoncreds. The credential definition is actually created however, the error occurs during the revocation operation. I still haven't been able to determine what the cause of the error is. Here is a partial log:

File "/home/aries/.venv/lib/python3.12/site-packages/acapy_agent/wallet/askar.py", line 398, in get_local_did
    raise WalletNotFoundError("Unknown DID: {}".format(did))
acapy_agent.wallet.error.WalletNotFoundError: Unknown DID: REDACTED

I can create the credential definition in a multitenant - endorsement setup. However, after the successful creation and endorsement of the Revocation Registry Definition (RevRegDef), the automatic process to create the corresponding initial Revocation Registry Entry (the list state) fails with the WalletNotFoundError shown above.

To clarify the sequence based on my logs:

A tenant agent (using askar-anoncreds wallet type, configured with an endorser) successfully creates a CredDef via endorsement.
The same tenant agent successfully creates the associated RevRegDef via endorsement. The anoncreds::revocation-registry-definition::finished event is emitted.
The event handler revocation_setup.py::on_rev_reg_def triggers automatically upon receiving this event.
This handler successfully uploads the tails file and then calls revocation.py::create_and_register_revocation_list.
This leads down a call stack eventually calling indy_vdr.py::send_revoc_reg_entry, which needs to look up the tenant's issuer DID using askar.py::get_local_did to prepare the transaction for endorsement.
Failure: get_local_did raises WalletNotFoundError for the tenant's own DID at this point in the execution flow.
It seems that while the initial request context (handled via API and endorsement flow) correctly resolves the tenant's wallet and DID, the execution context available within the on_rev_reg_def event handler (running asynchronously after the RevRegDef write is acknowledged) is somehow unable to access the same DID within the tenant's wallet.

Possibly related to #3586

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions