1
0
Commit Graph

18603 Commits

Author SHA1 Message Date
ThomasV
b91c5d18cb call lnwatcher.trigger_callbacks in offline mode 2025-05-26 11:48:00 +02:00
ThomasV
e1ac476bcf KeystoreWizard: support seed extension 2025-05-26 10:35:41 +02:00
ThomasV
ce8242c29c txbatcher: remove fixme 2025-05-25 09:47:36 +02:00
ThomasV
bd20d6e0af follow-up 51ced92f44 2025-05-24 17:34:00 +02:00
ThomasV
51ced92f44 Qt: let user enable/disable keystores with seed or hw wallet 2025-05-24 11:18:07 +02:00
ThomasV
553aef519b Qt wizard: clean up first page a bit 2025-05-24 11:00:18 +02:00
ThomasV
45c35c0b00 allow password encryption in hardware wallets 2025-05-23 18:42:54 +02:00
SomberNight
f95d4ce287 util.profiler: add support for async functions 2025-05-23 16:18:59 +00:00
SomberNight
37350edeae plugins: use util.make_dir for creating external plugin dir
This sets more restrictive unix permissions on the folder.
Also, util.make_dir is "multiprocess-safe".
2025-05-23 15:49:14 +00:00
SomberNight
5084f75724 util.make_dir: handle multi-process race
When launching an electrum daemon and an electrum cli command quickly after each other,
in a test using a random fresh datadir, they both try to create the same folder hierarchy
and race on the "if not exist: mkdir" commands.
2025-05-23 15:49:11 +00:00
ThomasV
22fd7a9440 Merge pull request #9842 from spesmilo/txbatcher_notenoughfunds
txbatcher: remove outputs if NotEnoughFunds is raised
2025-05-23 17:42:10 +02:00
ThomasV
25dabf3105 txbatcher: if we raise NotEnoughFunds, remove
the largest output from the current tx and retry

In the unit test, this results in waiting until the current tx is mined.
2025-05-23 17:11:56 +02:00
Sander van Grieken
84322500ef lnworker: imports, formatting, whitespace 2025-05-23 14:00:57 +02:00
SomberNight
9b24316915 plugin: _execute_commands_in_subprocess: make sure pipes get closed 2025-05-22 21:48:27 +00:00
ghost43
ddaa204b70 Merge pull request #9853 from SomberNight/202505_adb_transaction_lock
adb: merge `transaction_lock` and `lock`, protect more critical sections
2025-05-22 21:45:32 +00:00
ghost43
51753a4d62 Merge pull request #9855 from accumulator/test_is_private_netaddress_expand
tests: also test for RFC1918 IPv4 and IPv4-in-IPv6 and IPv6 link-local addresses
2025-05-22 14:20:09 +00:00
Sander van Grieken
caef77d45d tests: also test for RFC1918 IPv4 and IPv4-in-IPv6 and IPv6 link-local addresses 2025-05-22 11:02:46 +02:00
SomberNight
4543192e1a adb: take lock in more places
for example, adb.get_utxos() could previously return an inconsistent result
2025-05-21 18:43:36 +00:00
SomberNight
3b37a920d6 adb/wallet: merge transaction_lock and lock
The distinction was no longer clear.
2025-05-21 18:43:33 +00:00
SomberNight
e75476430c requirements: bump min dnspython to 2.2.0
follow-up 713a20e309
https://github.com/spesmilo/electrum/pull/9833

On Windows, above commit broke dns_hacks.py with dnspython==2.0.0 and 2.1.0.
Newer dnspython works.
Root cause not immediately obvious. Probably not worth debugging, I will just bump the required version instead.

With dnspython==2.0.0, the log gets spammed and dns fails:
```
$ python3 -m pip install --user "dnspython==2.0.0"

 10.59 | E | asyncio | Exception in callback _ProactorBasePipeTransport._call_connection_lost(None)
handle: <Handle _ProactorBasePipeTransport._call_connection_lost(None)>
Traceback (most recent call last):
  File "...\Python310\lib\asyncio\events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "...\Python310\lib\asyncio\proactor_events.py", line 158, in _call_connection_lost
    self._protocol.connection_lost(exc)
  File "...\Python310\site-packages\dns\_asyncio_backend.py", line 38, in connection_lost
    self.recvfrom.set_exception(exc)
asyncio.exceptions.InvalidStateError: invalid state
```
With dnspython==2.1.0, no more log spam but all dns resolutions time out:
```
$ python3 -m pip install --user "dnspython==2.1.0"

 33.29 | I | dns_hacks | dnspython failed to resolve dns (AAAA) for 'testnet.qtornado.com' with error: Timeout('The DNS operation timed out after 31.591506242752075 seconds')
 33.29 | I | dns_hacks | dnspython failed to resolve dns (AAAA) for 'api.coingecko.com' with error: Timeout('The DNS operation timed out after 31.590490579605103 seconds')
 33.29 | I | dns_hacks | dnspython failed to resolve dns (A) for 'testnet.qtornado.com' with error: Timeout('The DNS operation timed out after 31.591506242752075 seconds')
 33.29 | I | dns_hacks | dnspython failed to resolve dns (A) for 'api.coingecko.com' with error: Timeout('The DNS operation timed out after 31.590490579605103 seconds')
 33.35 | I | dns_hacks | dnspython failed to resolve dns (AAAA) for 'blockstream.info' with error: Timeout('The DNS operation timed out after 31.59534502029419 seconds')
 33.35 | I | dns_hacks | dnspython failed to resolve dns (A) for 'blockstream.info' with error: Timeout('The DNS operation timed out after 31.594367265701294 seconds')
 33.38 | I | dns_hacks | dnspython failed to resolve dns (AAAA) for 'electrum.blockstream.info' with error: Timeout('The DNS operation timed out after 31.602211713790894 seconds')
 33.38 | I | dns_hacks | dnspython failed to resolve dns (A) for 'electrum.blockstream.info' with error: Timeout('The DNS operation timed out after 31.60122585296631 seconds')
```
2025-05-21 18:41:25 +00:00
SomberNight
0a07849626 lnsweep: add comment we could batch "MPP htlcs for the same payment" 2025-05-21 16:09:17 +00:00
ghost43
6b7a026945 Merge pull request #9848 from SomberNight/202505_refactor_lnchannel_ctx_updates
lnchannel: refactor can_send_ctx_updates
2025-05-21 15:49:34 +00:00
SomberNight
65c9a5f875 lnchannel: refactor can_send_ctx_updates
This adds a lot more sanity checks to lnpeer/lnchannel for chan update operations,
and more logging in case they are violated.
2025-05-21 14:57:56 +00:00
ThomasV
8d5d330b07 Merge pull request #9243 from accumulator/qml_oneserver
qt,qml: show option for single server in ServerConfig
2025-05-21 12:04:56 +02:00
Sander van Grieken
de30c6139c text: fix _ string 2025-05-21 11:55:44 +02:00
Sander van Grieken
1063f0daa7 lnutil: lower minimum max-htlc-in-flight for new channels from 100_000_000 to 90_000_000
so we don't error out when GUI hinted minimum 2mBTC channel size is used for peers that
constrain max-htlc-in-flight to 45% of channel capacity. (fixes #8712)
2025-05-21 11:35:08 +02:00
accumulator
705f927899 qt: show option for single server in network dialog 2025-05-21 10:32:18 +02:00
ThomasV
958df667fb Merge pull request #9492 from stokito/patch-1
chore: improve Fastlane full_description.txt
2025-05-21 10:02:33 +02:00
ThomasV
727162c7ab Merge pull request #9493 from stokito/patch-2
chore: README.md add link to Crowdin translations
2025-05-21 09:54:52 +02:00
ThomasV
bae7f2490d Merge pull request #9846 from accumulator/qt_paytoedit_completer
qt: implement completer for PayToEdit
2025-05-21 09:52:57 +02:00
f321x
539b83c2e4 followup #9845, fix broken mpp consolidation test
fixes broken test_trampoline_mpp_consolidation caused to fail by
https://github.com/spesmilo/electrum/pull/9845 by allowing single
channel splits for trampoline payments if TEST_FORCE_MPP is Trues
as the test relies on mpp through a single channel (it tests mpp and
there is only a single channel on the graph).
2025-05-20 18:34:46 +02:00
ghost43
00136ed8c0 Merge pull request #9845 from f321x/fix_exclude_single_channel_splits
fix: suggest_splits exclude single channel splits
2025-05-20 15:49:56 +00:00
ThomasV
0bce76c49d lnchannel: add strict parameter to remaining_max_inflight
also fix some indentations and rm unused imports
2025-05-20 17:45:39 +02:00
f321x
cfdaafdd52 fix: suggest_splits exclude single channel splits 2025-05-20 17:34:48 +02:00
Sander van Grieken
b0c6674319 qt: implement completer for PayToEdit 2025-05-20 15:28:55 +02:00
ThomasV
05733088a3 psbt_nostr: minor fix 2025-05-20 13:52:30 +02:00
ThomasV
d1917b2951 Merge pull request #9837 from spesmilo/htlc_slots_left
pass number of htlc_slots_left to suggest_splits
2025-05-20 12:55:45 +02:00
ThomasV
4e64a880fc Merge pull request #9836 from f321x/concurrent_lookup_of_payment_identifier
make openalias and lnaddress lookup concurrent
2025-05-20 12:45:57 +02:00
ThomasV
b432a1406a lnchannel: apply stricter max_htlc_value_in_flight rules for receiving
Otherwise we create invoices that eclair cannot route to us
2025-05-20 12:44:14 +02:00
f321x
e433b8d5bf explicitly test the htlc slot limit in TestMppSplit 2025-05-20 12:26:21 +02:00
f321x
40f11213df make openalias and lnaddress lookup concurrent 2025-05-20 10:08:36 +02:00
ThomasV
713a20e309 Merge pull request #9833 from f321x/use_asyncio_dnspython_methods
dns: use async dnspython interface
2025-05-20 08:56:47 +02:00
Sander van Grieken
82e3932aaf network: add oneserver/auto_connect both enabled checks, avoid connecting to random/multiple servers
if oneserver is enabled.
2025-05-19 18:07:29 +02:00
Sander van Grieken
1dfe2ccec0 qml: show option for single server in ServerConfig 2025-05-19 18:07:29 +02:00
ThomasV
8396a22286 Merge pull request #9801 from SomberNight/202505_ban_unicode
ci: add linter task "ban unicode" to protect against malicious unicode
2025-05-19 15:02:45 +02:00
Sander van Grieken
000b1bb3b5 swaps: update instructions in manifest, add Max Forward and Max Reverse amounts in qml provider picker 2025-05-19 14:55:34 +02:00
f321x
3693c38e37 swaps: replace offers dict with class, fix incorrect naming
introduces a class SwapOffer which is used instead of passing around
offers in dicts.

Also fixes incorrect variable naming of swapserver npubs / public keys
by assigning the npub instead of the hex pubkey to
config.SWAPSERVER_NPUB
2025-05-19 14:22:23 +02:00
ThomasV
cc25048e29 swap providers dialog with liquidity info 2025-05-19 13:22:50 +02:00
ThomasV
b949eb5bf9 paytoedit: do not stip whitespaces in payto field while user is typing (fix regression) 2025-05-19 11:52:30 +02:00
ThomasV
e06e2c0ba4 Merge pull request #9740 from f321x/update_swap_liquidity_on_events
swaps: Improve accuracy of swapserver liquidity announcement.
2025-05-19 10:23:38 +02:00