Commit graph

1471 commits

Author SHA1 Message Date
SomberNight
034c1e0828
prepare release 3.3.7 2019-07-03 15:47:05 +02:00
SomberNight
e431a07258
fix prev: conditional import / type hint failure 2019-07-03 13:56:11 +02:00
SomberNight
d293b2e038
wallet: follow-up prev 2019-07-03 13:40:42 +02:00
ThomasV
37e7add776 Do not pass storage to address_synchronizer 2019-07-03 10:46:30 +02:00
SomberNight
fb76fcc886
trezor: use only Bridge when available
fixes #5420
2019-07-02 21:21:39 +02:00
SomberNight
53893be4c9
crash reporter: in Qt subclass, do network request using WaitingDialog
so it does not block the GUI
2019-07-02 19:27:36 +02:00
SomberNight
7c5247081b
change electrum.png to square (by padding)
ran "appimagelint" and apparently icon file needs to be a square
(could have just created another copy, but I guess a square icon
might make sense in other cases too)
2019-07-01 15:00:21 +02:00
SomberNight
4c63eca896
wallet.bump_fee: loosen sanity check a tiny bit 2019-06-29 16:22:37 +02:00
SomberNight
4f51308eab
coinchooser: clarify docs for make_tx 2019-06-29 16:21:07 +02:00
SomberNight
72d06038a7
synchronizer: fix race in _on_address_status
Triggering needs two consecutive scripthash status changes
in very quick succession. Client gets notification from server,
but then response to "blockchain.scripthash.get_history" will already contain
the changed-again history that has a different status.

20190627T101547.902638Z |     INFO | synchronizer.[default_wallet] | receiving history mwXtx49BCGAiy4tU1r7MBX5VVLWSdtasCL 1
20190627T101547.903262Z |     INFO | synchronizer.[default_wallet] | error: status mismatch: mwXtx49BCGAiy4tU1r7MBX5VVLWSdtasCL
2019-06-29 06:03:14 +02:00
SomberNight
37809bed74
qt high dpi: fix some text fields
There are probably other DPI related issues though.

closes #5471
closes #4597
closes #1927
2019-06-29 05:27:28 +02:00
SomberNight
e7304ce23e
TorDetector: minor clean-up 2019-06-29 04:03:29 +02:00
nachunjae
8a4e307b78 Update block explorer URL for btc.com (#5438)
* update block explorer URL for btc.com
2019-06-29 03:54:53 +02:00
SomberNight
f405c3fbdd
ledger: (trivial) rm some remnants of hw1 setup 2019-06-29 02:28:00 +02:00
SomberNight
935ab9a12f
interface: check if future already done in handle_disconnect
future could get cancelled in network.py in which case set_result raised
2019-06-28 21:13:33 +02:00
SomberNight
c6a54f05f5
wallet: some performance optimisations for get_receiving_addresses
jsondb takes a copy of the whole self.receiving_addresses
good for avoiding race conditions but horrible for performance...
this significantly speeds up at least
- synchronize_sequence, and
- is_beyond_limit (used by Qt AddressList)
2019-06-28 20:20:24 +02:00
SomberNight
a2bffb9137
network: harden against eclipse attacks 2019-06-27 19:10:25 +02:00
SomberNight
baa0293620
android build: persist debug keystore
so that we can upgrade debug installations on the phone and keep the datadir
2019-06-27 07:08:03 +02:00
SomberNight
0fafd8c0a7
fix #4777 again... 2019-06-27 05:00:16 +02:00
SomberNight
7bf6786bf5
build: note whether binary is reproducible in each case 2019-06-26 04:18:24 +02:00
SomberNight
4fc43da344
interface.debug will now also print errors 2019-06-26 01:16:34 +02:00
SomberNight
570c0aeca3
build: make NSIS windows binary deterministic by changing the .ico file
see bitcoin/bitcoin@217208a36d

-----

A lot of time was wasted on this... over the years actually...

Some notes and rant here, for future reference.

During the initial effort to try to make binaries reproducible,
out of the three windows binaries being distributed (standalone, portable, setup),
only the first two were successfully made deterministic.
Later, we started to use Docker-based builds. At that point ThomasV and I
could reproducibly build the same setup/nsis exe but Travis kept building a different one.

Recently I have noticed that if I do two subsequent builds of the setup exe on
the same machine, adding a new file in contrib/build-wine/ between the builds,
then I get different binaries. Playing around with this a bit, it seems:
- other files that are in the same folder as contrib/build-wine/electrum.nsi affect the binary
- only files that are in exactly the same folder matter (not recursively)
- only filenames matter (not permission, owner, timestamps, or file contents)
To see the difference in the binaries, use vbindiff, and disable the compression done
by nsis (SetCompress off).
There is a ~48 byte diff near the very beginning of the "Uninstaller" section.
I am only guessing it is the uninstaller section based on the sizes of the sections
printed by nsis during the build.
I have downloaded the binary built by Travis, and the diff is consistent with this
(i.e. it's the same kind of diff that manifests if I change the filename of one of
the supposedly unrelated files).
Commenting out the "WriteUninstaller" line in .nsi fixes the issue. i.e. if no
uninstaller is created then the binary becomes deterministic.
Commenting out the "!define MUI_ICON" line in .nsi also fixes the issue.
At this point I remembered the above referenced commit by bluematt; which I had
thought we had already followed up on...
Replacing the .ico file fixes the issue.
Note that it's not actually clear what the exact requirements for the .ico file are.
Removing any of the layers in the image seems to introduce non-determinicity.
The new .ico file has layers with resolutions and properties the bitcoin.ico file has.

I guess NSIS must have strict requirements for the icon size, and if a given size icon is missing
it might be creating it itself?? And during the downscaling it uses a non-deterministic
algorithm that initialises some RNG from the directory listing (bauerj's guess somewhat adapted :D).
Just crazy.
2019-06-24 21:51:47 +02:00
SomberNight
212ed8b18b
qt: set WWLabel text to be mouse-selectable by default
this lets user to copy-paste text in e.g. many wizard dialogs
2019-06-23 03:10:09 +02:00
SomberNight
fd5d1dab4f
coinchooser: clear up what "fee_estimator" expects 2019-06-20 22:46:22 +02:00
SomberNight
cb69aa80f7
coinchooser: don't spend buckets with negative effective value
Calculate the effective value of buckets, and filter <0 out.
Note that the filtering is done on the buckets, not per-coin.
This should better preserve the user's privacy in certain cases.

When the user "sends Max", as before, all UTXOs are selected,
even if they are not economical to spend.

see #5433
2019-06-20 22:42:50 +02:00
SomberNight
e0b1bbfc46
tests: new tests for bump_fee and rbf_batching 2019-06-20 22:42:50 +02:00
SomberNight
0c20fcb6b3
tests: fix existing bump_fee tests 2019-06-20 22:42:49 +02:00
SomberNight
8491a2d329
wallet: RBF batching will now reuse the change address 2019-06-20 22:42:49 +02:00
SomberNight
d0a43662bd
wallet: make "increase fee" RBF logic smarter
There are now two internal strategies to bump the fee of a txn.
bump fee method 1: keep all inputs, keep all not is_mine outputs,
                   allow adding new inputs
bump fee method 2: keep all inputs, no new inputs are added,
                   allow decreasing and removing outputs (change is decreased first)
Method 2 is less "safe" as it might end up decreasing e.g. a payment to a merchant;
but e.g. if the user has sent "Max" previously, this is the only way to RBF.

We try method 1 first, and fail-over to method 2.
Previous versions always used method 2.

fixes #3652
2019-06-20 22:42:48 +02:00
SomberNight
8bfe12e047
wallet: split "change address logic" from make_unsigned_transaction 2019-06-20 22:42:48 +02:00
SomberNight
e864fa5088
coinchooser: tweak heuristic scoring.
transactions without any change now get better scores.
transactions with really small change get worse scores.
2019-06-20 22:42:47 +02:00
SomberNight
f409b5da40
coinchooser: refactor so that penalty_func has access to change outputs 2019-06-20 22:42:47 +02:00
SomberNight
6424163d4b
wallet: fix rbf_batching edge case
The old change output was given to coinchooser
as part of possible UTXOs to use.
(Though the coinchooser was really unlikely to select it, as by
definition that UTXO is unconfirmed)
2019-06-20 21:53:24 +02:00
SomberNight
5f71163449
qt crash reporter: add warning that report contents are public 2019-06-20 17:32:21 +02:00
SomberNight
5effaaf428
TxOutput usage: trivial clean-up 2019-06-19 21:59:49 +02:00
SomberNight
c7a8540d06
kivy: show tx fee rate in tx dialog 2019-06-19 21:56:52 +02:00
SomberNight
cb204dd969
coinchooser: better account for fees in penalty_func 2019-06-17 19:55:39 +02:00
SomberNight
e3c26d7c7a
json_db: fix remove_spent_outpoint
method should make sure prevout_n is str...
also wrote failing test
2019-06-15 03:51:11 +02:00
SomberNight
d07caaf601
qt msgbox: when using rich text, set text format to "AutoText" instead
"\n" newlines were ignored for WIF_HELP_TEXT InfoButtons
2019-06-13 17:03:12 +02:00
SomberNight
23ec426b4f
qt history list: tweak sort order of items 2019-06-13 01:03:56 +02:00
SomberNight
811169da4b
plugins: on some systems plugins with relative imports failed to load
this caused electrum to fail to start
potentially only older python 3.6.x are affected

fixes #5421
2019-06-12 20:07:36 +02:00
SomberNight
29ce50a305
follow-up prev
wallet.is_mine needs to tolerate None as input
2019-06-12 18:27:13 +02:00
SomberNight
9e21b76c91
wallet: stricter validation in export_private_key
fixes #5422
2019-06-12 18:09:38 +02:00
SomberNight
9d2b601cc7
update block explorer URL for blockchain.info
closes #5408
2019-06-11 19:19:43 +02:00
SomberNight
7120c344b2
qt seed completer: colour words yellow if only in old electrum list
Some people complained that due to merging the two word lists,
it is difficult to restore from a metal backup, as they planned
to rely on the "4 letter prefixes are unique in bip39 word list" property.
So we colour words that are only in old list.
2019-06-08 15:37:49 +02:00
SomberNight
5c83df7709
android: update kivy, p4a, buildozer 2019-06-07 20:06:15 +02:00
SomberNight
6bdc6f559c
storage: fix bug in convert_version_17
closes #5400
2019-06-06 19:51:37 +02:00
SomberNight
53d189fc7a
storage: fix some madness about get_data_ref() and put() interacting badly
previously load_transactions() had to be called before upgrade();
now we reverse this order.

to reproduce/illustrate issue, before this commit:

try running convert_version_17 and convert_version_18
(e.g. see testcase test_upgrade_from_client_2_9_3_old_seeded_with_realistic_history)
and then in qt console:
>> wallet.storage.db.get_data_ref('spent_outpoints') == wallet.storage.db.spent_outpoints
False
>> wallet.storage.db.get_data_ref('verified_tx3') == wallet.storage.db.verified_tx
False
2019-06-06 19:49:06 +02:00
SomberNight
33308307a4
bip70 payreq: do not show error messages in gui
closes #5393
2019-06-05 19:40:33 +02:00
SomberNight
0553ab7f3f
follow-up prev
PaymentRequest.error is really not intuitive.........
2019-06-05 19:05:58 +02:00