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
So I issue 25 credentials to a holder (from one issuer to one holder) all from the same cred_def.
I then try to break the revocation registry by revoking all issued credentials simultaneously (no batching).
By doing this I am able to get to a state where the ledger complains about current accumulator value being wrong.
When I take a look at the ledger I see that some of the REVOC_REG_ENTRYs of credentials the issuer believes is revoked never ended up on the ledger. (I think the writes reach the ledger out of order hence the ledger complaining about the current accumulator value)
(we are running acapy in multi-tenancy mode with an endorser)
Now I try to fix it:
Then I use the endpoint PUT /revocation/registry/{rev_reg_id}/fix-revocation-entry-state
This seems to work as intended. It finds the diff between the ledger and issuer and sends the new REVOC_REG_ENTRY to the ledger and I can find the entry on the ledger.
BUT when I then try to revoke another credential the accumulator values used are completely wrong.
Take a look at my calls below:
PUT /revocation/registry/KES3KNQbpuq5T84XLnTFQQ%3A4%3AKES3KNQbpuq5T84XLnTFQQ%3A3%3ACL%3A8%3AEpic%3ACL_ACCUM%3Adcf175a9-2732-451f-858c-c13e754917e0/fix-revocation-entry-state?apply_ledger_update=false
PUT /revocation/registry/KES3KNQbpuq5T84XLnTFQQ%3A4%3AKES3KNQbpuq5T84XLnTFQQ%3A3%3ACL%3A8%3AEpic%3ACL_ACCUM%3Adcf175a9-2732-451f-858c-c13e754917e0/fix-revocation-entry-state?apply_ledger_update=true
I can then again use PUT /revocation/registry/{rev_reg_id}/fix-revocation-entry-state to get that revoked credential's REVOC_REG_ENTRY on the ledger which works,
but the accumulator values of issuer stay wrong when revoking further credentials.
Let me know if I am being an idiot or if you need more info.
The text was updated successfully, but these errors were encountered:
There's some complicated code involved here. It sounds like your scenario is creating a state where the issuer's local accumulator value doesn't get coordinated with the ledger state.
I did some work with the anoncreds endpoint and could try and find some time to look at this.
I've looked at this now. It simply isn't updating the local wallet accumulator value after updating/fixing the ledger.
The only reason I don't think this is as critical as it seems, is that when revoking with an incorrect accum value, the agent will continue to apply ledger updates. So the agent won't get in a stuck state where it can't revoke.
I'm going to try and refactor some of the complexity out of this code so I won't have a fix right away.
How I break the revocation registry:
So I issue 25 credentials to a holder (from one issuer to one holder) all from the same
cred_def
.I then try to break the revocation registry by revoking all issued credentials simultaneously (no batching).
By doing this I am able to get to a state where the ledger complains about
current accumulator value
being wrong.When I take a look at the ledger I see that some of the
REVOC_REG_ENTRY
s of credentials the issuer believes is revoked never ended up on the ledger. (I think the writes reach the ledger out of order hence the ledger complaining about the current accumulator value)(we are running acapy in multi-tenancy mode with an endorser)
Now I try to fix it:
Then I use the endpoint
PUT /revocation/registry/{rev_reg_id}/fix-revocation-entry-state
This seems to work as intended. It finds the diff between the ledger and issuer and sends the new
REVOC_REG_ENTRY
to the ledger and I can find the entry on the ledger.BUT when I then try to revoke another credential the accumulator values used are completely wrong.
Take a look at my calls below:
then with true
Response:
I then revoke another credential and the endorser receives the following endorsement event (note the accumulator values )
I can then again use
PUT /revocation/registry/{rev_reg_id}/fix-revocation-entry-state
to get that revoked credential'sREVOC_REG_ENTRY
on the ledger which works,but the accumulator values of issuer stay wrong when revoking further credentials.
Let me know if I am being an idiot or if you need more info.
The text was updated successfully, but these errors were encountered: