-
Notifications
You must be signed in to change notification settings - Fork 206
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
feat(async-flow): endowments #9566
Conversation
Deploying agoric-sdk with Cloudflare Pages
|
d19ac57
to
49046c8
Compare
49046c8
to
1947553
Compare
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.
notes on sendAnywhere
const { denom } = await findBrandInVBank(amt.brand); | ||
const chain = await orch.getChain(chainName); | ||
|
||
// FIXME ok to use a heap var crossing the membrane scope this way? |
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.
// FIXME ok to use a heap var crossing the membrane scope this way? |
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. Also cleaned up the two // XXX when() until membrane
below
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.
odd... it doesn't look done.
|
The existing failures are |
That problem fixed |
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.
It looks good, though I have a few questions.
closes: #XXXX refs: https://github.com/Agoric/agoric-sdk/pull/9566/files#r1653602477 ## Description At https://github.com/Agoric/agoric-sdk/pull/9566/files#r1653602477 @dckc commented on a cleanup that I thought I did and marked as done, but was not done. Before #9566, the code that would be guest code had several workarounds marked `// XXX when() until membrane` that correctly indicated that they should be cleaned up as of #9566, which introduces exactly that membrane. In addition, guest code has no need for `heapVowE` since it doesn't see vows. It should just use the normal `E`. To keep this distinct, I stopped renaming `hostVowE` where host code needs it in the same file. ### Security Considerations none ### Scaling Considerations none ### Documentation Considerations examples are now more like what we want to teach ### Testing Considerations I believe this PR is a pure refactor that should not have any observable effects. Thus, it should not affect any tests. We'll see soon. ### Upgrade Considerations none
closes: #XXXX
refs: #9449 #9521 #9304 #9281
Description
Changed async-flow to support endowments. Changed
orchestrate
to useasyncFlow
with endowments. ChangedsendAnywhere
example orchestration contract to be more compatible with this neworchestrate
.The CI errors are all in the
orchestration
package. After some earlier iteration where orchestration failures indicated async-flow bugs, which I fixed, the remaining errors seem plausibly to be integration bugs on the orchestration side revealed by using this improvedorchestrate
function. If so, that satisfies the purpose of this PR -- to enable integration testing to reveal such errors. However, this leaves open the question of how to bring this PR to fruition despite these CI errors.In that iteration, the majority of errors were due to host-side promises, which we expected. To proceed with integration testing, I temporarily turned that case into a warning, by wrapping the host-side promise with a host-side vow. This stopgap measure is obviously fragile under upgrade. It would cause may upgrades to fail
However, I have not investigated these CI errors enough to be at all confident that none of them are due to bugs in async-flow. For any of those, they should be fixed in this PR.
Security Considerations
nothing new
Scaling Considerations
none, given that total endowments are low cardinality. All these endowments are prepare-time per-function. There should not be any cardinality limit on the activations making use of these endowments. But like all other async-flow scaling issues, that remains to be tested.
Documentation Considerations
The endowment rules and taxonomy is interesting, and should be documented.
Testing Considerations
We get CI errors only from the
orchestration
package. Some of these may be the integration bugs we wanted this exercise to reveal. However, others may be async-flow bugs, which should have been caught by async-flow unit tests.The warning stopgap I mentioned above appears in CI as, for example
The relevant lines are
where the first line indicates what method or method guard provided the inappropriate promise
and the second line indicates where the guest code called it
Upgrade Considerations
The orchestration code in question cannot be truly upgrade safe until we see no more of these "vow expected, not promise" warnings. Even then, we should expect that async-flow as of this PR is ready for lots of testing, but not yet ready to run on the main chain with durable state expected to survive real upgrades.