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

Prototype versioned app module rolling upgrades #3625

Closed
evan-forbes opened this issue Jun 26, 2024 · 6 comments · May be fixed by #3729
Closed

Prototype versioned app module rolling upgrades #3625

evan-forbes opened this issue Jun 26, 2024 · 6 comments · May be fixed by #3729
Assignees
Labels
WS: Maintenance 🔧 includes bugs, refactors, flakes, and tech debt etc WS: V4

Comments

@evan-forbes
Copy link
Member

We are attempting to gather more information on a flexible and simpler approach to rolling upgrades and also single binary syncs. This approach involves versioning the application struct (and potentially the rest of our modules) in some fashion so that at an upgrade height, it can be swapped out with a different go moduled version of the app.

In theory, for state machine upgrades, this results in something similar to restart upgrades in that we can make arbitrary consensus breaking changes (such as importing a semver minor bump but still consensus breaking version of IBC) while not having to reconnect to peers or completely reload the DB indexed into memory.

AC

To close this issue, we should create a prototype that takes a similar approach to the above to perform a rolling upgrade over 4 nodes in knuu. Ideally there is also a migration included in this upgrade.

@evan-forbes evan-forbes added WS: Maintenance 🔧 includes bugs, refactors, flakes, and tech debt etc WS: V3 3️⃣ item is directly relevant to the v3 hardfork labels Jun 26, 2024
@evan-forbes evan-forbes changed the title Prototype versioned app modules Prototype versioned app module rolling upgrades Jun 26, 2024
@evan-forbes evan-forbes added the needs:discussion item needs to be discussed as a group in the next sync. if marking an item, pls be prepped to talk label Jun 26, 2024
@cmwaters
Copy link
Contributor

cmwaters commented Jun 26, 2024

What I basically had in mind is a multiplexer which adheres to the ABCI interface at one end and proxies calls to the relevant state machine. In a way it can be seen as a sort of middleware. Each state machine is responsible for the mechanism they have for bumping the app version. The multiplexer simply stores it to disk somewhere and listens for changes via EndBlock.

@cmwaters
Copy link
Contributor

As a minimal prototype, I had thought of creating a fork, bumping to v3 and having the wrapper import v1 and v2 of celestia-app. In the future we may want to go.mod these state machines for more fine granularity imports, but to start with I think we can leave it as is and see what kind of binary size that gives us.

@rootulp
Copy link
Collaborator

rootulp commented Jul 2, 2024

@evan-forbes evan-forbes removed the needs:discussion item needs to be discussed as a group in the next sync. if marking an item, pls be prepped to talk label Jul 15, 2024
@rootulp
Copy link
Collaborator

rootulp commented Sep 9, 2024

The prototype in #3729 works but it took several short-term workarounds that need long-term fixes before merging.

@rootulp rootulp modified the milestone: v3 Sep 12, 2024
@evan-forbes evan-forbes added the nice to have item is not blocking or required. label Sep 12, 2024
@rootulp rootulp added WS: V4 and removed WS: V3 3️⃣ item is directly relevant to the v3 hardfork nice to have item is not blocking or required. labels Oct 9, 2024
@rootulp
Copy link
Collaborator

rootulp commented Oct 18, 2024

Closing this as done b/c the prototype works. I'll create follow-up issues to production-ize the prototype.

@rootulp rootulp closed this as completed Oct 18, 2024
@rootulp
Copy link
Collaborator

rootulp commented Oct 18, 2024

Opened #3991

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WS: Maintenance 🔧 includes bugs, refactors, flakes, and tech debt etc WS: V4
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants