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

Finalize implementation of keepkey and add automated tests for it #102

Merged
merged 10 commits into from
Jan 14, 2019

Conversation

achow101
Copy link
Member

@achow101 achow101 commented Jan 11, 2019

Implements the signmessage, displayaddress, and signtx commands for the keepkey. This also completes its implementation and the documentation is updated as such.

Note that because the Keepkey is a clone of the Trezor, these implementations are copies of the Trezor ones modified slightly to work with the Keepkey library.

This also adds an automated test for the KeepKey using the KeepKey simulator.

@achow101
Copy link
Member Author

Due to a bug in the KeepKey python library, this currently cannot be merged as when the library is installed, pieces are missing. This will also cause it to fail travis for now.

@achow101 achow101 force-pushed the keepkey-test branch 11 times, most recently from 55a31d7 to 76bbe79 Compare January 11, 2019 18:09
@instagibbs
Copy link
Collaborator

is this WIP?

@achow101
Copy link
Member Author

is this WIP?

Kind of. It's waiting on upstream changes. However I have finished everything else.

@achow101 achow101 changed the title Automated test for KeepKey Finalize implementation of keepkey and add automated tests for it Jan 13, 2019
@achow101
Copy link
Member Author

achow101 commented Jan 13, 2019

Upstream has fixed their issues (besides their versioning and PyPi problems) so this is ready for review now. Instead of splitting implementation and tests, I have decided to just make them one large pr as having tests make it easier to check that the implementation is correct.

Also rebased.

@keepkeyjon
Copy link

I filed a few issues for things on our end that could be better:
keepkey/keepkey-firmware#78
keepkey/python-keepkey#40
keepkey/python-keepkey#39

All commands are implemented for the keepkey, so update the docs to
reflect that
Allows enumerating the UDPTransport in order to connect to the
Keepkey emulator.

Because the keepkey and trezor emulators use the same interface, some
conditions are used to avoid enumerating the emulator as the wrong type.
The trezor and keepkey emulators use the same port so they cannot
be run at the same time. To work around this, the emulators are
instead started and stopped before and after each test using
unittest's setUp and tearDown functions. However, other devices
which do not have conflicts can still be run at test suite creation
time. This is still done for the coldcard.

Furthermore, since the trezor and keepkey both create and use
emulator.img files in the current working directory, when they are
started, the working directory is changed to be the one containing
the emulator executable to avoid conflicting emulator.img files
@instagibbs
Copy link
Collaborator

utACK

@achow101 achow101 merged commit 8ddf434 into master Jan 14, 2019
achow101 added a commit that referenced this pull request Jan 14, 2019
…s for it

8ddf434 Refactor tests to optionally have emulator start and stop for each test (Andrew Chow)
a3f31aa Add keepkey automated test (Andrew Chow)
b7f5288 Use DebugLink for Keepkey UDPTransport (Andrew Chow)
8d53b7d Build keepkey emulator in setup_environment (Andrew Chow)
113bbe9 Enumerate the keepkey emulator (Andrew Chow)
50e72ad Update documentation for keepkey (Andrew Chow)
6857593 Implement multisig input signing and fixes to signtx for keepkey (Andrew Chow)
9d6949d Implement displayaddress for keepkey (Andrew Chow)
80873f9 Implement signmessage for keepkey (Andrew Chow)
bf67fc6 Use keepkey 6.0.1 from keepkey/python-keepkey repo (Andrew Chow)

Pull request description:

  Implements the signmessage, displayaddress, and signtx commands for the keepkey. This also completes its implementation and the documentation is updated as such.

  Note that because the Keepkey is a clone of the Trezor, these implementations are copies of the Trezor ones modified slightly to work with the Keepkey library.

  This also adds an automated test for the KeepKey using the KeepKey simulator.

Tree-SHA512: 3e2491f4909df2a34e85dd7f051762cad8a12e948eb87709a6c943b9a62f2a208eb36966a80b50ffa2f976c49c775e944b796855f1caa00c1c812c2a8bf7b3c9
@achow101 achow101 deleted the keepkey-test branch January 14, 2019 20:52
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.

3 participants