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

Add a coreEval for vaults auctions and test in a3p #9911

Merged
merged 11 commits into from
Aug 19, 2024

Conversation

Chris-Hibbert
Copy link
Contributor

closes: #9887

Description

Create a coreEval that replaces the Auctions contract, and upgrades VaultFactory.

Security Considerations

No security-relevant changes.

Scaling Considerations

Doesn't make things better or worse.

Documentation Considerations

N/A

Testing Considerations

Includes a test in a3p-integration that shows that there's a new auction, that vaultFactory upgrades, that new bids submitted go to the new auction, and that the upgraded vaults respond to price updates.

Upgrade Considerations

Upgrade is tested.

@Chris-Hibbert Chris-Hibbert self-assigned this Aug 17, 2024
Copy link

cloudflare-workers-and-pages bot commented Aug 17, 2024

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: de3b258
Status: ✅  Deploy successful!
Preview URL: https://72d80c9a.agoric-sdk.pages.dev
Branch Preview URL: https://9887-vaults-auctions-coreeva.agoric-sdk.pages.dev

View logs

@Chris-Hibbert Chris-Hibbert force-pushed the 9887-vaults-auctions-coreEval branch from e410284 to 7fe9b42 Compare August 17, 2024 00:45
@Chris-Hibbert Chris-Hibbert requested review from turadg and dckc August 17, 2024 01:01
Copy link
Member

Choose a reason for hiding this comment

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

I was surprised to see a:upgrade-next delayed, but it makes sense. Master needs to stage several CoreEvals that must be tested on top of u16, not the next upgrade.

So we don't have to move upgrade-next around each time we enter and leave such a situation, let's give it a durable id. e allows for four coreEvals before it, but we have a lot of letters in the alphabet. I suggest n:upgrade-next because it's half-way through the alphabet and n is a mnemonic for "next"

Copy link
Member

Choose a reason for hiding this comment

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

i'm a little concerned at how much we're copying this around, but I think it can be solved better once it's in the agoric-3-proposals repo. That makes it easier to refactor between proposals and the @agoric/synthetic-chain lib, also in the repo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I'll migrate the stable parts to synthetic-chain.

a3p-integration/proposals/a:vaults-auctions/agd-tools.js Outdated Show resolved Hide resolved
a3p-integration/proposals/a:vaults-auctions/test.sh Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

why is this waiting for the next upgrade instead of happening in a CoreEval?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should be part of whatever upgrade/CoreEval updates the priceFeeds. Should I create a dedicated directory for that?

Moving it to upgrade-next with the rest of what was there seemed like the default choice, saying the least about where it should actually end up. In order to move it to another directory, I'd feel obligated to fill that directory out more, which seems more unrelated to this PR's goals.

@@ -29,132 +25,6 @@ func isFirstTimeUpgradeOfThisVersion(app *GaiaApp, ctx sdk.Context) bool {
return true
}

// upgradePriceFeedCoreProposalSteps returns the core proposal steps for the
Copy link
Member

Choose a reason for hiding this comment

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

why are all these Golang changes necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wouldn't say "necessary". How about "beneficial"?

They were in upgrade.go because we thought upgrading vaults/auctions/priceFeeds was a package deal. Now that we've split them apart, it's not clear when we'll get to priceFeeds, or whether it'll be a coreEval or SoftwareUpgrade.

I think removing this code makes it easier for whoever works on the next Upgrade to put together a clean set of changes.

I can move the cleanup to a separate PR if you would prefer that.

Copy link
Member

Choose a reason for hiding this comment

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

Ah that makes sense to me.

@@ -143,6 +152,8 @@ export const addAuction = async ({
);
// don't overwrite auctioneerKit or auction instance yet. Wait until
// upgrade-vault.js

auctionsDone.resolve(true);
Copy link
Member

Choose a reason for hiding this comment

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

is there no other way to indicate this than this boolean in promise space?

if it must be in this somewhat global space please give it a more specific name. Maybe by a general pattern we can use to know a value is one-off. E.g. didAuctionsOverUpgrade16

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A resolved value in the promise space seems like the ideal solution. I didn't look for other possibilities. What would you like to improve about it?

Would removing it once it has served its purpose resolve your concerns?

Copy link
Member

Choose a reason for hiding this comment

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

Would removing it once it has served its purpose resolve your concerns?

Yes!

The new name is sufficient until we have another auctions upgrade

Copy link
Member

@turadg turadg left a comment

Choose a reason for hiding this comment

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

Blocking concerns have been addressed.

Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

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

I thought I had a minor comment, but now I can't find the relevant code.

This seems plausible.

@Chris-Hibbert Chris-Hibbert added contract-upgrade Vaults VaultFactor (née Treasury) auction automerge:rebase Automatically rebase updates, then merge labels Aug 19, 2024
@Chris-Hibbert Chris-Hibbert force-pushed the 9887-vaults-auctions-coreEval branch 2 times, most recently from 8f15cb0 to 028f710 Compare August 19, 2024 20:16
@Chris-Hibbert Chris-Hibbert force-pushed the 9887-vaults-auctions-coreEval branch from 028f710 to 9ce0c22 Compare August 19, 2024 20:18
@mergify mergify bot merged commit aaa0def into master Aug 19, 2024
80 checks passed
@mergify mergify bot deleted the 9887-vaults-auctions-coreEval branch August 19, 2024 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auction automerge:rebase Automatically rebase updates, then merge contract-upgrade Vaults VaultFactor (née Treasury)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade vaults and auctions with a coreEval
3 participants