Skip to content
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

Issue #847: Prover Handler Types #848

Merged
merged 11 commits into from
May 25, 2023
Merged

Conversation

gmulhearn
Copy link
Contributor

@gmulhearn gmulhearn commented May 15, 2023

Implements #847

I went with the approach of keeping the legacy structures for now, they aren't toooo bad...

Changes revolve around changing the following handler APIs:

retrieve_credentials(&self, profile: &Arc<dyn Profile>) -> VcxResult<RetrievedCredentials>

generate_presentation(
        &mut self,
        profile: &Arc<dyn Profile>,
        credentials: SelectedCredentials,
        self_attested_attrs: HashMap<String, String>,
    ) -> VcxResult<()>

And then piping thru the typing in aries_vcx internally. And serde_json-ing the types externally (i.e. in our libvcx consumer code). The libvcx JSON strings should be backwards compatible still (which hopefully the CI is testing/enforcing).

gmulhearn added 4 commits May 15, 2023 23:44
Signed-off-by: gmulhearn <gmulhearn@proton.me>
Signed-off-by: gmulhearn <gmulhearn@proton.me>
Signed-off-by: gmulhearn <gmulhearn@proton.me>
Signed-off-by: gmulhearn <gmulhearn@proton.me>
@codecov-commenter
Copy link

codecov-commenter commented May 16, 2023

Codecov Report

Merging #848 (60ecb3c) into main (9f2e922) will decrease coverage by 0.03%.
The diff coverage is 74.53%.

@@            Coverage Diff             @@
##             main     #848      +/-   ##
==========================================
- Coverage   48.88%   48.86%   -0.03%     
==========================================
  Files         428      429       +1     
  Lines       34134    34165      +31     
  Branches     7517     7533      +16     
==========================================
+ Hits        16687    16694       +7     
- Misses      12294    12313      +19     
- Partials     5153     5158       +5     
Flag Coverage Δ
unittests-aries-vcx 48.82% <74.53%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...rc/protocols/proof_presentation/prover/messages.rs 19.56% <0.00%> (ø)
aries_vcx/src/handlers/proof_presentation/types.rs 46.80% <46.80%> (ø)
...ries_vcx/src/handlers/proof_presentation/prover.rs 55.00% <50.00%> (-0.72%) ⬇️
aries_vcx/src/common/proofs/prover/prover.rs 45.71% <66.66%> (ø)
...ion/prover/states/presentation_request_received.rs 58.69% <66.66%> (ø)
aries_vcx/tests/test_creds_proofs_revocations.rs 86.28% <66.66%> (-0.02%) ⬇️
aries_vcx/tests/test_creds_proofs.rs 86.89% <72.54%> (-0.41%) ⬇️
aries_vcx/tests/utils/devsetup_agent.rs 72.23% <83.33%> (ø)
...es_vcx/src/common/proofs/prover/prover_internal.rs 81.01% <90.76%> (+2.03%) ⬆️
aries_vcx/tests/utils/scenarios.rs 81.06% <93.10%> (+0.07%) ⬆️
... and 1 more

... and 5 files with indirect coverage changes

gmulhearn added 4 commits May 23, 2023 22:14
Signed-off-by: gmulhearn <gmulhearn@proton.me>
Signed-off-by: gmulhearn <gmulhearn@proton.me>
Signed-off-by: gmulhearn <gmulhearn@proton.me>
Signed-off-by: gmulhearn <gmulhearn@proton.me>
@gmulhearn gmulhearn marked this pull request as ready for review May 23, 2023 13:19
@gmulhearn gmulhearn requested a review from Patrik-Stas May 23, 2023 13:19
@gmulhearn
Copy link
Contributor Author

@Patrik-Stas pending CI confirmation on some of my latest commits, but should be ready to review.

If CI fails it should just be minor things I'll fix tomorrow!

Signed-off-by: gmulhearn <gmulhearn@proton.me>
Copy link
Contributor

@bobozaur bobozaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These comments, @gmulhearn ... They are just beautiful.

Copy link
Contributor

@Patrik-Stas Patrik-Stas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice 👍

@Patrik-Stas Patrik-Stas merged commit b54441d into main May 25, 2023
@Patrik-Stas Patrik-Stas deleted the gm/847-prover-handler-types branch May 25, 2023 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants