Commit graph

9454 commits

Author SHA1 Message Date
SomberNight
e8b5bcf31e
fix incorrect txid for partial segwit txns
follow-up #4405
2018-06-13 15:54:45 +02:00
SomberNight
12c5474cf1
stricter tx deserialization: forbid negative output amount values 2018-06-12 14:41:30 +02:00
SomberNight
0b78cb5e6b
stricter tx deserialization: forbid output amount values over 21 million btc 2018-06-12 14:33:22 +02:00
Johann Bauer
5eb1cbef92 [WIP] Crash reports android (#3870)
* Split crash reporter class

In Qt related stuff and basic stuff.

* Crash reports from Android

* Ignore exceptions in crash_reporter (if any)

* Open issue in browser

* Switch back to real server
2018-06-12 14:17:34 +02:00
Janus
17ef023c8c icons: use non-flat lock/unlock icons, and rerender to 512x512 2018-06-12 12:30:44 +02:00
Janus
325e9b0d6f icons: fix viewbox of status_waiting and rerender 2018-06-12 12:20:52 +02:00
SomberNight
71ce7cce6d
stricter tx deserialization: forbid junk at the end 2018-06-12 10:51:51 +02:00
ThomasV
0e8976856d
Merge pull request #4429 from Anilkumar18/patch-2
Added a meaningful message on invalid public key
2018-06-12 10:49:16 +02:00
ThomasV
6f2396be34
Merge pull request #4435 from spesmilo/hi_res_old_icons
Add SVG icons resembling old raster icons
2018-06-12 10:35:03 +02:00
Anilkumar18
0a24c820bb
Altered the do_encrypt warning message
changed the protection against public_key
2018-06-12 11:16:02 +05:30
Janus
c2ac157f67 Add SVG icons resembling old raster icons 2018-06-11 21:39:40 +02:00
SomberNight
fa8707b390
trustedcoin kivy: fix restoring with "lost 2fa" option 2018-06-11 21:25:17 +02:00
ThomasV
ebdce9fb9a
Merge pull request #4405 from SomberNight/remove_from_addresses_from_wallet2
remove "from addresses"
2018-06-11 19:33:27 +02:00
SomberNight
6b8a563d41
add witness version to our partial format 2018-06-11 19:25:02 +02:00
SomberNight
a0ba5a7962
change partial txn format: add header. only parse inputs and witness for partial txns. 2018-06-11 17:57:29 +02:00
SomberNight
89040de758
remove "from addresses" from wallet logic 2018-06-11 17:55:31 +02:00
ThomasV
79558c1170 kivy wizard: replace checbox with button 2018-06-11 17:47:22 +02:00
ThomasV
e196d7b4d1 kivy: use TextInput to workaround Label texture size issue 2018-06-11 17:47:22 +02:00
SomberNight
1b36dd7690 fix "max" button to account for 2fa fees in both Qt and kivy 2018-06-11 17:47:22 +02:00
SomberNight
cf80952071 better handle exceptions in wizard re "cannot connect to trustedcoin server" 2018-06-11 17:47:22 +02:00
SomberNight
4fea9edd11 distinguish invalid otp from server failure when sending tx 2018-06-11 17:47:22 +02:00
SomberNight
27012e7394 tell user about 2fa fees when sending tx 2018-06-11 17:47:22 +02:00
SomberNight
396fa949b0 follow-up prev 2018-06-11 17:47:22 +02:00
SomberNight
531a2a5c1f during wallet restore allow user to retry after invalid OTP. add abort button on kivy. 2018-06-11 17:47:22 +02:00
SomberNight
248a3a5755 otp/email dialog handles pressing enter. do not offer to show seed for 2fa wallet. 2018-06-11 17:47:22 +02:00
ThomasV
9ceb73f014 follow-up a15b351b00c5a893c699c23111d8151377b8a262 2018-06-11 17:47:22 +02:00
ThomasV
8d5e666d30 support TrustedCoin plugin in the kivy GUI 2018-06-11 17:47:22 +02:00
Anilkumar18
ece457627b
Added a meaningful message on invalid public key 2018-06-11 17:54:22 +05:30
ThomasV
5a75ce74d7
Merge pull request #4422 from SomberNight/fix_4421
socket.getaddrinfo on win32: do our own dns resolution outside the lock
2018-06-11 12:18:37 +02:00
ThomasV
0682166314
Merge pull request #4419 from SomberNight/kivy_show_all_xpubs
kivy: show all xpubs
2018-06-11 12:11:35 +02:00
SomberNight
56a399e1da
fix revealer for linux distributables; and small clean-up 2018-06-10 22:12:23 +02:00
SomberNight
fc6cb70c80
socket.getaddrinfo on win32: do our own dns resolution outside the lock 2018-06-09 19:15:00 +02:00
SomberNight
0962766b72
kivy: show all xpubs 2018-06-08 20:33:09 +02:00
SomberNight
7043d6907f
follow-up prev 2018-06-08 20:31:04 +02:00
SomberNight
1d4ca34ca6
kivy: fix potential crash in on_resume
happened for me at least once, but for some reason kivy actually "ignored the exception", and simply printed a long trace into logcat, starting with:
WARNING:kivy:stderr: Exception ignored in: 'kivy.core.window._window_sdl2._WindowSDL2Storage.cb_event_filter'
2018-06-08 20:29:07 +02:00
SomberNight
cad8e29ed7
kivy: when pressing "max" button, catch NoDynamicFeeEstimates 2018-06-08 18:55:25 +02:00
matejcik
208606beda trezor: do not rely on deprecated ckd_public (#4416) 2018-06-08 17:07:49 +02:00
Dev Random
c6fce4b7cc do not actually compute the nested p2wsh-p2sh script if just estimating size (#4412) 2018-06-07 17:44:48 +02:00
SomberNight
610b37890f
kivy: after deleting wallet, try to open saved wallet
saved wallet = "wallet that was last open during a graceful shutdown"

previously we would just try to open "default_wallet". now, if the deleted wallet is not the saved wallet, we open the saved wallet; else try to open "default_wallet". if "default_wallet" does not exist, as before, the wizard launches.
2018-06-06 19:38:59 +02:00
SomberNight
ff7159495c
kivy: save and open to last wallet
The previous code did not work as before the flow reaches the old save point window.wallet is set to None in on_stop.
2018-06-06 19:21:00 +02:00
Harm Aarts
e57e55aad8 Remove explicit send calls, part deux (#4408)
* Rename synchronous_get to synchronous_send

This makes it more inline with the method 'send' of which
synchronous_send is the, well, synchronous version.

* Move protocol strings from scripts to network

This is again a small step in the right direction. The network module is
going to accumulate more and more of these simple methods. Once
everything is moved into that module, that module is going to be split.

Note that I've left the scripts which use scripts/util.py alone. I
suspect the same functionality can be reached when using just
lib/network.py and that scripts/util.py is obsolete.

* Remove protocol string from verifier and websocket

Websocket still has some references, that'll take more work to remove. Once the
network module has been split this should be easy.
I took the liberty to rename a variable to better show what it is.

* Remove protocol strings from remainder

The naming scheme I'm following for the newly introduced methods in the network
module is: 'blockchain.<subject>.<action>' -> def <action>_(for|to)_<subject>

* Move explicit protocol calls closer to each other

This makes it easier to keep track of the methods which are due to be
extracted.

* Remove `send` when using `get_transaction`

This is the final step to formalize (the informal) interface of the network
module.
A chance of note is changed interface for async/sync calls. It is no longer
required to use the `synchronous_send` call. Merely NOT passing a callback
makes the call synchronous. I feel this makes the API more intuitive to work
with and easier to replace with a different network module.

* Remove send from get_merkle_for_transaction

The pattern which emerged for calling the lambda yielded an slight refactor.
I'm not happy with the name for the `__invoke` method.

* Remove explict send from websockets

* Remove explicit send from scripts

* Remove explicit send from wallet

* Remove explicit sync_send from commands, scripts

* Remove optional timeout parameter

This parameter doesn't seem to be used a lot and removing it makes the
remaining calls easier. Potentionally a contentious choice!

* Rename `broadcast` to `broadcast_transaction`

Doing so makes the method name consistent with the other ElectrumX protocol
method names.

* Remove synchronous_send

Now every method is intuitive in what it does, no special handling required.
The `broadcast_transaction` method is weird. I've opted not to change the
return type b/c I found it hard to know what the exact consequences are. But
ideally this method should just works as all the other ElectrumX related
messages. On the other hand this shows nicely how you _can_ do something
differnt quite easy.

* Rename the awkwardly name `__invoke` method

The new name reflects what it does.

* Process the result of linter feedback

I've used flake8-diff (and ignored a couple of line length warnings).

* Rename tx_response to on_tx_response

This fell through the cracks when this branch was rebased.

* subscript_to_scripthash should be get_balance

An oversight while refactoring.

* Add missing return statement

Without this statement the transaction would have been broadcasted twice.

* Pass list of tuples to send not single tuple

* Add @staticmethod decorator

* Fix argument to be an array
2018-06-06 15:06:04 +02:00
ThomasV
0fb3d3c825
Merge pull request #4411 from kyuupichan/get_chunk
Stop using deprecated RPC blockchain.block.get_chunk
2018-06-06 09:13:06 +02:00
Neil Booth
bc83fa8d68 Stop using deprecated RPC blockchain.block.get_chunk
Use blockchain.block.headers instead.  It's more flexible but
that flexibility is not used here.

Port of 09798d6b20
2018-06-06 10:58:57 +09:00
Neil
e0a6b082d2 First message on an interface is server.version (#4407)
- Use server.ping to ping (valid as of protocol version 1.2) rather
  than server.version (deprecated as a ping)
- Ping every 5 mins rather than every 1 minute.  By default servers
  don't consider a connection stale until 10 minutes of inactivity.
- Remove unused last_request member of interface

Port of c3f26e59db
2018-06-05 12:41:41 +02:00
SomberNight
f0daf2d37b
Qt: addresses tab - align text 2018-06-04 22:37:34 +02:00
Johann Bauer
10c0746287 Make new status icons closer to their original color 2018-06-04 21:30:22 +02:00
SomberNight
792c248919
Qt: FeerateEdit.get_amount now returns sat/byte 2018-06-04 21:17:25 +02:00
SomberNight
9788ca0250
Qt: feerate edit was sometimes rounding inconsistently 2018-06-04 21:01:47 +02:00
ghost43
d667c5d46e
Merge pull request #4402 from kyuupichan/master
Subscribe to raw headers
2018-06-04 17:15:49 +02:00
SomberNight
105101bb5c
fix #4403 2018-06-04 17:07:50 +02:00