1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-02 20:48:30 +00:00
Commit Graph

7223 Commits

Author SHA1 Message Date
matejcik
c3112fd83d embed/trezorhal: only poll CTPM when touch is detected
Because CTPM dislikes being polled when no touches are seen, keeps
resetting, and maybe freezes once in a while. This is very likely a fix
for #334.

Before, we would simply read the touch registers on every loop. Now we
first check whether the interrupt line is down, which indicates that the
CTPM has data to tell us.

Tracking the `touching` flag is necessary, as sometimes we don't poll
frequently enough to catch the TOUCH_END event before interrupt line
goes up again.
The `last_packet` handling miiight not be necessary - AFAICT, the CTPM
has some sort of buffer and always returns TOUCH_START at first and
TOUCH_END at last. Still, better safe than sorry.
2018-11-26 14:47:06 +01:00
Tomas Susanka
72bc784f7f Revert "TEMPORARY: run tests against tsusanka/paths python-trezor branch"
This reverts commit 2acf0d10bd.
2018-11-21 17:21:28 +01:00
Tomas Susanka
786bccfa34 tests/lisk: all all all seed 2018-11-21 17:08:18 +01:00
Tomas Susanka
29d3a21d84 tests/eth: all all all seed 2018-11-21 17:08:18 +01:00
Tomas Susanka
f5af12c043 paths: compatibility for derivation paths checks 2018-11-21 17:08:18 +01:00
matejcik
a1265b48d1 support: add ETH and ETC as supported in webwallet
also use this information when generating coins_details.json
2018-11-20 18:00:38 +01:00
matejcik
88fa3c7381 cointool: fix uniformity check
also uniformize misc.json
2018-11-20 17:59:15 +01:00
matejcik
56fbd816c9 improve wallet lists
- move bitcoin wallet links from coins_details.override.json to a separate
wallets.json file
- drop NanoWallet links from nem nem_mosaics.json, auto-add them in
coins_details.py instead
- move misc wallet links to misc.json
- clean out override file
- change wallet format in coins_details.json:
  - they're now list instead of dict, so that we can specify ordering
- add Trezor Beta wallet link to ETH/ETC and their tokens
- somewhat stricter checking of trezor.io wallet data
2018-11-20 17:27:12 +01:00
martin
beb8bb6dec increase version for DGB
Increase version for DGB to 1.6.3 and 2.0.7. Motivation is to make it work seamlessly in current webwallet. Lower versions would need some workarounds.
2018-11-20 14:18:46 +01:00
Jan Pochyla
1782b0273c
Merge pull request #341 from trezor/tsusanka/paths
Bip 44 path checks
2018-11-19 15:54:11 +01:00
Tomas Susanka
016a71c6d0 protobuf: eth fix 2018-11-16 14:14:18 +01:00
Tomas Susanka
ff34e73f9c protobuf: EthereumPublicKey 2018-11-16 14:12:52 +01:00
Pavol Rusnak
caa4a87c5c
defs: remove USDT erc20 2018-11-16 01:45:53 +01:00
Pavol Rusnak
b646fe1928
defs: regenerate coins_details.json 2018-11-16 01:44:46 +01:00
Pavol Rusnak
b4e5684093
defs/misc: add maid, omni, usdt 2018-11-16 01:43:32 +01:00
Pavol Rusnak
b1b592f062
defs: fix t2 support version 2018-11-16 01:31:02 +01:00
Pavol Rusnak
1fa013ddca
defs: EOS erc20 not required anymore in override.json 2018-11-16 01:26:17 +01:00
Pavol Rusnak
67d699ca3f
defs: add Tezos SimpleStaking wallet 2018-11-16 01:21:44 +01:00
Pavol Rusnak
b1725e7264
fsm: return xpub for multisig 2018-11-15 13:43:08 +01:00
Pavol Rusnak
b1566e9d57
src/apps/wallet/get_public_key: return xpub for multisig 2018-11-15 13:41:19 +01:00
Pavol Rusnak
da3223d703
tests: change flags for test_msg_signtx_capricoin.py 2018-11-14 17:36:19 +01:00
Tibor Arpas
be58549fd9
src/apps/wallet/sign_tx: handle timestamp field 2018-11-14 17:33:03 +01:00
Pavol Rusnak
1d43322d21
src/trezor/messages: regenerate 2018-11-14 17:31:17 +01:00
Pavol Rusnak
b3e668db8b
embed/extmod/modtrezorconfig: small refactor to storage 2018-11-14 16:25:36 +01:00
Pavol Rusnak
113a557f17
embed/trezorhal+unix: small refactor to flash.c 2018-11-14 15:12:19 +01:00
Pavol Rusnak
8d7dd590ff
defs: change trc contact 2018-11-14 11:17:28 +01:00
Pavol Rusnak
d2f1a4db11
changelog: update 2018-11-13 16:52:34 +01:00
Pavol Rusnak
ca24156eb5
changelog: update 2018-11-13 16:51:26 +01:00
Pavol Rusnak
9cd261c81a
layout: parse and show OMNI transactions 2018-11-13 16:50:10 +01:00
Pavol Rusnak
10a284f6ee
src/apps/wallet/sign_tx: make check for OMNI more strict 2018-11-13 16:33:14 +01:00
Pavol Rusnak
4693c071b4
src/apps/wallet/sign_tx: implement OMNI parsing in OP_RETURN layout 2018-11-13 14:29:40 +01:00
strmci
252f946f40 Add a test case for segwit inputs/outputs with very high amounts (#337)
Add a test case for segwit inputs/outputs with very high amount, fixes #332
2018-11-12 16:27:56 +01:00
Pavol Rusnak
0f2ec16609
vendor: update trezor-common
bump fw version to 1.7.2
2018-11-12 14:17:25 +01:00
Pavol Rusnak
342c3646e1
vendor: update trezor-common 2018-11-12 14:14:25 +01:00
Pavol Rusnak
8c53177626
defs: remove eos, trx erc20 tokens 2018-11-12 14:12:26 +01:00
Pavol Rusnak
3600af0c8e
defs: add eos, trx 2018-11-12 14:03:10 +01:00
Pavol Rusnak
9f02376c70
support: replace soon with version where applicable 2018-11-12 14:03:10 +01:00
matejcik
780236ca77 build: add typing_extensions requirement 2018-11-12 12:55:28 +01:00
matejcik
5bb7dc39b8 transport: consolidate USB-based transports
remove Trezor 2 support from HID transport, which never worked

use ProtocolV1 explicitly everywhere, as V2 doesn't exist in practice

move USB IDs and UDEV warning string to a common place

fix a bug where HID would return a list instead of bytes
2018-11-12 12:22:32 +01:00
matejcik
d3534a15c9 transport: fix typing after autoflake treatment
autoflake will remove all unused imports when `make style` is invoked,
but can't recognize typing names that are only used in comments.

this fixes it.
2018-11-12 12:22:32 +01:00
matejcik
bfb56451e8 bridge: support bridge 2.0.25+
which can do read/write separately and supports debuglink
2018-11-12 12:22:32 +01:00
matejcik
ed473e2e42 trezorlib: add licence headers where missing 2018-11-12 12:22:32 +01:00
matejcik
93d84539bd transport: fit log messages to lines 2018-11-12 12:22:32 +01:00
matejcik
85b85c67b3 trezorlib: reentrant session handling
This fixes the breakage introduced by transport reshuffles.
It's still not great and I'd love to see context manager based sessions.
But it's good enough for now.
2018-11-12 12:22:32 +01:00
matejcik
daf97afb37 bridge: refactor after merging old changes 2018-11-12 12:22:32 +01:00
matejcik
aac7726824 trezorlib: transport/protocol reshuffle
This commit breaks session handling (which matters with Bridge) and
regresses Bridge to an older code state. Both of these issues will be
rectified in subsequent commits.

Explanation of this big API reshuffle follows:

* protocols are moved to trezorlib.transport, and to a single common file.
* there is a cleaner definition of Transport and Protocol API (see below)
* fully valid mypy type hinting
* session handle counters and open handle counters mostly went away. Transports
  and Protocols are meant to be "raw" APIs; TrezorClient will implement
  context-handler-based sessions, session tracking, etc.

I'm calling this a "reshuffle" because it involved very small number of
code changes. Most of it is moving things around where they sit better.

The API changes are as follows.

Transport is now a thing that can:
* open and close sessions
* read and write protobuf messages
* enumerate and find devices

Some transports (all except bridge) are technically bytes-based and need
a separate protocol implementation (because we have two existing protocols,
although only the first one is actually used). Hence a protocol superclass.

Protocol is a thing that *also* can:
* open and close sessions
* read and write protobuf messages
For that, it requires a `handle`.

Handle is a physical layer for a protocol. It can:
* open and close some sort of device connection
  (this is distinct from session! Connection is a channel over which you can
  send data. Session is a logical arrangement on top of that; you can have
  multiple sessions on a single connection.)
* read and write 64-byte chunks of data

With that, we introduce ProtocolBasedTransport, which simply delegates
the appropriate Transport functionality to respective Protocol methods.

hid and webusb transports are ProtocolBasedTransport-s that provide separate
device handles. HidHandle and WebUsbHandle existed before, but the distinction
of functionality between a Transport and its Handle was unclear. Some methods
were moved and now the handles implement the Handle API, while the transports
provide the enumeration parts of the Transport API, as well as glue between
the respective Protocols and Handles.

udp transport is also a ProtocolBasedTransport, but it acts as its own handle.
(That might be changed. For now, I went with the pre-existing structure.)

In addition, session_begin/end is renamed to begin/end_session to keep
consistent verb_noun naming.
2018-11-12 12:22:26 +01:00
Tomas Susanka
d83ef07d57 paths: typo, style 2018-11-12 12:21:40 +01:00
Tomas Susanka
2acf0d10bd TEMPORARY: run tests against tsusanka/paths python-trezor branch 2018-11-12 12:10:32 +01:00
Tomas Susanka
8cf1ee5e62 paths: temporarily disable GetPublicKey paths checks
Until trezor/trezor.js#73 is fixed
2018-11-12 12:10:32 +01:00
Tomas Susanka
31f987e988 coins: validate derivation paths
Based on SLIP-44 ids and other checks. See docs/coins/README for info.
2018-11-12 12:10:32 +01:00