Skip to content
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

ACA-Py 0.10.1 and 0.10.2-rc0 - Errors when calling /revocation/registries/created and /revocation/registry/{rev_reg_id}/fix-revocation-entry-state #2485

Closed
WadeBarnes opened this issue Sep 8, 2023 · 20 comments · Fixed by #2486
Assignees

Comments

@WadeBarnes
Copy link
Contributor

To clarify this issue appears to be specific to an agent that has been upgraded from py36-1.16-1_1.0.0-rc0 to 0.10.1 prior to upgrade to 0.10.2-rc0. The same error(s) occur in 0.10.1 and 0.10.2-rc0. An agent upgraded from py36-1.16-1_1.0.0-rc0 straight to 0.10.2-rc0 does not appear to be affected.

Scenario:

  • LSBC issuer in dev upgraded from py36-1.16-1_1.0.0-rc0 to 0.10.1, and then to 0.10.2-rc0 is having this issue.
  • LSBC issuer in test upgraded from py36-1.16-1_1.0.0-rc0 to 0.10.2-rc0 - the calls work as expected.

lsbc-dev-0.10.1.log
lsbc-dev-0.10.2-rc0.log

@WadeBarnes
Copy link
Contributor Author

I'll be testing with another set of agents that have been through an upgrade to 0.10.1, and I'll report the findings when I have them. Hoping to determine whether this is an isolated incident.

@WadeBarnes
Copy link
Contributor Author

Here are the results from testing on another agent. They indicate this issue may be isolated to the one agent.

IDIM-dev agent upgraded from py3.9-indy-1.16.0-0.8.1 to py3.9-0.10.1

At py3.9-0.10.1:

  • Call to /revocation/registries/created working.
  • Call to /revocation/registry/{rev_reg_id}/fix-revocation-entry-state not working since it's broken in this version.

At py3.9-0.10.2-rc0:

  • Call to /revocation/registries/created working.
  • Call to /revocation/registry/{rev_reg_id}/fix-revocation-entry-state working as expected.

@swcurran
Copy link
Contributor

swcurran commented Sep 8, 2023

@shaangill025 — based on what the bug was, does this seem right? That running the command on 0.10.1 triggers a write that impacts future usage?

@shaangill025
Copy link
Contributor

The following error is being triggered when calling GET /revocation/registries/created:

File "/home/indy/.local/lib/python3.9/site-packages/aries_cloudagent/revocation/models/issuer_rev_reg_record.py", line 110, in __init__
    super().__init__(
TypeError: __init__() got an unexpected keyword argument 'issuance_type'

This is because there is at least one IssuerRevRegRecord record that was created with ACA-Py 0.5.2. Not related to #2480.

issuance_type attribute was in IssuerRevRegRecord in 0.5.2 and then removed since 0.5.3
0.5.2:
https://github.com/hyperledger/aries-cloudagent-python/blob/0.5.2/aries_cloudagent/revocation/models/issuer_rev_reg_record.py
0.5.3:
https://github.com/hyperledger/aries-cloudagent-python/blob/0.5.3/aries_cloudagent/revocation/models/issuer_rev_reg_record.py

Solution: Implement a custom upgrade function to update such records and execute it with the upgrade command.

@esune
Copy link
Member

esune commented Sep 8, 2023

This error is consistent with the issue that was previously identified with the LSBC dev agent when trying to bulk-publish revocations.

@swcurran
Copy link
Contributor

swcurran commented Sep 8, 2023

Agreed upon solution that @shaangill025 will implement:

  • Create a “named” upgrade script for the specific issue identified here.
  • Add a feature that allows the “acapy upgrade” function to invoke a specific named upgrade script and execute that process.

That will allow us to execute the process on a one-time basis on any environment that needs it.

@WadeBarnes
Copy link
Contributor Author

@shaangill025, Test results from #2486. Error log from a test run on the LSBC dev agent:

2023-09-14 18:35:03,161 aries_cloudagent.commands.upgrade ERROR IssuerRevRegRecord b80174a9-4c9f-4899-8227-c2366c19ab15 tagged for fixing issuance_type.
2023-09-14 18:35:03,164 aries_cloudagent.commands.upgrade ERROR IssuerRevRegRecord fccae016-0281-4f92-9b65-8ae16c27bf06 tagged for fixing issuance_type.
2023-09-14 18:35:03,165 aries_cloudagent.commands.upgrade ERROR IssuerRevRegRecord daed197d-c53b-4349-8679-0531a19e0e68 tagged for fixing issuance_type.
2023-09-14 18:35:03,165 aries_cloudagent.commands.upgrade ERROR IssuerRevRegRecord fcc6c90f-7572-426d-aad9-c8e9e43df73c tagged for fixing issuance_type.
2023-09-14 18:35:03,165 aries_cloudagent.commands.upgrade ERROR IssuerRevRegRecord 484a4aef-1d04-41ed-92bc-741633c13ebe tagged for fixing issuance_type.
2023-09-14 18:35:03,165 aries_cloudagent.commands.upgrade ERROR IssuerRevRegRecord 34765ce2-eb81-4895-be10-137a5c364eea tagged for fixing issuance_type.
2023-09-14 18:35:03,166 aries_cloudagent.commands.upgrade ERROR IssuerRevRegRecord ad5e9186-5c7f-48c7-82e8-31437e6d9687 tagged for fixing issuance_type.
2023-09-14 18:35:03,167 aries_cloudagent.commands.upgrade ERROR IssuerRevRegRecord d42ed0a2-f042-4725-969c-09cd3c6febb9 tagged for fixing issuance_type.
2023-09-14 18:35:03,167 aries_cloudagent.commands.upgrade ERROR IssuerRevRegRecord bf4911a5-e20b-4690-8e37-42085d77e269 tagged for fixing issuance_type.
Traceback (most recent call last):
  File "/home/indy/.local/bin/aca-py", line 8, in <module>
    sys.exit(script_main())
  File "/home/indy/.local/lib/python3.9/site-packages/aries_cloudagent/__main__.py", line 69, in script_main
    main(sys.argv)
  File "/home/indy/.local/lib/python3.9/site-packages/aries_cloudagent/__main__.py", line 75, in main
    run(args)
  File "/home/indy/.local/lib/python3.9/site-packages/aries_cloudagent/__main__.py", line 64, in run
    run_command(command, args)
  File "/home/indy/.local/lib/python3.9/site-packages/aries_cloudagent/commands/__init__.py", line 38, in run_command
    module.execute(argv)
  File "/home/indy/.local/lib/python3.9/site-packages/aries_cloudagent/commands/upgrade.py", line 528, in execute
    loop.run_until_complete(upgrade(settings=settings))
  File "/home/indy/.local/lib/python3.9/site-packages/nest_asyncio.py", line 99, in run_until_complete
    return f.result()
  File "/usr/local/lib/python3.9/asyncio/futures.py", line 201, in result
    raise self._exception
  File "/usr/local/lib/python3.9/asyncio/tasks.py", line 256, in __step
    result = coro.send(None)
  File "/home/indy/.local/lib/python3.9/site-packages/aries_cloudagent/commands/upgrade.py", line 409, in upgrade
    await _callable(root_profile)
  File "/home/indy/.local/lib/python3.9/site-packages/aries_cloudagent/commands/upgrade.py", line 503, in fix_issue_rev_reg_records
    record = await IssuerRevRegRecord.retrieve_by_id(
  File "/home/indy/.local/lib/python3.9/site-packages/aries_cloudagent/messaging/models/base_record.py", line 234, in retrieve_by_id
    return cls.from_storage(record_id, vals)
  File "/home/indy/.local/lib/python3.9/site-packages/aries_cloudagent/messaging/models/base_record.py", line 118, in from_storage
    return cls(**params)
  File "/home/indy/.local/lib/python3.9/site-packages/aries_cloudagent/revocation/models/issuer_rev_reg_record.py", line 110, in __init__
    super().__init__(
TypeError: __init__() got an unexpected keyword argument 'issuance_type'

@WadeBarnes
Copy link
Contributor Author

WadeBarnes commented Sep 15, 2023

Test results from the latest changes to #2486. Log from a test run on the LSBC dev agent. No errors this time.

2023-09-15 13:44:19,208 aries_cloudagent.commands.upgrade ERROR IssuerRevRegRecord b80174a9-4c9f-4899-8227-c2366c19ab15 tagged for fixing issuance_type.
2023-09-15 13:44:19,212 aries_cloudagent.commands.upgrade ERROR IssuerRevRegRecord fccae016-0281-4f92-9b65-8ae16c27bf06 tagged for fixing issuance_type.
2023-09-15 13:44:19,213 aries_cloudagent.commands.upgrade ERROR IssuerRevRegRecord daed197d-c53b-4349-8679-0531a19e0e68 tagged for fixing issuance_type.
2023-09-15 13:44:19,213 aries_cloudagent.commands.upgrade ERROR IssuerRevRegRecord fcc6c90f-7572-426d-aad9-c8e9e43df73c tagged for fixing issuance_type.
2023-09-15 13:44:19,213 aries_cloudagent.commands.upgrade ERROR IssuerRevRegRecord d42ed0a2-f042-4725-969c-09cd3c6febb9 tagged for fixing issuance_type.
2023-09-15 13:44:19,214 aries_cloudagent.commands.upgrade ERROR IssuerRevRegRecord 484a4aef-1d04-41ed-92bc-741633c13ebe tagged for fixing issuance_type.
2023-09-15 13:44:19,214 aries_cloudagent.commands.upgrade ERROR IssuerRevRegRecord 34765ce2-eb81-4895-be10-137a5c364eea tagged for fixing issuance_type.
2023-09-15 13:44:19,215 aries_cloudagent.commands.upgrade ERROR IssuerRevRegRecord ad5e9186-5c7f-48c7-82e8-31437e6d9687 tagged for fixing issuance_type.
2023-09-15 13:44:19,216 aries_cloudagent.commands.upgrade ERROR IssuerRevRegRecord bf4911a5-e20b-4690-8e37-42085d77e269 tagged for fixing issuance_type.

cc @shaangill025, @esune, @swcurran

@WadeBarnes
Copy link
Contributor Author

WadeBarnes commented Sep 15, 2023

The call to /revocation/registries/created is now working:

{
  "rev_reg_ids": [
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:109919:default:CL_ACCUM:34765ce2-eb81-4895-be10-137a5c364eea",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:113124:dev:CL_ACCUM:c974c155-2df6-459b-957a-d3f7057f6504",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:113124:dev:CL_ACCUM:84c4e8db-be5c-4dda-a780-05202f0b148c",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:135204:dev:CL_ACCUM:202f68c7-bf20-40a7-87e1-ddb0042687e1",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:135204:dev:CL_ACCUM:f004e286-0ecc-49a2-843a-26fc3f6371aa",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:135204:1.1.2:CL_ACCUM:6c145225-433f-4616-afec-eab3a31d5537",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:135204:1.1.2:CL_ACCUM:22c3184e-5a2a-405b-be69-864f425c848a",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:135204:1.1.3:CL_ACCUM:282b534a-e97b-4159-96f7-9aba5cec70b0",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:135204:dev1.0.0:CL_ACCUM:8d48f77f-0b67-42e0-8cd7-02369b37477f",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:135204:dev1.0.0:CL_ACCUM:c7f9cdfa-ce2d-4ac6-ab4f-f545ee421624",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:157778:default:CL_ACCUM:db524973-acb6-4ea2-bbb3-46e4b43aa963",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:135204:dev1.0.1:CL_ACCUM:5870d720-89e9-4acc-9bee-0ced8f1843d4",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:135204:dev1.0.1:CL_ACCUM:6cb8fb7f-136c-4a93-9805-c6b59de3a406",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:138293:default:CL_ACCUM:0a170449-83f0-4d09-a778-19879f453fbb",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:138293:default:CL_ACCUM:59f4c124-4f8a-43a9-a56e-bb7ed07cf659",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:144598:default:CL_ACCUM:ae78a5ea-dc69-4948-9257-605ed60b8475",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:144598:default:CL_ACCUM:326c6c70-174a-4995-ac3e-29dc6ec25c69",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:143514:default:CL_ACCUM:a3bf0559-b133-41a5-8082-92edf71c23f3",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:143514:default:CL_ACCUM:bdbf18be-b793-41c3-8789-d57180c61d3f",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:157778:default:CL_ACCUM:825d85aa-72cb-4915-b42a-ce9f5ad41691",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:192652:default:CL_ACCUM:46eeb8ad-e781-4d5d-90d1-8d9490d9b692",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:192652:default:CL_ACCUM:70cc5c77-cd86-4bbe-a5eb-0b3651c28182",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:209518:default:CL_ACCUM:d41706d2-c3ef-4297-878a-b9c30318a89e",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:209518:default:CL_ACCUM:c6f98707-dbca-4ecc-92d6-5eb0837f20dc",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:113124:default:CL_ACCUM:ad5e9186-5c7f-48c7-82e8-31437e6d9687",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:113124:default:CL_ACCUM:bf4911a5-e20b-4690-8e37-42085d77e269",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:106967:default:CL_ACCUM:b80174a9-4c9f-4899-8227-c2366c19ab15",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:113124:default:CL_ACCUM:fccae016-0281-4f92-9b65-8ae16c27bf06",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:106967:default:CL_ACCUM:daed197d-c53b-4349-8679-0531a19e0e68",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:113124:default:CL_ACCUM:d42ed0a2-f042-4725-969c-09cd3c6febb9"
  ]
}

However there is still an issue with some calls to /revocation/registry/{rev_reg_id}/fix-revocation-entry-state. Using the RevReg(s) for UUHA3oknprvKrpa7a6sncK:3:CL:209518:default as an example.

{
  "rev_reg_ids": [
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:209518:default:CL_ACCUM:c6f98707-dbca-4ecc-92d6-5eb0837f20dc",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:209518:default:CL_ACCUM:d41706d2-c3ef-4297-878a-b9c30318a89e"
  ]
}

A call to /revocation/registry/UUHA3oknprvKrpa7a6sncK%3A4%3AUUHA3oknprvKrpa7a6sncK%3A3%3ACL%3A209518%3Adefault%3ACL_ACCUM%3Ad41706d2-c3ef-4297-878a-b9c30318a89e/fix-revocation-entry-state?apply_ledger_update=false works:

{
  "rev_reg_delta": {
    "ver": "1.0",
    "value": {
      "accum": "21 1217806B15FE10375B6A962EB3EB743CD858F284B9769A0C75C3C089075A02D08 21 118CCD3AE5BC8148F7F4023F0C48C21D9BDC6FABB77FD3F787E832CE2A8F69399 6 67933E1B164C34EE6BF4F282312EC96DF551CEE34E63D3463DFBCC8E97FD9B39 4 12E97C442C3A29812AD7BBB1E287A6A44DA6AB9B0B1EE64D67B8DF2D9CD819CB 6 548731055FE022DB40665705A584270251CDC4D1C00C37797A917472BEE3637F 4 359A98CB7B81AC0CAF28E1E9304FABEDDBBAF69EB47E7A417E9AE3532B51C5B1",
      "revoked": [
        12,
        11,
        16,
        15,
        2,
        3,
        7,
        9,
        14,
        1,
        5,
        6,
        8,
        4,
        10,
        13,
        17
      ]
    }
  },
  "accum_calculated": {},
  "accum_fixed": {}
}

Where a call to /revocation/registry/UUHA3oknprvKrpa7a6sncK%3A4%3AUUHA3oknprvKrpa7a6sncK%3A3%3ACL%3A209518%3Adefault%3ACL_ACCUM%3Ac6f98707-dbca-4ecc-92d6-5eb0837f20dc/fix-revocation-entry-state?apply_ledger_update=false results in:

400: update() missing 1 required positional argument: 'revoked'

Error log: lsbc-0.11.0-pre1-pr2486.log

There are RevRegEntries associated to both RevRegs:

@WadeBarnes
Copy link
Contributor Author

WadeBarnes commented Sep 15, 2023

RevReg(s) with associated errors from /revocation/registry/{rev_reg_id}/fix-revocation-entry-state calls:

UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:113124:dev:CL_ACCUM:c974c155-2df6-459b-957a-d3f7057f6504
UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:135204:dev:CL_ACCUM:f004e286-0ecc-49a2-843a-26fc3f6371aa
UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:135204:1.1.2:CL_ACCUM:22c3184e-5a2a-405b-be69-864f425c848a
UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:135204:dev1.0.0:CL_ACCUM:8d48f77f-0b67-42e0-8cd7-02369b37477f
UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:135204:dev1.0.1:CL_ACCUM:5870d720-89e9-4acc-9bee-0ced8f1843d4
UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:138293:default:CL_ACCUM:59f4c124-4f8a-43a9-a56e-bb7ed07cf659
UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:144598:default:CL_ACCUM:ae78a5ea-dc69-4948-9257-605ed60b8475
UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:143514:default:CL_ACCUM:bdbf18be-b793-41c3-8789-d57180c61d3f
UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:113124:default:CL_ACCUM:ad5e9186-5c7f-48c7-82e8-31437e6d9687 - This RevReg does not exist on the ledger
UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:113124:default:CL_ACCUM:fccae016-0281-4f92-9b65-8ae16c27bf06 - This RevReg does not exist on the ledger
UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:113124:default:CL_ACCUM:d42ed0a2-f042-4725-969c-09cd3c6febb9 - This RevReg does not exist on the ledger

lsbc-0.11.0-pre1-pr2486 - LedgerNotFound.log

UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:192652:default:CL_ACCUM:70cc5c77-cd86-4bbe-a5eb-0b3651c28182

  • 400: Cannot connect to host tails-server-dev.pathfinder.gov.bc.ca:443 ssl:default [Name or service not known]
  • The URL to the tails server does not exist anymore, so this is an expected error.

UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:209518:default:CL_ACCUM:c6f98707-dbca-4ecc-92d6-5eb0837f20dc

  • 400: update() missing 1 required positional argument: 'revoked'
  • Log is attached to the previous comment.

@WadeBarnes
Copy link
Contributor Author

The active CredDef is UUHA3oknprvKrpa7a6sncK:3:CL:209518:default. Associated RevRegs are:

{
  "rev_reg_ids": [
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:209518:default:CL_ACCUM:c6f98707-dbca-4ecc-92d6-5eb0837f20dc",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:209518:default:CL_ACCUM:d41706d2-c3ef-4297-878a-b9c30318a89e"
  ]
}

The active registry is UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:209518:default:CL_ACCUM:c6f98707-dbca-4ecc-92d6-5eb0837f20dc; one of the RevRegs with an associated error.

@esune
Copy link
Member

esune commented Sep 15, 2023

The error on the first revocation registry appears to be caused by an old tails server url that has long been gone: tails-server-dev.pathfinder.gov.bc.ca:443. I think I would shelf this edge case as it is unlikely it will happen again (very old agent, very old tails server, luckily just development).

Unsure about the second issue... 🤔

@WadeBarnes
Copy link
Contributor Author

The error on the first revocation registry appears to be caused by an old tails server url that has long been gone: tails-server-dev.pathfinder.gov.bc.ca:443. I think I would shelf this edge case as it is unlikely it will happen again (very old agent, very old tails server, luckily just development).

Unsure about the second issue... 🤔

Yes, the .pathfinder.gov.bc.ca URLs don't exist anymore so I'd expect that to cause issues.

@WadeBarnes
Copy link
Contributor Author

I've confirmed the registries associated with the LedgerNotFound error either don't exist or have an invalid tails server URL. Comments above have been updated with the details. I'd say we can safely ignore the error.

This just leaves the error associated to the active RevReg, UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:209518:default:CL_ACCUM:c6f98707-dbca-4ecc-92d6-5eb0837f20dc, that needs to be investigated.

@WadeBarnes
Copy link
Contributor Author

WadeBarnes commented Sep 19, 2023

Testing updates for @shaangill025:

Results from calls to /revocation/registry/{rev_reg_id}/fix-revocation-entry-state for,

{
  "rev_reg_ids": [
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:209518:default:CL_ACCUM:c6f98707-dbca-4ecc-92d6-5eb0837f20dc",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:209518:default:CL_ACCUM:d41706d2-c3ef-4297-878a-b9c30318a89e"
  ]
}

UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:209518:default:CL_ACCUM:c6f98707-dbca-4ecc-92d6-5eb0837f20dc

  • 400: 'IndySdkProfileSession' object has no attribute 'handle'

UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:209518:default:CL_ACCUM:d41706d2-c3ef-4297-878a-b9c30318a89e

{
  "rev_reg_delta": {
    "ver": "1.0",
    "value": {
      "accum": "21 1217806B15FE10375B6A962EB3EB743CD858F284B9769A0C75C3C089075A02D08 21 118CCD3AE5BC8148F7F4023F0C48C21D9BDC6FABB77FD3F787E832CE2A8F69399 6 67933E1B164C34EE6BF4F282312EC96DF551CEE34E63D3463DFBCC8E97FD9B39 4 12E97C442C3A29812AD7BBB1E287A6A44DA6AB9B0B1EE64D67B8DF2D9CD819CB 6 548731055FE022DB40665705A584270251CDC4D1C00C37797A917472BEE3637F 4 359A98CB7B81AC0CAF28E1E9304FABEDDBBAF69EB47E7A417E9AE3532B51C5B1",
      "revoked": [
        4,
        2,
        9,
        10,
        6,
        17,
        1,
        16,
        5,
        14,
        11,
        8,
        3,
        13,
        15,
        12,
        7
      ]
    }
  },
  "accum_calculated": {},
  "accum_fixed": {}
}

lsbc-0.11.0-pr2486-pre2 - error.log

@WadeBarnes
Copy link
Contributor Author

WadeBarnes commented Sep 20, 2023

Based on discussions with @shaangill025 and @andrewwhitehead, the LSBC dev agent has been migrated to Askar secure storage. The wallet database was upgraded to Postgres v14 and then migrated from Indy to Askar storage.

The calls to to /revocation/registry/{rev_reg_id}/fix-revocation-entry-state (with apply_ledger_update=false) were retested for the affected RevRegs and both calls completed successfully,

{
  "rev_reg_ids": [
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:209518:default:CL_ACCUM:c6f98707-dbca-4ecc-92d6-5eb0837f20dc",
    "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:209518:default:CL_ACCUM:d41706d2-c3ef-4297-878a-b9c30318a89e"
  ]
}

UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:209518:default:CL_ACCUM:c6f98707-dbca-4ecc-92d6-5eb0837f20dc

{
  "rev_reg_delta": {
    "ver": "1.0",
    "value": {
      "accum": "21 126BAE85146FEAD529C0EF2EAF5CEE5E270762B73315DD460F8CC8222D784CFC8 21 120D223B0DDF6B285CE735808347EAAB297DEEDE0BCE9DE354D8A31ECF9B3F6BA 6 61C545BFF08DC8159D4478DCBDD428E82F2E9D80933AEFC8F17749EDE5F5003B 4 1A3158000D34B6B092EEBBF7DFAA5678B81677DF3C1B7C3147BB822957816266 6 6B46DD9EDCA0EF3A43093D569795FBEDAD55F2D8C5CD00A6F52ECE73D02C90B8 4 2E3CED2B8A7E0C7FC5B21D0745ACE1D8845E4F021BC2C3271ADC45EB8A254B53",
      "issued": [],
      "revoked": [
        1,
        3,
        5,
        6,
        7,
        8,
        9,
        10,
        11,
        12,
        13,
        14,
        15,
        16,
        17,
        18,
        19,
        20,
        21,
        22,
        23,
        24,
        25,
        26,
        27,
        28,
        29,
        30,
        31,
        32,
        33,
        37,
        40,
        44,
        50,
        51,
        52,
        53,
        54,
        55,
        58,
        59,
        60,
        61
      ]
    }
  },
  "accum_calculated": {
    "ver": "1.0",
    "value": {
      "prevAccum": "21 126BAE85146FEAD529C0EF2EAF5CEE5E270762B73315DD460F8CC8222D784CFC8 21 120D223B0DDF6B285CE735808347EAAB297DEEDE0BCE9DE354D8A31ECF9B3F6BA 6 61C545BFF08DC8159D4478DCBDD428E82F2E9D80933AEFC8F17749EDE5F5003B 4 1A3158000D34B6B092EEBBF7DFAA5678B81677DF3C1B7C3147BB822957816266 6 6B46DD9EDCA0EF3A43093D569795FBEDAD55F2D8C5CD00A6F52ECE73D02C90B8 4 2E3CED2B8A7E0C7FC5B21D0745ACE1D8845E4F021BC2C3271ADC45EB8A254B53",
      "accum": "21 11BA50CF01DBC1114C69776097241EBC7F82208159D217F3619B3A74B5861EE48 21 1250D96F34083950EB06FBAFB04B5D5749DE8CEBB6DC7718310433A5D14F409D0 6 5A2B3062B5D0D32FE709E7C5418B36C0AA2FEB5FD191361B9B6D521F22DACB44 4 263251C3681116AE0ADBE2960EEE49C71C2B80412BA1B9B4110CA7DB48AC1D8B 6 659A29F8E1407B01357DDE7334FA22CF630D4CFA5886478A1AEAF682D1ED9CE3 4 36D14CDAB9C3739E94A49A9C16F5F1E376E2E5303F9BB0547F69DECA82516483",
      "revoked": [
        63,
        64
      ]
    }
  },
  "accum_fixed": {}
}

UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:209518:default:CL_ACCUM:d41706d2-c3ef-4297-878a-b9c30318a89e

{
  "rev_reg_delta": {
    "ver": "1.0",
    "value": {
      "accum": "21 1217806B15FE10375B6A962EB3EB743CD858F284B9769A0C75C3C089075A02D08 21 118CCD3AE5BC8148F7F4023F0C48C21D9BDC6FABB77FD3F787E832CE2A8F69399 6 67933E1B164C34EE6BF4F282312EC96DF551CEE34E63D3463DFBCC8E97FD9B39 4 12E97C442C3A29812AD7BBB1E287A6A44DA6AB9B0B1EE64D67B8DF2D9CD819CB 6 548731055FE022DB40665705A584270251CDC4D1C00C37797A917472BEE3637F 4 359A98CB7B81AC0CAF28E1E9304FABEDDBBAF69EB47E7A417E9AE3532B51C5B1",
      "issued": [],
      "revoked": [
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        10,
        11,
        12,
        13,
        14,
        15,
        16,
        17
      ]
    }
  },
  "accum_calculated": {},
  "accum_fixed": {}
}

@WadeBarnes
Copy link
Contributor Author

WadeBarnes commented Sep 20, 2023

When trying to fix the state for UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:209518:default:CL_ACCUM:c6f98707-dbca-4ecc-92d6-5eb0837f20dc by calling PUT /revocation/registry/UUHA3oknprvKrpa7a6sncK%3A4%3AUUHA3oknprvKrpa7a6sncK%3A3%3ACL%3A209518%3Adefault%3ACL_ACCUM%3Ac6f98707-dbca-4ecc-92d6-5eb0837f20dc/fix-revocation-entry-state?apply_ledger_update=true the following error was encountered.

400: 

lsbc-0.11.0-pr2486-pre2 - error - fix-revocation-entry-state - apply.log

RevReg Details:

{
  "result": {
    "state": "active",
    "created_at": "2021-04-30 17:12:19.352507Z",
    "updated_at": "2023-09-01T16:13:50.017273Z",
    "record_id": "c6f98707-dbca-4ecc-92d6-5eb0837f20dc",
    "cred_def_id": "UUHA3oknprvKrpa7a6sncK:3:CL:209518:default",
    "issuer_did": "UUHA3oknprvKrpa7a6sncK",
    "max_cred_num": 2000,
    "revoc_def_type": "CL_ACCUM",
    "revoc_reg_id": "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:209518:default:CL_ACCUM:c6f98707-dbca-4ecc-92d6-5eb0837f20dc",
    "revoc_reg_def": {
      "ver": "1.0",
      "id": "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:209518:default:CL_ACCUM:c6f98707-dbca-4ecc-92d6-5eb0837f20dc",
      "revocDefType": "CL_ACCUM",
      "tag": "c6f98707-dbca-4ecc-92d6-5eb0837f20dc",
      "credDefId": "UUHA3oknprvKrpa7a6sncK:3:CL:209518:default",
      "value": {
        "issuanceType": "ISSUANCE_BY_DEFAULT",
        "maxCredNum": 2000,
        "publicKeys": {
          "accumKey": {
            "z": "1 126332DBC34F1E83F9D3D5522B0D43DC6A847A2C42C50D91F46A93937F4FFF18 1 060C1015541560D84FD8808673BDF95AAEBE692AC4582FA9756E5D0861DFD3EB 1 17C3FCE455D5783185929551B08D7DBF0AB1C1F1BFB847EF161B50F808304913 1 022261A3F53063294E7DD29EBC04BC6629A270DC35FBA739C98E46F2442DD56F 1 1B1A3A725A087C948099B9693828D1A5DF98ED93D74513EF28F81247F4317FAF 1 04D817D397DE1612405DA5A42D39BA2FF2DCF6E3DA12FE13702315E1D7550341 1 1B5C727DAA7EDDA38644134846DE6D5BFF7E9CB587C17BBF07B263A7177A29B7 1 08090FD63FC5AA29B02C98FE476326C346E504382F2B48BC372092354FD8DFC3 1 11C3EE23FD193FA1B096E0F71DB6A67B2587CD9067419303AF536BBCD2C55CDF 1 128BC1AD4700D8E187193F1033B636D35CBD25DD1CC299EF3BA5D0D6A562EA98 1 0A43209249088869050D26337D6D1A181971A1839F9930E810CFD3BBD047E995 1 1F4BF50CA4ADB253D201ACFC583E1F039D6BFBF893EC1EDE3D6E6AA4F440DA6C"
          }
        },
        "tailsHash": "7JYpFTCHZS96G1Q2FyzbL4n5G6V4BSbYHUQ7DeH9Gxhc",
        "tailsLocation": "https://tails-dev.vonx.io/UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:209518:default:CL_ACCUM:c6f98707-dbca-4ecc-92d6-5eb0837f20dc"
      }
    },
    "revoc_reg_entry": {
      "ver": "1.0",
      "value": {
        "prevAccum": "21 126BAE85146FEAD529C0EF2EAF5CEE5E270762B73315DD460F8CC8222D784CFC8 21 120D223B0DDF6B285CE735808347EAAB297DEEDE0BCE9DE354D8A31ECF9B3F6BA 6 61C545BFF08DC8159D4478DCBDD428E82F2E9D80933AEFC8F17749EDE5F5003B 4 1A3158000D34B6B092EEBBF7DFAA5678B81677DF3C1B7C3147BB822957816266 6 6B46DD9EDCA0EF3A43093D569795FBEDAD55F2D8C5CD00A6F52ECE73D02C90B8 4 2E3CED2B8A7E0C7FC5B21D0745ACE1D8845E4F021BC2C3271ADC45EB8A254B53",
        "accum": "21 1296D95B87CBD6D71EDC837A8585FC728219E4A6A1EFCB6AF583214AA6EF6AB9B 21 119CED6E82F1A5E3F77B350BD226D3D84DD2C09AACDABB51FB8D1F2F3C942EF3D 6 76D142BEA22DE19293DFF10BC78E266DB0A34201E470C2B298465562E28735BB 4 03FED61FDAF71C08F168932BB9814551B4ED82F42D9684A83FD6BC0113D7AD3F 6 65B899235EB075FFFABCEF836D1513D951D5A4A8E479D85790F821A7640CBAC9 4 28BD1986D61AC814178B8D20533C0B70E7382D708B6F875BF5D63E6D55A4D221",
        "revoked": [
          64,
          63
        ]
      }
    },
    "tag": "c6f98707-dbca-4ecc-92d6-5eb0837f20dc",
    "tails_hash": "7JYpFTCHZS96G1Q2FyzbL4n5G6V4BSbYHUQ7DeH9Gxhc",
    "tails_public_uri": "https://tails-dev.vonx.io/UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:209518:default:CL_ACCUM:c6f98707-dbca-4ecc-92d6-5eb0837f20dc",
    "tails_local_path": "/home/indy/.indy_client/tails/UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:209518:default:CL_ACCUM:c6f98707-dbca-4ecc-92d6-5eb0837f20dc/7JYpFTCHZS96G1Q2FyzbL4n5G6V4BSbYHUQ7DeH9Gxhc",
    "pending_pub": []
  }
}

@WadeBarnes
Copy link
Contributor Author

Relevant backups of the LSBC dev database being held:

  • /backups/hold/wallet-lsbc-agent_lsbc_wallet_2023-09-20_01-00-01.sql.gz
    • Standard nightly backup.
  • /backups/hold/wallet-lsbc-agent_lsbc_wallet_2023-09-20_07-18-12.sql.gz
    • Backup taken before upgrade to Postgres v14.
  • /backups/hold/wallet-lsbc-agent_lsbc_wallet_2023-09-20_07-39-16.sql.gz
    • Backup taken before migration to Askar secure storage.

@WadeBarnes
Copy link
Contributor Author

Testing of prerelease image py3.9-indy-1.16.0-0.11.0-pr2486-pre3:

  • The calls to /revocation/registry/{rev_reg_id}/fix-revocation-entry-state (with apply_ledger_update=false) work as expected.
  • Call to PUT /revocation/registry/UUHA3oknprvKrpa7a6sncK%3A4%3AUUHA3oknprvKrpa7a6sncK%3A3%3ACL%3A209518%3Adefault%3ACL_ACCUM%3Ac6f98707-dbca-4ecc-92d6-5eb0837f20dc/fix-revocation-entry-state?apply_ledger_update=true succeeds.
{
  "rev_reg_delta": {
    "ver": "1.0",
    "value": {
      "accum": "21 126BAE85146FEAD529C0EF2EAF5CEE5E270762B73315DD460F8CC8222D784CFC8 21 120D223B0DDF6B285CE735808347EAAB297DEEDE0BCE9DE354D8A31ECF9B3F6BA 6 61C545BFF08DC8159D4478DCBDD428E82F2E9D80933AEFC8F17749EDE5F5003B 4 1A3158000D34B6B092EEBBF7DFAA5678B81677DF3C1B7C3147BB822957816266 6 6B46DD9EDCA0EF3A43093D569795FBEDAD55F2D8C5CD00A6F52ECE73D02C90B8 4 2E3CED2B8A7E0C7FC5B21D0745ACE1D8845E4F021BC2C3271ADC45EB8A254B53",
      "issued": [],
      "revoked": [
        1,
        3,
        5,
        6,
        7,
        8,
        9,
        10,
        11,
        12,
        13,
        14,
        15,
        16,
        17,
        18,
        19,
        20,
        21,
        22,
        23,
        24,
        25,
        26,
        27,
        28,
        29,
        30,
        31,
        32,
        33,
        37,
        40,
        44,
        50,
        51,
        52,
        53,
        54,
        55,
        58,
        59,
        60,
        61
      ]
    }
  },
  "accum_calculated": {
    "ver": "1.0",
    "value": {
      "prevAccum": "21 126BAE85146FEAD529C0EF2EAF5CEE5E270762B73315DD460F8CC8222D784CFC8 21 120D223B0DDF6B285CE735808347EAAB297DEEDE0BCE9DE354D8A31ECF9B3F6BA 6 61C545BFF08DC8159D4478DCBDD428E82F2E9D80933AEFC8F17749EDE5F5003B 4 1A3158000D34B6B092EEBBF7DFAA5678B81677DF3C1B7C3147BB822957816266 6 6B46DD9EDCA0EF3A43093D569795FBEDAD55F2D8C5CD00A6F52ECE73D02C90B8 4 2E3CED2B8A7E0C7FC5B21D0745ACE1D8845E4F021BC2C3271ADC45EB8A254B53",
      "accum": "21 11BA50CF01DBC1114C69776097241EBC7F82208159D217F3619B3A74B5861EE48 21 1250D96F34083950EB06FBAFB04B5D5749DE8CEBB6DC7718310433A5D14F409D0 6 5A2B3062B5D0D32FE709E7C5418B36C0AA2FEB5FD191361B9B6D521F22DACB44 4 263251C3681116AE0ADBE2960EEE49C71C2B80412BA1B9B4110CA7DB48AC1D8B 6 659A29F8E1407B01357DDE7334FA22CF630D4CFA5886478A1AEAF682D1ED9CE3 4 36D14CDAB9C3739E94A49A9C16F5F1E376E2E5303F9BB0547F69DECA82516483",
      "revoked": [
        63,
        64
      ]
    }
  },
  "accum_fixed": {
    "reqSignature": {
      "type": "ED25519",
      "values": [
        {
          "value": "HZ5PXQNbMJAZjyi6BCRM9K1yrxGCRx6PxhhEe7Efz4ZLmBA7ZTAetGjpPFXmaLBVoQ7oc7aZn7x6fCSeRRgH8aW",
          "from": "UUHA3oknprvKrpa7a6sncK"
        }
      ]
    },
    "txn": {
      "protocolVersion": 2,
      "type": "114",
      "data": {
        "revocDefType": "CL_ACCUM",
        "value": {
          "revoked": [
            63,
            64
          ],
          "accum": "21 11BA50CF01DBC1114C69776097241EBC7F82208159D217F3619B3A74B5861EE48 21 1250D96F34083950EB06FBAFB04B5D5749DE8CEBB6DC7718310433A5D14F409D0 6 5A2B3062B5D0D32FE709E7C5418B36C0AA2FEB5FD191361B9B6D521F22DACB44 4 263251C3681116AE0ADBE2960EEE49C71C2B80412BA1B9B4110CA7DB48AC1D8B 6 659A29F8E1407B01357DDE7334FA22CF630D4CFA5886478A1AEAF682D1ED9CE3 4 36D14CDAB9C3739E94A49A9C16F5F1E376E2E5303F9BB0547F69DECA82516483",
          "prevAccum": "21 126BAE85146FEAD529C0EF2EAF5CEE5E270762B73315DD460F8CC8222D784CFC8 21 120D223B0DDF6B285CE735808347EAAB297DEEDE0BCE9DE354D8A31ECF9B3F6BA 6 61C545BFF08DC8159D4478DCBDD428E82F2E9D80933AEFC8F17749EDE5F5003B 4 1A3158000D34B6B092EEBBF7DFAA5678B81677DF3C1B7C3147BB822957816266 6 6B46DD9EDCA0EF3A43093D569795FBEDAD55F2D8C5CD00A6F52ECE73D02C90B8 4 2E3CED2B8A7E0C7FC5B21D0745ACE1D8845E4F021BC2C3271ADC45EB8A254B53"
        },
        "revocRegDefId": "UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:209518:default:CL_ACCUM:c6f98707-dbca-4ecc-92d6-5eb0837f20dc"
      },
      "metadata": {
        "payloadDigest": "b522426c3281d9338f5dfe49e87daaeb9bab1a6b59c4fd225ecbfb006f747b50",
        "taaAcceptance": {
          "mechanism": "on_file",
          "time": 1693872000,
          "taaDigest": "8cee5d7a573e4893b08ff53a0761a22a1607df3b3fcd7e75b98696c92879641f"
        },
        "from": "UUHA3oknprvKrpa7a6sncK",
        "reqId": 1695231742433159000,
        "digest": "fc996b723232131ced318125936568c08cd254d0dfd1c460a0e3c65b7281487d"
      }
    },
    "txnMetadata": {
      "txnTime": 1695231743,
      "txnId": "5:UUHA3oknprvKrpa7a6sncK:4:UUHA3oknprvKrpa7a6sncK:3:CL:209518:default:CL_ACCUM:c6f98707-dbca-4ecc-92d6-5eb0837f20dc",
      "seqNo": 341362
    },
    "auditPath": [
      "H9tZN3PDV6KD67CyN6VvrEoXcv5XXYEsPA33JtF5RgDb",
      "9LLRJKu7RFzPd18MWfcesj9sEtJA3f8YuytYi7v1WWSa",
      "FhyTDBxw7xCxaJVbVx26nTGivSV1Fzx2MEwe7s4gJbk2",
      "8FyAmKfbAd1TUM25atAEkdRy15FtfbXCHvqowhtAcaK4",
      "ChHSDQVYsAFKSwRoyTFgDaAbXVPwyzFUHUkRGLP8v91p",
      "4DyhvqxUFsgQZFZuxfe7Ys6x3W3e764nDpb3xvV93Kbx",
      "9xRhQTWt7jXbLPX7AMG64XQvTKcMsB7gYV5CXuf1swEM",
      "7JL2W7AgaKyLozE3BVWV6tQfmq26nshsUuRFpJ5eJLm4",
      "9yeSmLwWEVn7Pa2NEH37t9wMKsN56PPYqNuVnNeLnaZA",
      "DMbwesR2sT2GeytnA748QL8cohHRVibvkHN2EiDQ3vaT"
    ],
    "rootHash": "6Hjd6prjJH2fkEKHqLZ5mjMNhgJqpaxBX4eVtZZTy41B",
    "ver": "1"
  }
}

lsbc-0.11.0-pr2486-pre3 - revocation-entry-state - apply.log

@WadeBarnes
Copy link
Contributor Author

LSBC has confirmed their workflows, including revoke and reissue scripts, are working as expected in dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants