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

fix(x/auth): duplicate vesting subcommands of <appd> tx --help #18746

Merged
merged 8 commits into from
Dec 14, 2023

Conversation

Halimao
Copy link
Contributor

@Halimao Halimao commented Dec 14, 2023

Description

Running <appd> tx --help will show duplicate vesting subcommand and missing <appd> tx auth update-params-proposal subcommand

This is due to a duplicate implementation for type HasCustomTxCommand interface in x/auth/module.go AppModuleBasic and x/auth/vesting/module.go AppModuleBasic, by returning the same x/auth/vesting/cli/tx.go GetTxCmd().

As x/auth/autocli.go has initialized the TX field, we can simply return nil for x/auth/module.go AppModuleBasic GetTxCmd()

Note

This bug couldn't be reproduced all the time, but very high frequence

Before fix:

image

After fix:

image

@Halimao Halimao requested a review from a team as a code owner December 14, 2023 09:15
Copy link
Contributor

coderabbitai bot commented Dec 14, 2023

Walkthrough

The changes in the x/auth package of the Cosmos SDK involve the removal of certain dependencies and a shift in the command handling strategy. An import related to cryptographic functionality (secp256r1) has been removed, suggesting a deprecation or relocation. Additionally, vesting-related CLI dependencies have been eliminated, and the GetTxCmd function has been altered to return nil, indicating a possible restructuring or simplification of transaction command registration.

Changes

Files Change Summary
x/auth/autocli.go, x/auth/module.go Removed import: cosmossdk.io/api/cosmos/crypto/secp256r1; Removed import: cosmossdk.io/x/auth/vesting/client/cli; Altered GetTxCmd function to return nil
CHANGELOG.md Bug fixes related to subcommands, error handling, gas fee computation, and termination behavior in the x/auth module.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on X ?


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • You can reply to a review comment made by CodeRabbit.
  • You can tag CodeRabbit on specific lines of code or files in the PR by tagging @coderabbitai in a comment.
  • You can tag @coderabbitai in a PR comment and ask one-off questions about the PR and the codebase. Use quoted replies to pass the context for follow-up questions.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

@Halimao Halimao changed the title fix(x/auth): duplicate vesting subcommands for <appd> tx --help fix(x/auth): duplicate vesting subcommands of <appd> tx --help Dec 14, 2023
Copy link
Member

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, just one comment

x/auth/module.go Show resolved Hide resolved
x/auth/module.go Outdated Show resolved Hide resolved
Copy link
Member

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Copy link
Contributor

@atheeshp atheeshp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@atheeshp atheeshp enabled auto-merge December 14, 2023 13:17
@julienrbrt julienrbrt disabled auto-merge December 14, 2023 13:18
CHANGELOG.md Outdated Show resolved Hide resolved
@julienrbrt julienrbrt enabled auto-merge December 14, 2023 13:28
@julienrbrt julienrbrt added this pull request to the merge queue Dec 14, 2023
Merged via the queue into cosmos:main with commit f1e6729 Dec 14, 2023
53 of 56 checks passed
@Halimao Halimao deleted the fix/auth-tx branch December 14, 2023 13:48
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 this pull request may close these issues.

3 participants