1
0
Commit Graph

17477 Commits

Author SHA1 Message Date
SomberNight
6793efd0af scripts: rm bip70.py
this script has been broken for 5+ years
2024-05-27 14:27:27 +00:00
SomberNight
ffc761be47 constants: add some more type hints 2024-05-27 14:26:56 +00:00
SomberNight
e783206ec7 network: re-detect is_proxy_tor every time we connect to a server
This avoids some false negatives for is_proxy_tor.
(previously we only set is_proxy_tor when the proxy settings were changed)
In particular, consider scenario:
- Tor browser not running
- user sets "localhost:9150" as proxy
- detection sets network.is_proxy_tor to False
- user starts Tor browser
- network, due to retries, finds proxy working and connects to some servers
- network.is_proxy_tor remains False
2024-05-27 14:26:32 +00:00
SomberNight
c9ed717bea dependencies: remove bitstring
- `bitstring` started depending on `bitarray` in version 4.1 [0]
  - that would mean one additional dependency for us (from yet another maintainer), which is not even pure python
- we only use bitstring for bolt11-parsing
- hence this PR rewrites the bolt11-parsing and removes `bitstring` as dependency
- note: I benchmarked lndecode using [1], and the new code performs better,
  taking around 80% time needed for old code (when using bitstring 3.1.9, pure python).
  Though the variance is quite large in both cases.

[0]: 95ee533ee4/release_notes.txt (L108)
[1]: d7597d96d0
2024-05-27 14:24:45 +00:00
SomberNight
e35b715ed8 qml: qeinvoice: fix regression in update_userinfo
follow-up 3b0cdef871

```
 29.60 | E | lnworker.LNWallet.[test_segwit_2] | Exception in pay_invoice: TypeError("unhashable type: 'list'")
Traceback (most recent call last):
  File "/home/user/wspace/electrum/electrum/util.py", line 1153, in wrapper
    return await func(*args, **kwargs)
  File "/home/user/wspace/electrum/electrum/lnworker.py", line 1518, in pay_invoice
    self.set_invoice_status(key, PR_INFLIGHT)
  File "/home/user/wspace/electrum/electrum/lnworker.py", line 2404, in set_invoice_status
    util.trigger_callback('invoice_status', self.wallet, key, status)
  File "/home/user/wspace/electrum/electrum/util.py", line 1796, in trigger_callback
    callback(*args)
  File "/home/user/wspace/electrum/electrum/gui/qml/qeinvoice.py", line 90, in on_event_invoice_status
    self.update_userinfo()
  File "/home/user/wspace/electrum/electrum/gui/qml/qeinvoice.py", line 327, in update_userinfo
    self.userinfo = userinfo_for_invoice_status([self.status])
  File "/home/user/wspace/electrum/electrum/gui/qml/qeinvoice.py", line 305, in userinfo_for_invoice_status
    return {
TypeError: unhashable type: 'list'
```
2024-05-27 14:21:50 +00:00
Sander van Grieken
05cdc4d6f8 qml: lightning invoice status can be one of onchain invoice states when using fallback address. (fixes #9018) 2024-05-27 14:21:19 +00:00
Sander van Grieken
06a52d8acf qt: normalize wallet path before lookup in window list 2024-05-27 14:20:43 +00:00
robertmin2
815a5272f0 AppArmor Profiles for Electrum
AppArmor Profiles for Electrum
2024-05-27 14:20:00 +00:00
ThomasV
bd32ebecb2 test_lnpeer: fix node_id in storage of created peers 2024-05-27 14:19:21 +00:00
SomberNight
622bc801bb follow-up prev 2024-05-27 14:18:53 +00:00
SomberNight
a2fb70d602 exchange_rate: historical rates: merge old+new data, don't overwrite
- CoinGecko restricted its historical API to last 365 days
  - we used to ask for, and get, the whole history, but now we can only ask for the last year
  - so change HTTP request to only ask for 365 days
- we cache historical rates to disk
  - previously we used to overwrite what is already stored, with the newly obtained data
  - now this is changed so that we merge the new data into the already stored data
2024-05-27 14:18:43 +00:00
SomberNight
d09131e916 lnworker: add_peer: no DNS lookup if a proxy is set, to avoid a DNS-leak
closes https://github.com/spesmilo/electrum/issues/9002
2024-05-27 14:17:52 +00:00
Sander van Grieken
70177e4b26 lnworker: don't query DNS for .onion hosts (fixes #9002) 2024-05-27 14:17:44 +00:00
Jamie C. Driver
a8620bd3c0 jade: update Jade api to 1.0.29
Updates cbor dependency to cbor2, required for modern linux/python
versions.
2024-05-27 14:16:33 +00:00
SomberNight
493becfffe ci: regtests: build own libsecp256k1 instead of using apt
- version in apt is too old (cirrus is using ubuntu 22.04 LTS atm) for schnorr module
- this way we have better control of exact version to use
2024-05-27 14:15:43 +00:00
SomberNight
3d588fada6 requirements: bump pinned (and max) aiorpcx versions to 0.23.1
related https://github.com/spesmilo/electrum/issues/8954
2024-05-27 14:14:14 +00:00
Sander van Grieken
7d707bb5c9 payment_identifier: don't assume bip70_data exists in has_expired() 2024-05-27 14:11:36 +00:00
Sander van Grieken
8bd4909162 qt: focus reason can't be None (fixes #8962) 2024-05-27 14:11:23 +00:00
ThomasV
70acb89042 save notes whenever modified, using 10s rate limiter. fixes #8951 2024-05-27 14:10:52 +00:00
Nicolas Kuttler
f755b690d8 Call pairing dialog when necessary, fixes #8970 2024-05-27 14:10:07 +00:00
Soren Stoutner
8ca1bdedc4 Change copyright email address to soren@debian.org. 2024-05-27 14:09:29 +00:00
sorenstoutner
70106b6f2c Add license information to AppStream metainfo.xml. 2024-05-27 14:09:18 +00:00
Soren Stoutner
dcc1da0494 Update AppStream metainfo.xml. 2024-05-27 14:09:08 +00:00
SomberNight
0d525679f9 qml: QETxDetails: defer to wallet.get_tx_info() for rbf/cpfp
It might make sense to allow bump_fee on a local tx, and so wallet.get_tx_info() allows it.
For dscancel/cpfp, it does not allow it either. Still, I think this logic should be encapsulated in the wallet.
2024-05-27 14:07:12 +00:00
ThomasV
1b3b6c7f7e contrib/osx:
- rename make_osx2.sh -> sign_osx.sh
- add command to unlock keychain
- chmod +x
2024-05-27 14:06:32 +00:00
SomberNight
0a94ea0bc2 build: split make_osx.sh script into two: "build" and "sign" parts 2024-05-27 14:06:23 +00:00
Sander van Grieken
39afa2c3e2 qml: add tx options to ConfirmTxDialog, RbfBumpFeeDialog 2024-05-27 14:05:02 +00:00
SomberNight
357ac6be92 interface: also log cancellations in send_request 2024-05-27 14:02:12 +00:00
ThomasV
99f6dd5d5d Merge pull request #8943 from SomberNight/202403_release_notes_454
prepare release 4.5.4
4.5.4
2024-03-13 15:09:52 +01:00
ThomasV
80586d2ced Merge pull request #8944 from SomberNight/202403_swap_messages
swaps: homogenise gui messages
2024-03-13 15:07:37 +01:00
ghost43
745f9184e4 Merge pull request #8942 from SomberNight/202403_get_swap_by_funding_tx
swaps: fix get_swap_by_funding_tx, and types/type-hints
2024-03-13 13:55:18 +00:00
SomberNight
01155ac6f5 swaps: homogenise gui messages
see https://github.com/spesmilo/electrum/issues/8940
2024-03-13 13:52:40 +00:00
SomberNight
85ffbfc83f prepare release 4.5.4 2024-03-13 12:53:44 +00:00
SomberNight
4a71032318 swaps: expand docstring for reverse_swap 2024-03-13 12:27:10 +00:00
SomberNight
05599eeda5 swaps: fix get_swap_by_funding_tx, and types/type-hints
- funding txs having only one output is not true...
- batch_rbf can combine funding txs
2024-03-13 11:37:01 +00:00
SomberNight
58a1bdfec7 lnworker.check_mpp_status: add docstring
This explains why stopping_soon behaves sanely with hold-invoice-htlcs.
2024-03-12 15:28:31 +00:00
SomberNight
af6a1f3d01 swaps: use longer final_cltv_delta for client-normal-swap
This gives more time for the client to come back online.

see https://github.com/spesmilo/electrum/issues/8940

- re note on submarine_swaps.py#L53:
  lnpeer.Peer.maybe_fulfill_htlc only checks against MIN_FINAL_CLTV_DELTA_ACCEPTED(=144),
  so this increased cltv_delta is not enforced when receiving the htlc on ln.
  It is put in the invoice, so the sender is supposed to honour it ofc.
  It would be nice to enforce it (make the check in maybe_fulfill_htlc dependent on
  what was in the invoice).
2024-03-12 14:20:52 +00:00
accumulator
ff50487528 Merge pull request #8933 from st3b1t/master
Removed TRT
2024-03-06 10:36:52 +01:00
st3b1t
9ad6688ce7 trt removed 2024-03-05 23:30:23 +01:00
ThomasV
8b2a596194 Merge pull request #8925 from SomberNight/202403_simplify_chan_dict
walletdb: chan dict: small clean-up (incl db upgrade)
2024-03-05 10:00:45 +01:00
SomberNight
30c9f5b6b1 walletdb: chan dict: small clean-up (incl db upgrade)
- "fail_htlc_reasons" was removed in 9b1c40e396
- "unfulfilled_htlcs": rm 2 dead items from the 4-tuple,
   and convert False value of forwarding_key
2024-03-01 16:28:46 +00:00
ThomasV
f6312366e6 swapserver: raise exception if client uses deprecated API 2024-03-01 17:25:37 +01:00
SomberNight
0faadc0469 lnpeer: fix some type hints
related https://github.com/spesmilo/electrum/pull/8924

note: "forwarding_key" can be stored as False. I think this is ugly and
might be better to do a storage upgrade to change those values to None.
2024-03-01 15:47:08 +00:00
ThomasV
c6802adbae qt wizard: set focus on next_button 2024-03-01 16:42:16 +01:00
ThomasV
33b1946202 Merge pull request #8924 from spesmilo/fix_swapserver_trampoline
Fix swapserver trampoline
2024-03-01 15:09:21 +01:00
ThomasV
fde5f5b9b7 lnpeer: fix #8825
In maybe_fulfill_htlc, return two items: (preimage, (payment_key, callback)).

Rationale: The caller needs a payment_key only if we return a callback.
If we do not, the caller should use the payment_key that was previously
stored in channel.unfulfilled_htlcs

Note that for trampoline onions, payment_key may contain the inner
or outer secret.
2024-03-01 14:53:10 +01:00
ThomasV
94a8754bdd regtest: test swapserver with trampoline onions 2024-03-01 12:00:24 +01:00
accumulator
d120492664 Merge pull request #8921 from levantah/levantah/del_bublina
Remove bublina Signet
2024-03-01 11:56:34 +01:00
Ahmed Levant
2dcffd1ef2 Remove bublina Signet
Fixes #8920
2024-03-01 11:21:49 +01:00
Sander van Grieken
b11d0062e8 wizard: log state when view not defined. ref #8815 2024-03-01 10:56:32 +01:00