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

verify by end-to-end test a contract on-chain can be upgraded #6099

Closed
Tracked by #7491
Chris-Hibbert opened this issue Aug 31, 2022 · 8 comments · Fixed by #7691
Closed
Tracked by #7491

verify by end-to-end test a contract on-chain can be upgraded #6099

Chris-Hibbert opened this issue Aug 31, 2022 · 8 comments · Fixed by #7691
Assignees
Labels
enhancement New feature or request Inter-protocol Overarching Inter Protocol vaults_triage DO NOT USE

Comments

@Chris-Hibbert
Copy link
Contributor

Chris-Hibbert commented Aug 31, 2022

What is the Problem Being Solved?

After the bulldozer, the only way to upgrade contracts will be through the AdminFacet's upgradeContract(). We don't have experience yet executing that in a live chain.

Description of the Design

A chain integration test that does the following:

  • bundle and install a buggy contract via a proposal
  • use a smart wallet to demonstrate the bug
  • bundle and upgrade to a contract that preserves the buggy one's state but fixes the bug
  • use a smart wallet to demonstrate that the state is preserved and the bug is fixed

Security Considerations

The relevant security here is the feeling of confidence that we can do something about it if a problem is discovered in a contract on a live chain.

Test Plan

Demonstrate one contract being upgraded on a running chain.

@dckc
Copy link
Member

dckc commented Sep 2, 2022

@kriskowal help me try agoric bundle and agoric publish on ollinet, please?

@kriskowal
Copy link
Member

@kriskowal help me try agoric bundle and agoric publish on ollinet, please?

I’ll implement them right away #6087

@dckc
Copy link
Member

dckc commented Sep 3, 2022

needs #5460 ; currently agd query vstorage children published doesn't include installation.

@kriskowal
Copy link
Member

I’ve made a first attempt to upgrade PSM and encountered an error in upgradeContract behavior #6207

@Tartuffo
Copy link
Contributor

Moving this out of the critical path for the PSM-First launch. We can side-grade the PSM to a new contract:

  1. Turn off the offer sides of the old PSM contact
  2. Stand up a new PSM contract
  3. Use JS Hammer to:
    a. mint a bunch of IST
    b. buy the USDC from the old contract
    c. put the USDC in a new PSM
    d. burn the bunch of IST
  4. Tear down the old contract

@dckc
Copy link
Member

dckc commented Sep 15, 2022

we also have a couple other options:

@turadg
Copy link
Member

turadg commented Apr 20, 2023

@dckc going to take this on because @kriskowal is out. I'm taking on a dependency,

@turadg turadg assigned turadg and unassigned kriskowal Apr 20, 2023
@turadg turadg changed the title Verify upgradability of PSM make PSM upgradable Apr 20, 2023
@turadg turadg assigned dckc and unassigned turadg Apr 20, 2023
@turadg turadg changed the title make PSM upgradable verify by end-to-test that contracts on-chain can be upgraded Apr 20, 2023
@turadg turadg changed the title verify by end-to-test that contracts on-chain can be upgraded verify by end-to-test a contract on-chain can be upgraded Apr 24, 2023
@ivanlei ivanlei modified the milestones: Vaults EVP, Vaults Validation Apr 28, 2023
@ivanlei ivanlei assigned michaelfig and unassigned dckc May 11, 2023
@michaelfig michaelfig changed the title verify by end-to-test a contract on-chain can be upgraded verify by end-to-end test a contract on-chain can be upgraded May 11, 2023
@Tartuffo
Copy link
Contributor

Congrats everyone! This is a major accomplishment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Inter-protocol Overarching Inter Protocol vaults_triage DO NOT USE
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants