-
Notifications
You must be signed in to change notification settings - Fork 212
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
feat(fast-usdc): core-eval to change fastUsdc.feedPolicy #10609
Conversation
I don't get this ci error:
It's complaining about the 1st import from fast-usdc, but it thinks the 2nd one is just fine: import { configurations } from '@agoric/fast-usdc/src/utils/deploy-config.js';
import { MockCctpTxEvidences } from '@agoric/fast-usdc/test/fixtures.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Deploying agoric-sdk with Cloudflare Pages
|
USDC: await E(USDCissuer).getBrand(), | ||
}); | ||
const { feedPolicy } = fromExternalConfig( | ||
config?.options, // just in case config is missing somehow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't that be an error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, but this way, we get a pattern mismatch diagnostic instead of a "can't get .options property of undefined" error.
It's evidently not worth the bother, though. taking it out.
@@ -252,6 +278,16 @@ export default async (homeP, endowments) => { | |||
return JSON.parse(feedPolicy); | |||
}; | |||
|
|||
if (update) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't really a concern of init fast-usdc, right?
Please have a separate script or include a comment here and at the top explaining why not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could rename it to fast-usdc.builder.js
.
I'll try a separate script first to see how much code duplication there is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
init is a misnomer anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
separate script is ~60 lines... about half is duplicated. Not so much that it's worth coupling the two purposes.
631f763
to
9c11a05
Compare
- use deploy config from fast-usdc package
9c11a05
to
8ded3d8
Compare
closes: #10507
Description
Testing Considerations
1 happy-path test:
Aside from option parsing in the builder, validation with patterns makes for essentially straight-line code.
Security / Documentation Considerations
The whole feedPolicy, for all chains, is updated at once. If the goal is to change a property for just 1 chain, it's important to keep the properties in tact for all the other chains.
Scaling Considerations
none
Upgrade Considerations
There has been some discussion of versions for
feedPolicy
. This PR doesn't add anything in that area. The block height of the vstorage write can be used as one form of version number, though that isn't available to the contract, so it wouldn't let the contract detect OCW reports based on outdated policies.