1
0
Commit Graph

17864 Commits

Author SHA1 Message Date
ThomasV
4d26fb552b fixes after rebase 2024-11-20 15:02:05 +01:00
bitromortac
8f7c11f295 tests: add anchor commitment test vectors from rfc 2024-11-20 12:05:14 +01:00
ThomasV
122740ad7b lnutil minor fix after rebase 2024-11-20 12:05:05 +01:00
bitromortac
7aa3dc1e40 lnutil+lnchannel: add anchors, adapt to_remote
* to_remote has now an additional csv lock of 1
* anchor outputs are added if to_local/remote outputs are present
* funder balance is reduced to accomodate anchors
2024-11-20 11:54:55 +01:00
bitromortac
7907b9c05d lnchannel+lnutil: change htlc output, send new sig
* changes the htlc outputs' witness script to have a csv lock of 1
* send signatures for remote ctx with ANYONECANPAY|SINGLE
* refactor htlc weight (useful for zero-fee-htlc)
2024-11-20 11:03:48 +01:00
bitromortac
c8bf515953 lnutil: update ctx fee calculation for anchors 2024-11-20 10:53:00 +01:00
bitromortac
22f5ff0d0e add static payment key
* in order to be able to sweep to_remote in an onchain backup scenario
  we need to retain the private key for the payment_basepoint
* to facilitate the above, we open a channel derived from a static
  secret (tied to the wallet seed), the static_payment_key combined with
the funding pubkey (multisig_key), which we can restore from the channel
closing transaction
2024-11-20 10:08:26 +01:00
bitromortac
3951e07c53 prepare a channel to have anchors
* add anchor ln features
* peer.use_anchors is added
* channel.has_anchors is added
2024-11-20 09:49:37 +01:00
ThomasV
19726c4427 try fo fix mpp unittests flakiness by waiting an extra iteration 2024-11-19 13:34:26 +01:00
ThomasV
81aed0f6c9 simplify maybe_fulfill_htlc
- move some checks in two helper methods:
    - invariant checks are performed in check_accepted_htlc
    - mpp checks are performed in check_mpp_is waiting
 - in order to avoid passing local_height to check_accepted_htlc,
   the height in the error message is added by create_onion_error.
2024-11-19 12:58:56 +01:00
ThomasV
5704276cbe remove outdated comment (received_mpp_htlcs is persisted now) 2024-11-19 12:55:58 +01:00
ThomasV
7a8569abc7 maybe_fulfill_htlc:
- do not fail because chain tip is stale if we already forwarded
 - if we already forwarded a htlc and its cltv gets too close, do
   not return, as this means we would never fulfill it
2024-11-19 12:33:30 +01:00
Sander van Grieken
49de400c27 2fa: fix #9312
(regression of 4a37668b01)
2024-11-19 09:13:27 +01:00
ThomasV
a04844b451 fix #9282 2024-11-18 08:43:47 +01:00
Sander van Grieken
fec2768692 qml: fix check when swap enabled 2024-11-15 02:14:16 +01:00
ThomasV
2d86a6177e Merge pull request #9300 from accumulator/gui_hint_multisig_watchonly
wizard: hint for primary signer xpub instead of xprv
2024-11-14 10:53:14 +01:00
ThomasV
fef6fc54c9 lnwatcher: do not keep watching channel because of non-existing outputs. fixes #9299 2024-11-14 10:18:07 +01:00
Sander van Grieken
7ee863f225 wizard: hint for primary signer xpub instead of xprv 2024-11-13 14:51:14 +01:00
ThomasV
7a7c0f1606 remove 'skipping header' lines from log, to make it less verbose 2024-11-13 11:43:11 +01:00
ThomasV
58fee0d1cc Merge pull request #9265 from SomberNight/202410_ln_address_reuse_2
lnworker: reserve wallet addresses also for chan backups
2024-11-13 10:59:03 +01:00
ThomasV
efb2bc1133 Merge pull request #9285 from accumulator/qt_wizard_validate_master_key
qt: additional validation for master keys in WCHaveMasterKey in wallet wizard
2024-11-13 10:27:12 +01:00
ThomasV
491824b883 Merge pull request #9261 from spesmilo/psbt_nostr
Psbt nostr
2024-11-12 11:07:38 +01:00
ThomasV
92063ba6aa Merge pull request #9295 from sorenstoutner/keywords
Add .desktop file keywords entry.
2024-11-12 10:41:56 +01:00
ThomasV
75f1d9b84b Merge pull request #9297 from wakiyamap/patch-2
add testnet4 explorer(wakiyamap.dev)
2024-11-12 10:41:38 +01:00
ThomasV
11558adb28 New plugin: psbt over Nostr
Replacement for cosignerpool
Encryption uses xpubs
2024-11-12 10:40:49 +01:00
ThomasV
589dc87b2b Merge pull request #9260 from spesmilo/swaps_over_nostr
Swaps over nostr
2024-11-12 09:48:46 +01:00
ThomasV
60f13a977e Swaps over Nostr
- Separation between SwapManager and its transport:
   Legacy transpport uses http, Nostr uses websockets
 - The transport uses a context to open/close connections.
   This context is not async, because it needs to be called
   from the GUI
 - Swapserver fees values are initialized to None instead
   of 0, so that any attempt to use them before the swap
   manager is initialized will raise an exception.
 - Remove swapserver fees disk caching (swap_pairs file)
 - Regtests use http transport
 - Android uses http transport (until QML is ready)
2024-11-12 09:32:25 +01:00
ThomasV
7fdf1e0669 add nostr, and nostr_relays in config 2024-11-12 08:52:42 +01:00
WakiyamaP
3d375116e9 add testnet4 explorer(wakiyamap.dev) 2024-11-11 11:55:04 +09:00
Soren Stoutner
6bbb0446a7 Add .desktop file keywords entry. 2024-11-09 09:22:11 -07:00
ThomasV
69503bbeb4 submarine swaps: disable tx batching, because we need
to handle the case where base_tx gets mined instead of
the replacing tx.

Also, call adb.add_transaction before broadcasting, to
prevent races.
2024-11-07 11:25:36 +01:00
accumulator
499e02fdcc Merge pull request #9290 from accumulator/qt_wizard_initial_focus
qt: add WizardComponent.initialFocus()
2024-11-05 20:24:37 +01:00
accumulator
3fbceacca2 Merge pull request #9284 from accumulator/update_recently_opened_sync
qt: keep list of recently used wallets in sync across windows
2024-11-05 15:02:38 +01:00
ThomasV
02e6c49fa6 Qt: fix tx grouping issue arising if onchain tx of a swap does not get mined. 2024-11-05 08:46:53 +01:00
Sander van Grieken
2134fcc4dc qml: fix InfoTextArea text sometimes out of bounds 2024-11-01 17:35:37 +01: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
Sander van Grieken
f2e590ae81 qt: add WizardComponent.initialFocus() which specifies the control to focus. If undefined, the Next button is focused by default 2024-10-29 12:03:57 +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
Sander van Grieken
fd12668da4 qt: additional validation for master keys in WCHaveMasterKey in wallet wizard 2024-10-28 14:30:56 +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
2113cd4f2e qt: keep list of recently used wallets in sync across windows
this also removes alpha-sort of the wallet list in favor of
placing most recently opened on top
2024-10-28 10:59:57 +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