Skip to content

feat(client/keys): check multisig key duplicate#18703

Merged
julienrbrt merged 8 commits into
cosmos:mainfrom
levisyin:feat/check-duplicate-key
Dec 13, 2023
Merged

feat(client/keys): check multisig key duplicate#18703
julienrbrt merged 8 commits into
cosmos:mainfrom
levisyin:feat/check-duplicate-key

Conversation

@levisyin
Copy link
Copy Markdown
Contributor

Description

This pr added a support for checking <appd> keys multisig keys duplicate.

  • <appd> keys add
  • <appd> keys show

And btw, add simapp/simd/simd to .gitignore

@levisyin levisyin requested a review from a team December 12, 2023 05:48
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 12, 2023

Walkthrough

The recent updates include enhancements to the client/keys module to prevent duplicate keys in multisig configurations, improvements to genesis validation in the x/gov module, and a shift from panicking to error handling in the x/bank, x/distribution, and x/slashing modules. These changes aim to improve the robustness and reliability of the codebase by ensuring better error management and validation processes.

Changes

File(s) Summary
.gitignore Added entry to ignore the "simapp/simd/simd" directory.
client/keys/add.go, client/keys/show.go Modified logic to use a keyFilter map for checking duplicate keys and updated variable naming.
client/keys/add_test.go Added Test_runAddCmdMultisig function to test multisig key addition and error handling for duplicates.
CHANGELOG.md Documented enhancements to client/keys module, genesis validation in x/gov, and error handling improvements in x/bank, x/distribution, and x/slashing.

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

Copy link
Copy Markdown
Contributor

@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.

For keys add it makes sense for keys show not so sure. If people rely on this weird behavior, then 0.51 won't work for them anymore.

@levisyin
Copy link
Copy Markdown
Contributor Author

For keys add it makes sense for keys show not so sure. If people rely on this weird behavior they 0.51 won't work for them anymore.

What about showing warning message instead of return error(break the process)?

@julienrbrt
Copy link
Copy Markdown
Contributor

For keys add it makes sense for keys show not so sure. If people rely on this weird behavior they 0.51 won't work for them anymore.

What about showing warning message instead of return error(break the process)?

Yes, I think it's better for show to do it that way!

Comment thread CHANGELOG.md Outdated
levisyin and others added 3 commits December 12, 2023 18:31
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@odeke-em odeke-em left a comment

Choose a reason for hiding this comment

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

Nice work, and thank you @levisyin! Mostly LGTM, but just some suggestions like tightening up the tests.

Comment thread client/keys/add.go Outdated
Comment thread client/keys/add.go Outdated
Comment thread client/keys/add_test.go Outdated
Comment thread client/keys/show.go Outdated
Comment thread client/keys/show.go Outdated
Comment thread client/keys/show.go
Comment thread client/keys/show_test.go
Comment thread client/keys/show.go Outdated
Comment thread client/keys/show_test.go
Comment thread client/keys/add.go
@levisyin levisyin requested a review from odeke-em December 13, 2023 01:32
Copy link
Copy Markdown
Contributor

@odeke-em odeke-em left a comment

Choose a reason for hiding this comment

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

LGTM, thank you @levisyin!

@levisyin levisyin requested a review from julienrbrt December 13, 2023 02:14
Copy link
Copy Markdown
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

Copy link
Copy Markdown
Contributor

@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.

utACK!

@julienrbrt julienrbrt added this pull request to the merge queue Dec 13, 2023
Merged via the queue into cosmos:main with commit f876b14 Dec 13, 2023
@levisyin levisyin deleted the feat/check-duplicate-key branch December 13, 2023 08:30
@aljo242
Copy link
Copy Markdown
Contributor

aljo242 commented Mar 26, 2025

@Mergiyio backport release/v0.53.x

@aljo242
Copy link
Copy Markdown
Contributor

aljo242 commented Mar 26, 2025

@Mergifyio backport release/v0.53.x

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Mar 26, 2025

backport release/v0.53.x

✅ Backports have been created

Details

mergify Bot pushed a commit that referenced this pull request Mar 26, 2025
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
(cherry picked from commit f876b14)

# Conflicts:
#	CHANGELOG.md
#	client/keys/show.go
github-merge-queue Bot pushed a commit that referenced this pull request Mar 27, 2025
…4153)

Co-authored-by: levisyin <150114626+levisyin@users.noreply.github.com>
Co-authored-by: aljo242 <alex@interchainlabs.io>
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.

6 participants