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

Type casting errors when using a different CommitMultiStore implementation #14019

Closed
javiersuweijie opened this issue Nov 25, 2022 · 2 comments · Fixed by #14054
Closed

Type casting errors when using a different CommitMultiStore implementation #14019

javiersuweijie opened this issue Nov 25, 2022 · 2 comments · Fixed by #14054
Assignees
Labels

Comments

@javiersuweijie
Copy link
Contributor

Summary

Type cast in baseapp.Init() prevents usage of any other implementations of CommitMultiStore

rms, ok := app.cms.(*rootmulti.Store)
if !ok {
return fmt.Errorf("invalid commit multi-store; expected %T, got: %T", &rootmulti.Store{}, app.cms)
}

Problem Definition

I'm exploring to see how we can update mantlemint to support non-terra chains. Mantlemint uses a different implementation of the CommitMultiStore that is more space efficient and performant for queries.

Seems like the check is unnecessary since there is currently only a single implementation of CommitMultiStore and all of them should adhere to the GetPruning() interface.

Proposal

Remove the interface casting to allow other implementations of a CommitMultiStore.

@tac0turtle
Copy link
Member

thanks for the opening this issue, want to submit a PR? @alexanderbez can help in review

@javiersuweijie
Copy link
Contributor Author

thanks for the opening this issue, want to submit a PR? @alexanderbez can help in review

Submitted the PR. What are the chances that this will be cherry-picked into a 0.46.x release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants