Commit Graph

1006 Commits

Author SHA1 Message Date
Lukas Bielesch
381d951d89 fix(python): do not visit menu in an interactive test mode 2025-08-01 12:12:55 +02:00
Roman Zeyde
2158c98851 fix(python): don't send EndSession to bootloader
[no changelog]
2025-08-01 13:01:10 +03:00
Roman Zeyde
201e109873 test(core): check DebugLink._call() response to avoid dropping errors
Otherwise, some commands (e.g. `DebugLinkRecordScreen`)
could fail without raising `TrezorFailure`.

[no changelog]
2025-08-01 10:19:37 +03:00
Roman Zeyde
15eed484f5 test(core): avoid layout deadlock in test_autolock_does_not_interrupt_signing
[no changelog]
2025-08-01 10:19:37 +03:00
M1nd3r
3f0e1f19cc fix(python, test): allow deterministic ephemeral keys for some device tests 2025-07-31 20:29:05 +02:00
M1nd3r
3f36c0b969 chore(python): add timeout to ProtocolV2 2025-07-31 20:29:05 +02:00
Roman Zeyde
a73a9e2f6a fix(python): use same types when comparing versions
Previously, `client.version` was a tuple & `release[key_to_compare]` was a list, resulting in the following error:

```
$ trezorctl firmware update
Best available version: 2.9.0
Traceback (most recent call last):
  File "trezor-firmware/.venv/bin/trezorctl", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "trezor-firmware/.venv/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "trezor-firmware/.venv/lib/python3.12/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "trezor-firmware/.venv/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "trezor-firmware/.venv/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "trezor-firmware/.venv/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "trezor-firmware/.venv/lib/python3.12/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "trezor-firmware/.venv/lib/python3.12/site-packages/click/decorators.py", line 45, in new_func
    return f(get_current_context().obj, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "trezor-firmware/python/src/trezorlib/cli/firmware.py", line 693, in update
    url, fp = find_best_firmware_version(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "trezor-firmware/python/src/trezorlib/cli/firmware.py", line 372, in find_best_firmware_version
    if key_to_compare in release and release[key_to_compare] > client_version:
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '>' not supported between instances of 'list' and 'tuple'
```

[no changelog]
2025-07-31 20:29:05 +02:00
M1nd3r
510658fe8f fix(python): improve robustness of protocol identification 2025-07-31 20:29:05 +02:00
M1nd3r
3a0edc8b4c chore(python): add ThpError exception 2025-07-31 20:29:05 +02:00
Roman Zeyde
de75ad55ba test(core): keep DebugLink.input_wait_type for BackgroundDeviceHandler
[no changelog]
2025-07-31 20:29:05 +02:00
M1nd3r
01a5cb68ba chore(docs): update python OPTIONS.rst docs 2025-07-31 20:29:05 +02:00
M1nd3r
672fb701a8 fix: error when making screenshots on t1 2025-07-31 20:29:05 +02:00
M1nd3r
78ecfb2caa test(python): adjust tests to session-based trezorlib
Co-authored-by: mmilata <85857+mmilata@users.noreply.github.com>
Co-authored-by: romanz <9900+romanz@users.noreply.github.com>
2025-07-31 20:29:05 +02:00
mmilata
de59e3bc98 feat(python): update python-tools to the session-based trezorlib
Co-authored-by: M1nd3r <63123927+M1nd3r@users.noreply.github.com>
2025-07-31 20:29:05 +02:00
M1nd3r
3f4459dd59 feat(python): change trezorctl to session-based 2025-07-31 20:29:05 +02:00
M1nd3r
4405c43877 feat(python): change trezorlib to session-based
Co-authored-by: mmilata <85857+mmilata@users.noreply.github.com>
2025-07-31 20:29:05 +02:00
M1nd3r
d454773692 chore(python): bump trezorlib version to 14.0 2025-07-31 20:29:05 +02:00
M1nd3r
f37109a20b chore: add changelog 2025-07-31 20:29:05 +02:00
M1nd3r
e3f8a00e97 chore: add noiseprotocol package 2025-07-31 20:29:05 +02:00
tychovrahe
2bd3b6ff06 fix(core): fix bootloader monotonic check during upgrade
[no changelog]
2025-07-29 11:37:47 +02:00
cepetr
681b0d389e feat(core): introduce fail-safe/pq signed boardloader
[no changelog]
2025-07-29 11:37:47 +02:00
Martin Milata
f2173d5276 tests(python): add tests against python 3.12
[no changelog]
2025-07-24 14:43:05 +02:00
tychovrahe
3b9be7baec feat(core): add allow unlimited run vendorheader flag
[no changelog]
2025-07-22 14:04:09 +02:00
tychovrahe
4cd28ef643 fix(core): improve manufacturing mode detection by respecting vendorheader flag
[no changelog]
2025-07-22 14:04:09 +02:00
tychovrahe
8795cbcf5c feat(core): verify secmon signature in bootloader
[no changelog]
2025-07-22 14:04:09 +02:00
tychovrahe
fcf2bd0d48 feat(core): add secmon header
[no changelog]
2025-07-22 14:04:09 +02:00
M1nd3r
0b2fdf3667 chore(common/core): use public_key instead of pubkey in THP messages
[no changelog]
2025-07-21 13:05:51 +02:00
M1nd3r
3efcd0b601 chore(common): add ButtonAck to ThpMessageType
[no changelog]
2025-07-21 12:52:33 +02:00
Roman Zeyde
b0cc29cbae test(core): visit Delizia menu items in UI tests
[no changelog]
2025-07-21 10:10:17 +03:00
Michael de Hoog
304b0150e6 test(core): EIP-712 message hash
- add show_message_hash to client
2025-07-19 15:00:37 +02:00
Michael de Hoog
70ccc36ae4 feat(core): support displaying EIP-712 message hash during signing 2025-07-19 15:00:37 +02:00
Lukas Bielesch
6cc9c62941 chore(core): new entry in DebugLinkDecision message
- new optional enum TouchEventType in DebugLinkDecision message
- add new hold_touch debuglink function
- new pin tests utilizing hold_touch function
2025-07-16 13:40:04 +02:00
M1nd3r
286fb47541 chore: reoder THP messages
[no changelog]
2025-07-14 21:05:27 +02:00
Ioan Bizău
8bfc5ff6d5 feat(tests): look for menus recursively
[no changelog]
2025-07-11 10:07:19 +02:00
Roman Zeyde
953b0e23d1 test(core): visit Delizia menu during tests
Currently, only shows the menu (without visiting its children).
Enabled by returning `has_menu=True` via LayoutContent JSON.

Also, reduce the number of `debuglink.read_layout()` calls in tests.

[no changelog]
2025-07-10 12:12:06 +03:00
Ioan Bizău
327ccd38e4 Revert "feat: Make payment request protobuf fields optional."
This reverts commit 4a4cc34d65ee5ec7b1cfc1617b2d20f15122ddf6.
2025-07-10 10:10:14 +02:00
Andrew Kozlik
8ffeb6e387 feat(common): Add PaymentNotification protobuf message. 2025-07-10 10:10:14 +02:00
Andrew Kozlik
8103bd1aa2 feat(core): Implement payment requests in Ripple signing. 2025-07-10 10:10:14 +02:00
Andrew Kozlik
70ef22b865 feat(common): Add PaymentRequest field to Ripple signing. 2025-07-10 10:10:14 +02:00
Andrew Kozlik
96afce1e0c feat(core): Set mac field in altcoin Address response messages. 2025-07-10 10:10:14 +02:00
Andrew Kozlik
c1cfd66b6d feat(common): Add mac field to altcoin Address response messages. 2025-07-10 10:10:14 +02:00
Andrew Kozlik
2602fa7751 feat: Make payment request protobuf fields optional. 2025-07-10 10:10:14 +02:00
Andrew Kozlik
65a200d39c feat: Add "text details" memo to payment requests. 2025-07-10 10:10:14 +02:00
Andrew Kozlik
f699ecf65e feat(common): Add address_n field to PaymentRequest memos. 2025-07-10 10:10:14 +02:00
Andrew Kozlik
e2c69033dd feat(core): Implement payment requests in Ethereum signing. 2025-07-10 10:10:14 +02:00
Andrew Kozlik
9599e4d48c feat(common): Add PaymentRequest field to Ethereum signing. 2025-07-10 10:10:14 +02:00
Andrew Kozlik
635f74f407 refactor: Move TxAckPaymentRequest to common messages as PaymentRequest. 2025-07-10 10:10:14 +02:00
Andrew Kozlik
913ba93616 feat(core): Add mac to EthereumAddress. 2025-07-10 10:10:14 +02:00
Roman Zeyde
4ebe1de056 fix(core): don't ignore ActionCancelled exception from menu
In Delizia, it should be possible to cancel the flow using the menu.

[no changelog]
2025-07-07 14:55:13 +03:00
Roman Zeyde
09be64d1e7 fix(core): don't send ButtonRequests during menu handling
Use `LayoutContent.page_count()` instead of `ButtonRequest.pages`.

[no changelog]
2025-07-04 15:38:54 +03:00