-
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
7562 proposal restart #7660
7562 proposal restart #7660
Conversation
a73a40c
to
9a5f69b
Compare
e0a2711
to
ca27439
Compare
75688b9
to
ce2ed6c
Compare
8cede85
to
9476ac7
Compare
9476ac7
to
d87e470
Compare
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.
we agreed to rework diagnostics a bit
'economicCommittee', | ||
); | ||
const { creatorFacet, instance } = startResult; | ||
|
||
economicCommitteeKit.resolve(startResult); | ||
economicCommitteeKit.resolve( | ||
// XXX should startInstance return its label? |
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 can see it both ways
M.remotable('prioritySenders manager'), | ||
M.null(), | ||
), | ||
// only necessary on first invocation, not subsequent |
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.
interesting pattern, this
economicCommitteeCreatorFacet, | ||
highPrioritySendersManager, | ||
}, | ||
consume: { namesByAddressAdmin, economicCommitteeCreatorFacet, ...consume }, |
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.
FWIW, I typically leave a comment mentioning things like highPrioritySendersManager
that are consumed in the function body, to make aid in keeping consistency with the permit.
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 figure the permit is the SOT so if this strays it will fail quickly
@@ -59,6 +59,7 @@ const SHARED_MAIN_MANIFEST = harden({ | |||
consume: { | |||
board: 'board', | |||
chainStorage: true, | |||
diagnostics: true, |
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 name diagnostics
suggests it's innocuous, but it includes all sorts of private args. Let's talk about that.
|
||
trace('awaiting startInstance'); | ||
const faKit = await E(startGovernedUpgradable)({ | ||
governedParams: {}, | ||
privateArgs: { | ||
highPrioritySendersManager, | ||
highPrioritySendersManager: await highPrioritySendersManager, |
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 passes lint? wild.
const instancePA = await E.get(diagnostics).instancePrivateArgs; | ||
instancePA.set(kit.instance, privateArgs); | ||
instancePA.set(kit.governor, { | ||
economicCommitteeCreatorFacet: await economicCommitteeCreatorFacet, |
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.
is lint ok with that? (again)
|
||
const trace = makeTracer('RV'); | ||
|
||
const HR = '----------------'; |
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.
flashback to 1991 libwww code :)
* @param {ERef<AdminFacet>} adminFacet | ||
*/ | ||
const tryRestart = async (debugName, instance, adminFacet) => { | ||
// TODO document that privateArgs cannot contain promises |
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.
good idea...
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 debugName = | ||
kit.label || getInterfaceOf(kit.publicFacet) || 'UNLABELED'; | ||
if (debugName !== kit.label) { | ||
console.warn('MISSING LABEL:', kit); |
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.
ouch. that looks like tracking down labels was more trouble than I expected.
} | ||
}; | ||
|
||
// iterate over the two contractKits and use the adminFacet to restartContract |
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.
two? we don't need psmKit
here too? getting the psmKit stuff into governedContractKits looked like it was still TODO.
(I'm only reviewing this PR for regressions, so it's not critical to landing this, but seems like an omission)
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 is describing the behavior. the TODO about including psmKits is up top
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.
👍
produce.diagnostics.resolve({ savePrivateArgs }); | ||
produce.instancePrivateArgs.resolve(instancePrivateArgs); |
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 wasn't caught in the upgrade test because it set only required privateArgs
1caba60
to
a7bb903
Compare
Description
Part of #7562
A new CORE_EVAL proposal to restart all contracts that should be. It's called "restart-vats" because it will restart all vats that should be, but it doesn't do that yet. I'm going to stack that work on top of this PR to get this landed.
Security Considerations
The
privateArgs
used in some contract starts in bootstrap are saved in bootstrap.Scaling Considerations
--
Documentation Considerations
No API changes.
Testing Considerations
The proposal will run in testnet. A new bootstrap test runs it in CI.