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

fix: watch ERTP purse balances across zoe upgrades #8573

Closed
wants to merge 1 commit into from

Conversation

dckc
Copy link
Member

@dckc dckc commented Nov 28, 2023

DRAFT until:

  • test.todo('smartWallet created before upgrade works after');

refs: #8557
provided that lands,
fixes: #8293

Description

This is a port of #8557 from the release branch to master:

observeNotifier(...) would handle upgrade disconnects if the notifiers were durable. But in the @agoric/ertp implementation, they're ephemeral.

So we work around that.

Security / Scaling / Documentation / Testing / Upgrade Considerations

See #8557

Copy link
Contributor

@Chris-Hibbert Chris-Hibbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks fine to me. One question.

packages/boot/test/bootstrapTests/test-wallet-upgrade.js Outdated Show resolved Hide resolved
@dckc dckc marked this pull request as draft November 28, 2023 23:47
@dckc dckc changed the base branch from master to 8445-addWatcher December 4, 2023 17:24
@dckc dckc force-pushed the 8239-port-8557 branch 2 times, most recently from f756c9e to 43355f6 Compare December 4, 2023 23:31
@Chris-Hibbert Chris-Hibbert force-pushed the 8445-addWatcher branch 4 times, most recently from a251233 to 2fd24cd Compare December 6, 2023 23:28
@Chris-Hibbert Chris-Hibbert force-pushed the 8445-addWatcher branch 2 times, most recently from 19bfad6 to cd1c09a Compare December 15, 2023 23:03
@Chris-Hibbert Chris-Hibbert force-pushed the 8445-addWatcher branch 4 times, most recently from 37b4e84 to 5ed5107 Compare January 5, 2024 00:55
Base automatically changed from 8445-addWatcher to master January 5, 2024 01:27
@dckc dckc force-pushed the 8239-port-8557 branch 3 times, most recently from cc1dce2 to 401e87a Compare January 5, 2024 19:59
@dckc dckc marked this pull request as ready for review January 5, 2024 20:00
@dckc dckc marked this pull request as draft January 6, 2024 00:34
@Chris-Hibbert
Copy link
Contributor

On a re-read, I realized that this only addresses newly created smartWallets, and existing ones do not get repaired. Consider hooking into repairWalletForIncarnation2 to get access to existing smartWallets to repair them. I'm going to retract my approval, pending a fix.

observeNotifier() would handle upgrade disconnects if the notifiers
were durable. But in @agoric/ertp, they're ephemeral, so we open-code
the loop.

When the offerWatchers detect an upgrade, they reschedule the
watchers. We needed to ensure the wallet itself doesn't do its cleanup
in that case.

The test updates purse balance across upgrade
  - provision a smartWallet for an oracle operator
  - upgrade zoe; reproduce smartWallet bug
  - check for new invitation
@dckc dckc closed this Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

smartWallet stops updating purse balance on upgrade
2 participants