Skip to content

feat: add --qrcode flag to keys show command (backport #18557)#24011

Merged
aljo242 merged 7 commits into
release/v0.53.xfrom
mergify/bp/release/v0.53.x/pr-18557
Mar 20, 2025
Merged

feat: add --qrcode flag to keys show command (backport #18557)#24011
aljo242 merged 7 commits into
release/v0.53.xfrom
mergify/bp/release/v0.53.x/pr-18557

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented Mar 16, 2025

Description

Closes: #23777


Closes: #18556

simd keys show account1 --address=true --qrcode=true

Screenshot from 2023-11-26 12-03-58


Author Checklist

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • run make lint and make test
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

Summary by CodeRabbit

  • New Features

    • Introduced a --qrcode flag for the keys show command to display keys as a payment QR code.
    • Added support for a default key name in client.toml, eliminating the need for the --from flag during transactions.
  • Enhancements

    • Implemented a new key_rotation_fee parameter in the x/staking module for fee calculation during key rotations.
    • Added a SubmitTestTx helper method in testutil for broadcasting test transactions in end-to-end tests.
  • Tests

    • Expanded test coverage for the keys show command with new test cases for QR code display and key management scenarios.
  • Documentation

    • Updated CHANGELOG.md with a summary of new features and enhancements.

This is an automatic backport of pull request #18557 done by [Mergify](https://mergify.com).

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
(cherry picked from commit 536bd3a)

# Conflicts:
#	CHANGELOG.md
#	go.mod
#	go.sum
#	simapp/go.mod
#	simapp/go.sum
#	simapp/gomod2nix.toml
@mergify mergify Bot added the conflicts label Mar 16, 2025
@mergify mergify Bot requested a review from a team March 16, 2025 20:24
@mergify
Copy link
Copy Markdown
Contributor Author

mergify Bot commented Mar 16, 2025

Cherry-pick of 536bd3a has failed:

On branch mergify/bp/release/v0.53.x/pr-18557
Your branch is up to date with 'origin/release/v0.53.x'.

You are currently cherry-picking commit 536bd3a95.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   client/keys/show.go
	modified:   client/keys/show_test.go

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	both modified:   CHANGELOG.md
	both modified:   go.mod
	both modified:   go.sum
	both modified:   simapp/go.mod
	both modified:   simapp/go.sum
	deleted by us:   simapp/gomod2nix.toml

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@github-actions github-actions Bot added C:CLI C:Keys Keybase, KMS and HSMs labels Mar 16, 2025
@julienrbrt julienrbrt marked this pull request as draft March 16, 2025 20:25
@julienrbrt julienrbrt self-assigned this Mar 16, 2025
@aljo242
Copy link
Copy Markdown
Contributor

aljo242 commented Mar 18, 2025

@julienrbrt need anyone to take this over?

@julienrbrt
Copy link
Copy Markdown
Contributor

@julienrbrt need anyone to take this over?

i'll quickly finish this tonight! should be easy enough :)

@julienrbrt julienrbrt marked this pull request as ready for review March 18, 2025 21:04
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ govulncheck found vulnerabilities:

mkdir -p /home/runner/work/cosmos-sdk/cosmos-sdk/build/
GOBIN=/home/runner/work/cosmos-sdk/cosmos-sdk/build go install golang.org/x/vuln/cmd/govulncheck@latest
go: downloading golang.org/x/vuln v1.1.4
go: downloading golang.org/x/telemetry v0.0.0-20240522233618-39ace7a40ae7
go: downloading golang.org/x/mod v0.22.0
go: downloading golang.org/x/tools v0.29.0
/home/runner/work/cosmos-sdk/cosmos-sdk/build/govulncheck ./...
=== Symbol Results ===

Vulnerability #1: GO-2025-3443
    CometBFT allows a malicious peer to stall the network by disseminating
    seemingly valid block parts in github.com/cometbft/cometbft
  More info: https://pkg.go.dev/vuln/GO-2025-3443
  Module: github.com/cometbft/cometbft
    Found in: github.com/cometbft/cometbft@v0.38.17
    Fixed in: github.com/cometbft/cometbft@v1.0.1
    Example traces found:
      #1: testutil/network/util.go:74:24: network.startInProcess calls service.BaseService.Start, which eventually calls types.Part.ValidateBasic
      #2: testutil/network/util.go:74:24: network.startInProcess calls service.BaseService.Start, which eventually calls types.Part.ValidateBasic
      #3: client/rpc/block.go:56:36: rpc.QueryBlocks calls local.Local.BlockSearch, which eventually calls types.PartFromProto
      #4: client/rpc/block.go:56:36: rpc.QueryBlocks calls local.Local.BlockSearch, which eventually calls types.PartFromProto

Your code is affected by 1 vulnerability from 1 module.
This scan also found 0 vulnerabilities in packages you import and 2
vulnerabilities in modules you require, but your code doesn't appear to call
these vulnerabilities.
Use '-show verbose' for more details.
make: *** [Makefile:155: vulncheck] Error 3

Copy link
Copy Markdown
Contributor

@aljo242 aljo242 left a comment

Choose a reason for hiding this comment

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

@julienrbrt looks like we need to clean up this changlog

@github-actions
Copy link
Copy Markdown
Contributor

    ⚠️ **govulncheck found vulnerabilities:**


    >mkdir -p /home/runner/work/cosmos-sdk/cosmos-sdk/build/

GOBIN=/home/runner/work/cosmos-sdk/cosmos-sdk/build go install golang.org/x/vuln/cmd/govulncheck@latest
go: downloading golang.org/x/vuln v1.1.4
go: downloading golang.org/x/telemetry v0.0.0-20240522233618-39ace7a40ae7
go: downloading golang.org/x/mod v0.22.0
go: downloading golang.org/x/tools v0.29.0
/home/runner/work/cosmos-sdk/cosmos-sdk/build/govulncheck ./...
=== Symbol Results ===

Vulnerability #1: GO-2025-3443
CometBFT allows a malicious peer to stall the network by disseminating
seemingly valid block parts in github.com/cometbft/cometbft
More info: https://pkg.go.dev/vuln/GO-2025-3443
Module: github.com/cometbft/cometbft
Found in: github.com/cometbft/cometbft@v0.38.17
Fixed in: github.com/cometbft/cometbft@v1.0.1
Example traces found:
#1: testutil/network/util.go:74:24: network.startInProcess calls service.BaseService.Start, which eventually calls types.Part.ValidateBasic
#2: testutil/network/util.go:74:24: network.startInProcess calls service.BaseService.Start, which eventually calls types.Part.ValidateBasic
#3: client/rpc/block.go:56:36: rpc.QueryBlocks calls local.Local.BlockSearch, which eventually calls types.PartFromProto
#4: client/rpc/block.go:56:36: rpc.QueryBlocks calls local.Local.BlockSearch, which eventually calls types.PartFromProto

Your code is affected by 1 vulnerability from 1 module.
This scan also found 0 vulnerabilities in packages you import and 2
vulnerabilities in modules you require, but your code doesn't appear to call
these vulnerabilities.
Use '-show verbose' for more details.
make: *** [Makefile:155: vulncheck] Error 3

@julienrbrt
Copy link
Copy Markdown
Contributor

@julienrbrt looks like we need to clean up this changlog

What's wrong with the changelog? 🤔

@julienrbrt julienrbrt requested a review from aljo242 March 19, 2025 20:18
@github-actions
Copy link
Copy Markdown
Contributor

    ⚠️ **govulncheck found vulnerabilities:**


    >mkdir -p /home/runner/work/cosmos-sdk/cosmos-sdk/build/

GOBIN=/home/runner/work/cosmos-sdk/cosmos-sdk/build go install golang.org/x/vuln/cmd/govulncheck@latest
go: downloading golang.org/x/vuln v1.1.4
go: downloading golang.org/x/telemetry v0.0.0-20240522233618-39ace7a40ae7
go: downloading golang.org/x/mod v0.22.0
go: downloading golang.org/x/tools v0.29.0
/home/runner/work/cosmos-sdk/cosmos-sdk/build/govulncheck ./...
=== Symbol Results ===

Vulnerability #1: GO-2025-3443
CometBFT allows a malicious peer to stall the network by disseminating
seemingly valid block parts in github.com/cometbft/cometbft
More info: https://pkg.go.dev/vuln/GO-2025-3443
Module: github.com/cometbft/cometbft
Found in: github.com/cometbft/cometbft@v0.38.17
Fixed in: github.com/cometbft/cometbft@v1.0.1
Example traces found:
#1: testutil/network/util.go:74:24: network.startInProcess calls service.BaseService.Start, which eventually calls types.Part.ValidateBasic
#2: testutil/network/util.go:74:24: network.startInProcess calls service.BaseService.Start, which eventually calls types.Part.ValidateBasic
#3: client/rpc/block.go:56:36: rpc.QueryBlocks calls local.Local.BlockSearch, which eventually calls types.PartFromProto
#4: client/rpc/block.go:56:36: rpc.QueryBlocks calls local.Local.BlockSearch, which eventually calls types.PartFromProto

Your code is affected by 1 vulnerability from 1 module.
This scan also found 0 vulnerabilities in packages you import and 2
vulnerabilities in modules you require, but your code doesn't appear to call
these vulnerabilities.
Use '-show verbose' for more details.
make: *** [Makefile:155: vulncheck] Error 3

@github-actions
Copy link
Copy Markdown
Contributor

    ⚠️ **govulncheck found vulnerabilities:**


    >mkdir -p /home/runner/work/cosmos-sdk/cosmos-sdk/build/

GOBIN=/home/runner/work/cosmos-sdk/cosmos-sdk/build go install golang.org/x/vuln/cmd/govulncheck@latest
go: downloading golang.org/x/vuln v1.1.4
go: downloading golang.org/x/telemetry v0.0.0-20240522233618-39ace7a40ae7
go: downloading golang.org/x/mod v0.22.0
go: downloading golang.org/x/tools v0.29.0
/home/runner/work/cosmos-sdk/cosmos-sdk/build/govulncheck ./...
=== Symbol Results ===

Vulnerability #1: GO-2025-3443
CometBFT allows a malicious peer to stall the network by disseminating
seemingly valid block parts in github.com/cometbft/cometbft
More info: https://pkg.go.dev/vuln/GO-2025-3443
Module: github.com/cometbft/cometbft
Found in: github.com/cometbft/cometbft@v0.38.17
Fixed in: github.com/cometbft/cometbft@v1.0.1
Example traces found:
#1: testutil/network/util.go:74:24: network.startInProcess calls service.BaseService.Start, which eventually calls types.Part.ValidateBasic
#2: testutil/network/util.go:74:24: network.startInProcess calls service.BaseService.Start, which eventually calls types.Part.ValidateBasic
#3: client/rpc/block.go:56:36: rpc.QueryBlocks calls local.Local.BlockSearch, which eventually calls types.PartFromProto
#4: client/rpc/block.go:56:36: rpc.QueryBlocks calls local.Local.BlockSearch, which eventually calls types.PartFromProto

Your code is affected by 1 vulnerability from 1 module.
This scan also found 0 vulnerabilities in packages you import and 2
vulnerabilities in modules you require, but your code doesn't appear to call
these vulnerabilities.
Use '-show verbose' for more details.
make: *** [Makefile:155: vulncheck] Error 3

@aljo242 aljo242 merged commit 2a67b26 into release/v0.53.x Mar 20, 2025
@aljo242 aljo242 deleted the mergify/bp/release/v0.53.x/pr-18557 branch March 20, 2025 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C:CLI C:Keys Keybase, KMS and HSMs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants