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

feat(client/v2): signing #17913

Merged
merged 3 commits into from
Oct 5, 2023
Merged

feat(client/v2): signing #17913

merged 3 commits into from
Oct 5, 2023

Conversation

julienrbrt
Copy link
Member

@julienrbrt julienrbrt commented Sep 27, 2023

Description

Closes: #17765

For trying locally, re-add this commit (2e4726b) and do:

make install
make init-simapp
simd start

And in another terminal, simd tx bank send alice bob 100stake

Changes

  • Extend AutoCLI keyring interface to prepare for future abstraction from client/tx
  • Add helper for SDK keyring to support client/v2 keyring
  • Add automatic support of --from flag or positional argument as signer
  • AutoCLI flags refactor (to eventually abstract from client/flags)
  • Better separate flag builder and command builder
  • Signing support 🚀
  • Add proto v2 support in NewAnyWithValue (marshal only)
  • Nit, remove last GetSigners from bank send

Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

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)

@julienrbrt julienrbrt added the backport/v0.50.x PR scheduled for inclusion in the v0.50's next stable release label Sep 27, 2023
@github-actions github-actions bot removed the C:x/auth label Sep 29, 2023
x/bank/autocli.go Outdated Show resolved Hide resolved
client/v2/autocli/msg.go Outdated Show resolved Hide resolved
@julienrbrt julienrbrt marked this pull request as ready for review October 2, 2023 07:47
@julienrbrt julienrbrt requested a review from a team as a code owner October 2, 2023 07:47
@github-actions

This comment has been minimized.

@julienrbrt julienrbrt marked this pull request as draft October 3, 2023 00:19
@julienrbrt julienrbrt marked this pull request as ready for review October 3, 2023 17:24
CHANGELOG.md Outdated Show resolved Hide resolved
client/v2/README.md Outdated Show resolved Hide resolved
@tac0turtle
Copy link
Member

got decoding bech32 failed: invalid bech32 string length 3 when testing locally.

@julienrbrt
Copy link
Member Author

got decoding bech32 failed: invalid bech32 string length 3 when testing locally.

This means you are using the current bank send command.
You need to add AutoCLI options in bank. Check the commit in the PR description that shows what to add.

// signer related logic, triggers only when there is a signer defined
if binder.SignerInfo.FieldName != "" {
// mark the signer flag as required if defined
// TODO(@julienrbrt): UX improvement by only marking the flag as required when there is more than one key in the keyring;
Copy link
Contributor

Choose a reason for hiding this comment

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

let's add an issue for this todo

Copy link
Contributor

@testinginprod testinginprod 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
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, thanks 🎉

@julienrbrt julienrbrt added this pull request to the merge queue Oct 5, 2023
Merged via the queue into main with commit b62301d Oct 5, 2023
51 of 52 checks passed
@julienrbrt julienrbrt deleted the julien/autocli-from branch October 5, 2023 11:06
mergify bot pushed a commit that referenced this pull request Oct 5, 2023
(cherry picked from commit b62301d)

# Conflicts:
#	CHANGELOG.md
#	client/v2/autocli/app.go
#	client/v2/autocli/builder.go
#	client/v2/autocli/common_test.go
#	client/v2/autocli/flag/address.go
#	client/v2/autocli/flag/builder.go
#	client/v2/autocli/msg_test.go
#	client/v2/go.mod
#	client/v2/go.sum
#	simapp/simd/cmd/root.go
#	simapp/simd/cmd/root_v2.go
julienrbrt added a commit that referenced this pull request Oct 5, 2023
Co-authored-by: Julien Robert <julien@rbrt.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/v0.50.x PR scheduled for inclusion in the v0.50's next stable release C:CLI C:x/auth C:x/bank
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AutoCLI tx signing
5 participants