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

feat(liveslots): virtual exo meta-ops #8779

Merged
merged 3 commits into from
Mar 28, 2024
Merged

Conversation

erights
Copy link
Member

@erights erights commented Jan 20, 2024

closes: #XXXX
refs: endojs/endo#1925 endojs/endo#1924 #8965

Description

The @endo/exo package defines APIs for defining exos that are supposed to be implemented by all exo implementations. It does implement receiveAmplifier and receiveIsInstanceTester for heap exos. This PR does likewise for virtual and durable exos.

@FUDCo In @endo/exo I assume contextProviders indicate the context is not found by returning undefined rather than throwing. My code kinda depends on that assumption. I thought it was true for both heap and virtual/durable exos. But the contextProviders here, before this PR, threw. This PR changes them to return undefined. Is this correct? What should I worry about?

Security Considerations

These meta-ops provide a form of rights amplification. But the API was specifically designed so the extra power would be easy to spot during code reviews. We need to ensure that reviewers know what to look for.

Scaling Considerations

Without these meta-ops, the same functionality can (and has been) implemented by introducing yet another weak store. When this is a virtual or durable weak store, that's quite expensive. It also introduces cyclic gc concerns. The implementation provided here avoids those costs.

Documentation Considerations

Once this PR is merged, these meta-ops are uniformly available across heap, virtual, and durable exos, as well as the zones for those. At that point, they will be ready to document and use.

Testing Considerations

The included tests are modeled on those in @endo/exo for heap exos. However, rather than copy-edit code, we should replace both with reusable zone-parameterized tests.

Upgrade Considerations

There should be no problem upgrading an exo incarnation without meta-ops to one with these meta-ops, since there is no change to the representations in virtual or durable storage.

@erights erights self-assigned this Jan 20, 2024
@erights erights force-pushed the markm-virtual-exo-meta-ops branch from 6d83204 to b2d83df Compare January 20, 2024 22:51
@erights erights force-pushed the markm-remove-migrated-common branch from 6e0290e to ac7afd2 Compare January 21, 2024 02:10
@erights erights force-pushed the markm-virtual-exo-meta-ops branch 2 times, most recently from 0992e94 to 0d46632 Compare January 21, 2024 04:34
@erights erights changed the base branch from markm-remove-migrated-common to master January 21, 2024 04:34
@erights erights marked this pull request as ready for review January 21, 2024 04:41
@erights erights requested review from FUDCo and mhofman January 21, 2024 04:42
@erights erights force-pushed the markm-virtual-exo-meta-ops branch from 0d46632 to f4be681 Compare January 21, 2024 04:59
@erights erights force-pushed the markm-virtual-exo-meta-ops branch from 22dd0e6 to 2d35107 Compare January 25, 2024 21:19
@erights
Copy link
Member Author

erights commented Jan 25, 2024

Not urgent. But ping in case it's easy and you have a moment ;)

@erights erights requested a review from warner January 25, 2024 21:26
@erights erights force-pushed the markm-virtual-exo-meta-ops branch 3 times, most recently from e0735f2 to 40bff44 Compare February 3, 2024 03:24
@erights erights force-pushed the markm-virtual-exo-meta-ops branch from 40bff44 to 386fd27 Compare February 5, 2024 23:19
@erights erights force-pushed the markm-virtual-exo-meta-ops branch 2 times, most recently from da42d81 to 2e84bb7 Compare February 23, 2024 20:37
@erights erights changed the base branch from master to markm-move-revocability-to-base-zone February 23, 2024 20:53
@erights erights requested review from michaelfig and removed request for FUDCo February 23, 2024 22:44
@erights erights force-pushed the markm-move-revocability-to-base-zone branch from b252dcb to 609c4df Compare February 24, 2024 00:41
@erights erights force-pushed the markm-virtual-exo-meta-ops branch from 2e84bb7 to c0aa00b Compare February 24, 2024 00:41
@erights erights force-pushed the markm-move-revocability-to-base-zone branch from 609c4df to 9654897 Compare February 24, 2024 02:07
@erights erights force-pushed the markm-virtual-exo-meta-ops branch from c0aa00b to c21ed44 Compare February 24, 2024 02:09
@erights erights force-pushed the markm-move-revocability-to-base-zone branch from 9654897 to da52e07 Compare February 24, 2024 02:46
@erights erights force-pushed the markm-virtual-exo-meta-ops branch from d601dd3 to 6cd1381 Compare February 24, 2024 03:04
Base automatically changed from markm-move-revocability-to-base-zone to master February 24, 2024 03:27
@erights erights force-pushed the markm-virtual-exo-meta-ops branch 2 times, most recently from aa7a58d to e70f34e Compare February 29, 2024 04:02
@erights erights force-pushed the markm-virtual-exo-meta-ops branch from e70f34e to 4b9dcdf Compare March 18, 2024 21:52
@erights
Copy link
Member Author

erights commented Mar 18, 2024

ping?

@erights erights force-pushed the markm-virtual-exo-meta-ops branch 2 times, most recently from 812e4a2 to 1540fce Compare March 26, 2024 23:43
yarn.lock Outdated Show resolved Hide resolved
yarn.lock Outdated Show resolved Hide resolved
@erights erights force-pushed the markm-virtual-exo-meta-ops branch from 1540fce to 40250db Compare March 27, 2024 18:04
Copy link
Member

@michaelfig michaelfig left a comment

Choose a reason for hiding this comment

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

LGTM with just a few comments to consider.

@erights erights force-pushed the markm-virtual-exo-meta-ops branch from 77dd4cf to d5c2dfd Compare March 28, 2024 01:58
@erights erights force-pushed the markm-virtual-exo-meta-ops branch from d5c2dfd to d0b6803 Compare March 28, 2024 01:59
@erights erights added the automerge:squash Automatically squash merge label Mar 28, 2024
@mergify mergify bot merged commit af3ced9 into master Mar 28, 2024
74 checks passed
@mergify mergify bot deleted the markm-virtual-exo-meta-ops branch March 28, 2024 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:squash Automatically squash merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants