-
Notifications
You must be signed in to change notification settings - Fork 515
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
Endorser support for updating DID endpoints on ledger #1696
Endorser support for updating DID endpoints on ledger #1696
Conversation
…get updated on ledger after endorsement from an endorser. Signed-off-by: Harsh Multani <harsh1multani@gmail.com> Signed-off-by: Colton Wolkins (Indicio work address) <colton@indicio.tech>
Signed-off-by: Colton Wolkins (Indicio work address) <colton@indicio.tech>
Signed-off-by: Colton Wolkins (Indicio work address) <colton@indicio.tech>
Codecov Report
@@ Coverage Diff @@
## main #1696 +/- ##
==========================================
- Coverage 95.50% 95.29% -0.21%
==========================================
Files 528 528
Lines 32766 32878 +112
==========================================
+ Hits 31293 31331 +38
- Misses 1473 1547 +74 |
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.
Some black formatting issues in aries_cloudagent/wallet/routes.py
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
e79a2e4
to
8674f8d
Compare
Evidently new versions of black behave slightly differently. I've updated the pre-commit hook to point to the most recent version that is now being used by the format checker. |
I took a peek at that integration test failure. Looks like the error is from this code which is part of these test cases. I'm not quite sure how it's supposed to work, but I'll do my best to figure it out and provide a fix. |
I think the error is in the order of the operations in the test:
The "Bob has a DID ..." line should happen after the connection endorser settings. |
Like this:
... now that the DID creation requires an endorser. |
That's what I'm thinking as well. Running the tests locally after making the changes A) to see if I can run the integration tests and B) to see if it fixes the problem. I really like how these tests are structured in that they're more "human readable" than actual code. |
I'm seeing tests that don't exist in the failed CI, so I'm assuming that the answer is yes to both of those! Pushing the changes now. Thank you @ianco for the help. :) |
Signed-off-by: Colton Wolkins (Indicio work address) <colton@indicio.tech>
2045c1f
to
f87522c
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.
./run_bdd -t @T003.1-RFC0586
works
However BDD_EXTRA_AGENT_ARGS="{\"wallet-type\":\"askar\"}" ./run_bdd -t @T003.1-RFC0586
fils with an exception:
Shutting down agent ...
Aries | File "/home/indy/aries_cloudagent/wallet/routes.py", line 559, in promote_wallet_public_did
Aries | endorser_did=endorser_did,
Aries | File "/home/indy/aries_cloudagent/wallet/askar.py", line 488, in set_did_endpoint
Aries | endorser_did=endorser_did,
Aries | File "/home/indy/aries_cloudagent/ledger/indy_vdr.py", line 946, in update_endpoint_for_did
Aries | attrib_req = await ledger.append_request_endorser(
Aries | AttributeError: module 'indy_vdr.ledger' has no attribute 'append_request_endorser'
Aries | 2022-03-29 15:27:37,388 aiohttp.server ERROR Error handling request
Aries | Traceback (most recent call last):
Aries | File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
Aries | resp = await request_handler(request)
Aries | File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/web_app.py", line 504, in _handle
Aries | resp = await handler(request)
Aries | File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 117, in impl
Aries | return await handler(request)
Aries | File "/home/indy/aries_cloudagent/admin/server.py", line 159, in ready_middleware
Aries | return await handler(request)
Aries | File "/home/indy/aries_cloudagent/admin/server.py", line 196, in debug_middleware
Aries | return await handler(request)
Aries | File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp_apispec/middlewares.py", line 45, in validation_middleware
Aries | return await handler(request)
Aries | File "/home/indy/aries_cloudagent/admin/server.py", line 383, in setup_context
Aries | return await task
Aries | File "/home/indy/aries_cloudagent/wallet/routes.py", line 437, in wallet_set_public_did
Aries | context.profile, context, context.session, did, write_ledger=write_ledger
Aries | File "/home/indy/aries_cloudagent/wallet/routes.py", line 559, in promote_wallet_public_did
Aries | endorser_did=endorser_did,
Aries | File "/home/indy/aries_cloudagent/wallet/askar.py", line 488, in set_did_endpoint
Aries | endorser_did=endorser_did,
Aries | File "/home/indy/aries_cloudagent/ledger/indy_vdr.py", line 946, in update_endpoint_for_did
Aries | attrib_req = await ledger.append_request_endorser(
Aries | AttributeError: module 'indy_vdr.ledger' has no attribute 'append_request_endorser'
Signed-off-by: Colton Wolkins (Indicio work address) <colton@indicio.tech>
Currently running into an issue where a couple of tests in @T003-RFC0586 are complaining about not having an endorser. Specifically the two multi-tenant ones (last two examples). Currently trying to figure out why those would error out. |
Looking at that test, it appears to be skipped during GitHub actions anyways. I'm not sure how critical it is to try and fix it at this time. |
Github actions runs a subset of tests because if you try to run too many (i.e. all of them) it seems to blow up. |
Weird that something is failing with multi-tenancy, I suggest to log a separate issue. We can merge this PR and then deal with the multi-tenant issue separately. |
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.
FWIW 🙂
As stated in #1447, the changes by Harsh fix an issue where ACA-Py could not publish ATTRIB records because they were not signed by the endorser. We need those changes in for 0.7.4 if possible, but PR #1616 has not seen any updates and has merge conflicts with the latest changes in main. I have attempted to fix those merge conflicts and make the requested changes from @ianco in that PR, as well as fix all the unit test failures.
This closes #1616. I am not sure if more work is needed for #1447.