-
Notifications
You must be signed in to change notification settings - Fork 212
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
6678 upgrade zoe & zcf #7946
6678 upgrade zoe & zcf #7946
Conversation
f06a231
to
63fc6fa
Compare
63fc6fa
to
a7895a9
Compare
b8f88d7
to
14ac202
Compare
a7895a9
to
9b24615
Compare
9b24615
to
879104f
Compare
a7a4fed
to
a16493d
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.
Thanks for the commit comments. I needed them to understand the changes.
I still have a couple questions before approving.
packages/zoe/src/zoeService/zoe.js
Outdated
zcfBundleCap = bundleCap; | ||
}, | ||
e => { | ||
console.warn(`unable to update ZCF Bundle: `, e); |
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 only warn? This seems severe to me
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.
Zoe will continue to operate. The request probably had the wrong format of bundleID/bundleCap/etc. I'm amenable if you think it should be severe because the caller didn't get what they wanted.
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, something failed in this case. It's at least console.error
and a siren.
If throwing doesn't break anything other than the requested operation (which already failed) then please throw.
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
if (zoeBaggage.has(BUILD_PARAMS_KEY)) { | ||
const { feeIssuerConfig, zcfSpec } = zoeBaggage.get(BUILD_PARAMS_KEY); | ||
makeDurableZoeKit({ | ||
({ zoeConfigFacet } = makeDurableZoeKit({ |
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.
this introduces a new concept, ZoeConfigFacet, which is the return type of makeDurableZoeKit
.
Can we reconcile these names?
- call this
zoeKit
and havegetZoeKit
- define a new type
ZoeConfigFacet
and declaremakeDurableZoeKit
to return one of those - ??
I'm partial to #1 so the name matches the maker
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.
makeDurableZoeKit
returns { zoeService, zoeConfigFacet, feeMintAccess }
, but this call only needs the zoeConfigFacet
because the others have already been returned.
I'll add a comment.
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.
I misread. Thanks for the comment.
if (zoeBaggage.has(BUILD_PARAMS_KEY)) { | ||
const { feeIssuerConfig, zcfSpec } = zoeBaggage.get(BUILD_PARAMS_KEY); | ||
makeDurableZoeKit({ | ||
({ zoeConfigFacet } = makeDurableZoeKit({ |
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.
I misread. Thanks for the comment.
packages/zoe/src/zoeService/zoe.js
Outdated
zcfBundleCap = bundleCap; | ||
}, | ||
e => { | ||
console.warn(`unable to update ZCF Bundle: `, e); |
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, something failed in this case. It's at least console.error
and a siren.
If throwing doesn't break anything other than the requested operation (which already failed) then please throw.
a16493d
to
b9c3ff2
Compare
makeStartInstance was being passed an accessor to retrieve zcfBundleCap from zoe's state. The accessor was being called once and the result re-used rather than calling the accessor every time in case there was a new value.
9c4771e
to
3b65d03
Compare
closes: #7918
refs: #6678
Description
Changes to Zoe to enable upgrade of ZCF. Zoe needs to have a function in its creatorFacet that updates the ZCF bundle that will be used when starting or upgrading contracts. startInstance has to retrieve that value each time it is going to pass it to the kernel. (It used to be cached.)
Additionally, discovered and fixed an issue with persisting zcfMints.
Security Considerations
Maintain Zoe's guarantees. Make it possible for users to know what version of ZCF will be used for new contracts.
Scaling Considerations
N/A
Documentation Considerations
None
Testing Considerations
Tested in #7966 and #7969