-
Notifications
You must be signed in to change notification settings - Fork 519
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
Fix revocation accum sync when endorsement txn fails #3547
base: main
Are you sure you want to change the base?
Fix revocation accum sync when endorsement txn fails #3547
Conversation
4de0aca
to
eb5fb83
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
2ed99c6
to
d08add8
Compare
Signed-off-by: jamshale <[email protected]> Refactor cognitive complexity Signed-off-by: jamshale <[email protected]> Add happy path unit test Signed-off-by: jamshale <[email protected]> Raise a responder None error Signed-off-by: jamshale <[email protected]> Remove unused duplicated funtion Signed-off-by: jamshale <[email protected]>
bf34599
to
6afa43a
Compare
Squash rebased and added a happy path unit test. |
|
I'm getting weird behaviour with the alice/faber demo. If I issue a credential and then request a proof, the proof validates. If I revoke the credential and then ask for a proof again, the proof fails (as expected). However if I issue a second (or third) credential and then ask for a proof, the proof still fails ( This is happening on the aca-py |
# We know this needs endorsement | ||
endorser_did, connection = await self._get_endorser_info() | ||
rev_reg_record, recovery_txn = await sync_accumulator(session=session) | ||
await create_and_send_endorser_txn() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If an endorser is not required (i.e.: the agent is set-up with higher privileges than author), how is this handled? In our scenarios we will likely only ever use an endorser to get transactions approved to be written on the ledger, but I think it may not be the only scenario?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case it would go through the existing re-sync and re-try flow. Also the manual fix-revocation-state could be applied for no endorser, although it shouldn't be needed. https://github.com/openwallet-foundation/acapy/blob/main/acapy_agent/revocation/models/issuer_rev_reg_record.py#L336
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the endorser_did
isn't configured then aca-py should try to write the ledger transaction directly.
I wonder if the demo isn't selecting a valid credential anymore. I would think an automated test would have detected this scenario. I'll try and manually test without the demo. |
I verified that it's selecting a valid credential. I also tried manually deleting the revoked credential(s) and the proof still failed. |
That's not good... I'm not sure when this happened or why a test isn't catching it. |
I can look into this issue, it's not related to this PR (I tested it on the aca-py |
There was something merged just yesterday related to presentation. I'll try and isolate when this happened. |
When the endorsement transaction fails, create an event in the response handler. Check the rev_reg_defs on the ledger to find the problem entry. Create a recovery transaction and update the local wallet and re-send the transaction to the endorser.
Retry the same accumulator error 5 times and then log the error.
Note: The
fix-revocation-entry-state
endpoint with create transaction still doesn't create an endorsed transaction. I didn't want to try a change that for this commit which needs to be backported. Also anoncreds (did:sov) likely has the same problem and this does not attempt to fix it here. Only for indy revocation.