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

Accumulator synchronization not working in ACA-Py v0.10.1 #2477

Closed WadeBarnes closed 1 year ago

WadeBarnes commented 1 year ago

After upgrading to ACA-Py 0.10.1 calls to /revocation/registry/{rev_reg_id}/fix-revocation-entry-state, even with apply_ledger_update=false fail with the following error. The same calls were working with 1.0.0-rc0; the version that initialy contained the accumulator synchronization code.

2023-09-07 16:01:09,270 aries_cloudagent.indy.sdk.profile WARNING Indy wallet type is deprecated, use Askar instead; see: https://aca-py.org/main/deploying/IndySDKtoAskarMigration/
2023-09-07 16:01:11,892 indy.libindy WARNING _indy_loop_callback: Function returned error 

::::::::::::::::::::::::::::::::::::::::::::::
::   The Law Society of British Columbia    ::
::                  (TEST)                  ::
::                                          ::
::                                          ::
:: Inbound Transports:                      ::
::                                          ::
::   - http://0.0.0.0:8021                  ::
::                                          ::
:: Outbound Transports:                     ::
::                                          ::
::   - http                                 ::
::   - https                                ::
::                                          ::
:: Public DID Information:                  ::
::                                          ::
::   - DID: AuJrigKQGRLJajKAebTgWu          ::
::                                          ::
:: Administration API:                      ::
::                                          ::
::   - http://0.0.0.0:8024                  ::
::                                          ::
::                              ver: 0.10.1 ::
::::::::::::::::::::::::::::::::::::::::::::::

Listening...

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::                             âš  DEPRECATION NOTICE: âš                               ::
:: -------------------------------------------------------------------------------- ::
:: The Indy wallet type is deprecated, use Askar instead; see: https://aca-         ::
:: py.org/main/deploying/IndySDKtoAskarMigration/                                   ::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

2023-09-07 16:01:15,200 aries_cloudagent.core.conductor WARNING Wallet version storage record not found.
2023-09-07 16:01:15,201 aries_cloudagent.core.conductor WARNING No upgrade from version was found from wallet or via --from-version startup argument. Defaulting to v0.7.5.
2023-09-07 16:01:19,513 indy.libindy WARNING _indy_loop_callback: Function returned error 
2023-09-07 16:02:19,903 aries_cloudagent.core.dispatcher ERROR Handler error: update_rev_reg_revoked_state
Traceback (most recent call last):
  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/revocation/routes.py", line 904, in update_rev_reg_revoked_state
    pool = write_ledger[1].pool
TypeError: 'IndySdkLedger' object is not subscriptable
2023-09-07 16:02:19,904 aries_cloudagent.admin.server ERROR Handler error with exception: 'IndySdkLedger' object is not subscriptable

=================
Traceback (most recent call last):
  File "/home/indy/.local/lib/python3.9/site-packages/aries_cloudagent/admin/server.py", line 181, in ready_middleware
    return await handler(request)
  File "/home/indy/.local/lib/python3.9/site-packages/aries_cloudagent/admin/server.py", line 218, in debug_middleware
    return await handler(request)
  File "/home/indy/.local/lib/python3.9/site-packages/aiohttp_apispec/middlewares.py", line 45, in validation_middleware
    return await handler(request)
  File "/home/indy/.local/lib/python3.9/site-packages/aries_cloudagent/admin/server.py", line 338, in check_token
    return await handler(request)
  File "/home/indy/.local/lib/python3.9/site-packages/aries_cloudagent/admin/server.py", line 450, in setup_context
    return await task
  File "/usr/local/lib/python3.9/asyncio/futures.py", line 284, in __await__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.9/asyncio/tasks.py", line 328, in __wakeup
    future.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/revocation/routes.py", line 904, in update_rev_reg_revoked_state
    pool = write_ledger[1].pool
TypeError: 'IndySdkLedger' object is not subscriptable
2023-09-07 16:02:19,904 aiohttp.server ERROR Error handling request
Traceback (most recent call last):
  File "/home/indy/.local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
  File "/home/indy/.local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/home/indy/.local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/home/indy/.local/lib/python3.9/site-packages/aries_cloudagent/admin/server.py", line 181, in ready_middleware
    return await handler(request)
  File "/home/indy/.local/lib/python3.9/site-packages/aries_cloudagent/admin/server.py", line 218, in debug_middleware
    return await handler(request)
  File "/home/indy/.local/lib/python3.9/site-packages/aiohttp_apispec/middlewares.py", line 45, in validation_middleware
    return await handler(request)
  File "/home/indy/.local/lib/python3.9/site-packages/aries_cloudagent/admin/server.py", line 338, in check_token
    return await handler(request)
  File "/home/indy/.local/lib/python3.9/site-packages/aries_cloudagent/admin/server.py", line 450, in setup_context
    return await task
  File "/usr/local/lib/python3.9/asyncio/futures.py", line 284, in __await__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.9/asyncio/tasks.py", line 328, in __wakeup
    future.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/revocation/routes.py", line 904, in update_rev_reg_revoked_state
    pool = write_ledger[1].pool
TypeError: 'IndySdkLedger' object is not subscriptable
WadeBarnes commented 1 year ago

A version of the log with debug logging enabled:

ACAPy-debug.log

shaangill025 commented 1 year ago

This is a bug introduced with my PR on selectable write ledger. Fix will involve removing [1] from:

hiteshgh commented 1 year ago

move to ready to go colm

WadeBarnes commented 1 year ago

The updates contained in the 0.10.2-rc0 release fixed the reported issue and I was able to successful use /revocation/registry/{rev_reg_id}/fix-revocation-entry-state in the reported environemnt.