Skip to content
This repository has been archived by the owner on Jun 5, 2019. It is now read-only.

Add Lisk support to trezorctl #197

Merged
merged 6 commits into from
Apr 18, 2018
Merged

Conversation

alepop
Copy link
Contributor

@alepop alepop commented Jan 6, 2018

Messages: trezor/trezor-common#68

Progress:

  • Lisk get address
  • Lisk get public key
  • Lisk sign message
  • Lisk verify message
  • Lisk sign tx
    • send transaction
    • signature ransaction
    • delegate transaction
    • vote transaction
    • multisignature transaction
      dApp tx types wil not allowed in the Lisk 1.0 release
      dapp tansaction
      dapp In transfer transaction
      dapp out transfer transaction

@alepop alepop force-pushed the add-lisk-support branch 7 times, most recently from 619253a to 14fad6e Compare January 8, 2018 20:26
@prusnak prusnak added the altcoin label Mar 7, 2018
@alepop alepop force-pushed the add-lisk-support branch from e4f58a1 to 4777a7b Compare March 9, 2018 10:18
@alepop alepop force-pushed the add-lisk-support branch 5 times, most recently from beeeb65 to a5538c4 Compare March 19, 2018 10:37
@alepop alepop mentioned this pull request Mar 19, 2018
10 tasks
@alepop alepop changed the title [WIP] Add Lisk support to trezorctl Add Lisk support to trezorctl Mar 21, 2018
@alepop alepop force-pushed the add-lisk-support branch 3 times, most recently from a4f6f1b to 09970dc Compare March 26, 2018 15:45
@prusnak
Copy link
Member

prusnak commented Apr 11, 2018

@matejcik I merged in trezor-common changes for Lisk messages in trezor/trezor-common@6a7710c

The Protobuf API is VERY similar to the Bitcoin API, so trezorctl/client changes should be also very similar.

Can you please review this PR to python-trezor?

Not sure about auto-generated messages in trezorlib/messages do we still want to generate and commit them into git? Shouldn't they be generated when needed, so a simple bump of vendor/trezor-common will do the trick?

One final note: Lisk is implemented only for T2 (in trezor-core), so tests should include skip_t1.

@alepop
Copy link
Contributor Author

alepop commented Apr 11, 2018

@prusnak skip_t1added

@matejcik
Copy link
Contributor

@prusnak the "generated messages in git" are to support people who don't have (the appropriate version of) protoc -- of course you need that to contribute the regenerated messages, but users who checkout the repository or use the sdist from PyPI don't need it. Not to mention Windows where you'd need to run a shell script.
Given that it's a single-command step for contributors, and that you can regenerate messages and bump trezor-common in one commit (so no churn), to me it seems a reasonable tradeoff.

@prusnak
Copy link
Member

prusnak commented Apr 11, 2018

to me it seems a reasonable tradeoff

Agreed!

@prusnak prusnak added this to the v0.9.2 milestone Apr 11, 2018
Copy link
Contributor

@matejcik matejcik left a comment

Choose a reason for hiding this comment

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

mostly LGTM, apart from one nitpick.

resp = self.call(proto.LiskVerifyMessage(signature=signature, public_key=pubkey, message=message))
except CallException as e:
resp = e
if isinstance(resp, proto.Success):
Copy link
Contributor

Choose a reason for hiding this comment

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

please change this to return isinstance(...)
(yes, all other verify_message functions have this. that will be changed, let's not put it into new code)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@matejcik done

@matejcik
Copy link
Contributor

the code looks mostly good.

however what I see as a problem is that several clearly numeric fields are declared as strings?
that doesn't seem right - unless that's intentional (Lisk docs seem to suggest that it isn't), it should be fixed. in trezor-common first and then in the other PRs

@prusnak
Copy link
Member

prusnak commented Apr 12, 2018

Please wait with the merge until we resolve int/string discussion in trezor/trezor-core#90

@matejcik
Copy link
Contributor

@alepop when the int conversion goes through, please rebase this PR onto current master, update the trezor-common submodule and regenerate the protobuf messages. thanks.

@alepop alepop force-pushed the add-lisk-support branch 2 times, most recently from 1a60697 to f500dc5 Compare April 16, 2018 19:05
@alepop alepop force-pushed the add-lisk-support branch from f500dc5 to adc6258 Compare April 16, 2018 19:21
@alepop
Copy link
Contributor Author

alepop commented Apr 16, 2018

@matejcik done.

@matejcik
Copy link
Contributor

looks good, thanks

@matejcik matejcik merged commit 45cca15 into trezor:master Apr 18, 2018
@alepop alepop mentioned this pull request May 14, 2018
10 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants