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

Allow bundling and execution of coreProposals upon software upgrade #8095

Closed
michaelfig opened this issue Jul 25, 2023 · 1 comment · Fixed by #8112
Closed

Allow bundling and execution of coreProposals upon software upgrade #8095

michaelfig opened this issue Jul 25, 2023 · 1 comment · Fixed by #8112
Assignees
Labels
cosmic-swingset package: cosmic-swingset enhancement New feature or request

Comments

@michaelfig
Copy link
Member

michaelfig commented Jul 25, 2023

What is the Problem Being Solved?

The current proposal builder architecture allows the specification of bundles, core-eval manifests, and their parameters.

These builders can be executed:

  • directly by validators as part of the chain bootstrap
  • by any user, to generate bundles and core-eval governance to submit to the chain

It would be useful also to enable the execution of proposal builders by validators as part of a software upgrade.

Description of the Design

  1. Specify the proposal builders to execute as part of the "upgrade plan" submitted to governance. The plan is just a JSONified object, so we can add a "coreProposals": [...] property to it, using the same data structure as in our SwingSet configuration files (packages/vats/decentral-*-config.json).
  2. Parse any upgrade plan information from agd's first AG_COSMOS_INIT message
  3. After SwingSet initializes, use a variant of the genesis coreProposals handling to run each proposal builder and:
    a. extract the bundle entrypoint specifiers
    b. bundle the specified entrypoints
    c. controller.installBundle each of the bundles (idempotent)
    d. pass through the bundle specifiers
    e. create the core-eval scripts configured with the coreProposal options and the appropriate bundle specifiers
  4. commit the swing-store so that the bundles are available for the core-evals
  5. push each created core-eval action on the back of cosmic-swingset's highPriorityQueueStorage
  6. return control to agd, and let normal chain scheduling promptly process the core-evals

Security Considerations

No more dangerous than genesis core-eval, and easier to audit than individual user-submitted core-evals from non-SDK sources.

Scaling Considerations

n/a

Test Plan

Test the software upgrade coreProposals via the Docker deployment upgrade test, using it to install or upgrade a new feature (such as the network and IBC vats).

Upgrade Considerations

Designed to assist upgrade.

@michaelfig michaelfig added the enhancement New feature or request label Jul 25, 2023
@michaelfig michaelfig self-assigned this Jul 25, 2023
@michaelfig michaelfig added the cosmic-swingset package: cosmic-swingset label Jul 26, 2023
@JimLarson
Copy link
Contributor

See #7992

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cosmic-swingset package: cosmic-swingset enhancement New feature or request
Projects
None yet
2 participants