1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-18 05:28:40 +00:00
Commit Graph

10335 Commits

Author SHA1 Message Date
matejcik
bb96cdc4e6 ci: include monero logs in artifacts 2021-05-06 13:14:21 +02:00
matejcik
94521a2065 feat(core): presize some modules to account for their sub-imports 2021-05-06 13:14:21 +02:00
matejcik
5f4240d93c feat(core): preallocate sys.modules to an appropriate size 2021-05-06 13:14:21 +02:00
matejcik
b5c1b37a56 chore(core/tests): bump heap size for core unit tests 2021-05-06 13:14:21 +02:00
matejcik
c233b796df fix(tests): avoid race condition when generating UI test screenshots 2021-05-06 13:14:21 +02:00
matejcik
b1e4246b46 refactor(core/webauthn): make sure KEY_AGREEMENT_*KEY is generated once per power-up
This is what the spec recommends and it has been the case before
workflow-restarts, when `apps.webauthn.fido2` was imported exactly once
per lifetime.

With workflow-restarts, `fido2` is being imported repeatedly and the
keys regenerated. This does not seem to be a problem per the spec -- a
FIDO workflow will retain the same keys, and non-FIDO workflows can be
seen as unplugs/replugs as far as the FIDO functionality is concerned.

However, regenerating the keys is slow, which is a problem for the
hardware-based unit tests. We can avoid the slowness by returning to the
spec-mandated behavior and generating once per power-up.
2021-05-06 13:14:21 +02:00
matejcik
f6f3c7ffcf fix(core): prevent flickering when homescreen does not need to redraw 2021-05-06 13:14:21 +02:00
matejcik
5d12b943b3 feat(core): ensure all module names are interned 2021-05-06 13:14:21 +02:00
matejcik
96fd347ca8 fix(core): keep value of experimental_features cached across workflow restarts 2021-05-06 13:14:21 +02:00
matejcik
aaa3ce6117 fix(core/bitcoin): fix CoinJoin authorization with new cache 2021-05-06 13:14:21 +02:00
matejcik
dd655422f1 refactor(core/wire): simplify the message handling loop 2021-05-06 13:14:21 +02:00
matejcik
b387970468 refactor(core/debug): move "wipe with debug build" to boot.py
otherwise it gets wiped after every workflow
2021-05-06 13:14:21 +02:00
matejcik
1822aebdb4 feat(core): prefill field_cache in bitcoin app 2021-05-06 13:14:21 +02:00
matejcik
f3db4f2dd3 refactor(core): defragment PathSchema memory usage 2021-05-06 13:14:21 +02:00
matejcik
e5a481ded5 chore(tests): fix deprecation warnings 2021-05-06 13:14:21 +02:00
matejcik
b1ca6ca848 refactor(core/debug): offload debug configuration from apps.debug 2021-05-06 13:14:21 +02:00
matejcik
e859c13d70 refactor(core): limit global imports in key places
so that by importing `apps.base`, we don't pull in the whole circus
2021-05-06 13:14:21 +02:00
matejcik
ae0da5e245 feat(python): give the emulator a little more time to respond to ping 2021-05-06 13:14:21 +02:00
matejcik
7ca67cc4d9 feat(core): clear out memory space after every workflow
A small fixed list of modules is kept pre-loaded in the GC arena.
These must not keep references to anything else, as all other modules
are unloaded and the memory is cleared.
2021-05-06 13:14:21 +02:00
matejcik
e629a72c3a refactor(core): move app registrations to a single handler function
apps.webauthn.boot() does not need an if-condition because it's only
called from session.py when the usb interface is enabled

This means that they do not need to be stored in RAM at all. The obvious
drawback is that we need to hand-edit the if/elif sequence, but we don't
register new handlers all that often so 🤷
2021-05-06 13:14:21 +02:00
matejcik
391976bcda refactor(core/usb): do not require serial number on instantiaton of USB
On a cleanly wiped device, storage must be unlocked in order to create
and retrieve the serial number. However, storage unlocking happens in
boot.py, which is imported _after_ usb.py

We must therefore sidestep asking for the serial number.
2021-05-06 13:14:21 +02:00
matejcik
276bb59dba refactor(core/cardano): update caching mechanism 2021-05-06 13:14:21 +02:00
matejcik
3cdb09c294 refactor(core): modify cache to preallocate all its data
also get rid of expensive "wire" import
2021-05-06 13:14:21 +02:00
matejcik
ea505b592c refactor(core): move empty_bytearray to trezor.utils 2021-05-06 13:14:21 +02:00
matejcik
b0116d0bdc refactor(core): modify wire to preallocate its buffers 2021-05-06 13:14:21 +02:00
Jan Pochyla
e2cf9cda05 core: update deps, pin pillow to ^0.8 2021-05-06 13:14:21 +02:00
vdovhanych
e1d590c8b4 fix(ci): truthy warning and removed travis file 2021-05-06 10:19:56 +02:00
Jan Pochyla
6257584951 feat(core): Add Rust bindings to MicroPython and trezorhal
core: Remove dangling module decls

core: Use new Cargo feature resolver, use external MacOS debug info

core: Rust docs improvements

core: Upgrade bindgen

core: Add test target to Rust

ci: build rust sources

build(core): .ARM.exidx.text.__aeabi_ui2f in t1 firmware size

It's an unwind table for softfloat function inserted by rustc, probably
can be removed to save 8 bytes:
599c58db70/link.x.in (L175-L182)

scons: Remove dead code

core: Move Rust target to build/rust

core: Replace extern with a FFI version

core: Add some explanatory Rust comments

core: Use correct path for the Rust lib

core: Remove Buffer::as_mut()

Mutable buffer access needs MP_BUFFER_WRITE flag. TBD in the Protobuf PR.

core: Improve docs for micropython::Buffer

core: Minor Rust docs changes

core: Rewrite trezor_obj_get_ll_checked

core: Fix incorrect doc comment

core: Remove cc from deps

fixup! core: Rewrite trezor_obj_get_ll_checked

core: update safety comments
2021-05-05 16:00:21 +02:00
Pavol Rusnak
77d00206ba build(docker): add possibility to skip core/legacy/bitcoinonly builds 2021-05-04 16:09:03 +02:00
Martin Milata
49965aae7e fix(common): bitcoin:XRC wallet link 2021-05-04 14:28:09 +02:00
Martin Milata
504298cca3 chore(tools): script for version bumping 2021-05-04 14:18:01 +02:00
Martin Milata
b2b0ecf0f7 docs(python): use towncrier for generating CHANGELOG.md 2021-05-04 14:18:01 +02:00
Martin Milata
ee1fda3f7f docs(legacy/bootloader): use towncrier for generating CHANGELOG.md 2021-05-04 14:18:01 +02:00
Martin Milata
97aa0fb517 docs(legacy/firmware): use towncrier for generating CHANGELOG.md 2021-05-04 14:18:01 +02:00
Martin Milata
f58c1634c6 docs(core): use towncrier for generating CHANGELOG.md 2021-05-04 14:18:01 +02:00
vdovhanych
2397afffd4 feat(ci): add checks to github actions 2021-05-03 18:52:16 +02:00
Pavol Rusnak
40bd66ded4
chore(legacy): fix last commit 2021-04-23 15:51:11 +02:00
Tomas Susanka
300c27abb8 chore(legacy): bump version to 1.10.1; add soft-reset to changelog 2021-04-23 15:47:17 +02:00
gabrielkerekes
bf3e64ff20 fix(common): add isort:skip_file to files generated by pb2py 2021-04-23 11:09:29 +02:00
gabrielkerekes
6f59892824 refactor(core/cardano): introduce derive_public_key to simplify pub key derivation 2021-04-23 11:09:29 +02:00
gabrielkerekes
a3d0016a2f refactor(trezorlib/cardano): rename create_* functions
To avoid ambiguity between creating messages from parameters and parsing them from JSON.
2021-04-23 11:09:29 +02:00
gabrielkerekes
905970fd6a refactor(core/cardano): generalise _paginate_lines 2021-04-23 11:09:29 +02:00
gabrielkerekes
2313293477 feat(core/cardano): add support for catalyst voting registration 2021-04-23 11:09:29 +02:00
gabrielkerekes
2c503b16f5 fix(common): fix one value enums in pb2py 2021-04-23 11:09:29 +02:00
Tomas Susanka
e82aacbc7c docs(legacy/changelog): add note on bootloader 2021-04-22 09:41:58 +02:00
Pavol Rusnak
f606b71881
fix(legacy): update intermediate_fw version to 1.10.0 2021-04-21 18:49:09 +02:00
Pavol Rusnak
f93a8514e8
fix(legacy): update embedded bootloader hash 2021-04-21 16:00:09 +02:00
Pavol Rusnak
1f6fe62fd2
build(legacy): don't try to build intermediary_fw for emulator 2021-04-20 22:08:01 +02:00
Pavol Rusnak
c6dc708fe6
build(legacy): build bootloader and intermediary_fw in docker 2021-04-20 21:37:06 +02:00
Pavol Rusnak
73ae44f500 fix(legacy): rebuild bundled bootloader (deterministically) 2021-04-19 18:32:47 +02:00