-
Notifications
You must be signed in to change notification settings - Fork 39
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
Durable contracts #1255
Durable contracts #1255
Conversation
Deploying documentation with Cloudflare Pages
|
7a91dde
to
5a72a8c
Compare
Lint is failing and claiming there are warnings for two files. When I run |
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.
Fixing the links is important.
The rest of the comments are just suggestions.
main/guides/zoe/contract-details.md
Outdated
|
||
The first step toward contracts that can be upgraded is storing all the data that a later incarnation will | ||
need. This means putting relevant state in | ||
[Baggage](http://localhost:5173/guides/zoe/contract-upgrade.html#baggage), and ensuring that reachable objects |
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.
some localhost links crept in. And "links should ... exclude the file extension" per contributing docs on writing links
[Baggage](http://localhost:5173/guides/zoe/contract-upgrade.html#baggage), and ensuring that reachable objects | |
[Baggage](/guides/zoe/contract-upgrade#baggage), and ensuring that reachable objects |
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.
done
main/guides/zoe/contract-details.md
Outdated
Our persistent objects are designed to encapsulate their state, and can present different facets to different | ||
clients to distinguish different aspects of authority. `zone.exoClass()` defines a kind with a single facet, | ||
while `zone.exoClassKit()` defines a kind with multiple facets. (Here are some relevant [naming | ||
conventions](https://docs.agoric.com/guides/ertp/#method-naming-structure).) |
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.
use relative links to facilitate local preview:
conventions](https://docs.agoric.com/guides/ertp/#method-naming-structure).) | |
conventions](/guides/ertp/#method-naming-structure).) |
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.
done
main/guides/zoe/contract-upgrade.md
Outdated
The result of starting a contract includes the right to upgrade the contract instance. A call to [E(zoe).startInstance(...)](/reference/zoe-api/zoe.md#e-zoe-startinstance-installation-issuerkeywordrecord-terms-privateargs) returns a record of several objects that represent different levels of access. | ||
The `publicFacet` and `creatorFacet` are defined by the contract. | ||
The `adminFacet` is defined by Zoe and includes methods to upgrade the contract. | ||
The return value when starting a contract includes a capability that conveys the right to upgrade |
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.
"a capability that conveys the right" seems wordy; how about...
The return value when starting a contract includes a capability that conveys the right to upgrade | |
The return value when starting a contract includes a capability to upgrade |
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.
okay
main/guides/zoe/contract-upgrade.md
Outdated
The return value when starting a contract includes a capability that conveys the right to upgrade | ||
the contract instance. A call to | ||
[E(zoe).startInstance(...)](/reference/zoe-api/zoe.md#e-zoe-startinstance-installation-issuerkeywordrecord-terms-privateargs) | ||
returns a record of several objects that carry different powers. The `publicFacet` and |
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 change from "represent different levels of access" to "carry different powers" seems to make things more obscure. I think typical readers are much more likely to be familiar with levels access than "powers".
Perhaps "... returns a kit of facets; that is: a record of several objects that represent different ways to access the contract instance" with kit and facets linked to glossary entries.
Another option would be to leave most of that to the startInstance
docs: "Recall that E(zoe).startInstance(...) returns a record including an adminFacet
property. This adminFacet
includes methods to upgrade the contract instance."
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 don't like "levels of access". "kit of facets" (with links) works for me.
main/guides/zoe/contract-upgrade.md
Outdated
`start`. (We used to indicate upgradability by using `prepare` instead of `start`, but that | ||
approach is deprecated.)` |
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.
`start`. (We used to indicate upgradability by using `prepare` instead of `start`, but that | |
approach is deprecated.)` | |
`start`. (_We used to indicate upgradability by using `prepare` instead of `start`, but that | |
approach is deprecated._)` |
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.
done
main/guides/zoe/contract-details.md
Outdated
Fields of the object returned by the `init` function become fields of the persistent state. (These cannot | ||
currently be changed on upgrade, though we're considering relaxing that restriction.) Within methods they can |
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.
Fields of the object returned by the `init` function become fields of the persistent state. (These cannot | |
currently be changed on upgrade, though we're considering relaxing that restriction.) Within methods they can | |
Fields of the object returned by the `init` function become fields of the persistent state. (_These cannot | |
currently be changed on upgrade, though we're considering relaxing that restriction._) Within methods they can |
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.
done
main/guides/zoe/contract-details.md
Outdated
|
||
### Methods: defining behavior | ||
|
||
The methods argument of `exoClass()` is a bag of methods, written in [concise method |
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 methods argument of `exoClass()` is a bag of methods, written in [concise method | |
The methods argument of `exoClass()` is a collection of methods, written in [concise method |
or "... record of methods ..."
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.
done. I like "record" here.
main/guides/zoe/contract-details.md
Outdated
syntax](https://github.com/Agoric/agoric-sdk/wiki/Arrow-Function-Style#far-classes-do-not-use-arrow-function-style). | ||
`exoClass()` defines a single facet. | ||
|
||
The methodKit parameter to `exoClassKit` is a record of labelled bags of methods. Each label defines a facet |
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 methodKit parameter to `exoClassKit` is a record of labelled bags of methods. Each label defines a facet | |
The methodKit parameter to `exoClassKit` is a record where each value is a collection of methods. Each property defines a facet |
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.
enhanced
main/guides/zoe/contract-details.md
Outdated
|
||
[Zone](http://localhost:5173/glossary/#zone) provides an interface for defining objects and classes that | ||
supports both ephemeral objects (allocated on the heap), and durable objects that can persist and that | ||
SwingSet will page in or out on demand. |
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.
Is "SwingSet" in the reader's vocabulary at this point? Link to glossary entry?
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.
done
result matches before invoking the method. When a guard is written this latter way, the method doesn't have to | ||
be `async`. In both cases, the method doesn't have to check for compliance with the guard. | ||
|
||
[Shapes can specify](https://endojs.github.io/endo/interfaces/_endo_patterns.PatternMatchers.html) simple |
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 made a patterns cheat-sheet at https://docs.agoric.com/reference/zoe-api/zoe-contract-facet.html#proposal-shapes, but that context is specialized to proposal shapes. hm.
Perhaps using glossary entries for Pattern and Shape would help. Perhaps I should do that in a follow-up PR.
Thanks, Dan!
closes: #1126
Description
Collect the details on creating durable contracts in one place. Update to cover use of
meta
withstart
and stop recommendingprepare
for this.Also provide some cross-linking between various descriptions of the approach.