-
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
test(fast-usdc): bootstrap test for advancement #10606
Conversation
Deploying agoric-sdk with Cloudflare Pages
|
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'd rather see 3 oracle operators and no makeTestPushInvitation
. What do you think?
const oracles = await Promise.all([ | ||
wd.provideSmartWallet('agoric144rrhh4m09mh7aaffhm6xy223ym76gve2x7y78'), | ||
wd.provideSmartWallet('agoric19d6gnr9fyp6hev4tlrg87zjrzsd5gzr5qlfq2p'), | ||
wd.provideSmartWallet('agoric19uscwxdac6cf6z7d5e26e0jm0lgwstc47cpll8'), | ||
wd.provideSmartWallet('agoric1krunjcqfrf7la48zrvdfeeqtls5r00ep68mzkr'), | ||
wd.provideSmartWallet('agoric1n4fcxsnkxe4gj6e24naec99hzmc4pjfdccy5nj'), |
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 gather we're more likely to have 3 in prod.
Is now a good time to update the builder script?
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.
Might as well... the builder script still has a TODO to determine the real addresses but I just arbitrarily removed two of them for now.
source: 'agoricContract', | ||
instancePath: ['fastUsdc'], | ||
callPipe: [ | ||
['makeTestPushInvitation', [MockCctpTxEvidences.AGORIC_PLUS_DYDX()]], |
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'd like to get rid of makeTestPushInvitation
soon. Is it important to use it here? What are your thoughts on when to stop using it?
I see you're using the real continuing invitation API below.
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.
Removed this test altogether since we check vstorage in the advancement test too now
); | ||
await eventLoopIteration(); | ||
|
||
const usdc = agoricNamesRemotes.vbankAsset.USDC.brand; |
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.
const usdc = agoricNamesRemotes.vbankAsset.USDC.brand; | |
/** @type {Brand<'nat'>} */ | |
const usdc = agoricNamesRemotes.vbankAsset.USDC.brand; |
if necessary, add a @ts-expect-error
here.
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.
Done with as
(since it's a ts file)
}, | ||
proposal: { | ||
give: { | ||
// @ts-expect-error it doesnt recognize usdc as a Brand type |
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 think it's better to fix the type of usdc
where it's defined.
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.
Done
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.
looks good.
}), | ||
), | ||
); | ||
await eventLoopIteration(); |
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.
Worth simulating the acknowledgement from the vtransfer bridge?
await runInbound(
BridgeId.VTRANSFER,
buildVTransferEvent({
...
}),
)
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.
Hmm good point, I think this would happen in a different block, so maybe measure it separately, but should be counted nonetheless. I can follow up with this.
closes: #10388 refs: #10511 ## Description Prune `testBorrow`, `testRepay` methods along with contract tests that depend on them. - Several tests are largely covered by share-pool-math tests - 1 was not, so I made a pool-share-math test to cover _repay succeeds with no Pool or Contract Fee_. - Several tests basically checked the interface guards of `lp.borrower.borrow` / `lp.repayer.repay`. These are internal APIs with static types. - testing consistency between interface guards and static types might have some value, but, I suggest, not enough for the cost ### Scaling / Documentation / Upgrade Considerations none ### Security / Testing Considerations small loss in test coverage - mostly in test redundancy `makeTestPushInvitation` remains on the public facet. Getting rid of it in due course remains critical. I expect / hope we can get rid of it in #10606 (cc @samsiegart ) . Ideally, the liquidity-pool exo would have unit test coverage. I looked into that but found that I would have to build substantial ZCF / Zoe test tooling. Since `liquidity-pool.js` is just 360 lines of straightforward Zoe API usage, I suggest we postpone that under... - #10558
refs #10511
Does not count computrons yet.
This makes 5 oracles submit evidence to provide a realistic scenario for measurement.