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

chore(fast-usdc): update, test chain policies vs. spreadsheet #11055

Merged
merged 8 commits into from
Feb 28, 2025

Conversation

dckc
Copy link
Member

@dckc dckc commented Feb 26, 2025

Description

Data from a requirements-gathering spreadsheet are turned into a test that shows that the MAINNET chain policies needed adjustment.

  • chore(fast-usdc): update, test chain policies vs. spreadsheet
  • feat(fast-usdc): update FeedPolicy along with Noble ICA
    • refactor(fast-usdc): export feedPolicies.MAINNET in vat code
    • docs(fast-usdc): FeedPolicy is no longer JSON serializable

Security Considerations

The values in a ChainPolicy express a balance of risk tolerance vs. speed etc.

export interface ChainPolicy {

Scaling Considerations

none

Documentation Considerations

  • End users will likely only see a condensed version of these values ("ETA: 1 min").
  • The values impact risks taken by liquidity providers.
  • BLD stakers have an interested in the balance between speed and risk tolerance.
  • for node operators: docs(fast-usdc): DON'T PANIC re "CORE_EVAL failed"

Testing Considerations

  • test(boot): snapshot GTM Fast USDC feed policy
  • test(a3p): fastUsdc.feedPolicy updated for GTM
    • test(a3p): gtm-fast-usdc

Upgrade Considerations

should be deployed as part of the fix for #11013

Copy link

cloudflare-workers-and-pages bot commented Feb 26, 2025

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5469f90
Status: ✅  Deploy successful!
Preview URL: https://1aaefbbf.agoric-sdk.pages.dev
Branch Preview URL: https://dc-fu-policy-check.agoric-sdk.pages.dev

View logs

@dckc dckc force-pushed the dc-fu-policy-check branch from d0e4d8c to e677e98 Compare February 26, 2025 17:09
@dckc dckc force-pushed the dc-fu-policy-check branch 2 times, most recently from ab8149d to 4cab2bf Compare February 28, 2025 18:06
@dckc dckc marked this pull request as ready for review February 28, 2025 18:12
@dckc dckc requested a review from a team as a code owner February 28, 2025 18:12
@dckc dckc requested a review from AgoricTriage February 28, 2025 18:12
@dckc dckc force-pushed the dc-fu-policy-check branch from 4cab2bf to 96fdf1a Compare February 28, 2025 22:18
@dckc dckc requested review from turadg and 0xpatrickdev February 28, 2025 22:18
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.

Approving conditional on removing the test.skip and improving the Money type

@@ -241,7 +241,7 @@ test.serial(
},
);

test.serial('writes feed policy to vstorage', async t => {
test.skip('writes Beta feed policy to vstorage', async t => {
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't we remove them now that beta is out?

Copy link
Member Author

Choose a reason for hiding this comment

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

ok.

I guess I wanted some feedback on whether to keep testing the old stuff. Thanks.

/**
* @type {TypedPattern<FeedPolicy>}
*
* Should be JSON serializable so CLI can specify policy. E.g. no bigint,
Copy link
Member

Choose a reason for hiding this comment

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

IIUC bigint is the only part that can't be JSON.

consider keeping this comment and saying "must by CopyData"

const upgraded = await E(adminFacet).upgradeContract(
fastUsdcCode.bundleID,
privateArgs,
);
trace(upgraded);
trace(`DON'T PANIC if you see "CORE_EVAL failed" from v1 above. See #11013`);
Copy link
Member

Choose a reason for hiding this comment

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

thoughtful

import { ChainPolicies } from '../../src/utils/chain-policies.js';
import { type ChainPolicy } from '../../src/types.js';

/** Spreadsheet header becomes a tuple type with column names used as tags */
Copy link
Member

Choose a reason for hiding this comment

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

good trail. I won't have the spreadsheet so I'll assume you transcribed the values correctly.

['Polygon', 2, 12, '$50,000', 60, '$20,000'],
];

type Money = string;
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
type Money = string;
type Dollars = `${string}`;

@dckc dckc added the automerge:rebase Automatically rebase updates, then merge label Feb 28, 2025
@dckc dckc force-pushed the dc-fu-policy-check branch from f20e3c9 to 7150132 Compare February 28, 2025 22:53
@dckc dckc force-pushed the dc-fu-policy-check branch from 7150132 to 5469f90 Compare February 28, 2025 22:56
@mergify mergify bot merged commit 545fc58 into master Feb 28, 2025
84 checks passed
@mergify mergify bot deleted the dc-fu-policy-check branch February 28, 2025 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants