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

Run upgrade plan to completion during upgrade block #8279

Closed
mhofman opened this issue Aug 29, 2023 · 0 comments · Fixed by #8287
Closed

Run upgrade plan to completion during upgrade block #8279

mhofman opened this issue Aug 29, 2023 · 0 comments · Fixed by #8287
Assignees
Labels
cosmic-swingset package: cosmic-swingset enhancement New feature or request

Comments

@mhofman
Copy link
Member

mhofman commented Aug 29, 2023

What is the Problem Being Solved?

#8112 added support for running swingset work derived from the upgrade info contained in the governance proposal. However it did so by piggy backing on the the existing high priority queue, which means that action will likely not complete (or even start) before the end of the upgrade block.

Software upgrades are a great time to perform long expensive operations atomically instead of spreading them over multiple blocks like during normal execution. Any action triggered by an upgrade plan should run to completion during the upgrade block.

Description of the Design

Instead of pushing an action to the highPriorityQueue, we should instead:

  • Push to an in memory only "run now" queue
    • Only if the block needs execution (hangover handling)
  • In end block check if we have anything in this run now queue and if so
    • run any remaining swingset to quiescence
    • run the run now actions to quiescence (unlimited run policy)
    • empty the run now queue
    • run nothing else, not even a timer poll

Security Considerations

If the remaining swingset work, or the core proposal work does not get quiescent, the upgrade block may never finish. However that is a degenerate issue of #7938 and can be handled by the same mechanism

Scaling Considerations

If a "run now" action is performed outside of an upgrade block, it can interact negatively with cosmos consensus. While we do not have immediate plans to use this mechanism outside an upgrade block, it may be a good way to restart all vats before a software upgrade that will upgrade XS (see #7855)

Test Plan

Docker update test with a check that immediately after the upgrade block the core proposal is in effect (e.g. check a vat incarnation)

Upgrade Considerations

Yes

@mhofman mhofman added enhancement New feature or request cosmic-swingset package: cosmic-swingset labels Aug 29, 2023
@mhofman mhofman added this to the Upgrade 12 code complete milestone Aug 29, 2023
@mhofman mhofman self-assigned this Aug 29, 2023
@mergify mergify bot closed this as completed in #8287 Sep 1, 2023
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
Development

Successfully merging a pull request may close this issue.

1 participant