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

497 Commits

Author SHA1 Message Date
matejcik
e2ec761898 fix(python/stellar): use boolean value for is_authorized
[no changelog]
2021-09-24 10:30:19 +02:00
matejcik
399ee51be6 refactor(python/stellar): avoid warning when constructing StellarSignTx
[no changelog], covered in Stellar refactor changelog entries
2021-09-24 10:30:19 +02:00
matejcik
91e8413c7e refactor(python): clean up test_stellar
- removed boilerplate
- shortened some names
- dropped distinction between v0 and v1 tests because there's now no XDR
parsing involved
- shortened test bodies to check only fields relevant to the particular
test case

[no changelog]
2021-09-24 10:30:19 +02:00
matejcik
1dcfdebf7a feat(all): make Stellar timebounds required 2021-09-24 10:30:19 +02:00
matejcik
0a0b75378d feat(python/stellar): update for stellar protobuf changes
[no changelog]
2021-09-24 10:30:19 +02:00
matejcik
1b601b3e08 feat(common): strong typing for Stellar protobuf messages
BREAKING CHANGE: StellarAssetType is renamed to StellarAsset.
The name StellarAssetType is reused for the corresponding enum.

Enums are introduced in several other places. Their values correspond to
allowed values of (previously int) fields so this should not pose a
compatibility problem.

Many fields are now required. We believe that this should not pose a
compatibility problem, because all known interfaces to Stellar signing
actually accept Stellar XDR on input, whose required fields match the
protobuf schema.
2021-09-24 10:30:19 +02:00
matejcik
30b08d949b feat(common): add default values to EthereumSignTx fields
so that we can avoid Optional types for fields
2021-09-10 15:09:03 +02:00
matejcik
639406b01f feat(all): make chain_id mandatory 2021-09-10 15:09:03 +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
matejcik
f083beb3c2 fix(python/trezorctl): fix "invalid value" of ChoiceType with default
[no changelog] as the changelog entry is explicitly added to previous
version
2021-09-07 13:37:23 +02:00
gabrielkerekes
2c65b00951 chore(cardano): add changelog entries 2021-08-20 11:50:13 +02:00
gabrielkerekes
b0c8590f00 feat(cardano): streamed transaction signing 2021-08-20 11:50:13 +02:00
gabrielkerekes
d2a5be4e38 feat(cardano): prepare protobuf messages for streamed tx signing 2021-08-20 11:50:13 +02:00
matejcik
ee068b01ea chore(python): remove Lisk 2021-08-19 10:25:41 +02:00
Jun Luo
1adc869626 fix(python/stellar): correct the data type passed to StellarAllowTrustOp.is_authorized.
[no changelog]
2021-08-11 14:15:27 +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
overcat
5cf873a03a feat(python/stellar): print a readable message when the user has not submitted a base64-encoded transaction envelope. 2021-08-06 13:14:57 +02:00
overcat
0dab2c5d1f test(python/stellar): add test cases for Stellar transactions in TransactionV1 format. 2021-08-06 13:14:57 +02:00
overcat
d664f85a12 test(python/stellar): fix and refactor existing test cases.
The XDR included in the existing test is not valid base64-encoded transaction envelope, and it cannot be decoded correctly, See https://laboratory.stellar.org/#xdr-viewer?input=AAAAABXWSL%2Fk028ZbPtXNf%2FYylTNS4Iz90PyJEnefPMBzbRpAAAAZAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAXVVkJGaxhbhDFS6eIZFR28WJICfsQBAaUXvtXKAwwuAAAAABVEVTVAAAAAAphJYCwg5YNl8SPBLYehykVQ0QzSGwrg4Y1E4%2BVv1qFQAAAAAdzxaYAAAAAA%3D%3D&type=TransactionEnvelope&network=test
2021-08-06 13:14:57 +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
gabrielkerekes
4f7c6b3586 feat(common): change all protobuf message type hints to strings
In order to support recursive protobuf messages, which will be needed by Cardano's native scripts.
[no changelog]
2021-08-05 12:10:30 +02:00
matejcik
9ab1891b22 feat(common): more required fields in messages-management
[no changelog]
2021-08-04 15:03:11 +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
92e9d61e24 feat(python/debuglink): reset_debug_features to reconfigure debuglink 2021-08-04 10:58:59 +02:00
matejcik
b3312d1ef7 fix(tests): set_filter must be used in with-block
This makes sure filters are properly cleared when the with-block exits
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
2ab8972cf2 build(python): drop changelog target from makefile 2021-07-29 15:32:42 +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
13b8a6e54d fix(python/trezorctl): firmware download does not require connected trezor 2021-07-20 11:03:57 +02:00
matejcik
f8bb90366a fix(tests): auto-swipe by using only ButtonRequest.pages 2021-07-09 21:01:07 +02:00
matejcik
1e1963f1ee fix(core): do not send ButtonRequest on every paging event
partial revert of 54db2291f2 from #1671
2021-07-09 15:00:29 +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
ea2a9375ac feat(python/debuglink): streamline expected responses handling [no changelog] 2021-06-22 11:25:12 +02:00
matejcik
1012ee8497 feat(core): send ButtonRequests for paging events 2021-06-22 11:25:12 +02:00
gabrielkerekes
a92b5fc333 fix(core/cardano): forbid tx outputs with both address and address parameters 2021-06-08 15:02:24 +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
aaa3ce6117 fix(core/bitcoin): fix CoinJoin authorization with new cache 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
Martin Milata
b2b0ecf0f7 docs(python): 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
gabrielkerekes
bf3e64ff20 fix(common): add isort:skip_file to files generated by pb2py 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
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
Pavol Rusnak
65cefbc879
docs: remove wallet.trezor.io references 2021-04-16 16:18:48 +02:00
Martin Milata
0278998f72 style(common): mypy: disable implicit Optional for function arguments 2021-04-01 11:12:30 +02:00