feat: add on-chain credential revocation for passport contract - #208
Open
ghost-cy829 wants to merge 7 commits into
Open
feat: add on-chain credential revocation for passport contract#208ghost-cy829 wants to merge 7 commits into
ghost-cy829 wants to merge 7 commits into
Conversation
ghost-cy829
force-pushed
the
feat/credential-revocation
branch
from
July 16, 2026 15:41
edd7365 to
77dcfd6
Compare
Collaborator
|
Hi @ghost-cy829 👋 — good direction on this fix (admin-gated
No CI has run yet on this branch. Fix the syntax + discriminant, push, and I'll review again once it builds. 🙏 |
…, verify order, no conflict markers
ghost-cy829
force-pushed
the
feat/credential-revocation
branch
from
July 16, 2026 17:23
ac1a40c to
a140ec6
Compare
Author
|
@leocagli - I've pushed all the fixes you requested.
Just waiting on workflow approval. Let me know if anything else is needed! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds credential revocation to the passport contract so admins can blacklist compromised credential roots on-chain. This is needed for handling lost or stolen documents by invalidating all proofs derived from a revoked root.
What I built:
revoke_credential(root) — admin-only function that marks a root as revoked
Storage mapping to track revoked roots
verify_credential now checks revocation and fails with CredentialRevoked if revoked
is_revoked(root) — public view function to check status
credential_revoked event emitted with root and ledger timestamp
SDK: added PassportError::CredentialRevoked and isRevocationError() helper
Testing:
All acceptance criteria pass. Full flow tested: issue → verify (passes) → revoke → verify (fails with CredentialRevoked). Non-admin calls properly return Unauthorized. All 25 tests passing.
Closes #66