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

Base/Cicero Accord Project Models Revisions for version 1.0 #93

Closed
jeromesimeon opened this issue Dec 19, 2019 · 5 comments
Closed

Base/Cicero Accord Project Models Revisions for version 1.0 #93

jeromesimeon opened this issue Dec 19, 2019 · 5 comments

Comments

@jeromesimeon
Copy link
Member

The Accord Project base models in https://github.com/accordproject/models/tree/master/src/cicero
were designed very early on before we had a lot of experience with the programming model, with the Ergo type system, etc.

Before we go to Cicero 1.0 we should do a review of those models, decide whether any change would be useful/needed.

This revision should be aligned with whatever decision we make on whether we keep or remove support for Concerto systems models. (See accordproject/concerto#62)

Also, this revision should ideally address the use of a slightly different base model for Ergo type checking. (See accordproject/ergo#698)

@jeromesimeon
Copy link
Member Author

jeromesimeon commented Dec 19, 2019

A draft for what the base models could be like for 1.0 is in the branch: https://github.com/accordproject/models/tree/js-base-models-93
under src/accordproject (https://github.com/accordproject/models/tree/js-base-models-93/src/accordproject).

That draft assumes support for systems model will be removed from Concerto.

Some changes:

  1. no more base model. identifiers have been folded into the models as required
  2. a separate obligation model which reduces the dependencies of the core models to other parts (e.g., money is not required in Concerto Core anymore). (See also: Inconsistent dependency on the money model in Cicero #94)
  3. Some parts of the runtime which AFAICT are not used have been removed (PayLoad, Success, Failure)
  4. Some general renaming, notably removing Accord prefixes which seem redundant with the namespace. AccordContract -> ContractData and AccordClause -> ClauseData
  5. State and Obligation are in the runtime rather than the contract model
  6. promisor and promisee are now accord Party rather than Participant and are mandatory (per the comment)
  7. A tentative support for storing contract obligations in the contract state is suggested.

There is a lot of room for discussion here, and will need review and iteration.

@jeromesimeon jeromesimeon moved this from MUST have to In progress in Cicero + Ergo 1.0 Dec 19, 2019
@mttrbrts
Copy link
Sponsor Member

Nothing to add from me here. The changes in your fork LGTM

@jeromesimeon
Copy link
Member Author

jeromesimeon commented Dec 20, 2019

Nothing to add from me here. The changes in your fork LGTM

@mttrbrts Are you also happy with 6. and 7. which I thought were a bit more controversial?

About 6. We do have a few templates which leave parties as blank.

About 7. Could go with specific Ergo support for storing/retrieving obligation from the state. This could provide much nicer support for the kind of logic currently used in the Supply Agreement template https://github.com/accordproject/cicero-template-library/tree/master/src/supplyagreement

@jeromesimeon
Copy link
Member Author

jeromesimeon commented Mar 11, 2020

Status update on this issue:

  1. A new revision for the models can be found in https://github.com/accordproject/models/tree/release-1.0
    This branch is published at https://release-1-0--accordproject-models.netlify.com
  2. This new revision takes into account the current resolution for systems models in Concerto (see Remove support for system models concerto#62)

Some observations:

  1. Because the change of support for systems models in Concerto is a breaking Concerto change, some of the existing models are not valid anymore. Here is the list of existing models which break:
10:07:43 AM: Error handling /opt/build/repo/src/cicero/runtime.cto
10:07:43 AM: Relationship promisor must be to a class that has an identifier, but this is to system.Participant File '/opt/build/repo/src/cicero/runtime.cto': line 41 column 3, to line 44 column 3.
10:07:46 AM: Error handling /opt/build/repo/src/docusign/connect.cto
10:07:46 AM: Unable to download external model dependency 'https://release-1-0--accordproject-models.netlify.com/cicero/runtime.cto'
10:07:46 AM: Error handling /opt/build/repo/src/docusign/[email protected]
10:07:46 AM: Unable to download external model dependency 'https://release-1-0--accordproject-models.netlify.com/cicero/runtime.cto'
10:12:13 AM: Error handling /opt/build/repo/src/payment/payment.cto
10:12:13 AM: Unable to download external model dependency 'https://release-1-0--accordproject-models.netlify.com/cicero/runtime.cto'
10:12:16 AM: Error handling /opt/build/repo/src/signature/signature.cto
10:12:16 AM: Unable to download external model dependency 'https://release-1-0--accordproject-models.netlify.com/cicero/runtime.cto'
  1. New versions for those have been added which import the new AP base models: docusign/[email protected] payment/[email protected] and signature/[email protected]
  2. This is likely not the final resolution, assuming we address remaining open issues on identifiers and relationships (see Revisions to identifiers & relationships concerto#181 Provide default init method implementation ergo#734)

@jeromesimeon
Copy link
Member Author

New Accord Project base models can now be found in https://github.com/accordproject/models/tree/master/src/accordproject

Cicero + Ergo 1.0 automation moved this from In Progress Issues to Finished Issues May 27, 2021
Concerto 1.0 Migration automation moved this from In progress to Done May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Cicero + Ergo 1.0
  
Finished Issues
Development

No branches or pull requests

2 participants