-
Notifications
You must be signed in to change notification settings - Fork 83
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
Prover: fix credx credential retrieval #961
Conversation
7f624b0
to
4708c07
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.
LGTM; but would be good to fix up my comment while you're in this area.
(Or consider the comment and let me know if there is something I'm not understanding)
Good to merge after that
39ba378
to
9cd6ee9
Compare
Codecov Report
@@ Coverage Diff @@
## main #961 +/- ##
==========================================
- Coverage 39.35% 39.23% -0.12%
==========================================
Files 417 417
Lines 28986 28968 -18
Branches 6185 6187 +2
==========================================
- Hits 11407 11367 -40
- Misses 14236 14259 +23
+ Partials 3343 3342 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
…of simpler testing approach Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
…e_restriction Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
…predicate for credx implementation Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
9cd6ee9
to
4299e8c
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.
Fix from my last comment looks good
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
* Test code adjustments Signed-off-by: Patrik Stas <patrik.stas@absa.africa> * wip Signed-off-by: Patrik Stas <patrik.stas@absa.africa> * Rename 'requested_credentials' to 'preselected_credentials' Signed-off-by: Patrik Stas <patrik.stas@absa.africa> * Remove prover_select_credentials_and_fail_to_generate_proof in favor of simpler testing approach Signed-off-by: Patrik Stas <patrik.stas@absa.africa> * Simplify common testing case of sending proof Signed-off-by: Patrik Stas <patrik.stas@absa.africa> * Add test test_agency_pool_it_should_select_credentials_for_satisfiable_restriction Signed-off-by: Patrik Stas <patrik.stas@absa.africa> * Fix credential retrieval by prover Signed-off-by: Patrik Stas <patrik.stas@absa.africa> * Do not run test_agency_pool_it_should_fail_to_select_credentials_for_predicate for credx implementation Signed-off-by: Patrik Stas <patrik.stas@absa.africa> * Address code review Signed-off-by: Patrik Stas <patrik.stas@absa.africa> * Revert CI change Signed-off-by: Patrik Stas <patrik.stas@absa.africa> --------- Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
* Test code adjustments Signed-off-by: Patrik Stas <patrik.stas@absa.africa> * wip Signed-off-by: Patrik Stas <patrik.stas@absa.africa> * Rename 'requested_credentials' to 'preselected_credentials' Signed-off-by: Patrik Stas <patrik.stas@absa.africa> * Remove prover_select_credentials_and_fail_to_generate_proof in favor of simpler testing approach Signed-off-by: Patrik Stas <patrik.stas@absa.africa> * Simplify common testing case of sending proof Signed-off-by: Patrik Stas <patrik.stas@absa.africa> * Add test test_agency_pool_it_should_select_credentials_for_satisfiable_restriction Signed-off-by: Patrik Stas <patrik.stas@absa.africa> * Fix credential retrieval by prover Signed-off-by: Patrik Stas <patrik.stas@absa.africa> * Do not run test_agency_pool_it_should_fail_to_select_credentials_for_predicate for credx implementation Signed-off-by: Patrik Stas <patrik.stas@absa.africa> * Address code review Signed-off-by: Patrik Stas <patrik.stas@absa.africa> * Revert CI change Signed-off-by: Patrik Stas <patrik.stas@absa.africa> --------- Signed-off-by: Patrik Stas <patrik.stas@absa.africa> Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
Fixes retrieval of credentials for prover. When multiple restriction objects are specified, they should be treated as
OR
instead ofAND
. Verifier is asking prover to satisfy at least 1 restriction object, not all of them.Adds test
test_agency_pool_it_should_select_credentials_for_satisfiable_restriction
which was failing without modifications to WQL made in the PR. Passes with the modifications. See anoncreds spec https://hyperledger.github.io/anoncreds-spec/#restrictionstest_agency_pool_it_should_fail_to_select_credentials_for_predicate
is not working with credx implementation; see: Prover: support predicates for credx credential selection #962