Closed wdbasson closed 5 months ago
I think I figured it out.
Our original test framework would create new tenants for each individual test. This made things easy, because "Alice" would always only have 1 credential. Now, in the regression test framework, "Alice" can now have potentially dozens of credentials.
With our verifier tests, we fetch relevant credentials for a proof, which can now match more than one credential. We always just take the first one in the list, because previously we assumed there is only one for Alice. This means it can (non-deterministically) provide a revocable credential for a proof, instead of the intended non-revocable credential.
Since our tests include in the proof request that it must be non-revoked between some arbitrary timeframe, ACA-Py sees this request, and that a revocable credential is provided, and tries to look up the "delta of the accumulated state" for the revocation registry associated with the credential.
For some reason, the ledger provides ACA-Py with an unusable response, because the response is missing some expected fields. Here's a sample of a problematic response that ACA-Py gets from indy_vdr.get_revoc_reg_delta
:
{
"from": 0,
"revocRegDefId": "HBv6i91c7E3LKPXwp4jzoo:4:HBv6i91c7E3LKPXwp4jzoo:3:CL:14:RegressionTestTag:CL_ACCUM:f55a32e5-aece-4cb5-889f-da8e02b01b23",
"to": 20,
"type": "117",
"data": {
"stateProofFrom": null,
"value": {
"accum_to": null,
"accum_from": null
}
},
"identifier": "LibindyDid111111111111",
"reqId": 1716277988080577000,
"seqNo": null,
"txnTime": null
}
ACA-Py expects data.value.accum_to
to exist, but instead, for whatever reason, we get None. I have no clue why it returns None, but that is the source of the issue.
So, a fix for our tests would be to ensure we always only provide the non-revocable credentials. i.e. in the proof requests, add a restriction by credential definition id. That's easy. But more important would be to understand why the ledger response is missing expected values to begin with, and also to contribute some improved error handling to ACA-Py, so we get more meaningful response than the TypeError.
Fixed with the following: https://github.com/didx-xyz/aries-cloudapi-python/pull/806/commits/217b647c2a29ea67a68e3c1753054bf7ac888748 adds restrictions to which credentials match the proof
Occurs in regression tests
ACA-Py logs: