-
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
feat: repair KREAd contract on zoe upgrade #8853
Conversation
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.
You need to include the revive kread script in the list of core proposal steps to execute during the upgrade, after Zoe upgrade here:
agoric-sdk/golang/cosmos/app/app.go
Lines 837 to 838 in e052586
// Then, upgrade Zoe and ZCF | |
vm.CoreProposalStepForModules("@agoric/vats/scripts/replace-zoe.js"), |
const creatorFacet = kreadKit.creatorFacet; | ||
console.log(`KREAd creatorFacet`, creatorFacet); | ||
await E(creatorFacet).reviveMarketExitSubscribers(); | ||
console.log('success!'); |
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.
Please use a more descriptive message. This will be mixed with other bootstrap vat logging
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.
adc4f87
to
1f982b6
Compare
I've now added a test showing a KREAd character purchase. |
e052586
to
40407e9
Compare
export const defaultProposalBuilder = async () => | ||
harden({ | ||
sourceSpec: '@agoric/vats/src/proposals/kread-proposal.js', | ||
getManifestCall: ['getManifestForKread', harden({})], |
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.
Unnecessary nested harden
.
getManifestCall: ['getManifestForKread', harden({})], | |
getManifestCall: ['getManifestForKread', {}], |
But for that matter, this argument is ignored by packages/vats/src/proposals/kread-proposal.js getManifestForKread
anyway and should itself be unnecessary.
getManifestCall: ['getManifestForKread', harden({})], | |
getManifestCall: ['getManifestForKread'], |
// eslint-disable-next-line no-use-before-define | ||
watchForAdminNodeDone(adminNode, instanceAdmin); |
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'd prefer watchForAdminNodeDone
to be part of the watcher for less circularity, but this does work.
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.
It's a separate function because it's called from other places outside the watcher.
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.
Out of scope of for this PR
e01012d
to
cb20dc9
Compare
closes: #8837
Description
Invoke KREAd's revive
Security Considerations
negligible
Scaling Considerations
None
Documentation Considerations
None
Testing Considerations
Needs to be tested. I think doing any KREAd transaction after the upgrade demonstrates success.
Upgrade Considerations
#8714 showed that a Zoe upgrade would break promises that the KREAd contract depends on. We expect
creatorFacet.reviveMarketExitSubscribers();
to reconnect to the relevant promises.