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

Seal global cosmos config outside of the cli #1331

Closed
evan-forbes opened this issue Feb 2, 2023 · 2 comments · Fixed by #1348
Closed

Seal global cosmos config outside of the cli #1331

evan-forbes opened this issue Feb 2, 2023 · 2 comments · Fixed by #1348
Assignees

Comments

@evan-forbes
Copy link
Member

evan-forbes commented Feb 2, 2023

to avoid breaking all the tests and increase diff from upstream in this repo, I think we should attempt a different approach where we only call the config/seal functions once in the app in some init function, then import something from that file in celestia-node. I think that will force us to only seal a single time, instead of once in the cli for app and node each.

Originally posted by @evan-forbes in celestiaorg/cosmos-sdk#297 (review)

@Wondertan
Copy link
Member

Nice! We did almost the same recently. The PR name, though does not reflect what was in the final form, but I moved this init to one place in core pkg. Once you move this into the app, release and update the node with a PR, it would be nice to include the removal of init on our side.

@evan-forbes
Copy link
Member Author

@vgonkivs currently we are sealing here

cfg := sdk.GetConfig()
cfg.SetBech32PrefixForAccount(app.Bech32PrefixAccAddr, app.Bech32PrefixAccPub)
cfg.SetBech32PrefixForValidator(app.Bech32PrefixValAddr, app.Bech32PrefixValPub)
cfg.SetBech32PrefixForConsensusNode(app.Bech32PrefixConsAddr, app.Bech32PrefixConsPub)
cfg.Seal()

I haven't tried this, but we can probably just include that in an init function in the app package. either directly in this file, or in its own

evan-forbes pushed a commit that referenced this issue Feb 27, 2023
## Overview
Closes #1331

## Checklist

<!-- 
Please complete the checklist to ensure that the PR is ready to be
reviewed.

IMPORTANT:
PRs should be left in Draft until the below checklist is completed.
-->

- [x] New and updated code has appropriate documentation
- [x] New and updated code has new and/or updated testing
- [x] Required CI checks are passing
- [x] Visual proof for any user facing features like CLI or
documentation updates
- [x] Linked issues closed with keywords
0xchainlover pushed a commit to celestia-org/celestia-app that referenced this issue Aug 1, 2024
## Overview
Closes celestiaorg/celestia-app#1331

## Checklist

<!-- 
Please complete the checklist to ensure that the PR is ready to be
reviewed.

IMPORTANT:
PRs should be left in Draft until the below checklist is completed.
-->

- [x] New and updated code has appropriate documentation
- [x] New and updated code has new and/or updated testing
- [x] Required CI checks are passing
- [x] Visual proof for any user facing features like CLI or
documentation updates
- [x] Linked issues closed with keywords
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 a pull request may close this issue.

3 participants