-
Notifications
You must be signed in to change notification settings - Fork 517
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
Anoncreds - Cred Def and Revocation Endorsement #2752
Conversation
FYI I've noticed some integration tests are now failing, for example:
(Note that these aren't tagged as |
@ianco Ya I had the integration tests working but then I did some refactoring and broke them somehow. Was going to try and look at why this happened today. |
I know these had been working. I'll work on fixing them and then I will add them to run on a PR. |
1e0af89
to
54d234e
Compare
Updated description. Ready for review. Integration tests should pass. |
Hmm. Some integration tests are failing. I'll have to look into it. |
Looks like you're trying to issue the credential before the revocation registry is active. Try just running alice/faber with the |
I think I was focusing to much on the endorsement tests and might have broke creating the registry for non-endorsement. Good thing we have so many integration tests. Hopefully it's minor. Will ping you when it's fixed. |
@ianco I did have a logic issue with the various configs/params. Tests are passing now. |
One integration test is failing, even though it passed one time. I think it's taking too long to create the revocation registry. Going to try and fix it. |
It's possibly creating the revocation registry but not activating it:
(There should always be exactly one Active revocation registry per cred def, even though there may be more than one created) |
Signed-off-by: jamshale <[email protected]>
Signed-off-by: jamshale <[email protected]>
Signed-off-by: jamshale <[email protected]>
Signed-off-by: jamshale <[email protected]>
Quality Gate passedIssues Measures |
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. I did a quick scan of the code and ran the demo. Looks like all the tests are passing. Good job!
W00t! Nicely done! |
@@ -144,7 +144,7 @@ async def register_schema( | |||
self, | |||
profile: Profile, | |||
schema: AnonCredsSchema, | |||
options: Optional[dict] = None, | |||
options: dict = {}, |
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.
FYI, default empty dicts in args are 'dangerous' in python:
https://stackoverflow.com/questions/26320899/why-is-the-empty-dictionary-a-dangerous-default-value-in-python
Pylint warns about it, so ruff should probably pick up on this? @dbluhm (because you know about the ruff config)
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.
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.
I'll have another PR for the publish revocations and I'll do that.
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.
I had no idea python did that. Seems really odd a default function argument wouldn't be scoped to the function.
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.
I have personal experience with this foot-gun lol. Debugging without the context of the "static" evaluation of the default arguments was a nightmare. The Ruff check will be good to help prevent future headaches.
endorser_connection_id = fields.Str( | ||
metadata={ | ||
"description": endorser_connection_id_description, | ||
"required": False, |
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.
required
is not a metadata field -- should be passed as required = False, metadata=...
I'll fix in my deprecation warnings PR (which had merge conflicts here)
For the anoncreds transaction objects the previous implementation changed the structure of the objects. I really didn't like this so I changed it in the indy ledger module with if statements.
I changed the optional[dict] params in anoncreds to be an empty dict by default to avoid null checking in a lot of places.
Note: The only thing not completed for single tenant is publishing revocations. I want to do this in another task/PR. I created an integration test for anoncreds that stops just prior to publishing revocations.