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

Vat upgrade: 14 mintHolders #10410

Closed
9 of 14 tasks
Chris-Hibbert opened this issue Nov 6, 2024 · 2 comments · Fixed by #10617
Closed
9 of 14 tasks

Vat upgrade: 14 mintHolders #10410

Chris-Hibbert opened this issue Nov 6, 2024 · 2 comments · Fixed by #10617
Assignees
Labels
contract-upgrade enhancement New feature or request ERTP package: ERTP

Comments

@Chris-Hibbert
Copy link
Contributor

Chris-Hibbert commented Nov 6, 2024

What is the Problem Being Solved?

As mentioned in #8158, we need the ability to restart or replace all vats. This issue is concerned with upgrading the 14 existing mintHolder contracts.

Description of the Design

The source code is mintHolder.js. These are not Zoe contracts. upgrade-vats.test.ts shows that They are upgradeable, though it doesn't test functionality. We should upgrade a mintHolder in a3p-integration and show that it continues to function correctly.

  • v13: BLD
  • v16: ATOM
  • v17: USDC_axl
  • v18: USDC_grv
  • v19: USDT_axl
  • v20: USDT_grv
  • v21: DAI_axl
  • v22: DAI_grv
  • v66: stATOM
  • v71: USDC
  • v72: USDT
  • v96: stOSMO
  • v102: stTIA
  • v109: stkATOM

We should upgrade a few at first, and more over time.

Security Considerations

mintHolders are the foundation for a lot of assets on our chain.

Scaling Considerations

Not significant. Measurements haven't shown any indication of problems.

Test Plan

As above. test in a3p-integration.

Upgrade Considerations

As above. Don't upgrade them all at once.

@anilhelvaci
Copy link
Collaborator

@Chris-Hibbert says "pick a number of vats and upgrade them, no need to upgrade all"

@Chris-Hibbert
Copy link
Contributor Author

That was intended to be pick a number of vats and upgrade them in upgrade 19, and leave the rest for upgrade 20."

mergify bot added a commit that referenced this issue Dec 12, 2024
#10617)

closes: #10410 

## Description


This pull request intends to ensure that the mintHolder contract continues to function as expected after a null upgrade. 

Key Changes:
- A new `core-eval` was built, which acordingly to the agoric chain variant, will select a list of vbankAsset and execute a null upgrade to the respective mintHolder contract of each suitable asset.
- A new acceptance test, `mintHolder.test.js`, has been added to the a3p-integration to verify the core-eval behaviour.

MintHolder Test Plan:
   - Provision a receiver wallet with the respective assets
   - Confirm the initial balance matches expectations
   - Perform a null upgrade for the mintHolder contracts
   - Execute a core-eval to:
         - Mint a payment for each selected asset
   	- Deposit the payment into the receiver's depositFacet
   - Verify that the balance has increased by the expected amount
   - Execute a PSM swap for selected assets with IST


### Security Considerations


The execution of `mintHolder.test.js` had to be done prior to the `./genesis-test.sh` acceptance test. Otherwise it would trigger the error `bundle ${id} not loaded` during the `evalBundle` call.
See this issue for more detail: #10620 

### Scaling Considerations


This PR does not introduce any change to the mintHolder source code, or how it is being consumed. For this reason that are no scaling considerations to be made.

### Documentation Considerations


### Testing Considerations


The implemented test design is expecting to have a core-eval for each mintHolder being updated.
If desired, this could be refactored to have a single core-eval executing a null upgrade to a predefined list of assets.
The second approach has the advantage of reducing the number of files being created, although it may hinder the testing flexibility.

Which approach is more desirable?

### Upgrade Considerations
@mergify mergify bot closed this as completed in #10617 Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contract-upgrade enhancement New feature or request ERTP package: ERTP
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants