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

Add agreement_terms field in the DataDeal #602

Closed
youngjoon-lee opened this issue Jan 9, 2023 · 1 comment · Fixed by #618
Closed

Add agreement_terms field in the DataDeal #602

youngjoon-lee opened this issue Jan 9, 2023 · 1 comment · Fixed by #618
Assignees

Comments

@youngjoon-lee
Copy link
Contributor

youngjoon-lee commented Jan 9, 2023

To show providers details agreement terms, we need to add a new field, agreement_terms, which is a string array of URLs, which is a array of AgreementTerm. We'll expect that data consumers write terms in Markdown, but the chain doesn't need to validate the contents/format of a description in the AgreementTerm.

Deal

{
   "data_schema": [...],
   "agreement_terms": [
          {
                "id": "term-1",
                "required": true,
                "description": "blah blah (Markdown is recommended)"
          }
    ]
}

Consent

{
    "certificate": {
         "deal_id": 1,
    },
   "deal_id": 1,
   "agreements": [
         {
              "term_id:": "term-1",
              "agreement": true
         },
         {
              "term_id:": "term-2",
              "agreement": false
         },
   ]
}

The chain has to reject MsgSubmitConsent which doesn't contain agreements for required terms.

This field shouldn't be modified (added/edited/removed) after the deal is created. Especially, it shouldn't be modified after at least one data is provided with the deal.

@youngjoon-lee youngjoon-lee changed the title Add agreements field in the DataDeal Add agreement_terms field in the DataDeal Jan 9, 2023
@youngjoon-lee youngjoon-lee added this to the v2.1.0-beta milestone Jan 10, 2023
@youngjoon-lee youngjoon-lee changed the title Add agreement_terms field in the DataDeal Add terms field in the DataDeal Jan 10, 2023
@youngjoon-lee
Copy link
Contributor Author

Discussed with @tjyoon0324 offline. Let's go with the spec described above, which is simple enough for covering many unexpected cases.

@youngjoon-lee youngjoon-lee changed the title Add terms field in the DataDeal Add agreement_terms field in the DataDeal Jan 11, 2023
@youngjoon-lee youngjoon-lee self-assigned this Jan 11, 2023
@youngjoon-lee youngjoon-lee linked a pull request Jan 11, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant