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(cosmic-swingset): only require vatconfig if uninitialized #8140

Merged
merged 4 commits into from
Aug 3, 2023

Conversation

michaelfig
Copy link
Member

@michaelfig michaelfig commented Aug 3, 2023

refs: #8102

Description

This PR removes an unnecessary runtime dependency on the static SwingSet config file. It is used only for bootstrap, so its absence (or modification) in a future upgrade does not affect the operation of the SwingSet. Cosmic-swingset was searching for this file on every restart, which meant that part of the reorganization intended by #8102 prevented the chain from restarting:

portHandler threw (Error#1)
Error#1: Cannot find module '/usr/src/agoric-sdk/node_modules/@agoric/vats/decentral-main-vaults-config.json' imported from /usr/src/agoric-sdk/packages/cosmic-swingset/src/chain-main.js

As #8102 intended, this PR also removes the redundant copies of the swingset configs from @agoric/vats/decentral*.json.

Security Considerations

Makes existing SwingSet instances more robust to future bootstrap config modifications.

Scaling Considerations

n/a

Documentation Considerations

n/a

Testing Considerations

Tested by upgrade-tests.

Upgrade Considerations

Removes an unnecessary dependency, enabling upgrade to be more successful.

@michaelfig michaelfig added the cosmic-swingset package: cosmic-swingset label Aug 3, 2023
@michaelfig michaelfig self-assigned this Aug 3, 2023
@michaelfig michaelfig force-pushed the mfig-vatconfig-on-init branch from f8db963 to cfb72f3 Compare August 3, 2023 02:28
@michaelfig michaelfig marked this pull request as ready for review August 3, 2023 03:04
@michaelfig michaelfig requested review from turadg and FUDCo August 3, 2023 03:04
Copy link
Contributor

@FUDCo FUDCo left a comment

Choose a reason for hiding this comment

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

Seems legit.

Copy link
Member

@turadg turadg left a comment

Choose a reason for hiding this comment

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

Clear fix and nice adjacent cleanup.

@michaelfig michaelfig added this pull request to the merge queue Aug 3, 2023
@michaelfig michaelfig removed this pull request from the merge queue due to a manual request Aug 3, 2023
@michaelfig
Copy link
Member Author

I'm having problems with the getting-started local-npm test, so I manually removed from the merge queue:

> @agoric/boot@0.1.1-dev-cffd97d.0+cffd97d prepack /home/runner/work/agoric-sdk/agoric-sdk/packages/boot
> tsc --build jsconfig.build.json

Error: ../vats/src/centralSupply.js(10,12): error TS2304: Cannot find name 'ZCF'.
Error: ../vats/src/centralSupply.js(43,15): error TS2304: Cannot find name 'ContractOf'.
Error: ../vats/src/mintHolder.js(23,12): error TS2304: Cannot find name 'ZCF'.
Error: ../vats/src/mintHolder.js(35,12): error TS2304: Cannot find name 'ContractMeta'.
Error: ../vats/src/mintHolder.js(46,12): error TS2304: Cannot find name 'ZCF'.
Error: ../vats/src/provisionPoolKit.js(100,11): error TS2304: Cannot find name 'ZCF'.
Error: ../vats/src/provisionPool.js(17,12): error TS2304: Cannot find name 'ContractMeta'.
Error: ../vats/src/provisionPool.js(36,14): error TS2304: Cannot find name 'StandardTerms'.
Error: ../vats/src/provisionPool.js(41,12): error TS2304: Cannot find name 'ZCF'.
Error: ../vats/src/provisionPool.js(44,30): error TS2304: Cannot find name 'Invitation'.
Error: ../vats/src/core/startWalletFactory.js(72,22): error TS2304: Cannot find name 'AdminFacet'.
Error: ../vats/src/core/types.js(314,28): error TS2304: Cannot find name 'IssuerKeywordRecord'.
Error: ../vats/src/core/types.js(337,28): error TS2304: Cannot find name 'IssuerKeywordRecord'.
Error: ../vats/src/core/types.js(396,22): error TS2304: Cannot find name 'PriceAuthority'.
lerna ERR! lifecycle "prepack" errored in "@agoric/boot", exiting 1

@michaelfig michaelfig enabled auto-merge August 3, 2023 16:26
@michaelfig
Copy link
Member Author

I'm having problems with the getting-started local-npm test, so I manually removed from the merge queue:

Thanks to @turadg for helping me wrangle some ambient types. This should pass now.

@michaelfig michaelfig added this pull request to the merge queue Aug 3, 2023
Merged via the queue into master with commit 9f8a76e Aug 3, 2023
@michaelfig michaelfig deleted the mfig-vatconfig-on-init branch August 3, 2023 17:19
mhofman pushed a commit that referenced this pull request Aug 7, 2023
fix(cosmic-swingset): only require vatconfig if uninitialized
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cosmic-swingset package: cosmic-swingset
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants