-
Notifications
You must be signed in to change notification settings - Fork 516
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
Merging changes from anoncreds-rs branch #2567
Comments
I'd like to add a step - could be done in parallel with step 0: 0aa. Get the anon-creds branch in sync with main This is necessary to ease the pain of combining the code from anoncreds-rds back into main - the work in steps 1-2-3 above. There are many many conflicts between the two branches, and most are due to formatting differences introduced in main (replacing flake8 with ruff) which complicate thing enormously. The work can be broken down as: 0aa.i - branch main at commit 9fc598f and merge into anoncreds-rs (this introduces ruff but not all the re-formatted code) Then with the sync'ed up code the above steps 1-2-3 can proceed a bit more smoothly. I took an initial crack at 0aa.i (see branch https://github.com/ianco/aries-cloudagent-python/tree/ruff_updates_pre) and there were about ~20 conflicted files to deal with, however one issue is that the new anoncreds library was introduced into the anoncreds-rs branch as a pip dependency, but the main branch was switched over to poetry. So ... I can take a crack at updating the poetry build stuff in the branch, or - better would be if I can get some help from @dbluhm (since he did both of the original updates on both branches). |
To add the anoncreds-rs library as a dependency in poetry, you can just add the following line to anoncreds-rs = {version = "0.1.0", optional = true} And then add askar = [
"aries-askar",
"indy-credx",
"indy-vdr",
"anoncreds-rs"
] I would ignore any conflicts in the poetry.lock and just let poetry regenerate it after the above changes to the pyproject.toml: poetry lock Not sure if that was the help you were looking for. Let me know if that helps! |
Hi @dbluhm thanks I'll give it a try and let you know if I have any questions |
I've opened a draft PR #2571 containing the updates from main up to ruff. (not tested yet just opening up for visibility). I did a quick test merging from the top of main and there are about 10 conflicts. I'm going to give this PR ^^^ some testing first and then try merging from the rest of main. @dbluhm @usingtechnology if you guys could take a peek to make sure I haven't mucked anything up I'd appreciate it. |
@dbluhm on my local when I run
|
@ianco looks like I got the name wrong; it seems to be uploaded to PyPI as |
I've got all the code from I'm not sure the approach recommended by @andrewwhitehead above is best, an alternate is to create net new AnonCreds holder, issuer etc classes (rather than re-naming the existing Indy classes) and then pull all the AnonCreds code over as net new (create new classes, new endpoints etc) - and add a new credential format to the
I think this would simplify the copying over of code into the |
@ianco — thanks — good stuff! Please connect with @andrewwhitehead directly and make a call about the right thing to do and go forward. We don’t want suggestions sitting out there for anytime such that we get stalled for lack of a decision. Let’s keep moving… Worst case — ACA-Pug is tomorrow morning at 8AM to discuss. |
To be clear — there is no expectation that the revocation and endorser code is going to be fast to implement and test. Rather, that we know better than the last time we worked on it what we want. There will be trouble in the details :-). AFAIK large parts of the revocation work is done. The endorser rework is pretty much entirely to be done. |
Is the intent to support 2 flavours of (Or can someone clarify the relationship between the various libraries?) |
This is the crux of the issue with your change to the plan towards creating a separate “AnonCreds” model without impacting the existing “Indy” model. We implicitly wind up with support for both automatically — CredX for the existing Indy, AnonCreds RS for the new AnonCreds model. I think your question is really for you. Do you see us have a main branch that has both CredX and AnonCreds-RS imported and used beside each other? How do you see that working? In the long term, we will only want AnonCreds-RS and we want to archive CredX. The question is the backwards compatibility as we get to that goal. |
So does that mean anoncred-rs replaces credx? And we run acapy with Related question is anyone still using aca-py with indy-sdk or have we migrated everyone to askar? |
Yes. AnonCreds-RS was initially a copy of CredX (from indy-shared-rs) and then evolved to remove the few “Indy-isms” that were built in. Underlying both is anoncreds-clsignatures-rs, which is has the CL Signature processing code. So it makes sense to only have one of them. The only reason to have both is for backwards compatibilty during the transition. We can drop support for Indy SDK at any time. We’ve placed deprecation notices in the repo and in the log when you start ACA-Py using Indy SDK. If there is a reason to drop it, we can do that. The |
ok thanks let me noodle this info ... I'm understanding @andrewwhitehead 's recommended approach a bit better ... |
OK upon consideration I still think we should port over the anoncreds code as new new and not try to integrate with any existing code. The current "indy" stack supports both indy-sdk and askar (and related) libraries and I think this is introducing a lot of complecity. I suggest we:
If there's a concern about keeping aca-py flexible for the future, I suggest the way to do this is via plug-ins, for example the whole anoncreds stack - if implemented as a plug-in - would be replacable. |
Some of my assumptions at the moment are that:
I agree that supporting anoncreds credentials (or any other format) through plugins would be a good path, although it also requires integration points into the exchange protocols which aren't defined yet. |
To @andrewwhitehead items 3 and 4 above, this kind of relates back to #2556. Maybe this is a good opportunity to tackle some of these classes (BaseLedger, Revocation). Right now, that's where things in |
@usingtechnology Yes once the generic AnoncredsRegistry handling is merged we should be able to switch over the resolution and publishing to use that. There's an example from that branch in issue-credential/v2_0 (can't link to the diff unfortunately): |
At the moment this branch has diverged significantly from the main branch, and there are likely too many conflicts to merge it directly, so we need to look at how to merge the changes that are there in separate phases. The branch also currently adds an
anoncreds
module instead of renaming/reusing classes that are present in theindy
module, so it would be best to avoid code duplication while merging and ensure that we maintain test coverage.For reference, there is a diff between the two branches here: https://github.com/hyperledger/aries-cloudagent-python/compare/anoncreds-rs (select the Files Changed tab)
Suggested steps are below, to be discussed and updated:
indy
module toanoncreds
, and renameIndyHolder
et al toAnonCredsHolder
et al.0a. Consider: Remove Indy SDK support?
anoncreds/base.py
andanoncreds/default
credential_definitions/routes
andschemas/routes
to use the abstract registry class (this removes the custom handling around BaseMultitenantManager in those places)issue-credential
andpresent-proof
indy handlers and to use the new resolver (see diff)AnonCredsHolder/Issuer/Verifier
classes, usingIndyHolder/Issuer/Verifier
as the base classes and supporting dependency injectionanoncreds
library to the images used for testing on CI2.5. Update the routes
protocols/present_proof/indy/pres_exch_handler.py
for example, to handle revocation status lists instead of deltas. Maybe this can be handled more generically in theIndyVerifier
base class.revocation/manager.py
(as appropriate)3.5 Endorsement Updates
BDD test updates
Data updates/migrations
The text was updated successfully, but these errors were encountered: