Skip to content

[IF-FINDING-007] Minor observations and improvements related to the Cosmos SDK v0.50 Upgrade#64

Merged
AdriaCarrera merged 1 commit intomainfrom
fix/IF-FINDING-007
Mar 18, 2025
Merged

[IF-FINDING-007] Minor observations and improvements related to the Cosmos SDK v0.50 Upgrade#64
AdriaCarrera merged 1 commit intomainfrom
fix/IF-FINDING-007

Conversation

@AdriaCarrera
Copy link
Contributor

[IF-FINDING-007] Minor observations and improvements related to the Cosmos SDK v0.50 Upgrade

Description

The upgrade to v0.50.x guide suggests:

  • Removing gogoproto.goproto_stringer = false annotation from proto definitions and custom String() functions.
    • For the x/poa module:
      • x/poa params contains this annotation (code ref) and
      • String() implementation (code ref).
        so these need to be removed, as suggested in the upgrade guide.
  • The AppModuleBasic interface has been simplified. Defining GetTxCmd() *cobra.Command and GetQueryCmd() *cobra.Command is no longer required. The module manager detects when module commands are defined. If AutoCLI is enabled, EnhanceRootCommand() will add the auto-generated commands to the root command, unless a custom module command is defined and register that one instead.
    • For the x/poa module GetTxCmd and GetQueryCmd (code ref) can be removed, since EnhanceRootCommand is added code ref.
  • *GetSigners() is no longer required to be implemented on Msg types. The SDK will automatically infer the signers from the Signer field on the message. The signer field is required on all messages unless using a custom signer function.
    • Signer fields are defined in proto definitions for MsgBurn(code ref) and MsgTransferOwnership (code ref), so the GetSigners functions (code ref1, ref2) can be removed as part of the upgrade Cosmos SDK from 0.47 to 0.50 version.

Problem scenarios

No issues, only following the upgrade guide.

Recommendation

As listed in the Description section.

Applied changes

  • Removedgogoproto.goproto_stringer = false in params.proto
  • Removed String() implementation in params.go
  • Removed GetQueryCmd from cli

@AdriaCarrera AdriaCarrera changed the base branch from main to fix/IF-FINDING-005 March 18, 2025 12:22
Base automatically changed from fix/IF-FINDING-005 to main March 18, 2025 12:34
@AdriaCarrera AdriaCarrera merged commit dcfab82 into main Mar 18, 2025
3 checks passed
@AdriaCarrera AdriaCarrera deleted the fix/IF-FINDING-007 branch March 18, 2025 12:34
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 this pull request may close these issues.

2 participants