Commit Graph

914 Commits (deb235a12689ce2dbd314a949b2ac60c48f44731)
 

Author SHA1 Message Date
Carla Kirk-Cohen deb235a126
multi: default to P2TR for loop out 2 years ago
Carla Kirk-Cohen 84c3ef0402
multi: update sweeping to allow different sighashes and claim scripts
Taproot spends require a different sighash, so we update our HtlcScript
interface to provide the appropriate sighash when sweeping. We also add
distinct Timeout/Success Script functions to allow for tapleaf spends
which have different locking scripts for different paths. Note that the
timeout and success paths will be the same for segwit v0 htlcs, because
it has a single branched script containing all spend paths.

In future iterations, this differentiation of claim scripts can also
be used to use musig2 to collaboratively keyspend P2TR htlcs with the
server. This script can be expressed as PriorityScript (because we'll
try to keyspend as a priority, and then fall back to a tap leaf spend).
As we've done here, segwit v0 spends would just return their single
script for PriorityScript, and the claim would be no different from
our other claims.
2 years ago
Carla Kirk-Cohen d29a0a8862
swap: add locking conditions to HtlcScript interface
Use of the Script() function is problematic when we introduce taproot
because our script will vary depending whether we use keyspend or a
tapleaf spend path (and on the tapleaf spent). This has not previously
been a problem for segwitv0 scripts, because they contain all of the
logical branches for each of our spend conditions in a single script.

This commit prepares for removal of the Script() function by moving
our address/pkScript/sigScript generation (which need Script()) into
each script's implementation of the HtlcScript interface so that
they have access to the script directly.
2 years ago
Carla Kirk-Cohen 1616943afe
swap: add taproot inputs to fee estimation 2 years ago
Harsha Goli d22b064e54
swap: HTLCV3 added
In this commit we add the version 3 htlc, which is implemented with
taproot script spending the two payment paths: the claim path case, and
the timeout case.
2 years ago
Carla Kirk-Cohen 9d2d5a78d4
multi: pass shared key to new htlc
TODO - our view etc functions don't have our shared key, find a good way
to get this. A possible solution is just to lazily store it so that we
don't need to call lnd/create a session every time we want to restore
it.
2 years ago
Carla Kirk-Cohen a2d97d67d5
multi: add session to swap kit 2 years ago
Carla Kirk-Cohen d696ce34a4
multi: add nonce to server loop out request 2 years ago
Carla Kirk-Cohen 35f4562f32
gomod: update to lndclient/ lnd/ btcd with musig2 2 years ago
Oliver Gugger deec719dfc
Merge pull request #472 from lightninglabs/btcec-v2-btcutil-bump
multi: bump btcec/v2 and btcutil to new versions
2 years ago
Oliver Gugger 5f46d0b83f
travis+docker: bump golang version to v1.17.x 2 years ago
Harsha Goli 7a16e3b25d
multi: bump btcec/v2 and btcutil to new versions 2 years ago
Oliver Gugger d1ba70e3fa
Merge pull request #469 from guggero/sweeper-pk-script
sweep: always send signed output's pk script
2 years ago
Oliver Gugger 732390e677
release_notes: add notes about bugfix 2 years ago
Oliver Gugger b7e5c0b449
sweep: always send signed output's pk script
Fixes #457.
The SignOutputRaw RPC is normally too lenient when it comes to fields
not being set, which is why this used to work previously. But with lnd
in remote signing mode, we need all the extra meta information available
on an input being signed for, so we actually need the pk script being
set.
Loop fully works with a remote signing lnd backend pair after applying
this fix.
2 years ago
András Bánki-Horváth a6350905d7
Merge pull request #466 from bhandras/routing-plugin-force-mc-import
routing: integrate with the forced MC import to eliminate the "1 sec hack" when importing pair history
2 years ago
Andras Banki-Horvath eb1371ee1e
docs: update release notes 2 years ago
Andras Banki-Horvath 5b737855c1
loopd: update minimum required LND version to v0.14.2-beta 2 years ago
Andras Banki-Horvath dc9bc9e976
routing: integrate forced MC import to the low/high plugin 2 years ago
Andras Banki-Horvath 9ace542056
mod: bump lndclient to 0.14.2 including forced MC import 2 years ago
Harsha Goli c05ee21e46
Merge pull request #465 from arshbot/feerate-fix
main: fix feepercent from intflags to float
2 years ago
Harsha Goli 0b414cb45e
main: fix feepercetn from intflags to float
Previously, the feepercent flag on autoloop was set to an IntFlag and
later converted to Float, leading to the issue where users couldn't
specify decimal rates even though we allowed it.
2 years ago
András Bánki-Horváth 40882b74e4
Merge pull request #462 from bhandras/routing-plugin-report-filter 2 years ago
Andras Banki-Horvath 32d55dc814
loopout: do not report prepays and fix plugin type if acquire fails 2 years ago
Yong f650071bca
Merge pull request #461 from yyforyongyu/add-server-state
swapserverrpc: update server swap state
2 years ago
yyforyongyu dfbd01988e
swapserverrpc: update server swap state 2 years ago
András Bánki-Horváth bf67b14595
Merge pull request #439 from bhandras/ignore_cheap_paths
loopout: using server recommended routing plugins + low/high router
2 years ago
Andras Banki-Horvath 312819c8c6
docs: update release notes 2 years ago
Andras Banki-Horvath 01bf94ad11
tests: add unit tests for the low/high routing plugin 2 years ago
Andras Banki-Horvath ffd52aba2f
loopout: add low/high routing plugin 2 years ago
Andras Banki-Horvath 1d1354d2cb
config: make total payment timeout and retries configurable 2 years ago
Andras Banki-Horvath 1943edfd78
loopout: use optional routing plugin for the main swap invoice 2 years ago
Andras Banki-Horvath 04ebc8d568
routing: add routing plugin inteface and skeleton 2 years ago
Andras Banki-Horvath 0f002733f6
loop: extend server protocol for routing plugin recommendations
This commits extends the server protocol with routing plugin
recommendations and routing result reporting.
2 years ago
Alex Bosworth 7e8e5a2f67
Merge pull request #458 from lightninglabs/update-to-v0.17.0
version: bump version to v0.17.0-beta
2 years ago
Alex Bosworth 74c9f1073e
version: bump version to v0.17.0-beta 2 years ago
András Bánki-Horváth c92eeab01e
Merge pull request #455 from bhandras/lnd-selecthophints-integration
loopin: integrate LND's recently exposed `SelectHopHints` in favor of the reimplemention
2 years ago
Andras Banki-Horvath 3237a2cf81
docs: update release notes 2 years ago
Andras Banki-Horvath 31f7b5947a
utils: use SelectHopHints from LND 2 years ago
Andras Banki-Horvath db2fba6f0d
mod: bump LND 2 years ago
Carla Kirk-Cohen 44e734c575
Merge pull request #453 from ellemouton/macaroonService
multi: use lndclient MacaroonService
2 years ago
Elle Mouton 2d7745ecf4 loopd/daemon: rename createDefaultMacaroonFile
Rename createDefaultMacaroonFile to withMacaroonService since this is
now a more appropriate name.
2 years ago
Elle Mouton ad7cdc8ed2 multi: use lndclient MacaroonService
Since the code for creating and using a macaroon service is the same for
multiple projects (pool, loop, litd etc), the code has been unified in
lndclient. So this commit removes the macaroon service code and instead
uses the lndclient code.
2 years ago
Alex Bosworth 0d1cb3e5d6
Merge pull request #452 from suhailsaqan/patch-1
Fixed a typo in autoloop.md
2 years ago
Suhail Saqan 91673ab24b
Fixed a typo in autoloop.md 2 years ago
András Bánki-Horváth 5f0c118088
Merge pull request #450 from bhandras/daemon-stop-fix 2 years ago
Andras Banki-Horvath c8a650842e
docs: update release notes 2 years ago
Andras Banki-Horvath b3d8f5f096
loopd: close dbs when the daemon stops 2 years ago
Carla Kirk-Cohen fa749d4f0c
Merge pull request #448 from carlaKC/rpc-makeserver
swapserverrpc: remove unnecessary vars in proto dockerfile
2 years ago
Harsha Goli be6eae3bda
Merge pull request #419 from carlaKC/autoloop-4-loopin
liquidity: add loopin to autoloop
2 years ago