Closed Jorge-Lopes closed 7 months ago
The functions named in the manifest are looked up by name in the exports of the liquidationVisibility/manifest.js module.
so try
export { startVaultFactory };
Greetings @dckc
The change you proposed solved the issue related to the startVaultFactory
, which means that the error message startVaultFactory not in getManifestForVaultFactory
is no longer being printed.
Although, the issue that triggers the error error while extracting context for action {{"CORE_EVAL" 'ñ' '�'}
still persists.
This message point to the function pushAction.
But I am having difficulties understanding the source of the issue.
I am questioning if the value provided to VAULT_FACTORY_CONTROLLER_ADDR
could be the source of this issue.
Chain logs:
2024/02/08 16:44:53 error while extracting context for action {{"CORE_EVAL" 'ƀ' '�'} [{"{\n \"consume\": {\n \"board\": \"board\",\n \"chainStorage\": true,\n \"diagnostics\": true,\n \"feeMintAccess\": \"zoe\",\n \"chainTimerService\": \"timer\",\n \"zoe\": \"zoe\",\n \"priceAuthority\": \"priceAuthority\",\n \"economicCommitteeCreatorFacet\": \"economicCommittee\",\n \"reserveKit\": \"reserve\",\n \"auctioneerKit\": \"auction\",\n \"agoricNamesAdmin\": \"makeCoreProposalBehavior\",\n \"vatAdminSvc\": \"makeCoreProposalBehavior\"\n },\n \"produce\": {\n \"vaultFactoryKit\": \"VaultFactory\"\n },\n \"brand\": {\n \"consume\": {\n \"IST\": \"zoe\"\n }\n },\n \"oracleBrand\": {\n \"consume\": {\n \"USD\": true\n }\n },\n \"installation\": {\n \"consume\": {\n \"contractGovernor\": \"zoe\",\n \"VaultFactory\": \"zoe\"\n },\n \"produce\": \"makeCoreProposalBehavior\"\n },\n \"instance\": {\n \"consume\": {\n \"reserve\": \"reserve\",\n \"auctioneer\": \"auction\"\n },\n \"produce\": {\n \"VaultFactory\": \"VaultFactory\",\n \"VaultFactoryGovernor\": \"VaultFactoryGovernor\"\n }\n },\n \"evaluateBundleCap\": \"makeCoreProposalBehavior\",\n \"modules\": {\n \"utils\": {\n \"runModuleBehaviors\": \"makeCoreProposalBehavior\"\n }\n }\n}" "// This is generated by writeCoreProposal; please edit!\n/* eslint-disable */\n\nconst manifestBundleRef = {bundleID:\"b1-6ff629d8e7f5a3a77cf79762c7f6dcf32b03e8a861d443c554b93c6fce960ca81a6342cdc1d27e94b1c1f23912304d24cfe7969cac699bf53f29aebcc148c29c\"};\nconst getManifestCall = harden([\n \"getManifestForVaultFactory\",\n {\n installKeys: {\n vaultFactory: {\n bundleID: \"b1-d32a8c3793666bb073c2604f115995ab49145ecf3f8f2bc817349a8f0791ab101866dc09546b9e7aa705fd127d648bc084a2df2e0e5fe383405d3df540b16d77\",\n },\n },\n vaultFactoryControllerAddress: undefined,\n },\n]);\nconst customManifest = {\n startVaultFactory: {\n brand: {\n consume: {\n IST: \"zoe\",\n },\n },\n consume: {\n auctioneerKit: \"auction\",\n board: \"board\",\n chainStorage: true,\n chainTimerService: \"timer\",\n diagnostics: true,\n economicCommitteeCreatorFacet: \"economicCommittee\",\n feeMintAccess: \"zoe\",\n priceAuthority: \"priceAuthority\",\n reserveKit: \"reserve\",\n zoe: \"zoe\",\n },\n installation: {\n consume: {\n VaultFactory: \"zoe\",\n contractGovernor: \"zoe\",\n },\n },\n instance: {\n consume: {\n auctioneer: \"auction\",\n reserve: \"reserve\",\n },\n produce: {\n VaultFactory: \"VaultFactory\",\n VaultFactoryGovernor: \"VaultFactoryGovernor\",\n },\n },\n oracleBrand: {\n consume: {\n USD: true,\n },\n },\n produce: {\n vaultFactoryKit: \"VaultFactory\",\n },\n },\n};\n\n// Make a behavior function and \"export\" it by way of script completion value.\n// It is constructed by an anonymous invocation to ensure the absence of a global binding\n// for makeCoreProposalBehavior, which may not be necessary but preserves behavior pre-dating\n// https://github.com/Agoric/agoric-sdk/pull/8712 .\nconst behavior = (({\n manifestBundleRef,\n getManifestCall: [manifestGetterName, ...manifestGetterArgs],\n customManifest,\n E,\n log = console.info,\n customRestoreRef,\n}) => {\n const { entries, fromEntries } = Object;\n\n /**\n * Given an object whose properties may be promise-valued, return a promise\n * for an analogous object in which each such value has been replaced with its\n * fulfillment.\n * This is a non-recursive form of endo `deeplyFulfilled`.\n *\n * @template T\n * @param {{[K in keyof T]: (T[K] | Promise<T[K]>)}} obj\n * @returns {Promise<T>}\n */\n const shallowlyFulfilled = async obj => {\n if (!obj) {\n return obj;\n }\n const awaitedEntries = await Promise.all(\n entries(obj).map(async ([key, valueP]) => {\n const value = await valueP;\n return [key, value];\n }),\n );\n return fromEntries(awaitedEntries);\n };\n\n const makeRestoreRef = (vatAdminSvc, zoe) => {\n /** @type {(ref: import\\('./externalTypes.js').ManifestBundleRef) => Promise<Installation<unknown>>} */\n const defaultRestoreRef = async bundleRef => {\n // extract-proposal.js creates these records, and bundleName is\n // the optional name under which the bundle was installed into\n // config.bundles\n const bundleIdP =\n 'bundleName' in bundleRef\n ? E(vatAdminSvc).getBundleIDByName(bundleRef.bundleName)\n : bundleRef.bundleID;\n const bundleID = await bundleIdP;\n const label = bundleID.slice(0, 8);\n return E(zoe).installBundleID(bundleID, label);\n };\n return defaultRestoreRef;\n };\n\n /** @param {ChainBootstrapSpace & BootstrapPowers & { evaluateBundleCap: any }} powers */\n const coreProposalBehavior = async powers => {\n // NOTE: `powers` is expected to match or be a superset of the above `permits` export,\n // which should therefore be kept in sync with this deconstruction code.\n // HOWEVER, do note that this function is invoked with at least the *union* of powers\n // required by individual moduleBehaviors declared by the manifest getter, which is\n // necessary so it can use `runModuleBehaviors` to provide the appropriate subset to\n // each one (see ./writeCoreProposal.js).\n // Handle `powers` with the requisite care.\n const {\n consume: { vatAdminSvc, zoe, agoricNamesAdmin },\n evaluateBundleCap,\n installation: { produce: produceInstallations },\n modules: {\n utils: { runModuleBehaviors },\n },\n } = powers;\n\n // Get the on-chain installation containing the manifest and behaviors.\n log('evaluateBundleCap', {\n manifestBundleRef,\n manifestGetterName,\n vatAdminSvc,\n });\n let bcapP;\n if ('bundleName' in manifestBundleRef) {\n bcapP = E(vatAdminSvc).getNamedBundleCap(manifestBundleRef.bundleName);\n } else if ('bundleID' in manifestBundleRef) {\n bcapP = E(vatAdminSvc).getBundleCap(manifestBundleRef.bundleID);\n } else {\n const keys = Reflect.ownKeys(manifestBundleRef).map(key =>\n typeof key === 'string' ? JSON.stringify(key) : String(key),\n );\n const keysStr = `[${keys.join(', ')}]`;\n throw Error(\n `bundleRef must have own bundleName or bundleID, missing in ${keysStr}`,\n );\n }\n const bundleCap = await bcapP;\n\n const proposalNS = await evaluateBundleCap(bundleCap);\n\n // Get the manifest and its metadata.\n log('execute', {\n manifestGetterName,\n bundleExports: Object.keys(proposalNS),\n });\n const restoreRef = customRestoreRef || makeRestoreRef(vatAdminSvc, zoe);\n const {\n manifest,\n options: rawOptions,\n installations: rawInstallations,\n } = await proposalNS[manifestGetterName](\n harden({ restoreRef }),\n ...manifestGetterArgs,\n );\n\n // Await promises in the returned options and installations records.\n const [options, installations] = await Promise.all(\n [rawOptions, rawInstallations].map(shallowlyFulfilled),\n );\n\n // Publish the installations for our dependencies.\n const installationEntries = entries(installations || {});\n if (installationEntries.length > 0) {\n const installAdmin = E(agoricNamesAdmin).lookupAdmin('installation');\n await Promise.all(\n installationEntries.map(([key, value]) => {\n produceInstallations[key].resolve(value);\n return E(installAdmin).update(key, value);\n }),\n );\n }\n\n // Evaluate the manifest.\n return runModuleBehaviors({\n // Remember that `powers` may be arbitrarily broad.\n allPowers: powers,\n behaviors: proposalNS,\n manifest: customManifest || manifest,\n makeConfig: (name, _permit) => {\n log('coreProposal:', name);\n return { options };\n },\n });\n };\n\n return coreProposalBehavior;\n})({ manifestBundleRef, getManifestCall, customManifest, E });\nbehavior;\n"}]}
2024-02-08T16:44:53.126Z SwingSet: vat: v1: evaluateBundleCap { manifestBundleRef: { bundleID: 'b1-6ff629d8e7f5a3a77cf79762c7f6dcf32b03e8a861d443c554b93c6fce960ca81a6342cdc1d27e94b1c1f23912304d24cfe7969cac699bf53f29aebcc148c29c' }, manifestGetterName: 'getManifestForVaultFactory', vatAdminSvc: Promise [Promise] {} }
2024-02-08T16:44:54.672Z SwingSet: vat: v1: execute { manifestGetterName: 'getManifestForVaultFactory', bundleExports: [ 'getManifestForVaultFactory', 'startVaultFactory' ] }
2024-02-08T16:44:54.716Z block-manager: block 384 commit
2024-02-08T16:44:58.226Z block-manager: block 385 begin
2024-02-08T16:44:58.342Z SwingSet: vat: v1: coreProposal: startVaultFactory
2024-02-08T16:44:58.343Z SwingSet: vat: v1: ----- RunEconBehaviors.5 2 startVaultFactory
2024-02-08T16:44:58.343Z SwingSet: vat: v1: ----- RunEconBehaviors.5 3 setupVaultFactory
2024-02-08T16:45:04.178Z block-manager: block 385 commit
2024-02-08T16:45:04.437Z block-manager: block 386 begin
2024-02-08T16:45:07.525Z SwingSet: vat: v53: ----- VF.16 2 prepare start { feeMintAccess: Object [Alleged: FeeMint feeMintAccess] {}, initialPoserInvitation: Object [Alleged: Zoe Invitation payment] {}, initialShortfallInvitation: Object [Alleged: Zoe Invitation payment] {}, marshaller: Object [Alleged: Board readonlyMarshaller] {}, storageNode: Object [Alleged: ChainStorageNode] {} } []
2024-02-08T16:45:07.526Z SwingSet: vat: v53: ----- VF.16 3 awaiting debtMint
2024-02-08T16:45:08.371Z SwingSet: vat: v53: ----- VF.16 4 making non-durable publishers
2024-02-08T16:45:08.371Z SwingSet: vat: v53: ----- VF.16 5 awaiting makeParamManagerFromTerms
2024-02-08T16:45:08.406Z SwingSet: vat: v53: ----- VK.12 2 prepareVaultKit [ 'Durable Publish Kit_kindHandle', 'Recorder_kindHandle', 'collateralManagers', 'debtMint', 'rewardPoolSeat', 'vault param manager parts' ]
2024-02-08T16:45:08.578Z SwingSet: vat: v53: ----- VM.14 2 provideAndStartVaultManagerKits start
2024-02-08T16:45:08.580Z SwingSet: vat: v53: ----- VM.14 3 provideAndStartVaultManagerKits returning
2024-02-08T16:45:08.731Z block-manager: block 386 commit
2024-02-08T16:45:09.578Z block-manager: block 387 begin
2024-02-08T16:45:09.732Z SwingSet: vat: v53: ----- LIQ.5 2 setWakeupsForNextAuction at 1_707_410_682n with { clockStep: { relValue: 180n, timerBrand: Object [Alleged: timerBrand] {} }, endRate: 6_500n, endTime: { absValue: 1_707_413_042n, timerBrand: Object [Alleged: timerBrand] {} }, lockTime: { absValue: 1_707_409_802n, timerBrand: Object [Alleged: timerBrand] {} }, startDelay: { relValue: 2n, timerBrand: Object [Alleged: timerBrand] {} }, startTime: { absValue: 1_707_411_602n, timerBrand: Object [Alleged: timerBrand] {} }, steps: 8n }
2024-02-08T16:45:09.733Z SwingSet: vat: v53: ----- LIQ.5 3 CASE 1: nominalStart is now or in the future
2024-02-08T16:45:09.734Z SwingSet: vat: v53: ----- LIQ.5 4 scheduling 1_707_409_800n 1_707_411_600n 1_707_411_602n
error while extracting context for action
It's not obvious to me with a quick look what's going on. the blame view suggests MFig might know, but I don't think now is a good time to ask him. @kbennett2000 help me remember to follow up on this one, please?
@kbennett2000 help me remember to follow up on this one, please?
Thank you very much @dckc and @kbennett2000
Using the a3p image instead of ./start_local_chain.sh
did the job. Closing for now.
Describe the bug
When submitting a proposal to update the VaultFactory contract, the core-eval fails with the following error
startVaultFactory not in getManifestForVaultFactory
. Based on this I imagine I have made some mistake when building the manifest or even in the proposal builder script. Although I am not being able to spot the bug.Links to source code:
To Reproduce
Steps to reproduce the behavior:
Generate bundles
Submit proposal
Show Error
Chain logs:
```shell 2024/02/07 15:44:42 error while extracting context for action {{"CORE_EVAL" 'ñ' '�'} [{"{\n \"consume\": {\n \"board\": \"board\",\n \"chainStorage\": true,\n \"diagnostics\": true,\n \"feeMintAccess\": \"zoe\",\n \"chainTimerService\": \"timer\",\n \"zoe\": \"zoe\",\n \"priceAuthority\": \"priceAuthority\",\n \"economicCommitteeCreatorFacet\": \"economicCommittee\",\n \"reserveKit\": \"reserve\",\n \"auctioneerKit\": \"auction\",\n \"agoricNamesAdmin\": \"makeCoreProposalBehavior\",\n \"vatAdminSvc\": \"makeCoreProposalBehavior\"\n },\n \"produce\": {\n \"vaultFactoryKit\": \"VaultFactory\"\n },\n \"brand\": {\n \"consume\": {\n \"IST\": \"zoe\"\n }\n },\n \"oracleBrand\": {\n \"consume\": {\n \"USD\": true\n }\n },\n \"installation\": {\n \"consume\": {\n \"contractGovernor\": \"zoe\",\n \"VaultFactory\": \"zoe\"\n },\n \"produce\": \"makeCoreProposalBehavior\"\n },\n \"instance\": {\n \"consume\": {\n \"reserve\": \"reserve\",\n \"auctioneer\": \"auction\"\n },\n \"produce\": {\n \"VaultFactory\": \"VaultFactory\",\n \"VaultFactoryGovernor\": \"VaultFactoryGovernor\"\n }\n },\n \"evaluateBundleCap\": \"makeCoreProposalBehavior\",\n \"modules\": {\n \"utils\": {\n \"runModuleBehaviors\": \"makeCoreProposalBehavior\"\n }\n }\n}" "// This is generated by writeCoreProposal; please edit!\n/* eslint-disable */\n\nconst manifestBundleRef = {bundleID:\"b1-aaefe6af1d3f97e01c9e92129a855db38f17736c1050b87a80b0606f44adca8dc92be334f5b18b4af6f97effb673b85e3744fa9b0851b3f73015d0351e6a5c60\"};\nconst getManifestCall = harden([\n \"getManifestForVaultFactory\",\n {\n installKeys: {\n vaultFactory: {\n bundleID: \"b1-0549e2e790529d9ce158b65a56051332f7750453cde89395ace96fc6d384dcda41014fd1a43353f639865d726e709b12d8a132d25cb3ab4e8ee267256ed356be\",\n },\n },\n vaultFactoryControllerAddress: undefined,\n },\n]);\nconst customManifest = {\n startVaultFactory: {\n brand: {\n consume: {\n IST: \"zoe\",\n },\n },\n consume: {\n auctioneerKit: \"auction\",\n board: \"board\",\n chainStorage: true,\n chainTimerService: \"timer\",\n diagnostics: true,\n economicCommitteeCreatorFacet: \"economicCommittee\",\n feeMintAccess: \"zoe\",\n priceAuthority: \"priceAuthority\",\n reserveKit: \"reserve\",\n zoe: \"zoe\",\n },\n installation: {\n consume: {\n VaultFactory: \"zoe\",\n contractGovernor: \"zoe\",\n },\n },\n instance: {\n consume: {\n auctioneer: \"auction\",\n reserve: \"reserve\",\n },\n produce: {\n VaultFactory: \"VaultFactory\",\n VaultFactoryGovernor: \"VaultFactoryGovernor\",\n },\n },\n oracleBrand: {\n consume: {\n USD: true,\n },\n },\n produce: {\n vaultFactoryKit: \"VaultFactory\",\n },\n },\n};\n\n// Make a behavior function and \"export\" it by way of script completion value.\n// It is constructed by an anonymous invocation to ensure the absence of a global binding\n// for makeCoreProposalBehavior, which may not be necessary but preserves behavior pre-dating\n// https://github.com/Agoric/agoric-sdk/pull/8712 .\nconst behavior = (({\n manifestBundleRef,\n getManifestCall: [manifestGetterName, ...manifestGetterArgs],\n customManifest,\n E,\n log = console.info,\n customRestoreRef,\n}) => {\n const { entries, fromEntries } = Object;\n\n /**\n * Given an object whose properties may be promise-valued, return a promise\n * for an analogous object in which each such value has been replaced with its\n * fulfillment.\n * This is a non-recursive form of endo `deeplyFulfilled`.\n *\n * @template T\n * @param {{[K in keyof T]: (T[K] | Promise2024-02-07T15:44:47.299Z SwingSet: xsnap: v1: Error#1 ERROR_NOTE: Sent as error:liveSlots:v1#70001 2024-02-07T15:44:47.299Z SwingSet: ls: v1: Logging sent error stack (Error#1) 2024-02-07T15:44:47.302Z SwingSet: xsnap: v10: UnhandledPromiseRejectionWarning: (RemoteError(error:liveSlots:v1#70001)#1) 2024-02-07T15:44:47.302Z SwingSet: xsnap: v10: RemoteError(error:liveSlots:v1#70001)#1: startVaultFactory not in getManifestForVaultFactory 2024-02-07T15:44:47.302Z SwingSet: xsnap: v10: Error: startVaultFactory not in getManifestForVaultFactory at construct () at Error (/bundled-source/.../node_modules/@endo/lockdown/node_modules/ses/src/error/tame-error-constructor.js:56) at makeError (/bundled-source/.../node_modules/@endo/lockdown/node_modules/ses/src/error/assert.js:273) at decodeErrorCommon (/bundled-source/.../node_modules/@endo/marshal/src/marshal.js:281) at decodeFromSmallcaps (/bundled-source/.../node_modules/@endo/marshal/src/encodeToSmallcaps.js:437) at fromCapData (/bundled-source/.../node_modules/@endo/marshal/src/marshal.js:356) at notifyOnePromise (/bundled-source/.../packages/swingset-liveslots/src/liveslots.js:1194) at notify (/bundled-source/.../packages/swingset-liveslots/src/liveslots.js:1218) at dispatchToUserspace (/bundled-source/.../packages/swingset-liveslots/src/liveslots.js:1487) at runWithoutMetering (/bundled-source/.../packages/swingset-xsnap-supervisor/lib/supervisor-subprocess-xsnap.js:60) at ()