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

Multiplexed app next steps #3991

Closed
2 of 5 tasks
rootulp opened this issue Oct 18, 2024 · 1 comment
Closed
2 of 5 tasks

Multiplexed app next steps #3991

rootulp opened this issue Oct 18, 2024 · 1 comment
Assignees

Comments

@rootulp
Copy link
Collaborator

rootulp commented Oct 18, 2024

Context

See prototype in #3729

Problem

The way celestia-app supports multiple app versions in a single binary is error-prone. Currently it relies on conditionals littered throughout the code-base.

Proposal

Refactor how celestia-app supports multiple app versions by introducing an ABCI multiplexer that communicates with CometBFT and delegates to the appropriate version of celestia-app.

Next steps

  • Create a diagram of multiplexer communication with CometBFT.

  • Investigate Cosmos SDK v0.50.x to see how they structure state machine modules

    • Update: most Cosmos SDK modules were not spun out into modules in v0.50.x. See here. So I'm investigating v0.52.x instead. x/mint was spun out in this PR.

    • Question: why is "cosmossdk.io" the new import name? Go claims it doesn't have a valid go.mod: https://pkg.go.dev/cosmossdk.io

      +	minttypes "cosmossdk.io/x/mint/types"
      -	minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
  • Explore if any other chains have a solution to one binary supporting many major versions.

  • Question: can we refactor celestia-app past versions from release branches into directories on main so that it's easier to modify v1, v2, v3 while working on multiplexed app? Go modules supports this because each new major version has a unique Go module name.

  • Question: how long do other chains take to perform stop + start upgrades?

Possible next steps

  • See Remaining tasks section of prototype
  • Based on a discussion w/ @cmwaters, on a fork:
    • Before proceeding, create a diagram with desired Go module dependencies
    • v2.x
      • Modify all state machine modules to not import app or appconsts
      • Extract a Go module for all state machine module
      • Modify app to import the go.mod state machine modules
      • Commit and push
    • main
      • Cherry-pick the commit to modify all state machine modules to not import app or appconsts
      • cherry-pick the previous commit exception for x/blob
      • create x/blob v2 Go module
      • Modify app to import the go.mod state machine modules
      • multiplexer import app v2 and app v3
@rootulp
Copy link
Collaborator Author

rootulp commented Nov 27, 2024

These next steps aren't relevant any more. We're collaborating with Binary Builders on a design for this.

@rootulp rootulp closed this as not planned Won't fix, can't repro, duplicate, stale Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant