Jan Pochyla
b9cec468b7
streams: fix set_limit
2016-11-11 11:21:31 +01:00
Jan Pochyla
cf2bc1a28e
protobuf: fix loading embedded messages
2016-11-11 11:21:18 +01:00
Jan Pochyla
d2c71b3a58
signtx: add first test, make it all work
2016-11-08 18:50:13 +01:00
Jan Pochyla
b3c03496e4
streams: minor API change
...
with_limit suggests that the method returns a new StreamReader, instead of mutating self.
2016-10-26 17:36:11 +02:00
Jan Pochyla
36784bf0f5
protobuf: refactoring, remove default values and required fields
...
Logic of default values and required fields is better handled on the
application layer, not in the protobuf codec. Also, protobuf v3
removed support for both.
Since now, messages are defined by subclassing protobuf.MessageType:
class Example(protobuf.MessageType):
FIELDS = {
1: ('field', protobuf.UVarintType, protobuf.FLAG_REPEATED),
}
2016-10-26 17:34:07 +02:00
Jan Pochyla
53f6347838
protobuf: optimize memory, minor api changes
...
In StreamReader, avoid buffering reallocs by copying right into caller-supplied buffer.
Add loads() and dumps() to all scalar types through ScalarType superclass.
TODO: The API is steall really ugly, especially the stuff about targets/sources and load() function signatures.
2016-10-14 15:29:14 +02:00
Jan Pochyla
b2299c118a
protobuf: fix repeated fields
2016-10-06 15:05:14 +02:00
Jan Pochyla
be069a771b
protobuf: use async/await, make loads/dumps sync
2016-10-06 15:05:14 +02:00
Jan Pochyla
ec412c6da3
protobuf: fix uvarint dumping
...
In python3, chr() is not a proper way to pack an int to bytes.
2016-10-06 15:05:14 +02:00
Jan Pochyla
407169af01
import qualified const()
2016-09-29 12:29:43 +02:00
Jan Pochyla
0e799d62af
move sub-workflows do apps/common
2016-09-28 23:30:10 +02:00
Jan Pochyla
976b14a5b8
protobuf: skip None values while dumping
2016-09-28 23:17:11 +02:00
Jan Pochyla
fb7b85e479
move protobuf to a single module
2016-09-28 23:17:11 +02:00
Jan Pochyla
7570977cc4
little perf tweaks in protobuf
2016-09-27 17:26:10 +02:00
Jan Pochyla
99485b3385
finalize the streaming pbuf codec
2016-09-27 17:26:05 +02:00
Pavol Rusnak
7d4fbd07ea
fix typing.NewType
2016-09-27 17:26:04 +02:00
Pavol Rusnak
bfa034f2d9
add typing module
...
(just stubs, but should implement most of the stuff from PEP 484
and https://docs.python.org/3/library/typing.html )
2016-09-27 17:26:04 +02:00
Jan Pochyla
3eaf001eef
add a broken PoC of wire/protobuf stream reading
2016-09-27 17:26:03 +02:00
Jan Pochyla
455a436123
autopep8
2016-09-27 17:26:02 +02:00
Jan Pochyla
173c49bef8
add __repr__ to Message and MessageType
2016-09-27 17:25:55 +02:00
Pavol Rusnak
93f4a97470
fix trezor.crypto.random test
2016-09-27 17:25:48 +02:00
Jan Pochyla
9c34491e20
self.__dict__ does not work properly in uP, workaround
2016-09-27 17:25:47 +02:00
Jan Pochyla
46f96ddb81
Message can be initialized with kwargs
2016-09-27 17:25:47 +02:00
Jan Pochyla
f5b802d421
add loads, dumps to MessageType and Message
2016-09-27 17:24:21 +02:00
Pavol Rusnak
347925169d
two more occurences
2016-09-27 17:24:12 +02:00
slush0
561b82a5be
Fixed API (wait() returns number, not Sleep object)
2016-09-27 17:24:09 +02:00
Pavol Rusnak
6a5f16207c
move log to trezor
2016-09-27 17:24:03 +02:00
Jan Pochyla
29e20e302a
fix log
2016-09-27 17:24:03 +02:00
Pavol Rusnak
4eb87b2fd8
first parameter of log methods is now name
2016-09-27 17:24:03 +02:00
Pavol Rusnak
71496913ba
rework logging
2016-09-27 17:24:02 +02:00
slush0
fa52ecfb79
WIP
2016-09-27 17:24:00 +02:00
slush0
f9fa429f84
Use constants
2016-09-27 17:24:00 +02:00
slush0
767a41cffd
WIP
2016-09-27 17:23:57 +02:00
slush0
369cc485d4
uasyncio renamed as trezor.loop
2016-09-27 17:23:56 +02:00
slush0
a102888233
Event loop moved to loop.py
...
Removed unused layout demo
2016-09-27 17:23:56 +02:00
slush0
46353ed2e1
Removed EventLoop class, even loop is a module. Saves ~30kB RAM.
2016-09-27 17:23:24 +02:00
slush0
cc71fb0a02
Convert delays from float to int (ticks_us)
2016-09-27 17:23:23 +02:00
slush0
f27d5ad725
Remove unused code
2016-09-27 17:23:23 +02:00
slush0
e6df94cbd5
pb2py generator, build_pb2.sh
2016-09-27 17:23:22 +02:00
Pavol Rusnak
4eccc55c5c
add unit tests, add t.c.sha512
2016-09-27 17:22:50 +02:00
slush0
ddfde9a0ad
Initial version of protobuf library
2016-09-27 17:22:49 +02:00
slush0
456e1fba44
Pipe support & async pipe transport
2016-09-27 17:22:48 +02:00
slush0
a42b654eba
Playground
2016-09-27 17:21:03 +02:00
slush0
971e9f7ff1
Lightly refactored uasyncio, added logging
...
Demo animations
2016-09-27 17:21:03 +02:00