1
0
Commit Graph

17887 Commits

Author SHA1 Message Date
ThomasV
9aa7222c5c swaps: let plugin override self.is_server (config variable may be ser and plugin not active) 2024-12-01 09:16:16 +01:00
ThomasV
acbb57036f Merge pull request #9327 from hishope/master
chore: fix 404 status URL
2024-11-29 10:42:36 +01:00
ThomasV
81baaa52cd CLI: raise UserFacingException when passed unknown channel point. fixes #9326 2024-11-29 10:38:57 +01:00
hishope
2a9ec0764d chore: fix 404 status URL
Signed-off-by: hishope <csqiye@126.com>
2024-11-29 17:09:29 +08:00
ThomasV
86c9eb4858 psbt_nostr: minor fix 2024-11-28 11:16:49 +01:00
bitromortac
dbfc27d73b watchtower: only send first-stage HTLC justice txs
Due to malleability of HTLC-transactions, we can't send presigned
justice transactions for the second-stage HTLC transactions, which is
why we now send first-stage justice transactions for anchor channels.
2024-11-26 10:00:21 +01:00
bitromortac
d535821516 htlctx: deal with possible peer htlctx batching
Due to anchor channel's sighash.SINGLE and sighash.ANYONECANPAY,
several HTLC-transactions can be combined. This means we must watch for
revoked outputs in the HTLC transaction not only at index 0 but at any
index.
2024-11-26 09:28:00 +01:00
bitromortac
9c277802e9 sweep: rename sweep creation functions
naming scheme: tx(s)_our/their_ctx/htlctx_output-description

function names are shortened to whether a single (tx) or several sweep
transactions (txs) are generated
2024-11-25 19:24:51 +01:00
bitromortac
de9fee706d unit tests: tests for both anchors and old ctx types
* in test_lnutil, patch htlc weight to pass original anchor commitment
  test vectors
* activate tests for both commitment types
2024-11-25 12:31:38 +01:00
ThomasV
19e993f39b fix test_lnchannel (follow-up ea584e13fc) 2024-11-25 12:05:06 +01:00
ThomasV
cdc746713e lnwatcher: if broadcast is successful, add tx immediately, so that second-stage htlc can be added as well 2024-11-25 11:39:12 +01:00
bitromortac
ea584e13fc anchors: switch to zero-fee-htlcs
* sets the weight of htlc transactions to zero, thereby putting a zero
  fee for the htlc transactions
* add inputs to htlc-tx for fee bumping
* switches feature flags
* disable anchor test vectors, which are now partially invalid
2024-11-25 10:56:50 +01:00
bitromortac
d4222432f4 enable anchor_channels for regtest
* lower the final balance of the backup regtest, which is due to additional
  sweep transactions

* adapt ctx index
2024-11-23 12:03:37 +01:00
ThomasV
6735ae5ec8 fix unit test (follow-up 78d19c6e2f) 2024-11-23 11:58:29 +01:00
ThomasV
78d19c6e2f amchor outputs: fixes after rebase 2024-11-23 11:26:04 +01:00
ThomasV
efa239cc9b follow-up ece1fb39d2 2024-11-23 11:25:54 +01:00
ThomasV
ece1fb39d2 enable anchor outputs via config option 2024-11-23 10:10:16 +01:00
bitromortac
a3dc2b847e unit tests: test anchors in lnpeer and lnchannel
* testing of anchor channels is controlled via TEST_ANCHOR_CHANNELS
* rewrite tests in test_lnchannel.py
2024-11-22 12:23:51 +01:00
bitromortac
3a3f5059b4 backups: restore from closing tx, sweep to_remote
* add a method for backups to sweep to_remote
* to_remote sweeping needs the payment_basepoint's private key
  to sign the sweep transaction
* we restore the private key from our funding multisig pubkey
  (pubished with the closing transaction) and a static payment key secret
2024-11-21 12:18:53 +01:00
bitromortac
f746e2cc6b qt: add anchor channel icon
source: https://tabler-icons.io/anchor
2024-11-21 11:59:06 +01:00
bitromortac
9bfeffcdd1 lnsweep: update sweeps to_remote and htlcs
* sweep to_remote output, as this is now a p2wsh (previously internal
  wallet address)
* sweep htlc outputs with new scripts
2024-11-21 11:54:07 +01:00
bitromortac
b6e224c864 lnwatcher: add field for onchain htlc settlement control 2024-11-21 10:58:41 +01:00
bitromortac
18f81d0080 lnwatcher: renaming and comments for clarity 2024-11-21 10:43:09 +01:00
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