1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-12 18:49:07 +00:00
Commit Graph

26 Commits

Author SHA1 Message Date
Andrew Kozlik
c2f1850abb feat(common): Add no_script_type option to SignMessage. 2021-11-10 17:35:57 +01:00
matejcik
0870befe58 docs: add changelogs 2021-11-10 13:57:57 +01:00
matejcik
428caf3d35 fix(python/build_tx): make build_tx work again after blockbook protection upgrades
Also improve script type selection.
2021-11-04 13:54:43 +01:00
Jun Luo
b3ac52e98c refactor(python/stellar): Since the firmware does not support MuxedAccount, we refuse to process this type of transaction. 2021-11-04 13:16:29 +01:00
Pavol Rusnak
0068c12f77
fix(python): use unified descriptor format <a;b> (#1885) 2021-11-04 10:36:53 +01:00
grdddj
73238135d6 feat(core/ethereum): EIP-712
Based on original contribution by Max Kupriianov <xlab@hey.com>

Implemented EIP-712 typed data signatures in Ethereum app.

Add eth_abi into pyproject deps

device test for EIP 712

fixed hex decoding for address

fixup! fixed hex decoding for address

code quality, more pythonic code, removing unused imports

running black and isort on changed files

trezorctl file input for EIP 712 data signing

fixup! code quality, more pythonic code, removing unused imports

fixup! fixup! code quality, more pythonic code, removing unused imports

necessary changes after rebase to master

unit tests for sign_typed_data.py

new protobuf messages, working for nonarray types

simplified and verified solution for our simple data

support for simple arrays, without their confirmation

reverting protobuf value messages to bytes, appropriate changes

showing arrays in Trezor, code quality improvements

data validation on Trezor, minor improvements

using custom types for storing type data instead of dicts, addressing feedback from review

moving helper functions to its own file, tests for decode_data

additional overall tests

support for arrays of structs

adding support for metamask_v4_compat variable

using HashWriter object to collect the final hash continously

minor improvements in code quality

validate_field_type function

streaming values from client without saving them, missing UI

prototype of streamed UI using confirm_properties

accounting for bytes in data, more data types in integration tests

rebase on master, using f-strings

minor fixes and improvements from code review

StructHasher class for the whole hashing process

mypy and style changes

asking users whether to show structs and arrays

protobuf descriptions to fix make defs_check

unifying comments, mypy fix

unit tests for StructHasher class

UI fixtures, skipping device tests for T1

addressing majority of code review comments about code quality and structure

changing file structure - layouts, helpers, sign_typed_data

decode_data renaming and docstring, renaming unit test file

using tuples instead of lists in elifs

layout improvements

excluding core/src/apps/common/confirm.py file from the PR

True/False returning layout with Show more button

code review layout improvements

forgotten br_type argument to should_show_more
2021-11-02 14:27:01 +01:00
Eduard Klementiev
10ce81b5d1 fix(python/trezorctl): fix operator precedence issue for ethereum sign-tx command 2021-10-25 15:51:21 +02:00
Andrew Kozlik
13cbb59082 feat(common): Add script_pubkey field to TxInput message. 2021-10-18 19:58:56 +02:00
Pavol Rusnak
ba0879961c feat(python): add support for Taproot descriptors 2021-10-18 13:36:05 +02:00
gabrielkerekes
4aaf6db9a2 chore(cardano): update docs, changelog and ui test fixtures 2021-10-11 15:16:24 +02:00
arbitrarylink
f051225730 feat(core,legacy): add support for Ethereum 64-bit chain_id
* Changes from original PR

* Now that we are rejecting chain_ids of 0, we need to have the tests set the chain_ids to at least 1.

* Ran 'make gen' and uploaded changed files.

* Ran make style_check and fixed reported errors

* Added changelog files

* Reverted changes concerning chain_id 0 being rejected.

* Adds tests for MAX_CHAIN_ID and MAX_CHAIN_ID+1.  Also reverts MAX_CHAIN_ID to the previous value.

* Added missing whitespace around arithmetic operator.

Co-authored-by: Michael Hatton <michaelhatton@Michaels-Mini.fios-router.home>
2021-09-10 15:09:03 +02:00
gabrielkerekes
2c65b00951 chore(cardano): add changelog entries 2021-08-20 11:50:13 +02:00
matejcik
ee068b01ea chore(python): remove Lisk 2021-08-19 10:25:41 +02:00
Frederik Bolding
38fa9197ca feat(core,python): support for Ethereum EIP1559 transactions
Initial EIP1559 implementation

Fix a few small issues

Progress on Python lib implementation and firmware

Fix RLP length

Start fixing tests

Fix legacy transactions

Simplify API and logic

Add EIP1559 tests

Fix access list formatting

Fix UI visiblity issue

Fix commented out code

fix: correct linting issues

Fix access_list protobuf formatting

Remove unneeded code

Remove dead code

Check tx_type bounds for EIP 2718

Reduce code duplication

Prefer eip2718_type over re-using tx_type

Add more tests

Simplify format_access_list

Simplify sign_tx slightly

Change Access List format and add logic to encode it

Fix a bunch of small PR comments

Fix a linting issue

Move tests out of class and regenerate

Remove copy-pasted comments

Add access list to CLI

Simplify _parse_access_list_item

Fix small mistakes following rebase

Fix linting

Refactor to use a separate message for EIP 1559 tx

Simplify changed legacy code

Fix a few small PR comments

Fix linting

fix(legacy): recognize SignTxEIP1559 on legacy build

Fix PR comments
2021-08-10 11:00:29 +02:00
Jun Luo
543b9f407c refactor(python/stellar): Use Stellar Python SDK to parse Stellar transactions.
As a side effect, support for TransactionV1 format transaction is added.
2021-08-06 13:14:57 +02:00
matejcik
0e650b1a5b fix(python): do not set socket to nonblocking for wait_until_ready
There's two udp calls in `UdpTransport._ping()`:
- socket.sendall(b"PINGPING") -> this will be instanteous, AND it will
raise if the receiving side is not listening.
- socket.recv() -> this will wait for SOCKET_TIMEOUT seconds, but only
in case the sendall() succeeded. This means that receiving side exists
and we are now waiting until it's awake enough to respond.

In conclusion, we avoid hammering emulator with PINGPINGs with a timeout
so short we don't see an answer. This should avoid the problem
occasionally seen in CI and described in #1668
2021-08-04 10:58:59 +02:00
matejcik
34047cf3ec Revert "feat(python): give the emulator a little more time to respond to ping"
This reverts commit ae0da5e245.

It seems that there was no good reason for the change in the first
place.
2021-08-04 10:58:59 +02:00
matejcik
1d4c061e3e docs(python): update changelog for 0.12.3 2021-07-30 10:18:43 +02:00
matejcik
e7c40c9560 feat(python/trezorctl): trezorctl device reboot-to-bootloader 2021-07-29 15:32:42 +02:00
matejcik
347d11e6ea chore(python): allow click 8.x for trezorlib 2021-07-28 16:17:27 +02:00
grdddj
6bbc9a78f3 feat(python/trezorctl): improving and refactoring firmware CLI commands 2021-07-07 10:33:03 +02:00
matejcik
d047c98cb2 feat(python/debuglink): auto-page on pageable screens 2021-06-22 11:25:12 +02:00
matejcik
4f0aca7bb5 feat(python): pass whole ButtonRequest to button_request UI handler 2021-06-22 11:25:12 +02:00
matejcik
a58823cc0c refactor(python): rework trezorlib protobuf codec
API-compatibility with the original one is retained.

Now that we don't need to keep code parity with core, we could do some
changes that make life easier.

All generated classes are now in one file. This makes github diffs more
readable, at the cost of somewhat complicating inspecting individual
classes; however, that is something we shouldn't be doing anyway.

Enums are now implemented as enum.IntEnum.

The original class-level FIELDS member was restored.

Each field is now defined via protobuf.Field, which is easier to work
with in the codec, AND we're not stuffing defaults and flags into the
same field.
2021-06-08 09:55:19 +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
Martin Milata
b2b0ecf0f7 docs(python): use towncrier for generating CHANGELOG.md 2021-05-04 14:18:01 +02:00