Skip to content
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

fix(vm-config): vats/init-core.js relies on econCommittee #11056

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

michaelfig
Copy link
Member

@michaelfig michaelfig commented Feb 26, 2025

closes: #11053

Description

packages/builders/scripts/vats/init-core.js has a dependency on packages/builders/scripts/inter-protocol/init-core.js. When they were moved to different coreProposal steps, startWalletFactory.js wasn't able to initialize correctly. This PR moves the inter-protocol/init-core.js committeeProposalBuilder to the same first step as vats/init-core.js to reenable smart wallet provisioning.

Security Considerations

n/a

Scaling Considerations

No additional resource consumption.

Documentation Considerations

n/a

Testing Considerations

Currently manually tested as specified in #11053 , but it would be good to test in CI if it can be done without significantly affecting CI duration.

Upgrade Considerations

n/a

@michaelfig michaelfig requested a review from a team as a code owner February 26, 2025 17:08
Copy link

cloudflare-workers-and-pages bot commented Feb 26, 2025

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: 272bd32
Status: ✅  Deploy successful!
Preview URL: https://9e3787ab.agoric-sdk.pages.dev
Branch Preview URL: https://mfig-devnet-config-steps.agoric-sdk.pages.dev

View logs

@michaelfig michaelfig force-pushed the mfig-devnet-config-steps branch from 8e33f9c to 4c363ab Compare February 26, 2025 17:56
@michaelfig michaelfig changed the title fix(vm-config): init-core.js relies on inter-protocol fix(vm-config): vats/init-core.js relies on econCommittee Feb 26, 2025
@michaelfig michaelfig requested a review from dckc February 26, 2025 18:38
@michaelfig michaelfig self-assigned this Feb 26, 2025
@michaelfig michaelfig force-pushed the mfig-devnet-config-steps branch from 4c363ab to ef30b2a Compare February 27, 2025 04:26
@michaelfig michaelfig force-pushed the mfig-devnet-config-steps branch from ef30b2a to 272bd32 Compare February 27, 2025 05:48
Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think some unit tests are worthwhile for the fixes.

And I think there's more to say about Upgrade Considerations.

@@ -50,10 +50,10 @@ export const makeStoreHooks = (store, log = noop) => {
return;
}
if (store.has(name)) {
console.warn('cannot save duplicate:', name);
return;
store.set(name, value);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how would this change get to mainnet?

"n/a" doesn't seem to suffice for upgrade considerations.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about adding a test in test-promise-space.js for this fix?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"How do we validate this change in a testnet?" will eventually be asked. If the answer is "it's not cost-effective" then that should go in Testing Considerations.

Comment on lines +147 to +149
if (!nameToState.has(name)) {
return;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about adding a test in test-promise-space.js for this fix too?

@@ -223,32 +225,60 @@ export const startWalletFactory = async (
privateArgs: {
storageNode: walletStorageNode,
walletBridgeManager,
walletReviver: E(ppFacets.creatorFacet).getWalletReviver(),
walletReviver: E(E.get(ppFacetsP).creatorFacet).getWalletReviver(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we pass a promise in privateArgs? I wonder how that works with upgrade... Do settled promises stay settled across upgrades?

@@ -184,7 +184,11 @@ export const startWalletFactory = async (

const marshaller = await E(board).getPublishingMarshaller();
const poolBank = E(bankManager).getBankForAddress(poolAddr);
const ppFacets = await E(startGovernedUpgradable)({

// We cannot await the start of the provisionPool, since
Copy link
Member

@dckc dckc Feb 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We did await when we rebooted the VM in the vaults upgrade, right? Any idea what changed?

const ppFacets = await E(startGovernedUpgradable)({

aka
https://github.com/Agoric/agoric-sdk/blob/mainnet1B-rc3/packages/vats/src/core/startWalletFactory.js#L169

instanceProduce.provisionPool.resolve(ppFacets.instance);

await Promise.all([
E(ppFacets.creatorFacet).addRevivableAddresses(oldAddresses),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would dearly like to get rid of the whole reviving business.
someday...

Comment on lines +232 to +233
if (present) {
void E.sendOnly(nameAdmin).delete(name);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems worth a unit test in test-name-hub-published.js

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but again... how do we deploy this change to mainnet?

Maybe the answer is "we don't" but that merits something explicit in upgrade considerations.

old.reject(Error(`Value has been deleted`));
old.reject(Error(`Value for ${key} has been deleted`));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the agoricNames vat being upgraded in u19?

Is nameHub used in any other vats? Oh yeah... provisioning holds namesByAddress. Are we upgrading that one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Devnet vm-config does not provision smart wallets
2 participants