1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-05-25 10:18:45 +00:00
Commit Graph

15012 Commits

Author SHA1 Message Date
Martin Milata
8dde000f29 fix(legacy): input hash could be different on emulator
[no changelog]
2025-04-25 13:22:09 +02:00
Martin Milata
19f30acfbb refactor(legacy): check size of integers when hashing
[no changelog]
2025-04-25 13:22:09 +02:00
Roman Zeyde
569aee4ac1 test(core): don't force changing language if not needed
[no changelog]
2025-04-25 10:43:46 +03:00
Roman Zeyde
09a323e578 fix(core): remove debug-related data from PYOPT=1 firmware builds
It reduces T3T1 release universal firmware size by ~2kB:
```
Memory region         Used Size  Region Size  %age Used
           FLASH:     1580304 B      1664 KB     92.74%
```

Before this PR:
```
Memory region         Used Size  Region Size  %age Used
           FLASH:     1578256 B      1664 KB     92.62%
```

(Tested with `TREZOR_MODEL=T3T1 PYOPT=1 make -C core build_firmware`)

[no changelog]
2025-04-24 17:27:21 +03:00
Roman Zeyde
65e8f96428 chore(core): update main_clean_exit comment
We are not using `atexit()` handler following #4892.

[no changelog]
2025-04-24 16:26:36 +03:00
Roman Zeyde
41db573ef9 feat(core): check that GC restores free heap memory
Enabled only for frozen debug builds.

[no changelog]
2025-04-24 16:26:36 +03:00
Roman Zeyde
a787d21b3f fix(core): preallocate save_screen_directory to allow heap checking
Otherwise, free heap memory will decrease after handling `DebugLinkRecordScreen`.

[no changelog]
2025-04-24 16:26:36 +03:00
Roman Zeyde
bd9d303310 perf(core): optimize AddressDetails::xpubs layout
[no changelog]
2025-04-24 16:17:17 +03:00
Roman Zeyde
6a0a02e17c test(core): reduce pytest timeout for upgrade tests
Most of the tests complete after a few seconds:

```
============================================= slowest durations =============================================
3.94s call     tests/upgrade_tests/test_firmware_upgrades.py::test_upgrade_shamir_recovery[core-v2.4.0]
3.61s call     tests/upgrade_tests/test_firmware_upgrades.py::test_upgrade_shamir_recovery[core-v2.6.3]
3.59s call     tests/upgrade_tests/test_firmware_upgrades.py::test_upgrade_shamir_recovery[core-v2.3.1]
3.50s call     tests/upgrade_tests/test_firmware_upgrades.py::test_upgrade_reset_no_backup[core-v2.1.8]
3.48s call     tests/upgrade_tests/test_firmware_upgrades.py::test_upgrade_reset_no_backup[core-v2.2.0]
3.48s call     tests/upgrade_tests/test_firmware_upgrades.py::test_upgrade_reset_skip_backup[core-v2.1.6]
3.48s call     tests/upgrade_tests/test_firmware_upgrades.py::test_upgrade_reset_no_backup[core-v2.1.6]
3.45s call     tests/upgrade_tests/test_firmware_upgrades.py::test_upgrade_reset_skip_backup[core-v2.2.0]
3.41s call     tests/upgrade_tests/test_firmware_upgrades.py::test_upgrade_shamir_recovery[core-v2.6.2]
3.31s call     tests/upgrade_tests/test_firmware_upgrades.py::test_upgrade_shamir_recovery[core-v2.7.0]
3.10s call     tests/upgrade_tests/test_firmware_upgrades.py::test_upgrade_shamir_recovery[core-v2.3.5]
3.09s call     tests/upgrade_tests/test_firmware_upgrades.py::test_upgrade_shamir_recovery[core-v2.3.4]
2.73s call     tests/upgrade_tests/test_firmware_upgrades.py::test_upgrade_shamir_recovery[core-v2.5.3]
2.56s call     tests/upgrade_tests/test_firmware_upgrades.py::test_upgrade_reset_no_backup[core-v2.1.5]
2.55s call     tests/upgrade_tests/test_firmware_upgrades.py::test_upgrade_reset_skip_backup[core-v2.1.4]
2.55s call     tests/upgrade_tests/test_firmware_upgrades.py::test_upgrade_reset_skip_backup[core-v2.1.2]
2.45s call     tests/upgrade_tests/test_firmware_upgrades.py::test_upgrade_load[core-v2.1.6]
2.44s call     tests/upgrade_tests/test_firmware_upgrades.py::test_upgrade_load[core-v2.1.7]
2.43s call     tests/upgrade_tests/test_firmware_upgrades.py::test_upgrade_load[core-v2.1.8]
2.43s call     tests/upgrade_tests/test_firmware_upgrades.py::test_upgrade_load[core-v2.2.0]
```

[no changelog]
2025-04-24 15:50:28 +03:00
kopecdav
f9dfb3ef1b feat(core): Add max backlight limit to backlight driver. [no changelog] 2025-04-24 12:19:57 +02:00
Roman Zeyde
46d6732462 feat(core): don't use heap for storing coverage data
[no changelog]
2025-04-24 07:39:46 +03:00
Roman Zeyde
2e635a04fc chore(core): fix a few clippy warnings
[no changelog]
2025-04-24 07:39:46 +03:00
cepetr
8b0736c360 fix(prodtest): increase vcp ring buffer size
[no changelog]
2025-04-23 13:32:21 +02:00
Roman Zeyde
f20c2d551d perf(core): encode Timer using a single u32
[no changelog]
2025-04-23 12:38:34 +03:00
Pavol Rusnak
9037c398eb
chore(crypto): use new email for stick 2025-04-20 22:04:38 +02:00
Roman Zeyde
f89e7670c5 fix(core): update EIP-1559 fee-related labels
Translations will be updated in a separate PR.
2025-04-18 20:29:47 +03:00
Roman Zeyde
75700d9f7f fix(core): dump allocated QSTRs also in debug firmware
Otherwise, it's hard to understand which QSTR causes the assertion error.

[no changelog]
2025-04-17 15:59:08 +03:00
cepetr
a05ce8aa70 fix(core): fix USB VCP freeze on T3W1 in prodtest
[no changelog]
2025-04-17 11:45:26 +02:00
Martin Milata
04aeaf0607 build(core/unix): use -g instead of -g3
Prevents flood of warnings on macos.

[no changelog]
2025-04-16 17:27:11 +02:00
Martin Milata
c0eae1c47e build(nix): add dependencies needed by --pure on macos
[no changelog]
2025-04-16 17:27:11 +02:00
Martin Milata
0ec2dbd583 fix(core/unix): HIDPI on macOS 15
[no changelog]
2025-04-16 17:27:11 +02:00
Martin Milata
e81617e1c6 build(core): fix build for GCC14
[no changelog]
2025-04-16 17:27:11 +02:00
Martin Milata
8ff593011c build: poetry: disable package mode
Fixes the following warning:

Warning: The current project could not be installed: No file/folder found for package trezor-firmware
If you do not want to install the current project use --no-root.
If you want to use Poetry only for dependency management but not for packaging, you can disable package mode by setting package-mode = false in your pyproject.toml file.
In a future version of Poetry this warning will become an error!

[no changelog]
2025-04-16 17:27:11 +02:00
Martin Milata
8f37578408 ci(nix): update to latest nixpkgs-unstable, rustc
[no changelog]
2025-04-16 17:27:11 +02:00
Martin Milata
04b9768faa build(core): allow passing HW_REVISION to make 2025-04-16 15:36:05 +02:00
Roman Zeyde
883a9aa57a ci(python): remove support for Python 3.6 & 3.7
[no changelog]
2025-04-16 15:14:53 +03:00
Roman Zeyde
c48cfbc59e chore(core): update coverage to 5.5
Because `coverage` 4.5.4 requires Python <=3.8 (EOL).

[no changelog]
2025-04-16 15:14:53 +03:00
Roman Zeyde
29b40e4d7c test(core): don't stop tests in case of communication failure
[no changelog]
2025-04-16 12:30:39 +03:00
Roman Zeyde
e3efe00b3a chore: ignore hypothesis artifacts
[no changelog]
2025-04-16 12:30:39 +03:00
Lukas Bielesch
e5401f5544 feat(tests): add missing delizia tests
check shares info in advanced recovery
2025-04-16 00:54:21 +02:00
matejcik
f6be9db382 ci: drop GitLab config and mentions 2025-04-15 14:50:45 +03:00
Roman Zeyde
d50181b7f9 fix(core): check QSTR run-time allocations only for frozen debug builds
[no changelog]
2025-04-15 14:22:47 +03:00
Martin Milata
2a40d91790 refactor(core): convert modtrezorio.ble to rust
[no changelog]
2025-04-15 13:08:37 +02:00
Martin Milata
b35d2f4000 refactor(core/rust): expose RuntimeError
[no changelog]
2025-04-15 13:08:37 +02:00
Martin Milata
1c09490f3b refactor(core/io): add pairing_code to ble_command_data_t
[no changelog]
2025-04-15 13:08:37 +02:00
matejcik
a50e49afa9 chore(core): include T3B1 certificate for the emulator 2025-04-15 12:37:25 +02:00
matejcik
0db727b21b chore(core): include T3W1 certificate for the emulator 2025-04-15 12:37:25 +02:00
Roman Zeyde
9bd81926af feat(core): check for runtime QSTR allocations
[no changelog]
2025-04-14 22:42:16 +03:00
Roman Zeyde
2975a07f1f chore(core): remove unused path definitions from MicroPython emulator
[no changelog]
2025-04-14 22:42:05 +03:00
Roman Zeyde
c2dd63a6bd chore(core): move core/prof into core/src/prof
It would allow interning profiling-related QSTRs in debug emulator builds.

[no changelog]
2025-04-14 22:40:52 +03:00
Roman Zeyde
04f9ada9bc style(core): annotate prof.py
Also, fix a few style lints.

[no changelog]
2025-04-14 22:39:24 +03:00
Roman Zeyde
c90b30fbf7 chore(core): intern Monero-related QSTRs
[no changelog]
2025-04-14 22:39:24 +03:00
Roman Zeyde
599c17cd29 build(core): refactor qstrdefsport.h generation
Allow excluding debug-related QSTRs.

[no changelog]
2025-04-14 22:39:24 +03:00
Roman Zeyde
6473b3ca48 feat(vendor): update MicroPython to support sorted qstr pools
Requires https://github.com/trezor/micropython/pull/20.

[no changelog]
2025-04-14 21:20:08 +03:00
Roman Zeyde
16289c4ec9 test(core): keep logs in case of emulator failure
[no changelog]
2025-04-14 20:03:41 +03:00
Andrew Kozlik
e80e979fdd docs(core): Document Optiga configuration.
[no changelog]
2025-04-14 17:10:07 +02:00
cepetr
8a636bd9cf fix(core): make mod_trezorio_poll return False only on timeout
[no changelog]
2025-04-14 12:30:52 +02:00
Roman Zeyde
07ad01220c perf(core): remove imports from hot path
[no changelog]
2025-04-10 14:19:34 +03:00
Martin Milata
3c08ce62b3 build(core): default T3W1 to revision C
[no changelog]
2025-04-09 23:44:12 +02:00
cepetr
75f9821cf1 fix(core): improve rgb_led driver deinitialization
[no changelog]
2025-04-09 22:10:11 +02:00