openwallet-foundation / acapy

Hyperledger Aries Cloud Agent Python (ACA-Py) is a foundation for building decentralized identity applications and services running in non-mobile environments.
https://wiki.hyperledger.org/display/aries
Apache License 2.0
412 stars 512 forks source link

Revocation: Attempting to submit entry results in missing accumulator value error #2011

Closed dbluhm closed 11 months ago

dbluhm commented 1 year ago

This might be another instance of me misunderstanding these endpoints but while attempting to publish a revocation registry entry with an endorser, I kept on running into the following error:

aries_cloudagent.protocols.endorse_transaction.v1_0.manager.TransactionManagerError: Ledger request error. Request failed: client request invalid: InvalidClientRequest('The current accumulator value: 21 13FD04821A9080CF52962CD7A192C3C85CA61CBA5F70BBEF4E8B56687625D7615 21 11CF135D03EBDFE337AAF0C2FBC52D082001F52A371B524E467A842CAB9C07F73 6 814A37C336D711B4AF1321BBE2BC695D6FACA9ACC46813CCCD27BC0E32F71D28 4 33EF994BD21D5E4D601B76F12EC458EB23D3BDBE78A864299BCE1968C379CB71 6 828BA715F48612742D9CDE197A3D13B3B9D346AE56E10F5710EA884343C4E95E 4 3A0A28A69CB316821049FE44C059A6332C0FA25535A09875F9F95174B2033E04 must be equal to the last accumulator value: None in transaction',).

This was tested on ACA-Py 0.7.5 using Askar wallet type. It's possible that this was timing related; I was running a script that performed many operations in quick succession; however, I had been waiting for all previous transactions to be written to the network before moving on to this.

ianco commented 1 year ago

@dbluhm this will happen if you write the transactions in the wrong order. We've run into this before and we even added an endpoint to fix the issue (PUT /revocation/registry/{rev_reg_id}/fix-revocation-entry-state)

You can call this with apply_ledger_update=false and it won't try to apply any updates.

I suggest you trace exactly when credentials are revoked and updated revocations are written to the ledger, so that if this problem arises you can track back and see what happened. It's possible there's a logic error somewhere but tough to track down without specifics ...

dbluhm commented 11 months ago

I think this issue is stale, especially given plans to rework endorsement. Closing.