1
0
Commit Graph

17826 Commits

Author SHA1 Message Date
Soren Stoutner
6bbb0446a7 Add .desktop file keywords entry. 2024-11-09 09:22:11 -07:00
ThomasV
3ee2d6a01d follow-up previous commit (indentation error) 2024-10-31 10:21:05 +01:00
ThomasV
f41a8105a1 normal swaps: do not try to get a refund if we have the preimage.
The other party's claim transaction might still be unconfirmed
at that point.
2024-10-31 10:13:34 +01:00
Sander van Grieken
974ed6828e run_electrum: allow running from git clone to override DeprecationWarning warnings 2024-10-30 11:35:17 +01:00
accumulator
1e403adf42 Merge pull request #9277 from accumulator/qml_tx_signing_flow
qml: refactor QEWallet.sign() to sign() and sign_and_broadcast(), add user feedback when signing fails.
2024-10-28 15:27:40 +01:00
accumulator
3f3c776124 Merge pull request #9279 from accumulator/qt_wizard_musig_user_feedback
qt: wizard: implement user feedback TODOs, consistently use wizard.check_multisig_constraints
2024-10-28 14:15:36 +01:00
Sander van Grieken
1363d8c878 qml: remove unused signals QEWallet.signSucceeded and QEWallet.signFailed 2024-10-28 10:08:32 +01:00
accumulator
1b9f1dbb7f Merge pull request #9250 from accumulator/network_tor_stream_isolation
network: use TOR stream isolation
2024-10-28 09:50:00 +01:00
ThomasV
3c61f2a64a Fix #9280:
- Wait until HTLCs are irrevocably removed before cleaning up their
   data structures (MPP and forwarding)
 - keep methods maybe_cleanup_mpp and maybe_cleanup_forwarding separate
 - perform cleanup in htlc_switch, so that process_unfulfilled_htlc
   has less side effects
 - In htlc_switch, we blank the onion_packet_hex field to signal that
   an HTLC has been processed. An item of chan.unfulfilled_htlcs may
   go through 4 stages:
   - 1. not forwarded yet: (None, onion_packet_hex)
   - 2. forwarded: (forwarding_key, onion_packet_hex)
   - 3. processed: (forwarding_key, None), not irrevocably removed yet
   - 4. done: (forwarding_key, None), irrevocably removed
 - in test_lnpeer, an extra iteration of htlc_switch has been added to
   trampoline forwarding tests
2024-10-27 07:23:38 +01:00
SomberNight
5c81f77b5d util: add docstring to EventListener 2024-10-25 16:58:47 +00:00
SomberNight
1779dbf74a lnpeer: listen to 'fee' events, and run maybe_update_fee()
follow-up 6fb9207a44

> technically the fee estimate of a given bitcoind only changes on new blocks, but because of how we are asking for fee estimates and how we are taking the median of many interfaces, it can change at any time for us

note: running this in the peer taskgroup, for proper exception-handling and logging
2024-10-25 16:36:14 +00:00
ThomasV
fabc3637a2 lnsweep: use lnworker.is_accepted_mpp to decide if we can
release the preimage. (see #9280)

lnworker.is_accepted_mpp includes an assert that will raise
if the MPP has been cleaned-up too early.
2024-10-25 12:21:19 +02:00
Sander van Grieken
f4520b9e0d network: use TOR stream isolation
also refactor, for proxy instantiation, use Network instance, not a proxy dict.
2024-10-25 01:10:58 +02:00
Sander van Grieken
a1a28afee6 qt: simplify df2a6f5 2024-10-24 16:41:47 +02:00
Sander van Grieken
624de1d43c qml: show invalid derivation path message to user in WCScriptAndDerivation 2024-10-24 16:40:02 +02:00
Sander van Grieken
df2a6f54d3 qt: don't remove seed_warning for new seeds when ext option gets enabled 2024-10-24 16:37:03 +02:00
Sander van Grieken
3aa12cd97f qml: allow direct seed edit when platform is not android
useful for debugging
2024-10-24 16:19:07 +02:00
Sander van Grieken
6bc15e21ba qml: fix display validation error in WCHaveSeed 2024-10-24 16:18:00 +02:00
Sander van Grieken
4a37668b01 wizard: don't require seed extension to be set early.
this also fixes deferring multisig constraint validation when seed is same as another cosigner,
but still can have different seed extension
2024-10-24 16:07:00 +02:00
ThomasV
6fb9207a44 lnwatcher: do not listen to 'fee' and 'network_updated' events.
Only blockchain changes are relevant for breach remedy.
2024-10-24 15:25:50 +02:00
Sander van Grieken
adb567b20f qt: wizard: implement user feedback TODOs, consistently use wizard.check_multisig_constraints 2024-10-24 14:48:39 +02:00
Sander van Grieken
06efe25ae7 qt: wizard: focus Next by default, focus Back/Cancel last 2024-10-24 14:26:52 +02:00
Sander van Grieken
6bbc5f8553 qt: wizard: keep wizard stack in a consistent state if load_next_component raises 2024-10-24 12:33:12 +02:00
ThomasV
f0d0c23869 Invalidate cache of sweep_info on each new block
Add regtest test for swapserver_forceclose
2024-10-24 11:20:12 +02:00
ThomasV
4420944b76 lnsweep: detect incomplete MPP using mpp status instead of get_payment_status
get_payment_status is not set in the case of a hold invvoice
2024-10-24 11:20:12 +02:00
ThomasV
5708f7b1c8 Persist MPP resolution status in wallet file.
If we accept a MPP and we forward the payment (trampoline or swap),
we need to persist the payment accepted status, or we might wrongly
release htlcs on the next restart.

lnworker.received_mpp_htlcs used to be cleaned up in maybe_cleanup_forwarding,
which only applies to forwarded payments. However, since we now
persist this dict, we need to clean it up also in the case of
payments received by us. This part of maybe_cleanup_forwarding has
been migrated to lnworker.maybe_cleanup_mpp
2024-10-24 11:19:53 +02:00
Sander van Grieken
96f7d91e3a qml: improve validation of pubkey/connectstring 2024-10-23 16:09:28 +02:00
Sander van Grieken
f89fd96e22 android: exclude unused plugins 2024-10-23 16:08:55 +02:00
ghost43
82a29b7b86 Merge pull request #9275 from SomberNight/20241022_tx_fee_warnings
qml: qetxfinalizer: use wallet.get_tx_fee_warning in all subclasses
2024-10-23 12:56:43 +00:00
Sander van Grieken
71d8f8b33c qml: followup prev. As now since c90c87afb9 there's always a confirmation popup, we
can use Pay... here
2024-10-23 13:08:58 +02:00
Sander van Grieken
c6cd47ebba qml: refactor QEWallet.sign() to sign() and sign_and_broadcast(), add user feedback when signing fails. 2024-10-23 12:02:01 +02:00
Sander van Grieken
0f26f38d18 qml: use Pay... on buttons where payment is not immediate on press, fix trustedcoin icon in OtpDialog 2024-10-23 11:45:42 +02:00
SomberNight
5251cc8d2f update release notes for version 4.5.8 2024-10-23 06:10:32 +00:00
SomberNight
c648cd1bae qml: qetxfinalizer: use wallet.get_tx_fee_warning in all subclasses
to show high fee warnings for RBF/dscancel
2024-10-22 18:40:56 +00:00
SomberNight
c90c87afb9 qml: QEWallet.sign: prompt for confirmation even if no PIN is set
it would probably be better to also tell the user if the tx is going to be broadcast
2024-10-22 17:10:15 +00:00
SomberNight
ca86c7eb44 qt tx_dialog: also show high-fee warnings for self-payments
e.g. if you consolidate own utxos, the "amount sent" in the dialog is zero,
but for high fee warnings that's not the amount we should be comparing against
2024-10-22 15:06:26 +00:00
SomberNight
ffb8f42259 qt rbf_dialog: set output_value properly
to also show high fee warnings for bump_fee/dscancel flows

fixes https://github.com/spesmilo/electrum/issues/9273
2024-10-22 15:04:06 +00:00
SomberNight
eded892c77 update release notes for version 4.5.7 2024-10-22 10:06:01 +00:00
ThomasV
c58c4d7451 Make lntransport not require lnutil.
This will be useful if we decide to ship lntransport as a separate
package. It is also a conceptual cleanup.

Notes:
 - lntransport still requires crypto.py
 - parsing node id from a bolt11 invoice is not supported.
2024-10-22 09:26:36 +02:00
SomberNight
8db2489739 qt gui: faster clean-up of hung UpdateCheckThread during exit
If you closed a main_window soon after opening it, and the UpdateCheckThread network request was slow
and still in progress, the gui would freeze until the network request finished.
2024-10-21 18:28:32 +00:00
Sander van Grieken
26622a0de6 trustedcoin: inherit WalletWizardComponent instead of WizardComponent 2024-10-21 16:14:58 +02:00
Sander van Grieken
fd21a3bec2 qt: wizard: fix type hint, avoid shadowing builtin 'next' 2024-10-21 16:14:58 +02:00
SomberNight
bad965a2ac tests: test_wizard: fix warnings
```
=============================== warnings summary ===============================
tests/test_wizard.py::ServerConnectWizardTestCase::test_no_advanced
tests/test_wizard.py::ServerConnectWizardTestCase::test_proxy
tests/test_wizard.py::ServerConnectWizardTestCase::test_proxy_and_server
tests/test_wizard.py::ServerConnectWizardTestCase::test_server
tests/test_wizard.py::WalletWizardTestCase::test_2fa
tests/test_wizard.py::WalletWizardTestCase::test_create_standard_wallet_haveseed_bip39
tests/test_wizard.py::WalletWizardTestCase::test_create_standard_wallet_haveseed_electrum
tests/test_wizard.py::WalletWizardTestCase::test_create_standard_wallet_newseed
  /tmp/cirrus-ci-build/.tox/py3/lib/python3.10/site-packages/_pytest/threadexception.py:82: PytestUnhandledThreadExceptionWarning: Exception in thread Plugins

  Traceback (most recent call last):
    File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
      self.run()
    File "/tmp/cirrus-ci-build/electrum/plugin.py", line 360, in run
      self.on_stop()
    File "/tmp/cirrus-ci-build/electrum/util.py", line 430, in on_stop
      loop = get_asyncio_loop()
    File "/tmp/cirrus-ci-build/electrum/util.py", line 1578, in get_asyncio_loop
      raise Exception("event loop not created yet")
  Exception: event loop not created yet

    warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg))
```
2024-10-21 13:00:21 +00:00
accumulator
f9e342ebb2 Merge pull request #9254 from accumulator/tests_wizard
tests: initial wizard test cases
2024-10-21 14:13:46 +02:00
Sander van Grieken
974ad64688 trustedcoin: clean up imports, flake warnings 2024-10-21 14:11:18 +02:00
ghost43
3a2dfb34cf Merge pull request #9258 from SomberNight/202410_py313_ssl
interface: disable ssl.VERIFY_X509_STRICT for self-signed certs
2024-10-20 14:57:19 +00:00
SomberNight
4e47e07550 lnchannel: (trivial) add/fix type-hints 2024-10-20 13:55:33 +00:00
SomberNight
dd140df17d lnchannel: convert sweep_address property to get_sweep_address() method
no functional changes
2024-10-20 13:12:52 +00:00
SomberNight
ccc4cb7f57 follow-up prev: fix linter 2024-10-20 12:09:00 +00:00
SomberNight
cb0e234474 tests: test_lnpeer: extend close_upfront_shutdown_script
- make some checks more explicit, and
- explicitly test that closing tx pays to script specified by Bob using feature
2024-10-20 11:57:31 +00:00