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

Integrate XS native Compartment support #9451

Open
kriskowal opened this issue Jun 4, 2024 · 3 comments
Open

Integrate XS native Compartment support #9451

kriskowal opened this issue Jun 4, 2024 · 3 comments
Labels
enhancement New feature or request xsnap the XS execution tool

Comments

@kriskowal
Copy link
Member

What is the Problem Being Solved?

Support for XS native Compartments is currently in development in Endo endojs/endo#400. When that feature becomes available, we will need to make changes in Agoric SDK (targeting a particular upgrade.)

Description of the Design

We will need to adjust the SwingSet xsnap worker bootstrap to take advantage of the XS-specific variants of ses, @endo/static-module-record, and @endo/import-bundle to take advantage of this new feature, by using @endo/compartment-mapper/bundle.js to generate the bootstrap script and threading the appropriate “build tag” (xs) to cause it to select the correct alternate implementations.

Security Considerations

We will be more dependent on the correctness of XS. There will be some differences in expressivity of contracts that run under XS native compartments. There will be no censorship or evasive transforms. Typeof for references that are not in scope but overshadowing properties of the true global may change. Contracts will draw less from the meter.

Scaling Considerations

The chain will likely benefit from a performance boost from executing native modules instead of using our emulation layer. There may be a slight reduction in the size of the bootstrap bundle since it doesn’t need to entrain the lockdown and harden shims (but does entrain assert and compartment shims).

Test Plan

To be planned.

Upgrade Considerations

The new process will support both the SES shim Compartment and XS native Compartment

@kriskowal kriskowal added the enhancement New feature or request label Jun 4, 2024
@dckc dckc added the xsnap the XS execution tool label Jun 21, 2024
@mhofman
Copy link
Member

mhofman commented Sep 23, 2024

AFAIK this will require an upgrade of XS, which is currently blocked on a plan to upgrade XS (see #6361), as well as a way to validate that such a newer version of XS is acceptable for our need (see #6929).

I am actually wondering here if we might be able to somehow validate a replay of old contract bundles running on a new version of XS with updated supervisor and lockdown bundles using the new XS based Compartment.

@aj-agoric
Copy link

Hello, as a part of xs planning the question arose is this ticket a portion or duplicate of #2480. @kriskowal thanks

@kriskowal
Copy link
Member Author

The design proposed by this issue would satisfy the requirements of #2480. Please keep this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request xsnap the XS execution tool
Projects
None yet
Development

No branches or pull requests

4 participants