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

Fix: RevRegEntry Transaction Endorsement #2558

Merged
merged 21 commits into from
Nov 29, 2023

Conversation

shaangill025
Copy link
Contributor

Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>
)
except StorageNotFoundError:
raise RevocationManagerError(
f"No connection record found for id: {connection_id}"
Copy link
Member

Choose a reason for hiding this comment

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

Is this checking to see if there is an endorser connection? Is so, the error message should be more explicit, I think.

Copy link
Contributor Author

@shaangill025 shaangill025 Oct 19, 2023

Choose a reason for hiding this comment

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

Yes, to check that the connection_id if provided when calling POST /revocation/revoke exists. If no connection_id is provided and the profile is author role then connection_id will be retrieved from endorser.endorser_alias which will always exist. Maybe I can change it to No endorser connection record .... ?

Copy link
Contributor

@esune esune left a comment

Choose a reason for hiding this comment

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

Do these changes also account for the scenario where the revocation entry is not published contextually to the call to the /revocation/revoke endpoint, but rather using the /revocation/publish-revocations endpoint to publish in bulk?

@shaangill025
Copy link
Contributor Author

Do these changes also account for the scenario where the revocation entry is not published contextually to the call to the /revocation/revoke endpoint, but rather using the /revocation/publish-revocations endpoint to publish in bulk?

Thanks for pointing this out, now it does.

@swcurran
Copy link
Member

Not for this issue, but doesn’t the “revoke and publish” and the “publish” endpoints use a common “publish” method? I would think they would...

@shaangill025
Copy link
Contributor Author

shaangill025 commented Oct 19, 2023

but doesn’t the “revoke and publish” and the “publish” endpoints use a common “publish” method?

Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>
@dbluhm dbluhm added this to the 0.11.0 milestone Oct 27, 2023
@dbluhm
Copy link
Member

dbluhm commented Nov 9, 2023

Any word on when we can look at getting the failing tests resolved?

@esune
Copy link
Contributor

esune commented Nov 9, 2023

Any word on when we can look at getting the failing tests resolved?

@shaangill025 is looking into them, I'm following-up today to see where we are at

@andrewwhitehead
Copy link
Member

It looks like the new unit tests were written before rebasing on some changes to the test framework. The fix seems to be just renaming 'async_mock' to 'mock' in test_manager.py.

@andrewwhitehead
Copy link
Member

In the integration test it looks like Acme receives a notification that their credential was revoked, but when checking the status it hasn't been updated yet. Could be a timing issue or an unpublished update?

@swcurran
Copy link
Member

Which is definitely related to the code being changed.

Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>
@esune
Copy link
Contributor

esune commented Nov 10, 2023

In the integration test it looks like Acme receives a notification that their credential was revoked, but when checking the status it hasn't been updated yet. Could be a timing issue or an unpublished update?

That's what I was wondering. It looks like the workflow was re-run and now only 1 scenario is failing, which seems to be a good candidate for timing issues (but I admit I have not had a chance to look into the test code yet to be 100% sure).

Copy link
Contributor

@esune esune left a comment

Choose a reason for hiding this comment

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

Changes look good to me. If @dbluhm can take a peek and confirm I did not miss anything I think it's good to go 👍🏻

dbluhm
dbluhm previously approved these changes Nov 28, 2023
Copy link
Member

@dbluhm dbluhm left a comment

Choose a reason for hiding this comment

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

I'm not thrilled about the continued propagation of endorser_conn_id and write_ledger through several interfaces but I think that's unavoidable until we have endorser support behind the ledger agnostic AnonCreds interface. LGTM.

@dbluhm
Copy link
Member

dbluhm commented Nov 28, 2023

Do we want to try to get this out in a patch release separate from the AnonCreds-RS changes being made on main (in addition to merging this to main)?

@esune
Copy link
Contributor

esune commented Nov 28, 2023

Do we want to try to get this out in a patch release separate from the AnonCreds-RS changes being made on main (in addition to merging this to main)?

Yes, I think this was the strategy we decided to go with. Re-poinintg this to the 0.11.x branch and merging the result back to main might be the easiest way to go rather than cherry-picking commits, but either way will work.

@shaangill025 shaangill025 changed the base branch from main to 0.11.x November 28, 2023 16:33
@shaangill025 shaangill025 changed the base branch from 0.11.x to main November 28, 2023 17:15
@shaangill025 shaangill025 dismissed dbluhm’s stale review November 28, 2023 17:15

The base branch was changed.

Copy link

sonarcloud bot commented Nov 29, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

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.

Possible endorsement processing bug -- RevRegEntry transaction not being signed
5 participants