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

Adding support for Ledger Cosmos App v1.5 #4227

Merged
merged 19 commits into from
Apr 30, 2019
Merged

Conversation

jleni
Copy link
Member

@jleni jleni commented Apr 29, 2019

This PR adds support for the latest version of the Cosmos App (v.1.5)
Attention: The app is not been released yet by Ledger but the PR is backwards compatible.
We can later remove backwards compatibility and enforce v1.5 only.

When creating a new account, gaiacli now shows the account/index and address in the device and requires user confirmation.

Related PRs:
cosmos/ledger-cosmos-go#3
cosmos/ledger-cosmos-go#4
cosmos/ledger-cosmos-go#5
cosmos/ledger-cosmos-go#6

Changes in the app can be found here:
LedgerHQ/ledger-app-cosmos#5

  • Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
  • Wrote tests
  • Updated relevant documentation (docs/)
  • Added a relevant changelog entry: sdkch add [section] [stanza] [message]
  • rereviewed Files changed in the github PR explorer

For Admin Use:

  • Added appropriate labels to PR (ex. wip, ready-for-review, docs)
  • Reviewers Assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

jleni and others added 6 commits April 29, 2019 09:32
Co-Authored-By: jleni <juan.leni@zondax.ch>
Co-Authored-By: jleni <juan.leni@zondax.ch>
Co-Authored-By: jleni <juan.leni@zondax.ch>
@jleni jleni changed the title Fix/app v1.5 Adding support for Ledger Cosmos App v1.5 Apr 29, 2019
@jleni jleni added C:CLI C:Ledger Issues and features related Ledger integration and functionality ready-for-review labels Apr 29, 2019
@fedekunze
Copy link
Collaborator

should we block this PR until LedgerHQ/ledger-app-cosmos#5 is merged ?

Copy link
Collaborator

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

Thanks @jleni ! minor comments only. Does this require a docs update somewhere ?

crypto/ledger_secp256k1.go Outdated Show resolved Hide resolved
crypto/ledger_secp256k1.go Outdated Show resolved Hide resolved
crypto/ledger_secp256k1.go Outdated Show resolved Hide resolved
crypto/ledger_secp256k1.go Outdated Show resolved Hide resolved
crypto/ledger_secp256k1.go Outdated Show resolved Hide resolved
crypto/ledger_secp256k1.go Outdated Show resolved Hide resolved
crypto/ledger_secp256k1.go Outdated Show resolved Hide resolved
crypto/ledger_secp256k1.go Outdated Show resolved Hide resolved
crypto/ledger_test.go Outdated Show resolved Hide resolved
crypto/ledger_test.go Outdated Show resolved Hide resolved
@jleni
Copy link
Member Author

jleni commented Apr 29, 2019

should we block this PR until LedgerHQ/ledger-app-cosmos#5 is merged ?

It should be backwards compatible. It uses old APIs if the app version number is <1.5.
Just in case, would you mind testing locally too to confirm?

Copy link
Collaborator

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

tested ACK, although there's an UX issue if the address is rejected

crypto/ledger_secp256k1.go Outdated Show resolved Hide resolved
fedekunze and others added 10 commits April 29, 2019 16:40
Co-Authored-By: jleni <juan.leni@zondax.ch>
Co-Authored-By: jleni <juan.leni@zondax.ch>
Co-Authored-By: jleni <juan.leni@zondax.ch>
Co-Authored-By: jleni <juan.leni@zondax.ch>
Co-Authored-By: jleni <juan.leni@zondax.ch>
Co-Authored-By: jleni <juan.leni@zondax.ch>
Co-Authored-By: jleni <juan.leni@zondax.ch>
Co-Authored-By: jleni <juan.leni@zondax.ch>
Co-Authored-By: jleni <juan.leni@zondax.ch>
Co-Authored-By: jleni <juan.leni@zondax.ch>
Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

TestedACK -- just a few minor bits of feedback. Thanks @jleni

crypto/keys/lazy_keybase.go Outdated Show resolved Hide resolved
crypto/keys/types.go Outdated Show resolved Hide resolved
crypto/ledger_mock.go Outdated Show resolved Hide resolved
crypto/ledger_secp256k1.go Outdated Show resolved Hide resolved
@jleni
Copy link
Member Author

jleni commented Apr 29, 2019

applied all the suggestions

Copy link
Collaborator

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

LGTM

@alessio alessio merged commit 1306a25 into cosmos:master Apr 30, 2019
@jleni jleni deleted the fix/app_v1.5 branch May 21, 2019 10:10
alexanderbez added a commit that referenced this pull request May 23, 2019
* Cherry Pick PR #4345: Upgrade ledger-cosmos-go

* Cherry Pick PR #4336: Fix AppendTags usage error

* Update modules

* Cherry Pick PR #4265: CacheKVStore keep sorted items

* Cherry Pick #4227: Adding support for Ledger Cosmos App v1.5

* Cherry Pick #4395: Improve sig verification error message

* Cherry Pick PR #4140: Fix Failed Simulation Seeds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:CLI C:Ledger Issues and features related Ledger integration and functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants