-
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
chore: prune non-upgradeable network vats from production config #7165
Conversation
- confine ambient authority to test set-up region - fix some static typing
- update boot-psm.js now that manifest.js is gone - move BootstrapManifest type to lib-boot.js chore(vats): reorg boot-chain, chain-behaviors - restore test-boot.js tests - static types for test-boot.js and boot-*.js - prune argvByRole - no more export * - lib-boot: early check for missing behavior - basic-behaviors.js: - organize imports a bit - all behaviors return Promise<void> use await rather than return - export BASIC_BOOTSTRAP_PERMITS - boot-chain.js: - destructure non-behaviors out of import * - hoist modules - chain-behaviors: factor BASIC_BOOTSTRAP_PERMITS out of SHARED_CHAIN_BOOTSTRAP_MANIFEST
With an empty `modules` bootstrap power, `Cannot read properties of undefined (reading 'runModuleBehaviors')` ... was thrown in the code generated by makeWriteCoreProposal() in code-gen.js The initial symptoms were pretty obscure: ``` KERNEL PANIC: kp40.policy panic: rejected {"body":"#{\"#error\":\"behavior: cannot coerce undefined to object\" ``` These debug settings gave us a useful stack trace: `packages/solo/test$ DEBUG=SwingSet:ls,SwingSet:vat,track-turns ./startsolo.sh` The offending line is referring to `runModuleBehaviors` as a module global. So `Cannot read properties of undefined` seems to be SES-shim-speak for "Reference Error".
Patterned after devnet config, but uses boot-sim.js bootstrap vat. ```diff $ diff -wu ./decentral-devnet-config.json ./decentral-demo-config.json --- ./decentral-devnet-config.json 2023-02-24 14:02:56.015581229 -0600 +++ ./decentral-demo-config.json 2023-02-24 14:59:18.991084488 -0600 @@ -106,7 +106,7 @@ ], "vats": { "bootstrap": { - "sourceSpec": "@agoric/vats/src/core/boot-chain.js", + "sourceSpec": "@agoric/vats/src/core/boot-sim.js", "creationOptions": { "critical": true } ```
- export manifest from sim-behaviors.js - core(inter-protocol): static types for sim-behaviors - return Promise<void>
rather than ROLE
- misc static types - note TODO ideas - make executable
- toward test for non-upgradeable vats
No change to the runtime names, for now: vatParams.argv
- test: sim/demo config launches Vaults as expected by loadgen - demo-config: add missing proposals: - add-collateral-core for IbcATOM - price-feed-core - test: fill out expected home properties - installSimEgress: make hardcodedClientAddresses optional - type: prune governanceActions (obsolete in favor of coreProposals) - type: prune bootstrapManifest from BootstrapVatParams - no longer dynamic - rename USDC -> DAI in connectFaucet() - add missing harden()s in nameHub, connectFaucet() - factor out makeHomeFor()
to avoid making chainStorage vat until we need it
- no vat-network in prod - only in boot-sim (hm... not good enough for devnet) - coreProposals supports installations but not raw vats, so we're doing static config for now - split registerNetworkProtocols into client, chain cases
Datadog ReportBranch report: ❌ ❌ Failed Tests (8)
|
@@ -317,14 +285,15 @@ export const addBankAssets = async ({ | |||
bldIssuerKit.resolve(bldKit); | |||
|
|||
const assetAdmin = E(agoricNamesAdmin).lookupAdmin('vbankAsset'); | |||
// XXX interposes bootstrap between agoricNames and vat-bank |
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.
@michaelfig: I'll be able to fix this one with the callback abstraction (a closureless bound method descriptor).
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.
Seems to me that the simpler fix is to just pass assetAdmin
and not bother with a separate updater
. The only risk would be that vat-bank abuses .reserve()
.
installations: { | ||
provisionPool: restoreRef(installKeys.provisionPool), | ||
walletFactory: restoreRef(installKeys.walletFactory), | ||
}, |
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'm baffled as to why these installations are needed. Was this a typo?
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.
yes, typo
1801440
to
2f44599
Compare
obsolete in favor of #7623 |
closes: #7044
Description
reorg network / IBC bootstrap to avoid including vat-network in production config
Security Considerations
facilitates audit of production config
Scaling, Documentation Considerations
none AFAICT
Testing Considerations
TODO: