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

smartWallet stops updating purse balance on upgrade #8293

Closed
3 of 7 tasks
dckc opened this issue Aug 31, 2023 · 5 comments
Closed
3 of 7 tasks

smartWallet stops updating purse balance on upgrade #8293

dckc opened this issue Aug 31, 2023 · 5 comments
Assignees
Labels
bug Something isn't working contract-upgrade wallet

Comments

@dckc
Copy link
Member

dckc commented Aug 31, 2023

Describe the bug

The wallet gets a balance-updates notifier from the Purses it manages, and it correctly uses observeNotifier to follow them. Zoe hosts Issuers for IST and for invitations. The ERTP Issuer code uses transientNotifier.js to produce the balance-update notifiers. So when v9-zoe is upgraded, v43-walletFactory will see the rejected/disconnected upgrade promise, correctly go back to the notifier to get a new promise, but that notifier will be dead, and observeNotifier has no further fallbacks it can make, so the wallet will stop updating chain-storage with user balances of IST (and maybe contract invitations that it already knows about). We think either the wallet needs to react to this by asking the Purse for a new (still-merely-virtual) notifier (effectively a third-level fallback), or ERTP needs to be changed to offer durable notifiers instead of merely-virtual ones (and Zoe needs to use them, if we don't make that mode the default).

This affects any non-vbank issuer/purse.

To Reproduce

  1. provision a smartWallet for an oracle operator
  2. upgrade zoe
  3. send a new invitation to the operator
  4. oracle operator is not notified of new invitation

Expected behavior

notifications happen after zoe is upgraded

Design / Plan

Platform Environment

mainnet1B

Additional context

from the #8245 investigation with @warner:

@dckc
Copy link
Member Author

dckc commented Nov 21, 2023

For a fix for this issue, what branch should it be based on? @warner ?

@dckc
Copy link
Member Author

dckc commented Dec 4, 2023

I added a checklist / plan to the description:

I worked with @0xpatrickdev to capture the bug in a test on 21 Nov. MFig and I diagnosed it around Nov 27. I added a fix around Nov 27 and requested review. MH's review showed that the fix for when zoe is upgraded is not independent of work to address problems when walletFactory is upgraded (#8488).

Meanwhile, I asked for clarity about whether this work should target master or the release branch (#8565); then answer is: both.

So even though review of #8488 isn't done, I suppose I should start working on that branch. Then after #8488 lands, we can land #8557 . And then we can land the version on the release branch (#8573) ... by way of the dev-upgrade-wallet-factory-2 branch started in #8593.

@dckc dckc changed the title smartWallet stops updating purse balance when issuer (zoe, ...) is upgraded smartWallet stops updating purse balance on upgrade Jan 5, 2024
@dckc dckc assigned Chris-Hibbert and unassigned dckc Jan 8, 2024
@dckc
Copy link
Member Author

dckc commented Jan 8, 2024

@Chris-Hibbert has kindly agreed to help with this.

@mhofman
Copy link
Member

mhofman commented Jan 24, 2024

@Chris-Hibbert is this fixed with #8773 & #8775 ?

Edit: nvm I see it's waiting for the #8787 tests

@aj-agoric
Copy link

Moving to done as @Chris-Hibbert mentioned this was in the release branch and sufficiently tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working contract-upgrade wallet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants