fix(cosmos): avoid "codec sealed" panic in injective proposal registration#445
Merged
gheorghestrimtu merged 1 commit intodevelopfrom Feb 19, 2026
Conversation
…ation - remove duplicate proposal `amino.RegisterConcrete` calls from `proposal.go` init - keep proposal amino registration centralized in `RegisterLegacyAminoCodec` - add regression tests for proposal registration and sealed-codec panic behavior - document why proposal init must not register on sealed module amino
No CODEOWNERS file detected - @gheorghestrimtuThis repository doesn't contain a CODEOWNERS file. Please add one at one of the following paths:
If this repository is owned/used by a single team the default entry for a CODEOWNERS would be: For more information see: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners |
|
jmank88
approved these changes
Feb 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





Summary
Fixes Injective plugin startup panic:
panic: codec sealed.Root Cause
cosmos-sdkupgrade (v0.50.x) changed codec expectations, and proposal Amino registration was moved to module-localaminoinproposal.go.That codec is sealed in
codec.go, so laterRegisterConcrete(...)calls panic.Changes
amino.RegisterConcrete(...)calls fromproposal.goinit.gov.RegisterProposalType(...).Why safe
Proposal concrete registration is still done in
RegisterLegacyAminoCodec(...)(codec.go), so functionality is preserved while removing the unsafe registration path.Validation
go test ./pkg/cosmos/adapters/injective/typespassescodec sealedon startup