Zoe can't put terms containing promises in durable storage #8073
Replies: 2 comments 1 reply
-
While researching for similar implementations on the Agoric repository, I've come across the econ-behaviors.js. const reserveGovernorTerms = await deeplyFulfilledObject(
harden({
timer: chainTimerService,
governedContractInstallation: reserveInstallation,
governed: {
terms: reserveTerms,
issuerKeywordRecord: { Central: centralIssuer },
label: 'reserve',
},
}),
); Also, this discussion address this subject as well. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the write-up! It's good to start with the symptoms as you've done here. Then, once we have a diagnosis, I like to promote it to the title. Something like "Zoe can't put terms containing promises in durable storage". Hm... there's also a potential documentation issue here. I don't think docs on E(zoe).startInstance() state this constraint. |
Beta Was this translation helpful? Give feedback.
-
Greetings,
Recently I faced an issue when trying to start a contract instance using a deploy script. It would return an error with the following message:
value is not durable: (an object) at slot 7 of (a string)
.After exploring, I was able to identify that the source of this error was related to one of the attributes being passed on the contract terms, the
chainTimerService
.Since the error message was mentioning that a value was not durable, I got confused because the contract being instantiated was not using any durable storage or objects.
I address this question on the Agoric Office Hours Jul 19 and Dan suggested that the error is most likely from zoe, trying to put the terms into durable storage.
&7
refers to a promise forchainTimerService
and promises don't fit in durable storage.He advised to resolve the chainTimerService promise before calling startInstance.
After updating the script to resolve the promise, (
const timeAuthority = await chainTimerService;
), the error was no longer triggered.Link to the repository
The code snippet bellow is extracted from the original deploy script:
The error message being printed on the console:
Error message being printed on the chain logs:
Beta Was this translation helpful? Give feedback.
All reactions