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

create vaults and auctions release (proposal 76) #172

Merged
merged 2 commits into from
Sep 10, 2024

Conversation

Chris-Hibbert
Copy link
Contributor

@Chris-Hibbert Chris-Hibbert commented Sep 4, 2024

closes: #171

Description

add tests and assets for the vaults and auctions release agoric-upgrade-16av.

@Chris-Hibbert Chris-Hibbert added enhancement New feature or request test labels Sep 4, 2024
@Chris-Hibbert Chris-Hibbert self-assigned this Sep 4, 2024
@Chris-Hibbert Chris-Hibbert force-pushed the 171-create-VARelease branch 7 times, most recently from 34d84ee to 656e1db Compare September 5, 2024 23:17
@Chris-Hibbert Chris-Hibbert requested a review from dckc September 6, 2024 00:05
@dckc
Copy link
Member

dckc commented Sep 6, 2024

For reference, this PR represents the following mainnet governance decision:

I presume it's ok to tweak the PR title to add (proposal 76).

@dckc dckc changed the title create vaults and auctions release create vaults and auctions release (proposal 76) Sep 6, 2024
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.

much of what I comment on pre-dates this PR, but let's please discuss relying on alleged names for correctness.

I didn't get all the way thru, but I've got a meeting coming up, so I'm sharing this much.

const verifyVaultPriceUpdate = async t => {
const quote = await getVaultPrices(0);

t.true(quote.value[0].amountIn.brand.includes(' ATOM '));
Copy link
Member

Choose a reason for hiding this comment

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

the brand is a string? Is that a result of a name service lookup or just an alleged/debug label? I'll have to check...

Copy link
Member

Choose a reason for hiding this comment

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

I checked. It's an alleged name. something like $4.Alleged ATOM Brand.

Options include:

  • let it slide. I've done too much of that lately.
  • add a comment telling other folks to "do as I say, not as I do" about reliability of alleged names
  • fix it by not throwing the boardIds that serve as clist identities.
  • ... others?

Let's discuss.

Copy link
Member

Choose a reason for hiding this comment

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

Is your concern that the brand may have been forged somewhere in the history of A3P?

Copy link
Member

@dckc dckc Sep 6, 2024

Choose a reason for hiding this comment

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

My concern is that we're testing something that's not part of the API for brands.

Also, this is fragile: in due course, there could be other alleged names that include the same string.

Copy link
Member

Choose a reason for hiding this comment

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

Those would occur after this in history so can't affect this particular test.

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'm okay with #2. A3P is a controlled environment in which there are no adversaries submitting faked names.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We discussed this at the Zoe meeting. The issue here is more about comparing to strings extracted from vstorage without unmarshalling the capData. It seems straightforward for a3p tests to get unmarshalled data. @dckc is investigating.

"runModuleBehaviors": "makeCoreProposalBehavior"
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

This missing newline matches what we built in ci, but I'm not sure it matches what's on chain. See #175

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

"runModuleBehaviors": "makeCoreProposalBehavior"
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

likewise this missing newline

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

packages/synthetic-chain/package.json Outdated Show resolved Hide resolved
Comment on lines 3 to 6
The `assets` for this proposal were generated as part of [creating
the release](https://github.com/Agoric/agoric-sdk/releases/tag/agoric-upgrade-16av).
Copy link
Member

Choose a reason for hiding this comment

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

That might be a useful cross reference, but it's incidental at this point. What's critical is that the assets here match what's in mainnet proposal 76.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Comment on lines +30 to +31
const atomOutPre = await getPriceQuote('ATOM');
t.is(atomOutPre, '+12010000');
Copy link
Member

Choose a reason for hiding this comment

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

getPriceQuote returns unparsed smallcaps, with object references disconnected from their boardIds. This tech debt is growing and growing. Here we compare what's actually an integer to its smallcaps string representation. At least that doesn't throw away info like object references.

I suppose it pre-dates this PR, so separate issue:

Comment on lines 48 to 49
const liveOffer = await getLiveOffers(USER1ADDR);
t.true(liveOffer[0].includes(BID_OFFER_ID));
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const liveOffer = await getLiveOffers(USER1ADDR);
t.true(liveOffer[0].includes(BID_OFFER_ID));
const liveOffers = await getLiveOffers(USER1ADDR);
t.true(liveOffers[0].includes(BID_OFFER_ID));

and why check .includes(BID_OFFER_ID) rather than === BID_OFFER_ID? Does getLiveOffers not return an array of offer ids?

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 don't think it does. I think it's a larger structure I didn't know how to reliably untangle.

Comment on lines +134 to +137
t.log('make new auction');
await checkAuctionVat(t);
Copy link
Member

Choose a reason for hiding this comment

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

Are we actually making a new auction vat here? this whole test runs after the upgrade, yes? Here we might confirm that the auctioneer is new, but we're not making it, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The new auction vat already exists before the test starts.

// TODO(cth) get from synthetic-chain
/** @param {string} vatName */
export const getDetailsMatchingVats = async vatName => {
const fullPath = swingstorePath.replace(/^~/, NonNullish(HOME));
Copy link
Member

Choose a reason for hiding this comment

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

synthetic chain exports a HOME that might be null? strange.

Copy link
Member

Choose a reason for hiding this comment

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

elsewhere I see env.HOME. Why not use env.HOME here as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

export const getDetailsMatchingVats = async vatName => {
const fullPath = swingstorePath.replace(/^~/, NonNullish(HOME));

const db = dbOpenAmbient(fullPath, { readonly: true });
Copy link
Member

Choose a reason for hiding this comment

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

The db should be passed into getDetailsMatchingVats per OCap Discipline. Again, pre-dates this PR, so separate issue:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This copy of getDetailsMatchingVats is here until there's a version published from synthetic-chain.

Please suggest revisions in #174.

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.

Good work

@Chris-Hibbert Chris-Hibbert requested a review from turadg September 9, 2024 18:42
{
"agoricProposal": {
"type": "/agoric.swingset.CoreEvalProposal",
"releaseNotes": "https://github.com/Agoric/agoric-sdk/releases/tag/agoric-upgrade-16av",
Copy link
Member

Choose a reason for hiding this comment

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

the build-proposals job is failing because this trailing comma is invalid JSON.

maybe we should add a "lint" job? it could report if yarn doctor reported or changed anything and also do eslint style linting on files.

Chris-Hibbert and others added 2 commits September 9, 2024 13:47
* chore: automate fetching parts of CoreEval proposal 76

* chore: save complete transaction for proposal 76

* chore: tweak whitespace to match on-chain data

* fixup! chore: automate fetching parts of CoreEval proposal 76
@Chris-Hibbert Chris-Hibbert merged commit 01f675b into main Sep 10, 2024
2 checks passed
@Chris-Hibbert Chris-Hibbert deleted the 171-create-VARelease branch September 10, 2024 00:03
mergify bot added a commit to Agoric/agoric-sdk that referenced this pull request Sep 10, 2024
refs: #9928

## Description

Clean up in a3p-integration, as a follow-up to the vaults&auctions release on mainNet, and [addition of that release to `agoric-3-proposals`](Agoric/agoric-3-proposals#172).

### Security Considerations

N/A

### Scaling Considerations

N/A

### Documentation Considerations

I will add more details of this process to CONTRIBUTING in a-3-p.

### Testing Considerations

keeping things clean so testing can continue.

### Upgrade Considerations

upgrade and iterate!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate agoric-upgrade-16av to agoric-3-proposals
3 participants