-
Notifications
You must be signed in to change notification settings - Fork 221
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: After updating vaultFactory params, verify the change #10803
base: master
Are you sure you want to change the base?
Conversation
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.
The assertion introduced in this PR is already covered in the subsequent test case, here.
However, I can understand if you find more appropriate to explicitly verify that the governed parameter was indeed updated in order to pass the economic committee can make governance proposal and vote on it
test case.
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.
a couple thoughts...
t.is( | ||
// @ts-expect-error it's a record | ||
vaultFactoryParamsAfter.current.ChargingPeriod.value, | ||
400n, |
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.
Are we sure it wasn't 400n before?
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.
also: we talked about revising governanceDriver.waitForElection()
to pay attention to which question is relevant.
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.
Are we sure it wasn't 400n before?
I've added a set-up step
also: we talked about revising governanceDriver.waitForElection() to pay attention to which question is relevant.
The governanceDriver remembers the deadline
from proposeParamChange()
, and verifies it in waitForElection()
.
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.
looks good.
1 suggestion (applies 2x). not critical
// @ts-expect-error it's a record | ||
vaultFactoryParamsBefore.current.ChargingPeriod.value === 400n |
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.
Rather than a ts-expect-error
here at the point of usage, I suggest fixing the type at the point of declaration. A ts-expect-error
there may or may not be necessary.
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
// @ts-expect-error it's a record | ||
vaultFactoryParamsAfter.current.ChargingPeriod.value, |
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.
likewise, I suggest fixing the decl of vaultFactoryParamsAfter
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
1907728
to
4f52d8f
Compare
Description
We noticed that after changing params for the VaultFactory, the test verified that the vote had completed, but not that the param change was effective. For a while we suspected that the change didn't take, but a simple enhancement to the test showed that wasn't the case.
Security Considerations
None
Scaling Considerations
None
Documentation Considerations
None
Testing Considerations
Tests should verify the actual changes they make.
Upgrade Considerations
This was one red herring we chased while validating upgrade. A clearer test would have made that chase shorter.