1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-06-28 02:42:34 +00:00
Commit Graph

7184 Commits

Author SHA1 Message Date
matejcik
224e3c18f5 device_tests: fix test_protection_levels for T1
a couple expected ButtonRequests were missing
2018-05-22 20:12:45 +02:00
Pavol Rusnak
90975f6b6e
embed/extmod/modtrezorcrypto: add support to variable outlen for Blake2{b,s} 2018-05-22 19:44:52 +02:00
slush
8fc001154e Ignore cache files for coins_details.py 2018-05-22 19:44:00 +02:00
slush
70ae181ac9 Use coinmarketcap v2 API.
Ethereum tokens WIP.
2018-05-22 19:42:49 +02:00
Pavol Rusnak
9ac3515afd
defs: add ethereum/tokens submodules 2018-05-22 19:33:21 +02:00
Pavol Rusnak
a1204d8d7d
src: cleanup CoinType usage, don't return coins in Features 2018-05-22 18:52:26 +02:00
Pavol Rusnak
a83c64fbdb
protob: don't return coins in Features message 2018-05-22 18:40:15 +02:00
Pavol Rusnak
ae82735b6b
protob: remove Stellar{SignMessage,MessageSignature,VerifyMessage} 2018-05-22 18:32:21 +02:00
Pavol Rusnak
fb662e53b1
protob: remove {Lisk,Stellar}{SignMessage,MessageSignature,VerifyMessage} 2018-05-22 18:22:43 +02:00
matejcik
a4fe17b461 device_tests: xfail for decred. This should be investigated more though. 2018-05-22 17:51:41 +02:00
Pavol Rusnak
577cb361dc
src/trezor/crypto: add cashaddr support 2018-05-22 17:47:54 +02:00
matejcik
465c01d4f7 device_tests: add more currency markers
missed Stellar tests, plus Ethereum, for good measure
2018-05-22 17:29:03 +02:00
matejcik
af98a4071a device_tests: allow custom runxfail
We can now selectively runxfail certain tests. This is useful for
accepting PRs into trezor-core:

1. trezor-core is going to get a pytest.ini that sets xfail_strict.
   That means that if an `xfail`ed test actually passes, that will
   break the test suite. So it will be visible when we implement
   a feature for which tests exist.
2. To allow PRs to pass the test suite without touching python-trezor
   directly, we add a new pytest.ini option: run_xfail.
   This adds a list of markers which will ignore `xfail`.
   So:
   2.1 First, the python-trezor PR marks the tests with the name
       of the feature. This commit already does that: Lisk tests
       are marked `@pytest.mark.lisk`, NEMs are `@pytest.mark.nem`,
       etc.
       The tests will be also marked with `xfail`, because the
       feature is not in core yet.
   2.2 Then, the trezor-core PR implements the feature, which makes
       the `xfail`ed tests pass. That breaks the test suite.
   2.3 To fix the test suite, the core PR also adds a `run_xfail`
       to `pytest.ini`: `run_xfail = lisk`.
       (it can take a list: `run_xfail = lisk nem stellar`)
       That will make the test suite behave as if the tests are not
       `xfail`ed. If the feature is implemented correctly, the tests
       will pass.
   2.4 When the PR is accepted to core, the next step should be
       a PR to python-trezor that removes the `xfail`s. After that,
       we should also remove the `run_xfail` option, just to be tidy.
2018-05-22 17:29:03 +02:00
matejcik
003d77b209 testing: configure pytest.ini and update testing documentation
as per https://github.com/trezor/python-trezor/pull/263
2018-05-22 17:28:52 +02:00
Pavol Rusnak
1a7483d43d
cashaddr: fix whitespace 2018-05-22 16:55:37 +02:00
Pavol Rusnak
df967821e7
emu.sh: rename OPTLEVEL to PYOPT (to match variable name used in the C source) 2018-05-22 16:36:24 +02:00
Pavol Rusnak
ede4833c13
protob: add Initialize.skip_passphrase 2018-05-22 12:36:15 +02:00
Pavol Rusnak
59c8b66ba4
protob: update trezor-common 2018-05-21 16:33:41 +02:00
Pavol Rusnak
370c58929c
fsm: use passphrase protection instead of passphrase encryption 2018-05-21 15:50:53 +02:00
Pavol Rusnak
f54cf5073c
defs: add more fields to coin definitions 2018-05-21 15:14:48 +02:00
Pavol Rusnak
ef5240bccc
protob: add TransactionType.overwintered flag (for Zcash) 2018-05-21 14:43:31 +02:00
Sotiris Blad
83f022f0e6 MonetaryUnit Support (#109) 2018-05-21 12:20:24 +02:00
Dusan Klinec
28d1225276 tests: test for ge25519_double_scalarmult_vartime2 added 2018-05-18 19:08:21 +02:00
Dusan Klinec
10788a82a1 ed25519: aA + bB double scalarmult added
- required for monero
2018-05-18 19:08:21 +02:00
matejcik
9f4cc74b9a travis: set virtualenv version to restore build on py33 2018-05-18 10:58:28 +02:00
matejcik
1df0cd7094 travis: use newer pip that understands python_requires
(should fix build on Python 3.3 because of too-new tox)
2018-05-17 17:23:25 +02:00
Tomas Susanka
e656bbf072 stellar: xdr parse move to trezorctl; client works with messages 2018-05-17 17:17:09 +02:00
Akira Takizawa
5254c12b0c Fix chainid for Ethereum Social (#107) 2018-05-17 13:34:28 +02:00
Pavol Rusnak
233f2f1cfd
fsm: don't show progress bar in GetAddress unless multisig is used 2018-05-17 13:17:46 +02:00
Pavol Rusnak
1bb068d18f
Revert "fsm: don't show progress bar in GetAddress"
This reverts commit f302b04f31.
2018-05-17 13:08:04 +02:00
matejcik
db92b13f97 cosi: move things around
ed25519raw is moved back to trezorlib
ed25519cosi is renamed to cosi, and has a couple more functions,
with the expectation that TrezorClient.cosi_* methods will move there.

Also most code shouldn't need ed25519raw for anything, so it might get
renamed to "_ed25519" to indicate that it's a private implementation.

For now, I added a "verify" method to cosi, so that you don't need to
call into ed25519raw.checkvalid. But trezor-core's keyctl is also
using ed25519raw.publickey. I'm not sure if that's worth replicating
in cosi, or whether to just leave it be, so I'm leaving it be for now.

Importantly, new function "sign_with_privkey" does that math thing that
was part of the selftest and is also explicitly listed in keyctl.
(it's called sign_with_privkey because I expect to have a "sign" method
here that calls into Trezor)
2018-05-17 12:53:01 +02:00
Pavol Rusnak
f302b04f31
fsm: don't show progress bar in GetAddress 2018-05-16 18:02:23 +02:00
Pavol Rusnak
87645b2600
defs: add ethereum/networks.json 2018-05-16 17:33:00 +02:00
Akira Takizawa
e78e33c8c6 Add ETSC support (#106) 2018-05-16 17:30:27 +02:00
Tomas Susanka
277296be90 tests/stellar: verify marked as not passing on T2 2018-05-16 15:04:00 +02:00
Tomas Susanka
b9db28beb2 stellar: typo in comment removed
see discussion at 8e8749dc68 (r28978964)
2018-05-16 11:19:18 +02:00
Tomas Susanka
3ee3083e8c tests/device/stellar: verify message 2018-05-14 16:53:10 +02:00
Pavol Rusnak
29664c4218
firmware: refactor Stellar Sign Message 2018-05-14 16:05:35 +02:00
Tomas Susanka
bb74950e23 stellar: message is normalized before sign/verify 2018-05-14 15:33:57 +02:00
Tomas Susanka
22560128fe stellar: StellarSignMessage.message is bytes 2018-05-14 15:17:13 +02:00
Tomas Susanka
f97815f69a vendor: trezor-common updated 2018-05-14 15:16:26 +02:00
Tomas Susanka
b91db285ba stellar: StellarSignMessage.message is bytes not string 2018-05-14 15:12:09 +02:00
Tomas Susanka
fc69ddf38f ethereum: note about message sign/verify 2018-05-14 14:21:20 +02:00
Tomas Susanka
d57fe33582 tests/device/stellar: sign message 2018-05-14 14:09:39 +02:00
matejcik
f9c20f8d2f travis: do not trigger trezor-core if not master 2018-05-11 16:01:11 +02:00
matejcik
cc7c8ccb59 client: clean up exception and decorator code 2018-05-11 15:34:49 +02:00
matejcik
a478dac5f7 client: clean up logging and printing 2018-05-11 15:34:23 +02:00
Tomas Susanka
376a3cbec5
Merge pull request #200 from trezor/tsusanka/unknown-token-fix
eth: unknown token transfer is recognized and displayed as unknown
2018-05-11 15:33:33 +02:00
matejcik
a2b70562bc flake8: be stricter 2018-05-11 15:29:38 +02:00
matejcik
123aec5d7d tests/device_tests: remove all star imports 2018-05-11 15:29:38 +02:00