-
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: update auction in agoricNames, test that the boardId changed #9970
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.
looks good
a couple notes for future reference...
t.true( | ||
newAuctionInstance !== oldInstance, |
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.
Probably not worth a re-spin for this alone, but for future ref:
If you use t.not
, ava will show the 2 values when the assertion fails.
t.true( | |
newAuctionInstance !== oldInstance, | |
t.not(newAuctionInstance, | |
oldInstance, |
auctionInstance.reset(); | ||
await auctionInstance.resolve(governedInstance); | ||
// belt and suspenders; the above is supposed to also do this | ||
await E(E(agoricNamesAdmin).lookupAdmin('instance')).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.
agoricNamesAdmin
is a big hammer; it's unfortunate that resolve()
alone didn't do the trick.
here's hoping for some later convenient time to figure out 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.
the comment reads "belt-and-suspenders" as if the belt sometimes works. Does it 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 haven't found the code that "is supposed to", so I don't know what it's trying to save, or what the corner cases might be. What code in promiseSpace is supposed to treat instances specially? Or what else updates agoricNames for instances?
The docker test failed wtih |
I don't think it's a flake. I think the econCommitteeCharter has to be introduced to the new auctioneer.
|
Deploying agoric-sdk with Cloudflare Pages
|
Oops. It looks like you added your commit, and then I merge it again. I hope that was idempotent. I marked it for |
ed7f1e6
to
87b945d
Compare
@@ -201,3 +201,18 @@ export const getProvisionPoolMetrics = async () => { | |||
const path = `published.provisionPool.metrics`; | |||
return getQuoteBody(path); | |||
}; | |||
|
|||
export const getAuctionInstance = async price => { |
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.
not really an "agd tool". Also would be more general with a little tweak:
export const getAuctionInstance = async price => { | |
export const getInstanceBoardId = async instanceName => { |
(price
isn't used)
Not a blocker for this repo but in synthetic-chain package it should be designed for re-use.
# we have an eval.sh so we can run prepare.sh before the rest | ||
|
||
echo "[$PROPOSAL] Running prepare.sh" | ||
./prepare.sh |
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.
prepare
is for chain-halting upgrade proposals. There should be no prepare.sh
in a CoreEvalProposal.
Please remove the indirection:
# we have an eval.sh so we can run prepare.sh before the rest | |
echo "[$PROPOSAL] Running prepare.sh" | |
./prepare.sh | |
./saveAuctionInstance.js |
@@ -4,3 +4,5 @@ | |||
# actions are executed in the upgraded chain software and the effects are | |||
# persisted in the generated image for the upgrade, so they can be used in | |||
# later steps, such as the "test" step, or further proposal layers. | |||
|
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.
another reason to remove this file is it says it's for after the proposal is executed but you're running it as part of the eval
console.log('old auction instance ', oldAuctionInstance, env.HOME); | ||
|
||
await writeFile( | ||
`${env.HOME}/.agoric/previousInstance.json`, |
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 file is part of the permanent history a3p. please give it a more informative name for someone who comes across it without this context. or delete it after it's read.
also in general I think f a3p is writing to this directory it should be under a sub-path
auctionInstance.reset(); | ||
await auctionInstance.resolve(governedInstance); | ||
// belt and suspenders; the above is supposed to also do this | ||
await E(E(agoricNamesAdmin).lookupAdmin('instance')).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.
the comment reads "belt-and-suspenders" as if the belt sometimes works. Does it not?
closes: #9963
Description
The upgrade of auctions neglected to replace the agoricNames binding for the auction instance. This fixes that and tests that the boardId is different before and after the coreEval.
Security Considerations
scary that we got that far through validation without noticing that the auction hadn't been updated in agoricNames.
Scaling Considerations
None.
Documentation Considerations
None.