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

test that restarting v43-wallet will re-subscribe to v14-bank asset subscriptions #8725

Closed
warner opened this issue Jan 9, 2024 · 2 comments
Assignees
Labels

Comments

@warner
Copy link
Member

warner commented Jan 9, 2024

As part of #8499 (look for v14-bank-v28-provisionpool, the second section), we investigate how v43-wallet will react when it is upgraded, specifically with respect to the promises that it follows from v14-bank. These promises appear in v43-wallet in makeAssetRegistry() when it calls E(poolBank).getAssetSubscription(). This code uses observeIteration (which tolerates the decider getting upgraded/restarted), however it doesn't use a DurablePromiseWatcher, so our concern is what happens when the subscriber (v43-wallet) is upgraded/restarted.

This code is called from a prepare method, which provides evidence thaht it will be called each time v43-wallet is restarted. If so, we're good. If not, the new version of the vat might not correctly follow new assets created after upgrade.

We've already restarted v43-wallet once, in gov-49 (which activated 21-Sep-2023). I don't know if we've added any assets since then.

The task for this ticket is to test this case, ideally through a3p or some reproducible mechanism, and demonstrate that:

  • 1: the new version of v43-wallet calls getAssetSubscription()
  • 2: the upgraded wallet vat correctly reacts to new assets being announced by v14-bank
@dckc
Copy link
Member

dckc commented Jan 11, 2024

restarting v43-wallet has happened on mainnet, in proposal 49.
https://github.com/Agoric/agoric-3-proposals/tree/main/proposals/49%3Asmart-wallet-nft

and it evidently did subscribe to new vbank assets, cuz stATOM was added later in proposal 55
https://github.com/Agoric/agoric-3-proposals/tree/main/proposals/55%3Astatom-vaults

So we have an a3p test of this already.

It's reasonably straightforward to see how this happened:

  • restarting the contract invokes the start function (called prepare in this case)
  • prepare calls makeAssetRegistry
  • makeAssetRegistry calls E(assetPublisher).getAssetSubscription()

@dckc
Copy link
Member

dckc commented Jan 11, 2024

@Chris-Hibbert concurs that we've addressed this

@dckc dckc closed this as completed Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants