-
Notifications
You must be signed in to change notification settings - Fork 233
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
Use native and/or fake harden
for performance
#7438
Conversation
e101525
to
cc731f8
Compare
I'll waive the requirement to bump the meter version given we will soon update XS versions anyway. |
3f42157
to
2012ec8
Compare
harden
for performance
harden
for performanceharden
for performance
2012ec8
to
2f24746
Compare
b67b0e5
to
b43439c
Compare
2f24746
to
f02b61d
Compare
f02b61d
to
a9212c1
Compare
harden
for performanceharden
for performance
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.
Swingset needs to continue to work with normal safe harden as well, for general correctness and sanity. Can we have a way to run the Swingset tests with safe harden too? Should this happen in CI?
The only change to use unsafe harden is in the entry points in the |
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.
Neat, clean change!
rawSaveSeconds: 0, | ||
uncompressedSize: 801387, | ||
uncompressedSize: 724579, |
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.
Impressive how we reduced the heap snapshot size!
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.
Yeah, removing the WeakSet of hardened values is probably what caused this shrinkage.
a9212c1
to
81e9412
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.
yep, looks good, awesome that this works!
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.
LGTM Full speed ahead!
closes: #7275, closes: #7367
refs: agoric-labs/xsnap-pub#37 agoric-labs/moddable#8 endojs/endo#1556
Description
Optimise the on-chain use of
harden
globalThis.harden
under XS (feat: reenable nativeharden
agoric-labs/xsnap-pub#37 and feat: allow callingharden
beforelockdown
agoric-labs/moddable#8)@endo/init/unsafe-fast.js
for Node.js cosmic-swingset feat(ses): option to fake harden unsafely endojs/endo#1528 feat(init): add@endo/init/unsafe-fast.js
endojs/endo#1552Please note the Git hash updates in this PR, and see that the submodule diffs below are as expected.
Security Considerations
Some softer interface boundaries within the SwingSet kernel (running in Node.js) since
harden
is faked there for performance. We consider this to be an acceptable risk, because the kernel is carefully written, and does not evaluate any externally-supplied code except within a vat worker (which still uses the full, safeharden
implementation).Scaling Considerations
Reduces runtime costs of
harden()
underxsnap-worker
and within the SwingSet kernel launched byagd start
.Documentation Considerations
Testing Considerations