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

in upgrade-14, Zoe doesn't record new bundleCap when contracts are upgraded #9249

Closed
Chris-Hibbert opened this issue Apr 17, 2024 · 5 comments
Labels
bug Something isn't working contract-upgrade Zoe package: Zoe

Comments

@Chris-Hibbert
Copy link
Contributor

Describe the bug

When a contract is upgraded, Zoe should remember the bundleCap, so that E(adminFacet).restartContract(privateArgs); will get the new bundle.

This was identified while testing upgrades in #8911, and a fix is included there that has been merged to master. This fix was not included in upgrade 14, so contracts have to be upgraded using E(adminFacet).upgradeContract(), which requires specifying the bundle.

To Reproduce

#9204 was blocked on this. probeZcfBundle.js upgrades walletFactory twice, and uses restartContract the second time

Expected behavior

If Zoe does state.contractBundleCap = newContractBundleCap; as in #8911, restartContract() will re-use the most recent bundle.

@Chris-Hibbert Chris-Hibbert added bug Something isn't working Zoe package: Zoe contract-upgrade labels Apr 17, 2024
@Chris-Hibbert Chris-Hibbert assigned mhofman and unassigned mhofman Apr 17, 2024
@Chris-Hibbert
Copy link
Contributor Author

Chris-Hibbert commented Apr 17, 2024

As long as this hasn't been merged into MainNet, we have to remember that contract upgrades don't record the new bundleCap, so restartContract() will revert to an earlier version. The earlier we can get the fix merged, the better.

@mhofman
Copy link
Member

mhofman commented Apr 17, 2024

We should likely include this in a chain software upgrade sooner rather than later since any contracts upgraded before this is deployed will not have their bundleID remembered, and will try to revert the originally installed bundle when doing a restartContract. Maybe in upgrade-16?

We do need to run the repair KREAd step along side this as it requires a Zoe upgrade.

@mhofman
Copy link
Member

mhofman commented Apr 17, 2024

As long as this hasn't been merged to master, we have to remember that contract upgrades don't record the new bundleCap, so restartContract() will revert to an earlier version. The earlier we can get the fix merged, the better.

s/merged to master/included in a release/ ?

@Chris-Hibbert
Copy link
Contributor Author

s/merged to master/included in a release/ ?
corrected. thanks.

mergify bot added a commit that referenced this issue Jun 22, 2024
## Description
- Upgrades Zoe and repair KREAd
  - KREAd proposal and tests are a port from the release branch version used during upgrade 14
- restores the old probe zcf test behavior now that #9249 was fixed in u15
- Includes #9536

### Security Considerations
None

### Scaling Considerations
None

### Documentation Considerations
None

### Testing Considerations
Restores previously disabled or omited tests

### Upgrade Considerations
Change to core proposal in the next software upgrade (upgrade 16)
mhofman pushed a commit that referenced this issue Jun 22, 2024
## Description
- Upgrades Zoe and repair KREAd
  - KREAd proposal and tests are a port from the release branch version used during upgrade 14
- restores the old probe zcf test behavior now that #9249 was fixed in u15
- Includes #9536

### Security Considerations
None

### Scaling Considerations
None

### Documentation Considerations
None

### Testing Considerations
Restores previously disabled or omited tests

### Upgrade Considerations
Change to core proposal in the next software upgrade (upgrade 16)
@Chris-Hibbert
Copy link
Contributor Author

Fixed (as a drive-by) in #8911, and pushed to master with upgrade 16.

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 Zoe package: Zoe
Projects
None yet
Development

No branches or pull requests

2 participants