-
Notifications
You must be signed in to change notification settings - Fork 206
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(a3p): create a3p test for replace electorate core eval #10241
base: master
Are you sure you want to change the base?
Conversation
Deploying agoric-sdk with Cloudflare Pages
|
ffce1a7
to
aef84d0
Compare
} from './agoric-tools.js'; | ||
import { waitUntil } from './utils.js'; | ||
|
||
test('new committee should be able to vote', async t => { |
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 suggest splitting this into 2 tests:
- a test for accepting invitations, which is specific to this upgrade, and belongs here in
b:replace...
- a test for making vault parameter changes, which should be tested on every upgrade, so belongs in
z:acceptance
@@ -0,0 +1,5 @@ | |||
export const waitUntil = async waitTime => { |
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.
export const waitUntil = async waitTime => { | |
export const waitUntil = async (waitTime, { setTimeout = globalThis.setTimeout, now = Date.now } = {}) => { |
see
-1, | ||
fromCapData, | ||
); | ||
await waitUntil(latestQuestion.closingRule.deadline); |
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.
await waitUntil(latestQuestion.closingRule.deadline); | |
const { setTimeout } = globalThis; | |
const { now } = Date; | |
await waitUntil(latestQuestion.closingRule.deadline, { setTimeout, now }); |
@@ -0,0 +1,5 @@ | |||
export const waitUntil = async waitTime => { | |||
while (Math.floor(Date.now() / 1000) < waitTime) { |
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.
Why wait repeatedly? Why not just compute the difference between waitTime and now and wait once?
@@ -0,0 +1,5 @@ | |||
export const waitUntil = async waitTime => { | |||
while (Math.floor(Date.now() / 1000) < waitTime) { |
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.
while (Math.floor(Date.now() / 1000) < waitTime) { | |
while (Math.floor(now() / 1000) < waitTime) { |
6a3afcb
to
78581b1
Compare
5082910
to
519de18
Compare
test: wrote tests for new invitation acceptance
chore: rename test title
chore: change order of acceptance
test: fixed issue with invitation acceptance in other packages
chore: fix types in waitUntil
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.
Lots of good stuff here. But the EC changes should take place as part of n:upgrade-next
; see #10258 .
The z:acceptance
stuff could probably land as its own PR. I would expect it to work before or after the change of membership. Hm... maybe that would complicate things.
@@ -0,0 +1,25 @@ | |||
{ | |||
"agoricProposal": { | |||
"type": "/agoric.swingset.CoreEvalProposal", |
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.
IIUC, the plan is no longer to do a separate CoreEvalProposal
.
The EC change should take effect as part of the next SoftwareUpgradeProposal
. See
test: moved a3p tests to upgrade-next
chore: revert price feed change
test: updates to governance in acceptance tests
chore: remove redundant test
fix: updated upgrade.go to handle opts for replaceElectorate proposal
chore: reduce duplication of config
closes: #10138
closes: #10258
Description
A3P tests for the replace electorate core eval. also adds the replace-electorate-core.js script to upgrade.go since it will now be a part of the chain halting upgrade
new tests are as follows:
n:replace-electorate
which tests for acceptance of new invitationsz:acceptance
Security Considerations
Scaling Considerations
Documentation Considerations
Testing Considerations
Upgrade Considerations