-
Notifications
You must be signed in to change notification settings - Fork 55
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
Updates for python wrapper adding support for revocation status list changes #145
Updates for python wrapper adding support for revocation status list changes #145
Conversation
Signed-off-by: Daniel Bluhm <[email protected]>
Signed-off-by: Daniel Bluhm <[email protected]>
225887e
to
0d584c7
Compare
You might want to integrate these changes as well? hyperledger/indy-shared-rs#26 |
That seems like a good idea! I'll check it out. |
Signed-off-by: blu3beri <[email protected]>
Awesome work! There was a slight misunderstanding on my side related to this work, I also made a draft for it as I was stuck on some other work. #146 is the related PR. Maybe there are some things that you can take from my PR, but I will abandon mine so the work can continue here. |
Shoot, apologies for the miscommunication -- duplicating work is less than ideal. It looks like you got further along than I did. I'll see what I can do to combine efforts here! Thanks for the heads up, @blu3beri |
…thon-rev-status-lists
@blu3beri I merged in your commit from #146; I'll follow this up by integrating hyperledger/indy-shared-rs#26 as @andrewwhitehead suggested |
And some other merge artifact fixes Signed-off-by: Daniel Bluhm <[email protected]>
Signed-off-by: Daniel Bluhm <[email protected]>
@blu3beri After combining everything,
To see if this was caused by a change I introduced, I checked out 4a019cb from your branch and had the same issue. Is this expected? Update: Nevermind, I've spotted the issue and it appears to just be a typo 🙂 I'll continue working on updating the |
Signed-off-by: Daniel Bluhm <[email protected]>
Signed-off-by: Daniel Bluhm <[email protected]>
The python wrapper demo is now functioning as expected; I think this is ready for a review now. Thanks for all the feedback up to this point already 🙂 |
Some(revoked.as_slice().iter().map(|r| *r as u32).collect()) | ||
} else { | ||
None | ||
} else { | ||
Some(revoked.as_slice().iter().map(|r| *r as u32).collect()) | ||
}; | ||
let issued: Option<BTreeSet<u32>> = if issued.is_empty() { | ||
Some(issued.as_slice().iter().map(|r| *r as u32).collect()) | ||
} else { | ||
None | ||
} else { | ||
Some(issued.as_slice().iter().map(|r| *r as u32).collect()) |
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 believe this condition was flipped around; if the revoked list was empty, return the list mapped to a BTreeSet, else, return None. So we were always getting back empty revoked lists.
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.
@whalelephant I believe @dbluhm is correct here, but just to double check with you.
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.
@dbluhm @blu3beri you are correct!
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! Might be good is someone from the ACA-Py team gives this a review? Maybe @andrewwhitehead ?
Some(revoked.as_slice().iter().map(|r| *r as u32).collect()) | ||
} else { | ||
None | ||
} else { | ||
Some(revoked.as_slice().iter().map(|r| *r as u32).collect()) | ||
}; | ||
let issued: Option<BTreeSet<u32>> = if issued.is_empty() { | ||
Some(issued.as_slice().iter().map(|r| *r as u32).collect()) | ||
} else { | ||
None | ||
} else { | ||
Some(issued.as_slice().iter().map(|r| *r as u32).collect()) |
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.
@whalelephant I believe @dbluhm is correct here, but just to double check with you.
rev_status_lists, | ||
) | ||
|
||
print(verified) |
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.
This can be removed.
Opening this early. This PR updates the python wrapper to accommodate changes made at the rust layer for revocation status lists.
Feedback and corrections welcome. I'll continue working on this by updating the
test.py
file to bring it in line with theanoncreds_demo.rs
.