-
Notifications
You must be signed in to change notification settings - Fork 205
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 a first version of new upgrade docs #4750
Conversation
cec8374
to
c2103c8
Compare
This PR adds a first version of update documentation and removes the existing docs which were talking about `damlc migrate`. So far the docs focus on the high-level approach to upgrades taken in DAML and give an example of how to structure upgrade contracts. What is not covered so far (and I’d like to leave that for a separate PR) is: 1. Technical details: How are things split up into packages, which restrictions apply to data-dependencies, … 2. Deployment and Running the upgrade via triggers/daml script/… 3. Common patterns for handling this in UIs (e.g. “locking” old contracts) changelog_begin changelog_end
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.
Very nice, thanks!
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.
Awesome! Thank you so much.
signatories of a contract have agreed to one specific version of a | ||
template. Changing the definition of a template, e.g., by extending it | ||
with a new choice without agreement from signatories of contracts of | ||
that template would completely break the authority guarantees provided |
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.
I'm not 100% sure but that feels better to me:
that template would completely break the authority guarantees provided | |
that template would completely break the authorization guarantees provided |
those here.) We use a different name for the new template here. This | ||
is not required as templates are identified by the triple | ||
``(PackageId, ModuleName, TemplateName)`` but here we omit package ids | ||
and module names for presentational purposes. |
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.
and module names for presentational purposes. | |
and module names for the sake of simplicity. |
:start-after: -- COIN_AMOUNT_BEGIN | ||
:end-before: -- COIN_AMOUNT_END | ||
|
||
Now, that we defined our new template, we need to provide a way for |
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.
Now, that we defined our new template, we need to provide a way for | |
Next, we need to provide a way for |
:end-before: -- COIN_AMOUNT_END | ||
|
||
Now, that we defined our new template, we need to provide a way for | ||
the signatories issuer and owner to agree to a contract being |
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.
the signatories issuer and owner to agree to a contract being | |
the signatories, issuer and owner, to agree to a contract being |
Now, that we defined our new template, we need to provide a way for | ||
the signatories issuer and owner to agree to a contract being | ||
upgraded. It would be possible to structure this such that issuer and | ||
owner have to agree to an upgrade for each *Coin* contract |
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.
owner have to agree to an upgrade for each *Coin* contract | |
owner have to agree to an upgrade for each individual *Coin* contract |
the signatories issuer and owner to agree to a contract being | ||
upgraded. It would be possible to structure this such that issuer and | ||
owner have to agree to an upgrade for each *Coin* contract | ||
separately. However, since the template definition for those is all |
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.
separately. However, since the template definition for those is all | |
separately. However, since the template definition for all of them is |
:end-before: -- UPGRADE_PROPOSAL_END | ||
|
||
Now we can define the *UpgradeCoinAgreement* template. This template | ||
has one *nonconsuming* choice that accepts a *Coin* contract, archives |
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.
The word "accept" is a bit overloaded here. We also need to make it clear that we pass the contract by reference not by value.
has one *nonconsuming* choice that accepts a *Coin* contract, archives | |
has one *nonconsuming* choice that takes the contract ID of a *Coin* contract, archives |
Now we can define the *UpgradeCoinAgreement* template. This template | ||
has one *nonconsuming* choice that accepts a *Coin* contract, archives | ||
this *Coin* contract and creates a *CoinWithAmount* contract with | ||
*amount* set to 1. |
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.
*amount* set to 1. | |
the same issuer and owner and the *amount* set to 1. |
This PR addresses the comments from @hurryabit on #4750. changelog_begin changelog_end
This PR addresses the comments from @hurryabit on #4750. changelog_begin changelog_end
This PR adds a first version of update documentation and removes the
existing docs which were talking about
damlc migrate
.So far the docs focus on the high-level approach to upgrades taken in
DAML and give an example of how to structure upgrade contracts.
What is not covered so far (and I’d like to leave that for a separate
PR) is:
restrictions apply to data-dependencies, …
changelog_begin
changelog_end
Pull Request Checklist
CHANGELOG_BEGIN
andCHANGELOG_END
tagsNOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with
/AzurePipelines run
totrigger the build.