-
Notifications
You must be signed in to change notification settings - Fork 21
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
Refactor/dataverse vc #433
Conversation
WalkthroughThe OKP4 Dataverse has undergone a transformation, shifting from service and resource registration to a claims-based model. Entities can now submit and revoke claims about resources, with a focus on Verifiable Presentations and maintaining the dataverse's integrity. The changes streamline the process, enhancing the system's flexibility and expressiveness in handling data assertions. Changes
TipsChat with CodeRabbit Bot (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #433 +/- ##
=======================================
Coverage 96.84% 96.84%
=======================================
Files 49 49
Lines 10003 10003
=======================================
Hits 9687 9687
Misses 316 316 ☔ View full report in Codecov by Sentry. |
size-limit report 📦
|
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (2)
- contracts/okp4-dataverse/src/msg.rs (3 hunks)
- docs/okp4-dataverse.md (3 hunks)
Additional comments: 6
contracts/okp4-dataverse/src/msg.rs (3)
16-53: The changes to the
ExecuteMsg
enum and the detailed comments provide clear instructions on how to use the newSubmitClaims
variant. The preconditions and format requirements are well-documented, ensuring that users understand how to properly submit claims.60-68: The addition of the
RevokeClaims
variant with its precondition is a good practice to ensure that claims can be managed effectively within the dataverse. It's important to ensure that the implementation of this variant checks for the existence of the identifier before attempting to revoke a claim.188-189: The
Uri
type alias is correctly defined and follows the standard practice of using aString
to represent a URI. This should ensure compatibility with other parts of the system that use URIs.docs/okp4-dataverse.md (3)
63-89: The documentation for
ExecuteMsg::SubmitClaims
is comprehensive and clearly explains the format, preconditions, and the use of Verifiable Presentations for submitting claims. This aligns well with the changes made to the smart contract's execution messages.99-105: The documentation for
ExecuteMsg::RevokeClaims
is concise and outlines the precondition for revoking claims. It is important to ensure that the implementation of this message in the smart contract adheres to the precondition mentioned.251-251: The documentation footer indicates the rendering tool and version used. This is helpful for maintaining the documentation and ensuring consistency when future updates are made.
b9c6f55
to
ccaf887
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (2)
- contracts/okp4-dataverse/src/msg.rs (3 hunks)
- docs/okp4-dataverse.md (3 hunks)
Additional comments: 6
contracts/okp4-dataverse/src/msg.rs (3)
16-51: The documentation for
SubmitClaims
is comprehensive and provides clear guidelines on the format and preconditions for submitting claims. This should help ensure that users of the smart contract understand how to properly submit claims.58-66: The
RevokeClaims
variant has been updated with preconditions for revoking claims, which is consistent with the summary. This addition should help ensure that claims are revoked in a controlled manner, maintaining the integrity of the dataverse.186-187: The
Uri
type has been updated to represent a Uniform Resource Identifier (URI), which is consistent with the summary. This change is important for the identification of resources within the dataverse.docs/okp4-dataverse.md (3)
63-87: The updated description and functionality for
ExecuteMsg::SubmitClaims
align with the changes mentioned in the summary. The detailed explanation of the format, preconditions, and the role of Verifiable Presentations (VPs) in the submission process is clear and informative.97-103: The updated description and functionality for
ExecuteMsg::RevokeClaims
align with the changes mentioned in the summary. The preconditions for revoking claims are clearly stated, ensuring that the process is well-defined.249-249: The rendered information by Fadroma has been updated, as indicated in the summary. This ensures that the documentation reflects the latest changes to the
okp4-dataverse.json
schema.
Context
The process of redesigning the OKP4 ontology (cf. axone-protocol/ontology#205 and axone-protocol/ontology#212) necessitates the restructuring of the Execution Messages provided by the
Dataverse
Smart Contract. This restructuring involves removing many messages that are no longer relevant, as all information contributed to the dataverse is now conveyed through Verifiable Credentials.PR purpose
This PR redefines the scope of the smart contract's execution messages, providing only the minimal functional surface required for managing the resources of the Dataverse.
Summary by CodeRabbit
New Features
SubmitClaims
to allow entities to submit new claims about resources.RevokeClaims
for revoking previously submitted claims.Documentation
SubmitClaims
andRevokeClaims
functionality.Refactor
RegisterService
andRegisterDigitalResource
variants.Did
type and refinedUri
type usage.Bug Fixes