-
Notifications
You must be signed in to change notification settings - Fork 208
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
test(zoe): Add a test for contracts surviving Zoe vat upgrade #6715
Conversation
} | ||
|
||
// Null-upgrade Zoe. | ||
const incarnationNumber = await run('upgradeVat', [zoeVatConfig]); |
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.
@Chris-Hibbert I think I will need some help after all.
Error: vat-upgrade failure
error during vat dispatch() of startVat,[object Object] (Error#1)
Error#1: defineDurableKind not called for tags: [ZDEFAULT brand,ZDEFAULT payment,ZDEFAULT Purse,ZDEFAULT issuer,ZDEFAULT mint,FeeMint,Zoe Invitation brand,Zoe Invitation payment,Zoe Invitation Purse,Zoe Invitation issuer,Zoe Invitation mint,InstanceAdmin,BundleIDInstallation,BundleInstallation,InstallationStorage,ZoeMint,ZoeStorageManager,InstanceHandle,zoe Seat publisher,ZoeSeatKit,SeatHandle,instanceAdmin,zoeInstanceAdmin,emptyCreatorFacet,emptyPublicFacet,adminFacet,ZoeService,InstanceStorageManager,InstanceStorageManager,InstanceStorageManager,InstanceStorageManager,InstanceStorageManager,InstanceStorageManager]
Error: defineDurableKind not called for tags: [ZDEFAULT brand,ZDEFAULT payment,ZDEFAULT Purse,ZDEFAULT issuer,ZDEFAULT mint,FeeMint,Zoe Invitation brand,Zoe Invitation payment,Zoe Invitation Purse,Zoe Invitation issuer,Zoe Invitation mint,InstanceAdmin,BundleIDInstallation,BundleInstallation,InstallationStorage,ZoeMint,ZoeStorageManager,InstanceHandle,zoe Seat publisher,ZoeSeatKit,SeatHandle,instanceAdmin,zoeInstanceAdmin,emptyCreatorFacet,emptyPublicFacet,adminFacet,ZoeService,InstanceStorageManager,InstanceStorageManager,InstanceStorageManager,InstanceStorageManager,InstanceStorageManager,InstanceStorageManager]
at apply ()
at Error (/bundled-source/.../node_modules/ses/src/error/tame-error-constructor.js:54)
at insistAllDurableKindsReconnected (/bundled-source/.../packages/SwingSet/src/liveslots/virtualObjectManager.js:994)
at startVat (/bundled-source/.../packages/SwingSet/src/liveslots/liveslots.js:1437)
at ()
at ()
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.
Thanks, @gibson042, I'll take it from here for now. This is a great framework for verifying upgradeability, and I'll use it to figure out what I didn't set up correctly for upgrade.
import { vivifyErtpService } from '@agoric/ertp/test/swingsetTests/ertpService/vat-ertp-service.js'; | ||
|
||
export const buildRootObject = async (vatPowers, _vatParams, baggage) => { | ||
const exportableAmountMath = Far('AmountMath', { ...AmountMath }); |
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.
Why do we need an exportableAmountMath
? AmountMath was designed to be usable locally in every vat and produce copy objects that can be sent around seamlessly.
const messageVat = (name, methodName, args) => | ||
run('messageVat', [{ name, methodName, args }]); | ||
const messageObject = (presence, methodName, args) => | ||
run('messageVatObject', [{ presence, methodName, args }]); |
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.
Are these a replacement for E()
calls? What role do they play?
The answer to both questions is that dependent code exists outside of the vats under test and is thus limited to pass-by-copy data as supported by encoding and decoding in packages/SwingSet/test/bootstrap-relay.js (which does use |
@gibson042, I pushed one teensy correction. Otherwise, the test worked great! #6726 contains the changes to make Zoe pass the test. This test is now stacked on top of that. |
78cad8e
to
45e3ed6
Compare
5b6e843
to
f406cc2
Compare
Are these two CI dapp failures due to the API change not yet being propagated to other repos? If so, why didn't they already fail in #6726 ? |
I hadn't bothered to add the markup below to this one, since it's a known fix. Once the base PR is merged, this will get it.
I'll add it above, and if the tests run from scratch, they'll get it. |
The |
Refactored instanceRecord storage to serve Zoe and ZCF better initialize issuerStorage only once revive feeMint, invitationIssuer on restart save bundleCap vatAdminSvc in zoe for re-use define makeInvitation inline in instanceStorageManager, so pass in InvitationIssuer vat-zoe has to define durable kinds on start & restart, but vatAdminService should be re-used on restart. This necessitated a change in the return value of makeZoeKit instanceStorageManager holds its state directly rather than lexically.
* fix: suggested simplification of 6726 * fix: more
No need for feeMintAccessRetriever. setVatAdminService is a far function also cleaned up some asserts
closes: #6748 This method shouid only ever have been accessible on ZCF.
5e69166
to
8f63d8c
Compare
I remove the cross-repo imports in the top comment. I'll rebase this on the latest #6726 to see that the tests still pass. |
* Accept replacement symbols anywhere in input data structures. * Capture static vats. * Export vatAdmin and a manual timer.
f406cc2
to
cae7bcc
Compare
The code this is a test for has been merged. @gibson042, please merge this. |
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
closes: #6713
Description
Creates a test that instantiates covered-call contracts, null-upgrades Zoe, and then finishes the contracts.
Security Considerations
n/a
Documentation Considerations
n/a