-
Notifications
You must be signed in to change notification settings - Fork 207
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
Issue with revoking AnonCreds credentials #1864
Comments
I think this is something related to the usage of legacy indy identifiers vs did:indy identifiers. In 0.5.x there were some changes in the handling of Indy identifiers, and now they are stored in their fully-qualified, did:indy form. As a result, if you are using former legacy identifiers to query for them, you won't be able to find them. For instance, I'm using Credo 0.5.3 and when I receive the credential from BCGov Wallet Showcase demo, whose revocation rev_reg_id field is "_tags":{
"anonCredsCredentialRevocationId":"3",
"anonCredsRevocationRegistryId":"did:indy:bcovrin:test:QEquAHkM35w4XVT3Ku5yat/anoncreds/v0/REV_REG_DEF/567943/student_card/b62ed306-45ff-4951-a1a2-52ade0a312f3",
"connectionId":"7a272d39-8453-45d1-b81a-7cdea81b66a3",
"credentialIds":["c94d5ae0-b9e4-4ef9-a1c8-d311f0f7ed7a"],
"role":"holder",
"state":"done",
"threadId":"46514894-0c01-4d72-a44b-a0bc0dcd2c95"
} So I guess what's happening here is that your notification sender is using the legacy revocation registry id and Credo only looks-up for the new one. Maybe this is related to the issue hyperledger/anoncreds-rs#335 wants to solve (which also was raised when dealing with legacy credentials with Credo 0.5). In my opinion we should fix these problems in Credo, by either:
|
Thank you for your prompt response!
How much less efficient are we talking? Would it effectively take twice as long (in worse case) for record lookup if we went with this strategy? I'm not a Credo maintainer so I'm not sure if my opinion is needed here, but if the above assumption is true that would significantly impact performance in projects like Bifold. |
I think we can do it with a single query using an OR statement (that's also what we do in certain other cases) |
You are right, I think that's the way to go. |
I love it. Would that be an easy change for you guys to make or would you prefer the Bifold team take a swing at it first? |
After upgrading from AFJ 0.4.2 to Credo 0.5.2 revocation seems to have stopped working with the credentials we use (anoncreds). The failure happens in
@credo-ts/packages/core/src/modules/credentials/protocol/revocation-notification/services/RevocationNotificationService.ts
inprocessRevocationNotification
method whenthis.credentialRepository.getSingleByQuery
is called. That method is throwing an error becausefindSingleByQuery
is returning null in@credo-ts/packages/core/src/storage/Repository.ts
ie. it didn't find any records.Here is one of the sample queries that is getting this error, it looks normal to me but let me know if you notice anything wrong.
Might be worth mentioning that this still happens if the credentials are new, ie. they were both issued and then revoked after the upgrade to 0.5.2. (not just for old credentials from before 0.5.2 getting revoked)
Relevant dep versions (this occurs in Bifold / BC Wallet):
The text was updated successfully, but these errors were encountered: