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

scheduled upgrades #373

Merged
merged 25 commits into from
Oct 24, 2023
Merged

scheduled upgrades #373

merged 25 commits into from
Oct 24, 2023

Conversation

agouin
Copy link
Member

@agouin agouin commented Oct 18, 2023

Schedule upgrades to automatically re-create pods with the relevant image version at the upgrade heights.

E.g. for noble, this allows a node to sync from genesis to chain tip through all of the versions:

spec:
  chain:
    versions:
    - height: 1
      image: ghcr.io/strangelove-ventures/heighliner/noble:v1.0.0
    - height: 119000      
      image: ghcr.io/strangelove-ventures/heighliner/noble:v2.0.0
    - height: 1296000
      image: ghcr.io/strangelove-ventures/heighliner/noble:v3.0.0
    - height: 2672000
      image: ghcr.io/strangelove-ventures/heighliner/noble:v3.1.0

This also means that the spec can be modified for future upgrades before they occur, and the operator will automatically upgrade them at the upgrade height.

This works for both on-chain upgrade plans and halt-height upgrades. To make the operator set the halt-height in app.toml for an upcoming upgrade, add setHaltHeight: true to the version, e.g.:

spec:
  chain:
    versions:
    - height: 1
      image: ghcr.io/strangelove-ventures/heighliner/noble:v1.0.0
    - height: 119000      
      image: ghcr.io/strangelove-ventures/heighliner/noble:v2.0.0
      setHaltHeight: true

This will cause pods below height=119000 on version 1.0.0 to have halt-height: 119000 configured in app.toml, which will force the instance to panic at the halt height, rather than stay running. This can be used for standard on-chain upgrades too, but is not necessary since the operator will restart the pod once it detects the instance is synced to the upgrade height (either from tendermint RPC or from the periodic database version-check)

Resolves #15

@agouin agouin changed the title first stab at scheduled upgrades scheduled upgrades Oct 19, 2023
@agouin agouin marked this pull request as ready for review October 19, 2023 17:26
@agouin agouin merged commit b305a73 into main Oct 24, 2023
4 checks passed
@agouin agouin deleted the andrew/scheduled_upgrades branch October 24, 2023 14:50
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.

CosmosFullNode upgrade should be schedule-able at some future block height
2 participants