-
Notifications
You must be signed in to change notification settings - Fork 215
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
E(namesByAddressAdmin).readonly() throws pattern error: promise vs. remotable #8408
Comments
@michaelfig could you clarify in which vat this code is actually loaded? You mentioned it was used in the bootstrap vat, but #4548 seem to indicate it was moved to the Regardless, this is the kind of fix that requires a vat upgrade, and as such depends on #8219 to reach mainnet. Note that if instead of provisioning this lives in the bootstrap vat, then it would not be addressable on mainnet without some heroics since the bootstrap vat is not upgradable. It may be possible to migrate most powers from the bootstrap vat into a new vat however, but in some case that relies on informing upgraded vats they need to use a new object exported by another vat. |
@sufyaankhan, the workaround that doesn't need any code changes on devnet or mainnet is: const addr = 'agoric1abcdeffoobarbaz...';
await E(namesByAddressAdmin).reserve(addr);
// don't trigger the namesByAddressAdmin.readonly() bug
const addressAdmin = E(namesByAddressAdmin).lookupAdmin(addr);
await E(addressAdmin).reserve('depositFacet');
const addressHub = E(addressAdmin).readonly();
const addressDepositFacet = E(addressHub).lookup('depositFacet'); Folks can trace through |
@mhofman, yes the |
I think I reduced the scope of #8821 so it didn't close this one. |
Describe the bug
I was running the agoric-upgrade-11wf and faced the patternMatcher problem of the E(namesByAddressAdmin).readonly() again.
Here's the stack trace:
We need to send some invitations the core-eval ; And we can't get the depositFacets for those accounts
e.g.
const namesByAddress = E(namesByAddressAdmin).readonly()
patternMatcher throws error.
It says the method 'readonly' should return a remotable but it returns a promise
Developer used the following fix to get it working in their local environment but it did not work in DevNet
agoric-sdk/packages/vats/src/nameHub.js
Line 44 in 31ed402
(change it to readonly: M.call().returns(M.any())
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Platform Environment
git describe --tags --always
)Additional context
Read the full thread discussion
https://discord.com/channels/585576150827532298/755164472397660313/1156672044608532590
Screenshots
If applicable, add screenshots to help explain your problem, especially for UI interactions.
The text was updated successfully, but these errors were encountered: