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

Fix minor issues in intro docs #4151

Merged
merged 4 commits into from
Jan 21, 2020
Merged

Conversation

richardkapolnai-da
Copy link
Contributor

@richardkapolnai-da richardkapolnai-da commented Jan 21, 2020

CHANGELOG_BEGIN
CHANGELOG_END

Pull Request Checklist

  • Read and understand the contribution guidelines
  • Include appropriate tests
  • Set a descriptive title and thorough description
  • Add a reference to the issue this PR will solve, if appropriate
  • Include changelog additions in one or more commit message bodies between the CHANGELOG_BEGIN and CHANGELOG_END tags
  • Normal production system change, include purpose of change in description

NOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with /AzurePipelines run to
trigger the build.

@@ -226,7 +226,7 @@ You can define *stable* keys for contracts using the ``key`` and ``maintainer``
:start-after: -- KEY_TEST_BEGIN
:end-before: -- KEY_TEST_END

Since DAML is designed to run on distributed systems, you have to assume that there is no global entity that can guarantee uniqueness, which is why each ``key`` expression must come with a ``maintainer`` expression. ``maintainer`` takes one or several parties, all of which have to be signatories of the contract and be part of the key. That way the index can be partitioned amongst sets of maintainers, and each set of maintainers can independently ensure the uniqueness constraint on their piece of the index. The constraint that maintainters are part of the key is ensured by only having the variable `key`
Since DAML is designed to run on distributed systems, you have to assume that there is no global entity that can guarantee uniqueness, which is why each ``key`` expression must come with a ``maintainer`` expression. ``maintainer`` takes one or several parties, all of which have to be signatories of the contract and be part of the key. That way the index can be partitioned amongst sets of maintainers, and each set of maintainers can independently ensure the uniqueness constraint on their piece of the index. The constraint that maintainers are part of the key is ensured by only having the variable `key` in each maintainer expression.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please verify if the last sentence is true and also helpful.

@@ -31,7 +31,7 @@ Native types
You have already encountered a few native DAML types: ``Party`` in :doc:`1_Token`, and ``Text`` and ``ContractId`` in :doc:`2_Scenario`. Here are those native types and more:

- ``Party``
Stores the identity of an entity that is able to act on the ledger, in the sense that they can sign contracts and submit transactions. In general, ``Party`` is Oblique.
Stores the identity of an entity that is able to act on the ledger, in the sense that they can sign contracts and submit transactions. In general, ``Party`` is opaque.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, we could remove the last sentence:

Suggested change
Stores the identity of an entity that is able to act on the ledger, in the sense that they can sign contracts and submit transactions. In general, ``Party`` is opaque.
Stores the identity of an entity that is able to act on the ledger, in the sense that they can sign contracts and submit transactions.

@richardkapolnai-da richardkapolnai-da marked this pull request as ready for review January 21, 2020 16:51
Copy link
Contributor

@bame-da bame-da left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for spotting that!

@richardkapolnai-da richardkapolnai-da changed the title Change Oblique to opaque. Fix minor issues in docs Jan 21, 2020
CHANGELOG_BEGIN
CHANGELOG_END
CHANGELOG_BEGIN
CHANGELOG_END
@richardkapolnai-da richardkapolnai-da changed the title Fix minor issues in docs Fix minor issues in intro docs Jan 21, 2020
@richardkapolnai-da richardkapolnai-da merged commit 6000666 into master Jan 21, 2020
@richardkapolnai-da richardkapolnai-da deleted the fix-minor-issues-in-docs branch January 21, 2020 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants